:root {
  /* Velzon Minimal - Clean & Premium Color Palette */
  --green: #0a3e30;         /* Primary brand deep emerald */
  --green-rgb: 10, 62, 48;
  --green-600: #0f5132;
  --green-300: #198754;
  --gold: #f7b84b;          /* Velzon warning yellow/gold */
  --gold-rgb: 247, 184, 75;
  --gold-dark: #dca034;
  --ink: #212529;           /* Slate dark text */
  --muted: #878a99;         /* Velzon grey description text */
  --line: #e9ebec;          /* Velzon fine border line */
  --bg: #f3f3f9;            /* Velzon body background */
  --white: #ffffff;
  
  /* Status Colors */
  --danger: #f06548;        /* Velzon orange/red danger */
  --danger-rgb: 240, 101, 72;
  --warning: #f7b84b;       /* Velzon gold warning */
  --warning-rgb: 247, 184, 75;
  --info: #299cdb;          /* Velzon sky blue info */
  --info-rgb: 41, 156, 219;
  --success: #0ab39c;       /* Velzon teal success */
  --success-rgb: 10, 179, 156;
  
  /* UI Tokens */
  --radius: 8px;            /* Standard Velzon border-radius */
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(56, 65, 74, 0.15); /* Velzon fine card shadow */
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.05);      /* Medium shadow */
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.material-icons-round {
  font-size: 19px;
  vertical-align: middle;
  line-height: 1;
}

/* ---------------- Layout & Sidebar ---------------- */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  flex: 0 0 250px;
  background: #0b1a16; /* Sophisticated dark green-black */
  color: #abb9b3;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
  z-index: 30;
  transition: all 0.25s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  height: 70px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  background: #fff;
  padding: 2px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 14.5px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.brand-text span {
  font-size: 9.5px;
  color: var(--gold);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
}

.nav::-webkit-scrollbar {
  width: 5px;
}

.nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.nav-group {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #5b716a;
  margin: 18px 12px 8px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  color: #abb9b3;
  font-weight: 500;
  margin-bottom: 3px;
  transition: all 0.2s ease;
  font-size: 13px;
}

.nav-item .material-icons-round {
  font-size: 18px;
  color: #637a71;
  transition: color 0.2s;
}

.nav-item:hover {
  color: #fff;
}

.nav-item:hover .material-icons-round {
  color: #fff;
}

.nav-item.active {
  background: rgba(247, 184, 75, 0.1); /* Subtle gold tint */
  color: #fff;
  font-weight: 600;
}

.nav-item.active .material-icons-round {
  color: var(--gold) !important;
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 10px;
  color: #51645e;
  font-style: normal;
  text-align: center;
  letter-spacing: 0.3px;
}

/* ---------------- Topbar ---------------- */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 70px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--green);
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.clock {
  font-variant-numeric: tabular-nums;
  color: var(--green-600);
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(10, 62, 48, 0.06);
  padding: 5px 14px;
  border-radius: 30px;
}

.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.2s;
}

.icon-btn:hover {
  background: #f3f3f9;
  color: var(--ink);
}

