:root {
  --brand: #025964;
  --brand-dark: #013a42;
  --brand-accent: #00d47e;
  --bg: #e9ebee;
  --card: #ffffff;
  --text: #0b1420;
  --muted: #64748b;
  --glass: blur(16px);
  --ring: 0 8px 28px rgba(2, 89, 100, .12);
  
  /* (Baru) Variabel untuk form & tabel */
  --input-bg: #F3F6F8;
  --input-border: #D6DEE3;
  --table-header-bg: #f7f7f7;

  /* Halaman login (login.css) */
  --bg-page: #e9ebee;
  --bg-card: #ffffff;
  --text-main: var(--text);
  --border-color: #e2e8f0;
  --radius: 14px;
  --shadow-lg: 0 12px 40px rgba(2, 89, 100, 0.08);
}
:root.dark {
  --bg: #0d1014;
  --card: #0f1620cc;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --ring: 0 10px 35px rgba(0, 0, 0, .5);
  
  /* (Baru) Variabel dark mode */
  --input-bg: #1f293b;
  --input-border: #334155;
  --table-header-bg: #1e293b;
}

/* ===== Base ===== */
* {
  box-sizing: border-box;
}
html, body {
  height: 100%;
}
body.app {
  margin: 0;
  font-family: "Helvetica", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(160deg, rgba(2, 89, 100, 0.05), rgba(0, 212, 126, 0.03)), var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* ===== Topbar ===== */
.topbar {
  position: sticky;
  top: 12px;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 16px;
  background: var(--card);
  backdrop-filter: var(--glass);
  border-radius: 18px;
  box-shadow: var(--ring);
  border: 1px solid #ffffff30;
  padding: 12px 24px;
}
.brand, .brand-title {
  font-weight: 700;
}
.brand-title {
  font-size: 16px;
  letter-spacing: .2px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.icon-btn {
  border: none;
  background: #ffffff28;
  color: var(--text);
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 12px;
  backdrop-filter: var(--glass);
  transition: .25s;
}
.icon-btn:hover {
  background: #ffffff3c;
}

/* ===== Sidebar (desktop) ===== */
.sidebar {
  position: fixed;
  top: 100px;
  left: 16px;
  bottom: 16px;
  z-index: 10;
  width: 240px;
  padding: 20px 16px;
  background: var(--card);
  backdrop-filter: var(--glass);
  border-radius: 20px;
  box-shadow: var(--ring);
  border: 1px solid #ffffff2a;
  display: flex;
  flex-direction: column;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
}
.nav-item i {
  width: 20px;
  height: 20px;
}
.nav-item:hover {
  background: #ffffff1f;
}
.nav-item.active {
  background: var(--brand);
  color: #fff;
}
.dark .nav-item:hover {
  background: #ffffff11;
}

/* ===== Content (legacy non-panel saja; panel pakai body.ta-panel di ta-overrides + shell-modern) ===== */
body:not(.ta-panel):not(.panel-smart) .content {
  margin-left: 260px;
  padding: 40px 30px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.foot {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 12px 16px;
  border-radius: 16px;
  text-align: center;
}

/* ===== Dashboard & Cards ===== */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.kpi-card {
  color: #fff;
  padding: 25px;
  border-radius: 16px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .1);
  min-width: 0;
}
.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kpi-label {
  font-size: 13px;
  text-transform: uppercase;
  opacity: .9;
  margin-bottom: 2px;
}
.kpi-value {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
}
.kpi-sub {
  font-size: 13px;
  opacity: .85;
  margin-top: 4px;
}
.kpi-icon {
  width: 32px;
  height: 32px;
  opacity: .8;
}
.glass {
  background: var(--card);
  backdrop-filter: var(--glass);
  box-shadow: var(--ring);
  border: 1px solid #ffffff2a;
  border-radius: 20px;
}
.chart-card {
  padding: 20px;
  border-radius: 18px;
}
.list-card {
  padding: 20px;
  border-radius: 18px;
}

/* ===== Stats & Calendar Wrap ===== */
.stats-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: flex-start;
}
.chart-title {
  margin: 0 0 18px;
}
.chart-canvas {
  width: 100%;
  max-width: 100%;
}
.calendar-card {
  padding: 24px 24px 22px;
}
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.calendar-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.calendar-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 6px;
  border-radius: 14px;
  background: var(--table-header-bg); /* (FIX) */
}
.dark .calendar-item {
  background: var(--input-bg);
}
.calendar-bar {
  width: 6px;
  height: 54px;
  border-radius: 4px;
}
.calendar-body {
  flex: 1;
  min-width: 0;
}
.calendar-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 2px;
}
.calendar-meta {
  font-size: 13px;
  color: var(--muted);
}
.calendar-date {
  font-size: 12px;
  color: var(--muted); /* (FIX) */
  margin-top: 2px;
}
.calendar-empty {
  color: var(--muted);
  font-size: 13px;
}
.calendar-item:nth-child(n+5) {
  display: none;
}
@media (min-width: 768px) {
  .calendar-item:nth-child(n+5) {
    display: flex;
  }
}

/* ===== Expenses ===== */
.expenses-card {
  margin-top: 26px;
  padding: 24px 28px;
}
.expenses-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.link-see-all {
  font-size: 13px;
  color: var(--brand);
  text-decoration: none;
}
.dark .link-see-all {
  color: #34d399;
}

