/* File Path: /20/acc6/public_assets/css/app.css */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');
:root{--bg:#edf3f7;--surface:#fff;--border:#d7e3ea;--text:#142033;--muted:#64748b;--primary:#009688;--dark:#00796b;--soft:#e6f7f6;--blue:#263f9a;--danger:#b91c1c;--shadow:0 14px 34px rgba(15,23,42,.08);--menu:0 26px 60px rgba(15,23,42,.22)}*{box-sizing:border-box}html{direction:rtl;overflow-x:hidden}body{margin:0;font-family:"Cairo","Segoe UI",Tahoma,Arial,sans-serif;background:radial-gradient(circle at 16% 0%,rgba(0,150,136,.07),transparent 28%),linear-gradient(180deg,#f7fbfd 0%,var(--bg) 100%);color:var(--text);font-size:14px;overflow-x:hidden}a{text-decoration:none}button,input,select{font-family:inherit}.login{min-height:100vh;display:grid;grid-template-columns:minmax(340px,430px) 1fr}.login-card{background:rgba(255,255,255,.96);padding:55px;display:flex;flex-direction:column;justify-content:center;box-shadow:18px 0 50px rgba(15,23,42,.10);z-index:2}.login-brand{display:flex;gap:14px;align-items:center;margin-bottom:35px}.login-logo{width:58px;height:58px;border-radius:18px;background:linear-gradient(135deg,var(--blue),#1e3a8a);color:#fff;display:grid;place-items:center;font-weight:900;font-size:20px}.login-brand h1{margin:0;font-size:29px}.login-brand span{color:var(--muted)}.login-card label{display:block;margin:14px 0 7px;font-weight:800}.login-card input{width:100%;height:46px;border:1px solid #cbd5e1;border-radius:14px;padding:0 14px;outline:none}.login-card button{width:100%;height:48px;margin-top:22px;border:0;border-radius:14px;background:linear-gradient(135deg,var(--blue),#1e3a8a);color:#fff;font-weight:900;cursor:pointer}.hero{background:radial-gradient(circle at 24% 24%,rgba(0,170,166,.18),transparent 30%),linear-gradient(135deg,#0f172a,#1e3a8a);color:#fff;padding:70px;display:flex;flex-direction:column;justify-content:center}.hero-badge{background:rgba(255,255,255,.12);padding:9px 16px;border-radius:999px;width:max-content;margin-bottom:25px}.hero h2{font-size:clamp(30px,4vw,46px);margin:0 0 20px;line-height:1.45}.hero p{font-size:17px;line-height:2;color:#dbeafe}.erp-header{min-height:74px;background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(246,251,252,.98));border-bottom:1px solid var(--border);padding:11px 18px;display:flex;align-items:flex-start;gap:10px;position:sticky;top:0;z-index:10000;box-shadow:0 10px 30px rgba(15,23,42,.07)}.erp-logo{background:linear-gradient(135deg,var(--primary),var(--dark));color:#fff;height:50px;min-width:92px;padding:0 22px;border-radius:16px;font-weight:900;font-size:19px;display:inline-flex;align-items:center;justify-content:center}.erp-nav{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}.erp-nav-item{position:relative;padding-bottom:18px;margin-bottom:-18px}.erp-nav-item::after{content:"";position:absolute;top:48px;right:0;width:100%;height:24px;background:transparent;z-index:10001}.erp-nav-btn{min-width:118px;height:50px;background:linear-gradient(180deg,#fff,#f8fbfd);border:1px solid var(--border);border-radius:16px;padding:0 16px;cursor:pointer;font-weight:900;color:#263244;box-shadow:0 7px 18px rgba(15,23,42,.06);display:inline-flex;align-items:center;justify-content:center;gap:9px}.erp-nav-item:hover .erp-nav-btn,.erp-nav-item:focus-within .erp-nav-btn,.erp-nav-item.is-open .erp-nav-btn{background:linear-gradient(135deg,#00aaa6,#008c88);color:#fff}.erp-dropdown{position:absolute;top:50px;right:0;width:290px;padding-top:12px;z-index:10002;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(8px);transition:opacity .14s ease,transform .14s ease,visibility .14s ease}.erp-dropdown::before{content:"";position:absolute;top:0;right:0;left:0;height:16px;background:transparent}.erp-nav-item:hover .erp-dropdown,.erp-nav-item:focus-within .erp-dropdown,.erp-nav-item.is-open .erp-dropdown,.erp-dropdown:hover{opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0)}.erp-dropdown-inner{background:linear-gradient(180deg,#effafa,#dceced);border:1px solid #b8d4d5;border-top:5px solid #00aaa6;border-radius:0 0 20px 20px;box-shadow:var(--menu);overflow:hidden;padding:8px}.erp-dropdown a{display:flex;align-items:center;justify-content:space-between;min-height:45px;color:#263244;padding:12px 16px;border-radius:13px;font-size:14px;font-weight:800}.erp-dropdown a:hover{background:linear-gradient(135deg,#00aaa6,#008c88);color:#fff}.erp-logout{margin-right:auto;background:#fff5f5;color:var(--danger);border:1px solid #fecaca;min-height:46px;padding:0 18px;border-radius:16px;font-weight:900;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap}.mobile-quick-links{display:none}.main{width:min(100%,1520px);margin:0 auto;padding:24px}.panel{background:rgba(255,255,255,.95);border-radius:22px;border:1px solid #dbe3ec;padding:24px;margin-bottom:18px;box-shadow:var(--shadow)}.table-panel{overflow-x:auto}.page-title{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}.page-title h2,.panel h2{margin:0 0 8px;font-size:clamp(20px,2vw,26px);font-weight:900}.page-title p,.panel p{margin:0;color:var(--muted);line-height:1.9}.count-pill{background:var(--soft);color:var(--dark);border:1px solid #b8e7e3;padding:9px 15px;border-radius:999px;font-weight:900;white-space:nowrap}.flash-success,.flash-error{padding:12px 16px;border-radius:14px;margin-bottom:14px;font-weight:800}.flash-success{background:#dcfce7;color:#166534;border:1px solid #bbf7d0}.flash-error{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}.hero-panel-dashboard{display:flex;justify-content:space-between;align-items:center;gap:18px}.dashboard-user{background:linear-gradient(135deg,#eef2ff,#e0f2fe);color:#1e3a8a;border:1px solid #c7d2fe;padding:12px 16px;border-radius:16px;font-weight:900;white-space:nowrap}.stats,.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.card{background:rgba(255,255,255,.96);border:1px solid #dbe3ec;border-radius:20px;padding:24px;min-height:108px;box-shadow:var(--shadow)}.card b{display:block;font-size:28px;margin-bottom:8px;color:var(--dark)}.account-form,.fiscal-form,.report-filter{display:grid;grid-template-columns:repeat(6,minmax(140px,1fr));gap:12px;align-items:end}.fiscal-form,.report-filter{grid-template-columns:repeat(5,minmax(150px,1fr))}.form-group label{display:block;margin-bottom:7px;font-weight:900;color:#334155;font-size:13px}.form-group input,.form-group select,.journal-lines-table input,.journal-lines-table select{width:100%;height:42px;border:1px solid #cbd5e1;border-radius:12px;padding:0 12px;background:#fff;outline:none;min-width:0}.check-row{display:flex;gap:12px;align-items:center;height:42px}.check-row label{display:flex;align-items:center;gap:6px;margin:0;white-space:nowrap}.save-btn{height:42px;border:0;border-radius:12px;background:linear-gradient(135deg,var(--primary),var(--dark));color:#fff;font-weight:900;cursor:pointer;padding:0 16px}.accounts-table,.journal-lines-table{width:100%;min-width:760px;border-collapse:separate;border-spacing:0;background:#fff;border-radius:16px;overflow:hidden;font-size:13px;border:1px solid #dbe3ec}.compact-table{min-width:680px}.accounts-table th,.journal-lines-table th{background:linear-gradient(135deg,var(--primary),var(--dark));color:#fff;padding:12px;text-align:right;white-space:nowrap;font-weight:900}.accounts-table td,.journal-lines-table td{padding:10px 12px;border-bottom:1px solid #e2e8f0;vertical-align:middle}.accounts-table tr:hover td{background:#f8fafc}.badge{display:inline-block;padding:5px 10px;border-radius:999px;font-size:12px;font-weight:900;white-space:nowrap}.badge-postable{background:#dcfce7;color:#166534}.badge-summary{background:#e0f2fe;color:#075985}.badge-off{background:#fee2e2;color:#991b1b}.code-cell{font-weight:900;color:#0f766e;direction:ltr;text-align:right}.actions-cell{white-space:nowrap}.mini-primary,.mini-danger{min-height:31px;border:0;border-radius:10px;font-weight:900;cursor:pointer;padding:5px 12px;margin:2px;display:inline-flex;align-items:center;justify-content:center}.mini-primary{background:#e0f2fe;color:#075985}.mini-danger{background:#fee2e2;color:#991b1b}.edit-row td{background:#f8fafc!important}.edit-grid{display:grid;grid-template-columns:repeat(6,minmax(140px,1fr));gap:10px;align-items:end;padding:12px;border:1px dashed #cbd5e1;border-radius:14px}.segmented-filter{grid-column:span 3;display:flex;flex-wrap:wrap;gap:8px}.segmented-filter a{background:#eef7f7;color:#0f766e;border:1px solid #c8e6e4;padding:10px 14px;border-radius:999px;font-weight:900}.segmented-filter a.active{background:linear-gradient(135deg,var(--primary),var(--dark));color:#fff}.summary-strip{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:14px}.summary-strip span{background:#f8fafc;border:1px solid #dbe3ec;border-radius:14px;padding:10px 14px;font-weight:800}.journal-form{display:grid;gap:16px}.journal-head-grid{display:grid;grid-template-columns:1.3fr 1.7fr 1fr 2fr;gap:12px;align-items:end}.journal-lines-wrap{width:100%;overflow-x:auto;border:1px solid #dbe3ec;border-radius:16px;background:#fff}.journal-lines-table{min-width:920px}.journal-lines-table tfoot th{background:#f8fafc;color:#0f172a;border-top:2px solid #dbe3ec}.line-no{text-align:center;font-weight:900;color:#0f766e}.amount-input{direction:ltr;text-align:left;font-weight:800}.journal-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}.text-danger{color:#b91c1c!important}.text-success{color:#166534!important}.ledger-list{display:grid;gap:14px}.ledger-card{background:#fff;border:1px solid #dbe3ec;border-radius:20px;padding:18px;box-shadow:var(--shadow)}.ledger-card header{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.financial-columns{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}@media(max-width:1200px){.stats,.grid,.financial-columns{grid-template-columns:repeat(2,1fr)}.account-form,.edit-grid,.fiscal-form,.journal-head-grid,.report-filter{grid-template-columns:repeat(2,minmax(0,1fr))}.segmented-filter{grid-column:1/-1}}@media(max-width:900px){.login{grid-template-columns:1fr}.hero{display:none}.erp-header{display:grid;grid-template-columns:92px 1fr auto;align-items:center;min-height:auto;padding:10px}.erp-logo{height:44px;min-width:80px;border-radius:14px;font-size:17px;padding:0 14px}.erp-nav{display:none}.erp-logout{margin:0;min-height:40px;padding:0 12px;border-radius:14px}.mobile-quick-links{display:flex;gap:8px;overflow-x:auto;padding:10px 12px;background:rgba(255,255,255,.95);border-bottom:1px solid #dbe3ec;position:sticky;top:64px;z-index:9998}.mobile-quick-links a{flex:0 0 auto;background:#e6f7f6;color:#00796b;border:1px solid #b8e7e3;border-radius:999px;padding:9px 12px;font-weight:900;font-size:13px}.main{padding:12px}.panel{padding:16px;border-radius:18px}.page-title{display:block}.count-pill{display:inline-flex;margin-top:10px}.account-form,.edit-grid,.fiscal-form,.journal-head-grid,.report-filter,.stats,.grid,.financial-columns{grid-template-columns:1fr}.hero-panel-dashboard{display:block}.dashboard-user{margin-top:14px;display:inline-flex}.journal-actions{justify-content:stretch}.journal-actions .save-btn,.journal-actions .mini-primary{width:100%}.accounts-table,.journal-lines-table{font-size:12px}}@media(max-width:520px){.login-card{padding:32px 22px}.card{padding:18px}.summary-strip span{width:100%}}


/* =========================================================
   [START] 09 - MASTER DATA + SALES
   ========================================================= */

.master-form,
.items-form,
.sales-form {
    display: grid;
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    gap: 12px;
    align-items: end;
    margin-top: 14px;
}

.master-search {
    margin-bottom: 14px;
}

.master-wide,
.sales-wide {
    grid-column: span 2;
}

.master-edit-grid {
    grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.sales-head-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr 2fr;
    gap: 12px;
    align-items: end;
}

.sales-lines {
    min-width: 1100px;
}

.sales-lines .line-total,
#salesInvoiceTotal,
#purchaseInvoiceTotal {
    direction: ltr;
    font-weight: 900;
    color: #0f766e;
}

