:root {
    --alpha-bg: #f3f1ed;
    --alpha-panel: #ffffff;
    --alpha-sidebar: #302a24;
    --alpha-sidebar-2: #45382d;
    --alpha-accent: #8b6f52;
    --alpha-accent-dark: #66503c;
    --alpha-text: #26211d;
    --alpha-muted: #80766c;
    --alpha-border: #e5ded5;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Segoe UI, Arial, sans-serif; background: var(--alpha-bg); color: var(--alpha-text); }
a { text-decoration: none; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 292px; flex: 0 0 292px; background: linear-gradient(180deg, var(--alpha-sidebar), var(--alpha-sidebar-2)); color: #fff; min-height: 100vh; position: sticky; top: 0; overflow-y: auto; box-shadow: 8px 0 30px rgba(0,0,0,.08); }
.brand-box { display: flex; gap: 12px; align-items: center; padding: 22px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-logo, .login-logo { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; background: #bfa07d; color: #241d17; font-size: 26px; font-weight: 900; }
.brand-title { font-size: 19px; font-weight: 800; letter-spacing: .5px; }
.brand-subtitle { font-size: 13px; opacity: .72; }
.nav-menu { padding: 12px; }
.nav-menu a { color: rgba(255,255,255,.86); display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 14px; font-size: 15px; margin: 2px 0; }
.nav-menu a:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-menu i { font-size: 18px; width: 22px; text-align: center; }
.menu-section { margin: 14px 8px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.48); }
.main-area { flex: 1; min-width: 0; padding-bottom: 72px; }
.topbar { height: 76px; background: rgba(255,255,255,.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--alpha-border); display: flex; align-items: center; gap: 16px; padding: 0 26px; position: sticky; top: 0; z-index: 5; }
.page-title { font-size: 20px; font-weight: 800; }
.page-subtitle { color: var(--alpha-muted); font-size: 13px; }
.content-area { padding: 26px; }
.user-box { display: flex; align-items: center; gap: 12px; }
.btn-menu { border: 1px solid var(--alpha-border); background: #fff; }
.btn-alpha { background: var(--alpha-accent-dark); color: #fff; border: none; }
.btn-alpha:hover { background: #4e3e31; color: #fff; }
.stat-card { background: #fff; border-radius: 22px; padding: 22px; border: 1px solid rgba(0,0,0,.03); box-shadow: 0 10px 28px rgba(53,45,38,.07); height: 100%; }
.stat-card.danger-soft { background: #fff8f4; }
.stat-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: #efe6db; color: var(--alpha-accent-dark); margin-bottom: 14px; }
.stat-label { color: var(--alpha-muted); font-size: 14px; }
.stat-value { font-size: 38px; font-weight: 900; line-height: 1.1; }
.stat-note { color: #91867b; font-size: 13px; }
.workflow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.workflow div { padding: 10px 14px; background: #f3eee8; border-radius: 999px; font-weight: 600; }
.workflow i { color: var(--alpha-accent); }
.check-list { list-style: none; padding-left: 0; }
.check-list li { padding: 6px 0 6px 28px; position: relative; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: #4b7f52; font-weight: 900; }
.role-card { background: #f8f6f3; border: 1px solid var(--alpha-border); border-radius: 18px; padding: 16px; height: 100%; font-weight: 600; }
.module-placeholder { min-height: 420px; display: grid; place-items: center; text-align: center; }
.module-icon { width: 74px; height: 74px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 24px; background: #efe6db; color: var(--alpha-accent-dark); font-size: 34px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at top left, #a88b6c 0, transparent 34%), linear-gradient(135deg, #312820, #74604c 55%, #e9e1d7); }
.login-card { width: min(480px, 100%); background: rgba(255,255,255,.94); border-radius: 28px; padding: 30px; border: 1px solid rgba(255,255,255,.5); }
.login-brand { display: flex; align-items: center; gap: 14px; }
.login-brand h1 { margin: 0; font-size: 30px; font-weight: 900; }
.login-brand p { margin: 0; color: var(--alpha-muted); }
.login-hint { margin-top: 20px; font-size: 13px; color: var(--alpha-muted); background: #f6f1eb; padding: 12px; border-radius: 16px; }
.mobile-bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 64px; background: #fff; border-top: 1px solid var(--alpha-border); z-index: 20; display: flex; justify-content: space-around; align-items: center; }
.mobile-bottom-nav a { color: #5e5349; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; }
.mobile-bottom-nav i { font-size: 20px; }
@media (max-width: 991.98px) {
    .sidebar { position: fixed; left: -310px; top: 0; bottom: 0; z-index: 30; transition: .25s ease; }
    .sidebar.show { left: 0; }
    .topbar { padding: 0 16px; height: 68px; }
    .content-area { padding: 18px; }
    .page-subtitle { display: none; }
}
.table thead th { background: #f7f3ee; color: #5e5147; font-size: 13px; text-transform: uppercase; letter-spacing: .02em; border-bottom: 1px solid var(--alpha-border); }
.table td, .table th { padding: 14px 16px; }
.form-label { font-weight: 700; color: #5f5146; }
.card-footer { border-radius: 0 0 22px 22px; }
.alert { border: none; }

.metric-card {
    background: #fff;
    border-radius: 1.25rem;
    padding: 1.25rem;
    box-shadow: 0 10px 30px rgba(31, 28, 24, .08);
    border: 1px solid rgba(80, 70, 60, .08);
}
.metric-card div { color: #77706a; font-size: .92rem; }
.metric-card strong { display: block; margin-top: .35rem; font-size: 1.8rem; color: #2d2924; }
.mobile-tile { display:flex; flex-direction:column; gap:6px; align-items:flex-start; justify-content:center; min-height:132px; padding:18px; border-radius:22px; background:#fff; color:var(--alpha-text); box-shadow:0 10px 28px rgba(53,45,38,.07); border:1px solid rgba(0,0,0,.04); }
.mobile-tile i { font-size:28px; color:var(--alpha-accent-dark); }
.mobile-tile b { font-size:26px; line-height:1; }
.mobile-tile span { color:var(--alpha-muted); font-weight:700; }
.qr-card { background:#fff; border:1px solid #ddd; border-radius:18px; padding:16px; min-height:150px; break-inside:avoid; }
.qr-img { width:104px; height:104px; border:1px solid #eee; padding:5px; background:#fff; }
.barcode { height:42px; margin-top:10px; background:repeating-linear-gradient(90deg,#111 0 2px,#fff 2px 4px,#111 4px 5px,#fff 5px 8px); border:1px solid #ddd; }
@media print { .sidebar,.topbar,.mobile-bottom-nav,.d-print-none{display:none!important}.main-area{padding:0}.content-area{padding:0}.qr-card{box-shadow:none;border:1px solid #333}.col-md-6,.col-xl-4{width:33.333%;float:left}.print-grid:after{content:"";display:block;clear:both}body{background:#fff} }
@media (max-width: 575.98px) { .mobile-tile { min-height:110px; padding:14px; } .mobile-tile b { font-size:22px; } .qr-img { width:88px; height:88px; } }

/* V7.2 - menu module cha/con gọn hơn */
.nav-menu-compact { padding: 12px 10px 24px; }
.nav-menu-compact .nav-home { margin-bottom: 8px; background: rgba(255,255,255,.08); }
.menu-group { margin: 7px 0; border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.055); }
.menu-group summary { list-style: none; cursor: pointer; color: rgba(255,255,255,.94); display: flex; align-items: center; gap: 11px; padding: 12px 12px; font-weight: 800; font-size: 14px; user-select: none; }
.menu-group summary::-webkit-details-marker { display: none; }
.menu-group summary::after { content: "\F282"; font-family: "bootstrap-icons"; margin-left: auto; font-size: 12px; opacity: .68; transition: transform .2s ease; }
.menu-group[open] summary::after { transform: rotate(180deg); }
.menu-group summary:hover { background: rgba(255,255,255,.08); }
.menu-group summary i { font-size: 18px; width: 22px; text-align: center; color: #d9c3aa; }
.submenu { padding: 4px 8px 10px 12px; }
.submenu a { font-size: 14px; padding: 9px 10px 9px 14px; margin: 2px 0; border-radius: 12px; color: rgba(255,255,255,.78); background: transparent; }
.submenu a:hover { background: rgba(255,255,255,.09); color: #fff; }
.submenu a i { font-size: 15px; width: 18px; opacity: .78; }

/* V7.3 - tối ưu mobile/PWA */
@supports (padding: max(0px)) {
    .mobile-bottom-nav { padding-bottom: max(6px, env(safe-area-inset-bottom)); height: calc(64px + env(safe-area-inset-bottom)); }
    .main-area { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
}
@media (max-width: 991.98px) {
    body { -webkit-tap-highlight-color: transparent; }
    .app-shell { min-height: 100dvh; }
    .main-area { width: 100%; }
    .content-area { padding: 14px 12px 88px; }
    .topbar { height: 60px; padding: 0 10px; }
    .page-title { font-size: 16px; }
    .user-box .btn { padding: 6px 8px; font-size: 12px; }
    h1, .h1 { font-size: 1.65rem; }
    h2, .h2 { font-size: 1.35rem; }
    .stat-card, .metric-card, .card { border-radius: 18px !important; }
    .stat-card { padding: 16px; }
    .stat-value { font-size: 30px; }
    .table-responsive-mobile { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table { min-width: 720px; }
    .btn, .form-control, .form-select { min-height: 42px; }
    .mobile-bottom-nav a { min-width: 48px; }
}
@media (max-width: 575.98px) {
    .mobile-bottom-nav { overflow-x: auto; justify-content: flex-start; gap: 10px; padding-left: 10px; padding-right: 10px; }
    .mobile-bottom-nav a { flex: 0 0 54px; }
    .row.g-3 { --bs-gutter-x: .75rem; --bs-gutter-y: .75rem; }
    .mobile-tile { border-radius: 18px; }
}
@media all and (display-mode: standalone) {
    .topbar { padding-top: env(safe-area-inset-top); height: calc(60px + env(safe-area-inset-top)); }
}


/* V7.4 - giao diện sáng hơn, logo doanh nghiệp thật trên PC/mobile */
:root {
    --alpha-bg: #f6fbfb;
    --alpha-panel: #ffffff;
    --alpha-sidebar: #f9ffff;
    --alpha-sidebar-2: #eef8f7;
    --alpha-accent: #0f8b8d;
    --alpha-accent-dark: #0b6f71;
    --alpha-accent-soft: #e3f5f4;
    --alpha-warm: #f4b860;
    --alpha-text: #1f2a2e;
    --alpha-muted: #6a7880;
    --alpha-border: #dcebea;
}
body { background: linear-gradient(135deg, #f7fbfb 0%, #eef8f7 48%, #fff8ef 100%); color: var(--alpha-text); }
.sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f0fbfa 100%) !important;
    color: #1f2a2e !important;
    border-right: 1px solid #dcebea;
    box-shadow: 10px 0 32px rgba(15, 139, 141, .08);
}
.brand-box { border-bottom: 1px solid #e0efee; padding: 18px 18px; }
.brand-logo, .login-logo {
    background: linear-gradient(135deg, #0f8b8d, #59c3c3) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(15,139,141,.2);
    overflow: hidden;
}
.brand-logo img, .login-logo img { width: 100%; height: 100%; object-fit: contain; padding: 5px; background: #fff; }
.brand-logo span { display: grid; place-items: center; width: 100%; height: 100%; }
.brand-text { min-width: 0; }
.brand-title { color: #173238; font-size: 18px; line-height: 1.18; max-width: 188px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-subtitle { color: #64777c; opacity: 1; }
.nav-menu a { color: #43535a; font-weight: 650; }
.nav-menu a:hover { background: #e4f5f4; color: #0b6f71; }
.nav-menu-compact .nav-home { background: #e4f5f4; color: #0b6f71; }
.menu-group { background: rgba(255,255,255,.9); border: 1px solid #dfeeee; box-shadow: 0 8px 20px rgba(15,139,141,.05); }
.menu-group summary { color: #21333a; }
.menu-group summary:hover { background: #eaf8f7; }
.menu-group summary i { color: #0f8b8d; }
.menu-group summary::after { color: #0f8b8d; }
.submenu a { color: #526166; }
.submenu a:hover { background: #e4f5f4; color: #0b6f71; }
.submenu a i { color: #0f8b8d; opacity: .9; }
.topbar {
    background: rgba(255,255,255,.86);
    border-bottom: 1px solid #dcebea;
    box-shadow: 0 8px 24px rgba(15,139,141,.05);
}
.page-title { color: #1f2a2e; }
.page-subtitle { color: #6a7880; }
.content-area { background: transparent; }
.dashboard-heading { padding: 4px 0 6px; }
.dashboard-heading h2 { color: #173238; letter-spacing: .02em; }
.dashboard-heading .text-muted { color: #6a7880 !important; font-size: 1.02rem; white-space: normal; overflow: visible; text-overflow: unset; max-width: 100%; }
.stat-card, .metric-card, .card {
    background: rgba(255,255,255,.94) !important;
    border: 1px solid rgba(15,139,141,.09) !important;
    box-shadow: 0 12px 32px rgba(15,139,141,.08) !important;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(15,139,141,.13) !important; transition: .18s ease; }
.stat-card.danger-soft { background: linear-gradient(135deg, #fff7ef, #ffffff) !important; border-color: rgba(244,184,96,.25) !important; }
.stat-icon, .module-icon {
    background: linear-gradient(135deg, #e4f5f4, #fff3df) !important;
    color: #0b6f71 !important;
}
.stat-label { color: #64777c; font-weight: 650; }
.stat-value { color: #1f2a2e; }
.stat-note { color: #7b8a8f; }
.btn-alpha { background: linear-gradient(135deg, #0f8b8d, #13a5a8); color:#fff; box-shadow: 0 8px 18px rgba(15,139,141,.18); }
.btn-alpha:hover { background: linear-gradient(135deg, #0b6f71, #0f8b8d); color:#fff; }
.table thead th { background: #eaf8f7; color: #245159; }
.form-label { color: #31565d; }
.login-page { background: radial-gradient(circle at top left, #8ee1dc 0, transparent 32%), linear-gradient(135deg, #e9fbfa 0%, #ffffff 45%, #fff0d7 100%); }
.login-card { box-shadow: 0 24px 70px rgba(15,139,141,.15); }
.login-hint { background: #eaf8f7; }
.mobile-bottom-nav { background: rgba(255,255,255,.96); border-top: 1px solid #dcebea; box-shadow: 0 -10px 24px rgba(15,139,141,.08); }
.mobile-bottom-nav a { color: #3d565d; }
.mobile-bottom-nav a:hover { color: #0b6f71; }
.logo-preview { display:flex; align-items:center; gap:12px; padding:12px; border-radius:16px; background:#eaf8f7; border:1px solid #dcebea; }
.logo-preview img { width:70px; height:70px; object-fit:contain; background:#fff; border-radius:14px; padding:6px; border:1px solid #dcebea; }
.logo-preview span { color:#31565d; font-weight:700; }
@media (max-width: 991.98px) {
    .sidebar { box-shadow: 12px 0 35px rgba(15,139,141,.18); }
    .dashboard-heading .text-muted { font-size: .92rem; }
    .brand-title { max-width: 205px; }
}

/* V7.5 - Tone màu theo logo LPT TECHNOLOGY: đỏ đô + cam kỹ thuật, nền sáng chuyên nghiệp */
:root {
    --alpha-bg: #fff8f2;
    --alpha-panel: #ffffff;
    --alpha-sidebar: #fffaf6;
    --alpha-sidebar-2: #fff0e6;
    --alpha-accent: #ff5a12;
    --alpha-accent-dark: #b4000b;
    --alpha-accent-soft: #fff0e8;
    --alpha-warm: #ff7a1a;
    --alpha-red: #9f0008;
    --alpha-red-2: #c80d12;
    --alpha-orange: #ff5a12;
    --alpha-text: #241b1b;
    --alpha-muted: #7b6a64;
    --alpha-border: #f1d8cc;
}
body {
    background:
        radial-gradient(circle at 12% 8%, rgba(255,90,18,.12), transparent 30%),
        radial-gradient(circle at 95% 20%, rgba(180,0,11,.08), transparent 34%),
        linear-gradient(135deg, #fffaf6 0%, #fff3ea 48%, #ffffff 100%) !important;
    color: var(--alpha-text) !important;
}
.sidebar {
    background: linear-gradient(180deg, #fffdfb 0%, #fff3ea 55%, #fff8f3 100%) !important;
    color: #2b1818 !important;
    border-right: 1px solid #efd6cb !important;
    box-shadow: 10px 0 32px rgba(180,0,11,.10) !important;
}
.brand-box {
    background: linear-gradient(135deg, rgba(180,0,11,.08), rgba(255,90,18,.10));
    border-bottom: 1px solid #efd6cb !important;
}
.brand-logo, .login-logo {
    background: #fff !important;
    color: var(--alpha-red) !important;
    border: 1px solid rgba(180,0,11,.16);
    box-shadow: 0 12px 28px rgba(180,0,11,.16) !important;
    border-radius: 18px !important;
}
.brand-logo { width: 56px; height: 56px; }
.brand-logo img, .login-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px !important;
    background: #fff !important;
}
.brand-title {
    color: var(--alpha-red) !important;
    font-size: 18px;
    font-weight: 950;
    letter-spacing: .04em;
}
.brand-subtitle { color: #7a4134 !important; font-weight: 650; }
.nav-menu a { color: #5c4842 !important; font-weight: 700; }
.nav-menu a:hover,
.nav-menu-compact .nav-home,
.submenu a:hover {
    background: linear-gradient(135deg, rgba(180,0,11,.10), rgba(255,90,18,.13)) !important;
    color: var(--alpha-red) !important;
}
.nav-menu i,
.menu-group summary i,
.submenu a i,
.menu-group summary::after { color: var(--alpha-orange) !important; opacity: 1 !important; }
.menu-group {
    background: rgba(255,255,255,.78) !important;
    border: 1px solid #efd6cb !important;
    box-shadow: 0 8px 22px rgba(180,0,11,.06) !important;
}
.menu-group[open] {
    background: linear-gradient(180deg, #fff 0%, #fff5ee 100%) !important;
    border-color: rgba(255,90,18,.28) !important;
}
.menu-group summary { color: #3a2724 !important; }
.menu-group summary:hover { background: rgba(255,90,18,.09) !important; }
.submenu a { color: #69544e !important; }
.topbar {
    background: rgba(255,255,255,.90) !important;
    border-bottom: 1px solid #efd6cb !important;
    box-shadow: 0 8px 24px rgba(180,0,11,.06) !important;
}
.page-title { color: var(--alpha-red) !important; font-weight: 900; }
.page-subtitle { color: #7b6a64 !important; }
.dashboard-heading h2,
.login-brand h1 {
    color: var(--alpha-red) !important;
    letter-spacing: .04em;
}
.dashboard-heading .text-muted {
    color: #76574f !important;
    border-left: 4px solid var(--alpha-orange);
    padding-left: 12px;
}
.stat-card, .metric-card, .card {
    background: rgba(255,255,255,.96) !important;
    border: 1px solid rgba(180,0,11,.10) !important;
    box-shadow: 0 14px 34px rgba(180,0,11,.08) !important;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 46px rgba(180,0,11,.13) !important;
}
.stat-card.danger-soft {
    background: linear-gradient(135deg, #fff3eb 0%, #ffffff 100%) !important;
    border-color: rgba(255,90,18,.28) !important;
}
.stat-icon, .module-icon {
    background: linear-gradient(135deg, #fff0e8, #fff7f2) !important;
    color: var(--alpha-red) !important;
    border: 1px solid rgba(255,90,18,.18);
}
.stat-label { color: #7a5b52 !important; font-weight: 750; }
.stat-value { color: #251818 !important; }
.stat-note { color: #8a746c !important; }
.btn-alpha {
    background: linear-gradient(135deg, var(--alpha-red), var(--alpha-orange)) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 10px 22px rgba(180,0,11,.22) !important;
}
.btn-alpha:hover {
    background: linear-gradient(135deg, #860006, #e64a0b) !important;
    color: #fff !important;
}
.btn-outline-secondary:hover { background: #fff0e8; color: var(--alpha-red); border-color: rgba(180,0,11,.35); }
.table thead th {
    background: #fff0e8 !important;
    color: var(--alpha-red) !important;
    border-bottom: 1px solid #efd6cb !important;
}
.table td, .table th { border-color: #f4e0d8 !important; }
.form-label { color: #65322d !important; }
.form-control:focus, .form-select:focus {
    border-color: var(--alpha-orange) !important;
    box-shadow: 0 0 0 .2rem rgba(255,90,18,.15) !important;
}
.login-page {
    background:
        radial-gradient(circle at top left, rgba(255,90,18,.28) 0, transparent 35%),
        radial-gradient(circle at bottom right, rgba(180,0,11,.18) 0, transparent 36%),
        linear-gradient(135deg, #fff8f2 0%, #ffffff 45%, #fff0e6 100%) !important;
}
.login-card {
    border: 1px solid rgba(180,0,11,.12) !important;
    box-shadow: 0 28px 80px rgba(180,0,11,.16) !important;
}
.login-hint,
.logo-preview {
    background: #fff0e8 !important;
    border: 1px solid #efd6cb !important;
    color: #6d443d !important;
}
.mobile-bottom-nav {
    background: rgba(255,255,255,.97) !important;
    border-top: 1px solid #efd6cb !important;
    box-shadow: 0 -10px 26px rgba(180,0,11,.09) !important;
}
.mobile-bottom-nav a { color: #684b43 !important; }
.mobile-bottom-nav a:hover { color: var(--alpha-red) !important; }
.mobile-tile {
    border: 1px solid rgba(180,0,11,.10) !important;
    box-shadow: 0 12px 30px rgba(180,0,11,.08) !important;
}
.mobile-tile i { color: var(--alpha-orange) !important; }
.qr-card { border-color: #efd6cb !important; }
.logo-preview img { border-color: #efd6cb !important; }
@media (max-width: 991.98px) {
    .sidebar { box-shadow: 14px 0 38px rgba(180,0,11,.18) !important; }
    .brand-logo { width: 52px; height: 52px; }
    .brand-title { max-width: 210px; }
    .dashboard-heading .text-muted { font-size: .95rem; }
}

/* V7.6 - Tone GreenFarm: xanh lá đậm + nền sáng + nhấn cam LPT nhẹ */
:root {
    --alpha-bg: #f3f8f4;
    --alpha-panel: #ffffff;
    --alpha-sidebar: #0b3d2e;
    --alpha-sidebar-2: #0f5138;
    --alpha-accent: #1f8f5f;
    --alpha-accent-dark: #0f6b46;
    --alpha-accent-soft: #e8f6ee;
    --alpha-lpt-orange: #ff6a13;
    --alpha-lpt-red: #a40008;
    --alpha-text: #1f2c28;
    --alpha-muted: #6b7b74;
    --alpha-border: #dce9e2;
    --alpha-green-900: #0b3d2e;
    --alpha-green-800: #0f5138;
    --alpha-green-700: #146c43;
    --alpha-green-600: #1f8f5f;
    --alpha-green-100: #e8f6ee;
}
html, body { background: #f3f8f4 !important; }
body {
    background:
        radial-gradient(circle at 7% 6%, rgba(31,143,95,.10), transparent 28%),
        radial-gradient(circle at 96% 18%, rgba(255,106,19,.08), transparent 30%),
        linear-gradient(135deg, #f3f8f4 0%, #f7fbf8 48%, #ffffff 100%) !important;
    color: var(--alpha-text) !important;
}
.app-shell { background: transparent !important; }
.sidebar {
    width: 282px !important;
    flex-basis: 282px !important;
    background: linear-gradient(180deg, #082f24 0%, #0b3d2e 45%, #103f31 100%) !important;
    color: #eaf7ef !important;
    border-right: 1px solid rgba(255,255,255,.08) !important;
    box-shadow: 10px 0 28px rgba(11,61,46,.16) !important;
}
.brand-box {
    min-height: 84px;
    background: rgba(255,255,255,.04) !important;
    border-bottom: 1px solid rgba(255,255,255,.10) !important;
    padding: 18px 16px !important;
}
.brand-logo, .login-logo {
    background: #ffffff !important;
    color: var(--alpha-green-800) !important;
    border: 1px solid rgba(255,255,255,.20) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,.14) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}
.brand-logo {
    width: 48px !important;
    height: 48px !important;
    flex: 0 0 48px !important;
}
.brand-logo img, .login-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    padding: 4px !important;
    background: #fff !important;
    display: block !important;
}
.brand-title {
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    letter-spacing: .03em !important;
    line-height: 1.15 !important;
    max-width: 190px !important;
    white-space: normal !important;
}
.brand-subtitle {
    color: rgba(234,247,239,.72) !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    margin-top: 3px !important;
}
.nav-menu-compact { padding: 12px 10px 24px !important; }
.nav-menu a,
.submenu a {
    color: rgba(234,247,239,.76) !important;
    font-weight: 650 !important;
}
.nav-menu i,
.menu-group summary i,
.submenu a i,
.menu-group summary::after {
    color: rgba(138,226,174,.92) !important;
    opacity: 1 !important;
}
.nav-menu-compact .nav-home,
.nav-menu a:hover,
.submenu a:hover {
    background: rgba(71,174,112,.22) !important;
    color: #ffffff !important;
}
.menu-group {
    background: rgba(255,255,255,.045) !important;
    border: 1px solid rgba(255,255,255,.075) !important;
    box-shadow: none !important;
    border-radius: 14px !important;
}
.menu-group[open] {
    background: rgba(255,255,255,.075) !important;
    border-color: rgba(138,226,174,.24) !important;
}
.menu-group summary {
    color: #f7fff9 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
}
.menu-group summary:hover { background: rgba(255,255,255,.07) !important; }
.submenu { border-top: 1px solid rgba(255,255,255,.06); margin-top: 2px; }
.submenu a { border-radius: 10px !important; font-size: 13px !important; }
.main-area { background: transparent !important; }
.topbar {
    height: 66px !important;
    background: rgba(255,255,255,.96) !important;
    border-bottom: 1px solid var(--alpha-border) !important;
    box-shadow: 0 5px 18px rgba(11,61,46,.08) !important;
}
.page-title {
    color: var(--alpha-green-900) !important;
    font-weight: 900 !important;
}
.page-subtitle { color: #63786f !important; }
.content-area { padding: 24px !important; }
.dashboard-heading { margin-bottom: 18px !important; }
.dashboard-heading h2,
.login-brand h1 {
    color: var(--alpha-green-900) !important;
    letter-spacing: .035em !important;
}
.dashboard-heading .text-muted {
    color: #5e7069 !important;
    border-left: 4px solid var(--alpha-green-600) !important;
    padding-left: 12px !important;
    font-size: 1rem !important;
}
.stat-card, .metric-card, .card {
    background: rgba(255,255,255,.98) !important;
    border: 1px solid rgba(20,108,67,.10) !important;
    box-shadow: 0 10px 26px rgba(11,61,46,.08) !important;
}
.stat-card { border-radius: 18px !important; }
.stat-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 18px 38px rgba(11,61,46,.13) !important;
}
.stat-card.danger-soft {
    background: linear-gradient(135deg, #fffdf8 0%, #ffffff 100%) !important;
    border-color: rgba(255,106,19,.25) !important;
}
.stat-icon, .module-icon {
    background: #eaf7ef !important;
    color: var(--alpha-green-700) !important;
    border: 1px solid rgba(31,143,95,.14) !important;
    border-radius: 13px !important;
}
.stat-card.danger-soft .stat-icon {
    background: #fff3e8 !important;
    color: var(--alpha-lpt-orange) !important;
    border-color: rgba(255,106,19,.18) !important;
}
.stat-label { color: #566a61 !important; font-weight: 750 !important; }
.stat-value { color: #17231f !important; font-weight: 900 !important; }
.stat-note { color: #7b8983 !important; }
.btn-alpha,
.btn-primary {
    background: linear-gradient(135deg, #146c43, #1f8f5f) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 8px 18px rgba(20,108,67,.18) !important;
}
.btn-alpha:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, #0f5138, #146c43) !important;
    color: #fff !important;
}
.btn-outline-secondary { border-color: #cbded4 !important; color: #486158 !important; }
.btn-outline-secondary:hover { background: #eaf7ef !important; color: var(--alpha-green-800) !important; border-color: #a9cfba !important; }
.table thead th {
    background: #eaf7ef !important;
    color: var(--alpha-green-900) !important;
    border-bottom: 1px solid #d7e7de !important;
}
.table td, .table th { border-color: #e4efe9 !important; }
.form-label { color: #31594a !important; }
.form-control:focus, .form-select:focus {
    border-color: var(--alpha-green-600) !important;
    box-shadow: 0 0 0 .2rem rgba(31,143,95,.15) !important;
}
.alert-success { background: #eaf7ef !important; color: #0f5138 !important; }
.alert-warning { background: #fff6e8 !important; color: #805200 !important; }
.login-page {
    background:
        radial-gradient(circle at top left, rgba(31,143,95,.22) 0, transparent 36%),
        radial-gradient(circle at bottom right, rgba(255,106,19,.12) 0, transparent 36%),
        linear-gradient(135deg, #f3f8f4 0%, #ffffff 48%, #eaf7ef 100%) !important;
}
.login-card {
    border: 1px solid rgba(20,108,67,.12) !important;
    box-shadow: 0 28px 80px rgba(11,61,46,.16) !important;
}
.login-hint,
.logo-preview {
    background: #eaf7ef !important;
    border: 1px solid #d7e7de !important;
    color: #31594a !important;
}
.logo-preview img { border-color: #d7e7de !important; object-fit: contain !important; }
.mobile-bottom-nav {
    background: rgba(255,255,255,.98) !important;
    border-top: 1px solid #d7e7de !important;
    box-shadow: 0 -10px 24px rgba(11,61,46,.09) !important;
}
.mobile-bottom-nav a { color: #4d675b !important; }
.mobile-bottom-nav a:hover { color: var(--alpha-green-700) !important; }
.mobile-tile {
    border: 1px solid rgba(20,108,67,.10) !important;
    box-shadow: 0 10px 26px rgba(11,61,46,.08) !important;
}
.mobile-tile i { color: var(--alpha-green-700) !important; }
.qr-card { border-color: #d7e7de !important; }
.badge.bg-danger { background-color: var(--alpha-lpt-orange) !important; }
.text-danger { color: #d84b0f !important; }
.text-success { color: var(--alpha-green-700) !important; }
@media (max-width: 991.98px) {
    .sidebar { box-shadow: 14px 0 38px rgba(11,61,46,.22) !important; }
    .content-area { padding: 14px 12px 88px !important; }
    .topbar { height: 60px !important; }
    .brand-title { max-width: 205px !important; }
    .dashboard-heading .text-muted { font-size: .92rem !important; }
}


/* V7.7 - sửa logo, bỏ slogan trên topbar, thay dòng mô tả dashboard bằng thông tin doanh nghiệp */
.brand-logo {
    background: #ffffff !important;
    border: 1px solid rgba(255,255,255,.28) !important;
}
.brand-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 3px !important;
    background: #fff !important;
}
.topbar .page-subtitle { display: none !important; }
.dashboard-heading h2 { margin-bottom: .4rem !important; }
.company-info-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    color: #52665d;
    font-size: .96rem;
    line-height: 1.55;
    max-width: 100%;
}
.company-info-line span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    color: #52665d;
}
.company-info-line i { color: var(--alpha-green-700); font-size: 1rem; }
.dashboard-heading .text-muted { border-left: none !important; padding-left: 0 !important; }
.logo-preview img { background:#fff !important; object-fit:contain !important; }
@media (min-width: 992px) {
    .topbar { height: 58px !important; }
    .brand-logo { width: 54px !important; height: 54px !important; flex-basis:54px !important; }
}
@media (max-width: 575.98px) {
    .company-info-line { font-size: .86rem; gap: 4px 10px; }
}


/* V7.8 - Logo sidebar nhỏ hơn, hiện trọn logo; đổi tên Mobile xưởng thành Trạm xưởng */
.brand-logo {
    width: 48px !important;
    height: 48px !important;
    flex: 0 0 48px !important;
    border-radius: 14px !important;
    padding: 6px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    box-shadow: 0 8px 18px rgba(0,0,0,.12) !important;
}
.brand-logo img {
    width: 100% !important;
    height: 100% !important;
    max-width: 36px !important;
    max-height: 36px !important;
    display: block !important;
    margin: auto !important;
    object-fit: contain !important;
    padding: 0 !important;
    background: #ffffff !important;
    border-radius: 8px !important;
}
.brand-box {
    gap: 14px !important;
    padding-top: 18px !important;
    padding-bottom: 18px !important;
}
.brand-title {
    font-size: 18px !important;
    letter-spacing: .6px !important;
}
.brand-subtitle {
    font-size: 12.5px !important;
    line-height: 1.35 !important;
}
@media (min-width: 992px) {
    .brand-logo { width: 48px !important; height: 48px !important; flex-basis: 48px !important; }
}
@media (max-width: 991.98px) {
    .brand-logo { width: 44px !important; height: 44px !important; flex-basis: 44px !important; }
    .brand-logo img { max-width: 32px !important; max-height: 32px !important; }
}


/* V8.4 - Fix logo hiển thị trọn khung + giữ module cha mở theo menu con đang chọn */
.brand-logo {
    width: 52px !important;
    height: 52px !important;
    flex: 0 0 52px !important;
    border-radius: 16px !important;
    padding: 8px !important;
    background: #ffffff !important;
    overflow: hidden !important;
}
.brand-logo img {
    width: auto !important;
    height: auto !important;
    max-width: 34px !important;
    max-height: 34px !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
    margin: auto !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 6px !important;
}
.brand-box { align-items: center !important; }
.nav-menu a.active,
.submenu a.active {
    background: rgba(71,174,112,.25) !important;
    color: #ffffff !important;
    font-weight: 850 !important;
}
.nav-menu a.active i,
.submenu a.active i { color: #9af0bd !important; opacity: 1 !important; }
.menu-group:has(.submenu a.active) {
    background: rgba(255,255,255,.085) !important;
    border-color: rgba(138,226,174,.30) !important;
}
.quote-company-logo img,
.print-company-logo img,
.baogia-logo img,
.customer-quote-logo img {
    object-fit: contain !important;
    object-position: center center !important;
    max-width: 100% !important;
    max-height: 100% !important;
}
@media (max-width: 991.98px) {
    .brand-logo { width: 48px !important; height: 48px !important; flex-basis: 48px !important; padding: 8px !important; }
    .brand-logo img { max-width: 31px !important; max-height: 31px !important; }
}

/* V8.6 - Cân lại logo sidebar/form in và dropdown nhân sự */
.brand-logo {
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px !important;
    border-radius: 18px !important;
    padding: 5px !important;
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
    background: #ffffff !important;
}
.brand-logo img {
    width: 46px !important;
    height: 46px !important;
    max-width: 46px !important;
    max-height: 46px !important;
    object-fit: contain !important;
    object-position: center center !important;
    padding: 0 !important;
    margin: 0 auto !important;
    background: #ffffff !important;
    border-radius: 10px !important;
}
.brand-box {
    min-height: 96px !important;
    gap: 12px !important;
}
.login-logo img {
    object-fit: contain !important;
    width: 100% !important;
    height: 100% !important;
    padding: 8px !important;
}
.form-select {
    min-height: 42px;
    border-radius: 10px;
}
.quote-company-logo img,
.print-company-logo img,
.baogia-logo img,
.customer-quote-logo img,
.header .logo {
    object-fit: contain !important;
    object-position: center center !important;
    padding: 6px !important;
    background: #fff !important;
}
@media (max-width: 991.98px) {
    .brand-logo { width: 52px !important; height: 52px !important; flex-basis: 52px !important; padding: 5px !important; }
    .brand-logo img { width: 40px !important; height: 40px !important; max-width: 40px !important; max-height: 40px !important; }
}

/* V8.7 - Sidebar rộng thêm 10mm, logo hiện trọn, menu dạng accordion */
@media (min-width: 992px) {
    .sidebar {
        width: 330px !important;
        flex: 0 0 330px !important;
    }
    .brand-title { max-width: 220px !important; }
    .brand-subtitle { max-width: 220px !important; }
}
@media (max-width: 991.98px) {
    .sidebar { width: 330px !important; left: -345px !important; }
    .sidebar.show { left: 0 !important; }
}
.brand-logo {
    width: 62px !important;
    height: 62px !important;
    flex: 0 0 62px !important;
    padding: 8px !important;
    border-radius: 18px !important;
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
    background: #ffffff !important;
}
.brand-logo img {
    width: 100% !important;
    height: 100% !important;
    max-width: 48px !important;
    max-height: 48px !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
    margin: auto !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
}
.brand-box { gap: 14px !important; }
.menu-group[open] { background: rgba(255,255,255,.09) !important; }
.submenu a.active { background: rgba(71,174,112,.25) !important; }

/* V8.9 - Theme LPT: Đỏ gạch + Cam + Olive chuyên nghiệp */
:root {
    --lpt-brick: #9f2418;
    --lpt-brick-dark: #6f1711;
    --lpt-brick-2: #b93220;
    --lpt-orange: #f26a1b;
    --lpt-orange-soft: #fff0e3;
    --lpt-olive: #556b2f;
    --lpt-olive-dark: #36461f;
    --lpt-olive-soft: #eef3e5;
    --lpt-cream: #fff8ef;
    --lpt-paper: #fffdf9;
    --lpt-ink: #232016;
    --lpt-muted: #746d5c;
    --lpt-border: #ead8c8;

    --alpha-bg: #fbf7ef;
    --alpha-panel: #ffffff;
    --alpha-sidebar: #4b1f18;
    --alpha-sidebar-2: #243817;
    --alpha-accent: var(--lpt-orange);
    --alpha-accent-dark: var(--lpt-brick);
    --alpha-accent-soft: var(--lpt-orange-soft);
    --alpha-warm: var(--lpt-orange);
    --alpha-text: var(--lpt-ink);
    --alpha-muted: var(--lpt-muted);
    --alpha-border: var(--lpt-border);
    --alpha-green-700: var(--lpt-olive);
    --alpha-green-900: var(--lpt-olive-dark);
}
body {
    background:
        radial-gradient(circle at 8% 4%, rgba(242,106,27,.12), transparent 32%),
        radial-gradient(circle at 92% 12%, rgba(85,107,47,.12), transparent 34%),
        linear-gradient(135deg, #fffaf2 0%, #f7f2e7 48%, #ffffff 100%) !important;
    color: var(--lpt-ink) !important;
}
.sidebar {
    background: linear-gradient(180deg, #5f2419 0%, #40231a 42%, #26391b 100%) !important;
    color: #fffaf2 !important;
    border-right: 1px solid rgba(255,255,255,.09) !important;
    box-shadow: 14px 0 36px rgba(80,38,20,.22) !important;
}
.brand-box {
    background: linear-gradient(135deg, rgba(242,106,27,.16), rgba(85,107,47,.18)) !important;
    border-bottom: 1px solid rgba(255,255,255,.10) !important;
}
.brand-logo {
    background: #fffaf2 !important;
    border: 1px solid rgba(255,255,255,.72) !important;
    box-shadow: 0 12px 24px rgba(0,0,0,.22) !important;
}
.brand-title {
    color: #fffdf8 !important;
    text-shadow: 0 1px 0 rgba(0,0,0,.12);
}
.brand-subtitle {
    color: rgba(255,248,239,.78) !important;
    opacity: 1 !important;
}
.nav-menu a,
.mobile-bottom-nav a { color: rgba(255,248,239,.82) !important; }
.nav-menu a:hover {
    background: rgba(242,106,27,.18) !important;
    color: #ffffff !important;
}
.nav-menu-compact .nav-home {
    background: linear-gradient(135deg, rgba(242,106,27,.25), rgba(85,107,47,.22)) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,.10) !important;
}
.nav-menu-compact .nav-home i { color: #ffb07a !important; }
.menu-group {
    background: rgba(255,255,255,.055) !important;
    border: 1px solid rgba(255,255,255,.09) !important;
    box-shadow: none !important;
}
.menu-group[open] {
    background: rgba(255,255,255,.075) !important;
    border-color: rgba(255,176,122,.32) !important;
}
.menu-group summary {
    color: #fffaf2 !important;
}
.menu-group summary:hover {
    background: rgba(242,106,27,.16) !important;
}
.menu-group summary i,
.submenu a i,
.menu-group summary::after {
    color: #ffb07a !important;
    opacity: 1 !important;
}
.submenu a {
    color: rgba(255,248,239,.78) !important;
}
.submenu a:hover {
    background: rgba(255,255,255,.09) !important;
    color: #ffffff !important;
}
.nav-menu a.active,
.submenu a.active {
    background: linear-gradient(135deg, var(--lpt-orange), var(--lpt-brick)) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(159,36,24,.24) !important;
}
.nav-menu a.active i,
.submenu a.active i { color: #ffffff !important; }
.topbar {
    background: rgba(255,253,249,.92) !important;
    border-bottom: 1px solid rgba(234,216,200,.9) !important;
    box-shadow: 0 8px 24px rgba(85,107,47,.07) !important;
}
.page-title,
.dashboard-heading h2,
h1, h2, h3, h4, h5 {
    color: var(--lpt-olive-dark) !important;
}
.company-info-line,
.company-info-line span { color: #5f6652 !important; }
.company-info-line i { color: var(--lpt-brick) !important; }
.stat-card, .metric-card, .card {
    background: rgba(255,255,255,.96) !important;
    border: 1px solid rgba(234,216,200,.78) !important;
    box-shadow: 0 14px 34px rgba(85,107,47,.10) !important;
}
.stat-card:hover {
    box-shadow: 0 20px 46px rgba(85,107,47,.16) !important;
}
.stat-card.danger-soft {
    background: linear-gradient(135deg, #fff3e7 0%, #ffffff 100%) !important;
    border-color: rgba(242,106,27,.30) !important;
}
.stat-icon, .module-icon, .mobile-tile i {
    background: linear-gradient(135deg, var(--lpt-olive-soft), var(--lpt-orange-soft)) !important;
    color: var(--lpt-brick) !important;
    border: 1px solid rgba(242,106,27,.12) !important;
}
.stat-label { color: #5d654f !important; font-weight: 750 !important; }
.stat-value { color: #1f2418 !important; }
.stat-note { color: #786f60 !important; }
.btn-alpha,
.btn-primary,
.btn-success {
    background: linear-gradient(135deg, var(--lpt-olive), var(--lpt-olive-dark)) !important;
    border-color: var(--lpt-olive-dark) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(85,107,47,.18) !important;
}
.btn-alpha:hover,
.btn-primary:hover,
.btn-success:hover {
    background: linear-gradient(135deg, var(--lpt-brick), var(--lpt-orange)) !important;
    border-color: var(--lpt-brick) !important;
    color: #ffffff !important;
}
.btn-outline-success {
    border-color: var(--lpt-olive) !important;
    color: var(--lpt-olive-dark) !important;
}
.btn-outline-success:hover {
    background: var(--lpt-olive) !important;
    color: #ffffff !important;
}
.btn-outline-primary {
    border-color: var(--lpt-brick) !important;
    color: var(--lpt-brick) !important;
}
.btn-outline-primary:hover {
    background: var(--lpt-brick) !important;
    color: #ffffff !important;
}
.badge.bg-success,
.bg-success { background-color: var(--lpt-olive) !important; }
.badge.bg-danger,
.bg-danger { background-color: var(--lpt-brick) !important; }
.text-success { color: var(--lpt-olive-dark) !important; }
.text-danger { color: var(--lpt-brick) !important; }
.table thead th {
    background: linear-gradient(180deg, #eef3e5, #e6eed9) !important;
    color: var(--lpt-olive-dark) !important;
    border-bottom: 1px solid #d7dfca !important;
}
.table td, .table th { border-color: #eee1d3 !important; }
.form-label { color: var(--lpt-olive-dark) !important; }
.form-control:focus,
.form-select:focus {
    border-color: var(--lpt-orange) !important;
    box-shadow: 0 0 0 .18rem rgba(242,106,27,.16) !important;
}
.login-page {
    background:
        radial-gradient(circle at top left, rgba(242,106,27,.28), transparent 34%),
        linear-gradient(135deg, #5f2419 0%, #26391b 62%, #fff8ef 100%) !important;
}
.login-card {
    border: 1px solid rgba(255,255,255,.65) !important;
    box-shadow: 0 26px 70px rgba(66,42,25,.25) !important;
}
.login-hint { background: var(--lpt-olive-soft) !important; color: #5f6652 !important; }
.mobile-bottom-nav {
    background: rgba(255,253,249,.98) !important;
    border-top: 1px solid var(--lpt-border) !important;
    box-shadow: 0 -10px 24px rgba(85,107,47,.10) !important;
}
.mobile-bottom-nav a { color: var(--lpt-olive-dark) !important; }
.mobile-bottom-nav a:hover { color: var(--lpt-brick) !important; }
.mobile-tile {
    border: 1px solid rgba(234,216,200,.72) !important;
    box-shadow: 0 12px 28px rgba(85,107,47,.10) !important;
}
.alert-success { background: #eef3e5 !important; color: var(--lpt-olive-dark) !important; }
.alert-warning { background: #fff0e3 !important; color: #7b3a10 !important; }
.alert-danger { background: #fde8e2 !important; color: var(--lpt-brick-dark) !important; }
.logo-preview {
    background: linear-gradient(135deg, #fff8ef, #eef3e5) !important;
    border-color: var(--lpt-border) !important;
}
.qr-card { border-color: var(--lpt-border) !important; }
@media (max-width: 991.98px) {
    .sidebar { box-shadow: 14px 0 38px rgba(66,42,25,.28) !important; }
}

/* V10.0 - Mobile login + mobile app polish theo nhận diện LPT */
:root {
    --lpt-brick: #8f321f;
    --lpt-brick-dark: #612415;
    --lpt-orange: #ff6a1a;
    --lpt-olive: #52622b;
    --lpt-olive-dark: #35411c;
    --lpt-cream: #fff8ec;
    --lpt-mint: #f1f7ee;
}

.lpt-mobile-login {
    position: relative;
    overflow: hidden;
    min-height: 100dvh;
    padding: 24px;
    background:
        radial-gradient(circle at 8% 10%, rgba(255,106,26,.24), transparent 28%),
        radial-gradient(circle at 92% 86%, rgba(82,98,43,.24), transparent 34%),
        linear-gradient(135deg, #fff9ef 0%, #f5f1e4 46%, #fffdf8 100%) !important;
}
.login-bg-orb { position: absolute; border-radius: 999px; filter: blur(4px); opacity: .38; pointer-events: none; }
.login-bg-orb.orb-1 { width: 260px; height: 260px; left: -90px; top: -90px; background: var(--lpt-orange); }
.login-bg-orb.orb-2 { width: 300px; height: 300px; right: -120px; bottom: -120px; background: var(--lpt-olive); }
.login-shell { width: min(1080px, 100%); display: grid; grid-template-columns: 1.05fr .9fr; gap: 18px; align-items: stretch; position: relative; z-index: 1; }
.login-hero {
    min-height: 620px;
    border-radius: 34px;
    padding: 34px;
    color: #fff;
    background:
        linear-gradient(150deg, rgba(97,36,21,.96), rgba(143,50,31,.94) 48%, rgba(82,98,43,.94)),
        radial-gradient(circle at 16% 14%, rgba(255,106,26,.35), transparent 34%);
    box-shadow: 0 28px 70px rgba(97,36,21,.26);
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}
.login-hero::after { content:""; position:absolute; inset:auto -80px -120px auto; width:280px; height:280px; border:38px solid rgba(255,255,255,.08); border-radius:80px; transform:rotate(28deg); }
.login-hero-logo { width: 86px; height: 86px; border-radius: 26px; padding: 12px; background: rgba(255,255,255,.94); box-shadow: 0 18px 45px rgba(0,0,0,.18); display:grid; place-items:center; }
.login-hero-logo img { width: 100%; height: 100%; object-fit: contain; }
.login-eyebrow { font-size: .78rem; letter-spacing: .16em; font-weight: 900; color: rgba(255,255,255,.72); margin-bottom: 12px; }
.login-hero h1 { font-size: clamp(2.2rem, 4vw, 4.3rem); font-weight: 950; letter-spacing: .08em; margin: 0; line-height: 1.05; }
.login-hero p { margin: 14px 0 0; font-size: 1.08rem; color: rgba(255,255,255,.78); }
.login-hero-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; position: relative; z-index: 1; }
.login-hero-grid div { padding: 16px; border-radius: 22px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(10px); }
.login-hero-grid i { font-size: 1.35rem; color: #ffd7bd; }
.login-hero-grid b { display:block; margin-top: 8px; }
.login-hero-grid span { display:block; margin-top: 3px; font-size: .85rem; color: rgba(255,255,255,.72); }
.mobile-login-card { width: 100%; border-radius: 34px !important; padding: 30px !important; align-self: stretch; display:flex; flex-direction:column; justify-content:center; background: rgba(255,255,255,.9) !important; border: 1px solid rgba(255,255,255,.78) !important; box-shadow: 0 28px 70px rgba(82,98,43,.16) !important; backdrop-filter: blur(16px); }
.mobile-login-brand { align-items: center; }
.mobile-login-brand .login-logo { width: 64px; height: 64px; border-radius: 22px; padding: 10px; background:#fff; box-shadow: 0 12px 28px rgba(143,50,31,.14); }
.mobile-login-brand .login-logo img { width:100%; height:100%; object-fit:contain; }
.mobile-login-brand h1 { color: var(--lpt-olive-dark); font-size: 1.45rem; letter-spacing: .08em; }
.mobile-login-brand p { color: #80685a; font-weight: 650; }
.mobile-login-title { margin: 26px 0 18px; }
.mobile-login-title .pill { display:inline-flex; align-items:center; gap:7px; padding: 7px 11px; border-radius:999px; background: #fff1e8; color: var(--lpt-brick); font-weight: 800; font-size: .82rem; }
.mobile-login-title h2 { margin: 14px 0 6px; font-size: 2rem; font-weight: 950; color: #1d2515; }
.mobile-login-title p { margin: 0; color: #746d63; }
.login-form-modern .form-floating-icon { position: relative; }
.login-form-modern .form-floating-icon > i { position: absolute; left: 16px; top: 15px; z-index: 2; color: var(--lpt-olive); font-size: 1.15rem; }
.login-form-modern .form-floating-icon .form-control { padding-left: 46px; border-radius: 18px; min-height: 56px; border-color: #eaded4; background: rgba(255,255,255,.94); font-weight: 650; }
.login-form-modern .form-floating-icon label { position: absolute; left: 46px; top: -10px; background: #fff; padding: 0 7px; border-radius: 999px; color: #67594f; font-weight: 800; font-size: .8rem; }
.login-form-modern .form-control:focus { border-color: var(--lpt-orange); box-shadow: 0 0 0 .22rem rgba(255,106,26,.14); }
.login-check { display:flex; align-items:center; gap: 8px; color: #5b554c; font-weight: 650; }
.login-secure { color: var(--lpt-olive); font-weight: 800; font-size: .86rem; white-space: nowrap; }
.login-submit { min-height: 56px; border-radius: 18px !important; font-weight: 900; background: linear-gradient(135deg, var(--lpt-olive), var(--lpt-brick)) !important; box-shadow: 0 16px 32px rgba(97,36,21,.22) !important; }
.login-quick-note { margin-top: 18px; padding: 14px 15px; border-radius: 18px; background: #fbf5e8; color: #746a5e; font-size: .88rem; border: 1px solid #efe3d2; }
.login-quick-note div { color: var(--lpt-brick); font-weight: 900; margin-bottom: 4px; }

.mobile-app-page { max-width: 1160px; margin: 0 auto; }
.mobile-app-hero {
    display:flex;
    justify-content:space-between;
    gap:16px;
    align-items:center;
    padding: 22px;
    border-radius: 30px;
    color:#fff;
    background:
        radial-gradient(circle at 20% 0%, rgba(255,106,26,.55), transparent 34%),
        linear-gradient(135deg, var(--lpt-olive-dark), var(--lpt-brick));
    box-shadow: 0 24px 60px rgba(53,65,28,.18);
    overflow:hidden;
    position:relative;
}
.mobile-app-hero::after { content:""; position:absolute; right:-42px; bottom:-58px; width:160px; height:160px; border:24px solid rgba(255,255,255,.08); border-radius:42px; transform:rotate(24deg); }
.mobile-hero-copy { position:relative; z-index:1; }
.mobile-app-kicker { display:inline-flex; gap:8px; align-items:center; font-weight:900; color:#ffd9c1; font-size:.82rem; letter-spacing:.08em; text-transform:uppercase; }
.mobile-app-hero h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 950; color: #fff7ef; line-height: 1.05; text-shadow: 0 6px 18px rgba(44,24,14,.22); letter-spacing: -.02em; }
.mobile-app-hero p { margin:0; color:rgba(255,248,239,.92); max-width: 560px; font-weight: 600; }
.mobile-hero-action { flex:0 0 auto; min-width:112px; min-height:112px; border-radius:28px; display:grid; place-items:center; text-align:center; gap:4px; padding:14px; color:#fff; background: rgba(255,255,255,.15); border:1px solid rgba(255,255,255,.2); backdrop-filter: blur(10px); position:relative; z-index:1; }
.mobile-hero-action i { font-size: 2rem; color:#ffe0cf; }
.mobile-hero-action span { display:block; font-weight:900; }
.mobile-kpi-strip { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0 20px; }
.mobile-kpi-strip div { border-radius:22px; background: rgba(255,255,255,.94); border: 1px solid rgba(82,98,43,.10); padding: 15px; box-shadow: 0 12px 28px rgba(82,98,43,.08); }
.mobile-kpi-strip span { display:block; color:#777065; font-size:.82rem; font-weight:800; }
.mobile-kpi-strip b { display:block; color:#1d2515; font-size:1.75rem; line-height:1.1; }
.mobile-section-title { display:flex; justify-content:space-between; gap:12px; align-items:end; margin: 4px 0 12px; }
.mobile-section-title h2 { margin:0; font-weight:950; color:var(--lpt-olive-dark); }
.mobile-section-title span { color:#776f65; font-size:.92rem; }
.mobile-action-grid { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.mobile-action-card { position:relative; min-height: 154px; padding: 18px; border-radius: 26px; background: rgba(255,255,255,.96); color:#1d2515; border:1px solid rgba(82,98,43,.11); box-shadow: 0 14px 34px rgba(82,98,43,.09); display:flex; flex-direction:column; justify-content:space-between; overflow:hidden; }
.mobile-action-card::after { content:""; position:absolute; right:-28px; top:-28px; width:86px; height:86px; border-radius:999px; background: rgba(82,98,43,.08); }
.mobile-action-card i { width:46px; height:46px; border-radius:16px; display:grid; place-items:center; background:#f1f7ee; color:var(--lpt-olive); font-size:1.35rem; }
.mobile-action-card b { margin-top:12px; font-size:1rem; }
.mobile-action-card span { color:#776f65; font-weight:650; font-size:.88rem; }
.mobile-action-card em { position:absolute; right:16px; bottom:15px; font-style:normal; font-weight:950; color:rgba(82,98,43,.22); font-size:1.55rem; }
.mobile-action-card.primary { background: linear-gradient(135deg, #fff, #f4f8ed); border-color: rgba(82,98,43,.18); }
.mobile-action-card.danger { background: linear-gradient(135deg, #fff, #fff3ec); border-color: rgba(255,106,26,.22); }
.mobile-action-card.danger i { background:#fff1e8; color:var(--lpt-orange); }

@media (max-width: 991.98px) {
    .login-shell { display:block; width:min(430px, 100%); }
    .lpt-mobile-login { padding: 16px; align-items: start; place-items: center; }
    .mobile-login-card { border-radius: 30px !important; padding: 22px !important; margin-top: max(14px, env(safe-area-inset-top)); }
    .mobile-login-brand .login-logo { width:58px; height:58px; border-radius:20px; }
    .mobile-login-brand h1 { font-size:1.12rem; }
    .mobile-login-title { margin: 22px 0 16px; }
    .mobile-login-title h2 { font-size:1.7rem; }
    .login-quick-note { font-size:.78rem; }

    body:has(.mobile-app-page) .topbar { background: rgba(255,255,255,.78); backdrop-filter: blur(18px); }
    body:has(.mobile-app-page) .content-area { padding: 12px 12px 92px; }
    .mobile-app-hero { padding: 18px; border-radius: 26px; align-items:stretch; }
    .mobile-hero-copy { max-width: calc(100% - 100px); }
    .mobile-app-hero p { font-size:.92rem; }
    .mobile-hero-action { min-width:86px; min-height:86px; border-radius:22px; }
    .mobile-kpi-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); gap:8px; }
    .mobile-kpi-strip div { padding:10px; border-radius:18px; }
    .mobile-kpi-strip span { font-size:.68rem; }
    .mobile-kpi-strip b { font-size:1.28rem; }
    .mobile-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap:10px; }
    .mobile-action-card { min-height:132px; border-radius:22px; padding:14px; }
    .mobile-action-card i { width:42px; height:42px; border-radius:14px; }
    .mobile-bottom-nav { height: 78px; background: rgba(255,255,255,.96); backdrop-filter: blur(18px); border-top: 1px solid rgba(82,98,43,.14); box-shadow: 0 -16px 34px rgba(82,98,43,.10); position:relative; }
    .mobile-bottom-nav::before { content:""; position:absolute; top:0; left:0; right:0; height:4px; background: linear-gradient(90deg, var(--lpt-brick), var(--lpt-orange), var(--lpt-olive)); }
    .mobile-bottom-nav a { color: #4b5632; font-size:10px; min-width: 56px; padding-top: 6px; border-radius: 14px; transition: all .18s ease; }
    .mobile-bottom-nav a.active { color: var(--lpt-brick); background: rgba(255,106,26,.08); }
    .mobile-bottom-nav a.active i { background: linear-gradient(135deg, rgba(165,59,36,.12), rgba(255,106,26,.16)); color: var(--lpt-brick); box-shadow: 0 8px 18px rgba(165,59,36,.12); }
    .mobile-bottom-nav a.active span { font-weight: 900; }
    .mobile-bottom-nav a i { font-size:20px; width: 34px; height: 34px; display:grid; place-items:center; border-radius: 12px; }
}
@media (max-width: 390px) {
    .mobile-app-hero { flex-direction:column; }
    .mobile-hero-action { width:100%; min-height:64px; display:flex; justify-content:center; }
    .mobile-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* Mobile dashboard polish - solid enterprise */
@media (max-width: 991.98px) {
    body:has(.mobile-app-page) { overflow: hidden; }
    body:has(.mobile-app-page) .main-area { min-height: 100dvh; padding-bottom: 0; }
    body:has(.mobile-app-page) .topbar {
        height: 70px;
        background: linear-gradient(90deg, #556b2f 0%, #6a7838 100%) !important;
        border-bottom: 1px solid rgba(255, 247, 239, .18) !important;
        box-shadow: 0 10px 24px rgba(73, 85, 36, .22) !important;
    }
    body:has(.mobile-app-page) .page-title {
        color: #fff8ef !important;
        font-size: 1.1rem;
        font-weight: 900;
        letter-spacing: -.01em;
        text-shadow: 0 2px 8px rgba(0,0,0,.16);
    }
    body:has(.mobile-app-page) .btn-menu {
        background: rgba(255,255,255,.10);
        border-color: rgba(255,255,255,.28);
        color: #fff8ef;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
    }
    body:has(.mobile-app-page) .user-box .btn-outline-secondary {
        color: #fff8ef;
        border-color: rgba(255,255,255,.30);
        background: rgba(255,255,255,.10);
    }
    body:has(.mobile-app-page) .user-box .btn-outline-secondary:hover {
        background: rgba(255,255,255,.18);
        color: #ffffff;
    }
    body:has(.mobile-app-page) .content-area {
        padding: 10px 12px calc(84px + env(safe-area-inset-bottom));
        height: calc(100dvh - 70px);
        overflow: hidden;
    }

    .mobile-app-page {
        height: calc(100dvh - 70px - 94px - env(safe-area-inset-bottom));
        display: grid;
        grid-template-rows: auto auto auto 1fr;
        gap: 10px;
        overflow: hidden;
    }
    .mobile-app-hero {
        padding: 14px 16px;
        border-radius: 24px;
        min-height: 126px;
        background: linear-gradient(135deg, #6a5f14 0%, #a6581d 45%, #9b3d24 100%);
        box-shadow: 0 16px 32px rgba(123, 63, 29, .18);
    }
    .mobile-app-hero::before { opacity: .14; }
    .mobile-app-hero::after { opacity: .30; }
    .mobile-hero-copy { max-width: calc(100% - 112px); }
    .mobile-app-hero h1 {
        margin: 0 0 6px;
        font-size: clamp(1.15rem, 7vw, 1.6rem);
        color: #fffdf7;
        text-shadow: 0 5px 14px rgba(44,24,14,.22);
    }
    .mobile-app-hero p {
        font-size: .78rem;
        line-height: 1.25;
        color: rgba(255,250,242,.92);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .mobile-hero-action {
        min-width: 92px;
        min-height: 92px;
        border-radius: 24px;
        background: rgba(255,255,255,.12);
        box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
    }
    .mobile-hero-action i { font-size: 1.7rem; }
    .mobile-hero-action span { font-size: .78rem; }

    .mobile-kpi-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }
    .mobile-kpi-strip div {
        padding: 8px 10px;
        border-radius: 16px;
        box-shadow: 0 10px 20px rgba(85,107,47,.08);
    }
    .mobile-kpi-strip span { font-size: .72rem; }
    .mobile-kpi-strip b { font-size: 1.05rem; }

    .mobile-section-title {
        margin: 0;
        align-items: end;
    }
    .mobile-section-title h2 {
        margin: 0;
        font-size: 1.05rem;
    }
    .mobile-section-title span {
        font-size: .74rem;
        text-align: right;
        max-width: 42%;
    }

    .mobile-action-grid {
        height: 100%;
        min-height: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }
    .mobile-action-card {
        min-height: 0;
        height: 100%;
        padding: 12px;
        border-radius: 18px;
        box-shadow: 0 12px 28px rgba(85,107,47,.08);
    }
    .mobile-action-card i {
        width: 38px;
        height: 38px;
        margin-bottom: 8px;
        border-radius: 12px;
        font-size: 1.05rem;
    }
    .mobile-action-card b {
        font-size: .9rem;
        line-height: 1.1;
        margin-bottom: 2px;
    }
    .mobile-action-card span {
        font-size: .72rem;
        line-height: 1.15;
    }
    .mobile-action-card em {
        font-size: .58rem;
        right: 10px;
        bottom: 8px;
        opacity: .26;
    }

    .mobile-bottom-nav {
        height: calc(76px + env(safe-area-inset-bottom));
        padding: 4px 6px max(8px, env(safe-area-inset-bottom));
        background: #fffefb;
        backdrop-filter: none;
        border-top: 1px solid rgba(106,120,56,.18);
        box-shadow: 0 -14px 30px rgba(85,107,47,.12);
    }
    .mobile-bottom-nav::before {
        height: 5px;
        background: linear-gradient(90deg, var(--lpt-brick), var(--lpt-orange), var(--lpt-olive));
    }
    .mobile-bottom-nav a {
        color: #495524;
        min-width: 52px;
        padding: 3px 2px 0;
        border-radius: 14px;
        gap: 1px;
    }
    .mobile-bottom-nav a i {
        width: 32px;
        height: 32px;
        font-size: 1.15rem;
        background: rgba(106,120,56,.08);
        border: 1px solid rgba(106,120,56,.14);
    }
    .mobile-bottom-nav a span {
        font-size: .72rem;
        font-weight: 800;
    }
    .mobile-bottom-nav a.active {
        color: var(--lpt-brick);
        background: rgba(165,59,36,.08);
    }
    .mobile-bottom-nav a.active i {
        background: rgba(165,59,36,.12);
        border-color: rgba(165,59,36,.16);
        color: var(--lpt-brick);
        box-shadow: none;
    }
}

@media (max-width: 420px) {
    .mobile-app-page { gap: 8px; }
    .mobile-app-hero { min-height: 118px; padding: 12px 14px; }
    .mobile-hero-copy { max-width: calc(100% - 98px); }
    .mobile-hero-action { min-width: 84px; min-height: 84px; border-radius: 20px; }
    .mobile-kpi-strip div { padding: 7px 8px; }
    .mobile-kpi-strip span { font-size: .68rem; }
    .mobile-kpi-strip b { font-size: .98rem; }
    .mobile-action-grid { gap: 7px; }
    .mobile-action-card { padding: 11px; }
    .mobile-action-card b { font-size: .86rem; }
    .mobile-action-card span { font-size: .68rem; }
    .mobile-section-title h2 { font-size: 1rem; }
    .mobile-section-title span { font-size: .7rem; }
}


/* V10.6 - Mobile footer always fixed at bottom, content scrolls behind safe padding */
@media (max-width: 991.98px) {
    body:has(.mobile-app-page) {
        min-height: 100dvh !important;
        overflow: hidden !important;
        padding-bottom: 0 !important;
    }

    body:has(.mobile-app-page) .main-area {
        min-height: 100dvh !important;
        height: 100dvh !important;
        padding-bottom: 0 !important;
        overflow: hidden !important;
    }

    body:has(.mobile-app-page) .content-area {
        height: calc(100dvh - 70px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important;
    }

    .mobile-bottom-nav {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 9999 !important;
        height: calc(76px + env(safe-area-inset-bottom)) !important;
        min-height: calc(76px + env(safe-area-inset-bottom)) !important;
        padding: 6px 6px max(8px, env(safe-area-inset-bottom)) !important;
        transform: translateZ(0) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-around !important;
        overflow: visible !important;
        background: #fffefb !important;
        border-top: 1px solid rgba(106,120,56,.18) !important;
        box-shadow: 0 -14px 30px rgba(85,107,47,.16) !important;
    }

    .mobile-bottom-nav::before {
        content: "" !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 5px !important;
        background: linear-gradient(90deg, var(--lpt-brick), var(--lpt-orange), var(--lpt-olive)) !important;
    }

    .mobile-bottom-nav a {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        max-width: 72px !important;
        height: 62px !important;
        padding: 5px 2px 2px !important;
        border-radius: 14px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
    }

    .mobile-bottom-nav a i {
        width: 30px !important;
        height: 30px !important;
        display: grid !important;
        place-items: center !important;
        border-radius: 11px !important;
    }

    .mobile-bottom-nav a span {
        font-size: .68rem !important;
        line-height: 1.05 !important;
        white-space: nowrap !important;
    }
}


/* V10.6.1 - Mobile dashboard cards show full text */
@media (max-width: 991.98px) {
    .mobile-app-page {
        height: auto !important;
        min-height: calc(100dvh - 70px - 96px - env(safe-area-inset-bottom)) !important;
        grid-template-rows: auto auto auto auto !important;
        overflow: visible !important;
    }

    .mobile-action-grid {
        height: auto !important;
        min-height: 0 !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-template-rows: none !important;
        grid-auto-rows: minmax(132px, auto) !important;
        align-items: stretch !important;
    }

    .mobile-action-card {
        min-height: 132px !important;
        height: auto !important;
        justify-content: flex-start !important;
    }

    .mobile-action-card b,
    .mobile-action-card span {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

@media (max-width: 420px) {
    .mobile-action-grid {
        grid-auto-rows: minmax(124px, auto) !important;
    }

    .mobile-action-card {
        min-height: 124px !important;
    }
}

/* V10.8 - Permission-aware mobile cards */
.mobile-no-permission {
    min-height: 190px;
    border-radius: 24px;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(165,59,36,.18);
    box-shadow: 0 14px 34px rgba(85,107,47,.08);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 22px;
    color: var(--lpt-olive-dark);
}
.mobile-no-permission i { font-size: 2rem; color: var(--lpt-brick); }
.mobile-no-permission b { display:block; font-size:1.05rem; margin-top:8px; }
.mobile-no-permission span { color:#776f65; font-weight:650; font-size:.86rem; }
