﻿/* ============================================================
   SISIKON — Sistem Informasi Siap Kontrak
   UI modern: login, dashboard, modul kontrak, master data, cetak
   ============================================================ */

:root {
  --navy-950: #071a33;
  --navy-900: #0b1f3a;
  --navy-800: #102b4e;
  --navy-700: #163a66;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --teal-600: #0d9488;
  --teal-100: #ccfbf1;
  --amber-600: #d97706;
  --amber-100: #fef3c7;
  --purple-600: #7c3aed;
  --purple-100: #ede9fe;
  --rose-600: #e11d48;
  --rose-100: #ffe4e6;
  --green-600: #15803d;
  --green-100: #dcfce7;
  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #edf2f7;
  --bg: #f4f7fb;
  --card: #ffffff;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 10px 30px rgba(15, 23, 42, .07);
  --shadow-lg: 0 24px 60px rgba(7, 26, 51, .18);
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--navy-700); }
img, svg { max-width: 100%; }

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-size: 28px; line-height: 1.2; letter-spacing: -.6px; color: var(--navy-900); }
h2 { font-size: 18px; line-height: 1.3; letter-spacing: -.3px; color: var(--navy-900); }
h3 { font-size: 15.5px; color: var(--navy-900); }
.mono { font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace; font-size: 13px; }
.muted { color: var(--ink-500); }
.right { text-align: right; }
.center { text-align: center; }
.inline { display: inline; }

/* ============================ BUTTONS ============================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--navy-900);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .16s ease;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--blue-600), #1d4ed8);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .25);
}
.btn-primary:hover { color: #fff; box-shadow: 0 10px 22px rgba(37, 99, 235, .32); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-700); }
.btn-ghost:hover { border-color: #bfdbfe; color: var(--blue-600); }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--rose-600); }
.btn-danger-ghost:hover { background: var(--rose-100); }
.btn-sm { min-height: 32px; padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { min-height: 48px; padding: 13px 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-700);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.icon-btn:hover { border-color: #bfdbfe; color: var(--blue-600); }
.icon-btn.danger { color: var(--rose-600); border-color: transparent; background: transparent; }
.icon-btn.danger:hover { background: var(--rose-100); }
.icon-link {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--ink-400);
}
.icon-link:hover { background: var(--blue-100); color: var(--blue-600); }

/* ============================ FORMS ============================ */

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink-900);
  font: inherit;
  font-size: 13.5px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
}
textarea { resize: vertical; min-height: 44px; }
input::placeholder, textarea::placeholder { color: var(--ink-400); }
label { color: var(--ink-700); }

.form-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-field > span:first-child { font-size: 12.5px; font-weight: 600; color: var(--ink-700); }
.form-field em { color: var(--rose-600); font-style: normal; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.input-with-button { display: flex; gap: 8px; align-items: stretch; }
.input-with-button input { flex: 1; }
.input-with-button .btn { flex-shrink: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-700); cursor: pointer; }
.check input { width: auto; accent-color: var(--blue-600); }

