:root {
    color-scheme:dark;
    --bg:#080f1d;
    --sidebar:#0b1425;
    --panel:#111e33;
    --panel2:#14243d;
    --stroke:#22334c;
    --muted:#91a5c4;
    --white:#eaf2ff;
    --blue:#438ef4;
    --teal:#27d7cb;
    --green:#46d5a2;
    --danger:#ffab8b;
    --shadow:0 14px 38px #0002
}
* {
    box-sizing:border-box
}
html {
    scroll-behavior:smooth
}
body {
    margin:0;
    background:radial-gradient(ellipse at 40% -20%, #15345a50, transparent 46%),var(--bg);
    font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;
    color:var(--white);
    font-size:14px;
    line-height:1.6
}
button,input,select {
    font:inherit
}
button {
    cursor:pointer
}
button:focus-visible,input:focus-visible,select:focus-visible {
    outline:2px solid var(--teal);
    outline-offset:3px
}
a {
    color:inherit;
    text-decoration:none
}
.app {
    min-height:100vh;
    display:flex
}
.sidebar {
    position:sticky;
    top:0;
    height:100vh;
    width:245px;
    flex:0 0 245px;
    padding:29px 14px 20px;
    background:linear-gradient(160deg, #0b172c, #0c1729 64%, #0a1322);
    border-right:1px solid #27375282;
    display:flex;
    flex-direction:column;
    z-index:20
}
.brand {
    display:flex;
    align-items:center;
    gap:11px;
    padding:5px 13px 40px
}
.brand-mark {
    display:grid;
    place-items:center;
    width:44px;
    height:44px;
    border-radius:13px;
    background:linear-gradient(135deg, #3981e8, #1bd0c4);
    box-shadow:0 7px 24px #2e88f740;
    font-size:25px;
    font-weight:800;
    color:white
}
.brand-dot {
    color:#affbed
}
.brand-name {
    font-size:23px;
    letter-spacing:2px;
    font-weight:800;
    line-height:1.1
}
.brand-name small {
    display:block;
    font-size:9px;
    letter-spacing:2.2px;
    color:#769bc5;
    margin-top:5px
}
.nav-group-label {
    font-size:10px;
    letter-spacing:2px;
    color:#68819f;
    margin:0 15px 17px;
    font-weight:700
}
.nav {
    display:grid;
    gap:8px
}
.nav-link {
    background:transparent;
    border:1px solid transparent;
    color:#9cafcb;
    display:flex;
    align-items:center;
    gap:12px;
    text-align:left;
    padding:15px 13px;
    border-radius:12px;
    font-size:12.5px;
    font-weight:600;
    transition:.2s
}
.nav-link:hover {
    background:#193251;
    color:#fff
}
.nav-link.active {
    background:linear-gradient(105deg, #175ba2b0, #223858aa);
    border-color:#3a95f0b8;
    color:#fff;
    box-shadow:inset 3px 0 var(--teal)
}
.nav-icon {
    font-size:20px;
    width:25px;
    text-align:center;
    line-height:1
}
.sidebar-spacer {
    flex:1
}
.sidebar-bottom {
    border-top:1px solid var(--stroke);
    padding:18px 12px 3px;
    display:flex;
    align-items:center;
    gap:11px
}
.sidebar-bottom strong,.sidebar-bottom small {
    display:block
}
.sidebar-bottom strong {
    font-size:12px
}
.sidebar-bottom small {
    font-size:10px;
    color:var(--muted)
}
.status-dot {
    width:9px;
    height:9px;
    border-radius:100%;
    background:var(--teal);
    box-shadow:0 0 15px var(--teal)
}
.main {
    min-width:0;
    flex:1;
    max-width:1800px;
    margin:0 auto;
    padding:0 32px
}
.topbar {
    display:flex;
    justify-content:space-between;
    align-items:center;
    border-bottom:1px solid #21344b;
    min-height:75px;
    gap:12px
}
.breadcrumb {
    font-size:10px;
    letter-spacing:1.7px;
    color:#6684a6;
    font-weight:800
}
.breadcrumb span {
    padding:0 10px;
    color:#47607a
}
.breadcrumb b {
    color:#b8d1f3
}
.top-actions {
    display:flex;
    align-items:center;
    gap:10px
}
.dataset-badge {
    border:1px solid #235a53;
    border-radius:50px;
    color:var(--teal);
    background:#15382f60;
    padding:7px 12px;
    font-size:10px;
    letter-spacing:.7px;
    font-weight:700;
    white-space:nowrap
}
.dataset-badge.sample {
    color:#ffcd7c;
    border-color:#6a4e35;
    background:#3b2b1d80
}
.page {
    display:none;
    animation:fade .25s ease;
    padding:35px 0 26px
}
.page.active {
    display:block
}
@keyframes fade {
    from {
        opacity:.25;
        transform:translateY(7px)
    }
    to {
        opacity:1;
        transform:none
    }
}
.page-heading {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:25px;
    margin-bottom:24px
}
.eyebrow {
    color:var(--teal);
    font-size:10px;
    letter-spacing:2px;
    font-weight:800;
    margin-bottom:8px
}
h1,h2,h3,p {
    margin-top:0
}
.page-heading h1 {
    font-size:clamp(26px, 3vw, 39px);
    letter-spacing:-1.4px;
    margin:0;
    font-weight:800
}
.page-heading p {
    color:var(--muted);
    margin:7px 0 0;
    max-width:770px
}
.heading-buttons,.inline-actions {
    display:flex;
    align-items:center;
    gap:9px;
    flex-wrap:wrap
}
.btn {
    border:1px solid transparent;
    border-radius:10px;
    padding:11px 16px;
    white-space:nowrap;
    font-weight:700;
    font-size:12px;
    transition:.2s;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px
}
.btn:hover {
    transform:translateY(-1px);
    filter:brightness(1.08)
}
.btn-primary {
    background:linear-gradient(125deg, #297dde, #27a2dc);
    color:white;
    box-shadow:0 8px 20px #147ac42b
}
.btn-subtle {
    background:#192b45;
    color:#d1e6ff;
    border-color:#294568
}
.btn-ghost {
    background:transparent;
    color:var(--muted);
    border-color:#2b3b52
}
.btn-small {
    padding:8px 11px;
    font-size:11px
}
.btn-full {
    width:100%;
    margin-top:8px
}
.notice {
    display:flex;
    align-items:center;
    gap:11px;
    margin:0 0 22px;
    border:1px solid #335b7a7d;
    background:#122b4094;
    color:#aacce3;
    padding:12px 16px;
    border-radius:10px;
    font-size:12px
}
.notice-icon {
    font-size:18px;
    color:var(--teal)
}
.kpi-grid {
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:16px;
    margin-bottom:20px
}
.kpi {
    min-height:126px;
    display:flex;
    align-items:center;
    gap:16px;
    background:linear-gradient(140deg, #15243c, #111b2e);
    border:1px solid #223653;
    border-radius:17px;
    padding:19px 17px;
    box-shadow:var(--shadow)
}
.kpi-icon {
    width:60px;
    height:60px;
    flex:0 0 60px;
    border-radius:16px;
    display:grid;
    place-items:center;
    font-size:34px;
    background:#132e55;
    color:#439bff
}
.kpi-icon.teal {
    color:var(--teal);
    background:#12394a
}
.kpi-info {
    min-width:0
}
.kpi-info span {
    font-size:10px;
    color:#97afce;
    letter-spacing:.5px;
    font-weight:700
}
.kpi-info strong {
    display:block;
    font-size:30px;
    line-height:1.35;
    letter-spacing:-1px
}
.kpi-info small {
    font-size:10.5px;
    color:#819ab9
}
.chart-grid {
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:18px;
    margin-bottom:19px
}
.panel {
    background:linear-gradient(145deg, #122138, #101a2c);
    border:1px solid #243753;
    border-radius:18px;
    padding:23px;
    box-shadow:var(--shadow);
    min-width:0
}
.panel-head {
    display:flex;
    justify-content:space-between;
    gap:18px;
    align-items:center;
    margin-bottom:15px
}
.panel h2 {
    font-size:17px;
    letter-spacing:-.35px;
    margin:0;
    font-weight:750
}
.panel-head p {
    font-size:11.5px;
    color:var(--muted);
    margin:3px 0 0
}
.chart-box {
    height:260px;
    position:relative
}
.chart-box canvas {
    max-width:100%;
    max-height:100%
}
.table-scroll {
    overflow-x:auto
}
.data-table {
    border-collapse:collapse;
    width:100%;
    text-align:left;
    font-size:12px
}
.data-table th {
    color:#8eaccf;
    font-weight:700;
    background:#152743;
    padding:11px 13px;
    white-space:nowrap
}
.data-table td {
    padding:11px 13px;
    border-bottom:1px solid #273852;
    color:#cfdded
}
.data-table tr:last-child td {
    border-bottom:0
}
.data-panel {
    margin-top:2px
}
.wrap-head {
    flex-wrap:wrap
}
.helper {
    color:#7896b6;
    font-size:11px;
    margin:16px 0 0
}
.dataset-stats {
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-bottom:16px
}
.dataset-stats span {
    background:#1b3351;
    border:1px solid #305071;
    color:#c5daef;
    border-radius:8px;
    padding:7px 10px;
    font-size:11px
}


.field {
    display:flex;
    flex-direction:column;
    gap:7px
}
.field label {
    color:#c8d8ec;
    font-size:12px;
    font-weight:650
}
.field input,.field select {
    width:100%;
    background:#0c192c;
    border:1px solid #314c70;
    color:#ecf4ff;
    padding:12px;
    border-radius:10px;
    outline:none
}
.field select option {
    background:#101b2c
}
.field-hint {
    color:#728eae;
    font-size:10px
}











.method-note {
    border:1px solid #254a60;
    background:#10334865;
    color:#91b8ca;
    font-size:11.5px;
    line-height:1.75;
    border-radius:10px;
    padding:12px 14px
}
.assessment-layout {
    display:grid;
    grid-template-columns:minmax(260px, .95fr) minmax(300px, 1.05fr);
    gap:18px
}
.assessment-form {
    display:grid;
    gap:19px
}
.result-panel {
    display:flex;
    flex-direction:column;
    gap:14px
}
.result-panel>.method-note {
    margin-top:auto
}
.result-tag {
    font-size:10px;
    color:var(--teal);
    background:#1b3c4380;
    padding:5px 9px;
    border-radius:7px;
    border:1px solid #286968
}
.empty-result {
    text-align:center;
    margin:auto;
    max-width:360px;
    color:#8ca9c6;
    padding:40px 10px
}
.result-placeholder {
    font-size:70px;
    color:#3f91db
}
.empty-result h3 {
    color:#d7e9ff;
    margin:0 0 7px
}
.result-summary {
    background:#15334c;
    border:1px solid #2e637a;
    padding:16px;
    border-radius:12px
}
.result-summary h3 {
    margin:0 0 5px
}
.result-summary p {
    margin:0;
    color:#a9cce0
}
.result-item {
    padding:14px 15px;
    background:#162843;
    border:1px solid #2c405d;
    margin:10px 0;
    border-radius:10px
}
.result-item b {
    display:block;
    color:#e8f4ff
}
.result-item p {
    margin:5px 0 0;
    color:#a4bed7;
    font-size:12px
}
.result-item.warning {
    border-left:3px solid #e9aa63
}
.result-item.ok {
    border-left:3px solid var(--teal)
}
.report-paper {
    background:#fbfdff;
    color:#263549;
    border-radius:14px;
    max-width:970px;
    margin:0 auto;
    padding:54px 60px;
    box-shadow:0 22px 50px #0004
}
.report-kicker {
    font-size:11px;
    color:#1f7b94;
    letter-spacing:2px;
    font-weight:800
}
.report-paper h1 {
    font-size:27px;
    line-height:1.3;
    letter-spacing:-.8px;
    margin:16px 0 12px
}
.report-paper h2 {
    font-size:17px;
    margin-bottom:9px;
    color:#173b60
}
.report-paper p {
    font-size:13px;
    line-height:1.9;
    color:#40536a
}
.report-meta {
    display:flex;
    gap:25px;
    flex-wrap:wrap;
    border-bottom:1px solid #d5e1ec;
    padding-bottom:18px;
    color:#7b899a;
    font-size:11px
}
.report-paper section {
    margin-top:26px
}
.report-numbers {
    display:grid;
    grid-template-columns:repeat(4, 1fr);
    gap:10px
}
.report-numbers>div {
    border:1px solid #dce6f2;
    background:#f0f5fa;
    padding:13px;
    border-radius:9px
}
.report-numbers strong {
    display:block;
    font-size:22px;
    color:#1d5890
}
.report-numbers span {
    font-size:10px;
    color:#667c95
}
.report-footer {
    margin-top:36px;
    padding-top:15px;
    border-top:1px solid #dce5ee;
    color:#8193a2;
    font-size:11px
}
.app-footer {
    color:#6083a7;
    font-size:10px;
    display:flex;
    justify-content:space-between;
    gap:15px;
    padding:20px 0 30px;
    border-top:1px solid #243550
}
.toast {
    position:fixed;
    bottom:28px;
    right:26px;
    z-index:100;
    border-radius:12px;
    background:#16445c;
    color:#ecffff;
    padding:13px 18px;
    border:1px solid #2f849b;
    box-shadow:0 10px 35px #0005;
    opacity:0;
    pointer-events:none;
    transform:translateY(12px);
    transition:.2s;
    max-width:min(460px, 90vw)
}
.toast.show {
    opacity:1;
    transform:none
}
.hamburger {
    display:none;
    border:0;
    background:transparent;
    color:white;
    font-size:24px
}
.sidebar-overlay {
    display:none
}
@media(max-width:1200px) {
    .main {
        padding:0 22px
    }
    .kpi-grid {
        grid-template-columns:repeat(2, 1fr)
    }
    .kpi {
        min-height:110px
    }

}
@media(max-width:850px) {
    .sidebar {
        position:fixed;
        transform:translateX(-105%);
        transition:.2s;
        box-shadow:10px 0 45px #0007
    }
    .sidebar.open {
        transform:translateX(0)
    }
    .sidebar-overlay.open {
        display:block;
        position:fixed;
        inset:0;
        background:#0009;
        z-index:19
    }
    .hamburger {
        display:block
    }
    .chart-grid,.assessment-layout {
        grid-template-columns:1fr
    }
    .main {
        padding:0 18px
    }
    .page-heading {
        flex-direction:column;
        gap:15px
    }
    .heading-buttons {
        width:100%
    }
}
@media(max-width:560px) {
    .main {
        padding:0 12px
    }
    .topbar {
        min-height:63px
    }
    .breadcrumb {
        font-size:8px;
        letter-spacing:.7px
    }
    .top-actions .btn {
        display:none
    }
    .page {
        padding-top:23px
    }
    .kpi-grid {
        gap:9px
    }
    .kpi {
        padding:13px;
        gap:9px;
        min-height:95px;
        border-radius:12px
    }
    .kpi-icon {
        width:42px;
        height:42px;
        flex-basis:42px;
        font-size:25px
    }
    .kpi-info strong {
        font-size:22px
    }
    .kpi-info span {
        font-size:8px
    }
    .kpi-info small {
        font-size:9px
    }
    .panel {
        padding:15px;
        border-radius:13px
    }
    .chart-box {
        height:230px
    }



    .report-paper {
        padding:24px 18px
    }
    .report-paper h1 {
        font-size:20px
    }
    .report-numbers {
        grid-template-columns:repeat(2, 1fr)
    }
    .app-footer span {
        display:none
    }
}
@media print {
    @page {
        size:A4;
        margin:16mm
    }
    body {
        background:white!important;
        color:black!important
    }
    .sidebar,.topbar,.app-footer,.page:not(#page-report),#page-report>.page-heading,#page-report>.notice,.toast {
        display:none!important
    }
    .main {
        padding:0;
        max-width:none
    }
    .page#page-report {
        display:block!important;
        padding:0
    }
    .report-paper {
        padding:0;
        max-width:none;
        box-shadow:none;
        border-radius:0
    }
    .report-paper section {
        break-inside:avoid
    }
    .report-paper h1 {
        font-size:21pt
    }
    .report-paper p {
        font-size:10.5pt
    }
    .report-paper h2 {
        font-size:13pt
    }
}
/* Bố cục NYRA phiên bản 1.1 theo ảnh tham chiếu */
:root {
    --bg:#070f1e;
    --sidebar:#101a2d;
    --panel:#131f35;
    --panel2:#172641;
    --stroke:#263955;
    --muted:#b7c9e8;
    --white:#e3edff;
    --blue:#3d98ff;
    --teal:#31b9cf;
    --shadow:none
}
body {
    background:radial-gradient(ellipse at 30% -40%, #12213c 0%, transparent 58%),#070e1b;
    color:#e4edff;
    line-height:1.48
}
.sidebar {
    width:250px;
    flex:0 0 250px;
    padding:0 14px 20px;
    background:linear-gradient(145deg, #0b1425 2%, #101b31 65%, #101a2c 100%);
    border-right:1px solid #263651;
    box-shadow:none
}
.brand {
    display:block;
    margin:0 0 32px;
    padding:35px 46px 33px;
    font-size:35px;
    font-weight:800;
    letter-spacing:1px;
    line-height:1;
    color:#dce7ff
}
.nav {
    gap:9px;
    margin-top:8px
}
.nav-link {
    height:63px;
    border-radius:14px;
    padding:0 21px;
    font-size:15px;
    display:flex;
    align-items:center;
    gap:18px;
    color:#bdc9e2;
    font-weight:500
}
.nav-link.active {
    background:linear-gradient(100deg, #164689, #182c52);
    border-color:#2084f6;
    color:#eff6ff;
    box-shadow:inset 3px 0 0 #399aff
}
.nav-icon {
    width:26px;
    height:26px;
    display:grid;
    place-items:center;
    font-size:25px;
    color:#889dbe
}
.nav-icon svg {
    width:25px;
    height:25px
}
.nav-link.active .nav-icon {
    color:#e4eeff
}
.sidebar-bottom {
    border-top:1px solid #263653;
    opacity:.55;
    padding-top:17px
}
.main {
    padding:0 25px 0 35px;
    max-width:none;
    position:relative
}
.topbar {
    position:absolute;
    right:34px;
    top:40px;
    border:0;
    min-height:0;
    z-index:3
}
.topbar .breadcrumb,.topbar #resetDataBtn {
    display:none
}
.dataset-badge,.dataset-badge.sample {
    font-size:14px;
    letter-spacing:0;
    color:#d0ddf9;
    background:#121f37;
    border:1px solid #1d2e4a;
    border-radius:25px;
    padding:12px 18px;
    font-weight:500
}
.page {
    padding:29px 0 44px
}
.page-heading {
    margin-bottom:25px;
    min-height:84px;
    align-items:flex-start;
    padding-left:5px
}
.page-heading .eyebrow {
    display:none
}
.page-heading h1 {
    font-size:46px;
    font-weight:800;
    line-height:1.15;
    letter-spacing:.2px
}
.page-heading p {
    font-size:19px;
    color:#b4c8ea;
    margin:1px 0 0
}
#page-dashboard .page-heading .heading-buttons {
    position:absolute;
    top:970px;
    right:35px;
    z-index:2
}
#page-dashboard .notice {
    display:none
}
.kpi-grid {
    gap:21px;
    margin-bottom:21px
}
.kpi {
    height:119px;
    min-height:119px;
    border-radius:16px;
    padding:15px;
    background:linear-gradient(135deg, #14213a, #152139);
    border:1px solid #1a2b47;
    gap:19px
}
.kpi-icon {
    width:88px;
    height:88px;
    flex:0 0 88px;
    border-radius:22px;
    background:#112c55!important;
    color:#3999ff!important;
    font-size:35px
}
.kpi-icon svg {
    width:60px;
    height:60px
}
.kpi-info {
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:2px
}
.kpi-info strong {
    order:0;
    font-size:37px;
    line-height:1.03;
    font-weight:700;
    letter-spacing:-.75px
}
.kpi-info span {
    order:1;
    font-size:16px;
    color:#c2d2f0;
    letter-spacing:0;
    font-weight:450
}
.kpi-info small {
    display:none
}
.chart-grid {
    gap:20px;
    margin-bottom:20px
}
.panel {
    background:linear-gradient(145deg, #121e33, #101b2f);
    border:1px solid #1e2e4b;
    border-radius:17px;
    padding:22px 23px;
    box-shadow:none
}
.panel h2 {
    font-size:21px;
    letter-spacing:-.6px;
    font-weight:650
}
#page-dashboard .panel-head p {
    display:none
}
#page-dashboard .panel-chart {
    height:306px;
    padding:21px 23px
}
#page-dashboard .panel-chart .chart-box {
    height:229px
}
#page-dashboard .panel-chart .panel-head {
    margin-bottom:18px
}
#page-dashboard .chart-grid>.panel-chart:nth-child(1) {
    grid-column:1;
    grid-row:1
}
#page-dashboard .chart-grid>.panel-chart:nth-child(2) {
    grid-column:2;
    grid-row:1
}
#page-dashboard .chart-grid>.panel-chart:nth-child(3) {
    grid-column:1;
    grid-row:2
}
#page-dashboard .chart-grid>.panel-chart:nth-child(4) {
    grid-column:2;
    grid-row:2
}
#page-dashboard .chart-grid {
    grid-template-columns:44% minmax(0, 56%)
}
#page-dashboard .data-panel {
    margin-top:18px
}
.btn-primary {
    background:#297cdd;
    box-shadow:none
}
@media(max-width:1250px) {
    .kpi-grid {
        grid-template-columns:repeat(2, minmax(0, 1fr))
    }
    .kpi-icon {
        width:70px;
        height:70px;
        flex-basis:70px
    }
    .kpi-icon svg {
        width:50px;
        height:50px
    }
    .kpi {
        height:110px;
        min-height:110px
    }
}
@media(max-width:850px) {
    .sidebar {
        position:fixed
    }
    .topbar {
        top:22px;
        right:16px
    }
    .page-heading {
        padding-left:0
    }
    .page-heading h1 {
        font-size:37px
    }
    .page-heading p {
        font-size:15px
    }
    #page-dashboard .chart-grid {
        grid-template-columns:1fr
    }
    .main {
        padding:0 18px
    }
    #page-dashboard .page-heading .heading-buttons {
        position:static;
        margin-top:15px
    }
}
@media(max-width:560px) {
    .page {
        padding-top:24px
    }
    .page-heading {
        min-height:100px;
        margin-bottom:12px
    }
    .page-heading h1 {
        font-size:37px
    }
    .kpi-grid {
        gap:10px
    }
    .kpi {
        height:98px;
        min-height:98px;
        gap:9px;
        padding:10px
    }
    .kpi-icon {
        width:46px;
        height:48px;
        flex-basis:46px;
        border-radius:12px
    }
    .kpi-icon svg {
        width:34px;
        height:34px
    }
    .kpi-info strong {
        font-size:23px
    }
    .kpi-info span {
        font-size:10px
    }
    .panel h2 {
        font-size:17px
    }
    #page-dashboard .panel-chart {
        height:280px;
        padding:17px
    }
    #page-dashboard .panel-chart .chart-box {
        height:214px
    }
    .dataset-badge {
        font-size:10px!important;
        padding:8px 10px!important
    }
}
@media print {
    .topbar {
        display:none
    }
}
#page-dashboard .data-panel .heading-buttons {
    display:flex;
    align-items:center;
    gap:9px
}
#page-dashboard .data-panel .heading-buttons .btn {
    padding:8px 11px;
    font-size:11px
}
/* Phiên bản 1.2 — điều chỉnh bố cục theo tỉ lệ hiển thị và mức thu phóng.
   Giữ nội dung chỉ số trong ô và tránh chồng lấp thanh trên. */
