.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    background: #f6f9ff;
}

.main-area {
    min-width: 0;
}

.sidebar {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .34), transparent 34%),
        linear-gradient(180deg, #0f172a, #111827);
    color: #fff;
    padding: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 90;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 28px;
}

.sidebar-logo {
    width: 46px;
    height: 46px;
    border-radius: 17px;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
    display: grid;
    place-items: center;
    font-size: 22px;
    box-shadow: 0 12px 30px rgba(37, 99, 235, .28);
}

.sidebar-logo.admin {
    background: linear-gradient(135deg, #7c3aed, #2563eb);
}

.sidebar-brand strong {
    display: block;
    font-size: 19px;
}

.sidebar-brand small {
    display: block;
    color: #bfdbfe;
    margin-top: 3px;
}

.sidebar-section {
    margin: 22px 0 10px;
    font-size: 11px;
    letter-spacing: 1.2px;
    color: #93c5fd;
    text-transform: uppercase;
    font-weight: 900;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 16px;
    color: #dbeafe;
    margin-bottom: 8px;
    font-weight: 800;
    transition: .2s ease;
}

.sidebar a i {
    width: 30px;
    height: 30px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.08);
    font-size: 16px;
}

.sidebar a:hover,
.sidebar a.active {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    transform: translateX(3px);
}

.sidebar a.active i {
    background: #ffffff;
    color: #2563eb;
}

.sidebar-mini-card {
    margin-top: 28px;
    border-radius: 20px;
    padding: 18px;
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .12);
}

.sidebar-mini-card i {
    font-size: 26px;
    color: #93c5fd;
}

.sidebar-mini-card p {
    color: #dbeafe;
    line-height: 1.6;
    font-size: 13px;
    margin-bottom: 0;
}

.topbar {
    height: 82px;
    background: rgba(255, 255, 255, .84);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 70;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-left h2 {
    margin: 0;
    color: #0f172a;
    font-size: 22px;
}

.topbar-left p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}

.sidebar-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 15px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 24px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.system-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #bbf7d0;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
}

.topbar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}

.topbar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
    color: #fff;
    font-weight: 900;
}

.topbar-user strong {
    display: block;
    font-size: 13px;
    color: #0f172a;
}

.topbar-user small {
    display: block;
    font-size: 11px;
    color: #64748b;
}

.sidebar-backdrop {
    display: none;
}

.content {
    padding: 32px;
}

.dashboard-hero,
.result-hero,
.profile-cover {
    background:
        radial-gradient(circle at right top, rgba(20, 184, 166, .30), transparent 30%),
        linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #fff;
    border-radius: 32px;
    padding: 34px;
    display: grid;
    grid-template-columns: 1fr 210px;
    gap: 28px;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: 0 20px 60px rgba(37, 99, 235, .22);
}

.dashboard-hero.admin {
    background:
        radial-gradient(circle at right top, rgba(168, 85, 247, .32), transparent 30%),
        linear-gradient(135deg, #0f172a, #1e40af);
}

.dashboard-hero h1,
.profile-cover h1 {
    font-size: 36px;
    margin: 16px 0 10px;
}

.dashboard-hero p,
.result-hero p,
.profile-cover p {
    color: #dbeafe;
    line-height: 1.8;
    max-width: 780px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.hero-score {
    width: 180px;
    height: 180px;
    border-radius: 30px;
    display: grid;
    place-items: center;
    text-align: center;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .24);
}

.hero-score strong {
    display: block;
    font-size: 54px;
}

.hero-score span {
    color: #dbeafe;
    font-weight: 800;
}

.badge-white {
    background: rgba(255, 255, 255, .17);
    color: #fff;
}

.quick-grid,
.stats-grid,
.dashboard-grid,
.profile-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 24px;
}

.quick-grid,
.stats-grid {
    grid-template-columns: repeat(3, 1fr);
}

.dashboard-grid,
.profile-grid {
    grid-template-columns: repeat(2, 1fr);
}

.panel,
.quick-card,
.stat-card,
.help-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 26px;
    padding: 24px;
    box-shadow: 0 14px 45px rgba(15, 23, 42, .05);
}

.panel-title {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 20px;
}

.panel-title.between {
    justify-content: space-between;
}

.panel-title > i {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 20px;
    flex: 0 0 auto;
}

.panel-title h3 {
    margin: 0 0 5px;
    color: #0f172a;
}

.panel-title p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

.quick-card i,
.stat-card i {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 22px;
    margin-bottom: 16px;
}

.quick-card h3 {
    margin: 0 0 8px;
}

.quick-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}

.stat-card span {
    display: block;
    color: #64748b;
    font-weight: 800;
    margin-bottom: 8px;
}

.stat-card strong {
    display: block;
    font-size: 38px;
    color: #2563eb;
}

.stat-card small {
    color: #64748b;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f8fafc;
    color: #334155;
}

.table-badge {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 900;
}

.link-action {
    color: #2563eb;
    font-weight: 900;
}

.empty-state {
    text-align: center;
    padding: 34px;
    background: #f8fafc;
    border-radius: 20px;
}

.empty-state i {
    font-size: 42px;
    color: #94a3b8;
}

.empty-state h3 {
    margin-bottom: 8px;
}

.empty-state p {
    color: #64748b;
}

.page-intro {
    margin-bottom: 24px;
}

