/* ================================================================
   PS3 Rental Dashboard — style.css
   Separated from index.html (Audit Fix P2)
   PS3 2006-2007 aesthetic: dark chrome, PlayStation red, Orbitron
   ================================================================ */

/* ── Google Fonts import ─────────────────────────────────────────
   TODO: download fonts to /public/fonts/ for offline serving (Audit P5)
   ---------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;500;600;700&display=swap');

/* ── Theme Import ────────────────────────────────────────────────*/
@import url('themes.css');

/* ── Design Tokens (mapped to theme variables) ───────────────────*/
:root {
  /* Legacy mapping untuk backward compatibility */
  --ps3-black:      var(--bg-primary);
  --ps3-deep:       var(--bg-secondary);
  --ps3-dark:       var(--bg-tertiary);
  --ps3-panel:      var(--bg-panel);
  --ps3-card:       var(--bg-card);
  --ps3-border:     var(--border-color);
  --ps3-silver:     var(--accent-secondary);
  --ps3-silver-dim: var(--text-muted);
  --ps3-red:        var(--accent-primary);
  --ps3-red-dim:    var(--status-error);
  --ps3-blue:       #003087;
  --ps3-blue-glow:  var(--status-info);
  --ps3-white:      var(--text-primary);
  --ps3-text:       var(--text-secondary);
  --ps3-text-dim:   var(--text-muted);
  --ps3-green:      var(--status-success);
  --ps3-amber:      var(--status-warning);

  --font-display: 'Orbitron', monospace;
  --font-body:    'Rajdhani', sans-serif;

  --radius:     6px;
  --radius-lg:  10px;
  --transition: 0.18s ease;

  /* Scrollbar */
  --scrollbar-w: 6px;
}

/* ── Reset ───────────────────────────────────────────────────────*/
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  background: var(--ps3-black);
  color: var(--ps3-text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
a { color: var(--ps3-silver); text-decoration: none; }

/* Scrollbar */
::-webkit-scrollbar { width: var(--scrollbar-w); }
::-webkit-scrollbar-track { background: var(--ps3-dark); }
::-webkit-scrollbar-thumb { background: var(--ps3-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ps3-silver-dim); }

/* ── Auth Screen ─────────────────────────────────────────────────*/
#auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(0,48,135,0.25) 0%, transparent 70%),
    var(--ps3-black);
}
.auth-box {
  background: var(--ps3-panel);
  border: 1px solid var(--ps3-border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 360px;
  text-align: center;
  box-shadow: 0 0 60px rgba(0,80,208,0.12), 0 20px 60px rgba(0,0,0,0.6);
}
.auth-logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: var(--ps3-white);
  margin-bottom: 6px;
  letter-spacing: 3px;
}
.auth-logo span { color: var(--ps3-red); }
.auth-sub {
  font-size: 12px;
  color: var(--ps3-text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 36px;
}
.auth-box input[type="password"] {
  width: 100%;
  background: var(--ps3-dark);
  border: 1px solid var(--ps3-border);
  color: var(--ps3-white);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 16px;
  letter-spacing: 4px;
  text-align: center;
  margin-bottom: 16px;
  transition: border-color var(--transition);
}
.auth-box input:focus { outline: none; border-color: var(--ps3-blue-glow); }
.auth-error {
  color: var(--ps3-red);
  font-size: 13px;
  margin-bottom: 12px;
  min-height: 20px;
}

/* ── App Shell ───────────────────────────────────────────────────*/
#app { display: none; flex-direction: column; min-height: 100vh; }
#app.active { display: flex; }

/* ── Top Bar ─────────────────────────────────────────────────────*/
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ps3-deep);
  border-bottom: 1px solid var(--ps3-border);
  padding: 0 20px;
  height: 52px;
  position: sticky;
  top: 0;
  z-index: 300;
}
.topbar-brand {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--ps3-white);
}
.topbar-brand span { color: var(--ps3-red); }
.topbar-clock {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ps3-silver);
  letter-spacing: 2px;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.conn-indicator {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ps3-text-dim);
  transition: background 0.3s;
}
.conn-indicator.online  { background: var(--ps3-green); box-shadow: 0 0 6px var(--ps3-green); }
.conn-indicator.offline { background: var(--ps3-red); }

