*{box-sizing:border-box}body{margin:0;background:#f3f5f7;color:#202832;font:16px Arial,sans-serif}.topbar{background:#173b2b;color:#fff;padding:16px 4%;display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap}.brand{font-weight:bold;font-size:20px}.brand a{color:#fff;text-decoration:none}.topbar a{color:#fff}.container{max-width:1100px;margin:28px auto;padding:0 18px}.footer{text-align:center;color:#667085;padding:25px}.login-card{max-width:420px;margin:8vh auto;background:#fff;padding:28px;border-radius:12px;box-shadow:0 5px 24px #0001}h1{margin-top:0}label{display:block;margin:14px 0 6px;font-weight:bold}input:not([type=checkbox]),select,textarea{width:100%;padding:11px;border:1px solid #cbd5df;border-radius:7px;font-size:16px}button,.button-link{display:inline-block;margin-top:18px;background:#176b45;color:#fff;border:0;border-radius:7px;padding:11px 18px;text-decoration:none;font-size:16px;cursor:pointer}.error{background:#ffe8e8;padding:10px;border-radius:6px;color:#8b1717}.notice{background:#e9f6ee;padding:10px;border-radius:6px}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.panel{background:#fff;border:1px solid #e1e6eb;border-radius:10px;padding:18px;margin:16px 0}.narrow{max-width:520px}.userline{font-size:14px}.staff-card{margin:18px 0}.staff-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.staff-heading h3{margin:0}.staff-heading small{font-weight:normal;color:#667085}.status-active{color:#137333;font-weight:bold}.status-off{color:#a12b2b;font-weight:bold}.inline-check{display:flex;align-items:center;gap:9px;font-weight:normal}.inline-check input,.permission-option input{width:auto}.permission-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:8px}.permission-option{display:flex;align-items:flex-start;gap:9px;border:1px solid #e2e7eb;padding:10px;border-radius:7px;margin:0;font-weight:normal}.permission-option small{display:block;color:#667085;margin-top:4px}


/* Shared application styling */
:root{--vm-primary:#176b49;--vm-primary-dark:#105238;--vm-border:#d9e0dc;--vm-muted:#66736c;--vm-bg:#f5f7f6}
*{box-sizing:border-box}
body{margin:0;background:var(--vm-bg);color:#202923;font-family:Arial,Helvetica,sans-serif;line-height:1.45}
a{color:var(--vm-primary)}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;background:#fff;border-bottom:1px solid var(--vm-border);padding:10px 22px;min-height:62px}
.brand{display:flex;align-items:center;gap:10px;font-size:20px;font-weight:700}.brand img{max-height:42px;max-width:150px;object-fit:contain}.brand a{text-decoration:none;color:var(--vm-primary)}
.userline{font-size:14px;color:var(--vm-muted)}
.container{width:min(100% - 28px,1280px);margin:22px auto}
.vm-footer{text-align:center;padding:16px 12px;color:var(--vm-muted);font-size:13px;border-top:1px solid var(--vm-border);margin-top:30px;background:#fff}
.vm-card{background:#fff;border:1px solid var(--vm-border);border-radius:9px;padding:18px;margin:14px 0}
.vm-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.vm-field label{display:block;font-weight:600;margin-bottom:5px}.vm-field input,.vm-field select,.vm-field textarea{width:100%;padding:9px;border:1px solid #bfc9c3;border-radius:5px;background:#fff}
.vm-btn,button[type=submit]{background:var(--vm-primary);color:#fff;border:0;border-radius:5px;padding:9px 15px;cursor:pointer;text-decoration:none;display:inline-block}.vm-btn:hover,button[type=submit]:hover{background:var(--vm-primary-dark)}
@media(max-width:600px){.topbar{padding:10px 14px}.container{width:min(100% - 18px,1280px)}}

/* Application-wide 20/80 two-column navigation layout */
.vm-app-body{min-height:100vh;display:flex;flex-direction:column}
.vm-app-layout{display:grid;grid-template-columns:minmax(190px,20%) minmax(0,80%);flex:1;min-height:calc(100vh - 62px)}
.vm-sidebar{background:#173b2b;color:#fff;padding:22px 12px;min-width:0}
.vm-sidebar-title{font-size:11px;letter-spacing:1.4px;font-weight:700;color:#b9d1c4;padding:0 12px 13px}
.vm-nav{display:flex;flex-direction:column;gap:5px}
.vm-nav-link{display:flex;align-items:center;gap:11px;padding:11px 12px;border-radius:7px;color:#eaf3ed;text-decoration:none;font-size:14px;font-weight:600;transition:background .15s ease}
.vm-nav-link:hover,.vm-nav-link.active{background:#2b6048;color:#fff}
.vm-nav-link.active{box-shadow:inset 3px 0 #a8d5b8}
.vm-nav-icon{width:20px;text-align:center;font-size:17px;opacity:.9}
.vm-content{width:100%;max-width:none;margin:0;padding:26px 30px;min-width:0;overflow-x:auto}
.vm-content>h1{font-size:25px;margin:0 0 18px;color:#20382c}
.vm-footer{margin-top:0}
@media(max-width:600px){
 .vm-app-layout{grid-template-columns:1fr;min-height:0}
 .vm-sidebar{padding:10px 12px}
 .vm-sidebar-title{padding-bottom:7px}
 .vm-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
 .vm-nav-link{padding:9px;font-size:13px}
 .vm-content{padding:18px 14px}
}
@media(min-width:601px) and (max-width:1050px){.vm-app-layout{grid-template-columns:22% 78%}.vm-content{padding:22px 18px}}

/* Keep the requested side-by-side navigation on desktop and tablet widths. */
@media(min-width:601px){
 .vm-app-layout{display:grid !important;grid-template-columns:minmax(190px,20%) minmax(0,80%) !important;align-items:stretch}
 .vm-sidebar{grid-column:1;grid-row:1}
 .vm-content{grid-column:2;grid-row:1}
}


/* Comfortable desktop sizing for the standard 1366x768 workspace.
   Scoped to the application content so invoice print sizing remains unchanged. */
@media screen and (min-width: 1051px) {
  .vm-content { font-size: 14px; line-height: 1.4; padding: 20px 22px; }
  .vm-content > h1 { font-size: 22px; margin-bottom: 14px; }
  .vm-content h2 { font-size: 18px; }
  .vm-content h3 { font-size: 16px; }
  .vm-content p { margin-top: 8px; margin-bottom: 8px; }
  .vm-content .panel, .vm-content .vm-card { padding: 14px; margin: 11px 0; }
  .vm-content label { font-size: 13px; margin: 9px 0 5px; }
  .vm-content input:not([type=checkbox]), .vm-content select, .vm-content textarea { font-size: 14px; padding: 8px; }
  .vm-content button, .vm-content .button-link, .vm-content .vm-btn { font-size: 14px; padding: 8px 13px; }
  .vm-content table { font-size: 13px; }
  .vm-content th, .vm-content td { padding: 6px 7px; }
  .vm-nav-link { font-size: 13px; padding: 9px 10px; }
}

/* Navigation submenu and clearly visible account controls */
.userline{color:#26352d !important;font-weight:600}
.userline a{color:#087443 !important;font-weight:700;text-decoration:underline;margin-left:4px}
.vm-nav-sublink{display:block;margin:0 0 5px 42px;padding:7px 10px;border-left:2px solid #86b99b;border-radius:0 5px 5px 0;color:#dcebe2;text-decoration:none;font-size:13px;font-weight:600}
.vm-nav-sublink:hover,.vm-nav-sublink.active{background:#2b6048;color:#fff}


/* Header account controls: keep identity, language and logout aligned. */
.topbar{flex-wrap:nowrap}
.userline{display:flex;align-items:center;justify-content:flex-end;gap:10px;white-space:nowrap;flex:0 0 auto;line-height:1.3}
.user-identity{display:inline-block}
.user-separator{color:#8a9690;font-weight:400}
.language-form{display:inline-flex;align-items:center;margin:0;padding:0}
.userline .language-form select{width:auto;min-width:88px;max-width:110px;margin:0;padding:5px 24px 5px 8px;font-size:13px;line-height:1.2;border:1px solid #cbd5df;border-radius:5px;background:#fff;color:#26352d}
.userline .logout-link{display:inline-block;margin:0;color:#087443 !important;font-weight:700;text-decoration:none;padding:5px 2px}
.userline .logout-link:hover{text-decoration:underline}
@media(max-width:760px){.topbar{flex-wrap:wrap;align-items:flex-start}.userline{width:100%;justify-content:flex-start;flex-wrap:wrap;gap:8px}}


/* Master Data lists follow the Recent Purchases table visual style. */
.master-list-card{background:#fff;border:1px solid #ddd;border-radius:8px;padding:18px;margin:16px 0}
.master-list-scroll{width:100%;overflow-x:auto}
.master-list-table{width:100%;border-collapse:collapse}
.master-list-table th,.master-list-table td{padding:8px;border-bottom:1px solid #ddd;text-align:left;vertical-align:middle;white-space:nowrap}
.master-list-table th{font-weight:700;background:#f8faf9}
.master-list-table tbody tr:hover{background:#f7faf8}
.master-list-table form{display:inline-block;margin:0 0 0 6px}
.master-list-table button{margin-top:0;padding:6px 10px;font-size:13px}
.master-data-grid{margin-top:14px}
.master-data-card{margin:0;min-height:150px;display:flex;flex-direction:column;align-items:flex-start}
.master-data-card h2{margin:0 0 8px}
.master-data-card p{flex:1}
.master-data-card .button-link{margin-top:8px}

/* Master Data pages: avoid a second top margin inside the main content area. */
.master-page{width:100%;max-width:none;margin:0;padding:0}
.master-page>h1{margin-top:0}


/* Keep Master Data page titles consistent with the Master Data Management page. */
.vm-content h1{font-size:22px;line-height:1.3;margin-top:0;margin-bottom:14px;color:#20382c}
/* Customer list uses the same card and table presentation as Recent Purchases. */
.master-customer-list{background:#fff;border:1px solid #ddd;border-radius:8px;padding:18px;margin:16px 0}
.master-customer-list h2{margin:0 0 12px;font-size:18px}
.master-customer-list .table-scroll{width:100%;overflow-x:auto}
.master-customer-list .purchase-table{width:100%;border-collapse:collapse}
.master-customer-list .purchase-table th,.master-customer-list .purchase-table td{padding:8px;border-bottom:1px solid #ddd;text-align:left;vertical-align:middle;white-space:nowrap}
.master-customer-list .purchase-table th{background:#f8faf9;font-weight:700}
.master-customer-list .purchase-table tbody tr:hover{background:#f7faf8}
.master-customer-list .purchase-table button{margin-top:0;padding:6px 10px;font-size:13px}
@media(max-width:700px){.master-customer-list .purchase-table{min-width:760px}}


/* Owner / Company Details: align content and heading hierarchy with Master Data Management. */
.vm-content .owner-details-page{width:100%;max-width:none;margin:0;padding:0}
.vm-content .owner-details-page>h1{font-size:22px;line-height:1.3;margin:0 0 14px;color:#20382c}
.vm-content h2{font-size:18px;line-height:1.35;margin:14px 0 10px;color:#20382c}


/* Compact POS navigation: narrow icon-and-label rail with a wide workspace. */
@media screen and (min-width: 761px) {
  .vm-app-layout { grid-template-columns: 78px minmax(0, 1fr) !important; }
  .vm-sidebar { padding: 12px 5px; }
  .vm-sidebar-title { display:none; }
  .vm-nav { gap: 5px; }
  .vm-nav-link { min-height: 62px; padding: 7px 3px; gap: 4px; flex-direction:column; justify-content:center; text-align:center; border-radius:7px; font-size:10px; line-height:1.15; white-space:normal; }
  .vm-nav-icon { width:auto; font-size:21px; line-height:1.1; }
  .vm-nav-label { display:block; max-width:70px; overflow-wrap:anywhere; }
  .vm-nav-link.active { box-shadow:inset 0 -3px #a8d5b8; }
  .vm-content { padding:18px 22px; }
}
@media screen and (min-width:601px) and (max-width:760px) {
  .vm-app-layout { grid-template-columns:68px minmax(0,1fr) !important; }
  .vm-sidebar { padding:10px 4px; }
  .vm-nav-link { flex-direction:column; gap:3px; padding:7px 2px; font-size:9px; text-align:center; }
  .vm-nav-icon { width:auto; font-size:19px; }
}

/* ================================================================
   POS UI SYSTEM — shared screen styles for all application modules
   Kept screen-only so invoice / quotation print layouts stay intact.
   ================================================================ */
@media screen {
  :root {
    --vm-primary: #176b49;
    --vm-primary-dark: #105238;
    --vm-primary-soft: #eaf5ef;
    --vm-ink: #20382c;
    --vm-muted: #68766f;
    --vm-border: #dce5df;
    --vm-surface: #ffffff;
    --vm-canvas: #f4f7f5;
    --vm-radius: 10px;
    --vm-shadow: 0 2px 9px rgba(24, 55, 39, .045);
  }

  body.vm-app-body { background: var(--vm-canvas); color: #25332b; }
  .vm-content { min-width: 0; overflow-x: hidden; }
  .vm-content > h1 { color: var(--vm-ink); letter-spacing: -.25px; }
  .vm-content h2 { color: var(--vm-ink); }
  .vm-content h3 { color: #30483a; }
  .vm-content p { color: #526159; }

  /* Shared cards, panels and page sections */
  .vm-content .panel,
  .vm-content .vm-card,
  .vm-content .master-list-card,
  .vm-content .master-customer-list,
  .vm-content .acc-card,
  .vm-content .sales-home-card,
  .vm-content .sales-panel,
  .vm-content .stock-panel {
    background: var(--vm-surface);
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius);
    box-shadow: var(--vm-shadow);
  }
  .vm-content .panel > h2:first-child,
  .vm-content .vm-card > h2:first-child,
  .vm-content .master-list-card > h2:first-child { margin-top: 0; }

  /* Forms: consistent compact controls without changing field names or logic */
  .vm-content form:not(.language-form) { min-width: 0; }
  .vm-content label { color: #34483c; font-weight: 600; }
  .vm-content input:not([type=checkbox]):not([type=radio]):not([type=file]),
  .vm-content select,
  .vm-content textarea {
    max-width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid #cbd7cf;
    border-radius: 6px;
    background: #fff;
    color: #24342a;
    font: inherit;
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
  }
  .vm-content input:focus,
  .vm-content select:focus,
  .vm-content textarea:focus {
    outline: none;
    border-color: #4b9870;
    box-shadow: 0 0 0 3px rgba(23, 107, 73, .11);
  }
  .vm-content input[type=checkbox],
  .vm-content input[type=radio] { accent-color: var(--vm-primary); }
  .vm-content input[type=file] { max-width: 100%; font-size: 13px; }

  /* Buttons and links */
  .vm-content button,
  .vm-content .button-link,
  .vm-content .vm-btn,
  .vm-content .sales-home-card a,
  .vm-content .stock-actions a {
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 600;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
  }
  .vm-content button:not(.danger):not(.secondary),
  .vm-content .button-link,
  .vm-content .vm-btn:not(.secondary),
  .vm-content .sales-home-card a,
  .vm-content .stock-actions a { background: var(--vm-primary); color: #fff; }
  .vm-content button:hover,
  .vm-content .button-link:hover,
  .vm-content .vm-btn:hover,
  .vm-content .sales-home-card a:hover { filter: brightness(.96); }
  .vm-content button:disabled { opacity: .6; cursor: not-allowed; }

  /* Tables: shared header, row rhythm, hover and horizontal overflow */
  .vm-content .table-scroll,
  .vm-content .table-wrap,
  .vm-content .acc-scroll,
  .vm-content .master-list-scroll,
  .vm-content .vm-table-wrap,
  .vm-content .stock-wrap > section > div[style*="overflow"] { max-width: 100%; overflow-x: auto; }
  .vm-content table:not(.sales-table):not(.invoice-table) {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    background: #fff;
    color: #2d3b33;
    font-size: 13px;
  }
  .vm-content table:not(.sales-table):not(.invoice-table) th {
    background: #f0f5f2;
    color: #30483a;
    font-weight: 700;
    white-space: nowrap;
    border-bottom: 1px solid #dbe5de;
  }
  .vm-content table:not(.sales-table):not(.invoice-table) td {
    border-bottom: 1px solid #edf1ee;
    vertical-align: middle;
  }
  .vm-content table:not(.sales-table):not(.invoice-table) tbody tr:hover { background: #f8fbf9; }
  .vm-content table:not(.sales-table):not(.invoice-table) td button,
  .vm-content table:not(.sales-table):not(.invoice-table) td .button-link { margin-top: 0; }

  /* Common messages */
  .vm-content .error, .vm-content .notice,
  .vm-content .stock-msg, .vm-content .acc-alert {
    border-radius: 7px;
    padding: 10px 13px;
    border: 1px solid transparent;
  }
  .vm-content .error { background: #fff0ef; color: #a12d26; border-color: #f4d1ce; }
  .vm-content .notice { background: #edf8f1; color: #17613e; border-color: #cfe8d8; }

  /* Bring legacy module wrappers into the same workspace width */
  .vm-content > .stock-wrap,
  .vm-content > .sales-home,
  .vm-content > .reports-wrap,
  .vm-content > .accounts-wrap,
  .vm-content > .master-page,
  .vm-content > .owner-details-page {
    width: 100%; max-width: none; margin: 0; padding: 0;
  }

  /* Compact, consistent data table action controls */
  .vm-content table form { margin-top: 0; }
  .vm-content table button { padding: 6px 9px; font-size: 12px; }
}

/* Owner dashboard */
.vm-dashboard { width: 100%; max-width: 1500px; margin: 0 auto; }
.vm-dashboard-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:18px; margin:0 0 17px; }
.vm-dashboard-heading h1 { margin:3px 0 4px; font-size:24px; color:var(--vm-ink); }
.vm-dashboard-heading p { margin:0; color:var(--vm-muted); font-size:13px; }
.vm-eyebrow { color:#6b7c72; font-size:11px; font-weight:700; letter-spacing:1.15px; text-transform:uppercase; }
.vm-dashboard-date { display:flex; align-items:center; gap:8px; color:#52645a; background:#fff; border:1px solid var(--vm-border); border-radius:20px; padding:7px 12px; font-size:12px; white-space:nowrap; }
.vm-live-dot { width:7px; height:7px; border-radius:50%; background:#2b9a61; box-shadow:0 0 0 3px #e3f4e9; }
.vm-kpi-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; margin-bottom:17px; }
.vm-kpi { min-width:0; background:#fff; border:1px solid var(--vm-border); border-radius:10px; padding:13px 14px 12px; box-shadow:var(--vm-shadow); position:relative; overflow:hidden; }
.vm-kpi:after { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--kpi-accent,#176b49); }
.vm-kpi-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:9px; }
.vm-kpi-icon { width:29px; height:29px; display:grid; place-items:center; border-radius:8px; background:var(--kpi-soft,#eaf5ef); color:var(--kpi-accent,#176b49); font-size:17px; font-weight:700; }
.vm-kpi-tag { color:#718077; background:#f4f7f5; border-radius:20px; padding:3px 7px; font-size:10px; }
.vm-kpi-label { color:#59685f; font-size:12px; font-weight:600; }
.vm-kpi-value { color:#20382c; font-size:clamp(18px,1.7vw,24px); line-height:1.25; font-weight:750; letter-spacing:-.45px; margin:4px 0 5px; overflow-wrap:anywhere; }
.vm-kpi-foot { color:#829087; font-size:10.5px; min-height:15px; }
.vm-kpi-foot a { color:var(--kpi-accent,#176b49); text-decoration:none; font-weight:700; }
.vm-kpi-sales { --kpi-accent:#1b7650; --kpi-soft:#e9f5ee; }
.vm-kpi-purchases { --kpi-accent:#3977ad; --kpi-soft:#eaf2fa; }
.vm-kpi-stock { --kpi-accent:#b7791f; --kpi-soft:#fff4df; }
.vm-kpi-receivable { --kpi-accent:#7654a8; --kpi-soft:#f2edfa; }
.vm-kpi-payable { --kpi-accent:#b45b48; --kpi-soft:#fbefec; }
.vm-quick-section { margin:0 0 16px; }
.vm-section-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; }
.vm-section-heading h2 { font-size:16px; margin:0 0 2px; color:#263d30; }
.vm-section-heading p { font-size:11px; margin:0; color:#7a887f; }
.vm-section-heading > a { color:var(--vm-primary); font-size:12px; font-weight:700; text-decoration:none; white-space:nowrap; }
.vm-quick-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.vm-quick-action { display:flex; align-items:center; gap:10px; min-width:0; background:#fff; border:1px solid var(--vm-border); border-radius:8px; padding:10px 12px; color:#30483a; text-decoration:none; font-size:12px; font-weight:700; box-shadow:var(--vm-shadow); transition:border-color .15s ease, transform .15s ease; }
.vm-quick-action:hover { border-color:#9dc6ad; transform:translateY(-1px); }
.vm-quick-icon { width:28px; height:28px; display:grid; place-items:center; flex:0 0 28px; border-radius:7px; background:#edf6f0; color:var(--vm-primary); font-size:17px; }
.vm-quick-arrow { margin-left:auto; color:#91a198; }
.vm-dashboard-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; margin-bottom:14px; }
.vm-data-card { min-width:0; background:#fff; border:1px solid var(--vm-border); border-radius:10px; padding:13px 14px; box-shadow:var(--vm-shadow); margin-bottom:13px; }
.vm-data-card .vm-section-heading { margin-bottom:9px; }
.vm-table-wrap { width:100%; overflow-x:auto; }
.vm-data-table { width:100%; border-collapse:collapse; font-size:11.5px; white-space:nowrap; }
.vm-data-table th { text-align:left; color:#637268; background:#f5f8f6; padding:8px 7px; font-size:10.5px; font-weight:700; border-bottom:1px solid #e4ebe6; }
.vm-data-table td { padding:8px 7px; border-bottom:1px solid #eef2ef; color:#46554c; }
.vm-data-table tbody tr:last-child td { border-bottom:0; }
.vm-data-table tbody tr:hover { background:#fafcfb; }
.vm-data-table .vm-align-right { text-align:right; font-variant-numeric:tabular-nums; }
.vm-table-primary { color:#176b49; font-weight:700; text-decoration:none; }
.vm-table-primary:hover { text-decoration:underline; }
.vm-subtext { display:block; color:#849188; font-size:10px; margin-top:2px; }
.vm-status { display:inline-block; border-radius:20px; padding:3px 7px; background:#eef2ef; color:#536158; font-size:10px; font-weight:700; }
.vm-status-paid,.vm-status-received { background:#e8f5ed; color:#216b43; }
.vm-status-partial,.vm-status-yet_to_receive { background:#fff4df; color:#986316; }
.vm-status-unpaid,.vm-status-cancelled { background:#fff0ee; color:#a34437; }
.vm-empty-cell { color:#87948c !important; text-align:center; padding:18px 8px !important; }
.vm-alert { border-radius:7px; padding:10px 12px; margin-bottom:13px; font-size:12px; }
.vm-alert-warning { background:#fff6e5; color:#805719; border:1px solid #f0dfb9; }

@media screen and (max-width:1200px) {
  .vm-kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media screen and (max-width:900px) {
  .vm-dashboard-columns { grid-template-columns:1fr; }
  .vm-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .vm-quick-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media screen and (max-width:760px) {
  .vm-dashboard-heading { align-items:flex-start; flex-direction:column; gap:8px; }
  .vm-dashboard-heading h1 { font-size:21px; }
  .vm-dashboard-date { align-self:flex-start; }
  .vm-content { padding:15px 12px !important; }
  .vm-content .panel, .vm-content .vm-card, .vm-content .master-list-card, .vm-content .acc-card { padding:12px; }
}
@media screen and (max-width:480px) {
  .vm-kpi-grid { grid-template-columns:1fr 1fr; gap:8px; }
  .vm-kpi { padding:11px 10px 10px; }
  .vm-kpi-value { font-size:17px; }
  .vm-kpi-label { font-size:11px; }
  .vm-quick-grid { grid-template-columns:1fr 1fr; gap:7px; }
  .vm-quick-action { padding:9px 8px; gap:7px; font-size:11px; }
  .vm-data-card { padding:10px; }
  .vm-section-heading h2 { font-size:14px; }
}

@media screen {
  /* Sales invoice workspace: preserve its spreadsheet-style item entry. */
  .vm-content .sales-wrap { width:100%; max-width:none; margin:0; padding:0; }
  .vm-content .sales-card { background:#fff; border:1px solid var(--vm-border); border-radius:10px; padding:15px; margin:13px 0; box-shadow:var(--vm-shadow); }
  .vm-content .sales-card h2 { margin:0 0 12px; font-size:17px; color:var(--vm-ink); }
  .vm-content .sales-grid { gap:10px; }
  .vm-content .sales-field label { color:#34483c; font-size:12px; margin-bottom:4px; }
  .vm-content .sales-field input,
  .vm-content .sales-field select,
  .vm-content .sales-field textarea { min-height:34px; padding:7px 9px; border:1px solid #cbd7cf; border-radius:6px; font-size:13px; }
  .vm-content .sales-table { min-width:760px; border-collapse:separate; border-spacing:0; }
  .vm-content .sales-table th { background:#edf4ef; color:#30483a; border:1px solid #d9e4dc; padding:7px; font-size:12px; }
  .vm-content .sales-table td { border:1px solid #e3eae5; padding:4px 5px; }
  .vm-content .sales-table input,
  .vm-content .sales-table select { min-height:29px; border:1px solid transparent; border-radius:4px; padding:4px 6px; font-size:12px; }
  .vm-content .sales-table input:focus,
  .vm-content .sales-table select:focus { border-color:#8dbba0; background:#fff; }
  .vm-content .sales-btn { padding:8px 12px; font-size:13px; font-weight:600; }
  .vm-content .sales-btn.secondary { background:#64736a; color:#fff; }
  .vm-content .sales-btn.danger { background:#a94438; color:#fff; }
  .vm-content .payment-summary .summary-cell { border:1px solid var(--vm-border); border-radius:7px; background:#f7faf8; }

  /* Purchase entry sheet and filters */
  .vm-content .purchase-wrap { width:100%; max-width:none; margin:0; padding:0; }
  .vm-content .purchase-sheet { min-width:760px; }
  .vm-content .purchase-sheet th { background:#edf4ef; color:#30483a; border-color:#d9e4dc; padding:7px; }
  .vm-content .purchase-sheet td { border-color:#e3eae5; }
  .vm-content .purchase-sheet input,
  .vm-content .purchase-sheet select { min-height:28px; font-size:12px; }
  .vm-content .purchase-filter-grid { gap:10px; }
  .vm-content .purchase-filter-grid label { font-size:12px; }

  /* Sales, purchases, reports and account section wrappers */
  .vm-content .acc-wrap { width:100%; max-width:none; margin:0; padding:0; }
  .vm-content .acc-card { padding:14px; margin:12px 0; }
  .vm-content .acc-table th { background:#edf4ef; color:#30483a; }
  .vm-content .acc-btn { background:var(--vm-primary); border-radius:6px; font-weight:600; }
}
@media screen and (max-width:760px) {
  .vm-content .sales-wrap, .vm-content .purchase-wrap, .vm-content .acc-wrap { padding:0; }
  .vm-content .sales-card { padding:11px; }
  .vm-content .sales-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .vm-content .payment-summary { grid-template-columns:1fr; }
  .vm-content .vm-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media screen and (max-width:480px) {
  .vm-content .sales-grid, .vm-content .vm-form-grid { grid-template-columns:1fr; }
}
