/* ==========================================================================
   IDEAS — tema "navigasi atas" biru/putih
   Dashboard, frontend & login. Di atas Bootstrap 3.3.6 + Font Awesome 3.2.1.
   ========================================================================== */

:root {
  --blue:       #1a56db;
  --blue-dark:  #1e429f;
  --blue-ink:   #0c2d6b;
  --blue-soft:  #3f83f8;
  --blue-100:   #d6e4ff;
  --blue-50:    #ebf2ff;

  --white:      #ffffff;
  --bg:         #f6f8fb;
  --line:       #e3e8ef;
  --line-soft:  #eef1f6;
  --ink:        #101828;
  --ink-2:      #344054;
  --muted:      #667085;

  --green: #057a55; --green-bg: #def7ec;
  --amber: #b45309; --amber-bg: #fdf3d7;
  --red:   #c81e1e; --red-bg:   #fde8e8;

  --r:    10px;
  --r-sm: 7px;
  --wrap: 100%;
  --nav-h: 66px;
  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Base ---------------------------------------------------------- */
body {
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* footer selalu di dasar layar walau konten pendek */
  display: flex; flex-direction: column; min-height: 100vh;
}
.page-footer { margin-top: auto; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font); color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
a { color: var(--blue); }
a:hover, a:focus { color: var(--blue-dark); text-decoration: none; }
::selection { background: var(--blue-100); }
img { max-width: 100%; }
.wrap { max-width: 100%; width: 100%; margin: 0 auto; padding: 0 28px; }
@media (max-width: 767px) { .wrap { padding: 0 16px; } }

/* ==========================================================================
   NAVIGASI ATAS (dipakai dashboard & frontend)
   ========================================================================== */
.topnav {
  position: sticky; top: 0; z-index: 1030;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.topnav .wrap { display: flex; align-items: center; gap: 28px; height: var(--nav-h); }
.topnav-brand { display: flex; align-items: center; gap: 10px; flex: none; color: var(--ink); }
.topnav-brand:hover, .topnav-brand:focus { color: var(--ink); }
.topnav-brand img { width: 36px; height: 36px; object-fit: contain; }
.topnav-brand span { font-size: 19px; font-weight: 700; letter-spacing: .02em; color: var(--blue-ink); line-height: 1; }
.topnav-brand em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12px; letter-spacing: .12em; margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--line); }

.topnav-menu { flex: 1; min-width: 0; height: 100%; }
.topnav-menu > ul { display: flex; align-items: stretch; height: 100%; margin: 0; padding: 0; list-style: none; gap: 2px; }
.topnav-menu > ul > li { position: relative; display: flex; }
.topnav-menu > ul > li > a {
  position: relative; display: flex; align-items: center; gap: 6px;
  padding: 0 14px; color: var(--ink-2); font-weight: 500; font-size: 14.5px; white-space: nowrap;
}
.topnav-menu > ul > li > a > i { font-size: 13px; color: var(--muted); }
.topnav-menu > ul > li > a:hover, .topnav-menu > ul > li.open > a { color: var(--blue); background: transparent; }
.topnav-menu > ul > li.is-active > a { color: var(--blue); font-weight: 600; }
.topnav-menu > ul > li.is-active > a:after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--blue);
}

.topnav .dropdown-menu {
  margin-top: 0; padding: 6px; min-width: 220px;
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 12px 32px rgba(16, 24, 40, .12);
}
.topnav-menu .dropdown-menu { top: calc(100% + 1px); }
.topnav .dropdown-menu > li > a { padding: 8px 12px; border-radius: var(--r-sm); color: var(--ink-2); font-size: 14px; font-weight: 500; }
.topnav .dropdown-menu > li > a > i { width: 18px; color: var(--muted); }
.topnav .dropdown-menu > li > a:hover { background: var(--blue-50); color: var(--blue); }
.topnav .dropdown-menu > .active > a, .topnav .dropdown-menu > .active > a:hover { background: var(--blue-50); color: var(--blue); font-weight: 600; }
.topnav .dropdown-menu .dropdown-header { padding: 8px 12px 10px; color: var(--ink); font-weight: 600; font-size: 13.5px; }
.topnav .dropdown-menu .dropdown-header small { color: var(--muted); font-weight: 500; }
.topnav .dropdown-menu .divider { margin: 6px 0; background: var(--line-soft); }
.topnav .dropdown-menu .text-danger { color: var(--red); }
.topnav .dropdown-menu .text-danger i { color: var(--red); }