/* ── Bottom Nav ──────────────────────────────────────────────────*/
.bottomnav {
  display: flex;
  background: var(--ps3-deep);
  border-top: 1px solid var(--ps3-border);
  position: sticky;
  bottom: 0;
  z-index: 100;
}

/* Sidebar header hidden di mobile */
.sidebar-header { display: none; }
.sidebar-menu { display: contents; }
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  background: transparent;
  border: none;
  color: var(--ps3-text-dim);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  gap: 4px;
  transition: color var(--transition), background var(--transition);
  border-top: 2px solid transparent;
}
.nav-btn .nav-icon { font-size: 18px; line-height: 1; }
.nav-btn:hover  { color: var(--ps3-silver); background: rgba(255,255,255,0.04); }
.nav-btn.active { color: var(--ps3-red); border-top-color: var(--ps3-red); }

/* ── Page Views ──────────────────────────────────────────────────*/
.page { display: none; flex: 1; overflow-y: auto; padding: 16px; }
.page.active { display: block; }

/* ── Summary Cards ───────────────────────────────────────────────*/
.summary-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.summary-card {
  background: var(--ps3-panel);
  border: 1px solid var(--ps3-border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}
.summary-card .s-val {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--ps3-white);
  line-height: 1.2;
}
.summary-card .s-val.green { color: var(--ps3-green); }
.summary-card .s-val.red   { color: var(--ps3-red); }
.summary-card .s-val.amber { color: var(--ps3-amber); }
.summary-card .s-label {
  font-size: 10px;
  color: var(--ps3-text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ── Period Tabs ─────────────────────────────────────────────────*/
.period-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 16px;
  background: var(--ps3-dark);
  border-radius: var(--radius);
  padding: 3px;
}
.period-tab {
  flex: 1;
  padding: 7px 4px;
  background: transparent;
  border: none;
  color: var(--ps3-text-dim);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  transition: all var(--transition);
}
.period-tab:hover  { color: var(--ps3-silver); }
.period-tab.active { background: var(--ps3-panel); color: var(--ps3-white); }

/* ── Unit Grid ───────────────────────────────────────────────────*/
.units-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.unit-card {
  background: var(--ps3-card);
  border: 1px solid var(--ps3-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  user-select: none;
}
.unit-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--ps3-border);
  transition: background var(--transition);
}
.unit-card.available:hover  { border-color: var(--ps3-silver-dim); transform: translateY(-2px); }
.unit-card.available::before { background: var(--ps3-silver-dim); }
.unit-card.rented   { border-color: var(--ps3-red); background: #1a0a0a; }
.unit-card.rented::before { background: var(--ps3-red); box-shadow: 0 0 8px var(--ps3-red); }
.unit-card.warning  { border-color: var(--ps3-amber); background: #1a1200; animation: pulse-warning 1s ease infinite; }
.unit-card.warning::before { background: var(--ps3-amber); }

@keyframes pulse-warning {
  0%, 100% { box-shadow: 0 0 0 rgba(255,170,0,0); }
  50%       { box-shadow: 0 0 12px rgba(255,170,0,0.4); }
}

.unit-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--ps3-white);
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.unit-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}
.available .unit-status-dot { background: var(--ps3-green); }
.rented    .unit-status-dot { background: var(--ps3-red); box-shadow: 0 0 6px var(--ps3-red); }
.warning   .unit-status-dot { background: var(--ps3-amber); }

.unit-customer { font-size: 13px; font-weight: 600; color: var(--ps3-silver); margin-bottom: 6px; }
.unit-timer {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: var(--ps3-white);
  letter-spacing: 2px;
  line-height: 1;
  margin-bottom: 6px;
}
.unit-timer.overtime  { color: var(--ps3-amber); }
.unit-timer.warning   { color: var(--ps3-red); }
.unit-duration-label  { font-size: 11px; color: var(--ps3-text-dim); letter-spacing: 1px; }

.unit-actions { display: flex; gap: 6px; margin-top: 10px; }
.unit-btn {
  flex: 1;
  padding: 6px;
  border-radius: 4px;
  border: 1px solid var(--ps3-border);
  background: var(--ps3-dark);
  color: var(--ps3-silver);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all var(--transition);
}
.unit-btn:hover { border-color: var(--ps3-silver-dim); color: var(--ps3-white); }
.unit-btn.stop  { border-color: var(--ps3-red-dim); color: var(--ps3-red); }
.unit-btn.stop:hover { background: var(--ps3-red); color: white; }