html,body {
    max-width:100%;
    overflow-x:hidden
}
.main,.page,.kpi-grid,.chart-grid,.panel {
    min-width:0
}
.sidebar {
    width:238px;
    flex-basis:238px
}
.brand {
    padding-left:33px;
    padding-right:12px
}
.nav-link {
    font-size:13px;
    gap:12px;
    padding:0 13px;
    white-space:nowrap
}
.nav-icon,.nav-icon svg {
    width:23px;
    height:23px;
    flex:0 0 23px
}
.kpi-grid {
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:14px
}
.kpi {
    height:112px;
    min-height:112px;
    min-width:0;
    padding:13px;
    gap:12px;
    overflow:hidden
}
.kpi-icon {
    width:62px;
    height:66px;
    flex:0 0 62px;
    border-radius:17px
}
.kpi-icon svg {
    width:47px;
    height:47px
}
.kpi-info {
    flex:1;
    min-width:0;
    overflow:visible;
    gap:5px
}
.kpi-info strong {
    font-size:clamp(23px, 2.3vw, 34px);
    line-height:1.12;
    letter-spacing:-.7px;
    white-space:nowrap
}
.kpi-info span {
    font-size:clamp(10px, .99vw, 14px);
    line-height:1.22;
    white-space:nowrap;
    letter-spacing:-.2px
}
#page-report .page-heading {
    padding-right:185px
}
#page-report .page-heading .heading-buttons {
    margin-top:77px;
    flex:0 0 auto
}
#page-report .page-heading h1 {
    font-size:clamp(29px, 3vw, 44px)
}
/* make every page's long h1 less aggressive at scaled viewport */
#page-assessment .page-heading h1 {
    font-size:clamp(28px, 3vw, 42px)
}
@media(max-width:1450px) {
    .sidebar {
        width:215px;
        flex-basis:215px
    }
    .brand {
        font-size:30px;
        padding-left:27px
    }
    .nav-link {
        font-size:12px;
        gap:10px;
        padding:0 10px
    }
    .nav-icon,.nav-icon svg {
        width:21px;
        height:21px;
        flex-basis:21px
    }
    .main {
        padding-left:22px;
        padding-right:22px
    }
    .kpi-grid {
        gap:11px
    }
    .kpi {
        gap:9px;
        padding:11px;
        min-height:103px;
        height:103px
    }
    .kpi-icon {
        width:51px;
        flex-basis:51px;
        height:55px;
        border-radius:13px
    }
    .kpi-icon svg {
        width:39px;
        height:39px
    }
    .kpi-info strong {
        font-size:clamp(21px, 2.2vw, 30px)
    }
    .kpi-info span {
        font-size:clamp(10px, .99vw, 13px)
    }
}
@media(max-width:1080px) {
    .kpi-grid {
        grid-template-columns:repeat(2, minmax(0, 1fr))
    }
    .kpi {
        height:109px;
        min-height:109px;
        padding:14px;
        gap:14px
    }
    .kpi-icon {
        width:65px;
        height:65px;
        flex-basis:65px
    }
    .kpi-icon svg {
        width:46px;
        height:46px
    }
    .kpi-info strong {
        font-size:29px
    }
    .kpi-info span {
        font-size:13px
    }
    #page-dashboard .chart-grid {
        grid-template-columns:1fr 1fr
    }
}
@media(max-width:850px) {
    .sidebar {
        width:min(280px, 85vw);
        flex-basis:auto
    }
    .brand {
        padding:24px 24px 30px
    }
    .nav-link {
        font-size:14px;
        gap:15px;
        padding:0 18px
    }
    .main {
        padding:0 18px
    }
    #page-dashboard .chart-grid {
        grid-template-columns:1fr
    }
    #page-report .page-heading {
        padding-right:0;
        padding-top:76px;
        flex-direction:column
    }
    #page-report .page-heading .heading-buttons {
        margin-top:0
    }
    .topbar {
        right:18px;
        top:21px
    }
}
@media(max-width:560px) {
    .kpi-grid {
        grid-template-columns:repeat(2, minmax(0, 1fr));
        gap:9px
    }
    .kpi {
        height:96px;
        min-height:96px;
        gap:7px;
        padding:9px
    }
    .kpi-icon {
        width:40px;
        flex-basis:40px;
        height:45px;
        border-radius:11px
    }
    .kpi-icon svg {
        width:29px;
        height:29px
    }
    .kpi-info strong {
        font-size:clamp(19px, 5vw, 25px)
    }
    .kpi-info span {
        font-size:10px;
        white-space:normal;
        line-height:1.12
    }
    .page-heading h1 {
        font-size:35px
    }
    #page-report .page-heading h1 {
        font-size:32px
    }
}
@media print {
    .main {
        padding:0!important
    }
    #page-report .page-heading {
        display:none!important
    }
}