.topnav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.account { display: flex; align-items: center; gap: 10px; padding: 5px 8px 5px 5px; border-radius: 999px; color: var(--ink-2); border: 1px solid transparent; }
.account:hover, .account:focus, .open > .account { border-color: var(--line); background: var(--bg); color: var(--ink); }
.account .meta { line-height: 1.2; }
.account .meta b { display: block; font-size: 13.5px; font-weight: 600; max-width: 180px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account .meta small { font-size: 12px; color: var(--muted); }
.account > i { color: var(--muted); font-size: 13px; }
.avatar {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue-50); color: var(--blue); border: 1px solid var(--blue-100);
  font-weight: 700; font-size: 13px; text-transform: uppercase;
}
.topnav-burger {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--white); color: var(--ink-2); font-size: 16px;
}
.topnav-burger:hover { color: var(--blue); border-color: var(--blue-100); background: var(--blue-50); }

@media (max-width: 1100px) {
  .topnav .wrap { gap: 12px; }
  .topnav-burger { display: inline-flex; }
  .account .meta, .account > i { display: none; }
  .topnav-menu {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; height: auto;
    background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 16px 32px rgba(16,24,40,.08);
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .nav-open .topnav-menu { display: block; }
  .topnav-menu > ul { flex-direction: column; height: auto; padding: 8px 16px 16px; gap: 0; }
  .topnav-menu > ul > li { display: block; }
  .topnav-menu > ul > li > a { padding: 12px 8px; border-bottom: 1px solid var(--line-soft); }
  .topnav-menu > ul > li.is-active > a:after { left: 0; right: auto; top: 10px; bottom: 10px; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
  .topnav-menu > ul > li.is-active > a { padding-left: 14px; }
  .topnav-menu .dropdown-menu { position: static; float: none; box-shadow: none; border: 0; padding: 0 0 6px 12px; }
  .topnav-brand em { display: none; }
}

/* ---------- Pita biru (judul halaman) ------------------------------------- */
.band {
  position: relative;
  padding: 26px 0 78px;
  color: var(--white);
  background-color: var(--blue);
  background-image:
    radial-gradient(rgba(255,255,255,.16) 1px, transparent 1.2px),
    linear-gradient(120deg, var(--blue-dark) 0%, var(--blue) 55%, var(--blue-soft) 100%);
  background-size: 18px 18px, 100% 100%;
}
.band-crumb { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; font-size: 13px; color: rgba(255,255,255,.72); }
.band-crumb li + li:before { content: "/"; margin-right: 6px; opacity: .6; }
.band-crumb a { color: rgba(255,255,255,.85); }
.band-crumb a:hover { color: var(--white); }
.band h1 { margin: 0; color: var(--white); font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.band p { margin: 6px 0 0; color: rgba(255,255,255,.82); max-width: 640px; }
@media (max-width: 767px) { .band { padding: 20px 0 64px; } .band h1 { font-size: 22px; } }

.page { position: relative; margin-top: -52px; padding-bottom: 40px; }
.page-footer { padding: 20px 0; border-top: 1px solid var(--line); background: var(--white); color: var(--muted); font-size: 13px; }
.page-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; }

/* Struktur lama di view konten */
.inner { padding: 0 !important; min-height: 0 !important; }
.inner > hr { display: none; }
.inner > [class*="col-"] { float: none; padding-left: 0; padding-right: 0; }
.page-title { margin: 0 0 16px; font-size: 22px; }

/* ==========================================================================
   KOMPONEN (Bootstrap 3 overrides) — gaya datar bergaris tipis
   ========================================================================== */

/* Panels */
.panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 1px 2px rgba(16,24,40,.04); margin-bottom: 22px;
}
.panel > .panel-heading {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 14px 20px; background: var(--white) !important; color: var(--ink) !important;
  border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; font-weight: 600;
}
.panel > .panel-heading:before, .panel > .panel-heading:after { display: none; }
.panel > .panel-heading small { font-size: 14.5px; }
.panel > .panel-heading i { color: var(--blue); }
.panel > .panel-heading .btn i, .panel > .panel-heading a .btn i { color: inherit; }
.panel-body { padding: 20px; }
.panel-body > .panel-body { padding: 0; }
.panel-footer { background: var(--bg); border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); }

