/* ═══════════════════════════════════════════════════════════
   JECP Invoice Maker — style.css
   Palette: pdsingh.com — light blue family, Oxanium + Rajdhani
   Premium SaaS look · glassmorphism · smooth animations
═══════════════════════════════════════════════════════════ */

/* ── 1. DESIGN TOKENS ─────────────────────────────────── */
:root {
  /* Backgrounds — light blue family matching pdsingh.com */
  --bg:       #dff0fb;
  --surface:  #eef6fc;
  --surface2: #e4f1fa;
  --surface3: #d4e9f7;

  /* Borders */
  --border:   rgba(0, 119, 170, .13);
  --border2:  rgba(0, 119, 170, .25);

  /* Text */
  --ink:      #0d1e35;
  --ink2:     #2a4a6a;
  --ink3:     #4a7090;

  /* Accents */
  --accent:   #0077aa;
  --accent-h: #005f8a;
  --accent2:  rgba(0, 119, 170, .10);

  --amber:    #cc4400;
  --amber2:   rgba(204, 68, 0, .10);

  --purple:   #7711bb;
  --red:      #cc0044;
  --red2:     rgba(204, 0, 68, .10);

  --green:    #007744;
  --green2:   rgba(0, 119, 68, .10);

  /* Layout */
  --r:        8px;
  --r-sm:     5px;
  --shadow:   0 2px 14px rgba(0, 80, 140, .10), 0 0 0 1px var(--border);

  /* Typography */
  --sans:  'Rajdhani', sans-serif;
  --serif: 'Oxanium', monospace;
  --mono:  'DM Mono', 'Courier New', monospace;
}

/* ── 2. RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
button { font-family: var(--sans); cursor: pointer; }
input, select, textarea {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
}
code {
  background: var(--surface3);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--amber);
}

/* ── 3. UTILITIES ──────────────────────────────────────── */
.hidden   { display: none !important; }
.mono     { font-family: var(--mono) !important; }
.r        { text-align: right; }
.req      { color: var(--red); font-weight: 700; }
.opt      { font-weight: 400; font-size: 11px; color: var(--ink3);
            text-transform: none; letter-spacing: 0; }

/* ── 4. AUTH / PENDING SCREENS ─────────────────────────── */
#screen-auth,
#screen-pending {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 65% 55% at 10% 15%, rgba(0, 119, 170, .09) 0%, transparent 60%),
    radial-gradient(ellipse 50% 45% at 90% 55%, rgba(119, 17, 187, .06) 0%, transparent 60%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 40px 36px;
  box-shadow: 0 4px 32px rgba(0, 80, 140, .12), 0 0 0 1px var(--border);
  backdrop-filter: blur(12px);
  animation: fadeUp .4s ease;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 18px; font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.logo-mark.sm { width: 28px; height: 28px; font-size: 14px; border-radius: 7px; }

.logo-text {
  font-family: var(--serif);
  font-size: 16px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-title {
  font-family: var(--serif);
  font-size: 26px; font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
  margin-bottom: 6px;
}
.auth-sub  { font-size: 13px; color: var(--ink3); margin-bottom: 26px; line-height: 1.6; }
.auth-err  {
  background: var(--red2); border: 1px solid var(--red); color: var(--red);
  padding: 10px 14px; border-radius: var(--r-sm);
  font-size: 13px; margin-bottom: 16px; line-height: 1.5;
}
.auth-hint { margin-top: 14px; font-size: 11px; color: var(--ink3); text-align: center; line-height: 1.5; }

/* ── 5. DASHBOARD SHELL ────────────────────────────────── */
#screen-dash { display: flex; min-height: 100vh; }

/* ── 6. LEVEL-1 SIDEBAR — Icon Rail ────────────────────── */
#sidebar-primary {
  width: 60px;
  background: rgba(212, 233, 247, .98);
  border-right: 1px solid var(--border2);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 4px;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 200;
  backdrop-filter: blur(8px);
}
#sidebar-primary .brand-mark { margin-bottom: 14px; }

.p1-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--ink3);
  font-size: 18px;
  cursor: pointer;
  position: relative;
  transition: all .15s;
}
.p1-btn:hover { background: var(--surface3); color: var(--ink); }
.p1-btn.active { background: var(--accent2); color: var(--accent); }

