/* ================================================================
   SIPEG v3.0 — Mobile-First Redesign
   Yayasan Insan Cendikia Jayapura
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary:      #0A2E22;
  --primary-soft: #103D2D;
  --primary-mute: #165038;
  --gold:         #C8962A;
  --gold-soft:    #E8B84B;
  --gold-pale:    #FEF7E8;
  --gold-border:  #F0D08A;

  --white:        #FFFFFF;
  --bg:           #F3F4F6;
  --surface:      #FFFFFF;
  --border:       #E5E7EB;
  --border-soft:  #F0F2F0;

  --text-primary:   #111827;
  --text-secondary: #374151;
  --text-muted:     #6B7280;
  --text-light:     #9CA3AF;

  --green:        #0D7A4E;
  --green-bg:     #E6F4EE;
  --green-border: #A3D9BE;
  --red:          #C0392B;
  --red-bg:       #FDECEB;
  --red-border:   #F1A9A4;
  --blue:         #1A56CC;
  --blue-bg:      #EBF0FC;
  --blue-border:  #A3BAEF;
  --amber:        #B45309;
  --amber-bg:     #FEF3C7;
  --amber-border: #F0C060;

  --sidebar-w:  260px;
  --topbar-h:   60px;
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  14px;
  --radius-xl:  20px;

  --shadow-xs: 0 1px 3px rgba(13,59,46,.06);
  --shadow-sm: 0 2px 8px rgba(13,59,46,.08);
  --shadow:    0 4px 16px rgba(13,59,46,.10);
  --shadow-lg: 0 8px 32px rgba(13,59,46,.14);

  --ease: cubic-bezier(.4,0,.2,1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; background: var(--bg); color: #111827; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
h1,h2,h3,h4,h5 { line-height: 1.3; font-weight: 700; color: #111827; }

/* ── LAYOUT ── */
.layout { display: flex; min-height: 100vh; }

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22200%22%20height%3D%22160%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23E8B84B%22%20stroke-opacity%3D%220.07%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M10%2040%20C10%2025%2030%2025%2030%2038%20C30%2048%2018%2048%2018%2040%20C18%2035%2024%2035%2024%2039%22%2F%3E%3Cpath%20d%3D%22M50%2040%20C50%2025%2030%2025%2030%2038%22%2F%3E%3Cpath%20d%3D%22M100%2015%20L120%2040%20L100%2065%20L80%2040%20Z%22%2F%3E%3Cpath%20d%3D%22M100%2027%20L110%2040%20L100%2053%20L90%2040%20Z%22%2F%3E%3Cpath%20d%3D%22M150%2030%20L162%2042%20L150%2054%22%2F%3E%3Cpath%20d%3D%22M160%2030%20L172%2042%20L160%2054%22%2F%3E%3Cpath%20d%3D%22M170%2030%20L182%2042%20L170%2054%22%2F%3E%3Cpath%20d%3D%22M40%20120%20C40%20105%2060%20105%2060%20118%20C60%20128%2048%20128%2048%20120%20C48%20115%2054%20115%2054%20119%22%2F%3E%3Cpath%20d%3D%22M80%20120%20C80%20105%2060%20105%2060%20118%22%2F%3E%3Cpath%20d%3D%22M0%20110%20L20%20135%20L0%20160%22%2F%3E%3Cpath%20d%3D%22M150%2095%20L170%20120%20L150%20145%20L130%20120%20Z%22%2F%3E%3Cpath%20d%3D%22M150%20107%20L160%20120%20L150%20133%20L140%20120%20Z%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22%23E8B84B%22%20fill-opacity%3D%220.05%22%20stroke%3D%22none%22%3E%3Ccircle%20cx%3D%22100%22%20cy%3D%2240%22%20r%3D%222.5%22%2F%3E%3Ccircle%20cx%3D%22150%22%20cy%3D%22120%22%20r%3D%222.5%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  background-size: 200px 160px;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .25s var(--ease);
  box-shadow: var(--shadow-lg);
}
.sidebar-brand {
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.brand-logo {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(200,150,42,.3);
  overflow: hidden;
}
.brand-text h3 { font-size: .82rem; font-weight: 800; color: #fff; line-height: 1.2; }
.brand-text span { font-size: .64rem; color: rgba(255,255,255,.36); font-weight: 400; }

.sidebar-nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.sidebar-nav::-webkit-scrollbar { width: 0; }
.nav-label {
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255,255,255,.22);
  padding: 14px 10px 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 500;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  transition: all .15s var(--ease);
  margin-bottom: 2px;
  position: relative;
}
.nav-item .ni { font-size: .88rem; width: 18px; text-align: center; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.85); }
.nav-item.active {
  background: rgba(200,150,42,.14);
  color: var(--gold-soft);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 22%; bottom: 22%;
  width: 3px;
  background: var(--gold);
  border-radius: 0 3px 3px 0;
}
.sidebar-footer {
  padding: 12px 10px 14px;
  border-top: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.admin-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
  margin-bottom: 7px;
}
.admin-ava {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .76rem;
  color: var(--primary);
  flex-shrink: 0;
}
.admin-pill p { font-size: .8rem; font-weight: 600; color: #fff; line-height: 1; }
.admin-pill span { font-size: .63rem; color: rgba(255,255,255,.3); }
.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px;
  background: rgba(192,57,43,.12);
  color: #F1948A;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .76rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-logout:hover { background: rgba(192,57,43,.25); }

/* ── OVERLAY (mobile) ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 299;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* ================================================================
   MAIN
   ================================================================ */
.main { margin-left: var(--sidebar-w); flex: 1; min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: background .15s;
}
.sidebar-toggle:hover { background: var(--bg); }
.topbar-title h2 { font-size: .95rem; font-weight: 700; color: #111827; }
.topbar-title span { font-size: .7rem; color: var(--text-muted); font-weight: 400; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.org-chip {
  background: var(--gold-pale);
  border: 1px solid var(--gold-border);
  color: var(--amber);
  font-size: .68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
}
.ver-chip {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .65rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 100px;
}
.content { padding: 20px 24px; flex: 1; }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 15px;
  border-radius: var(--radius);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s var(--ease);
  white-space: nowrap;
  line-height: 1;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-mute); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-soft); }
