/* =========================================================
   GLOBAL VARIABLE — THEME UT BLUE
   ========================================================= */
   :root {
    --bg: #f7f9fc;
    --card: #ffffff;
    --text: #1f2937;
  
    --second: #fde047; /* Kuning */
    --primary: #0055d0; /* Biru UT */
    --danger: #ef4444;
    --success: #22c55e;
    --muted: #6b7280;
    --brand: #0055d0;
    --border: #e5e7eb;
  
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  
    --container-max: 1200px;
    --container-pad: 16px;
    --gap: 18px;
  
    --btn-h: 40px; /* Tinggi tombol */
  }
  
  /* =========================================================
     RESET & BASICS
     ========================================================= */
  *,
  ::after,
  ::before {
    box-sizing: border-box;
  }
  
  body,
  html {
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
  }
  
  img {
    max-width: 100%;
    display: block;
  }
  
  a {
    color: var(--brand);
    text-decoration: none;
  }
  
  /* =========================================================
     HEADINGS
     ========================================================= */
  h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 18px;
    text-align: center;
  }
  
  h3 {
    font-weight: 600;
    color: var(--primary);
    margin-top: 0;
    margin-bottom: var(--gap);
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
  }
  
  /* =========================================================
     LABEL & INPUTS
     ========================================================= */
  label {
    color: var(--muted);
    display: block;
    margin: 6px 0 8px;
    font-size: 14px;
    text-align: left;
  }
  
  input[type="email"],
  input[type="number"],
  input[type="password"],
  input[type="text"],
  input[type="date"],
  select,
  textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--primary);
    border-radius: 6px;
    background: #fff;
    outline: none;
    font-size: 15px;
    margin-bottom: 8px;
  }
  
  input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: #000;
  }
  
  /* =========================================================
     CONTAINER & GRID
     ========================================================= */
  .container {
    width: min(var(--container-max), calc(100% - (var(--container-pad) * 2)));
    margin-inline: auto;
    padding-block: 24px;
  }
  
  .grid {
    display: grid;
    gap: var(--gap);
  }
  
  /* Form section & filter box */
  .form-section,
  .filter-box {
    padding: 18px;
    background: var(--card);
    border: 1px solid var(--second);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: var(--gap);
  }
  
  .filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap);
    align-items: center;
  }
  
  /* =========================================================
     BUTTONS
     ========================================================= */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--btn-h);
    padding-inline: 16px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    font-size: 0.95rem;
    font-weight: 500;
    gap: 6px;
  }
  
  .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.08);
  }
  
  /* Primary (Biru UT) */
  .btn--primary {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
  }
  
  .btn--primary:hover {
    background: #0047b1;
    border-color: #0047b1;
  }
  
  .btn--primary:active {
    background: #003a92;
    border-color: #003a92;
  }
  
  .btn--primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 85, 208, 0.35);
  }
  
  .btn--cancel {
    background: var(--muted);
    color: #fff;
    border-color: transparent;
  }
  
  .btn--edit {
    background: var(--second);
    border-color: transparent;
    color: var(--text);
    padding: 5px 10px;
    height: auto;
    font-size: 0.9rem;
  }
  
  /* =========================================================
     STATUS LABELS
     ========================================================= */
  .status-aman,
  .status-menipis,
  .status-kosong {
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9em;
  }
  
  .status-aman {
    background-color: #dcfce7;
    color: var(--success);
  }
  
  .status-menipis {
    background-color: #fef9c3;
    color: #ca8a04;
  }
  
  .status-kosong {
    background-color: #fee2e2;
    color: var(--danger);
  }
  
  /* =========================================================
     INFO BOX (Tracking)
     ========================================================= */
  .info-box {
    background-color: #eff6ff;
    border: 1px solid var(--brand);
    padding: 12px;
    border-radius: var(--radius);
    margin-top: 10px;
    font-size: 0.9em;
  }
  
  /* =========================================================
     DO Cards
     ========================================================= */
  .do-list {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--gap);
  }
  
  .do-card {
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: var(--shadow);
  }
  
  .do-card h4 {
    margin: 0 0 10px 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
  }
  
  .do-card ul {
    font-size: 0.9rem;
    padding-left: 20px;
    color: var(--muted);
  }
  
  /* =========================================================
     HEADER + NAVIGATION (TABS)
     ========================================================= */
  header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--card);
    border-bottom: 2px dotted var(--primary);
  }
  
  header > div {
    width: min(var(--container-max), calc(100% - (var(--container-pad) * 2)));
    margin-inline: auto;
    padding: 12px 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
  }
  
  header > div > a span {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
  }
  
  /* Menu Toggle (mobile) */
  #menu-toggle {
    opacity: 0;
    position: absolute;
    width: 1px;
    height: 1px;
  }
  
  /* Burger icon */
  header > div > label {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    cursor: pointer;
    position: relative;
    justify-content: center;
    align-items: center;
  }
  
  header > div > label::before,
  header > div > label::after {
    content: "";
    position: absolute;
    height: 2px;
    width: 26px;
    background: var(--text);
    left: 50%;
    transform: translateX(-50%);
  }
  
  header > div > label::before {
    top: 14px;
  }
  
  header > div > label::after {
    top: 26px;
  }
  
  nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
  }
  
  /* Tab links */
  nav a,
  nav summary {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 1rem;
  }
  
  nav a:hover,
  nav summary:hover {
    background: #eff4ff;
  }
  
  nav a.active {
    background: #eef4ff;
    border-color: rgba(0, 85, 208, 0.25);
    color: var(--primary);
    font-weight: 700;
  }
  
  /* =========================================================
     TABLE STYLE
     ========================================================= */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  
  thead th {
    background: #fff7ed;
    font-weight: 600;
    text-align: left;
    padding: 12px 14px;
  }
  
  tbody td {
    padding: 12px 14px;
    border-top: 1px solid var(--border);
  }
  
  tbody tr:nth-child(even) {
    background: #fafafa;
  }
  
  tbody tr:hover {
    background: #f3f6ff;
  }
  
  /* =========================================================
     RESPONSIVE BREAKPOINTS
     ========================================================= */
  @media (max-width: 720px) {
    /* Show burger */
    header > div > label {
      display: flex;
    }
  
    nav {
      display: none;
    }
  
    /* Dropdown mobile menu */
    #menu-toggle:checked ~ nav {
      display: flex;
      flex-direction: column;
      position: absolute;
      right: 0;
      top: calc(100% + 8px);
      width: 260px;
      background: var(--card);
      padding: 10px;
      border-radius: var(--radius);
      border: 1px solid var(--border);
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    }
  
    table {
      min-width: 680px;
    }
  }
  
  @media (max-width: 480px) {
    :root {
      --gap: 14px;
      --container-pad: 12px;
    }
  }
  
