/* ============================================================
   KARDUSKU TAIWAN — Admin Redesign v1
   Clean overlay for admin pages (drivers, schedules)
   Palette: red (#e52657) + navy (#1e3a5f)
   ============================================================ */

:root {
  --navy:        #1e3a5f;
  --navy-dark:   #152a46;
  --navy-soft:   #eef2f7;
  --navy-glow:   rgba(30,58,95,.12);

  --ink-2:       #2a2f3a;
  --muted-2:     #8a94a6;
  --line:        #eef1f5;
  --line-soft:   #f4f6fa;
}

/* ========== PAGE SHELL ========== */
.kdk-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4px 4px 40px;
}

.kdk-page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 2px 22px;
  gap: 14px;
  flex-wrap: wrap;
}

.kdk-page-head .title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.kdk-page-head .title h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink-2);
  margin: 0;
  letter-spacing: -.01em;
}

.kdk-page-head .title .sub {
  font-size: 12px;
  color: var(--muted-2);
  margin-top: 2px;
}

.kdk-page-head .title-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff0f5, #ffe3ec);
  color: var(--kdk);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.kdk-page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ========== BUTTON PALETTE (red + navy) ========== */

/* RED — primary action (create, save, search) */
.btn-kdk-solid {
  background: var(--kdk);
  color: #fff;
  border: 0;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13.5px;
  font-family: inherit;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(229,38,87,.18);
}
.btn-kdk-solid:hover {
  background: var(--kdk-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(229,38,87,.28);
}
.btn-kdk-solid:active { transform: translateY(0); }
.btn-kdk-solid.sm { padding: 7px 13px; font-size: 12.5px; border-radius: 8px; }

/* RED OUTLINE — destructive / deactivate */
.btn-kdk-ghost {
  background: #fff;
  color: var(--kdk);
  border: 1.5px solid #fbd5e0;
  padding: 7px 13px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12.5px;
  font-family: inherit;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
}
.btn-kdk-ghost:hover {
  background: var(--kdk);
  color: #fff;
  border-color: var(--kdk);
}

/* NAVY — secondary actions (edit, print, manage) */
.btn-navy-solid {
  background: var(--navy);
  color: #fff;
  border: 0;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13.5px;
  font-family: inherit;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(30,58,95,.18);
}
.btn-navy-solid:hover {
  background: var(--navy-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(30,58,95,.25);
}
.btn-navy-solid:active { transform: translateY(0); }
.btn-navy-solid.sm { padding: 7px 13px; font-size: 12.5px; border-radius: 8px; }

/* NAVY OUTLINE — tertiary */
.btn-navy-ghost {
  background: #fff;
  color: var(--navy);
  border: 1.5px solid #d6deeb;
  padding: 7px 13px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12.5px;
  font-family: inherit;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all .18s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-navy-ghost:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  text-decoration: none;
}

/* Form-size button */
.btn-kdk-solid.w-100, .btn-navy-solid.w-100 { justify-content: center; }

/* ========== CLEAN CARD ========== */
.kdk-card-clean {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16,24,40,.03);
  overflow: hidden;
}
.kdk-card-clean + .kdk-card-clean { margin-top: 14px; }
/* Reset margin-top saat card berada di dalam container grid/flex.
   Tanpa override ini, sibling card kedua di grid dapat 14px margin-top extra
   → card kedua turun ke bawah padahal harusnya top-aligned. */
[style*="display:grid"] > .kdk-card-clean + .kdk-card-clean,
[style*="display: grid"] > .kdk-card-clean + .kdk-card-clean,
[style*="display:flex"] > .kdk-card-clean + .kdk-card-clean,
[style*="display: flex"] > .kdk-card-clean + .kdk-card-clean {
  margin-top: 0;
}
.kdk-card-clean .body { padding: 18px 20px; }
.kdk-card-clean .body-tight { padding: 14px 16px; }

/* ========== DATA TABLE (clean) ========== */
.kdk-table-wrap { overflow-x: auto; }

.kdk-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
  min-width: 640px;
}
.kdk-table thead th {
  background: #fafbfc;
  color: var(--muted-2);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.kdk-table thead th.num { text-align: right; }
.kdk-table thead th.center { text-align: center; }

.kdk-table tbody td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
  color: var(--ink-2);
}
.kdk-table tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }
.kdk-table tbody td.center { text-align: center; }
.kdk-table tbody tr:last-child td { border-bottom: 0; }
.kdk-table tbody tr { transition: background .15s ease; }
.kdk-table tbody tr:hover { background: #fafbfc; }
.kdk-table tbody tr.is-muted td { color: var(--muted-2); }

.kdk-table .col-actions {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}
.kdk-table .col-actions .btn-kdk-ghost,
.kdk-table .col-actions .btn-navy-ghost { margin-left: 6px; }

/* Name cell with avatar initial */
.kdk-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.kdk-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff0f5, #ffe3ec);
  color: var(--kdk);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  letter-spacing: .5px;
}
.kdk-name-cell .name { font-weight: 600; color: var(--ink-2); line-height: 1.3; }
.kdk-name-cell .meta { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }

/* Inline icon-label */
.kdk-cell-ico {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-2);
}
.kdk-cell-ico i {
  color: var(--muted-2);
  font-size: 12px;
  width: 14px;
  text-align: center;
}
.kdk-cell-muted { color: var(--muted-2); }

/* Pill / chip (area, tags) */
.kdk-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--navy-soft);
  color: var(--navy);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.kdk-chip + .kdk-chip { margin-left: 4px; }

.kdk-chip-dash {
  color: var(--muted-2);
  background: transparent;
  border: 1px dashed #d8dde5;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
}

/* Status badges (scheduled / completed / failed / etc) */
.kdk-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.kdk-status::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.kdk-status.is-active    { background: #e8f7ef; color: #0f8f4d; }
.kdk-status.is-inactive  { background: #f0f1f3; color: #6b7280; }
.kdk-status.is-scheduled { background: #fff4e0; color: #b5710a; }
.kdk-status.is-completed { background: #e8f7ef; color: #0f8f4d; }
.kdk-status.is-failed    { background: #fde8ea; color: #c42828; }
.kdk-status.is-resched   { background: #e5efff; color: #1456c4; }

/* Type tag (Delivery / Pickup / Indo) */
.kdk-type {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.25;
}
.kdk-type .label {
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-2);
}
.kdk-type.is-delivery .dot { background: #f59e0b; }
.kdk-type.is-pickup   .dot { background: #3b82f6; }
.kdk-type.is-indo     .dot { background: var(--kdk); }
.kdk-type .label::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px; border-radius: 2px;
  margin-right: 7px;
  vertical-align: middle;
  transform: translateY(-1px);
}
.kdk-type.is-delivery .label::before { background: #f59e0b; }
.kdk-type.is-pickup   .label::before { background: #3b82f6; }
.kdk-type.is-indo     .label::before { background: var(--kdk); }
.kdk-type .time {
  font-size: 11.5px;
  color: var(--muted-2);
  padding-left: 15px;
}

/* ========== FILTER BAR ========== */
.kdk-filter {
  padding: 16px 18px;
}
.kdk-filter .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}
.kdk-filter label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 5px;
}
.kdk-filter .form-control,
.kdk-filter .form-select {
  border-radius: 9px;
  border: 1.5px solid var(--line);
  padding: 9px 12px;
  font-size: 13.5px;
  background: #fff;
  width: 100%;
  font-family: inherit;
  color: var(--ink-2);
  transition: border-color .15s, box-shadow .15s;
}
.kdk-filter .form-control:focus,
.kdk-filter .form-select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px var(--navy-glow);
  outline: 0;
}
.kdk-filter .submit-col { align-self: end; }

/* ========== TOTALS CARDS ========== */
.kdk-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.kdk-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: 0 1px 2px rgba(16,24,40,.03);
  position: relative;
  overflow: hidden;
}
.kdk-stat .ico {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.kdk-stat .ico.red   { background: #fff0f5; color: var(--kdk); }
.kdk-stat .ico.navy  { background: var(--navy-soft); color: var(--navy); }
.kdk-stat .ico.amber { background: #fff4e0; color: #b5710a; }
.kdk-stat .ico.green { background: #e8f7ef; color: #0f8f4d; }
.kdk-stat .content { flex: 1; min-width: 0; }
.kdk-stat .content .lbl {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--muted-2);
  margin-bottom: 6px;
}
.kdk-stat .content .boxes {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--ink-2);
}
.kdk-stat .content .boxes strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-2);
  margin-left: 3px;
}
.kdk-stat .content .big {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink-2);
  letter-spacing: -.01em;
  line-height: 1.1;
}
.kdk-stat .content .big .cur {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-2);
  margin-right: 4px;
}
.kdk-stat .content .big.red { color: var(--kdk); }

/* ========== EMPTY STATE ========== */
.kdk-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted-2);
}
.kdk-empty .ico {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--line-soft);
  color: var(--muted-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin: 0 auto 14px;
}
.kdk-empty .title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 4px;
}
.kdk-empty .sub { font-size: 13px; }