.btn-outline { background: transparent; color: var(--text-secondary); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--bg); }
.btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn-success { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.btn-sm  { padding: 6px 12px; font-size: .76rem; border-radius: var(--radius-sm); }
.btn-xs  { padding: 5px 10px; font-size: .72rem; border-radius: 5px; }
.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: var(--radius-sm); }

/* ================================================================
   ACTION MENU (dropdown) — tombol aksi pegawai
   ================================================================ */
.action-menu-wrap { position: relative; display: inline-block; }
.action-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: .76rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  transition: all .15s;
}
.action-menu-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--bg); }
.action-menu-dropdown {
  display: none;
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 168px;
  z-index: 9000;
  overflow: hidden;
}
.action-menu-dropdown.open { display: block; }
.action-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: background .12s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.action-menu-item:hover { background: var(--bg); color: var(--text-primary); }
.action-menu-item.danger { color: var(--red); }
.action-menu-item.danger:hover { background: var(--red-bg); }
.action-menu-divider { height: 1px; background: var(--border-soft); margin: 3px 0; }

/* ================================================================
   CARD
   ================================================================ */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-xs);
  margin-bottom: 18px;
  overflow: hidden;
}
.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.card-header h3 { font-size: .9rem; font-weight: 700; color: #111827; }
.card-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.card-body { padding: 20px; }

/* ================================================================
   WELCOME BANNER
   ================================================================ */
.welcome-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mute) 100%);
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22200%22%20height%3D%22160%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23E8B84B%22%20stroke-opacity%3D%220.16%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M10%2040%20C10%2025%2030%2025%2030%2038%20C30%2048%2018%2048%2018%2040%20C18%2035%2024%2035%2024%2039%22%2F%3E%3Cpath%20d%3D%22M50%2040%20C50%2025%2030%2025%2030%2038%22%2F%3E%3Cpath%20d%3D%22M100%2015%20L120%2040%20L100%2065%20L80%2040%20Z%22%2F%3E%3Cpath%20d%3D%22M100%2027%20L110%2040%20L100%2053%20L90%2040%20Z%22%2F%3E%3Cpath%20d%3D%22M150%2030%20L162%2042%20L150%2054%22%2F%3E%3Cpath%20d%3D%22M160%2030%20L172%2042%20L160%2054%22%2F%3E%3Cpath%20d%3D%22M170%2030%20L182%2042%20L170%2054%22%2F%3E%3Cpath%20d%3D%22M40%20120%20C40%20105%2060%20105%2060%20118%20C60%20128%2048%20128%2048%20120%20C48%20115%2054%20115%2054%20119%22%2F%3E%3Cpath%20d%3D%22M80%20120%20C80%20105%2060%20105%2060%20118%22%2F%3E%3Cpath%20d%3D%22M0%20110%20L20%20135%20L0%20160%22%2F%3E%3Cpath%20d%3D%22M150%2095%20L170%20120%20L150%20145%20L130%20120%20Z%22%2F%3E%3Cpath%20d%3D%22M150%20107%20L160%20120%20L150%20133%20L140%20120%20Z%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22%23E8B84B%22%20fill-opacity%3D%220.12%22%20stroke%3D%22none%22%3E%3Ccircle%20cx%3D%22100%22%20cy%3D%2240%22%20r%3D%222.5%22%2F%3E%3Ccircle%20cx%3D%22150%22%20cy%3D%22120%22%20r%3D%222.5%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"), linear-gradient(135deg, var(--primary) 0%, var(--primary-mute) 100%), linear-gradient(135deg, var(--primary) 0%, var(--primary-mute) 100%);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}
.welcome-banner::before {
  content: '';
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(200,150,42,.07);
  top: -80px; right: -50px;
}
.wb-text h2 { color: #fff; font-size: 1.25rem; margin-bottom: 3px; }
.wb-text p  { color: rgba(255,255,255,.5); font-size: .8rem; }
.wb-badge {
  background: rgba(200,150,42,.18);
  border: 1px solid rgba(200,150,42,.28);
  color: var(--gold-soft);
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  margin-top: 8px;
  display: inline-block;
}
.wb-icon { font-size: 3.5rem; opacity: .14; position: relative; z-index: 1; }

/* ================================================================
   STAT CARDS
   ================================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  padding: 18px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; }
.stat-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
}
.si-blue    { background: var(--blue-bg); }
.si-green   { background: var(--green-bg); }
.si-amber   { background: var(--amber-bg); }
.si-red     { background: var(--red-bg); }
.si-primary { background: rgba(13,59,46,.07); }
.stat-number { font-size: 1.9rem; font-weight: 800; color: #111827; line-height: 1; }
.stat-label  { font-size: .72rem; color: var(--text-muted); font-weight: 500; }

/* ================================================================
   TABLE
   ================================================================ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: #374151;
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .1s; }
tbody tr:hover td { background: #F8F9FF; }

.emp-photo {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-border);
}
.emp-photo-ph {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-mute));
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-soft);
  font-weight: 800;
  font-size: .76rem;
  flex-shrink: 0;
}
.td-name { font-weight: 600; color: #111827; }
.td-sub  { font-size: .7rem; color: var(--text-muted); margin-top: 1px; }

/* ================================================================
   MOBILE CARD LIST (menggantikan tabel di mobile)
   ================================================================ */
.mobile-list { display: none; }
.emp-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow-xs);
}
.emp-card-info { flex: 1; min-width: 0; }
.emp-card-name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.emp-card-sub {
  font-size: .74rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.emp-card-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.emp-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ================================================================
   BADGE
   ================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: .68rem;
  font-weight: 700;
}
.badge-tetap   { background: var(--green-bg);  color: var(--green);  border: 1px solid var(--green-border); }
.badge-kontrak { background: var(--amber-bg);  color: var(--amber);  border: 1px solid var(--amber-border); }
.badge-blue    { background: var(--blue-bg);   color: var(--blue);   border: 1px solid var(--blue-border); }
.badge-red     { background: var(--red-bg);    color: var(--red);    border: 1px solid var(--red-border); }
.badge-gold    { background: var(--gold-pale); color: var(--amber);  border: 1px solid var(--gold-border); }
.badge-gray    { background: var(--bg);        color: var(--text-muted); border: 1px solid var(--border); }