.p1-btn .tip {
  position: absolute;
  left: 54px; top: 50%;
  transform: translateY(-50%);
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--ink);
  font-size: 11px;
  font-family: var(--sans); font-weight: 600;
  padding: 5px 10px;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 999;
  box-shadow: var(--shadow);
}
.p1-btn:hover .tip { opacity: 1; }

.sidebar-footer-p1 {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
}

.user-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent2);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  color: var(--accent);
  cursor: default;
  font-family: var(--serif);
  transition: box-shadow .2s;
}
.user-dot:hover { box-shadow: 0 0 0 3px rgba(0,119,170,.25); }

/* ── 7. LEVEL-2 SIDEBAR — Folder Nav ───────────────────── */
#sidebar-service {
  width: 200px;
  background: rgba(238, 246, 252, .98);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 60px;
  height: 100vh;
  overflow-y: auto;
  z-index: 190;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(8px);
}

.svc-panel { display: flex; flex-direction: column; }

.service-header {
  padding: 22px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.service-title {
  font-family: var(--serif);
  font-size: 9px; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--ink3);
}

.service-nav {
  padding: 10px 8px;
  display: flex; flex-direction: column;
  gap: 2px; flex: 1;
}

.snav-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--ink2);
  font-size: 13px;
  font-family: var(--sans); font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  width: 100%; text-align: left;
  transition: all .12s;
}
.snav-btn:hover { background: var(--surface3); color: var(--ink); }
.snav-btn.active {
  background: var(--accent2);
  color: var(--accent);
  border-left: 2px solid var(--accent);
  padding-left: 8px;
}

.snav-badge {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  background: var(--surface3);
  color: var(--ink3);
  padding: 1px 6px;
  border-radius: 99px;
}
.snav-btn.active .snav-badge { background: rgba(0,119,170,.2); color: var(--accent); }

/* ── 8. MAIN CONTENT ───────────────────────────────────── */
#main-content {
  flex: 1;
  margin-left: 260px;
  padding: 32px 36px 80px;
  min-width: 0;
  min-height: 100vh;
  background: var(--bg);
  overflow-y: auto;
  height: 100vh;
}

/* ── 9. FOLDER PANELS ──────────────────────────────────── */
.folder-panel { display: none; animation: fadeUp .22s ease; }
.folder-panel.active { display: block; }

.folder-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.folder-bc {
  font-size: 11px; color: var(--ink3);
  font-family: var(--mono);
  margin-bottom: 5px; letter-spacing: .05em;
}
.folder-bc .sep { margin: 0 5px; color: var(--accent); font-weight: 700; }

.folder-title {
  font-family: var(--serif);
  font-size: 24px; font-weight: 700;
  color: var(--ink); letter-spacing: -.01em;
}
.folder-sub {
  font-size: 13px; color: var(--ink2);
  margin-top: 4px; max-width: 520px; line-height: 1.6;
}
.header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.quota-chip {
  font-family: var(--mono);
  font-size: 11px; color: var(--ink3);
  background: var(--surface3);
  border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 99px;
}

