.uc-app {
    --uc-primary: #2563eb;
    --uc-primary-dark: #1d4ed8;
    --uc-border: #e2e8f0;
    --uc-muted: #64748b;
    --uc-bg-soft: #f8fafc;
}

.uc-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1rem;
}

.uc-sidebar {
    border: 1px solid var(--uc-border);
    border-radius: 14px;
    padding: 0.65rem;
    background: var(--uc-bg-soft);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.uc-cat-btn {
    width: 100%;
    border: 1px solid transparent;
    background: white;
    color: #0f172a;
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    font-size: 0.84rem;
    font-weight: 700;
    text-align: left;
    transition: all 0.2s ease;
}

.uc-cat-btn:hover { border-color: #bfdbfe; }
.uc-cat-btn.active {
    background: var(--uc-primary);
    color: white;
    border-color: var(--uc-primary);
}

.uc-panel {
    border: 1px solid var(--uc-border);
    border-radius: 14px;
    padding: 1rem;
    background: white;
}

.uc-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.uc-badge {
    border: 1px solid #bfdbfe;
    color: #1e40af;
    background: #eff6ff;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.uc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.uc-field label {
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.26rem;
}

.uc-field input,
.uc-field select {
    width: 100%;
    border: 1px solid var(--uc-border);
    border-radius: 10px;
    padding: 0.62rem 0.75rem;
    font-size: 0.95rem;
    background: white;
}

.uc-field input:focus,
.uc-field select:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.uc-actions {
    display: flex;
    gap: 0.55rem;
    margin-top: 0.95rem;
    flex-wrap: wrap;
}

.uc-btn {
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0.58rem 0.88rem;
    font-size: 0.82rem;
    font-weight: 800;
    transition: all 0.2s ease;
}

.uc-btn-soft {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #0f172a;
}

.uc-btn-primary {
    background: var(--uc-primary);
    color: white;
}

.uc-btn-primary:hover { background: var(--uc-primary-dark); }
.uc-btn-soft:hover { background: #e2e8f0; }

.uc-result-wrap {
    margin-top: 0.95rem;
    border: 1px solid #dbeafe;
    background: #f8fbff;
    border-radius: 12px;
    padding: 0.8rem;
}

.uc-all-results-wrap {
    margin-top: 0.9rem;
    border: 1px solid var(--uc-border);
    border-radius: 12px;
    background: #ffffff;
    padding: 0.7rem;
}

.uc-all-results-table-wrap {
    margin-top: 0.45rem;
    max-height: 260px;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.uc-all-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.uc-all-results-table td {
    border-bottom: 1px solid #eef2f7;
    padding: 0.45rem 0.55rem;
    vertical-align: top;
}

.uc-all-results-table tr:last-child td { border-bottom: 0; }
.uc-all-results-table td:first-child {
    color: #334155;
    font-weight: 700;
    width: 46%;
    background: #f8fafc;
}
.uc-all-results-table td:last-child {
    color: #0f172a;
    font-weight: 700;
}

.uc-result-label {
    font-size: 0.75rem;
    color: var(--uc-muted);
    font-weight: 700;
}

.uc-result {
    font-size: 1.5rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.2;
    margin-top: 0.22rem;
}

.uc-meta {
    font-size: 0.75rem;
    color: var(--uc-muted);
    margin-top: 0.32rem;
}

.uc-error {
    margin: 0.45rem 0 0.8rem;
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #b91c1c;
    border-radius: 9px;
    padding: 0.5rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
}

@media (max-width: 980px) {
    .uc-layout { grid-template-columns: 1fr; }
    .uc-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .uc-grid { grid-template-columns: 1fr; }
    .uc-sidebar { grid-template-columns: 1fr; }
}