/* ================================================================
   SEARCH & FILTER
   ================================================================ */
.filter-bar {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 12px;
  transition: border-color .15s, background .15s;
  flex: 1;
  min-width: 180px;
}
.search-wrap:focus-within {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(200,150,42,.08);
}
.search-wrap input {
  border: none;
  background: transparent;
  outline: none;
  font-size: .82rem;
  color: var(--text-primary);
  width: 100%;
  min-width: 0;
}
.search-wrap input::placeholder { color: var(--text-light); }
.filter-select {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .78rem;
  color: var(--text-secondary);
  background: var(--bg);
  outline: none;
  cursor: pointer;
  transition: border-color .15s;
  max-width: 160px;
}
.filter-select:focus { border-color: var(--gold); }

/* ================================================================
   FORM
   ================================================================ */
.form-section-title {
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  padding-bottom: 7px;
  border-bottom: 2px solid var(--gold-pale);
}
.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-full   { grid-column: 1/-1; }
.f-group { display: flex; flex-direction: column; gap: 5px; }
.f-group label { font-size: .75rem; font-weight: 600; color: #374151; }
.f-group input,
.f-group select,
.f-group textarea {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .84rem;
  outline: none;
  color: var(--text-primary);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
.f-group input:focus,
.f-group select:focus,
.f-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,150,42,.09);
}
.f-group textarea { resize: vertical; min-height: 76px; }
.f-hint     { font-size: .69rem; color: var(--text-muted); }
.f-required { color: var(--red); margin-left: 2px; }