/* ── Section Headers ─────────────────────────────────────────────*/
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--ps3-silver);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ── Transaction List ────────────────────────────────────────────*/
.tx-list { display: flex; flex-direction: column; gap: 6px; }
.tx-row {
  background: var(--ps3-panel);
  border: 1px solid var(--ps3-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: center;
  transition: border-color var(--transition);
}
.tx-row:hover { border-color: var(--ps3-silver-dim); }
.tx-id {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--ps3-silver);
  letter-spacing: 1px;
  background: rgba(192,192,192,0.1);
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}
.tx-name    { font-size: 14px; font-weight: 600; color: var(--ps3-white); }
.tx-unit    { font-size: 12px; color: var(--ps3-text-dim); }
.tx-payment {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}
.tx-payment.cash     { background: rgba(0,204,102,0.15); color: var(--ps3-green); }
.tx-payment.qris     { background: rgba(0,80,208,0.2);  color: #6699ff; }
.tx-payment.transfer { background: rgba(192,192,192,0.1); color: var(--ps3-silver); }
.tx-amount {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--ps3-green);
  white-space: nowrap;
}
.tx-row-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition);
}
.tx-row:hover .tx-row-actions { opacity: 1; }

/* ── Expense Form ────────────────────────────────────────────────*/
.expense-form {
  background: var(--ps3-panel);
  border: 1px solid var(--ps3-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ps3-silver-dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--ps3-dark);
  border: 1px solid var(--ps3-border);
  color: var(--ps3-white);
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-body);
  transition: border-color var(--transition);
  appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--ps3-blue-glow);
}
.form-select option { background: var(--ps3-dark); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-hint { font-size: 11px; color: var(--ps3-text-dim); margin-top: 4px; }

/* ── Buttons ─────────────────────────────────────────────────────*/
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--ps3-red);
  color: white;
  border-color: var(--ps3-red);
}
.btn-primary:hover { background: #ff0015; box-shadow: 0 0 12px rgba(230,0,18,0.4); }
.btn-secondary {
  background: transparent;
  color: var(--ps3-silver);
  border-color: var(--ps3-border);
}
.btn-secondary:hover { border-color: var(--ps3-silver-dim); color: var(--ps3-white); }
.btn-ghost {
  background: transparent;
  color: var(--ps3-text-dim);
  border: none;
  padding: 6px 10px;
}
.btn-ghost:hover { color: var(--ps3-white); }
.btn-danger {
  background: transparent;
  color: var(--ps3-red);
  border-color: var(--ps3-red-dim);
}
.btn-danger:hover { background: var(--ps3-red); color: white; }
.btn-sm { padding: 6px 12px; font-size: 11px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Modal ───────────────────────────────────────────────────────*/
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--ps3-panel);
  border: 1px solid var(--ps3-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 20px 32px;
  animation: slide-up 0.22s ease;
}
.modal-desktop .modal {
  border-radius: var(--radius-lg);
  margin: auto;
}
@keyframes slide-up {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--ps3-white);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.modal-close {
  background: none;
  border: none;
  color: var(--ps3-text-dim);
  font-size: 22px;
  line-height: 1;
  padding: 4px;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--ps3-white); }
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.modal-actions .btn { flex: 1; }

/* ── Duration Picker ─────────────────────────────────────────────*/
.duration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.duration-btn {
  padding: 10px;
  background: var(--ps3-dark);
  border: 1px solid var(--ps3-border);
  color: var(--ps3-silver);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: all var(--transition);
}
.duration-btn:hover  { border-color: var(--ps3-silver-dim); color: var(--ps3-white); }
.duration-btn.active { background: var(--ps3-red); border-color: var(--ps3-red); color: white; }
.duration-btn.unlimited { grid-column: 1/-1; }

