/* =========================================================
   AMS PTPN — SMAT Dashboard Stylesheet (v4)
   Perubahan v4:
   - Grafik entitas: grid layout dinamis (1 baris) + dashed border
   - Halaman Edit Data Aset: toolbar, form modal, import modal, toast
   ========================================================= */

:root {
  --green-950: #052018;
  --green-900: #0A3324;
  --green-800: #0F4A37;
  --green-700: #196B4F;
  --green-600: #1F8A65;
  --green-500: #2DB48A;
  --green-100: #D1EBE0;
  --green-50:  #E8F5EE;
  --gold-700: #8C6A14;
  --gold-600: #B5891F;
  --gold-500: #C9A227;
  --gold-400: #DEB94D;
  --gold-100: #F5E9C2;
  --gold-50:  #FBF5E1;
  --purple-600: #5A4A8A;
  --purple-700: #463972;
  --red-600: #B83A3A;
  --red-700: #8B2A2A;
  --red-100: #FCEBEB;
  --blue-600: #2C6BB8;
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-alt: #FAFAF7;
  --gray-50:  #F6F5F1;
  --gray-100: #EDEBE4;
  --gray-200: #DBD8CE;
  --gray-300: #B9B6AB;
  --gray-500: #807D70;
  --gray-700: #57544A;
  --gray-900: #1F1E1A;
  --border: rgba(10, 51, 36, 0.10);
  --border-strong: rgba(10, 51, 36, 0.18);
  --shadow-sm: 0 1px 2px rgba(10, 51, 36, 0.04);
  --shadow-md: 0 2px 6px rgba(10, 51, 36, 0.06);
  --shadow-lg: 0 8px 24px rgba(10, 51, 36, 0.12);
  --font: 'Trebuchet MS', 'Lucida Grande', Tahoma, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: var(--font); }