.photo-upload-box {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: border-color .15s;
  cursor: pointer;
}
.photo-upload-box:hover { border-color: var(--gold); }
.photo-preview {
  width: 76px; height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold-border);
  flex-shrink: 0;
}
.photo-preview-ph {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-mute));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  color: var(--gold-soft);
  border: 3px solid var(--gold-border);
  flex-shrink: 0;
}
.dynamic-list { display: flex; flex-direction: column; gap: 8px; }
.dynamic-item { display: flex; gap: 7px; align-items: center; }
.dynamic-item input { flex: 1; min-width: 0; }
.btn-add-dyn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-pale);
  color: var(--amber);
  border: 1.5px dashed var(--gold-border);
  border-radius: var(--radius);
  padding: 7px 13px;
  cursor: pointer;
  font-size: .77rem;
  font-weight: 600;
  margin-top: 7px;
  transition: all .15s;
}
.btn-add-dyn:hover { background: var(--gold); color: #fff; border-style: solid; }
.btn-remove-item {
  width: 28px; height: 28px;
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--red);
  font-size: .8rem;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.btn-remove-item:hover { background: var(--red); color: #fff; }
.sub-form-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
}
/* Fixed bottom bar saat form di mobile */
.form-submit-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  position: sticky;
  bottom: 0;
  z-index: 50;
  box-shadow: 0 -4px 12px rgba(0,0,0,.06);
}

/* ================================================================
   DETAIL VIEW
   ================================================================ */