.page-intro.with-action {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.page-intro h1 {
    font-size: 34px;
    color: #0f172a;
    margin: 14px 0 8px;
}

.page-intro p {
    color: #64748b;
    line-height: 1.7;
    max-width: 840px;
}

.recommendation-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

.form-panel label {
    display: block;
    font-weight: 900;
    margin: 16px 0 8px;
}

.form-panel input,
.form-panel select {
    width: 100%;
    padding: 14px 15px;
    border-radius: 15px;
    border: 1px solid #cbd5e1;
    outline: none;
    background: #fff;
    font-size: 15px;
}

.form-panel input:focus,
.form-panel select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

.form-panel small {
    display: block;
    margin-top: 7px;
    color: #64748b;
    line-height: 1.5;
}

.input-prefix {
    display: grid;
    grid-template-columns: 58px 1fr;
    border: 1px solid #cbd5e1;
    border-radius: 15px;
    overflow: hidden;
}

.input-prefix span {
    background: #f1f5f9;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: #475569;
}

.input-prefix input {
    border: 0;
    border-radius: 0;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.submit-btn {
    margin-top: 22px;
    min-height: 52px;
}

.side-help {
    display: grid;
    gap: 18px;
}

.help-card h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 0;
}

.help-card p {
    color: #64748b;
    line-height: 1.7;
}

.help-card.blue {
    background: linear-gradient(135deg, #eff6ff, #fff);
    border-color: #bfdbfe;
}

.scale-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.scale-item strong {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #dbeafe;
    color: #1d4ed8;
}

.result-hero {
    grid-template-columns: 1fr 200px;
}

.result-hero h2 {
    font-size: 46px;
    margin: 16px 0 10px;
}

.confidence-circle {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    text-align: center;
    justify-self: center;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .25);
}

.confidence-circle strong {
    display: block;
    font-size: 36px;
}

.confidence-circle span {
    color: #dbeafe;
    font-weight: 900;
}

.input-summary {
    display: grid;
    gap: 12px;
}

.input-summary div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
}

.input-summary span {
    color: #64748b;
}

.input-summary strong {
    color: #0f172a;
}

.business-list {
    display: grid;
    gap: 12px;
}

.business-item {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
}

.business-item span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 900;
}

.prob-list {
    display: grid;
    gap: 16px;
}

.prob-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 900;
}

.progress {
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.progress div {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #14b8a6);
    border-radius: 999px;
}

.warning-panel {
    border-color: #fde68a;
    background: #fffbeb;
}

.ai-panel {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.note-list {
    margin: 0;
    padding-left: 20px;
    line-height: 1.8;
}

.category-stat-list,
.system-status {
    display: grid;
    gap: 12px;
}

.category-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.category-stat-item strong {
    color: #2563eb;
    font-size: 22px;
}

.system-status > div {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
}

.system-status i {
    font-size: 22px;
}

.system-status i.active {
    color: #16a34a;
}

.system-status i.warning {
    color: #f59e0b;
}

.system-status strong {
    display: block;
}

.system-status small {
    color: #64748b;
}

.profile-cover {
    display: flex;
    grid-template-columns: none;
}

.profile-avatar-large {
    width: 96px;
    height: 96px;
    border-radius: 30px;
    display: grid;
    place-items: center;
    font-size: 42px;
    font-weight: 900;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .25);
}

.profile-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

.profile-row span {
    color: #64748b;
}

.status-active {
    color: #16a34a;
}

.profile-stat-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 22px;
    padding: 22px;
    margin-bottom: 14px;
}

.profile-stat-box.soft {
    background: #f8fafc;
}

.profile-stat-box strong {
    display: block;
    font-size: 44px;
    color: #2563eb;
}

.profile-stat-box span {
    color: #64748b;
}

.profile-actions {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.profile-history-list {
    display: grid;
    gap: 12px;
}

.profile-history-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 15px;
    border-radius: 16px;
    background: #f8fafc;
}

.profile-history-list strong {
    display: block;
    color: #0f172a;
}

.profile-history-list span {
    color: #64748b;
    font-size: 13px;
}

.profile-history-list b {
    color: #2563eb;
}

.muted {
    color: #64748b;
}

@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: -310px;
        top: 0;
        width: 290px;
        height: 100vh;
        transition: .25s ease;
        z-index: 120;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-backdrop.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .48);
        backdrop-filter: blur(3px);
        z-index: 110;
    }

    .sidebar-toggle {
        display: grid;
        place-items: center;
    }

    .topbar {
        padding: 0 20px;
    }

    .system-pill {
        display: none;
    }
}

@media (max-width: 860px) {
    .content {
        padding: 22px;
    }

    .dashboard-hero,
    .result-hero,
    .quick-grid,
    .stats-grid,
    .dashboard-grid,
    .profile-grid,
    .recommendation-layout {
        grid-template-columns: 1fr;
    }

    .hero-score,
    .confidence-circle {
        justify-self: start;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .topbar-user {
        display: none;
    }

    .topbar-left h2 {
        font-size: 18px;
    }

    .topbar-left p {
        display: none;
    }

    .page-intro.with-action {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .content {
        padding: 18px;
    }

    .dashboard-hero,
    .result-hero,
    .profile-cover {
        padding: 24px;
        border-radius: 24px;
    }

    .dashboard-hero h1,
    .profile-cover h1,
    .result-hero h2 {
        font-size: 30px;
    }

    .hero-score,
    .confidence-circle {
        width: 150px;
        height: 150px;
    }

    .topbar {
        height: 74px;
    }

    .topbar-profile {
        padding: 6px;
    }

    .profile-cover {
        flex-direction: column;
        align-items: flex-start;
    }
}
.panel-title.between {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.panel-title-left {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.panel-title-left > i {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 20px;
    flex: 0 0 auto;
}

.table-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 13px;
    font-weight: 900;
}

.btn-table {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 900;
    font-size: 13px;
}

.btn-table:hover {
    background: #dbeafe;
}

table small {
    color: #64748b;
}

@media (max-width: 860px) {
    .panel-title.between {
        flex-direction: column;
    }

    .table-count {
        width: fit-content;
    }
}