/* ── 10. CONTENT GRIDS ─────────────────────────────────── */
.c-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.c-grid .span-2 { grid-column: 1 / -1; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

/* ── 11. CARDS ─────────────────────────────────────────── */
.card {
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(0, 80, 140, .07);
  backdrop-filter: blur(6px);
  transition: box-shadow .2s;
}
.card:hover { box-shadow: 0 4px 18px rgba(0, 80, 140, .10); }

.card-top {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-title {
  font-family: var(--sans);
  font-size: 11px; font-weight: 700;
  letter-spacing: .10em; text-transform: uppercase;
  color: var(--ink3);
}
.card-hint { font-size: 12px; color: var(--ink3); margin-bottom: 14px; line-height: 1.6; }

/* ── 12. FORM CONTROLS ─────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink2); font-family: var(--sans);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="url"],
input[type="color"],
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  appearance: none; -webkit-appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--ink3); opacity: .7; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 119, 170, .12);
  background: #fff;
}
textarea { resize: vertical; line-height: 1.6; }
input[type="color"] { height: 38px; padding: 4px 6px; cursor: pointer; }

.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }

/* Line item add row */
.line-add-row {
  display: flex; gap: 10px;
  align-items: flex-end; flex-wrap: wrap;
  margin-bottom: 14px;
}
.line-add-row .field { margin-bottom: 0; }
.f-grow  { flex: 3; min-width: 160px; }
.f-80    { flex: 0 0 80px; }
.f-110   { flex: 0 0 110px; }
.f-auto  { flex: 0 0 auto; }

/* ── 13. BUTTONS ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: none; border-radius: var(--r-sm);
  font-family: var(--sans);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap; flex-shrink: 0;
  letter-spacing: .02em;
}
.btn:active { transform: scale(.97); }
.btn-full { width: 100%; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); box-shadow: 0 3px 14px rgba(0,119,170,.3); }

.btn-accent { background: var(--ink); color: #fff; padding: 10px 20px; }
.btn-accent:hover { background: var(--accent); box-shadow: 0 3px 14px rgba(0,119,170,.3); }

.btn-ghost {
  background: transparent; color: var(--ink2);
  border: 1px solid var(--border2);
}
.btn-ghost:hover { background: var(--surface3); color: var(--ink); }

.btn-danger {
  background: var(--red2); color: var(--red);
  border: none; padding: 4px 10px;
  font-size: 12px; border-radius: 4px;
}
.btn-danger:hover { background: rgba(204, 0, 68, .2); }

.btn-add {
  font-size: 11px; padding: 5px 10px;
  background: var(--amber2); color: var(--amber);
  border: 1px solid var(--amber);
  border-radius: var(--r-sm);
  font-family: var(--sans); font-weight: 700;
  cursor: pointer; transition: all .12s; white-space: nowrap;
}
.btn-add:hover { background: rgba(204, 68, 0, .2); }

.btn-approve {
  background: var(--green2); color: var(--green);
  border: 1px solid var(--green);
  padding: 4px 10px; font-size: 12px; border-radius: 4px;
}
.btn-approve:hover { background: rgba(0,119,68,.2); }

.btn-sm { padding: 5px 10px !important; font-size: 11px !important; }

.btn .spin {
  display: inline-block;
  width: 13px; height: 13px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

/* ── 14. LOGO UPLOAD ───────────────────────────────────── */
.logo-upload-area {
  border: 2px dashed var(--border2);
  border-radius: var(--r);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  min-height: 100px;
  display: flex; align-items: center; justify-content: center;
}
.logo-upload-area:hover {
  border-color: var(--accent);
  background: var(--accent2);
}

/* ── 15. CUSTOM FIELDS ─────────────────────────────────── */
.custom-fields-list {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 10px;
}
.cf-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 12px;
}
.cf-label {
  font-weight: 700; color: var(--ink);
  min-width: 110px; font-size: 12px; flex-shrink: 0;
}
.cf-value {
  flex: 1; background: transparent;
  border: none; outline: none;
  font-family: var(--mono);
  font-size: 11px; color: var(--amber); cursor: text;
}
.cf-pdf-tag {
  font-size: 9px; background: var(--accent2);
  color: var(--accent);
  padding: 2px 5px; border-radius: 3px;
  flex-shrink: 0; font-weight: 700; letter-spacing: .05em;
}
.cf-empty {
  font-size: 12px; color: var(--ink3);
  font-style: italic; padding: 8px 2px;
}

/* ── 16. RECORD LISTS ──────────────────────────────────── */
.record-list { display: flex; flex-direction: column; gap: 8px; }
.record-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, .85);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  animation: fadeUp .18s ease;
  transition: box-shadow .15s, transform .15s;
}
.record-row:hover { box-shadow: 0 3px 12px rgba(0,80,140,.1); transform: translateY(-1px); }
.record-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--accent2);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.record-name { font-weight: 600; color: var(--ink); font-size: 14px; }
.record-meta { font-size: 11px; color: var(--ink3); font-family: var(--mono); margin-top: 2px; }
.record-actions { margin-left: auto; display: flex; gap: 6px; }
.list-empty {
  text-align: center; padding: 48px 20px;
  color: var(--ink3); font-size: 13px; font-style: italic;
  background: rgba(255, 255, 255, .6);
  border: 1px dashed var(--border2);
  border-radius: var(--r);
}

/* ── 17. INVOICE TABLE ─────────────────────────────────── */
.inv-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px; margin-top: 6px;
}
.inv-table th {
  font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink3);
  padding: 8px 10px;
  background: var(--surface3);
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.inv-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}
.inv-table tr:last-child td { border-bottom: none; }
.inv-table .num {
  font-family: var(--mono); font-size: 12px;
  text-align: right; color: var(--amber); font-weight: 500;
}
.inv-table .inv-empty td {
  text-align: center; padding: 28px;
  color: var(--ink3); font-size: 12px; font-style: italic;
}

