/* ==========================================================================
   Desktop Sidebar Toggle / Collapse Styling
   ========================================================================== */
@media (min-width: 1024px) {
    #sidebar {
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: transform;
    }
    .min-w-0.flex-1 {
        transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    body.is-sidebar-collapsed #sidebar {
        transform: translateX(-100%);
    }
    body.is-sidebar-collapsed .min-w-0.flex-1,
    body.is-sidebar-collapsed div[class*="lg:ml-72"] {
        margin-left: 0 !important;
    }
}

:root{--navy:#102a72;--blue:#1d4ed8;--ink:#172033;--muted:#718096;--line:#e8edf5;--surface:#fff;--canvas:#f4f7fb}
body{background:var(--canvas)!important;color:var(--ink)}
.login-page{position:relative;display:flex;min-height:100vh;max-width:none!important;align-items:center;justify-content:center;overflow:hidden;padding:36px;background:linear-gradient(145deg,#edf2f9 0%,#f8fafc 47%,#f8f1df 100%)}.login-page:before{content:"";position:absolute;inset:0;background-image:radial-gradient(#173369 1px,transparent 1px);background-size:28px 28px;opacity:.035}.login-glow{position:absolute;border-radius:50%;filter:blur(2px)}.login-glow--one{left:-130px;top:-150px;width:420px;height:420px;background:radial-gradient(circle,rgba(39,82,174,.18),transparent 68%)}.login-glow--two{right:-120px;bottom:-160px;width:480px;height:480px;background:radial-gradient(circle,rgba(235,171,36,.20),transparent 68%)}.login-shell{position:relative;z-index:1;display:grid;width:min(1060px,100%);min-height:640px;grid-template-columns:1.05fr .95fr;overflow:hidden;border:1px solid rgba(255,255,255,.9);border-radius:30px;background:#fff;box-shadow:0 35px 80px rgba(25,43,79,.18),0 4px 14px rgba(25,43,79,.06)}.login-brand{position:relative;display:flex;flex-direction:column;overflow:hidden;padding:36px 42px;background:linear-gradient(145deg,#172d59 0%,#10244b 55%,#0d1d3d 100%);color:#fff}.login-brand:before{content:"";position:absolute;right:-130px;top:70px;width:370px;height:370px;border:72px solid rgba(255,255,255,.035);border-radius:50%}.login-brand:after{content:"";position:absolute;left:-100px;bottom:-150px;width:340px;height:340px;border-radius:50%;background:rgba(239,177,40,.075)}.login-brand__top,.login-brand__content,.login-brand__footer{position:relative;z-index:1}.login-brand__top{display:flex;align-items:center;gap:13px;font-size:11px;font-weight:800;letter-spacing:.18em;color:#f7c34f}.login-logo{display:flex;width:45px;height:45px;align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.16);border-radius:14px;background:rgba(255,255,255,.08);color:#f8c34d;box-shadow:0 9px 25px rgba(0,0,0,.13)}.login-logo svg{width:24px}.login-brand__content{display:flex;flex:1;flex-direction:column;justify-content:center}.login-brand__badge{display:inline-flex;width:max-content;align-items:center;gap:7px;margin-bottom:19px;padding:6px 11px;border:1px solid rgba(247,195,79,.23);border-radius:999px;background:rgba(247,195,79,.08);font-size:10px;font-weight:700;color:#f7cc70}.login-brand__badge svg{width:14px}.login-brand h1{font-size:42px;font-weight:800;line-height:1.23;letter-spacing:-.035em}.login-brand h1 em{font-style:normal;color:#f5bb36}.login-brand__content>p{max-width:410px;margin-top:19px;font-size:13px;line-height:1.85;color:#aebbd2}.login-points{display:grid;gap:13px;margin-top:30px}.login-points>div{display:flex;align-items:center;gap:11px}.login-points>div>svg{width:19px;color:#f2b839}.login-points span{display:flex;flex-direction:column}.login-points strong{font-size:11px}.login-points small{margin-top:2px;font-size:9px;color:#8292b1}.login-brand__footer{display:flex;justify-content:space-between;padding-top:20px;border-top:1px solid rgba(255,255,255,.08);font-size:9px;color:#7183a5}.login-form-side{display:flex;flex-direction:column;justify-content:center;padding:54px 64px;background:#fff}.login-mobile-logo{display:none}.login-form-heading>span{font-size:10px;font-weight:800;letter-spacing:.18em;color:#c18213}.login-form-heading h2{margin-top:5px;font-size:32px;font-weight:800;letter-spacing:-.03em;color:#17233b}.login-form-heading p{margin-top:7px;font-size:12px;color:#8992a3}.login-form{display:grid;gap:20px;margin-top:34px}.login-form label>span{display:block;margin:0 0 8px 2px;font-size:11px;font-weight:700;color:#47536a}.login-input{position:relative}.login-input>svg{position:absolute;left:15px;top:15px;width:18px;color:#8c98aa}.login-input input{width:100%;height:50px;padding:0 46px;border:1px solid #dde3ec;border-radius:13px;background:#f9fafc;font-size:12px;color:#26334c;outline:none;transition:.2s}.login-input input::placeholder{color:#abb3c1}.login-input input:focus{border-color:#315ee8;background:#fff;box-shadow:0 0 0 4px rgba(49,94,232,.1)}.login-input button{position:absolute;right:8px;top:8px;display:flex;width:34px;height:34px;align-items:center;justify-content:center;border-radius:9px;color:#929dad}.login-input button:hover{background:#eef2f8;color:#315ee8}.login-input button svg{width:17px}.login-submit{display:flex;height:51px;align-items:center;justify-content:center;gap:10px;margin-top:3px;border-radius:13px;background:linear-gradient(110deg,#214bc2,#315ee8);font-size:12px;font-weight:800;color:#fff;box-shadow:0 12px 25px rgba(49,94,232,.26);transition:.2s}.login-submit:hover{transform:translateY(-2px);box-shadow:0 15px 30px rgba(49,94,232,.34)}.login-submit svg{width:17px;transition:.2s}.login-submit:hover svg{transform:translateX(3px)}.login-security{display:flex;align-items:flex-start;gap:8px;margin-top:30px;padding-top:20px;border-top:1px solid #edf0f4;font-size:9px;line-height:1.6;color:#9aa3b2}.login-security svg{flex:none;width:15px;color:#4a76d9}.login-copyright{position:absolute;z-index:1;bottom:11px;font-size:9px;color:#8b95a6}
@media(max-width:850px){.login-page{padding:22px}.login-shell{width:min(500px,100%);min-height:auto;grid-template-columns:1fr}.login-brand{display:none}.login-form-side{padding:44px}.login-mobile-logo{display:flex;align-items:center;gap:10px;margin-bottom:40px;font-size:10px;font-weight:800;letter-spacing:.16em;color:#9b6b15}.login-mobile-logo div{display:flex;width:42px;height:42px;align-items:center;justify-content:center;border-radius:13px;background:#172d59;color:#f5bb36}.login-mobile-logo svg{width:22px}.login-copyright{display:none}}@media(max-width:480px){.login-page{align-items:flex-start;padding:14px;background:#fff}.login-shell{border:0;border-radius:0;box-shadow:none}.login-form-side{padding:25px 15px}.login-mobile-logo{margin-bottom:38px}.login-form-heading h2{font-size:28px}.login-form{margin-top:28px}}
main{max-width:1680px;margin:0 auto}.dashboard-hero{position:relative;display:flex;align-items:center;justify-content:space-between;gap:24px;overflow:hidden;margin-bottom:22px;padding:30px 32px;border-radius:24px;background:linear-gradient(125deg,#112f78 0%,#1e4eb9 60%,#2e67d4 100%);color:#fff;box-shadow:0 16px 35px rgba(30,64,175,.18)}.dashboard-hero:after{content:"";position:absolute;right:-60px;top:-100px;width:320px;height:320px;border:56px solid rgba(255,255,255,.07);border-radius:50%}.dashboard-hero__content,.dashboard-hero__actions{position:relative;z-index:1}.dashboard-eyebrow{display:inline-flex;align-items:center;gap:7px;margin-bottom:12px;padding:5px 10px;border:1px solid rgba(255,255,255,.18);border-radius:999px;background:rgba(255,255,255,.1);font-size:11px;font-weight:700;color:#fde68a}.dashboard-eyebrow svg{width:13px}.dashboard-hero h2{font-size:28px;font-weight:800;letter-spacing:-.02em}.dashboard-hero p{margin-top:5px;font-size:13px;color:#cddcff}.dashboard-hero__actions{display:flex;align-items:center;gap:10px}.dashboard-date,.dashboard-add{display:flex;align-items:center;justify-content:center;gap:8px;height:46px;padding:0 15px;border-radius:13px;font-size:13px;font-weight:700}.dashboard-date{border:1px solid rgba(255,255,255,.16);background:rgba(9,30,91,.28);color:#dbeafe}.dashboard-add{background:#fbbf24;color:#422006;box-shadow:0 8px 18px rgba(251,191,36,.25);transition:.2s}.dashboard-add:hover{transform:translateY(-2px);background:#fcd34d}.dashboard-date svg,.dashboard-add svg{width:18px}
.dashboard-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:22px}.stat-card{position:relative;display:flex;align-items:center;gap:15px;overflow:hidden;padding:20px;border:1px solid var(--line);border-radius:19px;background:#fff;box-shadow:0 7px 22px rgba(28,45,80,.055);transition:.2s}.stat-card:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(28,45,80,.1)}.stat-card__icon{display:flex;align-items:center;justify-content:center;flex:none;width:48px;height:48px;border-radius:15px}.stat-card__icon svg{width:23px}.stat-card__body{display:flex;min-width:0;flex-direction:column}.stat-card__body span{font-size:12px;font-weight:600;color:var(--muted)}.stat-card__body strong{font-size:26px;line-height:1.15;color:var(--ink)}.stat-card__body small{font-size:10px;color:#a0aec0}.stat-card__trend{position:absolute;right:14px;top:14px;width:15px;opacity:.35}.stat-card--amber .stat-card__icon{background:#fff6db;color:#c47b00}.stat-card--green .stat-card__icon{background:#e8f8ef;color:#14804a}.stat-card--rose .stat-card__icon{background:#fff0f1;color:#d13b50}.stat-card--blue .stat-card__icon{background:#edf4ff;color:#2864ce}
.balance-panel,.transactions-panel{overflow:hidden;margin-bottom:22px;border:1px solid var(--line);border-radius:21px;background:#fff;box-shadow:0 7px 22px rgba(28,45,80,.05)}.section-heading{display:flex;align-items:center;gap:12px;padding:20px 22px;border-bottom:1px solid var(--line)}.section-heading--compact{padding:0;border:0}.section-heading__icon{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:13px}.section-heading__icon svg{width:20px}.section-heading__icon--amber{background:#fff5d6;color:#bd7800}.section-heading__icon--blue{background:#edf4ff;color:#2864ce}.section-heading h3{font-size:16px;font-weight:800;color:var(--ink)}.section-heading p{margin-top:2px;font-size:11px;color:var(--muted)}.balance-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:var(--line)}.balance-item{padding:20px 22px;background:#fff}.balance-item__top{display:flex;align-items:center;justify-content:space-between;color:#b0bac9}.balance-item__top svg{width:18px}.balance-item__number{font-size:10px;font-weight:800;letter-spacing:.1em}.balance-item p{margin:10px 0 3px;font-size:12px;font-weight:700;color:var(--muted)}.balance-item strong{font-size:23px;color:var(--ink)}.balance-item strong.is-negative{color:#dc3545}.balance-item div>span:last-child{margin-left:5px;font-size:11px;color:var(--muted)}
.transactions-panel__header{display:flex;align-items:center;justify-content:space-between;padding:20px 22px}.result-count{padding:6px 11px;border-radius:999px;background:#edf4ff;font-size:11px;font-weight:700;color:#2864ce}.filter-bar{display:grid;grid-template-columns:minmax(220px,1.6fr) repeat(4,minmax(130px,1fr)) auto;gap:9px;padding:15px 22px;border-top:1px solid var(--line);background:#f8fafc}.filter-bar input,.filter-bar select{width:100%;height:41px;border:1px solid #dce3ed;border-radius:11px;background:#fff;padding:0 11px;font-size:12px;color:#445066;outline:none;transition:.2s}.filter-bar input:focus,.filter-bar select:focus{border-color:#4f7ee8;box-shadow:0 0 0 3px rgba(79,126,232,.12)}.filter-search{position:relative}.filter-search svg{position:absolute;left:12px;top:12px;width:17px;color:#9aa7b9}.filter-search input{padding-left:38px}.filter-clear{display:flex;align-items:center;justify-content:center;gap:5px;height:41px;padding:0 12px;border:1px solid #dce3ed;border-radius:11px;background:#fff;font-size:11px;font-weight:700;color:#64748b}.filter-clear:hover{border-color:#f1a1aa;color:#c93045}.filter-clear svg{width:15px}.transactions-table-wrap{overflow-x:auto}.transactions-table{width:100%;min-width:980px;border-collapse:collapse}.transactions-table th{padding:12px 16px;background:#fff;border-top:1px solid var(--line);border-bottom:1px solid var(--line);font-size:10px;font-weight:800;letter-spacing:.04em;text-align:left;color:#8995a8;text-transform:uppercase}.transactions-table td{padding:14px 16px;border-bottom:1px solid #eef2f7;font-size:12px;vertical-align:middle}.transactions-table tbody tr{transition:.15s}.transactions-table tbody tr:hover{background:#f8faff}.align-right{text-align:right!important}.date-cell{white-space:nowrap;color:#637083}.material-cell{display:flex;align-items:center;gap:9px}.material-cell strong{color:var(--ink)}.material-dot{width:8px;height:8px;border-radius:50%;background:#f5b51b;box-shadow:0 0 0 4px #fff5d7}.direction-pill{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border-radius:999px;font-size:10px;font-weight:800}.direction-pill svg{width:13px}.direction-pill--in{background:#eaf8f0;color:#17834e}.direction-pill--out{background:#fff0f2;color:#c9364c}.quantity{font-size:13px}.quantity--in{color:#14804a}.quantity--out{color:#d13b50}.unit{font-size:10px;color:#8995a8}.source{display:block;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#4d596b}.transactions-table td small{display:block;max-width:190px;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#9aa5b5}.creator{display:flex;align-items:center;gap:6px;white-space:nowrap;color:#667386}.creator svg{width:15px}.row-actions{display:flex;justify-content:flex-end;gap:5px}.row-actions a,.row-actions button{display:flex;align-items:center;justify-content:center;width:31px;height:31px;border:1px solid #e0e6ef;border-radius:9px;background:#fff;color:#64748b;transition:.15s}.row-actions a:hover{border-color:#91b3fa;background:#eff5ff;color:#2563d4}.row-actions button:hover{border-color:#f4a4ae;background:#fff1f2;color:#d22f45}.row-actions button:disabled{opacity:.35;cursor:not-allowed;border-color:#e0e6ef;background:#f8fafc;color:#94a3b8;pointer-events:none}.row-actions svg{width:14px}.dashboard-empty{display:flex;align-items:center;justify-content:center;gap:8px;padding:38px;color:#8a96a8}.dashboard-empty svg{width:24px}.dashboard-empty strong{font-size:13px;color:#556174}.dashboard-empty span{font-size:11px}.dashboard-empty--large{min-height:180px;flex-direction:column}.dashboard-empty--large svg{width:34px;height:34px;color:#b2bdcc}
@media(max-width:1200px){.dashboard-stats,.balance-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.filter-bar{grid-template-columns:repeat(2,minmax(0,1fr))}.filter-search{grid-column:span 2}}
@media(max-width:640px){main{padding:14px!important}.dashboard-hero{align-items:flex-start;flex-direction:column;padding:24px 20px;border-radius:18px}.dashboard-hero h2{font-size:23px}.dashboard-hero__actions{width:100%}.dashboard-date{display:none}.dashboard-add{width:100%}.dashboard-stats{grid-template-columns:1fr 1fr;gap:10px}.stat-card{align-items:flex-start;flex-direction:column;padding:15px;gap:10px}.stat-card__icon{width:40px;height:40px}.stat-card__body strong{font-size:22px}.stat-card__body small,.stat-card__trend{display:none}.balance-grid{grid-template-columns:1fr 1fr}.balance-item{padding:16px}.transactions-panel__header{padding:17px}.filter-bar{grid-template-columns:1fr;padding:13px}.filter-search{grid-column:auto}.section-heading{padding:17px}.section-heading p{max-width:220px}.filter-clear span{display:inline}.dashboard-empty{flex-direction:column;text-align:center}}

/* Visual identity v2 */
.design-v2{--navy:#17233f;--blue:#315ee8;--ink:#192238;--muted:#7b8496;--line:#ebe8e0;--canvas:#f7f5ef;background:var(--canvas)!important}
.design-v2 #sidebar{overflow:hidden;border:0!important;background:linear-gradient(180deg,#192846 0%,#10192e 100%)!important;color:#fff;box-shadow:14px 0 45px rgba(18,28,51,.12)}
.design-v2 #sidebar:after{content:"";position:absolute;left:-90px;bottom:100px;width:250px;height:250px;border:42px solid rgba(246,177,30,.045);border-radius:50%;pointer-events:none}
.design-v2 #sidebar>div:first-child{position:relative;min-height:116px!important;margin:17px 15px 5px;padding:18px 14px!important;border:1px solid rgba(255,255,255,.08)!important;border-radius:19px;background:rgba(255,255,255,.045)!important}
.design-v2 #sidebar>div:first-child:after{content:"FOYTHONG LAB";position:absolute;left:74px;top:16px;font-size:8px;font-weight:800;letter-spacing:.16em;color:#f6b11e}
.design-v2 #sidebar>div:first-child>div:first-child{width:46px!important;height:46px!important;border:0!important;border-radius:15px!important;background:linear-gradient(145deg,#ffd04b,#ec9711)!important;color:#563300!important;box-shadow:0 9px 20px rgba(246,177,30,.22)}
.design-v2 #sidebar>div:first-child>div:last-child{padding-top:13px}.design-v2 #sidebar>div:first-child p{font-size:13px!important;color:#fff}.design-v2 #sidebar>div:first-child p:last-child{font-size:9px!important;color:#91a0bf!important}
.design-v2 #sidebar nav{position:relative;z-index:1;padding:15px!important}.design-v2 #sidebar nav>p{padding:17px 13px 6px!important;font-size:9px!important;letter-spacing:.13em;color:#66789d!important}
.design-v2 #sidebar .nav-link{display:flex;align-items:center;gap:12px;margin-bottom:5px;padding:13px 14px;border-radius:13px;color:#aab7d1;transition:.2s}.design-v2 #sidebar .nav-link:hover{background:rgba(255,255,255,.06);color:#fff}.design-v2 #sidebar .nav-link:hover,.design-v2 #sidebar .nav-link:focus-visible{background:rgba(255,255,255,.09);color:#fff;transform:translateX(3px);outline:none}.design-v2 #sidebar .nav-link.is-active{background:linear-gradient(100deg,rgba(246,177,30,.2),rgba(246,177,30,.05));color:#fff;box-shadow:inset 3px 0 #f6b11e}.design-v2 #sidebar .nav-link.is-active svg{color:#f6b11e}
.design-v2 #sidebar>div:last-child{position:relative;z-index:1;border-color:rgba(255,255,255,.07)!important;padding:15px!important}.design-v2 #sidebar>div:last-child>div{border:1px solid rgba(255,255,255,.06);background:rgba(255,255,255,.045)!important;color:#fff}.design-v2 #sidebar>div:last-child>div p{color:#fff}.design-v2 #sidebar>div:last-child>div p:last-child{color:#91a0bf}.design-v2 #sidebar>div:last-child button{border-color:rgba(255,255,255,.08)!important;background:rgba(255,255,255,.035)!important;color:#91a0bf!important}.design-v2 #sidebar>div:last-child button:hover{background:rgba(244,63,94,.1)!important;color:#fda4af!important}
.design-v2 .lg\:ml-72>header{min-height:72px!important;border-bottom:1px solid #eae6dd;background:rgba(255,255,255,.9)!important;color:#192238!important;box-shadow:none!important;backdrop-filter:blur(14px)}.design-v2 .lg\:ml-72>header h1{color:#192238}.design-v2 .lg\:ml-72>header h1:before{content:"WORKSPACE";display:block;margin-bottom:1px;font-size:8px;font-weight:800;letter-spacing:.16em;color:#ad8334}.design-v2 .lg\:ml-72>header h1+span{border-color:#ead8ad!important;background:#fff9e9!important;color:#9a6c13!important}.design-v2 .lg\:ml-72>header p{color:#8b93a1!important}
.design-v2 main{padding-top:27px!important}.design-v2 .dashboard-hero{padding:35px 37px;border:1px solid #eadfc9;background:linear-gradient(118deg,#fffdfa 0%,#fff8e8 58%,#ffedbd 100%);color:#192238;box-shadow:0 14px 38px rgba(83,63,25,.07)}.design-v2 .dashboard-hero:before{content:"";position:absolute;right:180px;bottom:-105px;width:225px;height:225px;border-radius:50%;background:rgba(246,177,30,.10)}.design-v2 .dashboard-hero:after{border-color:rgba(255,255,255,.43)}.design-v2 .dashboard-eyebrow{border-color:#efd28a;background:#fff5d7;color:#9f6704}.design-v2 .dashboard-hero h2{color:#192238;font-size:30px}.design-v2 .dashboard-hero p{color:#766c5a}.design-v2 .dashboard-date{border-color:#ead9b4;background:rgba(255,255,255,.75);color:#725f3c}.design-v2 .dashboard-add{background:#192846;color:#fff;box-shadow:0 10px 22px rgba(25,40,70,.2)}.design-v2 .dashboard-add:hover{background:#273b63}
.design-v2 .stat-card{border-color:#eae6dd;border-radius:21px;box-shadow:0 8px 25px rgba(39,43,54,.045)}.design-v2 .stat-card:after{content:"";position:absolute;right:-18px;bottom:-25px;width:72px;height:72px;border-radius:50%;background:currentColor;opacity:.035}.design-v2 .balance-panel,.design-v2 .transactions-panel{border-color:#e9e5dc;border-radius:22px;box-shadow:0 8px 28px rgba(39,43,54,.045)}.design-v2 .filter-bar{background:#faf9f6}.design-v2 .transactions-table th{background:#faf9f6}.design-v2 .transactions-table tbody tr:hover{background:#fffcf5}
@media(max-width:1023px){.design-v2 .lg\:ml-72>header{background:#192846!important;color:#fff!important}.design-v2 .lg\:ml-72>header h1{color:#fff}.design-v2 .lg\:ml-72>header h1:before{color:#f6b11e}.design-v2 .lg\:ml-72>header p{color:#aebbd2!important}}
@media(max-width:640px){.design-v2 main{padding-top:16px!important}.design-v2 .dashboard-hero{padding:27px 21px}.design-v2 .dashboard-hero h2{font-size:24px}}

/* Full research system identity */
.system-header{min-height:88px!important}.system-header__copy{min-width:0}.system-header__title{line-height:1.35;letter-spacing:-.01em}.design-v2 .system-header__title:before{content:none!important;display:none!important}.system-header__subtitle{font-size:10px;line-height:1.45}.design-v2 #sidebar>div:first-child{min-height:150px!important}.sidebar-system-title{font-size:11px!important;line-height:1.45!important}.sidebar-system-subtitle{font-size:8px!important;line-height:1.45!important}.login-system-name{font-size:34px!important;line-height:1.34!important}.login-system-subtitle{max-width:430px!important}.login-mobile-system{display:none}
@media(max-width:850px){.login-mobile-logo{margin-bottom:18px!important}.login-mobile-system{display:flex;flex-direction:column;margin-bottom:34px;padding:15px 16px;border:1px solid #eee5cf;border-radius:14px;background:#fffaf0}.login-mobile-system strong{font-size:13px;line-height:1.55;color:#17233b}.login-mobile-system span{margin-top:4px;font-size:9px;line-height:1.55;color:#8b7959}}
@media(max-width:640px){.system-header{min-height:88px!important;padding-top:11px!important;padding-bottom:11px!important}.system-header__title{font-size:12px!important}.system-header__subtitle{display:block!important;font-size:8px!important;line-height:1.45}.system-header__copy{padding-right:3px}}

/* Chicken egg tray calculator */
.egg-tray-field{padding:17px 18px;border:1px solid #ead59d;border-radius:16px;background:linear-gradient(115deg,#fffbeb,#fff7d7)}.egg-tray-field__header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}.egg-tray-field__header span:first-child{display:flex;flex-direction:column}.egg-tray-field__header strong{font-size:13px;color:#4d3910}.egg-tray-field__header small{margin-top:2px;font-size:10px;color:#927c4e}.egg-tray-formula{padding:5px 10px;border:1px solid #ebd083;border-radius:999px;background:#fff;font-size:10px;font-weight:800;color:#956a09}.egg-tray-input{display:grid;grid-template-columns:minmax(100px,160px) auto 18px minmax(90px,1fr);align-items:center;gap:10px}.egg-tray-input>span{font-size:12px;font-weight:700;color:#715b2d}.egg-tray-input>svg{width:17px;color:#c08b16}.egg-tray-input>strong{font-size:17px;color:#8d5d00}.egg-tray-input .field-input{border-color:#e4ca83;background:#fff}.egg-tray-input .field-input:focus{border-color:#d4a72c;box-shadow:0 0 0 3px rgba(212,167,44,.14)}@media(max-width:520px){.egg-tray-field__header{align-items:flex-start;flex-direction:column}.egg-tray-input{grid-template-columns:1fr auto}.egg-tray-input>svg{display:none}.egg-tray-input>strong{grid-column:1/-1;padding-top:4px}}

/* Chicken egg tray count in dashboard transactions */
.tray-column{min-width:105px;text-align:center!important;white-space:nowrap}.tray-count-label{display:inline-flex;align-items:center;justify-content:center;padding:5px 9px;border:1px solid #ead28c;border-radius:999px;background:#fff8dc;font-size:9px;font-weight:800;line-height:1.2;color:#8b620b}.tray-count-empty{color:#bac1cc}@media(max-width:640px){.transactions-table{min-width:1090px}.tray-column{min-width:96px}.tray-count-label{font-size:8px}}

.page-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1.5rem}.page-heading h2{font-size:1.5rem;font-weight:750;color:#1c1917}.page-heading p,.muted{color:#78716c;font-size:.875rem}.form-panel,.table-panel{padding:1.5rem;margin-bottom:1.5rem}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.form-grid label{display:block}.form-grid label small{display:block;color:#78716c;font-size:.75rem;margin-top:.3rem}.form-section{border-top:1px solid #e7e5e4;margin-top:1.5rem;padding-top:1.25rem;margin-bottom:1.5rem}.form-section legend,.table-panel h3{font-weight:700;color:#1c1917;margin-bottom:.75rem}.conversion-preview{display:flex;align-items:end;color:#57534e;padding-bottom:.55rem;gap:.3rem}.conversion-preview strong{color:#92400e;font-size:1.25rem}.lot-list{display:grid;gap:.65rem;margin:1rem 0}.lot-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem;border:1px solid #e7e5e4;border-radius:.8rem}.lot-row span{min-width:0}.lot-row small{display:block;color:#78716c}.lot-row input{max-width:11rem}.notice{background:#fffbeb;color:#92400e;padding:1rem;border-radius:.8rem;margin-bottom:1rem}.notice a{text-decoration:underline}.report-filters{display:flex;flex-wrap:wrap;align-items:end;gap:.8rem;padding:1rem;margin-bottom:1.5rem}.report-filters label{font-size:.85rem}.report-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.2rem}.table-panel .data-table{width:100%}.settings-input{max-width:8rem}.age-warning{color:#b45309;font-weight:700}
@media(max-width:700px){.form-grid,.report-grid{grid-template-columns:1fr}.page-heading{align-items:start;flex-direction:column}.form-panel,.table-panel{padding:1rem}.lot-row{align-items:stretch;flex-direction:column}.lot-row input{max-width:none}.report-filters>*{width:100%}}
.design-v2 #sidebar nav{overflow-y:auto;min-height:0}.design-v2 #sidebar{overflow-y:auto}

.egg-grade-tag{display:inline-flex;align-items:center;border-radius:999px;background:#fff7ed;color:#9a3412;padding:.15rem .5rem;font-size:.72rem;font-weight:700}

/* Egg Calculator Component */
.egg-calc-panel{grid-column:1/-1;border:1.5px solid #f2db9d;border-radius:20px;background:linear-gradient(135deg,#fffefb 0%,#fff9ee 100%);padding:22px;box-shadow:0 8px 24px rgba(220,165,30,.09);margin:6px 0 16px}
.egg-calc-header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding-bottom:18px;border-bottom:1px solid #f3e5c4}
.egg-calc-header__title{display:flex;flex-direction:column;gap:3px}
.egg-calc-badge{display:inline-flex;align-items:center;gap:6px;width:max-content;font-size:10px;font-weight:800;letter-spacing:.05em;color:#9b6508;background:#fef3c7;border:1px solid #fde68a;padding:3px 10px;border-radius:999px;margin-bottom:3px}
.egg-calc-badge svg{width:13px;height:13px}
.egg-calc-header__title strong{font-size:15px;color:#1c1917}
.egg-calc-header__title small{font-size:12px;color:#78716c}
.egg-mode-toggle{display:inline-flex;background:#ede3cb;border-radius:13px;padding:4px;gap:4px}
.egg-mode-btn{display:inline-flex;align-items:center;gap:7px;border:0;background:transparent;color:#785d26;font-size:12px;font-weight:700;padding:8px 16px;border-radius:10px;cursor:pointer;transition:.18s}
.egg-mode-btn svg{width:15px;height:15px}
.egg-mode-btn.is-active{background:#192846;color:#fff;box-shadow:0 4px 14px rgba(25,40,70,.25)}
.egg-calc-body{margin-top:18px}
.egg-calc-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.egg-calc-card{background:#fff;border:1px solid #ede3ca;border-radius:16px;padding:16px;box-shadow:0 3px 12px rgba(0,0,0,.03)}
.egg-card-title{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:700;color:#574013;margin-bottom:10px}
.egg-card-title svg{width:15px;height:15px;color:#d97706}
.egg-stepper{display:flex;align-items:center;gap:8px}
.stepper-btn{flex:none;width:40px;height:42px;border:1px solid #dfd3b9;background:#fdfcf9;border-radius:11px;font-size:20px;font-weight:700;color:#574013;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:.15s}
.stepper-btn:hover{background:#fef3c7;border-color:#f59e0b;color:#92400e}
.stepper-input{text-align:center;font-size:16px!important;font-weight:700!important;height:42px!important;color:#1c1917!important}
.stepper-unit{flex:none;font-size:13px;font-weight:700;color:#78716c;padding:0 4px}
.egg-quick-pills{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.pill-btn{border:1px solid #e5d8b8;background:#faf8f3;border-radius:999px;padding:4px 11px;font-size:11px;font-weight:700;color:#6b5220;cursor:pointer;transition:.15s}
.pill-btn:hover{background:#fff;border-color:#d97706;color:#92400e}
.pill-btn.is-active{background:#f59e0b;border-color:#d97706;color:#fff;box-shadow:0 3px 8px rgba(245,158,11,.3)}
.pill-btn--neg{background:#fef2f2;border-color:#fecaca;color:#b91c1c}
.pill-btn--neg:hover,.pill-btn--neg.is-active{background:#dc2626;border-color:#b91c1c;color:#fff}
.pill-btn--pos{background:#f0fdf4;border-color:#bbf7d0;color:#15803d}
.pill-btn--pos:hover,.pill-btn--pos.is-active{background:#16a34a;border-color:#15803d;color:#fff}
.pill-btn--zero{background:#f9fafb;border-color:#e5e7eb;color:#4b5563}
.pill-btn--zero:hover,.pill-btn--zero.is-active{background:#4b5563;border-color:#374151;color:#fff}
.egg-calc-summary{margin-top:16px;background:#fff;border:1.5px solid #ebd9ab;border-radius:16px;padding:16px 20px;display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
.summary-col{display:flex;flex-direction:column;gap:3px}
.summary-label{font-size:11px;font-weight:600;color:#78716c}
.summary-val{font-size:16px;font-weight:800;color:#1c1917}
.summary-pill{display:inline-flex;align-items:center;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:700}
.summary-pill--ok{background:#f0fdf4;color:#15803d;border:1px solid #bbf7d0}
.summary-pill--neg{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}
.summary-pill--pos{background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe}
.summary-col--net{display:flex;flex-direction:column;align-items:flex-end}
.summary-net-wrap{display:flex;align-items:center;gap:8px;margin-top:2px}
.summary-net-input{width:110px!important;height:38px!important;text-align:right!important;font-size:18px!important;font-weight:800!important;color:#92400e!important;border:2px solid #f59e0b!important;background:#fffbeb!important;border-radius:10px!important}
.summary-net-unit{font-size:14px;font-weight:800;color:#92400e}
.summary-net-display{font-size:22px;font-weight:800;color:#92400e}
@media(max-width:768px){.egg-calc-grid{grid-template-columns:1fr}.egg-calc-summary{flex-direction:column;align-items:stretch;gap:12px}.summary-col--net{align-items:stretch}.summary-net-input{width:100%!important}}

/* ==========================================================================
   1. Dedicated Analytics Dashboard (?page=analytics)
   ========================================================================== */

.analytics-page-shell {
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-width: 1400px;
    margin: 0 auto;
}

.analytics-header-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.analytics-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #1e40af;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 3px 12px;
    border-radius: 999px;
    margin-bottom: 6px;
}
.analytics-badge svg {
    width: 13px;
    height: 13px;
}

.analytics-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    margin: 0;
}

.analytics-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 4px 0 0 0;
}

.analytics-filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.analytics-filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.analytics-filter-item .field-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
}

/* 4 KPI Hero Metric Cards */
.analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.analytics-kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}
.analytics-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}
.analytics-kpi-card--amber { border-left: 5px solid #f59e0b; }
.analytics-kpi-card--indigo { border-left: 5px solid #6366f1; }
.analytics-kpi-card--emerald { border-left: 5px solid #10b981; }
.analytics-kpi-card--rose { border-left: 5px solid #f43f5e; }

.analytics-kpi-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.analytics-kpi-card__label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.02em;
}

.analytics-kpi-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    color: #475569;
}
.analytics-kpi-card--amber .analytics-kpi-card__icon { background: #fffbeb; color: #d97706; }
.analytics-kpi-card--indigo .analytics-kpi-card__icon { background: #eef2ff; color: #4f46e5; }
.analytics-kpi-card--emerald .analytics-kpi-card__icon { background: #ecfdf5; color: #059669; }
.analytics-kpi-card--rose .analytics-kpi-card__icon { background: #fff1f2; color: #e11d48; }

.analytics-kpi-card__icon svg {
    width: 18px;
    height: 18px;
}

.analytics-kpi-card__val {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin-top: 4px;
}
.analytics-kpi-card__val small {
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    margin-left: 2px;
}

.analytics-kpi-card__sub {
    font-size: 12px;
    color: #64748b;
}

/* Charts Grid (2x2) */
.analytics-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
    gap: 20px;
}

.analytics-chart-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.02);
}

.analytics-chart-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}
.analytics-chart-card__header h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}
.analytics-chart-card__header h4 svg {
    width: 17px;
    height: 17px;
    color: #3b82f6;
}

.analytics-chart-canvas-wrap {
    position: relative;
    height: 275px;
    width: 100%;
}

/* Research Insight Callout Box */
.analytics-insight-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 18px 22px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.analytics-insight-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.analytics-insight-card__icon svg {
    width: 19px;
    height: 19px;
}
.analytics-insight-card__content h4 {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px 0;
}
.analytics-insight-card__content p {
    font-size: 13px;
    line-height: 1.55;
    color: #475569;
    margin: 0;
}


/* ==========================================================================
   2. Dedicated Official Reports (?page=reports)
   ========================================================================== */

.report-center-wrapper {
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-width: 1400px;
    margin: 0 auto;
}

.report-control-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 24px 28px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
}

.report-control-panel__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.report-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
    padding: 3px 12px;
    border-radius: 999px;
    margin-bottom: 6px;
}
.report-eyebrow svg {
    width: 13px;
    height: 13px;
}

.report-main-title {
    font-size: 22px;
    font-weight: 800;
    color: #1c1917;
    line-height: 1.25;
    margin: 0;
}

.report-main-subtitle {
    font-size: 13px;
    color: #78716c;
    margin: 4px 0 0 0;
}

.report-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.report-print-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1e3a8a;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.22);
    transition: background 0.15s, transform 0.15s;
}
.report-print-btn:hover {
    background: #172554;
    transform: translateY(-1px);
}
.report-print-btn svg {
    width: 16px;
    height: 16px;
}

/* Compact Selector & Filter Strip */
.report-filter-form {
    background: #fafaf9;
    border: 1px solid #e7e5e4;
    border-radius: 16px;
    padding: 18px 22px;
}

.report-selector-strip {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.report-selector-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 320px;
}

.report-select-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 700;
    color: #44403c;
}
.report-select-label svg {
    width: 15px;
    height: 15px;
    color: #b91c1c;
}

.report-select-dropdown {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 700;
    color: #991b1b;
    background: #ffffff;
    border: 2px solid #ef4444;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.08);
}
.report-select-dropdown:hover {
    border-color: #dc2626;
}
.report-select-dropdown:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}
.report-select-dropdown optgroup {
    font-weight: 800;
    color: #1e293b;
    background: #f8fafc;
    padding: 6px;
}
.report-select-dropdown option {
    font-weight: 600;
    color: #1c1917;
    background: #ffffff;
    padding: 8px 12px;
}

.report-filter-inline-grid {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.report-filter-inline-grid .filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.report-filter-inline-grid .field-label {
    font-size: 11px;
    font-weight: 700;
    color: #78716c;
}
.report-filter-inline-grid .field-input {
    height: 44px;
}
.report-filter-inline-grid .filter-group--btn button {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Info Banner of Current Report */
.report-info-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff8f8;
    border: 1px solid #fee2e2;
    border-radius: 10px;
    padding: 10px 16px;
    margin-top: 14px;
    font-size: 12.5px;
    flex-wrap: wrap;
}
.report-info-banner__left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.report-code-badge {
    background: #dc2626;
    color: #ffffff;
    font-weight: 800;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
}
.report-category-pill {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    font-weight: 700;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
}
.report-title-highlight {
    font-size: 13.5px;
    font-weight: 800;
    color: #1c1917;
}
.report-info-banner__right {
    font-size: 12px;
    color: #1e40af;
    display: flex;
    align-items: center;
    gap: 5px;
}
.report-info-banner__right svg {
    width: 14px;
    height: 14px;
}


/* ==========================================================================
   Official Academic Report Sheet (Pure Document View)
   ========================================================================== */

.report-sheet {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 38px 44px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

.report-doc-header {
    margin-bottom: 24px;
}

.report-doc-header__brand {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.report-doc-header__logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.25);
}
.report-doc-header__logo svg {
    width: 26px;
    height: 26px;
}

.report-doc-header__system-name {
    font-size: 18.5px;
    font-weight: 800;
    color: #1c1917;
    line-height: 1.3;
    margin: 0;
}

.report-doc-header__sub-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #64748b;
    margin: 3px 0 0 0;
}

.report-doc-header__title-block {
    text-align: center;
    margin: 22px 0 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.report-doc-header__code-chip {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.report-doc-header__report-name {
    font-size: 21px;
    font-weight: 800;
    color: #78350f;
    margin: 0;
    line-height: 1.3;
}

.report-doc-header__period-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    padding: 4px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
}

.report-doc-header__meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 8px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 11px 18px;
    font-size: 12px;
    color: #475569;
    margin-top: 16px;
}
.report-doc-header__meta-grid span {
    color: #94a3b8;
    margin-right: 4px;
}

/* Enhanced Clean Report Table */
.report-table-section {
    margin-top: 22px;
}
.report-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
}

.report-data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    color: #0f172a;
}

.report-data-table th {
    background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
    color: #1e293b;
    font-weight: 700;
    padding: 12px 14px;
    border-bottom: 2px solid #94a3b8;
    text-align: left;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.report-data-table td {
    padding: 11px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.report-data-table tbody tr:nth-child(even) td {
    background: #fafaf9;
}

.report-data-table tbody tr:hover td {
    background: #fffbeb !important;
}

.report-data-table tfoot tr {
    background: #f8fafc;
    border-top: 2.5px solid #d97706;
}

.report-data-table tfoot td {
    padding: 13px 14px;
    font-weight: 700;
    font-size: 13.5px;
    border-bottom: none;
}

.table-empty-cell {
    text-align: center;
    padding: 44px 16px !important;
    color: #78716c;
    font-style: italic;
    background: #ffffff !important;
}

.align-right { text-align: right !important; }
.align-center { text-align: center !important; }

.egg-grade-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.variance-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
}
.variance-pill--pos { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.variance-pill--neg { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.variance-pill--zero { background: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; }

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.status-pill--in { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.status-pill--out { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }

/* Official Sign-off block */
.report-signoff-section {
    margin-top: 44px;
    padding-top: 26px;
    border-top: 1.5px dashed #cbd5e1;
}
.report-signoff-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
}
.report-signoff-box {
    text-align: center;
    padding: 12px;
}
.signoff-role {
    font-weight: 700;
    font-size: 13.5px;
    color: #374151;
    margin-bottom: 6px;
}
.signoff-space {
    height: 56px;
}
.signoff-name {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}
.signoff-position {
    font-size: 12px;
    color: #6b7280;
    margin: 4px 0 0 0;
}
.signoff-date {
    font-size: 12px;
    color: #6b7280;
    margin: 4px 0 0 0;
}

.report-print-footer {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #94a3b8;
    margin-top: 26px;
    border-top: 1px solid #f1f5f9;
    padding-top: 8px;
}

/* ==========================================================================
   Report Selector & Thai Date Controls (Horizontal Non-Overlapping Toolbar)
   ========================================================================== */
.report-toolbar-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.report-picker-block {
    position: relative;
    flex: 1 1 340px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.report-picker-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin: 0;
}

.report-picker-label svg {
    width: 15px;
    height: 15px;
    color: #d97706;
    flex-shrink: 0;
}

.report-picker-select {
    width: 100%;
    height: 42px;
    appearance: none;
    background-color: #fffbeb;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23d97706' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 8l3 3 3-3'/%3e%3c/svg%3e");
    background-position: right 0.85rem center;
    background-repeat: no-repeat;
    background-size: 1.4em 1.4em;
    padding: 0 2.5rem 0 0.95rem;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    border: 2px solid #f59e0b;
    border-radius: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(217, 119, 6, 0.08);
    cursor: pointer;
}

.report-picker-select:hover {
    border-color: #d97706;
    background-color: #ffffff;
}

.report-picker-select:focus {
    outline: none;
    border-color: #b45309;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.report-inline-filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.report-inline-filter-bar .filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.report-inline-filter-bar .field-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    margin: 0;
    white-space: nowrap;
}

.thai-date-group {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap !important;
}

.thai-select,
.thai-select-day,
.thai-select-month,
.thai-select-year,
.thai-select-filter {
    width: auto !important;
    flex: 0 0 auto;
    height: 42px;
    padding: 0 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    transition: all 0.15s ease;
    cursor: pointer;
}

.thai-select-day {
    min-width: 88px;
}

.thai-select-month {
    min-width: 122px;
}

.thai-select-year {
    min-width: 102px;
}

.thai-select-filter {
    min-width: 145px;
}

.thai-select:focus,
.thai-select-day:focus,
.thai-select-month:focus,
.thai-select-year:focus,
.thai-select-filter:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.report-search-btn {
    height: 42px !important;
    padding: 0 18px !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
}

.report-search-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.report-benefit-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 14px;
}

.report-benefit-card__icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #fde68a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b45309;
}

.report-benefit-card__icon svg {
    width: 18px;
    height: 18px;
}

.report-benefit-card__body,
.report-benefit-card__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.report-benefit-card__title {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12px;
    font-weight: 700;
    color: #92400e;
}

.report-benefit-card__name {
    color: #78350f;
    font-weight: 800;
}

.report-benefit-card__desc {
    font-size: 13px;
    color: #78350f;
    line-height: 1.45;
    font-weight: 600;
    margin: 0;
}

.report-benefit-card__insight {
    font-size: 12px;
    color: #92400e;
    background: rgba(255, 255, 255, 0.65);
    padding: 4px 10px;
    border-radius: 7px;
    border: 1px solid rgba(245, 158, 11, 0.25);
    margin-top: 2px;
}

@media (max-width: 640px) {
    .thai-date-group {
        flex-wrap: wrap !important;
    }
}

.report-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    background: #f1f5f9;
    color: #475569;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

/* ==========================================================================
   Print Rules (@media print)
   ========================================================================== */
@media print {
    @page {
        size: A4 portrait;
        margin: 10mm 12mm 12mm 12mm;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt !important;
    }

    /* Hide non-printable app shell elements */
    aside,
    #sidebar,
    .system-header,
    header.header,
    nav,
    .no-print,
    .report-control-panel,
    .analytics-page-shell,
    #mobile-overlay,
    #mobile-menu-button,
    #desktop-sidebar-toggle {
        display: none !important;
    }

    /* Reset layouts */
    .min-w-0,
    div[class*="lg:ml-72"],
    main,
    .report-center-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .report-sheet {
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .report-doc-header {
        border-bottom: 2px solid #000000 !important;
        padding-bottom: 10px !important;
    }

    .report-doc-header__logo {
        background: #333333 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .report-doc-header__meta-grid {
        background: #f8fafc !important;
        border: 1px solid #cbd5e1 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .report-table-wrap {
        border: none !important;
        overflow: visible !important;
    }

    .report-data-table {
        border-collapse: collapse !important;
        width: 100% !important;
        font-size: 10pt !important;
    }

    .report-data-table th,
    .report-data-table td {
        border: 1px solid #334155 !important;
        padding: 6px 8px !important;
        color: #000000 !important;
    }

    .report-data-table th {
        background: #f1f5f9 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .report-data-table tbody tr:nth-child(even) td {
        background: #f8fafc !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .report-data-table tfoot tr {
        background: #e2e8f0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .report-signoff-section {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        margin-top: 24px !important;
        padding-top: 14px !important;
        border-top: 1.5px solid #000000 !important;
    }

    tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
}

/* Material Types & Dashboard Secondary Button */
.dashboard-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 16px;
    border-radius: 13px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid #dcd4c3;
    background: #ffffff;
    color: #2c3444;
    box-shadow: 0 6px 16px rgba(44, 52, 68, 0.06);
    transition: 0.2s ease;
    text-decoration: none;
}
.dashboard-btn-secondary:hover {
    background: #faf8f4;
    border-color: #cfc3ad;
    color: #112f78;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(44, 52, 68, 0.1);
}
.dashboard-btn-secondary svg {
    width: 18px;
    height: 18px;
}
.stat-card--clickable {
    cursor: pointer;
    text-decoration: none;
}
.stat-card--clickable:hover strong {
    color: #1e4eb9;
}