/* ── Alarm Banner ────────────────────────────────────────────────*/
.alarm-banner {
  display: none;
  position: fixed;
  top: 52px; left: 0; right: 0;
  background: var(--ps3-red);
  color: white;
  padding: 10px 16px;
  text-align: center;
  z-index: 150;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  animation: alarm-flash 0.5s ease infinite;
}
.alarm-banner.active { display: flex; align-items: center; justify-content: space-between; }
@keyframes alarm-flash {
  0%, 100% { background: var(--ps3-red); }
  50%       { background: #ff3344; }
}

/* ── Chart ───────────────────────────────────────────────────────*/
.chart-container {
  background: var(--ps3-panel);
  border: 1px solid var(--ps3-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.chart-canvas { width: 100%; height: 140px; }

/* ── Table ───────────────────────────────────────────────────────*/
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-size: 10px;
  font-weight: 700;
  color: var(--ps3-text-dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 8px 12px;
  border-bottom: 1px solid var(--ps3-border);
  text-align: left;
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #111;
  font-size: 13px;
}
.data-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Search Bar ──────────────────────────────────────────────────*/
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}
.search-input {
  flex: 1;
  background: var(--ps3-dark);
  border: 1px solid var(--ps3-border);
  color: var(--ps3-white);
  padding: 9px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-body);
}
.search-input::placeholder { color: var(--ps3-text-dim); }
.search-input:focus { outline: none; border-color: var(--ps3-silver-dim); }

/* ── Pagination ──────────────────────────────────────────────────*/
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
}
.page-info { font-size: 13px; color: var(--ps3-text-dim); }

/* ── Toast ───────────────────────────────────────────────────────*/
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--ps3-panel);
  border: 1px solid var(--ps3-border);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  animation: toast-in 0.2s ease;
  white-space: nowrap;
}
.toast.success { border-color: var(--ps3-green); color: var(--ps3-green); }
.toast.error   { border-color: var(--ps3-red);   color: var(--ps3-red); }
.toast.info    { border-color: var(--ps3-silver); color: var(--ps3-silver); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Badge / Tag ─────────────────────────────────────────────────*/
.badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(192,192,192,0.12);
  color: var(--ps3-silver);
  border: 1px solid rgba(192,192,192,0.2);
}
.badge.pending   { color: var(--ps3-amber);  border-color: rgba(255,170,0,0.3); background: rgba(255,170,0,0.08); }
.badge.active    { color: var(--ps3-green);  border-color: rgba(0,204,102,0.3); background: rgba(0,204,102,0.08); }
.badge.completed { color: #6699ff; border-color: rgba(102,153,255,0.3); background: rgba(102,153,255,0.08); }
.badge.cancelled { color: var(--ps3-text-dim); }

/* ── Loading ─────────────────────────────────────────────────────*/
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--ps3-border);
  border-top-color: var(--ps3-red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 12px;
  color: var(--ps3-text-dim);
}

/* ── Empty State ─────────────────────────────────────────────────*/
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--ps3-text-dim);
}
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ── Schedule Cards ──────────────────────────────────────────────*/
.sched-card {
  background: var(--ps3-panel);
  border: 1px solid var(--ps3-border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.sched-card.today { border-left: 3px solid var(--ps3-red); }
.sched-info { flex: 1; }
.sched-name { font-size: 14px; font-weight: 600; color: var(--ps3-white); margin-bottom: 3px; }
.sched-meta { font-size: 12px; color: var(--ps3-text-dim); }

/* ── Inventory Card ──────────────────────────────────────────────*/
.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.inv-card {
  background: var(--ps3-panel);
  border: 1px solid var(--ps3-border);
  border-radius: var(--radius);
  padding: 12px;
}
.inv-icon  { font-size: 24px; margin-bottom: 6px; }
.inv-name  { font-size: 13px; font-weight: 600; color: var(--ps3-white); margin-bottom: 4px; }
.inv-meta  { font-size: 11px; color: var(--ps3-text-dim); }

/* ── ROI / Capital ───────────────────────────────────────────────*/
.roi-card {
  background: var(--ps3-panel);
  border: 1px solid var(--ps3-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
}
.roi-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--ps3-border);
}
.roi-row:last-child { border-bottom: none; }
.roi-label { font-size: 13px; color: var(--ps3-text-dim); }
.roi-val   { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--ps3-white); }
.roi-val.green  { color: var(--ps3-green); }
.roi-val.red    { color: var(--ps3-red); }
.roi-val.amber  { color: var(--ps3-amber); }

/* ── Divider ─────────────────────────────────────────────────────*/
.divider { border: none; border-top: 1px solid var(--ps3-border); margin: 16px 0; }