* { box-sizing: border-box; }
body { margin:0; font:16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial; background:#fff; color:#111827; }
header { padding:16px 20px; border-bottom:1px solid #e5e7eb; background:#fff; position:sticky; top:0; z-index:10; }
h1 { font-size:18px; margin:0 0 4px; }
nav button { margin-right:8px; padding:8px 12px; border:1px solid #e5e7eb; background:#fff; border-radius:8px; cursor:pointer; }
nav button.active { background:#111827; color:#fff; border-color:#111827; }
.container { padding:16px 20px; }

.controls { display:flex; flex-wrap:wrap; gap:8px 12px; margin-bottom:12px; align-items:flex-end; }
.controls .field { display:flex; flex-direction:column; }
.controls .field label { font-size:12px; color:#374151; margin-bottom:5px; }
input[type="text"], input[type="number"], input[type="date"], select, textarea {
  padding:8px 10px; border:1px solid #d1d5db; border-radius:8px; min-width:180px;
}
input.small { min-width:100px; width:100px; }

.actions {
  display: flex;
  flex-direction: row;
  gap: 8px;          /* jarak antar tombol */
  align-items: center;
}

.actions button { margin-right:6px; padding:6px 10px; border:1px solid #d1d5db; background:#fff; border-radius:6px; cursor:pointer; }
.actions .danger { border-color: var(--red); color:#fff; background:var(--danger); }
.actions .primary { border-color:#111827; background:var(--primary); color:#fff; }

.badge { display:inline-flex; align-items:center; gap:6px; padding:4px 8px; border-radius:999px; font-size:12px; font-weight:600; border:1px solid transparent; position:relative; }
.badge.safe { color:var(--green); border-color:var(--green); background: #f0fdf4; }
.badge.warn { color:#FFA500; border-color:#FFBF00; background:#fff7ed; }
.badge.empty { color:#fff; background:var(--danger); border-color:#fff7ed; }
.badge .dot { width:8px; height:8px; border-radius:999px; background: currentColor; }
.tooltip {
  position:absolute; top:125%; left:0; min-width:240px; background:#111827; color:#fff;
  padding:10px 12px; border-radius:8px; box-shadow:0 10px 25px rgba(0,0,0,.2);
  font-size:12px; z-index:100;
}
.tooltip:before { content:""; position:absolute; top:-6px; left:10px; width:8px; height:8px; transform:rotate(45deg); background:#111827; }

.kbd { font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  border:1px solid #e5e7eb; border-bottom-width:2px; padding:0 4px; border-radius:4px; font-size:12px; background:#fff; color:#111827;
}

/* modal */
.modal-mask { position:fixed; z-index:9998; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,.35); display:flex; align-items:center; justify-content:center; }
.modal-wrapper { width:100%; max-width:460px; }
.modal-container { background:#fff; border-radius:12px; overflow:hidden; border:1px solid #e5e7eb; }
.modal-header { padding:14px 16px; border-bottom:1px solid #e5e7eb; font-weight:700; }
.modal-body { padding:16px; }
.modal-footer { padding:12px 16px; border-top:1px solid #e5e7eb; display:flex; justify-content:flex-end; gap:8px; }