/* ── 18. INVOICE TOTALS ────────────────────────────────── */
.inv-totals {
  margin-top: 16px; margin-left: auto; width: 264px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: rgba(255, 255, 255, .7);
}
.tot-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--ink2);
}
.tot-row:last-child { border-bottom: none; }
.tot-row.grand {
  background: var(--accent2); color: var(--accent);
  font-weight: 700; font-size: 15px; padding: 10px 14px;
}

/* ── 19. TEMPLATE BLOCK DESIGNER ───────────────────────── */
.block-list { display: flex; flex-direction: column; gap: 8px; }
.block-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  transition: background .12s;
}
.block-row:hover { background: rgba(255,255,255,.7); }
.block-drag { cursor: grab; color: var(--ink3); font-size: 12px; opacity: .5; }
.block-name { flex: 1; font-weight: 600; color: var(--ink); font-size: 13px; }
.block-hint { font-size: 11px; color: var(--ink3); }
.check-label {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 13px;
  color: var(--ink2); font-weight: 500;
}
.check-label input { accent-color: var(--accent); width: 15px; height: 15px; }

/* ── 20. MODAL ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 20, 50, .45);
  backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000;
}
.modal {
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--border2);
  border-radius: 12px; width: 420px;
  box-shadow: 0 24px 60px rgba(0, 80, 140, .2);
  animation: fadeUp .2s ease;
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  font-weight: 700; color: var(--ink);
  font-size: 14px; font-family: var(--serif);
  letter-spacing: .02em;
}
.modal-close {
  background: none; border: none; color: var(--ink3);
  font-size: 15px; cursor: pointer;
  padding: 4px 8px; border-radius: 4px; transition: all .12s;
}
.modal-close:hover { background: var(--surface3); color: var(--red); }
.modal-body { padding: 18px 20px; }
.modal-hint { font-size: 12px; color: var(--ink3); margin-bottom: 16px; line-height: 1.6; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

/* ── 21. TOAST NOTIFICATIONS ───────────────────────────── */
#toast-root {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9999; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  border-radius: var(--r);
  font-size: 13px; font-family: var(--sans); font-weight: 600;
  box-shadow: 0 4px 24px rgba(0, 60, 120, .18);
  animation: toastIn .22s ease forwards;
  pointer-events: all;
  min-width: 220px; max-width: 340px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--border2); color: var(--ink);
}
.toast.ok  { background: rgba(0, 119, 170, .10); border-color: var(--accent); color: var(--accent); }
.toast.err { background: var(--red2); border-color: var(--red); color: var(--red); }
.toast.out { animation: toastOut .2s ease forwards; }

/* ── 22. PDF RENDER ZONE ───────────────────────────────── */
#pdf-render-zone {
  position: fixed;
  top: -9999px; left: -9999px;
  width: 794px;
  background: #ffffff;
  color: #1a2020;
  font-family: 'Rajdhani', sans-serif;
  padding: 40px 48px;
  z-index: -1;
}

/* ── 23. ANIMATIONS ────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(6px); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 24. RESPONSIVE ────────────────────────────────────── */
@media (max-width: 900px) {
  #sidebar-service { display: none; }
  #main-content { margin-left: 60px; padding: 20px 16px 60px; }
  .c-grid { grid-template-columns: 1fr; }
  .c-grid .span-2 { grid-column: span 1; }
  .form-grid-3 { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: span 1; }
}
@media (max-width: 600px) {
  #sidebar-primary {
    width: 100%; height: 52px;
    flex-direction: row;
    position: relative;
    padding: 0 10px; gap: 2px;
  }
  #sidebar-primary .brand-mark { margin-bottom: 0; margin-right: 6px; }
  .sidebar-footer-p1 { flex-direction: row; margin-top: 0; margin-left: auto; padding-bottom: 0; }
  #screen-dash { flex-direction: column; }
  #main-content { margin-left: 0; padding: 16px 12px 60px; height: auto; }
  .line-add-row { flex-direction: column; }
  .line-add-row .field { width: 100% !important; flex: unset !important; }
  .inv-totals { width: 100%; }
  .folder-header { flex-direction: column; align-items: flex-start; }
  .header-right { margin-top: 10px; }
  .modal { width: calc(100vw - 32px); }
  .c-grid { grid-template-columns: 1fr; }
}