@media (max-width: 1200px) {
    .master-form,
    .items-form,
    .master-edit-grid,
    .sales-form,
    .sales-head-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .master-wide,
    .sales-wide {
        grid-column: span 2;
    }
}

@media (max-width: 900px) {
    .master-form,
    .items-form,
    .master-edit-grid,
    .sales-form,
    .sales-head-grid {
        grid-template-columns: 1fr;
    }

    .master-wide,
    .sales-wide {
        grid-column: auto;
    }
}

/* =========================================================
   [END] 09 - MASTER DATA + SALES
   ========================================================= */


/* =========================================================
   [START] 10 - SECURITY
   ========================================================= */

.permission-box {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 12px;
    background: rgba(15, 23, 42, 0.035);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 18px;
    padding: 14px;
}

.permission-group {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    padding: 12px;
}

.permission-group strong {
    display: block;
    margin-bottom: 8px;
    color: #0f172a;
}

.permission-group label {
    display: block;
    margin: 7px 0;
    font-size: 13px;
    color: #334155;
}

.permission-box-edit {
    margin-top: 10px;
}

@media (max-width: 900px) {
    .permission-box {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   [END] 10 - SECURITY
   ========================================================= */


/* =========================================================
   [START] 11 - SYSTEM SETTINGS + EXPORT
   ========================================================= */

.system-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
    margin-top: 14px;
}

.system-wide {
    grid-column: span 2;
}

.system-form textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.65);
    border-radius: 14px;
    padding: 10px 12px;
    font-family: inherit;
    resize: vertical;
    background: #fff;
}