.detail-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mute) 100%);
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22200%22%20height%3D%22160%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23E8B84B%22%20stroke-opacity%3D%220.16%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M10%2040%20C10%2025%2030%2025%2030%2038%20C30%2048%2018%2048%2018%2040%20C18%2035%2024%2035%2024%2039%22%2F%3E%3Cpath%20d%3D%22M50%2040%20C50%2025%2030%2025%2030%2038%22%2F%3E%3Cpath%20d%3D%22M100%2015%20L120%2040%20L100%2065%20L80%2040%20Z%22%2F%3E%3Cpath%20d%3D%22M100%2027%20L110%2040%20L100%2053%20L90%2040%20Z%22%2F%3E%3Cpath%20d%3D%22M150%2030%20L162%2042%20L150%2054%22%2F%3E%3Cpath%20d%3D%22M160%2030%20L172%2042%20L160%2054%22%2F%3E%3Cpath%20d%3D%22M170%2030%20L182%2042%20L170%2054%22%2F%3E%3Cpath%20d%3D%22M40%20120%20C40%20105%2060%20105%2060%20118%20C60%20128%2048%20128%2048%20120%20C48%20115%2054%20115%2054%20119%22%2F%3E%3Cpath%20d%3D%22M80%20120%20C80%20105%2060%20105%2060%20118%22%2F%3E%3Cpath%20d%3D%22M0%20110%20L20%20135%20L0%20160%22%2F%3E%3Cpath%20d%3D%22M150%2095%20L170%20120%20L150%20145%20L130%20120%20Z%22%2F%3E%3Cpath%20d%3D%22M150%20107%20L160%20120%20L150%20133%20L140%20120%20Z%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22%23E8B84B%22%20fill-opacity%3D%220.12%22%20stroke%3D%22none%22%3E%3Ccircle%20cx%3D%22100%22%20cy%3D%2240%22%20r%3D%222.5%22%2F%3E%3Ccircle%20cx%3D%22150%22%20cy%3D%22120%22%20r%3D%222.5%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"), linear-gradient(135deg, var(--primary) 0%, var(--primary-mute) 100%), linear-gradient(135deg, var(--primary) 0%, var(--primary-mute) 100%);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
}
.detail-hero::before {
  content: '';
  position: absolute;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(200,150,42,.07);
  top: -70px; right: -30px;
}
.detail-hero-photo {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(200,150,42,.45);
  flex-shrink: 0;
  position: relative; z-index: 1;
}
.detail-hero-ph {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  color: var(--gold-soft);
  border: 3px solid rgba(200,150,42,.35);
  flex-shrink: 0;
  position: relative; z-index: 1;
}
.detail-hero-info { flex: 1; position: relative; z-index: 1; min-width: 0; }
.detail-hero-info h2 { color: #fff; font-size: 1.3rem; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-hero-info .sub { font-size: .79rem; color: rgba(255,255,255,.75); margin-bottom: 8px; }
.detail-hero-info .badges { display: flex; gap: 5px; flex-wrap: wrap; }
.detail-hero-info .meta { font-size: .78rem; color: rgba(255,255,255,.82); margin-top: 8px; display: flex; gap: 14px; flex-wrap: wrap; }
.detail-hero-info .meta span strong { color: var(--gold-soft); font-weight: 700; }
.hero-stats { display: flex; gap: 18px; position: relative; z-index: 1; flex-shrink: 0; }
.hero-stat { text-align: center; }
.hero-stat .val { font-size: 1rem; font-weight: 800; color: var(--gold-soft); }
.hero-stat .lbl { font-size: .63rem; color: rgba(255,255,255,.55); }

/* Badge override di dalam hero — pakai versi transparan agar kontras di bg gelap */
.detail-hero .badge-tetap   { background: rgba(134,239,172,.18); color: #86EFAC; border-color: rgba(134,239,172,.35); }
.detail-hero .badge-kontrak { background: rgba(253,224,71,.15);  color: #FDE047; border-color: rgba(253,224,71,.3); }
.detail-hero .badge-blue    { background: rgba(147,197,253,.15); color: #93C5FD; border-color: rgba(147,197,253,.3); }
.detail-hero .badge-gold    { background: rgba(200,150,42,.2);   color: var(--gold-soft); border-color: rgba(200,150,42,.35); }

.detail-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.detail-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
}
.dtab {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .76rem;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: transparent;
  transition: all .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.dtab:hover { color: var(--text-primary); }
.dtab.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-xs); }
.dtab-panel { display: none; }
.dtab-panel.active { display: block; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.detail-item {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 11px 13px;
}
.detail-item label {
  font-size: .64rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  display: block;
  margin-bottom: 3px;
}
.detail-item p { font-size: .84rem; color: #111827; font-weight: 500; }
.detail-full { grid-column: 1/-1; }
.section-sub {
  font-size: .66rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 14px 0 7px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--border);
}
.pelatihan-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 11px 14px;
  margin-bottom: 8px;
}
.pelatihan-card h4 { font-size: .84rem; margin-bottom: 3px; }
.pelatihan-card p  { font-size: .74rem; color: var(--text-muted); }
.kinerja-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 10px 13px;
  margin-bottom: 8px;
}
.kinerja-score {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: .9rem;
  flex-shrink: 0;
}

/* ================================================================
   PAGINATION
   ================================================================ */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 18px;
  border-top: 1px solid var(--border-soft);
  flex-wrap: wrap;
}
.page-info { font-size: .74rem; color: var(--text-muted); margin-left: auto; }

/* ================================================================
   EMPTY STATE
   ================================================================ */
.no-data {
  text-align: center;
  padding: 44px 20px;
  color: var(--text-muted);
}
.no-data span { font-size: 2.4rem; display: block; margin-bottom: 10px; opacity: .45; }
.no-data p { font-size: .82rem; }

/* ================================================================
   ALERT & TOAST
   ================================================================ */
.alert {
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: .81rem;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-weight: 500;
}
.alert-success { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.alert-error   { background: var(--red-bg);   color: var(--red);   border: 1px solid var(--red-border); }
.alert-warning { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border); }
.alert-info    { background: var(--blue-bg);  color: var(--blue);  border: 1px solid var(--blue-border); }