/* ========== MODAL REFINEMENTS ========== */
.kdk-modal-clean .modal-content {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(16,24,40,.15);
}
.kdk-modal-clean .modal-header {
  background: var(--navy);
  color: #fff;
  border-bottom: 0;
  padding: 16px 22px;
}
.kdk-modal-clean .modal-header .modal-title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.kdk-modal-clean .modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: .8;
}
.kdk-modal-clean .modal-body { padding: 22px; }
.kdk-modal-clean .modal-body label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
  display: block;
}
.kdk-modal-clean .modal-body .form-control,
.kdk-modal-clean .modal-body .form-select {
  border-radius: 9px;
  border: 1.5px solid var(--line);
  padding: 10px 13px;
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.kdk-modal-clean .modal-body .form-control:focus,
.kdk-modal-clean .modal-body .form-select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px var(--navy-glow);
  outline: 0;
}
.kdk-modal-clean .modal-body .field { margin-bottom: 14px; }
.kdk-modal-clean .modal-body .field-req::after {
  content: ' *';
  color: var(--kdk);
  font-weight: 700;
}
.kdk-modal-clean .modal-footer {
  border-top: 1px solid var(--line);
  padding: 14px 22px;
  gap: 8px;
}

/* ========== SECTION HEADS INSIDE CARDS ========== */
.kdk-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.kdk-section-head h3,
.kdk-section-head h4,
.kdk-section-head h5,
.kdk-section-head h6 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kdk-section-head h3 i,
.kdk-section-head h4 i,
.kdk-section-head h5 i,
.kdk-section-head h6 i { color: var(--kdk); font-size: 13px; }
.kdk-section-head .sub { font-size: 12px; color: var(--muted-2); }

/* Info list (label + value pairs) */
.kdk-info-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 20px;
  padding: 18px;
}
.kdk-info-list .kv .k {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted-2);
  margin-bottom: 3px;
}
.kdk-info-list .kv .v {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.45;
}
.kdk-info-list .kv .v strong { font-weight: 600; }

/* Full-width description row */
.kdk-info-list .kv.wide { grid-column: 1 / -1; }

/* Section containing a compact form inside card */
.kdk-card-body { padding: 18px; }
.kdk-card-body > :last-child { margin-bottom: 0; }

/* Compact inline form used on right-rail panels */
.kdk-stacked-form .row { margin-bottom: 8px; }
.kdk-stacked-form .form-control,
.kdk-stacked-form .form-select,
.kdk-stacked-form input,
.kdk-stacked-form select,
.kdk-stacked-form textarea {
  border-radius: 9px;
  border: 1.5px solid var(--line);
  padding: 9px 12px;
  font-size: 13.5px;
  font-family: inherit;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
  color: var(--ink-2);
  background: #fff;
}
.kdk-stacked-form .form-control:focus,
.kdk-stacked-form .form-select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px var(--navy-glow);
  outline: 0;
}
.kdk-stacked-form label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 5px;
  display: block;
}
.kdk-stacked-form .form-text { font-size: 11.5px; color: var(--muted-2); margin-top: 4px; }
.kdk-stacked-form .field { margin-bottom: 12px; }