/* ===== Table ===== */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  display: table;
}
.table td, .table th {
  padding: 8px 5px;
  font-size: 12px;
  vertical-align: middle;
  text-align: left;
}
.table th {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  background: var(--table-header-bg); /* (FIX) */
  padding-top: 14px;
  padding-bottom: 14px;
}
.table th:first-child {
  border-radius: 12px 0 0 12px;
  padding-left: 16px;
}
.table th:last-child {
  border-radius: 0 12px 12px 0;
  padding-right: 16px;
}
.row {
  background: var(--card);
  backdrop-filter: var(--glass);
  border-radius: 14px;
}
.table .actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.table tbody tr.row:nth-child(even) {
  background: #f7f7f7;
}
.dark .table tbody tr.row:nth-child(even) {
  background: #0f1620cc;
}

/* ===== Forms ===== */
.input, select {
  background: var(--input-bg); /* (FIX) */
  width: 100%;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid var(--input-border); /* (FIX) */
  outline: none;
  margin: 8px 0;
  color: var(--text); /* (FIX) */
}
.input::placeholder {
  color: var(--muted);
}
label {
  font-size: 12px;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  row-gap: 16px;
  margin-top: 20px;
}
.form-grid-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.input-split {
  display: flex;
  margin: 8px 0 4px;
}
.input-prefix {
  background: var(--input-bg); /* (FIX) */
  padding: 10px 12px;
  border-radius: 12px 0 0 12px;
  border: 1px solid var(--input-border); /* (FIX) */
  border-right: none;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.input-split .input {
  flex: 1;
  border-radius: 0 12px 12px 0 !important;
  margin: 0 !important;
  border-left-color: var(--input-border); /* (FIX) */
}
.input-split .input:focus {
  z-index: 2;
  position: relative;
}
.form-grid .button-wrapper {
  grid-column: 1 / -1;
  width: 100%;
}
.form-group-full {
  grid-column: 1 / -1;
}
.radio-group {
  display: flex;
  gap: 16px;
  margin: 8px 0;
}
.radio-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}
.radio-group input {
  width: auto;
  margin: 0;
}

/* ===== Badges ===== */
.badge {
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}
.badge-inv {
  background: linear-gradient(to right, #025964, #025964);
  color: #fff;
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
}
.status {
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}
.status-proses {
  background: #02596420;
  color: #025964;
}
.status-revisi {
  background: #e8b10025;
  color: #d29c00;
}
.status-selesai {
  background: var(--brand);
  color: #fff;
}
.status-pending {
  background: #e2e8f0;
  color: #475569;
}
.dark .status-pending {
  background: var(--input-border);
  color: var(--text);
}
.status-belum-dikirim {
  background: #fce7f3;
  color: #db2777;
}
.status-sudah-dikirim {
  background: #dbeafe;
  color: #2563eb;
}

.priority-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}
.priority-badge.priority-normal {
  background: #e2e8f0;
  color: #475569;
}
.priority-badge.priority-tinggi {
  background: #fef3c7;
  color: #b45309;
}
.priority-badge.priority-urgent {
  background: #fee2e2;
  color: #b91c1c;
}

