:root {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-soft: #ccfbf1;
  --accent: #16a34a;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --info: #2563eb;
  --info-soft: #dbeafe;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Role Visibility Enforcement */
body.role-unit .kesling-only {
  display: none !important;
}

.print-only { display: none; }
.hidden { display: none !important; }
.mt-1 { margin-top: 0.35rem; }
.mt-2 { margin-top: 0.65rem; }
.mb-3 { margin-bottom: 1rem; }
.muted { color: var(--muted); font-size: 0.875rem; }
.text-right { text-align: right; }
.req { color: var(--danger); }

/* Layout */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 265px;
  background: #0b3b36;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 1rem;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #22c55e, #0d9488);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  color: #fff;
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.brand-text span {
  font-size: 0.72rem;
  color: #99f6e4;
  display: block;
}

/* Account Card in Sidebar */
.account-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 1rem;
}

.account-role-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.role-badge {
  font-size: 0.67rem;
  font-weight: 800;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.4px;
}
.role-badge.kesling { background: #22c55e; color: #052e16; }
.role-badge.unit { background: #38bdf8; color: #082f49; }

.btn-switch-role {
  background: rgba(255, 255, 255, 0.14);
  border: none;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.btn-switch-role:hover { background: rgba(255, 255, 255, 0.25); }

.account-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-sub {
  font-size: 0.72rem;
  color: #99f6e4;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: transparent;
  border: none;
  color: #cbd5e1;
  padding: 0.82rem 1rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.35);
}

.nav-pill {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
}

.sidebar-footer {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sync-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: #cbd5e1;
}

.sync-badge .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.sync-badge .dot.online { background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.sync-badge .dot.offline { background: #fbbf24; }

/* Main Content */
.main-content {
  flex: 1;
  padding: 1.5rem 2rem;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.topbar h2 {
  font-size: 1.45rem;
  font-weight: 800;
}

.topbar p {
  font-size: 0.88rem;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Tabs */
.tab-section { display: none; animation: fadeIn 0.22s ease; }
.tab-section.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cards & Grids */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.card-header.between { justify-content: space-between; }
.card-header h4 { font-size: 0.98rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.card-header h4 i { color: var(--primary); }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
}

.kpi-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.kpi-icon.green { background: var(--primary-soft); color: var(--primary); }
.kpi-icon.red { background: var(--danger-soft); color: var(--danger); }
.kpi-icon.blue { background: var(--info-soft); color: var(--info); }
.kpi-icon.amber { background: var(--warning-soft); color: var(--warning); }

.kpi-label { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.kpi-info h3 { font-size: 1.55rem; font-weight: 800; line-height: 1.2; margin: 2px 0; }
.kpi-info small { font-size: 0.75rem; color: var(--muted); }

/* Charts */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.chart-card { margin-bottom: 0; }
.chart-card.wide { grid-column: span 2; }
.chart-wrapper { position: relative; height: 260px; width: 100%; }

/* Alerts List */
.alert-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.alert-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fafc;
  flex-wrap: wrap;
}

.alert-item.urgent {
  border-left: 4px solid var(--danger);
  background: #fff5f5;
}

/* Forms */
.form-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.form-section {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px dashed var(--border);
}
.form-section:last-of-type { border-bottom: none; margin-bottom: 0.5rem; }

.section-badge {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

/* Lock Banner untuk User Unit pada Bagian Khusus Kesling */
.kesling-lock-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  padding: 0.7rem 0.95rem;
  border-radius: 10px;
  font-size: 0.83rem;
  margin-bottom: 0.9rem;
}
.kesling-lock-banner.compact {
  padding: 0.55rem 0.75rem;
  font-size: 0.78rem;
}

.locked-field-area input:disabled,
.locked-field-area textarea:disabled,
.locked-field-area select:disabled {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.sig-canvas.disabled {
  background: #f1f5f9;
  border-color: #cbd5e1;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.65;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.span-2 { grid-column: span 2; }

.form-group { margin-bottom: 0.9rem; }
.form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #1e293b;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.input-group {
  display: flex;
  gap: 0.4rem;
}
.input-group select { width: 105px; flex-shrink: 0; }

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}
.checkbox-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.check-card {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid #cbd5e1;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  background: #f8fafc;
  margin: 0 !important;
  transition: all 0.15s;
}
.check-card:hover { border-color: var(--primary); background: #f0fdfa; }
.check-card input { width: 17px; height: 17px; accent-color: var(--primary); }

.sync-spillkit-box {
  background: #f0fdfa !important;
  border-color: #5eead4 !important;
  align-items: flex-start !important;
  padding: 0.9rem 1rem !important;
}
.sync-spillkit-box input { margin-top: 0.25rem; flex-shrink: 0; }

.duration-preview {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  color: var(--primary-dark);
  padding: 0.65rem 0.9rem;
  border-radius: 9px;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.label-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.sop-chips {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
}

.chip {
  border: 1px solid #99f6e4;
  background: #f0fdfa;
  color: var(--primary-dark);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.chip:hover { background: var(--primary); color: #fff; }

/* Signature Pad */
.sig-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  background: #f8fafc;
}

.sig-pad-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.sig-canvas {
  width: 100%;
  height: 150px;
  background: #fff;
  border: 1.5px dashed #94a3b8;
  border-radius: 10px;
  cursor: crosshair;
  touch-action: none;
  display: block;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 1.05rem;
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.87rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--accent); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1da851; }
.btn-outline { background: #fff; border-color: #cbd5e1; color: var(--text); }
.btn-outline:hover { background: #f8fafc; border-color: #94a3b8; }
.btn-danger-outline { background: #fff; border-color: #fca5a5; color: var(--danger); }
.btn-danger-outline:hover { background: var(--danger-soft); }
.btn-sm { padding: 0.42rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.45rem; font-size: 0.94rem; }
.btn-link { background: none; border: none; color: var(--primary); font-weight: 700; cursor: pointer; font-family: inherit; }
.btn-text-danger { background: none; border: none; color: var(--danger); font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.btn-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: #334155;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: all 0.15s;
}
.icon-btn:hover { background: #f1f5f9; color: var(--primary); border-color: var(--primary); }
.icon-btn.wa:hover { background: #dcfce7; color: #16a34a; border-color: #16a34a; }
.icon-btn.del:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }

/* Filters & Table */
.filter-grid-6 {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr 1.15fr 0.95fr;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.search-box { position: relative; }
.search-box i { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input { padding-left: 2.3rem; }

.filter-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.table-card { padding: 0; overflow: hidden; }
.table-responsive { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.data-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  text-align: left;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table tbody tr:hover { background: #f8fafc; }

.badge {
  display: inline-block;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-open { background: var(--warning-soft); color: #92400e; }
.badge-proses { background: var(--info-soft); color: #1e40af; }
.badge-selesai { background: #dcfce7; color: #166534; }
.badge-danger { background: var(--danger-soft); color: #991b1b; }
.badge-neutral { background: #e2e8f0; color: #334155; }

.file-btn { justify-content: center; }

/* Inventaris Spill Kit */
.subtab-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.subtab-pills {
  display: flex;
  gap: 0.45rem;
  background: #e2e8f0;
  padding: 0.3rem;
  border-radius: 12px;
  flex-wrap: wrap;
}

.subtab-btn {
  border: none;
  background: transparent;
  padding: 0.55rem 0.95rem;
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.18s;
}
.subtab-btn.active {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.subtab-panel { display: none; animation: fadeIn 0.2s ease; }
.subtab-panel.active { display: block; }

.spillkit-workspace {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.spillkit-workspace.single-unit {
  grid-template-columns: 1fr;
}

.sk-sidebar-card {
  position: sticky;
  top: 1rem;
}

.sk-unit-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 620px;
  overflow-y: auto;
  padding-right: 4px;
}

.sk-unit-item {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 0.75rem 0.85rem;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.16s;
  text-align: left;
  width: 100%;
  font-family: inherit;
}
.sk-unit-item:hover { border-color: var(--primary); background: #f0fdfa; }
.sk-unit-item.active {
  border-color: var(--primary);
  background: #ccfbf1;
  box-shadow: 0 3px 10px rgba(15, 118, 110, 0.12);
}

.sk-unit-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.sk-unit-name { font-weight: 800; font-size: 0.84rem; color: var(--text); }

.sk-progress-track {
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.35rem;
}
.sk-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
}
.sk-progress-fill.ok { background: #16a34a; }
.sk-progress-fill.warn { background: #f59e0b; }
.sk-progress-fill.bad { background: #dc2626; }

.sk-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.sk-meta-bar {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  align-items: end;
  background: #f8fafc;
  padding: 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.qty-stepper button {
  width: 30px;
  height: 30px;
  border: none;
  background: #f1f5f9;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}
.qty-stepper button:hover { background: var(--primary-soft); color: var(--primary-dark); }
.qty-stepper input {
  width: 48px;
  height: 30px;
  border: none;
  text-align: center;
  font-weight: 700;
  padding: 0;
  border-radius: 0;
}
.qty-stepper input:focus { box-shadow: none; }

.sk-item-input {
  padding: 0.35rem 0.55rem !important;
  font-size: 0.8rem !important;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 999;
}

.modal-dialog {
  background: #fff;
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

/* Auth Modal */
.auth-dialog {
  max-width: 460px;
  padding: 1.5rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 1.15rem;
}
.auth-header h3 { font-size: 1.12rem; font-weight: 800; margin-bottom: 0.25rem; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  background: #e2e8f0;
  padding: 0.3rem;
  border-radius: 11px;
  margin-bottom: 1.1rem;
}

.auth-tab-btn {
  border: none;
  background: transparent;
  padding: 0.6rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
}
.auth-tab-btn.active {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.auth-panel { display: none; }
.auth-panel.active { display: block; }

.auth-info-box {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  font-size: 0.78rem;
  margin-bottom: 1rem;
}
.auth-info-box.kesling {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.modal-header, .modal-footer {
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.modal-footer { border-bottom: none; border-top: 1px solid var(--border); justify-content: flex-end; flex-wrap: wrap; }
.modal-body { padding: 1.35rem; overflow-y: auto; }
.modal-close { background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--muted); line-height: 1; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}
.detail-item strong { display: block; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; }
.detail-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 0.85rem;
  border-radius: 10px;
  margin-bottom: 0.9rem;
  font-size: 0.88rem;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: #0f172a;
  color: #fff;
  padding: 0.8rem 1.15rem;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: fadeIn 0.2s ease;
}
.toast.success { background: #15803d; }
.toast.error { background: #b91c1c; }

/* Responsive Mobile / Android */
@media (max-width: 1180px) {
  .filter-grid-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
  .chart-card.wide { grid-column: span 1; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .spillkit-workspace { grid-template-columns: 1fr; }
  .sk-sidebar-card { position: static; }
  .sk-unit-list { max-height: 240px; }
  .sk-meta-bar { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .app-shell { flex-direction: column; padding-bottom: 72px; }
  .sidebar {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    padding: 0.4rem 0.5rem;
    z-index: 900;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.18);
  }
  .brand, .account-card, .sidebar-footer, .nav-pill { display: none; }
  .nav-menu { flex-direction: row; justify-content: space-around; }
  .nav-btn {
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.45rem 0.3rem;
    font-size: 0.67rem;
    flex: 1;
    align-items: center;
  }
  .main-content { padding: 1rem; }
  .grid-2, .grid-3, .grid-4, .checkbox-grid, .checkbox-grid.cols-3, .detail-grid, .filter-grid-6 {
    grid-template-columns: 1fr;
  }
  .span-2 { grid-column: span 1; }
}