/* Buttons */
.btn { border-radius: var(--r-sm); font-weight: 600; font-size: 14px; padding: 8px 16px; box-shadow: none; transition: background .15s, border-color .15s, color .15s; }
.btn:focus, .btn:active:focus, .btn.active:focus { outline: none; box-shadow: 0 0 0 3px rgba(26,86,219,.22); }
.btn > i { margin-right: 4px; }
.btn + .btn, a + .btn, .btn + a > .btn { margin-left: 6px; }
.btn-primary { background: var(--blue); border-color: var(--blue); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active { background: var(--blue-dark) !important; border-color: var(--blue-dark) !important; }
.btn-default { background: var(--white); border-color: var(--line); color: var(--ink-2); }
.btn-default:hover, .btn-default:focus { background: var(--bg); border-color: #cfd6e0; color: var(--ink); }
.btn-success { background: var(--green); border-color: var(--green); }
.btn-success:hover, .btn-success:focus { background: #046c4e; border-color: #046c4e; }
.btn-danger { background: var(--white); border-color: #f5c2c2; color: var(--red); }
.btn-danger:hover, .btn-danger:focus { background: var(--red); border-color: var(--red); color: var(--white); }
.btn-warning { background: var(--amber); border-color: var(--amber); }
.btn-info { background: var(--blue-soft); border-color: var(--blue-soft); }
.btn-lg { padding: 12px 22px; font-size: 15.5px; }
.btn-sm, .btn-xs { padding: 5px 11px; font-size: 13px; }
.btn-block { display: block; width: 100%; }

/* Forms */
label { font-weight: 600; font-size: 13.5px; color: var(--ink-2); margin-bottom: 6px; }
.form-group { margin-bottom: 18px; }
.form-control {
  height: 42px; padding: 9px 12px; font-size: 14.5px; color: var(--ink); font-family: var(--font);
  border: 1px solid #d0d5dd; border-radius: var(--r-sm); box-shadow: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea.form-control { height: auto; }
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,86,219,.15); }
.form-control[readonly], .form-control[disabled] { background: var(--bg); color: var(--muted); }

/* Tables */
.table-responsive { border: 0; margin-bottom: 0; }
.table { margin-bottom: 0; color: var(--ink-2); }
.table > thead > tr > th {
  padding: 11px 14px; background: #f5f8ff; color: var(--ink-2);
  font-size: 13px; font-weight: 600; white-space: nowrap; vertical-align: middle;
  border-top: 0 !important; border-bottom: 1px solid var(--line) !important;
}
.table > tbody > tr > td { padding: 12px 14px; border-top: 1px solid var(--line-soft); vertical-align: middle; font-size: 14px; }
.table-bordered, .table-bordered > thead > tr > th, .table-bordered > tbody > tr > td { border-left: 0 !important; border-right: 0 !important; }
.table-bordered { border: 1px solid var(--line); border-radius: var(--r-sm); border-collapse: separate; overflow: hidden; }
.table-striped > tbody > tr:nth-of-type(odd) { background: var(--white); }
.table-striped > tbody > tr:nth-of-type(even) { background: #fafbfd; }
.table-hover > tbody > tr:hover { background: var(--blue-50) !important; }
.table td[align="center"] { white-space: nowrap; text-align: center; }
/* Ikon aksi edit/hapus jadi tombol bergaris */
.table td a > i[class^="icon-"], .table td a > i[class*=" icon-"], .table td a > span[class^="icon-"] {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; margin: 1px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--white); color: var(--blue); font-size: 14px;
  transition: all .15s;
}
.table td a:hover > i[class^="icon-"], .table td a:hover > span[class^="icon-"] { border-color: var(--blue); background: var(--blue); color: var(--white); }
.table td a > i.icon-trash, .table td a > i.icon-remove { color: var(--red); }
.table td a:hover > i.icon-trash, .table td a:hover > i.icon-remove { border-color: var(--red); background: var(--red); color: var(--white); }

/* DataTables 1.10 */
.dataTables_wrapper .row { margin: 0; }
.dataTables_wrapper .row > [class*="col-"] { padding: 0; }
.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter { margin-bottom: 14px; }
/* Form Controls & Inputs */
.form-control {
  height: 38px;
  padding: 6px 12px;
  font-size: 13.5px;
  line-height: normal;
  color: var(--ink);
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: none;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.form-control:focus {
  border-color: var(--blue-soft);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(2,132,199,.15);
}
select.form-control,
select.form-control.input-sm {
  height: 38px !important;
  line-height: 1.42857143 !important;
  padding: 6px 12px !important;
  font-size: 13.5px !important;
  box-sizing: border-box !important;
}
textarea.form-control {
  height: auto;
}

/* Filter Bar Forms */
.filter-bar-form {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 12px 18px !important;
}
.filter-bar-form .form-group {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  vertical-align: middle !important;
}
.filter-bar-form .form-group > label {
  margin: 0 8px 0 0 !important;
  white-space: nowrap !important;
  flex: none !important;
  font-weight: 600;
  color: #334155;
}
.filter-bar-form .select2-container {
  width: auto !important;
  min-width: 220px !important;
}

/* DataTables 1.10 */
.dataTables_wrapper {
  display: block !important;
  position: relative;
  clear: both;
}
.dataTables_wrapper.form-inline {
  display: block !important;
}
.dataTables_wrapper .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 12px;
}
.dataTables_wrapper .row:after {
  content: "";
  display: table;
  clear: both;
}
.dataTables_wrapper .dataTables_length {
  float: left;
  margin-bottom: 14px;
}
.dataTables_wrapper .dataTables_filter {
  float: right;
  text-align: right;
  margin-bottom: 14px;
}
.dataTables_wrapper .dataTables_length label, .dataTables_wrapper .dataTables_filter label { font-weight: 500; color: var(--muted); }
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select {
  height: 38px; padding: 6px 12px; margin-left: 8px;
  border: 1px solid #d0d5dd; border-radius: var(--r-sm); box-shadow: none; outline: none;
}
.dataTables_wrapper .dataTables_filter input {
  width: 240px; padding-left: 34px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center;
}
.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,86,219,.15); }
.dataTables_wrapper .dataTables_info { float: left; padding-top: 14px !important; color: var(--muted); font-size: 13px; }
.dataTables_wrapper .dataTables_paginate { float: right; text-align: right; padding-top: 8px; }
table.dataTable { margin-top: 0 !important; margin-bottom: 0 !important; clear: both; width: 100% !important; }
@media (max-width: 767px) {
  .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter { float: none; text-align: left; }
  .dataTables_wrapper .dataTables_filter input { width: 100%; margin-left: 0; }
  .dataTables_wrapper .dataTables_filter label { display: block; }
}

/* Pagination */
.pagination > li > a, .pagination > li > span {
  margin: 0 2px; min-width: 36px; text-align: center;
  border: 1px solid var(--line); border-radius: var(--r-sm) !important;
  color: var(--ink-2); font-weight: 600; font-size: 13px;
}
.pagination > li > a:hover { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue); }
.pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > a:focus { background: var(--blue); border-color: var(--blue); }