/* NYRA MONO 2.1 — monochrome layout, serif typography */
:root {color-scheme:dark;--bg:#08090b;--sidebar:#0d0e11;--panel:#141519;--panel2:#1c1d22;--stroke:#34353a;--muted:#a8a8af;--white:#f4f4f5;--blue:#f0f0f1;--teal:#f0f0f1;--green:#fff;--danger:#e9b5b5;--shadow:none}
html,body {max-width:100%;background:#08090b;color:#f1f1f2;overflow-x:hidden}
body {font-family:'Roboto',Calibri,'Segoe UI',sans-serif;line-height:1.55}
p,.field-hint,.method-note,.helper,.panel-head p,.assessment-lead,.report-paper p {font-family:Calibri,'Roboto',sans-serif}
.app {display:block;min-height:100vh}
.sidebar {position:sticky;top:0;width:100%;height:auto;min-height:76px;flex-basis:auto;transform:none;z-index:40;display:flex;flex-direction:row;align-items:center;gap:clamp(18px,4vw,72px);padding:0 clamp(16px,4vw,65px);background:#0c0d10;border-bottom:1px solid #333439;box-shadow:0 6px 25px #0005}
.brand {display:flex;align-items:center;white-space:nowrap;margin:0;padding:0;font-size:34px;line-height:1.2;letter-spacing:1.5px;font-weight:700;color:white}
.nav {display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0}
.nav-link {height:50px;display:flex;align-items:center;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;padding:0 14px;font-size:13px;letter-spacing:.15px;font-weight:500;color:#bcbcc1;white-space:nowrap}
.nav-link:hover {background:#1b1c20;color:white}
.nav-link.active {background:none;border-color:#f3f3f4;box-shadow:none;color:#fff}
.nav-icon,.nav-icon svg {width:18px;height:18px;flex-basis:18px;color:inherit}
.sidebar-spacer,.sidebar-bottom {display:none}
.main {width:min(100%,1500px);margin:0 auto;max-width:1500px;padding:0 clamp(18px,3vw,52px);position:relative}
.topbar {position:static;min-height:72px;display:flex;gap:18px;justify-content:space-between;align-items:center;border:0;border-bottom:1px solid #24252a;margin:0 0 8px;z-index:1}
.topbar .breadcrumb {display:block;color:#85868d;letter-spacing:.8px;font-size:11px}
.topbar .breadcrumb b {color:#e1e1e3}
.topbar #resetDataBtn {display:inline-flex}
.top-actions {gap:12px;flex-wrap:wrap;justify-content:flex-end}
.header-search {display:flex;align-items:center;gap:8px;border:1px solid #36373d;background:#17181c;border-radius:10px;padding:0 12px;height:38px;color:#bcbcc0}
.header-search span {font-size:25px;line-height:1}
.header-search input {width:clamp(120px,17vw,230px);border:0;outline:none;color:#eee;background:transparent;font-size:12px;font-family:inherit}
.header-search input::placeholder {color:#888990}
.dataset-badge,.dataset-badge.sample {background:#1b1c20;border:1px solid #3b3c43;border-radius:10px;color:#ebebed;font-size:11px;padding:8px 13px}
.page {padding:28px 0 48px}
.page-heading {min-height:0;display:flex;align-items:center;margin:0 0 22px;gap:18px;padding:0}
.page-heading .eyebrow {display:block;color:#a8a8ae;font-size:11px;letter-spacing:1.4px}
.page-heading h1 {font-size:clamp(29px,3.2vw,43px);color:#fff;letter-spacing:-.9px}
.page-heading p {font-size:16px;color:#aaaab2}
.notice {display:flex!important;background:#17181c;border-color:#313239;color:#d1d1d3}
.notice-icon {color:#fff}
.kpi-grid {grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.kpi {min-height:110px;height:auto;padding:16px;gap:13px;background:#16171b;border:1px solid #313238;border-radius:14px;overflow:visible}
.kpi-icon {width:55px;height:55px;flex:0 0 55px;background:#24252a!important;color:#f1f1f2!important;border-radius:13px}
.kpi-icon svg {width:36px;height:36px}
.kpi-info {overflow:visible;gap:4px}
.kpi-info strong {font-size:clamp(19px,2.1vw,30px);color:#fff;white-space:normal;overflow-wrap:anywhere}
.kpi-info span {font-size:12px;color:#bcbcc2;white-space:normal}
.kpi-info small {display:block;color:#83848b;font-size:10px}
#page-dashboard .chart-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
#page-dashboard .panel-chart {height:320px;min-height:320px;padding:22px}
#page-dashboard .panel-chart .chart-box {height:240px}
#page-dashboard .panel-head p {display:block;color:#888990}
.panel {background:#15161a;border:1px solid #36373c;box-shadow:none;border-radius:16px;padding:24px}
.panel h2 {font-weight:500;color:#fff;font-size:20px}
.chart-box canvas {filter:grayscale(1)}
.btn {font-weight:500}
.btn-primary {color:#0a0a0b;background:#f5f5f5;border:1px solid #fafafa;box-shadow:none}
.btn-primary:hover {background:#dedee0;filter:none}
.btn-subtle {background:#242529;color:#f4f4f5;border-color:#424349}
.btn-ghost {background:transparent;color:#d8d8d9;border-color:#414248}
.btn:hover {transform:translateY(-1px)}
.dataset-stats span {background:#24252a;border-color:#393a40;color:#e3e3e5}
.data-table th {background:#232429;color:#e8e8ea}
.data-table td {border-color:#35363b;color:#e1e1e3}
#page-assessment .page-heading h1,#page-report .page-heading h1 {font-size:clamp(29px,3.2vw,43px)}
#page-report .page-heading {padding:0;flex-direction:row}
.assessment-lead {color:#b9b9bf;font-size:15px;max-width:800px;margin:0 0 24px}
.assessment-layout {display:block;max-width:850px;margin:0 auto}
.assessment-layout.show-results {max-width:1080px}
.assessment-layout [hidden] {display:none!important}
.input-panel,.result-panel {width:100%}
.field {gap:8px}
.field label {font-size:14px;color:#f0f0f1}
.field input,.field select {background:#101115;color:#f7f7f8;border:1px solid #48494f;min-height:48px}
.field-hint {font-size:12px;color:#a7a7ad}
.assessment-form {gap:19px}
.assessment-form .btn-full {min-height:48px;font-size:14px}
.result-panel {display:flex;flex-direction:column;gap:20px}
.result-panel .panel-head {border-bottom:1px solid #35363b;padding-bottom:17px;margin-bottom:4px}
.result-tag {background:#28292e;border-color:#44454b;color:#f0f0f1}
.result-summary {background:#1e1f24;border-color:#4d4e54}
.result-summary p {color:#c7c7cc}
.result-item {background:#1b1c21;border-color:#35363d;margin:8px 0}
.result-item b {color:#fafafa}
.result-item p {color:#c5c5ca;font-size:13px}
.result-item.warning {border-left-color:#e3b8a5}
.result-item.ok {border-left-color:#fff}
.caffeine-guidance {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.caffeine-guidance:before {content:'Gợi ý sinh hoạt & caffeine';display:block;grid-column:1/-1;font-size:20px;font-weight:500;color:#fff;padding:12px 0 2px;border-top:1px solid #37383d}
.guidance-item {border:1px solid #38393e;background:#1b1c20;border-radius:12px;padding:16px}
.guidance-item h3 {font-size:14px;margin:0 0 8px;color:#fff;font-weight:500}
.guidance-item p {font-size:13px;color:#c6c6cb;margin:0;line-height:1.65}
.method-note {background:#202126;border-color:#414248;color:#c4c4c9;margin-top:0!important}
.method-note a {text-decoration:underline;color:#fff}
#editAssessmentBtn {align-self:flex-start}
.report-paper {box-shadow:none}
.report-paper h1,.report-paper h2,.report-paper strong {font-family:'Roboto',Calibri,sans-serif}
.app-footer {color:#a5a5aa}
.toast {background:#25262b;border-color:#52535a;color:#fff}
@media(max-width:1100px) {.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar{gap:22px}.nav-link{padding:0 8px}}
@media(max-width:850px){.sidebar{position:sticky;transform:none;width:100%;height:auto;min-height:62px;padding:12px 16px;gap:12px;flex-wrap:wrap}.brand{font-size:29px}.nav{flex:1;gap:3px;justify-content:flex-end}.nav-link{height:40px;font-size:11px;padding:0 7px;gap:6px}.nav-icon,.nav-icon svg{width:15px;height:15px;flex-basis:15px}.hamburger{display:none}.main{padding:0 16px}.topbar{min-height:64px}#page-dashboard .chart-grid{grid-template-columns:1fr}#page-dashboard .chart-grid>.panel-chart:nth-child(n){grid-column:auto;grid-row:auto}.caffeine-guidance{grid-template-columns:1fr}.header-search input{width:130px}}
@media(max-width:560px){.sidebar{padding:10px 12px;align-items:flex-start}.brand{width:100%;font-size:28px}.nav{width:100%;justify-content:space-between}.nav-link{font-size:10px;padding:0 5px}.nav-icon{display:none}.topbar{gap:8px;flex-wrap:wrap;padding-bottom:12px}.topbar .breadcrumb{display:none}.top-actions{width:100%;justify-content:space-between}.header-search{flex:1}.header-search input{width:100%}.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.kpi{min-height:105px;padding:10px;gap:7px}.kpi-icon{width:34px;flex-basis:34px;height:39px}.kpi-icon svg{width:25px;height:25px}.kpi-info strong{font-size:19px}.kpi-info span{font-size:10px}.page{padding:22px 0}.page-heading h1{font-size:31px!important}.panel{padding:18px}.report-paper{padding:24px 18px}#page-report .page-heading{flex-direction:column;align-items:flex-start}}
@media print {.sidebar,.topbar,.assessment-lead{display:none!important}.main{padding:0!important}.page#page-report{display:block!important}.report-paper{box-shadow:none!important}}



/* NYRA typography: Montserrat variable */
html, body, button, input, select, textarea, h1, h2, h3, h4, h5, h6, p, span, label, small, strong, b, a, .brand, .nav-link, .btn, .kpi-info strong, .report-paper h1, .report-paper h2, .report-paper strong, .header-search input, .field-hint, .method-note, .helper, .panel-head p, .assessment-lead {font-family:'Montserrat',Arial,sans-serif!important;}

/* Báo cáo nghiên cứu: bảng khoa học, nội dung rõ ràng, thân thiện khi in */
.report-paper {max-width:1050px;padding:48px 52px;line-height:1.65}
.report-paper h1 {font-size:23px;line-height:1.45;letter-spacing:0}
.report-paper h2 {font-size:19px;margin-bottom:16px;border-bottom:1px solid #dfe5eb;padding-bottom:9px}
.report-paper h3 {font-size:15px;color:#234760;margin:20px 0 8px}
.report-paper h4 {font-size:13px;color:#2b465b;margin:18px 0 8px}
.report-paper p,.report-paper li {font-size:12.5px;line-height:1.85;color:#344256}
.report-paper ul,.report-paper ol {padding-left:22px}
.report-paper section {margin-top:35px}
.report-source {margin-top:14px}
.report-warning {background:#f4f4f4;padding:12px 14px;border-left:4px solid #555;color:#343434!important;font-weight:600}
.report-note {font-size:11px!important;color:#66758a!important}
.report-table-wrap {width:100%;overflow-x:auto;margin:14px 0 16px}
.report-table {width:100%;border-collapse:collapse;font-size:12px;color:#27384b}
.report-table th,.report-table td {border:1px solid #d6dce4;padding:10px 12px;text-align:left;vertical-align:top;overflow-wrap:anywhere}
.report-table th {background:#ebedf0;color:#1e2d3e;font-weight:700}
.report-table tr:nth-child(even) td {background:#f8f9fb}
.report-table td:last-child {font-variant-numeric:tabular-nums}
@media(max-width:650px){.report-paper{padding:24px 17px}.report-paper h1{font-size:18px}.report-table{font-size:10.5px}.report-table th,.report-table td{padding:8px 7px}}
@media print {.report-paper{padding:0!important}.report-paper section{break-inside:auto}.report-table tr{break-inside:avoid}.report-paper h2,.report-paper h3,.report-paper h4{break-after:avoid}.report-table-wrap{overflow:visible}.report-warning{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* NYRA chart containment fix: prevents doughnut and axis labels overflowing panels. */
#page-dashboard .chart-grid { align-items: stretch; }
#page-dashboard .panel-chart {
  height: auto !important;
  min-height: 350px !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
#page-dashboard .panel-chart .panel-head { flex: 0 0 auto; margin-bottom: 14px; }
#page-dashboard .panel-chart .chart-box {
  height: 250px !important;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  flex: 1 1 250px;
  position: relative;
  overflow: hidden;
}
#page-dashboard .panel-chart .chart-box canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
}
@media (max-width: 560px) {
  #page-dashboard .panel-chart { min-height: 330px !important; }
  #page-dashboard .panel-chart .chart-box { height: 235px !important; flex-basis: 235px; }
}



/* ===============================================================
 NYRA BEIGE & ROSE THEME
 Presentation-only skin: warm beige surfaces, dusty-rose accents, Montserrat.
 =============================================================== */
:root {
 color-scheme: light;
 --bg:#F5EEE6; --sidebar:#EFE3D6; --panel:#FFFAF5; --panel2:#F8EEE6;
 --stroke:#E3CFC4; --muted:#7D6468; --white:#3F2A30;
 --blue:#C2677B; --teal:#D3A27A; --green:#8A4458;
 --danger:#B5485F; --shadow:0 1px 2px rgba(90,55,60,.06),0 6px 18px rgba(90,55,60,.05);
}
html, body {background:#F5EEE6!important;color:#3F2A30!important;}
body {font-family:'Montserrat',system-ui,sans-serif!important;
 background-image:radial-gradient(circle at 10% 0%,#F7DDE233 0,transparent 40%),radial-gradient(circle at 90% 70%,#EBD8C433 0,transparent 40%)!important;}
body p,body .field-hint,body .method-note,body .helper,body .panel-head p,body .assessment-lead {font-family:'Montserrat',system-ui,sans-serif!important;}
.sidebar {background:#EFE3D6!important;border-bottom:1px solid #DCC5B8!important;box-shadow:0 2px 10px rgba(90,55,60,.06)!important;}
.brand {color:#5A2F3C!important;text-shadow:none;font-weight:800!important;}
.brand::before {content:'☕';font-size:25px;line-height:1;margin-right:9px;}
.nav-link {color:#6E5257!important;border-radius:8px!important;}
.nav-link:hover {background:#F6E1E4!important;color:#5A2F3C!important;}
.nav-link.active {background:#C2677B!important;color:#FFF8F4!important;border-color:#C2677B!important;box-shadow:0 2px 8px rgba(194,103,123,.25)!important;}
.nav-link.active .nav-icon,.nav-link.active svg {color:#FFF8F4!important;}
.nav-icon rect[fill="#152036"] {fill:currentColor;opacity:.35}
.topbar {border-bottom-color:#E3CFC4!important;}
.breadcrumb,.topbar .breadcrumb {color:#9A7C80!important;}
.topbar .breadcrumb b {color:#5A2F3C!important;}
.page-heading h1,.page-heading h2,.page-heading strong {color:#4A2A34!important;}
.page-heading p,.page-heading .subtitle,.page-heading small {color:#7D6468!important;}
.page-heading h1 {text-shadow:none;}
.eyebrow {color:#B05A6E!important;}
.kpi,.panel,.assessment-form,.result-panel,.notice {
 background:#FFFAF5!important;
 border:1px solid #EAD7CC!important;
 box-shadow:var(--shadow)!important;
 color:#3F2A30!important;
}
.method-note {background:#F8EEE6!important;border:1px solid #EAD7CC!important;color:#6E5257!important;box-shadow:none!important;}
.kpi-icon,.kpi-icon.blue,.kpi-icon.teal,.kpi-icon.green,.kpi-icon.purple {background:#F6E1E4!important;color:#B05A6E!important;border:1px solid #EBC3CB!important;}
.kpi-info strong {color:#4A2A34!important;}
.kpi-info span {color:#6E5257!important;}
.kpi-info small,.panel p,.panel-head p,.helper,.field-hint {color:#7D6468!important;}
.panel h2,.panel h3 {color:#4A2A34!important;}
.panel-chart {background:#FFFAF5!important;}
.btn-primary,button.btn-primary,.btn.primary {background:#C2677B!important;color:#FFF8F4!important;border:1px solid #B05A6E!important;box-shadow:0 2px 6px rgba(176,90,110,.25)!important;}
.btn-primary:hover,button.btn-primary:hover {background:#A9536A!important;transform:translateY(-1px);}
.btn,.btn-secondary,button,select,input,textarea {accent-color:#C2677B;}
.btn-subtle,.btn-secondary,.btn-outline,.btn-ghost {background:#FFF6F2!important;color:#8A4458!important;border:1px solid #E3C3C9!important;box-shadow:none!important;}
.btn-subtle:hover {background:#F6E1E4!important;}
input:not([type=checkbox]):not([type=radio]),select,textarea,.field input,.field select {
 background:#FFFDFB!important;color:#3F2A30!important;border-color:#DCC5B8!important;
}
input:focus,select:focus,textarea:focus {border-color:#C2677B!important;outline:2px solid #F0C9D1!important;outline-offset:1px}
input::placeholder,textarea::placeholder {color:#B39A9D!important;}
.field label,.field strong {color:#4A2A34!important;}
.notice {border-left:4px solid #C2677B!important;}
.notice-icon,.result-tag {color:#B05A6E!important;}
.result-tag {background:#F6E1E4!important;border-color:#EBC3CB!important;}
.result-summary,.empty-result,.result-placeholder {background:#F8EEE6!important;border-color:#EAD7CC!important;color:#3F2A30!important;}
.result-item {background:#FFFDFB!important;border:1px solid #EAD7CC!important;border-left:4px solid #D3A27A!important;color:#3F2A30!important;}
.result-item.warning {border-left-color:#C2677B!important;}
.result-item.ok {border-left-color:#B9A27E!important;}
.result-item b {color:#4A2A34!important;}
.result-item p {color:#6E5257!important;}
.guidance-item {background:#F8EEE6!important;border:1px solid #EAD7CC!important;color:#3F2A30!important;}
.guidance-item h3 {color:#8A4458!important;}
.guidance-item p {color:#6E5257!important;}
.app-footer,.report-footer {color:#8C7276!important;}
.toast {background:#5A2F3C!important;color:#FFF6EE!important;border:1px solid #C2677B!important;}
.page-heading::after {content:'☕  ◆  ✦';display:block;position:absolute;right:0;top:0;color:#D59AA6;font-size:17px;letter-spacing:7px;opacity:.7;pointer-events:none;}
.kpi,.panel,.notice {border-radius:12px!important;}
.kpi::before,.panel::before {pointer-events:none;}
.report-paper {background:#FFFCF8!important;color:#3F2A30!important;border:1px solid #EAD7CC!important;box-shadow:var(--shadow)!important;}
.report-paper h1,.report-paper h2,.report-paper h3,.report-paper h4 {color:#8A4458!important;}
.report-paper p,.report-paper li,.report-paper .report-source,.report-meta,.report-paper small {color:#4F3A3E!important;font-family:'Montserrat',system-ui,sans-serif!important;}
.report-paper .report-warning {background:#F8EEE6!important;color:#4F3A3E!important;border-left:4px solid #C2677B!important;}
.report-table th {background:#F3DCE0!important;color:#5A2F3C!important;}
.report-table td {background:#FFFCF8!important;color:#4F3A3E!important;}
.report-table tr:nth-child(even) td {background:#FAF1EA!important;}
@media(max-width:850px){.page-heading::after{display:none}}
@media print {
 body,html {background:white!important;}
 .report-paper {background:white!important;box-shadow:none!important;border:0!important;}
 .report-table td {background:white!important;}
}

/* Personal check-in area (assessment page) */
.chart-box{position:relative}
.chart-empty{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:20px;color:#7D6468;font-size:14px;background:#FFFAF5e6;border-radius:8px}
.field-date input[type=date]{max-width:260px}
.date-note{margin:8px 0 0;font-size:13px;color:#8A4458!important;font-weight:600}
.date-note:empty{display:none}
.day-plan{margin:18px 0;padding:18px 20px;border:1px solid #EBC3CB;border-radius:12px;background:#FCF0F1}
.day-plan h3{margin:0 0 8px;color:#8A4458!important;font-size:16px}
.plan-note{font-size:13px;color:#7D6468!important;margin:0 0 8px}
.plan-list{margin:0;padding-left:22px}
.plan-list li{margin:0 0 10px;color:#3F2A30}
.plan-list li p{margin:0}
.plan-list .plan-why{font-size:13px;color:#7D6468!important;margin-top:2px}
.personal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-top:24px;align-items:start}
.personal-panel{padding:22px!important}
.personal-panel .panel-head{margin-bottom:12px}
.pattern-panel,.history-panel{grid-column:auto}
.muted-text{color:#7D6468!important;font-size:14px}
.plain-list{margin:0 0 10px;padding-left:20px;color:#3F2A30}
.plain-list li{margin-bottom:6px}
.hist{display:flex;gap:6px;align-items:center;padding:10px 8px;border-top:1px solid #EFE0D6;border-radius:8px;flex-wrap:wrap}
.hist.current{background:#FCF0F1;box-shadow:inset 3px 0 #C2677B}
.hist-text{flex:1;min-width:180px;display:flex;flex-direction:column}
.hist-text strong{color:#4A2A34;font-size:14px}
.hist-text small{color:#7D6468;font-size:12.5px}
.undo-note{display:flex;gap:10px;align-items:center;flex-wrap:wrap;background:#F8EEE6;padding:8px 12px;border-radius:8px;font-size:14px}
.reflect-form .field{margin-bottom:12px}
.reflect-form textarea,.reflect-form input{width:100%;padding:10px 12px;border:1px solid #DCC5B8;border-radius:8px;font:inherit}
.caf-panel details{border-top:1px solid #EFE0D6;padding:10px 0}
.caf-panel summary{cursor:pointer;font-weight:600;color:#4A2A34}
.caf-panel details p{margin:8px 0 2px;font-size:14px}
@media(max-width:900px){.personal-grid{grid-template-columns:1fr}}

:root{--coffee-pixel-illustration:url("data:image/svg+xml;base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04aDRWNU02NiAyMWgtNHYtN2g0IiBzdHJva2U9IiNmZmQ3YWIiIGZpbGw9Im5vbmUiIHN0cm9rZS13aWR0aD0iMyIvPjxyZWN0IHg9IjkxIiB5PSIzNiIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE4IiBmaWxsPSIjZTdiYzkzIi8+PHJlY3QgeD0iOTQiIHk9IjM4IiB3aWR0aD0iMTAiIGhlaWdodD0iMTEiIGZpbGw9IiM5MjUxNWMiLz48L3N2Zz4=")}
/* Side illustration occupies only unused sidebar space. It does not change the original columns. */
.sidebar{isolation:isolate;}
.sidebar::before{content:"MIDNIGHT\A COFFEE CLUB ✦";white-space:pre;pointer-events:none;position:absolute;bottom:405px;left:27px;font-family:'Montserrat',Arial,sans-serif;font-size:10px;letter-spacing:2px;font-weight:800;line-height:1.8;color:#B05A6E;transform:rotate(-5deg);opacity:.94;z-index:0}
.sidebar::after{content:"";pointer-events:none;position:absolute;bottom:102px;left:8px;right:8px;height:296px;background-image:var(--coffee-pixel-illustration);background-position:center bottom;background-size:contain;background-repeat:no-repeat;image-rendering:pixelated;opacity:.98;z-index:0}
.sidebar>.brand,.sidebar>.nav,.sidebar>.sidebar-bottom,.sidebar>.sidebar-spacer{position:relative;z-index:1}
.sidebar-bottom{background:transparent}
/* In the original desktop page heading, add a small pure decorative pixel cup. */
#page-dashboard .page-heading{position:relative;min-height:100px;padding-right:132px!important}
#page-dashboard .page-heading::after{content:"";position:absolute;right:2px;top:4px;width:120px;height:78px;background:var(--coffee-pixel-cup) center/contain no-repeat;opacity:1;pointer-events:none}
/* Warm, subtle pixel motifs, without changing card sizes or grid positions. */
.kpi{position:relative;isolation:isolate;}
.kpi:after{content:'✦';position:absolute;top:6px;right:12px;color:#D59AA6;font-size:12px;opacity:.7;pointer-events:none}
.panel-chart{background-image:linear-gradient(90deg,transparent 97%,#c2677b0d 100%)!important;background-size:21px 21px!important}
.nav-link,.kpi,.panel,.notice,.btn,.data-table{transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease}
.kpi:hover,.panel:hover{border-color:#D39AA7!important}
/* Previous font remains Montserrat everywhere, including the printable report. */
@media(min-width:851px) and (max-height:760px){.sidebar::before,.sidebar::after{display:none}}
@media(max-width:850px){.sidebar::before,.sidebar::after{display:none}#page-dashboard .page-heading{padding-right:120px!important}}
@media(max-width:560px){#page-dashboard .page-heading{padding-right:0!important;min-height:auto}#page-dashboard .page-heading::after{display:none}}
@media print{.sidebar::after,.sidebar::before,#page-dashboard .page-heading::after{display:none!important}}
.assessment-lead{color:#6E5257!important}
.panel-head h2,.panel h2{font-weight:700}
.chart-box canvas{filter:none!important}
.method-note a,.report-paper a{color:#8A4458!important;text-decoration:underline}
.result-panel hr,.result-panel .panel-head{border-color:#EAD7CC!important}
.result-panel .panel-head{border-bottom:1px solid #EAD7CC!important}
.empty-result h3,.result-summary h3{color:#4A2A34!important}
.guidance-item h3{font-size:14px}

.personal-grid{grid-template-columns:1fr!important}
#aCaffeine{margin-top:8px}
[hidden]{display:none!important}
#timeField .time{display:flex!important;flex-direction:row!important;align-items:center;gap:10px}
#timeField .time select{width:auto!important;min-width:110px;flex:0 0 auto}

#page-assessment .assessment-lead{max-width:none!important;width:100%;text-align:justify;text-justify:inter-word;hyphens:auto}
#aCaffeine{margin-top:0}