.mini-input {
    width: 100%;
    min-width: 80px;
    border: 1px solid rgba(148, 163, 184, 0.65);
    border-radius: 10px;
    padding: 7px 9px;
    font-family: inherit;
}

@media (max-width: 1000px) {
    .system-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .system-wide {
        grid-column: span 2;
    }
}

@media (max-width: 700px) {
    .system-form {
        grid-template-columns: 1fr;
    }

    .system-wide {
        grid-column: auto;
    }
}

/* =========================================================
   [END] 11 - SYSTEM SETTINGS + EXPORT
   ========================================================= */



/* =========================================================
   ACC6 Inventory Reports UX
   ========================================================= */
.inventory-actions-note {
    color: #64748b;
    font-weight: 800;
}




/* =========================================================
   ACC6 UI Permissions
   ========================================================= */
.acc6-ui-permission-hidden {
    display: none !important;
}

.acc6-form-no-permission {
    position: relative;
    border: 1px dashed #fecaca !important;
    background: linear-gradient(180deg, #fff, #fff7f7) !important;
}

.acc6-disabled-by-permission {
    opacity: .55 !important;
    cursor: not-allowed !important;
}

.permission-note {
    grid-column: 1 / -1;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #991b1b;
    font-weight: 900;
}

.permission-lock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 7px 12px;
    background: #fff1f2;
    color: #991b1b;
    font-weight: 900;
}