/* Labels */
.label { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.label-default { background: var(--line-soft); color: var(--ink-2); }
.label-primary, .label-info { background: var(--blue-50); color: var(--blue); }
.label-success { background: var(--green-bg); color: var(--green); }
.label-warning { background: var(--amber-bg); color: var(--amber); }
.label-danger  { background: var(--red-bg); color: var(--red); }

/* Alerts */
.alert { border: 1px solid; border-radius: var(--r-sm); padding: 12px 16px; font-weight: 500; }
.alert-success { background: var(--green-bg); border-color: #bcf0da; color: #03543f; }
.alert-danger  { background: var(--red-bg); border-color: #f8b4b4; color: #9b1c1c; }
.alert-warning, .alert-block { background: var(--amber-bg); border-color: #fce96a; color: #8e4b10; }
.alert-info    { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue-ink); }
.alert h4 { color: inherit; font-size: 14px; margin: 0 0 4px; }
.alert ul, .alert p { margin: 0; }

/* Modals, list-group, well */
.modal-content { border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 48px rgba(16,24,40,.18); }
.modal-header { border-bottom: 1px solid var(--line); padding: 16px 20px; }
.modal-footer { border-top: 1px solid var(--line); padding: 14px 20px; }
.list-group-item { border-color: var(--line); }
.well { background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: var(--r); box-shadow: none; }

/* ---------- Kotak statistik beranda (.quick-btn) --------------------------- */
.page div[style="text-align: center;"] {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px;
  text-align: left !important; margin-bottom: 22px;
}
.quick-btn {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "num ic" "lbl ic";
  align-items: center; column-gap: 12px;
  padding: 18px 20px; text-align: left;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--ink-2); box-shadow: 0 1px 2px rgba(16,24,40,.04);
  transition: border-color .15s, transform .15s;
}
.quick-btn:after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.quick-btn:hover, .quick-btn:focus { border-color: var(--blue-100); color: var(--ink-2); transform: translateY(-1px); }
.quick-btn:hover:after { transform: scaleX(1); }
.quick-btn > .label {
  grid-area: num; position: static; padding: 0; border-radius: 0;
  background: none !important; color: var(--ink) !important; text-align: left;
  font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em;
}
.quick-btn > span:not(.label) { grid-area: lbl; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.quick-btn > i {
  grid-area: ic; display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--blue-50); color: var(--blue); font-size: 20px !important;
}
.quick-btn:not(:has(.label)) > span:not(.label) { grid-row: 1 / span 2; font-size: 15px; color: var(--ink); font-weight: 600; }
@media (max-width: 480px) {
  .page div[style="text-align: center;"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .quick-btn { padding: 14px; grid-template-columns: 1fr; grid-template-areas: "ic" "num" "lbl"; row-gap: 6px; }
  .quick-btn > i { width: 38px; height: 38px; font-size: 16px !important; }
  .quick-btn > .label { font-size: 24px; }
}

/* "Info Terbaru" di dashboard */
.chat { list-style: none; margin: 0; padding: 0; }
.chat li { display: flex; gap: 14px; margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.chat li:first-child { padding-top: 0; }
.chat li:last-child { border-bottom: 0; padding-bottom: 0; }
.chat .chat-img { float: none !important; flex: none; }
.chat .chat-img img { width: 38px; height: 38px; padding: 6px; border-radius: 50%; background: var(--blue-50); border: 1px solid var(--blue-100); }
.chat .chat-body { flex: 1; min-width: 0; }
.chat .chat-body .header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-bottom: 4px; }
.chat .chat-body p { margin: 0; color: var(--ink-2); }
.chat .header .label { float: none !important; background: var(--bg) !important; color: var(--muted) !important; border: 1px solid var(--line); }

/* ---------- Kelas sisa template lama (row-form / span3 / span9) ------------ */
.row-fluid { width: 100%; }
.row-fluid:after, .row-form:after { content: ""; display: table; clear: both; }
.head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.head h1 { font-size: 20px; margin: 0; }
.block, .block-fluid { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 20px; margin-bottom: 22px; }
.block .block-fluid { border: 0; padding: 0; margin: 0; }
.row-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.row-form:last-child { border-bottom: 0; }
.row-form > .span3 { flex: 0 0 200px; font-weight: 600; color: var(--ink-2); font-size: 13.5px; }
.row-form > .span9 { flex: 1 1 260px; min-width: 0; }
.row-form input[type=text], .row-form input[type=password], .row-form select, .row-form textarea {
  width: 100%; height: 42px; padding: 9px 12px; border: 1px solid #d0d5dd; border-radius: var(--r-sm); background: var(--white);
}
.row-form textarea { height: auto; }
.dr { display: none; }

/* ---------- Util ---------------------------------------------------------- */
.text-muted { color: var(--muted) !important; }
.text-primary { color: var(--blue) !important; }
.mt-0 { margin-top: 0 !important; }
.empty-state { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty-state i { display: block; font-size: 30px; color: var(--blue-100); margin-bottom: 10px; }

/* ==========================================================================
   FRONTEND (halaman publik)
   ========================================================================== */
.topnav-login { margin-left: 4px; }

.hero {
  position: relative;
  padding: 56px 0 120px;
  color: var(--white);
  background-color: var(--blue);
  background-image:
    radial-gradient(rgba(255,255,255,.16) 1px, transparent 1.2px),
    linear-gradient(120deg, var(--blue-dark) 0%, var(--blue) 55%, var(--blue-soft) 100%);
  background-size: 18px 18px, 100% 100%;
}
.hero .kicker { display: inline-block; margin-bottom: 14px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.hero h1 { margin: 0 0 14px; max-width: 720px; color: var(--white); font-size: 42px; line-height: 1.15; font-weight: 700; letter-spacing: -.012em; }
.hero p { max-width: 600px; margin: 0 0 26px; color: rgba(255,255,255,.85); font-size: 17px; }
.hero-search {
  display: flex; gap: 8px; max-width: 620px; padding: 6px;
  background: var(--white); border-radius: 12px; box-shadow: 0 16px 40px rgba(12,45,107,.25);
}
.hero-search .field { position: relative; flex: 1; }
.hero-search .field i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.hero-search input { width: 100%; height: 46px; padding: 0 12px 0 40px; border: 0; outline: none; font-size: 15px; color: var(--ink); background: transparent; }
.hero-search .btn { height: 46px; padding: 0 22px; }
.hero-links { margin-top: 16px; font-size: 14px; color: rgba(255,255,255,.8); }
.hero-links a { color: var(--white); font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.4); }
@media (max-width: 767px) { .hero { padding: 40px 0 96px; } .hero h1 { font-size: 28px; } .hero p { font-size: 15.5px; } }

.steps { position: relative; margin-top: -72px; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--white); border: 1px solid var(--line); border-radius: var(--r); }
.step { padding: 22px 24px; }
.step + .step { border-left: 1px solid var(--line); }
.step .num { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-bottom: 10px; border-radius: 50%; border: 1px solid var(--blue-100); background: var(--blue-50); color: var(--blue); font-weight: 700; font-size: 13.5px; }
.step h3 { margin: 0 0 4px; font-size: 16px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }
@media (max-width: 767px) { .steps { grid-template-columns: 1fr; } .step + .step { border-left: 0; border-top: 1px solid var(--line); } }

.site-section { padding: 40px 0 48px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 21px; }
.section-head p { margin: 4px 0 0; color: var(--muted); }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 22px; }
.card-body { padding: 22px; }
.card-header { padding: 14px 22px; border-bottom: 1px solid var(--line); font-weight: 600; }

.news-list { list-style: none; margin: 0; padding: 0; }
.news-item { display: flex; gap: 18px; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.news-item:last-child { border-bottom: 0; }
.news-date { flex: none; width: 58px; padding: 2px 16px 0 0; text-align: center; border-right: 1px solid var(--line); box-sizing: content-box; }
.news-date b { display: block; font-size: 24px; line-height: 1; color: var(--blue); }
.news-date span { font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }
.news-body { flex: 1; min-width: 0; color: var(--ink-2); }
.news-body .news-meta { margin-bottom: 4px; font-size: 13px; color: var(--muted); }
.news-body p:last-child { margin-bottom: 0; }

.detail-list { margin: 0; }
.detail-list .row-item { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.detail-list .row-item:last-child { border-bottom: 0; }
.detail-list dt { flex: 0 0 200px; font-weight: 600; color: var(--muted); font-size: 13.5px; }
.detail-list dd { flex: 1 1 240px; margin: 0; font-weight: 500; }

/* ==========================================================================
   LOGIN
   ========================================================================== */
.auth { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.auth-band {
  padding: 26px 0 150px; color: var(--white);
  background-color: var(--blue);
  background-image:
    radial-gradient(rgba(255,255,255,.16) 1px, transparent 1.2px),
    linear-gradient(120deg, var(--blue-dark) 0%, var(--blue) 55%, var(--blue-soft) 100%);
  background-size: 18px 18px, 100% 100%;
}
.auth-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-band .brand { display: flex; align-items: center; gap: 10px; color: var(--white); }
.auth-band .brand:hover { color: var(--white); }
.auth-band .brand img { width: 40px; height: 40px; padding: 3px; border-radius: 50%; background: var(--white); }
.auth-band .brand span { font-size: 19px; font-weight: 700; letter-spacing: .02em; }
.auth-band .brand em { font-style: normal; font-weight: 500; font-size: 12px; letter-spacing: .12em; opacity: .75; margin-left: 8px; padding-left: 8px; border-left: 1px solid rgba(255,255,255,.35); }
.auth-band .back { color: rgba(255,255,255,.85); font-size: 14px; font-weight: 500; }
.auth-band .back:hover { color: var(--white); }

.auth-main { flex: 1; margin-top: -110px; padding: 0 16px 40px; }
.auth-card {
  max-width: 440px; margin: 0 auto; padding: 34px 34px 28px;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 48px rgba(12,45,107,.12);
}
.auth-card .kicker { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.auth-card h1 { margin: 0 0 6px; font-size: 25px; }
.auth-card .sub { margin-bottom: 24px; color: var(--muted); }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .form-control { height: 46px; padding-left: 38px; }
.input-icon .form-control.has-toggle { padding-right: 46px; }
.input-icon .toggle-pass {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); cursor: pointer;
}
.input-icon .toggle-pass:hover { color: var(--blue); background: var(--blue-50); }
.auth-card .btn-primary { height: 48px; font-size: 15.5px; margin-top: 6px; }
.auth-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 13px; text-align: center; }
.auth-copy { margin-top: 20px; text-align: center; color: var(--muted); font-size: 12.5px; }
@media (max-width: 480px) { .auth-card { padding: 26px 20px 22px; } .auth-band .brand em { display: none; } }

/* ---------- Select2 Custom Styles -------------------------------------- */
.select2-container { width: 100% !important; }
.select2-container--default .select2-selection--single {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background-color: var(--white);
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  display: flex;
  align-items: center;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 36px;
  padding-left: 12px;
  padding-right: 28px;
  color: var(--ink);
  font-size: 13.5px;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: var(--muted);
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 36px;
  right: 8px;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--blue-soft) !important;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(2,132,199,.15);
}
.select2-dropdown {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: 0 10px 25px rgba(15,23,42,.1);
  font-size: 13.5px;
  z-index: 10050;
  overflow: hidden;
}
.select2-container--default .select2-search--dropdown {
  padding: 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  outline: none;
  font-size: 13px;
  background: var(--white);
}
.select2-container--default .select2-search--dropdown .select2-search__field:focus {
  border-color: var(--blue-soft);
  box-shadow: 0 0 0 2px rgba(2,132,199,.12);
}
.select2-container--default .select2-results__option {
  padding: 7px 12px;
  font-size: 13.5px;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--blue);
  color: #ffffff;
}
.select2-container--default .select2-results__option[aria-selected="true"] {
  background-color: var(--blue-50);
  color: var(--blue);
  font-weight: 600;
}
.select2-container--default .select2-selection--single .select2-selection__clear {
  color: var(--muted);
  margin-right: 18px;
  font-size: 16px;
}
.select2-container--default .select2-selection--single .select2-selection__clear:hover {
  color: var(--danger);
}

/* ---------- Print -------------------------------------------------------- */
@media print {
  .topnav, .band, .page-footer, .btn { display: none !important; }
  .page { margin-top: 0; }
  .panel, .card { border: 0; box-shadow: none; }
}