/* ── Responsive ──────────────────────────────────────────────────*/
@media (max-width: 400px) {
  .summary-bar { grid-template-columns: 1fr 1fr; }
  .units-grid  { grid-template-columns: 1fr 1fr; }
  .duration-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .page    { padding: 24px 32px; max-width: 900px; margin: 0 auto; }
  .modal-overlay { align-items: center; }
  .modal   { border-radius: var(--radius-lg); }
}

/* ── Desktop Large (1024px+) ─────────────────────────────────────*/
@media (min-width: 1024px) {
  /* App layout: sidebar mode */
  #app { flex-direction: row; }
  
  /* Bottomnav jadi Sidebar */
  .bottomnav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 220px;
    flex-direction: column;
    border-top: none;
    border-right: 1px solid var(--ps3-border);
    padding: 0;
    z-index: 200;
    transition: width 0.3s ease;
  }
  
  /* Sidebar header & menu visible di desktop */
  .sidebar-header { display: flex; }
  .sidebar-menu { display: flex; flex-direction: column; flex: 1; }
  
  /* Sidebar Header dengan Brand */
  .sidebar-header {
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--ps3-border);
    margin-bottom: 10px;
  }
  
  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
  }
  
  .brand-icon {
    font-size: 24px;
    flex-shrink: 0;
  }
  
  .brand-text {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--ps3-white);
    letter-spacing: 1px;
    white-space: nowrap;
  }
  
  /* Toggle button untuk minimize */
  .sidebar-toggle {
    background: transparent;
    border: none;
    color: var(--ps3-text-dim);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
  }
  
  .sidebar-toggle:hover {
    background: rgba(255,255,255,0.1);
    color: var(--ps3-silver);
  }
  
  .toggle-icon {
    font-size: 12px;
    display: block;
    transition: transform 0.3s;
  }
  
  /* Menu container */
  .sidebar-menu {
    display: flex;
    flex-direction: column;
    flex: 1;
  }
  
  /* Nav button jadi horizontal (icon+text side by side) */
  .nav-btn {
    flex: none;
    flex-direction: row;
    justify-content: flex-start;
    padding: 14px 20px;
    font-size: 13px;
    border-top: none;
    border-left: 3px solid transparent;
    gap: 12px;
  }
  
  .nav-btn .nav-icon { font-size: 20px; }
  .nav-btn .nav-text { white-space: nowrap; }
  .nav-btn.active { border-top-color: transparent; border-left-color: var(--ps3-red); }
  
  /* Page content geser ke kanan untuk kasih ruang sidebar */
  .page {
    margin-left: 220px;
    padding: 24px 32px;
    max-width: none;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
  }
  
  /* ══ SIDEBAR MINIMIZED STATE ════════════════════════════════════ */
  .bottomnav.minimized {
    width: 70px;
  }
  
  .bottomnav.minimized .sidebar-header {
    padding: 20px 10px;
    justify-content: center;
  }
  
  .bottomnav.minimized .brand-text {
    display: none;
  }
  
  .bottomnav.minimized .toggle-icon {
    transform: rotate(180deg);
  }
  
  .bottomnav.minimized .nav-btn {
    justify-content: center;
    padding: 14px 10px;
  }
  
  .bottomnav.minimized .nav-text {
    display: none;
  }
  
  .bottomnav.minimized ~ .page,
  .bottomnav.minimized + .page {
    margin-left: 70px;
  }

  /* Summary cards lebih besar */
  .summary-bar { gap: 16px; }
  .summary-card { padding: 20px; }
  .summary-card .s-val { font-size: 26px; }
  .summary-card .s-label { font-size: 12px; }

  /* Unit grid lebih lebar */
  .units-grid { 
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }
  .unit-card { padding: 20px; }
  .unit-name { font-size: 16px; }

  /* Schedule cards */
  .sched-card { padding: 18px; }

  /* Form inputs lebih besar */
  input, select {
    padding: 14px 16px;
    font-size: 15px;
  }

  /* Tombol lebih besar */
  button, .btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  /* Modal lebih lebar */
  .modal { max-width: 520px; }

  /* Tab lebih besar */
  .period-tab { padding: 10px 8px; font-size: 12px; }
  .filter-tab { padding: 10px 14px; font-size: 13px; }

  /* Inventory & ROI cards */
  .inv-card { padding: 20px; }
  .roi-card { padding: 20px; }
}