.toast {
  position: fixed;
  bottom: 20px; right: 16px;
  padding: 11px 18px;
  border-radius: var(--radius-lg);
  font-size: .83rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  animation: toastIn .2s var(--ease);
  transition: opacity .5s;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
}
.toast-success { background: var(--green); color: #fff; }
.toast-error   { background: var(--red);   color: #fff; }
@keyframes toastIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }

/* ================================================================
   LOGIN
   ================================================================ */
.login-page {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--primary) 0%, #0E3D2C 50%, #163D2E 100%);
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22200%22%20height%3D%22160%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23E8B84B%22%20stroke-opacity%3D%220.13%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M10%2040%20C10%2025%2030%2025%2030%2038%20C30%2048%2018%2048%2018%2040%20C18%2035%2024%2035%2024%2039%22%2F%3E%3Cpath%20d%3D%22M50%2040%20C50%2025%2030%2025%2030%2038%22%2F%3E%3Cpath%20d%3D%22M100%2015%20L120%2040%20L100%2065%20L80%2040%20Z%22%2F%3E%3Cpath%20d%3D%22M100%2027%20L110%2040%20L100%2053%20L90%2040%20Z%22%2F%3E%3Cpath%20d%3D%22M150%2030%20L162%2042%20L150%2054%22%2F%3E%3Cpath%20d%3D%22M160%2030%20L172%2042%20L160%2054%22%2F%3E%3Cpath%20d%3D%22M170%2030%20L182%2042%20L170%2054%22%2F%3E%3Cpath%20d%3D%22M40%20120%20C40%20105%2060%20105%2060%20118%20C60%20128%2048%20128%2048%20120%20C48%20115%2054%20115%2054%20119%22%2F%3E%3Cpath%20d%3D%22M80%20120%20C80%20105%2060%20105%2060%20118%22%2F%3E%3Cpath%20d%3D%22M0%20110%20L20%20135%20L0%20160%22%2F%3E%3Cpath%20d%3D%22M150%2095%20L170%20120%20L150%20145%20L130%20120%20Z%22%2F%3E%3Cpath%20d%3D%22M150%20107%20L160%20120%20L150%20133%20L140%20120%20Z%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22%23E8B84B%22%20fill-opacity%3D%220.10%22%20stroke%3D%22none%22%3E%3Ccircle%20cx%3D%22100%22%20cy%3D%2240%22%20r%3D%222.5%22%2F%3E%3Ccircle%20cx%3D%22150%22%20cy%3D%22120%22%20r%3D%222.5%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"), linear-gradient(160deg, var(--primary) 0%, #0E3D2C 50%, #163D2E 100%), linear-gradient(160deg, var(--primary) 0%, #0E3D2C 50%, #163D2E 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  width: 450px; height: 450px;
  border-radius: 50%;
  background: rgba(200,150,42,.05);
  top: -130px; right: -90px;
}
.login-wrap {
  display: flex;
  max-width: 860px;
  width: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,.4);
  position: relative; z-index: 1;
}
.login-left {
  width: 320px;
  flex-shrink: 0;
  background: rgba(255,255,255,.04);
  border-right: 1px solid rgba(255,255,255,.06);
  padding: 44px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-left .emblem {
  width: 58px; height: 58px;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin-bottom: 22px;
  box-shadow: 0 8px 24px rgba(200,150,42,.3);
  overflow: hidden;
}
.login-left h1 { color: #fff; font-size: 1.4rem; margin-bottom: 8px; }
.login-left p  { color: rgba(255,255,255,.42); font-size: .8rem; line-height: 1.7; }
.login-right { flex: 1; background: var(--white); padding: 44px 36px; }
.login-right h2 { font-size: 1.25rem; margin-bottom: 4px; }
.login-right .sub { font-size: .8rem; color: var(--text-muted); margin-bottom: 28px; }
.login-error {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
  border-radius: var(--radius);
  padding: 9px 13px;
  font-size: .79rem;
  font-weight: 500;
  margin-bottom: 14px;
}
.btn-login {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  transition: background .15s;
  font-family: inherit;
}
.btn-login:hover { background: var(--primary-mute); }

.mig-ran     { color: var(--green); font-weight: 600; }
.mig-pending { color: var(--amber); font-weight: 600; }

/* ================================================================
   RESPONSIVE — TABLET (≤960px)
   ================================================================ */
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .sidebar-toggle { display: block; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr 1fr; }
  .content { padding: 14px 16px; }
  .org-chip { display: none; }
  .hero-stats { display: none; }
}

/* ================================================================
   RESPONSIVE — MOBILE (≤640px)
   ================================================================ */
@media (max-width: 640px) {
  :root { --topbar-h: 54px; }

  /* Welcome banner */
  .welcome-banner { padding: 18px 20px; border-radius: var(--radius-lg); }
  .wb-text h2 { font-size: 1.05rem; }
  .wb-icon { display: none; }

  /* Stat grid 2 kolom */
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-number { font-size: 1.6rem; }

  /* Topbar compact */
  .topbar { padding: 0 14px; gap: 8px; }
  .topbar-title h2 { font-size: .88rem; }
  .topbar-title span { display: none; }
  .ver-chip { display: none; }

  /* Content */
  .content { padding: 12px; }

  /* Card header */
  .card-header { padding: 12px 14px; }
  .card-header h3 { font-size: .85rem; }
  .card-body { padding: 14px; }

  /* Tabel → sembunyikan, tampilkan card list */
  .table-wrap { display: none; }
  .mobile-list { display: block; }

  /* Form full width */
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }

  /* Detail hero */
  .detail-hero { padding: 18px; border-radius: var(--radius-lg); }
  .detail-hero-photo,
  .detail-hero-ph { width: 64px; height: 64px; font-size: 1.6rem; }
  .detail-hero-info h2 { font-size: 1.1rem; }

  /* Tabs scroll horizontal */
  .detail-tabs { border-radius: var(--radius-sm); }

  /* Filter bar stack */
  .filter-bar { padding: 10px 12px; }
  .search-wrap { min-width: unset; }
  .filter-select { max-width: 100%; width: 100%; }

  /* Login */
  .login-left { display: none; }
  .login-wrap { max-width: 100%; border-radius: var(--radius-lg); }
  .login-right { padding: 32px 24px; }

  /* Pagination kompak */
  .page-info { display: none; }
  .pagination { justify-content: center; }
}