/* ============================ ALERTS & BADGES ============================ */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.alert svg { width: 18px; height: 18px; margin-top: 1px; }
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-error { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .2px;
  white-space: nowrap;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-draft { background: #f1f5f9; color: #64748b; }
.badge-final { background: var(--green-100); color: var(--green-600); }
.badge-soft { background: var(--blue-100); color: var(--blue-600); }
.badge-soft::before { display: none; }

/* ============================ APP SHELL ============================ */

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 272px;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  color: #dbe7f5;
  background:
    radial-gradient(600px 280px at 0% 0%, rgba(37, 99, 235, .28), transparent 60%),
    radial-gradient(480px 260px at 100% 100%, rgba(13, 148, 136, .18), transparent 60%),
    linear-gradient(180deg, var(--navy-950), var(--navy-900) 55%, #0a1b31);
  border-right: 1px solid rgba(255, 255, 255, .06);
}
.sidebar::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, #000, transparent 65%);
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 26px;
  color: #fff;
}
.brand:hover { color: #fff; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(135deg, #3b82f6, #2563eb 55%, #0ea5a4);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .35), inset 0 1px 0 rgba(255,255,255,.25);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -.5px;
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-size: 18px; letter-spacing: .4px; }
.brand-copy small { margin-top: 3px; color: #9fb6cf; font-size: 10.5px; letter-spacing: .2px; }

.nav-section { position: relative; margin-bottom: 18px; }
.nav-label {
  display: block;
  padding: 0 12px;
  margin-bottom: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #6f8cac;
}
.nav { display: grid; gap: 4px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #b9cde2;
  font-size: 13.5px;
  font-weight: 500;
  transition: all .15s ease;
}
.nav-link svg { width: 18px; height: 18px; opacity: .9; }
.nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-link.is-active {
  background: linear-gradient(90deg, rgba(59, 130, 246, .26), rgba(59, 130, 246, .08));
  color: #fff;
  box-shadow: inset 3px 0 0 #60a5fa;
}
.nav-link.is-active svg { color: #93c5fd; opacity: 1; }

.sidebar-bottom { position: relative; margin-top: auto; display: grid; gap: 10px; }
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
}
.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.avatar-sm { width: 30px; height: 30px; font-size: 12.5px; }
.user-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.user-meta strong { color: #fff; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { color: #8fa8c2; font-size: 11px; }
.logout-form { display: block; }
.logout-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  background: transparent;
  color: #b9cde2;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.logout-btn:hover { background: rgba(225, 29, 72, .14); border-color: rgba(251, 113, 133, .3); color: #fecdd3; }
.logout-btn svg { width: 17px; height: 17px; }

.sidebar-overlay { display: none; }

.app-main {
  flex: 1;
  min-width: 0;
  margin-left: 272px;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 68px;
  padding: 0 30px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 14px; min-width: 0; }
.menu-toggle { display: none; }
.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-500); min-width: 0; }
.breadcrumb span { font-weight: 700; color: var(--navy-900); letter-spacing: .3px; }
.breadcrumb svg { width: 14px; height: 14px; color: var(--ink-400); }
.breadcrumb strong { font-weight: 500; color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-date { font-size: 12.5px; color: var(--ink-500); }
.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-700);
  font-size: 12.5px;
  font-weight: 600;
  background: #fff;
}
.topbar-user:hover { border-color: #bfdbfe; color: var(--blue-600); }

.content {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 30px;
  flex: 1;
}

/* ============================ PAGE HEAD ============================ */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.eyebrow {
  display: block;
  margin-bottom: 7px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--blue-600);
}
.page-head h1 { margin: 0 0 5px; }
.page-head p { margin: 0; color: var(--ink-500); max-width: 720px; }
.page-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

/* ============================ CARDS / PANELS ============================ */

.panel, .form-section, .stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.panel { padding: 22px; margin-bottom: 20px; }
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.panel-head h2 { margin: 0 0 3px; }
.panel-head p { margin: 0; color: var(--ink-500); font-size: 13px; }

.form-section { padding: 24px; margin-bottom: 20px; }
.section-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.section-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--blue-100);
  color: var(--blue-600);
  flex-shrink: 0;
}
.section-icon svg { width: 20px; height: 20px; }
.section-head h2 { margin: 0 0 2px; }
.section-head p { margin: 0; color: var(--ink-500); font-size: 13px; }

/* ============================ STATS ============================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  transition: transform .16s ease, box-shadow .16s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon-blue { background: var(--blue-100); color: var(--blue-600); }
.stat-icon-green { background: var(--teal-100); color: var(--teal-600); }
.stat-icon-amber { background: var(--amber-100); color: var(--amber-600); }
.stat-icon-purple { background: var(--purple-100); color: var(--purple-600); }
.stat-label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-500); }
.stat-card strong { display: block; margin: 3px 0 1px; font-size: 22px; line-height: 1.2; letter-spacing: -.5px; color: var(--navy-900); }
.stat-card small { color: var(--ink-400); font-size: 11.5px; }

/* ============================ DASHBOARD ============================ */

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, .85fr); gap: 20px; align-items: start; }
.dashboard-side { display: grid; gap: 20px; }
.quick-actions { display: grid; gap: 9px; }
.quick-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-900);
  transition: all .15s ease;
}
.quick-action:hover { border-color: #bfdbfe; background: #f8fbff; transform: translateX(2px); }
.quick-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; }
.quick-icon svg { width: 18px; height: 18px; }
.quick-icon-blue { background: var(--blue-100); color: var(--blue-600); }
.quick-icon-green { background: var(--teal-100); color: var(--teal-600); }
.quick-icon-purple { background: var(--purple-100); color: var(--purple-600); }
.quick-action strong { display: block; font-size: 13px; }
.quick-action small { color: var(--ink-500); font-size: 11.5px; }
.info-panel { background: linear-gradient(145deg, #0b1f3a, #123a63); border: none; color: #dbe7f5; }
.info-panel h2 { color: #fff; }
.info-panel p { color: #b9cde2; font-size: 13px; }
.info-panel .btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.16); color: #fff; }
.info-panel .btn:hover { background: rgba(255,255,255,.18); color: #fff; }

/* ============================ TABLES ============================ */

.table-wrap { overflow-x: auto; border-radius: 12px; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink-500);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}
.table th:first-child { border-top-left-radius: 10px; }
.table th:last-child { border-top-right-radius: 10px; }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table-hover tbody tr { transition: background .12s ease; }
.table-hover tbody tr:hover { background: #f8fbff; }
.row-title { display: block; color: var(--navy-900); font-weight: 600; line-height: 1.35; }
.row-title:hover { color: var(--blue-600); }
.row-sub { display: block; margin-top: 3px; color: var(--ink-400); font-size: 11.5px; }
.cell-main { display: block; font-weight: 600; }
.row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }

/* ============================ TOOLBAR ============================ */

.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 240px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-400);
}
.search-box svg { width: 17px; height: 17px; }
.search-box input { border: none; box-shadow: none; padding: 10px 0; background: transparent; }
.search-box input:focus { box-shadow: none; }
.select-box { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-500); }
.select-box select { width: auto; min-width: 120px; padding: 9px 30px 9px 11px; }
.toolbar-count { margin-left: auto; font-size: 12.5px; color: var(--ink-500); white-space: nowrap; }