/* =========================================================
   ACC6 Auto Number UX
   ========================================================= */
.auto-code-field,
input.auto-code-field[readonly] {
    background: linear-gradient(135deg, #eefdfb, #f8fafc) !important;
    border-color: #80cbc4 !important;
    color: #00796b !important;
    font-weight: 900 !important;
    cursor: default !important;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-weight: 800;
}

/* =========================================================
   ACC6 WOW UI v060 - clean layout + real hamburger
   File Path: /20/acc6/public_assets/css/app.css
   ========================================================= */

:root {
    --bg: #eef7fb;
    --surface: #ffffff;
    --border: #d8e8f0;
    --text: #102033;
    --muted: #64748b;
    --primary: #0ea5e9;
    --dark: #00796b;
    --soft: #e7f8ff;
    --blue: #2563eb;
    --teal: #00a99d;
    --danger: #b91c1c;
    --shadow: 0 18px 48px rgba(15, 23, 42, .085);
    --menu: 0 34px 90px rgba(15, 23, 42, .24);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

body {
    background:
        radial-gradient(circle at 6% 4%, rgba(14, 165, 233, .16), transparent 30%),
        radial-gradient(circle at 94% 8%, rgba(0, 169, 157, .15), transparent 28%),
        linear-gradient(180deg, #f8fcff 0%, #eef7fb 48%, #f7fcff 100%) !important;
    color: var(--text);
}

.erp-header {
    min-height: 82px;
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid rgba(148, 188, 207, .45);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 50000;
    overflow: visible;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .075);
    backdrop-filter: blur(18px) saturate(1.35);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

.erp-logo {
    background:
        radial-gradient(circle at 24% 16%, rgba(255,255,255,.42), transparent 30%),
        linear-gradient(135deg, #0ea5e9 0%, #00a99d 58%, #00796b 100%);
    color: #fff;
    height: 56px;
    min-width: 108px;
    padding: 0 24px;
    border-radius: 22px;
    font-weight: 900;
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 18px 34px rgba(14, 165, 233, .18),
        0 14px 30px rgba(0, 150, 136, .18);
    position: relative;
    overflow: hidden;
}

.erp-logo::after {
    content: "";
    position: absolute;
    inset: -45% auto auto -20%;
    width: 88px;
    height: 170px;
    background: rgba(255,255,255,.18);
    transform: rotate(28deg);
}

.erp-mobile-toggle {
    display: none;
}

.erp-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
    overflow: visible;
}

.erp-nav-item {
    position: relative;
    padding-bottom: 12px;
    margin-bottom: -12px;
    overflow: visible;
    z-index: 50010;
}

.erp-nav-item::after {
    display: none;
}

.erp-nav-item:hover,
.erp-nav-item:focus-within,
.erp-nav-item.is-open {
    z-index: 50100;
}

.erp-nav-btn {
    min-width: 128px;
    height: 52px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(241,248,252,.96));
    border: 1px solid rgba(148, 188, 207, .70);
    border-radius: 20px;
    padding: 0 17px;
    cursor: pointer;
    font-weight: 900;
    color: #1e293b;
    box-shadow:
        0 10px 24px rgba(15,23,42,.06),
        inset 0 1px 0 rgba(255,255,255,.74);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

.erp-nav-btn:hover,
.erp-nav-item:focus-within .erp-nav-btn,
.erp-nav-item.is-open .erp-nav-btn {
    color: #fff;
    border-color: rgba(14, 165, 233, .36);
    background:
        radial-gradient(circle at 22% 18%, rgba(255,255,255,.28), transparent 32%),
        linear-gradient(135deg, #0ea5e9 0%, #00a99d 55%, #00796b 100%);
    box-shadow:
        0 17px 36px rgba(14,165,233,.17),
        0 14px 32px rgba(0,150,136,.16);
    transform: translateY(-2px);
}

.erp-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 330px;
    padding-top: 0;
    z-index: 51000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px) scale(.985);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.erp-nav-item:hover .erp-dropdown,
.erp-nav-item:focus-within .erp-dropdown,
.erp-nav-item.is-open .erp-dropdown,
.erp-dropdown:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.erp-dropdown-inner {
    background:
        radial-gradient(circle at 14% 10%, rgba(14,165,233,.13), transparent 32%),
        radial-gradient(circle at 88% 8%, rgba(0,169,157,.13), transparent 34%),
        rgba(255,255,255,.985);
    border: 1px solid rgba(125, 211, 252, .45);
    border-top: 4px solid #0ea5e9;
    border-radius: 24px;
    box-shadow: var(--menu);
    overflow: hidden;
    padding: 10px;
}

.erp-dropdown a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    color: #243147;
    padding: 11px 14px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 850;
    border: 1px solid transparent;
    transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}

.erp-dropdown a:hover,
.erp-dropdown a:focus {
    background: linear-gradient(135deg, #eff6ff, #e6fffb);
    border-color: rgba(14,165,233,.30);
    color: #075985;
    transform: translateX(-4px);
}

.erp-logout {
    margin-right: auto;
    background: linear-gradient(180deg, #fff7f7, #fff);
    color: var(--danger);
    border: 1px solid #fecaca;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 18px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-shadow: 0 12px 26px rgba(220,38,38,.08);
}

.mobile-quick-links {
    display: none !important;
}

.erp-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .38);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 49990;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}

.main {
    width: min(100%, 1520px);
    margin: 0 auto;
    padding: 26px;
}

.panel {
    background:
        radial-gradient(circle at 8% 12%, rgba(14,165,233,.060), transparent 26%),
        radial-gradient(circle at 88% 10%, rgba(0,169,157,.070), transparent 28%),
        rgba(255,255,255,.94);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(148, 188, 207, .44);
    padding: 26px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Dashboard */
.dashboard-hero {
    min-height: 260px;
    display: grid;
    grid-template-columns: 1fr 290px;
    gap: 24px;
    align-items: center;
    background:
        radial-gradient(circle at 14% 18%, rgba(14,165,233,.12), transparent 30%),
        radial-gradient(circle at 92% 10%, rgba(0,169,157,.12), transparent 32%),
        linear-gradient(135deg, rgba(255,255,255,.98), rgba(240,249,255,.92)) !important;
}

.dashboard-overline {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 9px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #eff6ff, #e6fffb);
    border: 1px solid rgba(14,165,233,.25);
    color: #075985;
    font-weight: 900;
    margin-bottom: 14px;
}

.dashboard-hero h2 {
    margin: 0 0 14px;
    font-size: clamp(31px, 4vw, 52px);
    font-weight: 900;
    color: #0b1f3a;
    letter-spacing: -.6px;
}

.dashboard-hero p {
    font-size: 16px;
    line-height: 2;
    color: #64748b;
}

.dashboard-period-card {
    border-radius: 24px;
    border: 1px solid rgba(14,165,233,.26);
    background: rgba(255,255,255,.82);
    box-shadow: 0 16px 38px rgba(14,165,233,.08);
    padding: 24px;
}

.dashboard-period-card span,
.dashboard-period-card small {
    display: block;
    color: #64748b;
    font-weight: 800;
}

.dashboard-period-card b {
    display: block;
    direction: ltr;
    color: #102033;
    font-size: 18px;
    margin: 12px 0;
}

.dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.dashboard-kpi-card {
    position: relative;
    min-height: 154px;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(125,211,252,.42);
    background:
        radial-gradient(circle at 12% 86%, rgba(14,165,233,.15), transparent 25%),
        radial-gradient(circle at 88% 10%, rgba(0,169,157,.11), transparent 28%),
        rgba(255,255,255,.94);
    box-shadow: 0 16px 38px rgba(15,23,42,.065);
    padding: 22px;
    color: #102033;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.dashboard-kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 52px rgba(14,165,233,.13);
    border-color: rgba(14,165,233,.45);
}

.dashboard-kpi-card::before {
    content: "";
    position: absolute;
    width: 108px;
    height: 108px;
    border-radius: 999px;
    right: -26px;
    bottom: -28px;
    background: linear-gradient(135deg, rgba(14,165,233,.16), rgba(0,169,157,.16));
}

.dashboard-kpi-card span {
    display: block;
    color: #64748b;
    font-weight: 900;
}

.dashboard-kpi-card b {
    display: block;
    direction: ltr;
    color: #075985;
    font-size: 28px;
    margin: 15px 0;
    font-weight: 900;
}

.dashboard-kpi-card small {
    display: block;
    color: #64748b;
    font-weight: 850;
}

.dashboard-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.dashboard-row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.dashboard-section-title h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
    color: #102033;
}

.dashboard-section-title span,
.dashboard-section-title a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 13px;
    border-radius: 999px;
    background: linear-gradient(135deg, #eff6ff, #e6fffb);
    border: 1px solid rgba(14,165,233,.25);
    color: #075985;
    font-weight: 900;
}

.dashboard-alerts-list,
.dashboard-actions-grid {
    display: grid;
    gap: 10px;
}

.dashboard-alert,
.dashboard-action {
    display: block;
    border-radius: 18px;
    border: 1px solid rgba(125,211,252,.32);
    background: rgba(255,255,255,.78);
    padding: 14px 16px;
    color: #102033;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(15,23,42,.04);
}

.dashboard-alert p {
    margin: 6px 0 0;
    color: #64748b;
    font-weight: 800;
}

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

.dashboard-alert-danger {
    border-color: #fecaca;
    background: #fff1f2;
}

.dashboard-alert-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

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

.dashboard-action {
    text-align: center;
    background: linear-gradient(135deg, #eff6ff, #e6fffb);
    color: #075985;
    border-color: rgba(14,165,233,.25);
}

.dashboard-mini-table {
    min-width: 0;
}

/* Tables/forms keep ERP usability */
.accounts-table,
.journal-lines-table {
    border-radius: 20px;
    border: 1px solid #d6e4ed;
    box-shadow: 0 16px 38px rgba(15,23,42,.055);
}

.accounts-table th,
.journal-lines-table th {
    background: linear-gradient(135deg, #0369a1, #00796b);
}

input:focus,
select:focus,
textarea:focus {
    outline: none !important;
    border-color: #7dd3fc !important;
    box-shadow: 0 0 0 4px rgba(14,165,233,.13) !important;
}

/* Mobile real hamburger */
@media (max-width: 900px) {
    body.acc6-mobile-menu-open {
        overflow: hidden;
    }

    .erp-header {
        min-height: 64px;
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas: "logout toggle logo";
        gap: 8px;
        padding: 9px 10px;
        align-items: center;
        overflow: visible;
    }

    .erp-logo {
        grid-area: logo;
        height: 44px;
        min-width: 76px;
        border-radius: 16px;
        padding: 0 14px;
        font-size: 15px;
    }

    .erp-logout {
        grid-area: logout;
        min-height: 40px;
        padding: 0 13px;
        border-radius: 15px;
        margin: 0;
        font-size: 13px;
    }

    .erp-mobile-toggle {
        grid-area: toggle;
        justify-self: center;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        height: 42px;
        min-width: 126px;
        border: 0;
        border-radius: 17px;
        color: #fff;
        font-weight: 900;
        cursor: pointer;
        background:
            radial-gradient(circle at 20% 18%, rgba(255,255,255,.24), transparent 32%),
            linear-gradient(135deg, #0ea5e9, #00a99d, #00796b);
        box-shadow: 0 14px 28px rgba(14,165,233,.17);
    }

    .erp-mobile-toggle-icon,
    .erp-mobile-toggle-icon::before,
    .erp-mobile-toggle-icon::after {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: #fff;
        transition: transform .18s ease, opacity .18s ease;
        content: "";
    }

    .erp-mobile-toggle-icon::before {
        transform: translateY(-6px);
    }

    .erp-mobile-toggle-icon::after {
        transform: translateY(4px);
    }

    .erp-mobile-toggle.is-active .erp-mobile-toggle-icon {
        transform: rotate(45deg);
    }

    .erp-mobile-toggle.is-active .erp-mobile-toggle-icon::before {
        opacity: 0;
    }

    .erp-mobile-toggle.is-active .erp-mobile-toggle-icon::after {
        transform: translateY(-2px) rotate(-90deg);
    }

    .erp-backdrop {
        display: block;
    }

    body.acc6-mobile-menu-open .erp-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .erp-nav {
        position: fixed;
        top: 78px;
        right: 10px;
        left: 10px;
        z-index: 50020;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        max-height: calc(100vh - 92px);
        overflow-y: auto;
        padding: 12px;
        border-radius: 24px;
        border: 1px solid rgba(125,211,252,.42);
        background:
            radial-gradient(circle at 10% 10%, rgba(14,165,233,.12), transparent 30%),
            radial-gradient(circle at 90% 12%, rgba(0,169,157,.13), transparent 32%),
            rgba(255,255,255,.985);
        box-shadow: 0 28px 80px rgba(15,23,42,.24);
        transform: translateY(-12px) scale(.98);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    }

    body.acc6-mobile-menu-open .erp-nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .erp-nav-item {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .erp-nav-btn {
        width: 100%;
        min-width: 0;
        height: 46px;
        border-radius: 16px;
        justify-content: space-between;
        transform: none !important;
    }

    .erp-dropdown {
        position: static;
        width: 100%;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        transition: max-height .22s ease;
    }

    .erp-nav-item.is-open .erp-dropdown {
        max-height: 420px;
        margin-top: 7px;
    }

    .erp-dropdown-inner {
        border-radius: 18px;
        border-top-width: 1px;
        padding: 8px;
        box-shadow: none;
        max-height: 380px;
        overflow-y: auto;
    }

    .erp-dropdown a {
        min-height: 40px;
        font-size: 12px;
    }

    .mobile-quick-links {
        display: none !important;
    }

    .main {
        padding: 12px 10px;
    }

    .panel {
        padding: 16px;
        border-radius: 22px;
        margin-bottom: 14px;
    }

    .dashboard-hero {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .dashboard-hero h2 {
        font-size: 28px;
    }

    .dashboard-period-card {
        padding: 18px;
    }

    .dashboard-kpis {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dashboard-kpi-card {
        min-height: 124px;
        padding: 18px;
    }

    .dashboard-row,
    .dashboard-row-3 {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .dashboard-actions-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .table-panel,
    .dashboard-mini-table {
        overflow-x: auto;
    }

    .accounts-table {
        min-width: 720px;
    }
}

@media (min-width: 901px) {
    .erp-backdrop {
        display: none !important;
    }
}

@media (max-width: 520px) {
    .erp-mobile-toggle {
        min-width: 108px;
        font-size: 12px;
    }

    .erp-logo {
        min-width: 68px;
    }

    .erp-logout {
        padding: 0 10px;
    }

    .dashboard-hero h2 {
        font-size: 24px;
    }
}