/* Hero — tampilkan versi yang sesuai layar */
.hero-mobile  { display: none; }
.hero-desktop { display: flex; }

@media (max-width: 640px) {
  .hero-mobile  { display: block; }
  .hero-desktop { display: none; }
}


/* ================================================================
   EMPLOYEE GRID VIEW
   ================================================================ */
/* === EMP GRID === */
.emp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.emp-grid-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: box-shadow .18s, border-color .18s;
  overflow: hidden;
}
.emp-grid-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--gold-border);
}
.emp-grid-card.expanded {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(30,64,130,.12), var(--shadow);
}
.egc-photo-wrap {
  margin-bottom: 7px;
}
.egc-photo {
  width: 60px; height: 80px;
  border-radius: 5px;
  object-fit: cover;
  object-position: top center;
  border: 2px solid var(--gold-border);
  display: block;
}
.egc-photo-ph {
  width: 60px; height: 80px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--primary), var(--primary-mute));
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-soft);
  font-size: 1.5rem;
  font-weight: 800;
  border: 2px solid var(--gold-border);
}
.egc-name {
  font-size: .78rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 2px;
  line-height: 1.25;
  word-break: break-word;
}
.egc-unit {
  font-size: .68rem;
  color: var(--text-light);
  margin-bottom: 5px;
  line-height: 1.2;
}
.egc-badge-row {
  margin-bottom: 2px;
}
.egc-badge-row .badge {
  font-size: .60rem;
  padding: 2px 7px;
}
/* Expand panel */
.egc-expand {
  display: none;
  width: 100%;
  flex-direction: column;
  align-items: center;
}
.emp-grid-card.expanded .egc-expand {
  display: flex;
}
.egc-divider {
  width: 100%;
  height: 1px;
  background: var(--border-soft);
  margin: 8px 0 7px;
}
.egc-sub {
  font-size: .70rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  line-height: 1.3;
}
/* Tombol aksi grid 2x2 */
.egc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  width: 100%;
  margin-top: 6px;
}
.egc-btn {
  display: block;
  width: 100%;
  padding: 5px 4px;
  border-radius: 6px;
  font-size: .68rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity .15s;
  white-space: nowrap;
  box-sizing: border-box;
}
.egc-btn:hover { opacity: .82; }
.egc-btn-detail { background: var(--bg); color: var(--navy); border: 1.5px solid var(--border); }
.egc-btn-edit { background: var(--gold-pale); color: var(--amber); border: 1.5px solid var(--gold-border); }
.egc-btn-pdf { background: #e8f5e9; color: #2e7d32; border: 1.5px solid #a5d6a7; }
.egc-btn-hapus { background: #fef2f2; color: #b91c1c; border: 1.5px solid #fca5a5; }

@media (max-width: 640px) {
  .emp-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
  }
  .egc-photo, .egc-photo-ph { width: 50px; height: 67px; }
  .egc-name { font-size: .74rem; }
  .egc-btn { font-size: .62rem; padding: 4px 3px; }
}
@media (max-width: 380px) {
  .emp-grid { grid-template-columns: 1fr; }
}


/* ================================================================
   MOTIF PAPUA-ISLAMI
   Pola segitiga/zigzag khas ukiran Papua (Sentani/Asmat)
   dipadukan bintang segi delapan (khatam) Islami — aksen emas
   ================================================================ */

/* Band motif: strip horizontal — segitiga Papua presisi + belah ketupat berirama */
.motif-band {
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2240%22%20height%3D%2214%22%3E%3Cpath%20d%3D%22M0%2013%20L10%202%20L20%2013%20L30%202%20L40%2013%22%20fill%3D%22none%22%20stroke%3D%22%23E8B84B%22%20stroke-opacity%3D%220.85%22%20stroke-width%3D%222%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: repeat-x;
  background-position: center;
}

/* Pattern latar: jaring belah-ketupat + bintang segi-8 Islami, rapi & simetris */
.motif-bg { position: relative; }
.motif-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22200%22%20height%3D%22160%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23E8B84B%22%20stroke-opacity%3D%220.16%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M10%2040%20C10%2025%2030%2025%2030%2038%20C30%2048%2018%2048%2018%2040%20C18%2035%2024%2035%2024%2039%22%2F%3E%3Cpath%20d%3D%22M50%2040%20C50%2025%2030%2025%2030%2038%22%2F%3E%3Cpath%20d%3D%22M100%2015%20L120%2040%20L100%2065%20L80%2040%20Z%22%2F%3E%3Cpath%20d%3D%22M100%2027%20L110%2040%20L100%2053%20L90%2040%20Z%22%2F%3E%3Cpath%20d%3D%22M150%2030%20L162%2042%20L150%2054%22%2F%3E%3Cpath%20d%3D%22M160%2030%20L172%2042%20L160%2054%22%2F%3E%3Cpath%20d%3D%22M170%2030%20L182%2042%20L170%2054%22%2F%3E%3Cpath%20d%3D%22M40%20120%20C40%20105%2060%20105%2060%20118%20C60%20128%2048%20128%2048%20120%20C48%20115%2054%20115%2054%20119%22%2F%3E%3Cpath%20d%3D%22M80%20120%20C80%20105%2060%20105%2060%20118%22%2F%3E%3Cpath%20d%3D%22M0%20110%20L20%20135%20L0%20160%22%2F%3E%3Cpath%20d%3D%22M150%2095%20L170%20120%20L150%20145%20L130%20120%20Z%22%2F%3E%3Cpath%20d%3D%22M150%20107%20L160%20120%20L150%20133%20L140%20120%20Z%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22%23E8B84B%22%20fill-opacity%3D%220.12%22%20stroke%3D%22none%22%3E%3Ccircle%20cx%3D%22100%22%20cy%3D%2240%22%20r%3D%222.5%22%2F%3E%3Ccircle%20cx%3D%22150%22%20cy%3D%22120%22%20r%3D%222.5%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  background-repeat: repeat;
  background-size: 200px 160px;
  border-radius: inherit;
}

/* Garis aksen ukir halus untuk tepi bawah header */
.motif-accent { position: relative; }
.motif-accent::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='6'%3E%3Cg fill='none' stroke='%23C8962A' stroke-width='1' stroke-opacity='.3'%3E%3Cpath d='M2 5 L8 1 L14 5'/%3E%3Cpath d='M18 5 L24 1 L30 5'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x;
}


/* ── Tombol Login Google ── */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .86rem;
  font-weight: 600;
  color: #3c4043;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, box-shadow .15s, border-color .15s;
}
.btn-google:hover {
  background: #f8f9fa;
  border-color: #d2d6dc;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

/* ================================================================
   PRINT
   ================================================================ */
@media print {
  .sidebar, .topbar, .card-actions, .btn,
  .detail-tabs, .detail-actions, .no-print { display: none !important; }
  .main { margin-left: 0; }
  .dtab-panel { display: block !important; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
}