.menu-toggle {
  display: none;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11.5px;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-meta strong {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.user-meta span {
  font-size: 10.5px;
  color: var(--muted);
}

/* ---------------- Notifications Panel ---------------- */
.notif {
  position: relative;
}

.badge {
  position: absolute;
  top: 1px;
  right: 1px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1.5px solid #fff;
}

.notif-panel {
  position: absolute;
  right: 0;
  top: 48px;
  width: 320px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: none;
  animation: pop 0.16s ease-out;
}

.notif-panel.open {
  display: block;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8f9fa;
}

.notif-head strong {
  font-size: 13px;
  color: var(--ink);
}

.link-btn {
  background: none;
  border: none;
  color: var(--success);
  font-weight: 600;
  cursor: pointer;
  font-size: 11.5px;
}

.notif-list {
  max-height: 280px;
  overflow-y: auto;
}

.notif-row {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}

.notif-row:hover {
  background: #f8f9fa;
}

.notif-row.unread {
  background: rgba(10, 179, 156, 0.03);
}

.notif-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 6px;
  flex: 0 0 7px;
}

.dot-info { background: var(--info); }
.dot-success { background: var(--success); }
.dot-warning { background: var(--warning); }
.dot-danger { background: var(--danger); }

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-body strong {
  font-size: 12.5px;
  display: block;
  font-weight: 600;
}

.notif-body p {
  margin: 1px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

.notif-body .ago {
  font-size: 10px;
  color: #adb5bd;
}

.notif-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.notif-foot {
  display: block;
  text-align: center;
  padding: 10px;
  color: var(--green);
  font-weight: 600;
  font-size: 12px;
  background: #f8f9fa;
  border-top: 1px solid var(--line);
}

/* ---------------- Alert Banner Messages ---------------- */
.messages {
  padding: 16px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 12.5px;
  border: 1px solid transparent;
}

.alert-success {
  background: rgba(10, 179, 156, 0.1);
  color: #056a5c;
  border-color: rgba(10, 179, 156, 0.2);
}

.alert-error, .alert-danger {
  background: rgba(240, 101, 72, 0.1);
  color: #921c04;
  border-color: rgba(240, 101, 72, 0.2);
}

.alert-warning {
  background: rgba(247, 184, 75, 0.1);
  color: #8c5b05;
  border-color: rgba(247, 184, 75, 0.2);
}

.alert-info {
  background: rgba(41, 156, 219, 0.1);
  color: #0b5983;
  border-color: rgba(41, 156, 219, 0.2);
}

/* ---------------- Content & Typography ---------------- */
.content {
  padding: 24px;
  flex: 1;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-head h1 {
  margin: 0;
  font-size: 20px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.3px;
}

.page-head .sub {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 2px;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  background: #f3f3f9;
  color: var(--ink);
}

.btn:hover {
  background: #e9ebec;
}

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 2px 4px rgba(10, 62, 48, 0.15);
}

.btn-primary:hover {
  background: var(--green-600);
  box-shadow: 0 4px 8px rgba(10, 62, 48, 0.25);
}

.btn-gold {
  background: var(--gold);
  color: #fff;
}

.btn-gold:hover {
  background: var(--gold-dark);
}

.btn-outline {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.btn-outline:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

.btn-danger {
  background: rgba(240, 101, 72, 0.1);
  color: var(--danger);
  border-color: rgba(240, 101, 72, 0.15);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11.5px;
  border-radius: 4px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ---------------- Cards ---------------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.card-pad {
  padding: 20px;
}

.grid {
  display: grid;
  gap: 20px;
}

/* ---------------- Velzon Minimal Stats Cards ---------------- */
.stats {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 24px;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-ic {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Velzon transparent circles with solid icons */
.stat:nth-child(1) .stat-ic { background: rgba(10, 62, 48, 0.08) !important; color: var(--green) !important; }
.stat:nth-child(2) .stat-ic { background: rgba(10, 179, 156, 0.08) !important; color: var(--success) !important; }
.stat:nth-child(3) .stat-ic { background: rgba(247, 184, 75, 0.08) !important; color: var(--gold-dark) !important; }
.stat:nth-child(4) .stat-ic { background: rgba(41, 156, 219, 0.08) !important; color: var(--info) !important; }

.stat-ic .material-icons-round {
  font-size: 22px;
  color: inherit;
}

.stat-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-meta .l {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  font-weight: 600;
  order: 1; /* Puts label on top */
}

.stat-meta .v {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  order: 2; /* Puts value below label */
}

/* ---------------- Doc Type Quick Create Grid ---------------- */
.doc-cards {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.doc-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doc-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.doc-card .dc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.doc-card .dc-ic {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.doc-card .dc-count {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.doc-card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.doc-card .dc-cat {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.doc-card .dc-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* ---------------- Tables (Velzon Light Minimal Style) ---------------- */
.table-wrap {
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.data th {
  text-align: left;
  padding: 12px 16px;
  background: #f8f9fa;
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

table.data th:first-child { border-top-left-radius: 0; }
table.data th:last-child { border-top-right-radius: 0; }

table.data td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.data tbody tr {
  transition: background 0.15s;
}

table.data tbody tr:hover {
  background: #fdfdfd;
}

table.data tbody tr:last-child td {
  border-bottom: none;
}

.mono {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ---------------- Status Pills (Transparent Pastel Hues) ---------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.pill-secondary { background: #f3f3f9; color: #878a99; }
.pill-warning { background: rgba(247, 184, 75, 0.12); color: #8c5b05; }
.pill-info { background: rgba(41, 156, 219, 0.12); color: #0b5983; }
.pill-success { background: rgba(10, 179, 156, 0.12); color: #086d5e; }
.pill-danger { background: rgba(240, 101, 72, 0.12); color: #921c04; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(10, 62, 48, 0.06);
  color: var(--green);
}

/* ---------------- Form Fields (Clean Minimal Forms) ---------------- */
.form-row {
  margin-bottom: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: #0ab39c;
  box-shadow: 0 0 0 3px rgba(10, 179, 156, 0.1);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23878a99' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.form-file {
  width: 100%;
  padding: 8px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #f8f9fa;
  font-size: 12px;
}

.form-check {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.help {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}

.errorlist {
  list-style: none;
  padding: 0;
  margin: 5px 0 0;
  color: var(--danger);
  font-size: 11px;
}

.field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Dynamic Item Editor Table */
.items-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
}

.items-table th {
  background: #f8f9fa;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 8px;
  text-align: left;
  border: 1px solid var(--line);
}

.items-table td {
  padding: 6px 8px;
  border: 1px solid var(--line);
}

.items-table .form-input {
  padding: 6px 8px;
  border-radius: 4px;
}

.items-table .line-amt {
  font-weight: 600;
  color: var(--green-600);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.row-del {
  color: var(--danger);
  cursor: pointer;
  background: none;
  border: none;
}

.totals {
  margin-top: 20px;
  margin-left: auto;
  width: 320px;
  max-width: 100%;
}

.totals .trow {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--line);
}

.totals .trow.grand {
  border: none;
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
  margin-top: 6px;
}

/* ---------------- Toolbar & Filters ---------------- */
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
}

.search input {
  border: none;
  outline: none;
  padding: 8px 0;
  font-size: 13px;
  width: 220px;
  background: transparent;
}

.spacer {
  flex: 1;
}

/* Empty States */
.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}

.empty .material-icons-round {
  font-size: 48px;
  color: #ced4da;
}

.empty h3 {
  margin: 12px 0 4px;
  color: var(--ink);
  font-weight: 600;
}

/* Signature Previews */
.sig-preview {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  background: #fff;
  text-align: center;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sig-preview img {
  max-height: 100px;
  max-width: 100%;
}

/* Toasts Alert Stack */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
}

.toast {
  background: #fff;
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 12px 16px;
  min-width: 280px;
  max-width: 360px;
  animation: pop 0.2s ease-out;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.toast.success { border-color: var(--success); }
.toast.warning { border-color: var(--warning); }
.toast.danger { border-color: var(--danger); }
.toast.info { border-color: var(--info); }

.toast strong {
  font-size: 13px;
  display: block;
  font-weight: 600;
}

.toast p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* Layout Splits */
.split {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  align-items: start;
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

/* ---------------- Printable Document Paper Format ---------------- */
.paper-shell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.paper {
  --accent: var(--green);
  font-size: 13px;
  color: #333;
}

.paper-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: var(--accent);
  color: #fff;
  padding: 24px 28px;
  position: relative;
}

.paper-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--gold);
}

.ph-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.ph-brand img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: #fff;
  padding: 3px;
  object-fit: cover;
}

.ph-brand h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.ph-brand p {
  margin: 3px 0 0;
  font-size: 11px;
  opacity: 0.8;
  line-height: 1.4;
}

.ph-title {
  text-align: right;
}

.ph-title h1 {
  margin: 0 0 4px;
  font-size: 20px;
  letter-spacing: 1px;
  font-weight: 800;
}

.ph-no {
  font-size: 12px;
}

.ph-no strong {
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
}

.ph-date {
  font-size: 11.5px;
  margin-top: 4px;
  opacity: 0.85;
}

.paper-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 20px 28px 8px;
}

.pm-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 4px;
}

.pm-block strong {
  font-size: 14px;
  color: var(--ink);
}

.pm-block div {
  font-size: 12px;
  color: #555;
  margin-top: 1px;
}

.pm-pair {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dotted #e9ebec;
  font-size: 12px;
}

.pm-pair span {
  color: var(--muted);
}

.pm-pair b {
  color: var(--ink);
}

.paper-table {
  margin: 14px 28px;
  width: calc(100% - 56px);
  border-collapse: collapse;
}

.paper-table th {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
}

.paper-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e9ebec;
  font-size: 12px;
}

.paper-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.paper-totals {
  margin: 6px 28px 0;
  margin-left: auto;
  width: 260px;
}

.pt-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 12.5px;
  border-bottom: 1px dashed #e9ebec;
}

.pt-row.grand {
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  margin-top: 6px;
  border: none;
  font-size: 14px;
  font-weight: 700;
}

.paper-notes {
  margin: 18px 28px;
  padding: 10px 12px;
  background: #f8f9fa;
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  font-size: 12px;
  color: #555;
}

.paper-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 16px 28px 24px;
  margin-top: 10px;
}

.sign-area {
  text-align: center;
  min-width: 180px;
}

.sign-label {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  margin-bottom: 4px;
}

.sign-img {
  max-height: 50px;
  max-width: 180px;
}

.sign-line {
  height: 40px;
  border-bottom: 1.5px solid #495057;
  margin-bottom: 4px;
}

.sign-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
}

.sign-name.muted {
  color: #ced4da;
  font-weight: 500;
  font-style: italic;
}

.foot-stamp {
  text-align: right;
}

.foot-stamp span {
  display: block;
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
}

.foot-stamp em {
  font-size: 10.5px;
  color: var(--muted);
}

.paper-foot.signs {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: space-around;
}

.paper-foot.signs .sign-area {
  flex: 1;
  min-width: 140px;
}

/* Sign-off Cards (Detail View) */
.signoff {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
  background: #f8f9fa;
}

.signoff-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

/* Sales Reconciliation View */
.recon {
  margin: 6px 28px 0;
  margin-left: auto;
  width: 280px;
}

.recon-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 12.5px;
  border-bottom: 1px dashed #e9ebec;
}

.recon-row.grand {
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  margin-top: 6px;
  border: none;
  font-weight: 700;
}

/* Report Chart Graphics styling */
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 200px;
  padding: 10px 0;
  border-bottom: 2px solid var(--line);
}

.bar {
  flex: 1;
  background: linear-gradient(180deg, rgba(10, 179, 156, 0.4), var(--success));
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  position: relative;
  transition: all 0.2s ease;
}

.bar:hover {
  filter: brightness(1.1);
}

.bar span.val {
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--success);
}

.bar-label {
  text-align: center;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 6px;
  height: 30px;
}

/* ---------------- Responsive Styles ---------------- */
@media (max-width: 1000px) {
  .split {
    grid-template-columns: 1fr;
  }
  .paper-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.open {
    transform: none;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.25);
  }
  .menu-toggle {
    display: inline-flex;
  }
  .user-meta {
    display: none;
  }
  .clock {
    display: none;
  }
}