html, body {
  width: 100%;
  background: var(--bg);
  color: var(--gray-900);
  font-size: 12px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

body.page-dashboard { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
body.page-detail, body.page-edit { min-height: 100vh; overflow-x: hidden; overflow-y: auto; }

/* ============ HEADER ============ */
.app-header { background: var(--green-950); color: white; border-bottom: 2px solid var(--gold-500); flex: 0 0 auto; }
.header-row { padding: 8px 18px; display: grid; grid-template-columns: 280px 1fr auto; gap: 18px; align-items: center; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo-img { width: 38px; height: 38px; flex-shrink: 0; }
.brand-text h1 { font-size: 17px; font-weight: 700; letter-spacing: 0.3px; color: white; }
.brand-text p { font-size: 9px; font-weight: 700; color: rgba(245, 233, 194, 0.7); text-transform: uppercase; letter-spacing: 1px; margin-top: 1px; }
.header-filters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hf-group label { display: block; font-size: 9px; font-weight: 700; color: var(--gold-400); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 2px; }
.hf-group select {
  width: 100%; padding: 5px 22px 5px 8px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(245, 233, 194, 0.25);
  color: white; border-radius: 3px; font-size: 11px; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 3.5l3 3 3-3' stroke='%23DEB94D' fill='none' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat; background-position: right 6px center;
}
.hf-group select:focus { outline: none; border-color: var(--gold-500); }
.hf-group select option { background: var(--green-900); color: white; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.user-pill { display: flex; align-items: center; gap: 6px; background: rgba(245, 233, 194, 0.06); border: 1px solid rgba(245, 233, 194, 0.15); padding: 4px 9px; border-radius: 18px; font-size: 11px; }
.user-pill .ico { width: 20px; height: 20px; border-radius: 50%; background: var(--gold-500); color: var(--green-950); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 10px; }
.user-pill .uname { font-weight: 700; font-size: 11px; line-height: 1.1; }
.user-pill .role { color: var(--gold-400); font-weight: 600; font-size: 9px; line-height: 1.1; }
.datetime { font-size: 10px; color: rgba(255,255,255,0.7); letter-spacing: 0.3px; font-weight: 600; }
.btn-header { padding: 5px 10px; background: transparent; border: 1px solid rgba(245, 233, 194, 0.3); color: var(--gold-400); border-radius: 3px; font-size: 11px; font-weight: 700; cursor: pointer; }
.btn-header:hover { background: rgba(245, 233, 194, 0.1); }

/* ============ TAB BAR + DROPDOWN ============ */
.tabs-bar { background: var(--surface); border-bottom: 1px solid var(--border); flex: 0 0 auto; position: relative; z-index: 100; }
.tabs-inner { padding: 0 18px; display: flex; gap: 4px; }
.tab { padding: 7px 14px; font-size: 12px; font-weight: 700; color: var(--green-900); cursor: pointer; border-bottom: 3px solid var(--gold-500); margin-bottom: -1px; display: flex; align-items: center; gap: 6px; user-select: none; }
.tab-ico { font-size: 13px; line-height: 1; }
.dd-caret { font-size: 9px; margin-left: 2px; color: var(--gold-600); transition: transform 0.15s; }
.tab-dropdown { position: relative; }
.tab-dropdown.open .dd-caret { transform: rotate(180deg); }
.dd-menu { position: absolute; top: 100%; left: 0; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; box-shadow: var(--shadow-lg); min-width: 180px; display: none; z-index: 200; overflow: hidden; margin-top: 1px; }
.tab-dropdown:hover .dd-menu, .tab-dropdown.open .dd-menu { display: block; }
.dd-item { display: flex; align-items: center; gap: 8px; padding: 9px 14px; font-size: 12px; font-weight: 600; color: var(--gray-900); text-decoration: none; border-bottom: 1px solid var(--border); background: transparent; transition: background 0.1s; }
.dd-item:last-child { border-bottom: none; }
.dd-item:hover { background: var(--green-50); color: var(--green-900); }
.dd-item.active { background: var(--gold-50); color: var(--green-900); font-weight: 700; border-left: 3px solid var(--gold-500); padding-left: 11px; }
.dd-ico { font-size: 13px; }

/* ============ DASHBOARD GRID ============ */
.container { flex: 1 1 auto; padding: 8px 12px; display: grid; grid-template-rows: 1fr 1fr; gap: 8px; min-height: 0; overflow: hidden; background: var(--bg); }
.row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; min-height: 0; }

/* ============ CARD ============ */
.card { background: var(--surface); border-radius: 6px; border: 1px solid var(--border); border-left: 3px solid var(--green-700); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.card-head { padding: 6px 12px 5px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; background: var(--surface-alt); }
.card-title { font-size: 13px; font-weight: 700; color: var(--green-900); display: flex; align-items: center; gap: 7px; }
.card-title::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green-700); }
.card-title.gold::before { background: var(--gold-500); }
.card-title.purple::before { background: var(--purple-600); }
.card-meta { font-size: 10px; color: var(--gray-500); font-weight: 700; }
.card-body { padding: 10px 12px; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.card.gold { border-left-color: var(--gold-500); }
.card.purple { border-left-color: var(--purple-600); }

/* ============ INFO MINI STATS ============ */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; flex: 1; min-height: 0; }
.mini-stat { border-radius: 5px; padding: 8px 11px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.mini-stat .ms-top { display: flex; justify-content: space-between; align-items: flex-start; }
.mini-stat .ms-label { font-size: 9px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; opacity: 0.8; }
.mini-stat .ms-icon { font-size: 14px; opacity: 0.5; }
.mini-stat .ms-value { font-size: 22px; font-weight: 700; line-height: 1; letter-spacing: -0.3px; }
.mini-stat .ms-unit { font-size: 9px; font-weight: 600; margin-top: 3px; opacity: 0.85; font-style: italic; }
.ms-green { background: var(--green-800); color: var(--gold-50); }
.ms-gold  { background: var(--gold-500); color: var(--green-950); }
.ms-purple{ background: var(--purple-600); color: white; }
.ms-green2{ background: var(--green-700); color: var(--gold-50); }

/* ============ MAP + CONTROLS ============ */
.map-wrap { flex: 1; position: relative; border-radius: 3px; overflow: hidden; min-height: 0; }
#map { width: 100%; height: 100%; }
.card.has-map .card-body { padding: 0; }
.map-controls { position: absolute; top: 8px; right: 8px; z-index: 500; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.map-ctrl-group { display: flex; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 5px; box-shadow: var(--shadow-md); overflow: hidden; }
.map-ctrl-btn { width: 32px; height: 32px; border: none; background: var(--surface); cursor: pointer; font-size: 15px; color: var(--gray-700); display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--border); transition: all 0.15s; }
.map-ctrl-btn:last-child { border-right: none; }
.map-ctrl-btn:hover { background: var(--green-50); color: var(--green-900); }
.map-ctrl-btn.active { background: var(--green-700); color: white; }
.map-fs-btn { border: 1px solid var(--border-strong); border-radius: 5px; box-shadow: var(--shadow-md); font-size: 16px; font-weight: 700; }
.map-wrap.fullscreen { position: fixed !important; top: 0; left: 0; width: 100vw !important; height: 100vh !important; z-index: 9000; border-radius: 0; }
.map-legend { position: absolute; bottom: 8px; left: 8px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; padding: 6px 9px; font-size: 10px; z-index: 500; box-shadow: var(--shadow-md); }
.map-legend .ml-title { font-size: 8px; font-weight: 700; letter-spacing: 0.8px; color: var(--gray-700); text-transform: uppercase; margin-bottom: 3px; }
.map-legend .ml-item { display: flex; align-items: center; gap: 5px; margin: 2px 0; color: var(--gray-700); font-size: 10px; font-weight: 600; }
.map-legend .ml-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid white; box-shadow: 0 0 0 1px rgba(0,0,0,0.15); }

/* ============ ENTITAS LIST (Dashboard) ============ */
.ent-list { display: flex; flex-direction: column; gap: 5px; flex: 1; justify-content: space-around; min-height: 0; }
.ent-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 7px; }
.ent-logo { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ent-logo img { width: 100%; height: 100%; object-fit: contain; }
.ent-body { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.ent-name { font-size: 12px; font-weight: 700; color: var(--green-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.1px; }
.ent-sub { font-size: 10px; color: var(--gray-500); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ent-pct { font-size: 14px; font-weight: 700; color: var(--gold-600); text-align: right; letter-spacing: -0.3px; flex-shrink: 0; min-width: 38px; }
.ent-bar-row { grid-column: 1 / -1; margin-top: -2px; }
.ent-bar-track { height: 3px; background: var(--gray-100); border-radius: 2px; overflow: hidden; }
.ent-bar-fill { height: 100%; border-radius: 2px; transition: width 0.6s; }

/* ============ STATUS SERTIFIKASI ============ */
.status-infografis { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.status-bar-wrap { flex: 0 0 auto; }
.status-bar { display: flex; height: 24px; border-radius: 5px; overflow: hidden; background: var(--gray-100); box-shadow: inset 0 1px 2px rgba(0,0,0,0.06); }
.status-bar .seg { display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 10px; position: relative; transition: flex 0.5s ease; min-width: 0; overflow: hidden; white-space: nowrap; text-shadow: 0 1px 1px rgba(0,0,0,0.2); }
.status-bar .seg.aktif    { background: linear-gradient(135deg, #1F8A65 0%, #2DB48A 100%); }
.status-bar .seg.berakhir { background: linear-gradient(135deg, #C9A227 0%, #DEB94D 100%); color: var(--green-950); text-shadow: 0 1px 1px rgba(255,255,255,0.2); }
.status-bar .seg.belum    { background: linear-gradient(135deg, #B83A3A 0%, #D85A30 100%); }
.status-bar .seg.eks_hak  { background: linear-gradient(135deg, #5A4A8A 0%, #7B68A8 100%); }
.status-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; flex: 1; min-height: 0; }
.status-card { padding: 7px 9px; border-radius: 5px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid; display: flex; flex-direction: column; justify-content: space-between; }
.status-card.aktif    { border-left-color: #1F8A65; background: linear-gradient(90deg, rgba(31,138,101,0.05), transparent 60%); }
.status-card.berakhir { border-left-color: #C9A227; background: linear-gradient(90deg, rgba(201,162,39,0.08), transparent 60%); }
.status-card.belum    { border-left-color: #B83A3A; background: linear-gradient(90deg, rgba(184,58,58,0.06), transparent 60%); }
.status-card.eks_hak  { border-left-color: #5A4A8A; background: linear-gradient(90deg, rgba(90,74,138,0.06), transparent 60%); }
.status-card-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.status-card-name { font-size: 11px; font-weight: 700; color: var(--green-900); }
.status-card-pct { font-size: 18px; font-weight: 700; letter-spacing: -0.5px; }
.status-card.aktif .status-card-pct    { color: #1F8A65; }
.status-card.berakhir .status-card-pct { color: var(--gold-700); }
.status-card.belum .status-card-pct    { color: #B83A3A; }
.status-card.eks_hak .status-card-pct  { color: var(--purple-600); }
.status-card-meta { display: flex; justify-content: space-between; align-items: baseline; font-size: 10px; color: var(--gray-700); font-weight: 600; }
.status-card-meta .luas { color: var(--gray-900); font-weight: 700; }

/* ============ JENIS HAK ============ */
.hak-infografis { display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0; justify-content: space-around; }
.hak-row-v2 { display: grid; grid-template-columns: 50px 1fr; align-items: center; gap: 8px; }
.hak-badge { display: flex; align-items: center; justify-content: center; height: 28px; border-radius: 4px; font-size: 12px; font-weight: 700; color: white; letter-spacing: 0.3px; box-shadow: 0 1px 2px rgba(0,0,0,0.12); }
.hak-content { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hak-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.hak-luas-text { font-size: 11px; color: var(--gray-700); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hak-luas-text strong { color: var(--gray-900); font-weight: 700; font-size: 12px; }
.hak-pct-v2 { font-size: 13px; font-weight: 700; letter-spacing: -0.3px; white-space: nowrap; }
.hak-bar-wrap { height: 5px; background: var(--gray-100); border-radius: 3px; overflow: hidden; }
.hak-bar-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; position: relative; }
.hak-bar-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 60%, rgba(255,255,255,0.3) 100%); }

/* ============ DASAR PEROLEHAN ============ */
.dp-chart { position: relative; flex: 1; min-height: 0; }

/* ============ LOADING ============ */
#loading { position: fixed; inset: 0; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9999; gap: 12px; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--gray-200); border-top-color: var(--green-700); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 13px; color: var(--green-800); font-weight: 700; }

/* ============ LEAFLET ============ */
.leaflet-container { background: #F0EDE5; font-family: var(--font); }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background-color: var(--green-700) !important; color: white !important; font-weight: 700 !important; border: 2px solid var(--gold-500) !important; }
.marker-cluster-small { background-color: rgba(31, 138, 101, 0.4) !important; }
.marker-cluster-medium { background-color: rgba(201, 162, 39, 0.4) !important; }
.marker-cluster-medium div { background-color: var(--gold-600) !important; border-color: var(--green-700) !important; color: var(--green-950) !important; }
.marker-cluster-large { background-color: rgba(184, 58, 58, 0.4) !important; }
.marker-cluster-large div { background-color: var(--red-600) !important; border-color: var(--gold-500) !important; }
.leaflet-popup-content { font-family: var(--font); font-size: 11px; margin: 8px 10px; }
.popup-title { font-size: 13px; font-weight: 700; color: var(--green-900); margin-bottom: 3px; }
.popup-sub { font-size: 10px; color: var(--gray-500); margin-bottom: 6px; font-weight: 600; }
.popup-grid { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; font-size: 10px; }
.popup-grid dt { color: var(--gray-500); font-weight: 600; }
.popup-grid dd { color: var(--gray-900); font-weight: 700; }
.popup-badge { display: inline-block; padding: 1px 6px; border-radius: 8px; font-size: 9px; font-weight: 700; }

/* =====================================================
   DETAIL / EDIT PAGE
   ===================================================== */
.detail-container { padding: 14px 18px 40px; max-width: 1700px; margin: 0 auto; }
.section-block { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow-sm); margin-bottom: 14px; overflow: hidden; }
.section-head-bar { background: var(--surface-alt); padding: 10px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.section-title-text { display: flex; flex-direction: column; gap: 2px; }
.section-title-main { font-size: 14px; font-weight: 700; color: var(--green-900); }
.section-title-sub { font-size: 11px; color: var(--gray-500); font-weight: 600; }
.section-title-meta { background: var(--green-700); color: white; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; }

/* === ENTITY CHART CARDS — FIXED 1-ROW GRID === */
.entity-cards-row {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  min-height: 340px;
  /* grid-template-columns set inline oleh JS */
}
.entity-bar-card {
  background: var(--surface);
  border: 1.5px dashed #BBB6AB;
  border-radius: 8px;
  padding: 10px 6px 6px;
  display: flex; flex-direction: column;
  min-width: 0;
  min-height: 320px;
  position: relative;
  overflow: hidden;
}
.entity-bar-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 22px; height: 22px;
  background: linear-gradient(225deg, transparent 50%, rgba(189,184,170,0.35) 50%, rgba(229,225,213,0.25) 100%);
  border-bottom: 1px solid rgba(189,184,170,0.5);
  border-left: 1px solid rgba(189,184,170,0.5);
  border-bottom-left-radius: 4px;
  pointer-events: none;
}
.entity-bar-card.ent-holding     { border-color: rgba(123,150,168,0.55); }
.entity-bar-card.ent-suppco      { border-color: rgba(63,143,126,0.55); }
.entity-bar-card.ent-palmco      { border-color: rgba(91,166,111,0.55); }
.entity-bar-card.ent-sugarco     { border-color: rgba(45,107,78,0.55); }
.entity-bar-card.ent-anpercuper  { border-color: rgba(63,89,73,0.55); }
.ebc-head { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--green-900); padding: 0 22px 0 4px; flex: 0 0 auto; }
.ebc-head img { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.ebc-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ebc-body { flex: 1; display: flex; flex-direction: column; border-top: 1px solid var(--gray-100); padding-top: 6px; min-height: 0; }
.ebc-bars { flex: 1; display: flex; align-items: stretch; justify-content: space-around; gap: 4px; min-height: 0; padding-top: 22px; }
.ebc-empty { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--gray-300); font-style: italic; }
.bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: stretch; }
.bar-zone { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; min-height: 0; position: relative; border-bottom: 1.5px solid rgba(120, 116, 100, 0.35); }
.bar { width: 100%; border-radius: 3px 3px 0 0; position: relative; min-height: 4px; box-shadow: inset 0 -2px 0 rgba(0,0,0,0.08); transition: height 0.5s ease; }
.bar-val.inside { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); color: white; font-size: 10px; font-weight: 700; white-space: nowrap; text-shadow: 0 1px 1px rgba(0,0,0,0.25); letter-spacing: -0.2px; }
.bar-val.above { position: absolute; left: 50%; transform: translateX(-50%); margin-bottom: 3px; color: var(--gray-700); font-size: 10px; font-weight: 700; white-space: nowrap; letter-spacing: -0.2px; }
.bar-label { font-size: 10px; font-weight: 600; color: var(--gray-700); margin-top: 5px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.1px; }

/* === ASSET TABLE TOOLBAR (Detail page) === */
.asset-toolbar { padding: 10px 16px; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; border-bottom: 1px solid var(--border); background: var(--surface); }
.asset-search { position: relative; }
.asset-search input {
  width: 100%; padding: 7px 30px 7px 32px;
  border: 1px solid var(--border-strong); border-radius: 4px;
  font-size: 12px; font-family: var(--font);
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23807D70' stroke-width='2'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") no-repeat 10px center;
}
.asset-search input:focus { outline: none; border-color: var(--green-600); }
.search-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--gray-500); font-size: 14px; padding: 4px 6px; display: none; }
.search-clear.show { display: block; }
.search-clear:hover { color: var(--red-600); }
.asset-filters { display: flex; gap: 8px; }
.asset-filters select { padding: 7px 28px 7px 10px; border: 1px solid var(--border-strong); border-radius: 4px; font-size: 12px; font-family: var(--font); background: var(--surface); cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 3.5l3 3 3-3' stroke='%23807D70' fill='none' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat; background-position: right 8px center; }
.asset-filters select:focus { outline: none; border-color: var(--green-600); }

/* === ASSET TABLE === */
.asset-table-wrap { overflow-x: auto; max-height: calc(100vh - 220px); overflow-y: auto; }
.asset-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.asset-table thead th { background: var(--gray-50); color: var(--gray-700); font-weight: 700; text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border-strong); font-size: 10px; letter-spacing: 0.5px; text-transform: uppercase; white-space: nowrap; position: sticky; top: 0; z-index: 5; }
.asset-table .col-nia { width: 130px; }
.asset-table .col-entitas { width: 95px; }
.asset-table .col-regional { width: 95px; }
.asset-table .col-status { width: 130px; }
.asset-table .col-hak { width: 90px; }
.asset-table .col-luas { width: 100px; text-align: right; }
.asset-table tbody td { padding: 8px 12px; border-bottom: 1px solid var(--border); color: var(--gray-900); vertical-align: top; }
.asset-table tbody tr { cursor: pointer; transition: background 0.1s; }
.asset-table tbody tr:hover { background: var(--green-50); }
.asset-table .td-nia { font-family: 'Consolas', monospace; font-size: 11px; color: var(--green-700); font-weight: 600; }
.asset-table .td-luas { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.asset-table .td-empty { text-align: center; color: var(--gray-500); padding: 30px; }
.asset-table .td-action { text-align: center; }
.btn-row-edit { background: var(--gold-50); border: 1px solid var(--gold-500); color: var(--gold-700); border-radius: 4px; padding: 4px 8px; cursor: pointer; font-size: 12px; }
.btn-row-edit:hover { background: var(--gold-500); color: var(--green-950); }
.asset-status-badge { display: inline-block; padding: 2px 7px; border-radius: 9px; font-size: 10px; font-weight: 700; letter-spacing: 0.2px; }
.asset-status-badge.bersertifikat { background: rgba(31, 138, 101, 0.12); color: #0F4A37; }
.asset-status-badge.belum         { background: rgba(184, 58, 58, 0.12);  color: #8B2A2A; }
.asset-status-badge.eks           { background: rgba(90, 74, 138, 0.12);  color: #463972; }

.asset-pagination { padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); background: var(--surface-alt); }
.pag-info { font-size: 11px; color: var(--gray-700); font-weight: 600; }
.pag-controls { display: flex; gap: 4px; }
.pag-btn { min-width: 28px; height: 28px; padding: 0 8px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; font-size: 11px; font-weight: 700; color: var(--gray-700); cursor: pointer; font-family: var(--font); }
.pag-btn:hover:not(:disabled) { background: var(--green-50); border-color: var(--green-600); color: var(--green-900); }
.pag-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pag-btn.active { background: var(--green-700); border-color: var(--green-700); color: white; }

/* =====================================================
   MODAL (DETAIL VIEW)
   ===================================================== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 51, 36, 0.5); backdrop-filter: blur(3px); display: none; align-items: flex-start; justify-content: center; z-index: 9100; padding: 30px 16px; overflow-y: auto; }
.modal-backdrop.show { display: flex; }
.modal-box { background: var(--surface); border-radius: 10px; box-shadow: 0 24px 80px rgba(0,0,0,0.35); width: 100%; max-width: 820px; overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 60px); }
.modal-box-wide { max-width: 1100px; }
.modal-box-narrow { max-width: 480px; }
.modal-head { background: linear-gradient(135deg, var(--green-900) 0%, var(--green-800) 100%); color: white; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex: 0 0 auto; border-bottom: 3px solid var(--gold-500); }
.modal-head-warn { background: linear-gradient(135deg, var(--red-700) 0%, var(--red-600) 100%); border-bottom-color: var(--gold-500); }
.modal-head-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.modal-logo { width: 48px; height: 48px; background: rgba(255,255,255,0.95); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 5px; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.modal-logo img { width: 100%; height: 100%; object-fit: contain; }
.modal-titles { min-width: 0; flex: 1; }
.modal-title { font-size: 17px; font-weight: 700; color: white; letter-spacing: -0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-sub { font-size: 12px; color: var(--gold-400); font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-close { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25); color: white; width: 32px; height: 32px; border-radius: 6px; cursor: pointer; font-size: 16px; font-weight: 700; flex-shrink: 0; }
.modal-close:hover { background: rgba(255,255,255,0.22); }
.modal-body { padding: 18px; overflow-y: auto; flex: 1; background: var(--surface-alt); }
.modal-loading { text-align: center; color: var(--gray-500); padding: 40px; }

.hl-block { background: white; border: 1px solid var(--border); border-left: 4px solid var(--green-700); border-radius: 6px; padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.hl-row { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 4px 0; align-items: start; }
.hl-row + .hl-row { border-top: 1px dashed var(--gray-200); margin-top: 6px; padding-top: 8px; }
.hl-label { font-size: 10px; font-weight: 700; color: var(--gold-700); letter-spacing: 1px; text-transform: uppercase; padding-top: 2px; }
.hl-value-unit { font-size: 15px; font-weight: 700; color: var(--green-900); line-height: 1.3; }
.hl-value-alamat { font-size: 12px; color: var(--gray-900); font-weight: 600; line-height: 1.5; }
.hl-value-alamat .empty { color: var(--gray-300); font-style: italic; font-weight: 400; }

.hl-status { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 16px; background: white; border: 1px solid var(--border); border-left: 4px solid var(--st-color, var(--green-700)); border-radius: 6px; box-shadow: var(--shadow-sm); }
.hl-status-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--st-color, var(--green-700)); color: white; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.hl-status-text { min-width: 0; }
.hl-status-label { font-size: 10px; font-weight: 700; color: var(--gray-500); letter-spacing: 1px; text-transform: uppercase; }
.hl-status-value { font-size: 18px; font-weight: 700; color: var(--st-color, var(--green-700)); letter-spacing: -0.3px; margin-top: 2px; }
.hl-status-meta { display: flex; flex-direction: column; gap: 3px; font-size: 11px; padding-left: 14px; border-left: 1px solid var(--border); }
.hl-status-meta-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.hl-status-meta-row span { color: var(--gray-500); font-weight: 600; }
.hl-status-meta-row strong { color: var(--gray-900); font-weight: 700; font-variant-numeric: tabular-nums; }

.detail-grid-section { background: white; border: 1px solid var(--border); border-radius: 6px; padding: 12px 14px; margin-bottom: 10px; }
.detail-section-title { font-size: 10px; font-weight: 700; color: var(--gold-700); letter-spacing: 1px; text-transform: uppercase; padding-bottom: 5px; margin-bottom: 9px; border-bottom: 2px solid var(--gold-500); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 14px; }
.detail-item { display: flex; flex-direction: column; gap: 1px; padding: 4px 0; border-bottom: 1px dashed var(--border); }
.detail-item.full { grid-column: 1 / -1; }
.detail-label { font-size: 9px; color: var(--gray-500); font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.detail-value { font-size: 12px; color: var(--gray-900); font-weight: 600; word-break: break-word; }
.detail-value .empty { color: var(--gray-300); font-style: italic; font-weight: 400; }

.doc-section { background: white; border: 1px dashed var(--gold-500); border-radius: 6px; padding: 14px 16px; margin-top: 14px; margin-bottom: 4px; }
.doc-section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px dashed var(--gold-100); }
.doc-section-title { font-size: 13px; font-weight: 700; color: var(--gold-700); }
.doc-section-note { font-size: 10px; color: var(--gray-500); font-style: italic; font-weight: 600; }
.doc-list { display: flex; flex-direction: column; gap: 4px; }
.doc-item { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; background: var(--gray-50); border-radius: 4px; border: 1px solid var(--border); cursor: pointer; transition: all 0.15s; }
.doc-item.disabled { cursor: not-allowed; opacity: 0.6; }
.doc-ico { font-size: 18px; text-align: center; }
.doc-name { font-size: 12px; font-weight: 600; color: var(--gray-900); }
.doc-action { font-size: 10px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; padding: 3px 8px; background: var(--gray-200); border-radius: 10px; }

/* =====================================================
   EDIT PAGE — TOOLBAR
   ===================================================== */
.edit-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.edit-toolbar-left {
  display: grid;
  grid-template-columns: 1fr 160px 160px 90px;
  gap: 8px;
  align-items: center;
}
.edit-toolbar-right { display: flex; gap: 6px; }

.btn-action {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid;
  font-family: var(--font);
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-action .ico { font-size: 13px; font-weight: 700; }
.btn-action.btn-primary {
  background: var(--green-700);
  border-color: var(--green-700);
  color: white;
}
.btn-action.btn-primary:hover { background: var(--green-800); border-color: var(--green-800); }
.btn-action.btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--gray-900);
}
.btn-action.btn-secondary:hover { background: var(--gold-50); border-color: var(--gold-500); color: var(--green-900); }

/* =====================================================
   EDIT PAGE — FORM MODAL
   ===================================================== */
.form-modal-head { padding: 14px 18px; }
.asset-form { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.asset-form .modal-body { padding: 16px 20px; }

.form-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.form-section-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-700);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding-bottom: 5px;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--gold-500);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px 14px;
}
.form-row { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.form-row.form-row-wide { grid-column: 1 / -1; }
.form-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.req-mark { color: var(--red-600); margin-left: 2px; }

.form-row input[type="text"],
.form-row input[type="number"],
.form-row input[type="date"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 6px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 12px;
  font-family: var(--font);
  background: var(--surface);
  color: var(--gray-900);
  transition: border-color 0.15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 2px rgba(31, 138, 101, 0.1);
}
.form-row input[readonly] {
  background: var(--gray-50);
  color: var(--gray-700);
  cursor: not-allowed;
}
.form-row textarea {
  resize: vertical;
  min-height: 48px;
  font-family: var(--font);
}
.form-row select {
  cursor: pointer;
  appearance: none;
  padding-right: 26px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 3.5l3 3 3-3' stroke='%23807D70' fill='none' stroke-width='1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.form-hint {
  font-size: 9px;
  color: var(--gray-500);
  font-style: italic;
  margin-top: 1px;
}

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  flex: 0 0 auto;
}
.form-footer-right { display: flex; gap: 8px; }

.btn-form {
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}
.btn-form.btn-save { background: var(--green-700); border-color: var(--green-700); color: white; }
.btn-form.btn-save:hover:not(:disabled) { background: var(--green-800); }
.btn-form.btn-save:disabled { opacity: 0.6; cursor: wait; }
.btn-form.btn-cancel { background: var(--surface); border-color: var(--border-strong); color: var(--gray-900); }
.btn-form.btn-cancel:hover { background: var(--gray-100); }
.btn-form.btn-danger { background: var(--red-600); border-color: var(--red-600); color: white; }
.btn-form.btn-danger:hover { background: var(--red-700); }

/* =====================================================
   EDIT PAGE — IMPORT MODAL
   ===================================================== */
.import-step { margin-bottom: 18px; }
.import-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--green-900);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.import-step input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 2px dashed var(--gold-500);
  border-radius: 6px;
  background: var(--gold-50);
  cursor: pointer;
  font-family: var(--font);
}
.import-hint { font-size: 10px; color: var(--gray-500); margin-top: 5px; font-style: italic; }
.import-hint code { background: var(--gray-100); padding: 1px 4px; border-radius: 3px; font-family: 'Consolas', monospace; font-size: 10px; color: var(--green-800); }

.import-modes { display: flex; flex-direction: column; gap: 6px; }
.mode-opt { display: block; cursor: pointer; }
.mode-opt input[type="radio"] { display: none; }
.mode-card {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  transition: all 0.15s;
}
.mode-opt input[type="radio"]:checked + .mode-card { border-color: var(--green-600); background: var(--green-50); }
.mode-card.mode-danger { background: rgba(184, 58, 58, 0.04); }
.mode-opt input[type="radio"]:checked + .mode-card.mode-danger { border-color: var(--red-600); background: rgba(184, 58, 58, 0.08); }
.mode-title { font-size: 12px; font-weight: 700; color: var(--green-900); margin-bottom: 2px; display: flex; align-items: center; gap: 6px; }
.mode-badge { background: var(--gold-500); color: var(--green-950); font-size: 9px; padding: 1px 6px; border-radius: 8px; font-weight: 700; }
.mode-desc { font-size: 10px; color: var(--gray-700); font-weight: 600; line-height: 1.4; }

.import-progress { padding: 12px; background: var(--gray-50); border-left: 3px solid var(--gold-500); border-radius: 4px; font-size: 12px; font-weight: 600; color: var(--green-900); }
.import-success {
  padding: 12px 14px;
  background: rgba(31, 138, 101, 0.08);
  border-left: 3px solid var(--green-600);
  border-radius: 4px;
  font-size: 12px;
  color: var(--green-900);
}
.import-success ul { margin: 6px 0 4px 18px; }
.import-success li { font-weight: 600; }
.import-errors { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 10px; color: var(--red-700); }
.import-errors ul { margin: 4px 0 0 18px; }
.import-error {
  padding: 12px 14px;
  background: rgba(184, 58, 58, 0.08);
  border-left: 3px solid var(--red-600);
  border-radius: 4px;
  font-size: 12px;
  color: var(--red-700);
  font-weight: 600;
}

/* =====================================================
   CONFIRM DIALOG
   ===================================================== */
.confirm-message {
  font-size: 13px;
  color: var(--gray-900);
  line-height: 1.5;
  margin-bottom: 16px;
}

/* =====================================================
   TOAST NOTIFICATION
   ===================================================== */
#toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: white;
  z-index: 9500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.25s;
  pointer-events: none;
  max-width: 400px;
}
#toast.show { opacity: 1; transform: translateY(0); }
#toast.toast-success { background: var(--green-700); border-left: 4px solid var(--gold-500); }
#toast.toast-error   { background: var(--red-600); border-left: 4px solid var(--gold-500); }
#toast.toast-info    { background: var(--green-900); border-left: 4px solid var(--gold-500); }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1300px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1200px) {
  body.page-dashboard { overflow: auto; height: auto; }
  .container { overflow-y: auto; }
  .row { grid-template-columns: 1fr 1fr; }
  .row > :nth-child(3) { grid-column: 1 / -1; }
  .entity-cards-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    min-height: 320px;
  }
}
@media (max-width: 900px) {
  .header-row { grid-template-columns: 1fr; gap: 8px; }
  .header-filters { grid-template-columns: repeat(2, 1fr); }
  .row { grid-template-columns: 1fr; }
  .row > :nth-child(3) { grid-column: auto; }
  .container { grid-template-rows: auto auto; }
  .status-cards { grid-template-columns: 1fr; }
  .asset-toolbar { grid-template-columns: 1fr; }
  .edit-toolbar { grid-template-columns: 1fr; }
  .edit-toolbar-left { grid-template-columns: 1fr 1fr; }
  .edit-toolbar-right { flex-wrap: wrap; }
  .detail-grid { grid-template-columns: 1fr; }
  .hl-status { grid-template-columns: 1fr; text-align: center; }
  .hl-status-meta { padding-left: 0; border-left: none; border-top: 1px solid var(--border); padding-top: 8px; }
  .entity-cards-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .entity-cards-row { grid-template-columns: 1fr !important; }
  .edit-toolbar-left { grid-template-columns: 1fr; }
}

/* =====================================================
   v5 — LOGIN PAGE
   ===================================================== */
body.page-login {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--green-950) 0%, var(--green-800) 50%, var(--green-900) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: auto;
}

.login-wrap {
  width: 100%;
  max-width: 420px;
}

.login-card {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
  overflow: hidden;
  border-top: 4px solid var(--gold-500);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 28px 18px;
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-800) 100%);
  color: white;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.login-logo-img {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}
.login-titles h1 {
  font-size: 20px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.3px;
  margin: 0;
}
.login-titles p {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-400);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 3px 0 0 0;
}

.login-form {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-form .form-row {
  gap: 5px;
}
.login-form .form-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  font-size: 13px;
  font-family: var(--font);
  background: var(--surface);
  transition: border-color 0.15s;
}
.login-form input:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(31, 138, 101, 0.12);
}
.login-error {
  font-size: 11px;
  color: var(--red-700);
  font-weight: 600;
  padding: 6px 10px;
  background: var(--red-100);
  border-radius: 4px;
  border-left: 3px solid var(--red-600);
  min-height: 0;
}
.login-error:empty {
  display: none;
}
.btn-login {
  width: 100%;
  padding: 12px;
  background: var(--green-700);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
  text-transform: uppercase;
}
.btn-login:hover:not(:disabled) {
  background: var(--green-800);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.btn-login:disabled {
  opacity: 0.6;
  cursor: wait;
}
.login-footer {
  padding: 12px 28px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--gray-500);
  font-weight: 600;
}
.footer-version {
  font-family: 'Consolas', monospace;
  background: var(--green-100);
  color: var(--green-900);
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 9px;
}

/* =====================================================
   v5 — HEADER ADDITIONS
   ===================================================== */
.btn-header.btn-logout {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 26px;
  padding: 0;
  font-size: 14px;
}
.btn-header.btn-logout:hover {
  background: rgba(184, 58, 58, 0.2);
  border-color: var(--red-600);
  color: white;
}

/* =====================================================
   v5 — PENGGUNA PAGE
   ===================================================== */
.me-badge {
  display: inline-block;
  background: var(--gold-500);
  color: var(--green-950);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
  letter-spacing: 0.3px;
  vertical-align: middle;
}

.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.status-on {
  color: var(--green-700);
  font-weight: 700;
  font-size: 11px;
}
.status-off {
  color: var(--gray-300);
  font-weight: 600;
  font-size: 11px;
}

.td-last-login {
  font-size: 10px;
  color: var(--gray-700);
  font-variant-numeric: tabular-nums;
}

/* Form grid variants */
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

/* Pengguna toolbar — search saja, tidak ada filter */
.edit-toolbar-pengguna {
  grid-template-columns: 1fr !important;
}

.opt-mark {
  display: inline-block;
  font-size: 9px;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: lowercase;
  font-style: italic;
  margin-left: 4px;
}

/* Form input disabled state untuk role-driven UI */
.form-row input:disabled,
.form-row select:disabled {
  background: var(--gray-100);
  color: var(--gray-500);
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .login-form { padding: 18px 22px; }
  .login-brand { padding: 18px 22px 14px; }
}