/* ========== DOC / PROOF BADGES (ARC/Pass/Foto) ========== */
.kdk-doc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}
.kdk-doc-badge.has    { background: #e8f7ef; color: #0f8f4d; }
.kdk-doc-badge.has:hover { background: #d4efe0; color: #0f8f4d; text-decoration: none; }
.kdk-doc-badge.missing { background: #f0f1f3; color: #6b7280; }
.kdk-doc-badge.info   { background: #e5efff; color: #1456c4; }

/* ========== OVERRIDE FOR EXISTING HELPERS (label-chip, .badge) ========== */
/* Make existing backend-rendered elements feel consistent inside kdk-table / kdk-card-clean */

.kdk-table .label-chip,
.kdk-card-clean .label-chip {
  display: inline-flex;
  align-items: center;
  background: var(--navy-soft);
  color: var(--navy);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
}

.kdk-table .badge,
.kdk-card-clean .badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
}
.kdk-table .badge.bg-success,
.kdk-card-clean .badge.bg-success { background: #e8f7ef !important; color: #0f8f4d !important; }
.kdk-table .badge.bg-secondary,
.kdk-card-clean .badge.bg-secondary { background: #f0f1f3 !important; color: #6b7280 !important; }
.kdk-table .badge.bg-warning,
.kdk-card-clean .badge.bg-warning { background: #fff4e0 !important; color: #b5710a !important; }
.kdk-table .badge.bg-danger,
.kdk-card-clean .badge.bg-danger { background: #fde8ea !important; color: #c42828 !important; }
.kdk-table .badge.bg-info,
.kdk-card-clean .badge.bg-info { background: #e5efff !important; color: #1456c4 !important; }
.kdk-table .badge.bg-primary,
.kdk-card-clean .badge.bg-primary { background: var(--kdk-soft) !important; color: var(--kdk) !important; }

/* ========== HERO BANNER (dashboard) ========== */
.kdk-hero {
  background: linear-gradient(130deg, var(--kdk) 0%, var(--kdk-dark) 65%, #8a1638 100%);
  border-radius: 16px;
  padding: 26px 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
}
.kdk-hero::before {
  content: ''; position: absolute;
  top: -40%; right: -8%;
  width: 260px; height: 260px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
  pointer-events: none;
}
.kdk-hero::after {
  content: ''; position: absolute;
  bottom: -55%; left: -5%;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
  pointer-events: none;
}
.kdk-hero h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.01em;
  position: relative; z-index: 1;
}
.kdk-hero p {
  margin: 0;
  font-size: 13.5px;
  opacity: .92;
  max-width: 640px;
  line-height: 1.55;
  position: relative; z-index: 1;
}

/* ========== QUICK LINK TILES (dashboard) ========== */
.kdk-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding: 14px;
}
.kdk-quick {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 16px 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink-2);
  text-align: center;
  transition: all .18s ease;
  cursor: pointer;
}
.kdk-quick:hover {
  border-color: var(--kdk);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(229,38,87,.12);
  color: var(--ink-2);
  text-decoration: none;
}
.kdk-quick .ico {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff0f5, #ffe3ec);
  color: var(--kdk);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  transition: all .18s ease;
}
.kdk-quick:hover .ico {
  background: linear-gradient(135deg, var(--kdk), var(--kdk-dark));
  color: #fff;
}
.kdk-quick .lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

/* ========== STAT NUMBERS (dashboard) ========== */
.kdk-stat.tight { padding: 14px 16px; }
.kdk-stat.tight .content .big { font-size: 22px; }
.kdk-stat.tight .content .lbl { margin-bottom: 3px; }

/* Navy hero variant (used for page hero/sections) */
.kdk-hero.navy {
  background: linear-gradient(130deg, var(--navy) 0%, var(--navy-dark) 70%, #0b1726 100%);
}

/* Timeline (override for tracking-timeline usage inside kdk-card-clean) */
.kdk-card-clean .tracking-timeline { padding: 18px 18px 18px 36px; }

/* ========== RATES / MATRIX TABLE (shipping-rates) ========== */
.kdk-matrix .group-row td {
  background: linear-gradient(90deg, #fff7e6, transparent);
  color: #8a5a00;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 12px 18px !important;
  border-bottom: 1px solid #f3e6c1;
}
.kdk-matrix .group-row td i { color: #b5710a; margin-right: 7px; }
.kdk-matrix input[type=number] {
  width: 100%;
  max-width: 110px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  padding: 7px 10px;
  font-size: 13px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
  color: var(--ink-2);
}
.kdk-matrix input[type=number]:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px var(--navy-glow);
  outline: 0;
}
.kdk-matrix thead th.num-head {
  text-align: center;
}
.kdk-matrix thead th.num-head small {
  display: block;
  color: var(--muted-2);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 10px;
  margin-top: 2px;
}

/* ========== HADIAH GRID (kelola hadiah) ========== */
.kdk-reward-img {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff0f5, #ffe3ec);
  color: var(--kdk);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  font-size: 20px;
  flex-shrink: 0;
}
.kdk-reward-img img { width: 100%; height: 100%; object-fit: cover; }

/* Reusable soft price highlight */
.kdk-price {
  font-weight: 700;
  color: var(--kdk);
  white-space: nowrap;
}
.kdk-price-muted {
  color: var(--muted-2);
  font-weight: 500;
}

/* ========== INPUT GROUP SIMILAR TO BOOTSTRAP BUT CLEAN ========== */
.kdk-input-group {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.kdk-input-group:focus-within {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px var(--navy-glow);
}
.kdk-input-group .prefix {
  padding: 9px 12px;
  background: var(--line-soft);
  color: var(--muted-2);
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.kdk-input-group input,
.kdk-input-group select {
  border: 0 !important;
  border-radius: 0 !important;
  flex: 1;
  padding: 9px 12px;
  font-size: 13.5px;
  background: transparent;
  outline: 0;
  box-shadow: none !important;
}
.kdk-input-group .suffix-btn {
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--line-soft);
  color: var(--navy);
  padding: 0 16px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.kdk-input-group .suffix-btn:hover {
  background: var(--navy);
  color: #fff;
}

/* Two-column layout for order-detail style pages */
.kdk-split {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 14px;
}
.kdk-split > * { min-width: 0; }
@media (max-width: 992px) {
  .kdk-split { grid-template-columns: 1fr; }
}

/* Right-rail panel header */
.kdk-panel-head {
  padding: 14px 18px 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.kdk-panel-head i { color: var(--kdk); font-size: 12px; }

/* Tracking timeline alt (refined look) */
.kdk-timeline { position: relative; padding: 18px 18px 14px 42px; }
.kdk-timeline::before {
  content: ''; position: absolute;
  top: 22px; bottom: 18px; left: 27px;
  width: 2px; background: var(--line);
}
.kdk-timeline .item { position: relative; padding: 0 0 16px 0; }
.kdk-timeline .item:last-child { padding-bottom: 0; }
.kdk-timeline .item::before {
  content: ''; position: absolute;
  left: -21px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--kdk);
  z-index: 1;
}
.kdk-timeline .item.done::before { background: var(--kdk); }
.kdk-timeline .item .lbl {
  font-weight: 600;
  color: var(--ink-2);
  font-size: 13.5px;
  margin-bottom: 2px;
}
.kdk-timeline .item .time {
  font-size: 11.5px;
  color: var(--muted-2);
  margin-bottom: 3px;
}
.kdk-timeline .item .desc {
  font-size: 12.5px;
  color: var(--muted-2);
  line-height: 1.5;
}

/* ========== HARMONIZE LEGACY card-kdk INSIDE kdk-page ==========
   Used by create-order.php which has many card-kdk sections
   ============================================================ */
.kdk-page .card-kdk,
.kdk-page .card.card-kdk {
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.03) !important;
  margin-bottom: 14px !important;
  overflow: hidden;
}
.kdk-page .card-kdk:hover,
.kdk-page .card.card-kdk:hover { box-shadow: 0 1px 2px rgba(16,24,40,.03) !important; }
.kdk-page .card-kdk .card-body { padding: 18px 20px; }

.kdk-page .section-title {
  color: var(--ink-2) !important;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kdk-page .section-title::before {
  content: '';
  width: 3px;
  height: 15px;
  background: var(--kdk);
  border-radius: 2px;
  font-size: 0;
}

/* Buttons inside kdk-page: inherit clean design */
.kdk-page .form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 5px;
}
.kdk-page .form-control,
.kdk-page .form-select {
  border-radius: 9px !important;
  border: 1.5px solid var(--line) !important;
  font-size: 13.5px !important;
  transition: border-color .15s, box-shadow .15s !important;
}
.kdk-page .form-control:focus,
.kdk-page .form-select:focus {
  border-color: var(--navy) !important;
  box-shadow: 0 0 0 3px var(--navy-glow) !important;
}
.kdk-page .form-check-input:checked {
  background-color: var(--kdk);
  border-color: var(--kdk);
}

/* ========== PHOTO UPLOAD BOX — RED THEME OVERRIDE ==========
   Overrides default blue theme in kk-photo-guide.css
   ============================================================ */
.kdk-page .photo-upload-box,
.photo-upload-box {
  background: #fff5f7 !important;
  border: 2px dashed #f5a3b5 !important;
  border-radius: 12px !important;
  padding: 22px !important;
  text-align: center;
  cursor: pointer;
  transition: all .2s ease !important;
}
.kdk-page .photo-upload-box:hover,
.photo-upload-box:hover {
  background: #ffe9ef !important;
  border-color: var(--kdk) !important;
}
.kdk-page .photo-upload-box.dragover,
.photo-upload-box.dragover {
  background: #ffd8e3 !important;
  border-color: var(--kdk) !important;
}
.kdk-page .photo-upload-box .upload-icon,
.photo-upload-box .upload-icon {
  width: 54px !important;
  height: 54px !important;
  background: linear-gradient(135deg, var(--kdk), var(--kdk-dark)) !important;
  color: #fff !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 22px !important;
  margin-bottom: 10px !important;
  box-shadow: 0 6px 18px rgba(229,38,87,.25) !important;
}
/* Force "Pilih Foto" button inside to use red theme, regardless of inner class */
.kdk-page .photo-upload-box .btn-navy-ghost,
.photo-upload-box .btn-navy-ghost {
  background: #fff !important;
  color: var(--kdk) !important;
  border: 1.5px solid #fbd5e0 !important;
  pointer-events: none;
}
.kdk-page .photo-upload-box .photo-upload-hint,
.photo-upload-box .photo-upload-hint {
  font-size: 12px !important;
  color: var(--muted-2) !important;
  margin-top: 8px !important;
}
.kdk-page .photo-upload-box .preview-img,
.photo-upload-box .preview-img {
  max-height: 200px !important;
  border-radius: 10px !important;
  margin-bottom: 10px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

/* ========== PRICING TOTAL CARD (bottom of create-order) ========== */
.kdk-price-total {
  background: linear-gradient(135deg, #fff5f7 0%, #fff 100%);
  border: 1.5px solid var(--kdk);
  border-radius: 16px;
  padding: 20px 22px;
  margin: 20px 0 10px;
  position: relative;
  box-shadow: 0 6px 24px rgba(229,38,87,.1);
}
.kdk-price-total::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--kdk), var(--kdk-light), var(--kdk));
  border-radius: 16px 16px 0 0;
}
.kdk-price-total .head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #fbd5e0;
}
.kdk-price-total .head i {
  width: 32px; height: 32px;
  background: var(--kdk);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.kdk-price-total .head .lbl {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.kdk-price-total .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: start;
}
.kdk-price-total .item .k {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 5px;
}
.kdk-price-total .item .v {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink-2);
  letter-spacing: -.01em;
  line-height: 1.1;
}
.kdk-price-total .item .v.big {
  font-size: 24px;
  color: var(--kdk);
}
.kdk-price-total .item .hint {
  font-size: 11.5px;
  color: var(--muted-2);
  margin-top: 3px;
}
.kdk-price-total .pay-choice {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.kdk-price-total .pay-choice label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  transition: all .15s ease;
  background: #fff;
}
.kdk-price-total .pay-choice label:hover { border-color: var(--kdk); }
.kdk-price-total .pay-choice label.is-active {
  border-color: var(--kdk);
  background: #fff5f7;
  color: var(--kdk);
}
.kdk-price-total .pay-choice input[type=radio] {
  accent-color: var(--kdk);
}

/* ========== SUBMIT AREA (sticky-ish feel) ========== */
.kdk-submit-zone {
  margin: 18px 0 10px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ========== BANK ACCOUNT CARDS (rekening pembayaran) ========== */
.kdk-payment-info {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  margin: 14px 0 10px;
  box-shadow: 0 1px 2px rgba(16,24,40,.03);
}
.kdk-payment-info .head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.kdk-payment-info .head i {
  width: 32px; height: 32px;
  background: var(--navy);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.kdk-payment-info .head .lbl {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.kdk-payment-info .sub {
  font-size: 12.5px;
  color: var(--muted-2);
  margin: 0 0 14px;
}

.kdk-bank-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}
.kdk-bank-tab {
  background: transparent;
  border: 0;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-2);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  transition: all .15s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: -1px;
}
.kdk-bank-tab:hover { color: var(--ink-2); }
.kdk-bank-tab.active {
  color: var(--kdk);
  border-bottom-color: var(--kdk);
}
.kdk-bank-tab .flag {
  font-size: 14px;
  line-height: 1;
}

.kdk-bank-panel { display: none; }
.kdk-bank-panel.active { display: grid; }
.kdk-bank-panel {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.kdk-bank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: all .2s ease;
  cursor: pointer;
  position: relative;
}
.kdk-bank-item:hover {
  border-color: var(--kdk);
  background: #fff;
  box-shadow: 0 4px 14px rgba(229,38,87,.08);
  transform: translateY(-1px);
}
.kdk-bank-logo {
  width: 44px; height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: .3px;
  color: #fff;
  text-align: center;
  line-height: 1.1;
}
.kdk-bank-logo.bca    { background: #0066ae; }
.kdk-bank-logo.mandiri{ background: linear-gradient(135deg, #003d79, #ffd700); color: #ffd700; }
.kdk-bank-logo.bni    { background: #ec6c1f; }
.kdk-bank-logo.bri    { background: #00529c; }
.kdk-bank-logo.cathay { background: #00754a; }
.kdk-bank-logo.ctbc   { background: #005baa; }
.kdk-bank-logo.esun   { background: #00573f; }
.kdk-bank-logo.fubon  { background: #003974; }

.kdk-bank-body { flex: 1; min-width: 0; }
.kdk-bank-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.3;
  margin-bottom: 2px;
}
.kdk-bank-no {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: .3px;
  margin-bottom: 1px;
}
.kdk-bank-an {
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.3;
}
.kdk-bank-copy {
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s ease;
  flex-shrink: 0;
}
.kdk-bank-copy:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.kdk-bank-copy.copied {
  background: #0f8f4d;
  color: #fff;
  border-color: #0f8f4d;
}

.kdk-payment-note {
  margin-top: 14px;
  padding: 10px 14px;
  background: #fff4e0;
  border: 1px solid #f7d69a;
  border-radius: 10px;
  font-size: 12px;
  color: #7a5a00;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.kdk-payment-note i {
  color: #b5710a;
  font-size: 13px;
  margin-top: 1px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 720px) {
  .kdk-page-head .title h2 { font-size: 19px; }
  .kdk-table thead th,
  .kdk-table tbody td { padding: 12px 14px; }
  .kdk-stat { padding: 14px 16px; }
  .kdk-stat .content .big { font-size: 20px; }
  .kdk-stats-row { gap: 10px; }
}

@media (max-width: 576px) {
  .kdk-page-head { margin-bottom: 16px; }
  .kdk-table-wrap { margin: 0 -4px; }
  .kdk-filter { padding: 14px; }
  .kdk-filter .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kdk-filter .submit-col { grid-column: span 2; }
}

/* =================================================================
   ACTION TABS (order-detail right column)
   ================================================================= */
.kdk-page .kdk-action-tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--bg-1, #f3f4f8);
  border-bottom: 1px solid var(--line, #e5e8ef);
  overflow-x: auto;
  scrollbar-width: none;
}
.kdk-page .kdk-action-tabs::-webkit-scrollbar { display: none; }

.kdk-page .kdk-action-tab {
  flex: 1 1 0;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 9px 6px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-2, #8a94a6);
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  line-height: 1;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.kdk-page .kdk-action-tab i {
  font-size: 14px;
}
.kdk-page .kdk-action-tab span {
  font-size: 10.5px;
  letter-spacing: .2px;
}
.kdk-page .kdk-action-tab:hover {
  color: var(--ink-2, #2a2f3a);
  background: rgba(255,255,255,.5);
}
.kdk-page .kdk-action-tab.active {
  background: #fff;
  color: var(--kdk, #e52657);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.kdk-page .kdk-action-panel {
  display: none;
  animation: kdkFadeIn .15s ease;
}
.kdk-page .kdk-action-panel.active {
  display: block;
}
@keyframes kdkFadeIn {
  from { opacity: 0; transform: translateY(-2px); }
  to   { opacity: 1; transform: none; }
}

/* Payment nominal select (kelipatan 100) — replaces old .pay-choice radio */
.kdk-price-total .pay-nominal-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kdk-price-total .pay-nominal-wrap select {
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink, #1a1d24);
  border: 1.5px solid var(--line, #e5e8ef);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.kdk-price-total .pay-nominal-wrap select:focus {
  outline: none;
  border-color: var(--kdk, #e52657);
  box-shadow: 0 0 0 3px rgba(229,38,87,.12);
}
.kdk-price-total .pay-nominal-wrap .hint {
  font-size: 11px;
  color: var(--muted-2, #8a94a6);
  line-height: 1.4;
}
.kdk-price-total .pay-nominal-wrap .hint strong {
  color: var(--kdk, #e52657);
  font-weight: 700;
}

/* =================================================================
   FINANCE PAGE — Payment verification cards + modal
   ================================================================= */
.kdk-page .kdk-finance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}
.kdk-page .kdk-finance-card {
  background: #fff;
  border: 1px solid var(--line, #e5e8ef);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .15s;
}
.kdk-page .kdk-finance-card:hover { box-shadow: 0 4px 14px rgba(16,24,40,.08); }
.kdk-page .kdk-finance-card.is-pending { border-left: 4px solid #f59e0b; }
.kdk-page .kdk-finance-card.is-confirmed { border-left: 4px solid #0f8f4d; }
.kdk-page .kdk-finance-card.is-rejected { border-left: 4px solid #c62828; opacity: .85; }

/* Header */
.kdk-page .kdk-fc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft, #eef1f5);
}
.kdk-page .kdk-fc-order .barcode {
  font-family: ui-monospace, monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-2, #2a2f3a);
}
.kdk-page .kdk-fc-order .customer {
  font-size: 12.5px;
  color: var(--muted-2, #8a94a6);
  margin-top: 2px;
}
.kdk-page .kdk-fc-status {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.kdk-page .kdk-fc-status.is-pending   { background: #fff4e0; color: #b5710a; }
.kdk-page .kdk-fc-status.is-confirmed { background: #e8f7ef; color: #0f8f4d; }
.kdk-page .kdk-fc-status.is-rejected  { background: #fde8e8; color: #c62828; }

/* Bukti foto */
.kdk-page .kdk-fc-bukti { padding: 12px 16px; }
.kdk-page .bukti-thumb {
  display: block;
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f4f8;
  text-decoration: none;
}
.kdk-page .bukti-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
.kdk-page .bukti-thumb .zoom-hint {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,.7);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  transition: opacity .15s;
}
.kdk-page .bukti-thumb:hover .zoom-hint { opacity: 1; }
.kdk-page .bukti-thumb.no-bukti {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 120px;
}

/* Body */
.kdk-page .kdk-fc-body { padding: 0 16px 14px; flex: 1; }
.kdk-page .kdk-fc-amount {
  padding: 12px;
  background: var(--kdk-soft, #fde8ee);
  border-radius: 10px;
  margin-bottom: 12px;
  text-align: center;
}
.kdk-page .kdk-fc-amount .lbl {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted-2, #8a94a6);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.kdk-page .kdk-fc-amount .val {
  font-size: 24px;
  font-weight: 800;
  color: var(--kdk, #e52657);
  margin-top: 2px;
  font-family: ui-monospace, monospace;
}
.kdk-page .kdk-fc-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-2, #2a2f3a);
}
.kdk-page .kdk-fc-meta .k { color: var(--muted-2, #8a94a6); }
.kdk-page .kdk-fc-note {
  margin-top: 10px;
  padding: 10px;
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 8px;
  font-size: 12px;
  color: #664d03;
  display: flex;
  gap: 8px;
  white-space: pre-line;
}
.kdk-page .kdk-fc-note i { flex-shrink: 0; margin-top: 2px; }

/* Actions */
.kdk-page .kdk-fc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  padding: 12px 16px;
  background: #f8f9fb;
  border-top: 1px solid var(--line-soft, #eef1f5);
}
.kdk-page .btn-fc-approve,
.kdk-page .btn-fc-edit,
.kdk-page .btn-fc-reject {
  border: 0;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: filter .15s, transform .1s;
}
.kdk-page .btn-fc-approve { background: #0f8f4d; color: #fff; }
.kdk-page .btn-fc-approve:hover { filter: brightness(1.08); }
.kdk-page .btn-fc-edit    { background: #1e3a5f; color: #fff; }
.kdk-page .btn-fc-edit:hover { filter: brightness(1.12); }
.kdk-page .btn-fc-reject  { background: #c62828; color: #fff; }
.kdk-page .btn-fc-reject:hover { filter: brightness(1.08); }
.kdk-page .btn-fc-approve:active,
.kdk-page .btn-fc-edit:active,
.kdk-page .btn-fc-reject:active { transform: scale(.97); }

.kdk-page .kdk-fc-actions-info {
  padding: 12px 16px;
  background: #f8f9fb;
  border-top: 1px solid var(--line-soft, #eef1f5);
  font-size: 12.5px;
  color: var(--muted-2, #8a94a6);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==================== MODAL (used on finance page) ==================== */
.kdk-page .kdk-modal,
.kdk-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.kdk-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  animation: kdkFadeIn .15s ease;
}
.kdk-modal-card {
  position: relative;
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
  animation: kdkModalIn .2s ease;
}
@keyframes kdkModalIn {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.kdk-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line, #e5e8ef);
}
.kdk-modal-head h5 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-2, #2a2f3a);
  display: flex;
  align-items: center;
  gap: 8px;
}
.kdk-modal-head h5 i { color: var(--kdk, #e52657); font-size: 14px; }
.kdk-modal-close {
  background: transparent;
  border: 0;
  font-size: 24px;
  line-height: 1;
  color: var(--muted-2, #8a94a6);
  cursor: pointer;
  padding: 0 6px;
  border-radius: 6px;
}
.kdk-modal-close:hover { background: var(--bg-1, #f3f4f8); color: var(--ink-2, #2a2f3a); }
.kdk-modal-body { padding: 20px; }
.kdk-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line, #e5e8ef);
  background: #fafbfd;
}

@media (max-width: 640px) {
  .kdk-page .kdk-finance-grid { grid-template-columns: 1fr; }
  .kdk-page .kdk-fc-actions { grid-template-columns: 1fr; }
}

/* Finance quick action badge (count pending payments) */
.kdk-page .kdk-quick { position: relative; }
.kdk-page .kdk-quick-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  background: var(--kdk, #e52657);
  color: #fff;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(229,38,87,.35);
  animation: kdkPulse 1.6s ease-in-out infinite;
}
@keyframes kdkPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
.kdk-page .kdk-quick-accent:hover .ico {
  box-shadow: 0 4px 12px rgba(15,143,77,.35);
}