/* ============================ EMPTY ============================ */

.empty-state { padding: 44px 20px; text-align: center; color: var(--ink-500); }
.empty-state h3 { margin: 10px 0 4px; }
.empty-state p { margin: 0 0 16px; font-size: 13px; }
.empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto;
  border-radius: 16px;
  background: var(--blue-100);
  color: var(--blue-600);
}
.empty-icon svg { width: 26px; height: 26px; }
.empty-filter { padding: 26px 12px; }

/* ============================ SPLIT / ERRORS ============================ */

.split-grid { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(0, 1.4fr); gap: 20px; align-items: start; }
.error-page { text-align: center; padding: 60px 24px; }
.error-code { display: inline-block; font-size: 64px; font-weight: 800; letter-spacing: -3px; color: var(--blue-100); }
.error-page h1 { margin: -12px 0 8px; }
.error-page p { color: var(--ink-500); margin-bottom: 20px; }
.error-page .page-actions { justify-content: center; }

/* ============================ ITEM TABLE ============================ */

.item-table { width: 100%; min-width: 1120px; border-collapse: collapse; }
.item-table th {
  padding: 9px 7px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-500);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}
.item-table td { padding: 7px 5px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.item-table input { padding: 8px 9px; font-size: 12.5px; }
.item-table .item-num { text-align: right; min-width: 82px; }
.item-total { padding-top: 15px !important; font-size: 12.5px; white-space: nowrap; }
.item-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.item-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}
.item-summary > div { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.item-summary span { color: var(--ink-500); font-size: 12.5px; }
.item-summary strong { font-size: 15px; color: var(--navy-900); white-space: nowrap; }
.item-summary .grand { padding-left: 12px; border-left: 2px solid var(--blue-200, #bfdbfe); }
.item-summary .grand strong { color: var(--blue-600); font-size: 17px; }

/* ============================ FORM ACTIONS ============================ */

.form-actions {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin: 0 -4px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, .06);
}

/* ============================ LOGIN ============================ */

.login-page {
  min-height: 100vh;
  overflow-x: hidden;
  background: #061426;
}
.login-bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.login-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 600px at 8% 8%, rgba(37, 99, 235, .30), transparent 60%),
    radial-gradient(800px 600px at 92% 92%, rgba(13, 148, 136, .22), transparent 60%),
    linear-gradient(135deg, #061426, #0b1f3a 50%, #102b4e);
}
.glow { position: absolute; border-radius: 50%; filter: blur(8px); opacity: .55; }
.glow-1 { width: 420px; height: 420px; top: -160px; left: -120px; background: radial-gradient(circle, rgba(59,130,246,.55), transparent 65%); }
.glow-2 { width: 520px; height: 520px; bottom: -220px; right: -160px; background: radial-gradient(circle, rgba(20,184,166,.38), transparent 65%); }
.grid-lines {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 78%);
}
.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  min-height: 100vh;
}
.login-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  padding: 54px clamp(32px, 6vw, 84px);
  color: #fff;
}
.login-brand { display: flex; align-items: center; gap: 14px; }
.brand-mark-lg { width: 52px; height: 52px; border-radius: 15px; font-size: 26px; }
.login-brand strong { display: block; font-size: 21px; letter-spacing: .5px; }
.login-brand small { display: block; color: #9fb6cf; font-size: 11px; letter-spacing: .3px; }
.login-hero-copy { max-width: 620px; }
.login-hero-copy .eyebrow { color: #93c5fd; }
.login-hero-copy h1 { margin: 0 0 14px; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.12; letter-spacing: -1.2px; color: #fff; }
.login-hero-copy p { margin: 0; max-width: 540px; color: #b9cde2; font-size: 15.5px; line-height: 1.65; }
.login-features { display: grid; gap: 12px; max-width: 560px; margin: 0; padding: 0; list-style: none; }
.login-features li { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid rgba(255,255,255,.10); border-radius: 13px; background: rgba(255,255,255,.05); backdrop-filter: blur(6px); }
.feature-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(59,130,246,.22); color: #93c5fd; flex-shrink: 0; }
.feature-icon svg { width: 18px; height: 18px; }
.login-features strong { display: block; font-size: 13px; }
.login-features small { display: block; color: #9fb6cf; font-size: 11.5px; }
.login-hero-footer { display: flex; justify-content: space-between; gap: 14px; color: #6f8cac; font-size: 11.5px; }
.login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px clamp(22px, 4vw, 56px); }
.login-card {
  width: 100%;
  max-width: 440px;
  padding: 34px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.97);
  box-shadow: var(--shadow-lg);
}
.login-card-head { margin-bottom: 22px; }
.login-card-head h2 { margin: 0 0 5px; font-size: 24px; letter-spacing: -.5px; }
.login-card-head p { margin: 0; color: var(--ink-500); font-size: 13px; }
.login-form { display: flex; flex-direction: column; gap: 15px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg { position: absolute; left: 12px; width: 17px; height: 17px; color: var(--ink-400); pointer-events: none; }
.input-wrap input { padding-left: 38px; }
.input-wrap input[type="password"], .input-wrap input#loginPassword { padding-right: 44px; }
.password-toggle {
  position: absolute;
  right: 6px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-400);
  cursor: pointer;
}
.password-toggle:hover { background: #f1f5f9; color: var(--blue-600); }
.login-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.login-hint { color: var(--ink-400); font-size: 11.5px; }
.login-footnote { margin: 18px 0 0; text-align: center; color: var(--ink-400); font-size: 11.5px; }
.login-copyright { margin-top: 22px; color: #6f8cac; font-size: 11px; text-align: center; }

/* ============================ CONTRACT PRINT ============================ */

.contract-body { background: #e7ebf0; font-family: var(--font); }
.contract-toolbar {
  max-width: 210mm;
  margin: 18px auto 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.contract-toolbar .muted { display: block; font-size: 12px; }
.doc-page {
  width: 210mm;
  min-height: 330mm;
  margin: 0 auto 14px;
  padding: 16mm 18mm;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .14);
  font-family: "Times New Roman", Times, serif;
  font-size: 11pt;
  line-height: 1.42;
  color: #111;
}
.kop { text-align: center; border-bottom: 3px double #111; padding-bottom: 3mm; margin-bottom: 5mm; }
.kop-line1 { font-size: 14pt; font-weight: 700; letter-spacing: .3px; }
.kop-line2 { font-size: 13pt; font-weight: 700; }
.kop-addr { font-size: 8.5pt; margin-top: 1mm; }
.kop-city { font-size: 9pt; font-weight: 700; letter-spacing: 1px; }
.doc-title { text-align: center; font-weight: 700; font-size: 13pt; text-decoration: underline; margin: 3mm 0 1mm; }
.doc-subtitle { text-align: center; font-weight: 700; font-size: 11pt; margin: 1mm 0 4mm; text-transform: uppercase; }
.doc-number { text-align: center; font-size: 10.5pt; margin-bottom: 4mm; }
.cover-work { text-align: center; font-size: 15pt; margin: 5mm 0 6mm; text-transform: uppercase; line-height: 1.3; }
.field-table { width: 100%; border-collapse: collapse; font-size: 10.5pt; }
.field-table td { padding: 1.1mm 1mm; vertical-align: top; }
.field-table .label { width: 33%; }
.field-table .colon { width: 3%; }
.field-table.tight { font-size: 9.5pt; }
.field-table.tight .label { width: 22%; white-space: normal; }
.cover-table .label { width: 36%; }
.terbilang { font-style: italic; font-size: 9.5pt; }
.party-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; margin: 4mm 0; }
.party-title { font-weight: 700; font-size: 9.5pt; text-transform: uppercase; margin-bottom: 1.5mm; }
.doc-table { width: 100%; border-collapse: collapse; margin: 4mm 0; font-size: 10pt; }
.doc-table th, .doc-table td { border: 1px solid #333; padding: 1.5mm 2mm; vertical-align: top; }
.doc-table th { background: #f0f0f0; text-align: center; font-weight: 700; }
.doc-table .right { text-align: right; }
.doc-table .center { text-align: center; }
.doc-table .c-no { width: 8mm; }
.doc-table .c-qty { width: 18mm; }
.doc-table .c-unit { width: 18mm; }
.doc-table .c-money { width: 30mm; }
.spec { font-size: 9pt; color: #333; }
.doc-note { font-size: 9.5pt; text-align: justify; margin: 3mm 0; }
.sign-date { text-align: right; margin: 7mm 0 0; }
.sign-grid { display: flex; justify-content: space-between; margin-top: 6mm; }
.sign-box { width: 45%; text-align: center; }
.sign-space { height: 18mm; }
.sign-name { font-weight: 700; text-decoration: underline; }
.cover-footer { margin-top: 6mm; font-size: 10pt; }

/* ============================ RESPONSIVE ============================ */

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .split-grid { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .app-main { margin-left: 0; }
  .menu-toggle { display: inline-grid; }
  .sidebar-overlay { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(7, 26, 51, .45); opacity: 0; pointer-events: none; transition: opacity .22s ease; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-overlay { opacity: 1; pointer-events: auto; }
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-panel { min-height: 100vh; }
  .content { padding: 22px; }
  .topbar { padding: 0 20px; }
}

@media (max-width: 720px) {
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .form-grid, .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .stats-grid { grid-template-columns: 1fr; }
  .item-summary { grid-template-columns: 1fr; }
  .item-summary .grand { padding-left: 0; border-left: none; border-top: 1px solid var(--line); padding-top: 10px; }
  .topbar-date { display: none; }
  .topbar-user span:last-child { display: none; }
  .toolbar-count { margin-left: 0; }
  .login-card { padding: 26px 20px; }
  .contract-toolbar { flex-direction: column; align-items: flex-start; }
  .doc-page { width: 100%; min-height: 0; padding: 16px; }
}

/* ============================ PRINT ============================ */

@media print {
  @page { size: 210mm 330mm; margin: 16mm 18mm; }
  body { background: #fff !important; }
  body.contract-body { background: #fff; }
  .sidebar, .topbar, .footer, .no-print, .contract-toolbar, .alert { display: none !important; }
  .app-main { margin-left: 0; }
  .content { padding: 0; max-width: none; }
  .doc-page { width: auto; min-height: 0; margin: 0; padding: 0; box-shadow: none; page-break-after: always; }
  .doc-page:last-child { page-break-after: auto; }
  .panel, .form-section, .stat-card, .card { box-shadow: none; }
  a { color: #111; }
}

/* Penyempurnaan tata letak */
.row-actions { flex-wrap: nowrap; }
.contract-toolbar > div:first-child { min-width: 0; }
.contract-toolbar .muted { max-width: 480px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contract-toolbar .page-actions { flex-wrap: nowrap; }
@media (max-width: 760px) {
  .contract-toolbar { flex-direction: column; align-items: flex-start; }
  .contract-toolbar .page-actions { flex-wrap: wrap; width: 100%; }
  .contract-toolbar .muted { white-space: normal; max-width: 100%; }
}

/* ===== Penyesuaian cetak agar setiap dokumen tepat 1 halaman A4 ===== */
@media print {
  @page { size: 210mm 330mm; margin: 12mm 15mm; }
  .doc-page { font-size: 9.5pt; line-height: 1.32; }
  .kop { padding-bottom: 2mm; margin-bottom: 3mm; }
  .kop-line1 { font-size: 12.5pt; }
  .kop-line2 { font-size: 11.5pt; }
  .kop-addr { font-size: 8pt; }
  .kop-city { font-size: 8.5pt; }
  .doc-title { font-size: 12pt; margin: 2mm 0 1mm; }
  .doc-subtitle { font-size: 10pt; margin: 1mm 0 2.5mm; }
  .doc-number { font-size: 9.5pt; margin-bottom: 2.5mm; }
  .cover-work { font-size: 13.5pt; margin: 3mm 0 4mm; }
  .field-table { font-size: 9.5pt; }
  .field-table td { padding: 0.7mm 0.8mm; }
  .field-table.tight { font-size: 8.8pt; }
  .doc-table { font-size: 9pt; margin: 2.5mm 0; }
  .doc-table th, .doc-table td { padding: 1.1mm 1.4mm; }
  .doc-note { font-size: 8.8pt; margin: 2mm 0; }
  .sign-date { margin: 4mm 0 0; }
  .sign-grid { margin-top: 3mm; }
  .sign-space { height: 13mm; }
  .sign-box { font-size: 9.5pt; }
  .cover-footer { margin-top: 4mm; font-size: 9.5pt; }
}