.pipe-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  max-width: 16em;
  line-height: 1.3;
  white-space: normal;
  vertical-align: middle;
}
.pipe-badge.pipe-dp { background: #fef3c7; color: #92400e; }
.pipe-badge.pipe-kerja { background: #dbeafe; color: #1e40af; }
.pipe-badge.pipe-revisi { background: #fce7f3; color: #9d174d; }
.pipe-badge.pipe-lunas { background: #e9d5ff; color: #6b21a8; }
.pipe-badge.pipe-penyerahan { background: #cffafe; color: #0e7490; }
/* Selesai (Tahap): sama dengan .status-selesai — brand solid + putih, jangan beda dari kolom Status */
.pipe-badge.pipe-selesai {
  background: var(--brand);
  color: #fff;
}
html.dark .pipe-badge.pipe-dp { background: #422006; color: #fcd34d; }
html.dark .pipe-badge.pipe-kerja { background: #1e3a5f; color: #93c5fd; }
html.dark .pipe-badge.pipe-revisi { background: #500724; color: #f9a8d4; }
html.dark .pipe-badge.pipe-lunas { background: #3b0764; color: #e9d5ff; }
html.dark .pipe-badge.pipe-penyerahan { background: #134e4a; color: #99f6e4; }
html.dark .pipe-badge.pipe-selesai {
  background: var(--brand);
  color: #fff;
}

.dl-cell { display: inline-block; }
.dl-overdue { color: #ef4444; font-weight: 700; }
.dl-today { color: #f59e0b; font-weight: 600; }
.dl-soon { color: #2563eb; }
.dl-tag {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

/* ===== Buttons ===== */
.btn {
  border: none;
  background: linear-gradient(180deg, #025964, #025964);
  color: #fff;
  padding: 10px 14px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(2, 89, 100, .28);
}
.btn:hover {
  opacity: 0.8;
}
.btn.btn-danger {
  background: #ef4444;
  box-shadow: 0 10px 18px rgba(239, 68, 68, .28);
}
.btn.btn-danger:hover {
  background: #dc2626;
}
.btn.btn-light {
  background: #fff;
  color: var(--brand);
  box-shadow: none;
  font-weight: 600;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn.btn-light:hover {
  background: #f0fdf4;
}
.dark .btn.btn-light {
  background: var(--input-bg);
  color: var(--text);
}
.dark .btn.btn-light:hover {
  background: var(--input-border);
}

.btn-small {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  text-decoration: none;
  transition: .2s;
}
.btn-small:hover {
  opacity: .8
}
.icon-btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: .25s;
  background: var(--brand);
  color: #fff;
  border: none;
  backdrop-filter: none;
}
.icon-btn-small:hover {
  opacity: 0.8;
}
.icon-btn-small.btn-danger {
  background: #ef4444;
  color: #fff;
}
.icon-btn-small.btn-danger:hover {
  background: #ef4444;
  opacity: 0.8;
}
.icon-btn-small i {
  width: 18px;
  height: 18px;
}
.btn-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  padding: 9px 14px;
  border-radius: 14px;
  transition: .2s;
  border: none;
  background: linear-gradient(180deg, #025964, #025964);
  color: #fff;
  box-shadow: 0 10px 18px rgba(2, 89, 100, .28);
}
.btn-reset:hover {
  background: linear-gradient(180deg, #025964, #025964);
  color: #fff;
  opacity: 0.8;
}
.dark .btn-reset {
  background: linear-gradient(180deg, #025964, #025964);
  color: #fff;
  box-shadow: 0 10px 18px rgba(2, 89, 100, .28);
}
.dark .btn-reset:hover {
  opacity: 0.8;
}

/* ===== User pill ===== */
.user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text);
}
.user i {
  width: 18px;
  height: 18px;
  opacity: .8;
  color: var(--text);
}

/* ===== Bottom nav (mobile) ===== */
.bottomnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 11000;
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-around;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(10px);
  border-top: 1px solid #e5e7eb;
  padding: 8px 10px;
}
.dark .bottomnav {
  background: rgba(15, 22, 32, .85);
  border-top-color: var(--input-border);
}
.bottomnav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #111827;
  text-decoration: none;
}
.dark .bottomnav a {
  color: var(--text);
}
.bottomnav a.on i {
  color: #025964
}

/* ===== Layout Helpers ===== */
.list-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--brand); /* (FIX) */
  color: #fff;
  padding: 24px 24px;
  margin: -21px -21px 0;
  border-radius: 18px 18px 0 0;
}
.dark .list-title-bar {
  background: var(--input-bg);
  color: var(--text);
}
.dark .list-title-bar h3 i {
  color: var(--muted);
}
.list-title-bar h3 {
  margin: 0;
  font-size: 20px;
}
body:not(.ta-panel):not(.panel-smart) .content > .dashboard {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.dashboard > .glass.list-card {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* ===== Detail Page Layout (v4) ===== */
.detail-grid-v4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: flex-start;
}
.card-full-width {
  grid-column: 1 / -1;
}
.glass h3, .glass h4 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.glass h3 i, .glass h4 i {
  width: 20px;
  height: 20px;
  color: var(--brand);
}
.dark .glass h3 i, .dark .glass h4 i {
  color: var(--muted);
}
.detail-card-highlight {
  background: var(--brand) !important;
  color: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.dark .detail-card-highlight {
  background: var(--card) !important; /* (FIX) Dark mode override */
  color: var(--text);
}
.detail-card-highlight h3 {
  color: #fff;
  font-size: 20px;
}
.dark .detail-card-highlight h3 {
  color: var(--text);
}
.detail-card-highlight h3 i {
  color: #fff;
  opacity: 0.8;
}
.dark .detail-card-highlight h3 i {
  color: var(--text);
}
.detail-section {
  padding: 10px 0;
}
.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.section-header i {
  width: 20px;
  height: 20px;
  color: #fff;
  opacity: 0.8;
}
.dark .section-header i {
  color: var(--text);
}
.section-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dark .section-header h4 {
  color: var(--text);
}
.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.detail-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #ffffff22;
}
.dark .detail-card-highlight .detail-list li {
  border-bottom-color: var(--input-border);
}
.detail-list li:last-child {
  border-bottom: none;
}
.detail-list li span {
  font-size: 14px;
  color: #fff;
  opacity: 0.8;
}
.dark .detail-card-highlight .detail-list li span {
  color: var(--muted);
}
.detail-list li strong {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  text-align: right;
}
.dark .detail-card-highlight .detail-list li strong {
  color: var(--text);
}
.detail-list li .badge-detail {
  background: #ffffff22;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}
.dark .detail-card-highlight .detail-list li .badge-detail {
  background: var(--input-bg);
  color: var(--text);
}
.glass:not(.detail-card-highlight) .detail-list li {
  border-bottom-color: #f3f4f6;
}
.dark .glass:not(.detail-card-highlight) .detail-list li {
  border-bottom-color: var(--input-border);
}
.glass:not(.detail-card-highlight) .detail-list li span {
  color: var(--muted);
}
.glass:not(.detail-card-highlight) .detail-list li strong {
  color: var(--text);
}
.glass:not(.detail-card-highlight) .detail-list li .badge-detail {
  background: var(--table-header-bg);
  color: var(--muted);
}
.dark .glass:not(.detail-card-highlight) .detail-list li .badge-detail {
  background: var(--input-bg);
  color: var(--muted);
}
.detail-list li strong.price-total {
  font-size: 16px;
  font-weight: 700;
}
.detail-list li strong.price-paid {
  font-size: 16px;
  color: #c6f6d5;
}
.detail-list li strong.price-remaining {
  font-size: 16px;
  color: #fed7d7;
  font-weight: 700;
}
.glass:not(.detail-card-highlight) .detail-list li strong.price-paid {
  color: var(--brand);
}
.glass:not(.detail-card-highlight) .detail-list li strong.price-remaining {
  color: #ef4444;
}
.dark .detail-card-highlight .detail-list li strong.price-paid {
  color: #4ade80;
}
.dark .detail-card-highlight .detail-list li strong.price-remaining {
  color: #f87171;
}

/* ===== Filter Desktop & Mobile Terpisah ===== */
.filter-container-desktop .filter-bar {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 0;
  border-bottom: 1px solid #e5e7eb;
}
.dark .filter-container-desktop .filter-bar {
  border-bottom-color: var(--input-border);
}
.filter-container-desktop .filter-inputs {
  display: flex;
  gap: 12px;
  flex-grow: 1;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 5px;
}
.filter-container-desktop .filter-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}
.filter-container-desktop select.input {
  width: auto !important;
  min-width: 180px;
}
.filter-mobile-trigger {
  display: none;
}
/* ===== Pagination Style (Modern) ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 20px 0 10px 0;
  margin-top: 20px;
  border-top: 1px solid #e5e7eb;
}
.dark .pagination {
  border-top-color: var(--input-border);
}
.page-info {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-input {
  width: 50px;
  text-align: center;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--input-bg);
}
.page-input:focus {
  border-color: var(--brand);
  outline: none;
}
.page-link.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  text-decoration: none;
  border-radius: 10px;
  transition: .2s;
  background: var(--input-bg);
  color: var(--text);
  box-shadow: none;
}
.page-link.icon:hover {
  background: #e5e7eb;
  color: var(--brand);
  opacity: 1;
}
.dark .page-link.icon:hover {
  background: var(--input-border);
}
.page-link[disabled] {
  background: var(--bg);
  color: var(--muted);
  pointer-events: none;
  cursor: not-allowed;
}
.dark .page-link[disabled] {
  background: var(--bg);
  color: var(--input-border);
}

/* ===== Responsive ===== */
@media(max-width:980px) {
  body:not(.ta-panel):not(.panel-smart) .content {
    margin-left: 0;
    padding: 55px 20px 80px;
  }
  .sidebar {
    display: none;
  }
  .detail-grid-v4 {
    grid-template-columns: 1fr;
  }
}
@media(max-width:900px) {
  .bottomnav {
    display: flex
  }
  body.app {
    padding-bottom: 80px;
  }
}

/* ===== orders_list: scroll horizontal + deadline pill + aksi (semua layar) ===== */
.orders-scroll-hint {
  display: none;
}
.orders-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding-bottom: 6px;
  padding-top: 0;
  scroll-behavior: smooth;
}

/* Daftar order: area scroll mepet tepi kartu + rapat ke blok filter (seperti title bar full-bleed) */
.glass.list-card.list-card--orders .orders-table-scroll {
  margin-left: -20px;
  margin-right: -20px;
  width: calc(100% + 40px);
  max-width: none;
}

body.panel-smart .glass.list-card.list-card--orders .orders-table-scroll {
  margin-left: -1.25rem;
  margin-right: -1.25rem;
  width: calc(100% + 2.5rem);
}

.glass.list-card.list-card--quotes .orders-table-scroll {
  margin-left: -20px;
  margin-right: -20px;
  width: calc(100% + 40px);
  max-width: none;
}

body.panel-smart .glass.list-card.list-card--quotes .orders-table-scroll {
  margin-left: -1.25rem;
  margin-right: -1.25rem;
  width: calc(100% + 2.5rem);
}

.glass.list-card.list-card--quotes .orders-scroll-hint {
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
}

.glass.list-card.list-card--orders .orders-filter-form-main {
  margin-bottom: 0;
}

.glass.list-card.list-card--orders .orders-scroll-hint {
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
}
.orders-table-scroll::-webkit-scrollbar {
  height: 7px;
}
.orders-table-scroll::-webkit-scrollbar-thumb {
  background: rgba(2, 89, 100, 0.35);
  border-radius: 4px;
}
.orders-table-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
}
html.dark .orders-table-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}
.orders-data-table {
  min-width: 1180px;
  --ol-badge-radius: 9999px;
  --ol-badge-fs: 10px;
  --ol-badge-fw: 700;
  --ol-badge-py: 4px;
  --ol-badge-px: 10px;
  --ol-badge-ls: 0.06em;
  border-collapse: separate;
  border-spacing: 0 10px;
  /* Hilangkan celah “mengambang” antara tepi atas tabel dan baris thead (sisa border-spacing vertikal) */
  margin-top: -10px;
  border-radius: 0;
}

/* Panel-smart membulatkan .table + border penuh; daftar order: tanpa radius & tanpa garis di atas header */
body.panel-smart .orders-data-table {
  border-radius: 0 !important;
  border-top: none !important;
}

/* Riwayat order terbaru (orders.php): lebar penuh kartu, tanpa min-width daftar lebar */
.orders-recent-card .orders-data-table {
  min-width: 100%;
  margin-top: 0;
}

.orders-data-table tbody tr.orders-list-row {
  cursor: pointer;
  border-radius: 0;
}

.orders-data-table tbody tr.orders-list-row:focus-visible {
  outline: 2px solid #2c8d8d;
  outline-offset: -2px;
}

.orders-data-table tbody tr.orders-list-row:focus:not(:focus-visible) {
  outline: none;
}

.orders-data-table tbody tr.quotes-list-row {
  cursor: pointer;
}

.orders-data-table tbody tr.quotes-list-row:focus-visible {
  outline: 2px solid #2c8d8d;
  outline-offset: -2px;
}

.orders-data-table tbody tr.quotes-list-row:focus:not(:focus-visible) {
  outline: none;
}

/* Header: padding simetris antar kolom + vertikal tengah (override th:first/last global) */
.orders-data-table thead tr.orders-list-thead-row th {
  white-space: nowrap;
  vertical-align: middle;
  text-align: left;
  box-sizing: border-box;
  padding: 0.8125rem 0.65rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.25;
  border-radius: 0;
}

.orders-data-table thead tr.orders-list-thead-row th:first-child {
  padding-left: 1rem;
  padding-right: 0.65rem;
}

.orders-data-table thead tr.orders-list-thead-row th:last-child {
  padding-right: 1rem;
  padding-left: 0.65rem;
}

/* Isi sel: padding horizontal selaras header; satu baris + ellipsis di kolom panjang */
.orders-data-table tbody td {
  white-space: nowrap;
  vertical-align: middle;
  box-sizing: border-box;
  padding: 0.75rem 0.65rem;
}

.orders-data-table tbody td:first-child {
  padding-left: 1rem;
}

.orders-data-table tbody td:last-child {
  padding-right: 1rem;
}
.orders-data-table tbody td:nth-child(3) {
  max-width: 10.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.orders-data-table tbody td:nth-child(4),
.orders-data-table tbody td:nth-child(6) {
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Prioritas, Tahap, Status — satu ukuran font, radius pill, uppercase */
.orders-data-table .pipe-badge,
.orders-data-table .status,
.orders-data-table .priority-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--ol-badge-py) var(--ol-badge-px);
  border-radius: var(--ol-badge-radius);
  font-size: var(--ol-badge-fs);
  font-weight: var(--ol-badge-fw);
  letter-spacing: var(--ol-badge-ls);
  text-transform: uppercase;
  line-height: 1.25;
  white-space: nowrap;
  max-width: none;
}

/* Deadline — pill sama radius/font dengan badge; overdue + hari ini + soon + netral */
.orders-data-table .dl-pill {
  font-size: var(--ol-badge-fs);
  font-weight: var(--ol-badge-fw);
  letter-spacing: var(--ol-badge-ls);
  text-transform: uppercase;
  border-radius: var(--ol-badge-radius);
  padding: var(--ol-badge-py) var(--ol-badge-px);
  gap: 6px;
  align-items: center;
  box-shadow: none;
}
.orders-data-table .dl-pill .dl-pill-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.orders-data-table .dl-pill .dl-pill-text,
.orders-data-table .dl-pill .dl-pill-chip,
.orders-data-table .dl-pill .dl-pill-badge {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  margin: 0;
  background: none;
  border-radius: 0;
  padding: 0;
}
.orders-data-table .dl-pill.dl-pill-overdue {
  background: linear-gradient(145deg, #fef2f2, #fee2e2);
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.orders-data-table .dl-pill-overdue .dl-pill-text {
  color: #991b1b;
}
.orders-data-table .dl-pill-overdue .dl-pill-badge {
  color: #b91c1c;
}
.orders-data-table .dl-pill-today {
  background: linear-gradient(145deg, #fffbeb, #fef3c7);
  border: 1px solid rgba(245, 158, 11, 0.42);
}
.orders-data-table .dl-pill-today .dl-pill-text,
.orders-data-table .dl-pill-today .dl-pill-chip {
  color: #b45309;
}
.orders-data-table .dl-pill-today .dl-pill-sep {
  color: rgba(180, 83, 9, 0.45);
  font-weight: 700;
}
.orders-data-table .dl-pill-soon {
  background: linear-gradient(145deg, #eff6ff, #dbeafe);
  border: 1px solid rgba(59, 130, 246, 0.35);
}
.orders-data-table .dl-pill-soon .dl-pill-text,
.orders-data-table .dl-pill-soon .dl-pill-chip {
  color: #1e40af;
}
.orders-data-table .dl-pill-soon .dl-pill-sep {
  color: rgba(30, 64, 175, 0.4);
  font-weight: 700;
}
.orders-data-table .dl-pill-neutral {
  background: linear-gradient(145deg, #f8fafc, #f1f5f9);
  border: 1px solid rgba(100, 116, 139, 0.28);
}
.orders-data-table .dl-pill-neutral .dl-pill-text {
  color: #334155;
}
html.dark .orders-data-table .dl-pill.dl-pill-overdue {
  background: linear-gradient(145deg, #450a0a, #7f1d1d);
  border-color: rgba(248, 113, 113, 0.4);
}
html.dark .orders-data-table .dl-pill-overdue .dl-pill-text,
html.dark .orders-data-table .dl-pill-overdue .dl-pill-badge {
  color: #fecaca;
}
html.dark .orders-data-table .dl-pill-overdue .dl-pill-sep {
  color: rgba(254, 202, 202, 0.5);
}
html.dark .orders-data-table .dl-pill-today {
  background: linear-gradient(145deg, #422006, #713f12);
  border-color: rgba(251, 191, 36, 0.35);
}
html.dark .orders-data-table .dl-pill-today .dl-pill-text,
html.dark .orders-data-table .dl-pill-today .dl-pill-chip {
  color: #fcd34d;
}
html.dark .orders-data-table .dl-pill-today .dl-pill-sep {
  color: rgba(252, 211, 77, 0.5);
}
html.dark .orders-data-table .dl-pill-soon {
  background: linear-gradient(145deg, #1e3a5f, #172554);
  border-color: rgba(96, 165, 250, 0.35);
}
html.dark .orders-data-table .dl-pill-soon .dl-pill-text,
html.dark .orders-data-table .dl-pill-soon .dl-pill-chip {
  color: #93c5fd;
}
html.dark .orders-data-table .dl-pill-soon .dl-pill-sep {
  color: rgba(147, 197, 253, 0.45);
}
html.dark .orders-data-table .dl-pill-neutral {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border-color: rgba(148, 163, 184, 0.25);
}
html.dark .orders-data-table .dl-pill-neutral .dl-pill-text {
  color: #e2e8f0;
}

/* Prioritas (7): isi sel rapat ke Tahap; header tetap padding seragam */
.orders-data-table tbody td:nth-child(7) {
  padding-right: 0.35rem !important;
}

/* Tahap (8) & Status (9): badge — hanya body dirapatkan */
.orders-data-table tbody td:nth-child(8) {
  padding: 0.75rem 0.35rem 0.75rem 0.45rem !important;
  width: 1%;
}

.orders-data-table tbody td:nth-child(9) {
  padding: 0.75rem 0.65rem 0.75rem 0.35rem !important;
  width: 1%;
}

.orders-data-table thead th:nth-child(8),
.orders-data-table thead th:nth-child(9) {
  width: 1%;
}

/* No. INV — pill rounded + gradasi #165c5c → #2c8d8d */
.orders-data-table .orders-inv-pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, #165c5c 0%, #2c8d8d 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 10px rgba(22, 92, 92, 0.35);
  white-space: nowrap;
  font-family: ui-monospace, monospace;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
html.dark .orders-data-table .orders-inv-pill {
  background: linear-gradient(135deg, #124848 0%, #267a7a 100%);
  border-color: rgba(255, 255, 255, 0.12);
}

.orders-data-table tbody tr.orders-list-row:hover .orders-inv-pill {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(22, 92, 92, 0.45);
}

.orders-data-table .orders-actions {
  display: inline-flex;
  gap: 6px;
  white-space: nowrap;
  align-items: center;
}

/* Aksi — Bootstrap Icons, satu palet teal + aksen hapus */
.orders-data-table .orders-act-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  text-decoration: none;
  color: #0f766e;
  background: rgba(15, 118, 110, 0.09);
  border: 1px solid rgba(15, 118, 110, 0.22);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.orders-data-table .orders-act-btn:hover {
  background: rgba(15, 118, 110, 0.18);
  color: #0d5c56;
  border-color: rgba(15, 118, 110, 0.35);
  transform: translateY(-1px);
}
.orders-data-table .orders-act-btn i {
  font-size: 1.05rem;
  line-height: 1;
}
.orders-data-table .orders-act-btn--delete {
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.07);
  border-color: rgba(185, 28, 28, 0.22);
}
.orders-data-table .orders-act-btn--delete:hover {
  background: rgba(185, 28, 28, 0.14);
  color: #991b1b;
  border-color: rgba(185, 28, 28, 0.32);
}
html.dark .orders-data-table .orders-act-btn {
  color: #5eead4;
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.22);
}
html.dark .orders-data-table .orders-act-btn:hover {
  background: rgba(45, 212, 191, 0.18);
  color: #99f6e4;
}
html.dark .orders-data-table .orders-act-btn--delete {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.25);
}
html.dark .orders-data-table .orders-act-btn--delete:hover {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.18);
}

/* quotes_list: struktur kolom beda dari orders — pecah max-width & padding nth-child orders */
.orders-data-table.quotes-data-table {
  min-width: 760px;
}

.orders-data-table.quotes-data-table tbody td:nth-child(4) {
  max-width: none;
  font-variant-numeric: tabular-nums;
}

.orders-data-table.quotes-data-table tbody td:nth-child(7) {
  padding: 0.75rem 0.65rem !important;
  width: 1%;
}

.orders-data-table .quotes-convert-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #134e4a 0%, #0f766e 55%, #0d9488 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.35);
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.orders-data-table .quotes-convert-pill:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.42);
}

html.dark .orders-data-table .quotes-convert-pill {
  background: linear-gradient(135deg, #042f2e 0%, #115e59 50%, #0f766e 100%);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.orders-data-table .quotes-order-link {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0f766e;
  text-decoration: none;
  white-space: nowrap;
}

.orders-data-table .quotes-order-link:hover {
  color: #0d5c56;
  text-decoration: underline;
}

html.dark .orders-data-table .quotes-order-link {
  color: #5eead4;
}

html.dark .orders-data-table .quotes-order-link:hover {
  color: #99f6e4;
}

.dl-pill {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: linear-gradient(145deg, #fef2f2, #fee2e2);
  box-shadow: 0 1px 6px rgba(239, 68, 68, 0.1);
  max-width: 100%;
  white-space: nowrap;
}
html.dark .dl-pill.dl-pill-overdue {
  background: linear-gradient(145deg, #450a0a, #7f1d1d);
  border-color: rgba(248, 113, 113, 0.4);
}
.dl-pill-overdue .dl-pill-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.dl-pill-overdue .dl-pill-text {
  font-weight: 600;
  font-size: 12px;
  color: #991b1b;
}
html.dark .dl-pill-overdue .dl-pill-text {
  color: #fecaca;
}
.dl-pill-overdue .dl-pill-sep {
  color: rgba(153, 27, 27, 0.45);
  font-weight: 700;
}
html.dark .dl-pill-overdue .dl-pill-sep {
  color: rgba(254, 202, 202, 0.5);
}
.dl-pill-overdue .dl-pill-badge {
  display: inline;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #b91c1c;
  background: none;
  padding: 0;
  border-radius: 0;
}
html.dark .dl-pill-overdue .dl-pill-badge {
  color: #fecaca;
}
.dl-pill-overdue .dl-pill-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

/* Deadline biasa — satu baris */
.dl-cell-inline {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  white-space: nowrap;
}
.dl-cell-inline .dl-date {
  font-weight: 500;
}
.dl-cell-inline .dl-tag {
  display: inline-block;
  margin: 0;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.2);
  color: #b45309;
}
.dl-cell-inline.dl-soon .dl-tag {
  background: rgba(37, 99, 235, 0.15);
  color: #1d4ed8;
}
html.dark .dl-cell-inline .dl-tag {
  background: rgba(245, 158, 11, 0.22);
  color: #fcd34d;
}
html.dark .dl-cell-inline.dl-soon .dl-tag {
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
}

/* ===== (REVISI TOTAL) Mobile layout utama ===== */
@media(max-width:768px) {
  .orders-scroll-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted, #64748b);
    margin: 4px 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(2, 89, 100, 0.08);
    border: 1px solid rgba(2, 89, 100, 0.15);
  }

  .orders-scroll-hint .orders-hint-ico {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #025964;
  }

  .orders-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding-bottom: 6px;
    scroll-behavior: smooth;
  }

  .glass.list-card.list-card--orders .orders-table-scroll {
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
    max-width: none;
  }

  .glass.list-card.list-card--quotes .orders-table-scroll {
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
    max-width: none;
  }

  body.panel-smart .glass.list-card.list-card--orders .orders-table-scroll {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    width: calc(100% + 2.5rem);
  }

  body.panel-smart .glass.list-card.list-card--quotes .orders-table-scroll {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    width: calc(100% + 2.5rem);
  }

  /* 1. Layouts Umum */
  .dashboard {
    gap: 18px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .kpi-card {
    padding: 18px 14px;
  }
  .kpi-profit {
    grid-column: 1 / -1;
  }
  .stats-wrap {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 10px;
  }
  .stats-card {
    display: none;
  }
  .calendar-card {
    padding: 18px 18px 16px;
  }
  .calendar-list {
    grid-template-columns: 1fr;
  }
  .detail-grid-v4 {
    grid-template-columns: 1fr;
  }
  body:not(.ta-panel):not(.panel-smart) .content > .kpi-grid {
    grid-template-columns: 1fr;
  }

  /* 2. Sembunyikan Riwayat Expenses di index.php */
  .dashboard > .expenses-card {
    display: none;
  }
  
  /* 3. Style Tabel Umum Mobile (Rapat) */
  .table th, .table td {
    padding: 10px 4px;
    font-size: 13px;
    vertical-align: middle;
    text-align: left;
  }
  .table th {
    font-size: 11px;
    padding-left: 8px;
  }
  .table td:first-child {
    padding-left: 8px;
  }
  .table .badge-inv, .table .status {
    padding: 5px 8px;
    font-size: 12px;
    white-space: nowrap;
  }
  .table .actions {
    gap: 4px;
    flex-wrap: nowrap;
  }
  .table .actions .icon-btn-small {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }
  .table .actions .icon-btn-small i {
    width: 14px;
    height: 14px;
  }

  /* orders_list + orders.php: timpa .table & panel-smart .table (mobile) — font/padding/radius/ikon seragam */
  .orders-data-table {
    min-width: 1180px;
    --ol-badge-fs: 9px;
    --ol-badge-py: 3px;
    --ol-badge-px: 7px;
    --ol-badge-fw: 700;
    --ol-badge-ls: 0.06em;
    --ol-badge-radius: 9999px;
  }

  .orders-data-table thead tr.orders-list-thead-row th,
  body.panel-smart .orders-data-table thead tr.orders-list-thead-row th {
    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: 0.065em !important;
    line-height: 1.25 !important;
    padding: 0.45rem 0.4rem !important;
    vertical-align: middle !important;
  }

  .orders-data-table thead tr.orders-list-thead-row th:first-child,
  body.panel-smart .orders-data-table thead tr.orders-list-thead-row th:first-child {
    padding-left: 0.55rem !important;
    padding-right: 0.4rem !important;
  }

  .orders-data-table thead tr.orders-list-thead-row th:last-child,
  body.panel-smart .orders-data-table thead tr.orders-list-thead-row th:last-child {
    padding-right: 0.55rem !important;
    padding-left: 0.4rem !important;
  }

  .orders-data-table tbody td,
  body.panel-smart .orders-data-table tbody td {
    font-size: 11px !important;
    line-height: 1.35 !important;
    padding: 0.45rem 0.4rem !important;
    vertical-align: middle !important;
  }

  .orders-data-table tbody td:first-child,
  body.panel-smart .orders-data-table tbody td:first-child {
    padding-left: 0.55rem !important;
  }

  .orders-data-table tbody td:last-child,
  body.panel-smart .orders-data-table tbody td:last-child {
    padding-right: 0.55rem !important;
  }

  .orders-data-table .pipe-badge,
  .orders-data-table .status,
  .orders-data-table .priority-badge,
  body.panel-smart .orders-data-table .pipe-badge,
  body.panel-smart .orders-data-table .status,
  body.panel-smart .orders-data-table .priority-badge {
    font-size: var(--ol-badge-fs) !important;
    font-weight: var(--ol-badge-fw) !important;
    letter-spacing: var(--ol-badge-ls) !important;
    padding: var(--ol-badge-py) var(--ol-badge-px) !important;
    border-radius: var(--ol-badge-radius) !important;
    line-height: 1.25 !important;
  }

  .orders-data-table .orders-inv-pill,
  body.panel-smart .orders-data-table .orders-inv-pill {
    font-size: 9px !important;
    padding: 3px 8px !important;
    border-radius: 999px !important;
    letter-spacing: 0.04em !important;
  }

  .orders-data-table .dl-pill,
  body.panel-smart .orders-data-table .dl-pill {
    font-size: var(--ol-badge-fs) !important;
    padding: var(--ol-badge-py) var(--ol-badge-px) !important;
    border-radius: var(--ol-badge-radius) !important;
    gap: 4px !important;
  }

  .orders-data-table tbody td:nth-child(7),
  body.panel-smart .orders-data-table tbody td:nth-child(7) {
    padding-right: 0.3rem !important;
  }

  .orders-data-table.quotes-data-table tbody td:nth-child(7),
  body.panel-smart .orders-data-table.quotes-data-table tbody td:nth-child(7) {
    padding: 0.45rem 0.5rem !important;
  }

  .orders-data-table tbody td:nth-child(8),
  body.panel-smart .orders-data-table tbody td:nth-child(8) {
    padding: 0.45rem 0.3rem 0.45rem 0.35rem !important;
  }

  .orders-data-table tbody td:nth-child(9),
  body.panel-smart .orders-data-table tbody td:nth-child(9) {
    padding: 0.45rem 0.4rem 0.45rem 0.3rem !important;
  }

  .orders-data-table .orders-act-btn,
  body.panel-smart .orders-data-table .orders-act-btn {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
  }

  .orders-data-table .orders-act-btn i,
  body.panel-smart .orders-data-table .orders-act-btn i {
    font-size: 0.8125rem !important;
    line-height: 1 !important;
  }

  body.panel-smart .list-card--orders .list-title-bar h3 [data-lucide],
  body.panel-smart .list-card--orders .list-title-bar h3 svg {
    width: 1.05rem !important;
    height: 1.05rem !important;
  }

  body.panel-smart .page-orders .glass.list-card:not(.list-card--orders) .list-title-bar h3 [data-lucide],
  body.panel-smart .page-orders .glass.list-card:not(.list-card--orders) .list-title-bar h3 svg {
    width: 1.05rem !important;
    height: 1.05rem !important;
  }

  /* 5. (FIX) Layout Tabel expenses.php (Tanggal, Jumlah, Aksi) */
  /* Target: tabel dengan ID #expense-list-card */
  #expense-list-card .table th:nth-child(2), 
  #expense-list-card .table td:nth-child(2), /* Kategori */
  #expense-list-card .table th:nth-child(4), 
  #expense-list-card .table td:nth-child(4)  /* Catatan */
  {
    display: none;
  }
  /* Atur lebar kolom expenses.php */
  #expense-list-card .table th:nth-child(1), #expense-list-card .table td:nth-child(1) { width: 35%; } /* Tanggal */
  #expense-list-card .table th:nth-child(3), #expense-list-card .table td:nth-child(3) { width: 30%; } /* Jumlah */
  #expense-list-card .table th:nth-child(5), #expense-list-card .table td:nth-child(5) { width: 35%; } /* Aksi */


  /* 6. (FIX) Layout Tabel index.php (Tanggal, Kategori, Jumlah, Catatan) */
  /* Target: tabel di dalam .expenses-card */
  .expenses-card .table th:nth-child(5), /* Sembunyikan Aksi */
  .expenses-card .table td:nth-child(5)
  {
    display: none;
  }
  /* Atur lebar kolom index.php */
  .expenses-card .table th:nth-child(1), .expenses-card .table td:nth-child(1D) { width: 25%; } /* Tanggal */
  .expenses-card .table th:nth-child(2), .expenses-card .table td:nth-child(2) { width: 30%; } /* Kategori */
  .expenses-card .table th:nth-child(3), .expenses-card .table td:nth-child(3) { width: 20%; } /* Jumlah */
  .expenses-card .table th:nth-child(4), .expenses-card .table td:nth-child(4) { width: 25%; } /* Catatan */


  /* 7. Filter orders — sheet & bar mobile di orders-list-filters.css */
  .filter-container-desktop { display: none; }
  .orders-filter-mobile-wrap {
    margin-top: 12px;
    margin-bottom: 4px;
  }

  /* orders.php — form & kartu muat viewport, tidak meluber horizontal */
  .page-orders.page-stack {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .page-orders .glass.list-card {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  body.panel-smart .page-orders .orders-recent-card {
    margin-top: 0 !important;
  }

  .page-orders .form-grid {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .page-orders .form-grid > div,
  .page-orders .form-group-full {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .page-orders .form-grid .input,
  .page-orders .form-grid select.input {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }

  .page-orders .input-split {
    display: flex;
    max-width: 100%;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .page-orders .input-prefix {
    min-width: 0;
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .page-orders .input-split .input {
    min-width: 0;
    flex: 1 1 0%;
  }

  .page-orders .button-wrapper {
    max-width: 100%;
  }

  .page-orders .button-wrapper .btn {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .page-orders .glass.list-card.list-card--orders .orders-table-scroll {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }

  body.panel-smart .page-orders .input-split--invoice {
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body.panel-smart .page-orders .input-split--invoice .input-split__prefix,
  body.panel-smart .page-orders .input-split--invoice .input-prefix {
    min-width: 0 !important;
    flex: 0 1 auto !important;
    max-width: 46%;
    font-size: 0.8125rem !important;
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
  }

  body.panel-smart .page-orders .input-split--invoice .input-split__seq,
  body.panel-smart .page-orders .input-split--invoice .input.input-split__seq {
    min-width: 0 !important;
    flex: 1 1 0% !important;
    font-size: 0.9375rem !important;
  }

  /* 8. Pagination Mobile */
  .pagination { gap: 4px; }
  .page-info { font-size: 13px; gap: 6px; }
  .page-input { width: 40px; }
  .page-link.icon { width: 32px; height: 32px; }
  .page-link.icon i[data-lucide="chevrons-left"], .page-link.icon i[data-lucide="chevrons-right"] {
    display: none;
  }
}