/* ═══════════════════════════════════════════════════════════════════════
   style.css — EBPM Matching Tool
   Base: INAPROC Intelligence design system (copy persis)
   Extension: Matching Tool UI components (di bagian bawah)
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── RESET & TOKENS ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

:root {
  /* Typography */
  --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  /* Brand */
  --red-primary: #C8102E;
  --red-light: #FEF0F2;
  --red-dark: #8B0000;

  --navy: #0D1B2A;
  --navy-mid: #1B2A3B;
  --navy-light: #2E4057;

  --slate: #5D6D7E;
  --slate-light: #85929E;
  --surface: #F7F9FC;
  --surface-alt: #EFF3F8;
  --border: #E8ECF0;
  --border-soft: #F0F4F8;
  --white: #FFFFFF;

  /* Semantic */
  --ict-blue: #1B4F72;
  --ict-green: #0E6655;
  --gold: #B7770D;
  --purple: #4A235A;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(13, 27, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(13, 27, 42, 0.08);
  --shadow-lg: 0 12px 36px rgba(13, 27, 42, 0.12);
  --shadow-red: 0 8px 24px rgba(200, 16, 46, 0.18);

  /* Layout */
  --sidebar-w: 260px;
  --hero-h: 160px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--navy-light);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0;
  letter-spacing: -0.2px;
}

/* ─── LOADING OVERLAY (initial + chunk) ─── */
#loading-overlay,
#chunk-loading-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(13, 27, 42, 0.98), rgba(27, 42, 59, 0.96));
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  backdrop-filter: blur(12px);
  transition: opacity 0.35s ease;
}

#loading-overlay.hidden,
#chunk-loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: #FFF;
  letter-spacing: -0.5px;
}

.loading-logo .accent {
  color: var(--red-primary);
}

.loading-spinner {
  width: 52px;
  height: 52px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--red-primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-container {
  width: min(420px, 80vw);
  text-align: center;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--red-primary), #FF3351);
  border-radius: 999px;
  transition: width 0.35s ease;
  box-shadow: 0 0 16px rgba(200, 16, 46, 0.5);
}

.progress-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* ─── AUTH SCREEN ─── */
#auth-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0D1B2A 0%, #1B2A3B 50%, #0D1B2A 100%);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#auth-screen.hidden {
  display: none;
}

.login-box {
  width: min(420px, 100%);
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-xl);
  padding: 44px 36px 32px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border-top: 5px solid var(--red-primary);
  animation: fadeUp 0.5s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-box .lock {
  font-size: 42px;
  margin-bottom: 12px;
}

.login-box h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--navy);
}

.login-box p {
  color: var(--slate);
  font-size: 13px;
  margin: 0 0 28px;
  line-height: 1.6;
}

.login-box input[type="password"] {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  margin-bottom: 14px;
  transition: all 0.2s ease;
  background: var(--surface);
}

.login-box input[type="password"]:focus {
  outline: none;
  border-color: var(--red-primary);
  background: #FFF;
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.08);
}

.btn-login {
  width: 100%;
  padding: 13px;
  background: var(--red-primary);
  color: #FFF;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-login:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-red);
}

.btn-login:active {
  transform: translateY(0);
}

.login-error {
  display: none;
  margin-top: 14px;
  font-size: 13px;
  color: var(--red-primary);
  font-weight: 600;
  animation: shake 0.4s ease;
}

.login-error.show {
  display: block;
}

@keyframes shake {
  0%, 100% { transform: translateX(0) }
  25%       { transform: translateX(-6px) }
  75%       { transform: translateX(6px) }
}

.login-box .footer-text {
  margin-top: 26px;
  font-size: 11px;
  color: var(--slate-light);
  line-height: 1.7;
}

/* ─── APP SHELL ─── */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.app-layout.hidden {
  display: none;
}

/* ─── SIDEBAR ─── */
.sidebar {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-mid) 60%, var(--navy) 100%);
  color: #FFF;
  padding: 26px 18px 100px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }

.sidebar-header {
  text-align: center;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
}

.sidebar-header .logo {
  font-size: 24px;
  margin-bottom: 6px;
}

.sidebar-header h2 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: #FFF;
  margin-bottom: 2px;
  letter-spacing: 0.3px;
}

.sidebar-header .subtitle {
  font-size: 9.5px;
  color: var(--slate-light);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 600;
}

.badge-status {
  display: inline-block;
  background: rgba(14, 102, 85, 0.2);
  color: #52D9B9;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  margin: 10px 0 0;
  letter-spacing: 0.3px;
}

.sidebar-section-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--slate-light);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 20px 0 10px 4px;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: #ECF0F1;
  cursor: pointer;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.18s ease;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  background: rgba(200, 16, 46, 0.15);
  border-left-color: var(--red-primary);
  color: #FFF;
}

.nav-item .nav-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-footer {
  position: absolute;
  bottom: 16px;
  left: 18px;
  right: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-btn {
  width: 100%;
  padding: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #FFF;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  margin-bottom: 8px;
}

.sidebar-btn:hover {
  background: rgba(200, 16, 46, 0.2);
  border-color: var(--red-primary);
}

.sidebar-footer .caption {
  font-size: 10px;
  color: var(--slate-light);
  text-align: center;
  line-height: 1.6;
  margin-top: 8px;
}

/* ─── MAIN CONTENT ─── */
.main-content {
  padding: 28px 36px 48px;
  max-width: 1560px;
  min-width: 0;
}

/* ─── HERO ─── */
.hero {
  background: linear-gradient(135deg, var(--red-primary) 0%, var(--red-dark) 45%, var(--navy) 100%);
  padding: 36px 44px;
  border-radius: var(--radius-xl);
  margin-bottom: 28px;
  box-shadow: var(--shadow-red);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -60px;
  width: 320px; height: 320px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -50px; left: 30%;
  width: 220px; height: 220px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 50%;
}

.hero h1 {
  color: #FFF !important;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  position: relative;
  z-index: 1;
}

.hero p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  margin: 8px 0 0;
  letter-spacing: 0.3px;
  position: relative;
  z-index: 1;
}

/* ─── SECTIONS ─── */
.dash-section {
  background: #FFF;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 32px;
  margin: 20px 0;
  box-shadow: var(--shadow-sm);
}

.sec-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sec-subtitle {
  font-size: 12.5px;
  color: var(--slate);
  margin-bottom: 20px;
}

/* ─── BUTTONS ─── */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--red-primary);
  color: #FFF;
  box-shadow: 0 2px 6px rgba(200, 16, 46, 0.2);
}

.btn-primary:hover {
  background: var(--red-dark);
  box-shadow: var(--shadow-red);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--navy);
  color: #FFF;
}

.btn-dark:hover {
  background: var(--navy-mid);
}

.btn-outline {
  background: #FFF;
  color: var(--navy);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--red-primary);
  color: var(--red-primary);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: #F7F9FC;
  border-radius: var(--radius-md);
  margin-top: 14px;
  border: 1.5px solid var(--border);
}

/* ─── TABLES ─── */
.table-wrap {
  overflow-x: auto;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: #FFF;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table thead th {
  background: linear-gradient(180deg, #F7F9FC, #EFF3F8);
  color: var(--navy);
  font-family: var(--font-body);
  font-weight: 700;
  text-align: left;
  padding: 11px 14px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  font-size: 11.5px;
  letter-spacing: 0.2px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--navy-light);
  vertical-align: top;
}

.data-table tbody tr:nth-child(even) td {
  background: #FAFBFD;
}

.data-table tbody tr:hover td {
  background: var(--red-light) !important;
}

/* ─── VIRTUAL SCROLL TABLE ─── */
.vtable-container {
  position: relative;
  height: 500px;
  overflow-y: auto;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: #FFF;
}

.vtable-container::-webkit-scrollbar { width: 10px; }
.vtable-container::-webkit-scrollbar-track { background: var(--surface); }
.vtable-container::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
.vtable-container::-webkit-scrollbar-thumb:hover { background: var(--slate-light); }

/* ─── EMPTY STATE ─── */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--slate);
}

.empty-state .icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 16px;
  color: var(--navy);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13px;
}

/* ─── FOOTER ─── */
.footer-box {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: var(--radius-lg);
  padding: 28px 36px;
  text-align: center;
  margin-top: 40px;
  border-top: 4px solid var(--red-primary);
  color: #FFF;
}

.footer-box .ft-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.footer-box .ft-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
}

.footer-box .ft-dim {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.4);
}

/* ─── TOAST ─── */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
}

.toast {
  background: #FFF;
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--slate);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--navy);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(.2, .9, .3, 1.2);
  pointer-events: auto;
  font-weight: 500;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-info    { border-left-color: var(--ict-blue); }
.toast-success { border-left-color: var(--ict-green); }
.toast-warn    { border-left-color: var(--gold); }
.toast-error   { border-left-color: var(--red-primary); }

.toast-icon { font-size: 16px; }
.toast-msg  { line-height: 1.4; }

/* ─── UTILITIES ─── */
.hidden { display: none !important; }
.text-muted { color: var(--slate); }
.text-small { font-size: 11px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  :root { --sidebar-w: 220px; }
  .main-content { padding: 20px 20px 36px; }
  .hero { padding: 26px 22px; }
  .hero h1 { font-size: 20px; }
  .dash-section { padding: 20px; }
}

@media (max-width: 700px) {
  .app-layout { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed;
    left: 0; top: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 900;
    padding-top: 60px;
  }

  .sidebar.open { transform: translateX(0); }
  .mobile-menu-btn { display: flex !important; }
}

.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 16px; left: 16px;
  z-index: 950;
  width: 44px; height: 44px;
  background: var(--navy);
  color: #FFF;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-md);
}

/* ══════════════════════════════════════════════════════════════════════
   MATCHING TOOL EXTENSIONS
   ══════════════════════════════════════════════════════════════════════ */

/* ─── STEP WIZARD ─── */
.step-wizard {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
  padding: 18px 24px;
  background: #FFF;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  position: relative;
}

.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 42px;
  top: 50%;
  transform: translateY(-50%);
  right: 0;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.step-item.done:not(:last-child)::after {
  background: var(--ict-green);
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  background: var(--border);
  color: var(--slate);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: all 0.25s ease;
}

.step-item.active .step-num {
  background: var(--red-primary);
  color: #FFF;
  box-shadow: 0 4px 12px rgba(200, 16, 46, 0.3);
}

.step-item.done .step-num {
  background: var(--ict-green);
  color: #FFF;
}

.step-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--slate);
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.step-item.active .step-label { color: var(--red-primary); }
.step-item.done  .step-label  { color: var(--ict-green); }

/* ─── DROP ZONE ─── */
.drop-zone {
  border: 2.5px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  background: var(--surface);
  user-select: none;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--red-primary);
  background: var(--red-light);
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.06);
}

.drop-zone .drop-icon {
  font-size: 48px;
  margin-bottom: 14px;
  opacity: 0.65;
  display: block;
}

.drop-zone p {
  color: var(--slate);
  font-size: 13.5px;
  margin: 4px 0;
  line-height: 1.6;
}

.drop-zone .drop-hint {
  font-size: 11px;
  color: var(--slate-light);
  margin-top: 10px;
}

.drop-zone .pick-btn {
  background: var(--red-primary);
  color: #FFF;
  border: none;
  border-radius: 8px;
  padding: 9px 20px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 14px;
  display: inline-block;
  transition: all 0.18s ease;
}

.drop-zone .pick-btn:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.drop-zone.has-file {
  border-style: solid;
  border-color: var(--ict-green);
  background: #F0FBF4;
}

/* ─── FILE PREVIEW CARD ─── */
.file-preview-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: #FFF;
  border: 1.5px solid var(--ict-green);
  border-radius: var(--radius-md);
  margin-top: 14px;
}

.file-preview-card .file-icon { font-size: 28px; }
.file-preview-card .file-meta { flex: 1; }

.file-preview-card .file-name {
  font-weight: 700;
  color: var(--navy);
  font-size: 13px;
  margin-bottom: 2px;
}

.file-preview-card .file-info {
  font-size: 11.5px;
  color: var(--slate);
}

/* ─── SHEET SELECTOR ─── */
.sheet-selector {
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
}

.sheet-selector label {
  font-size: 11px;
  font-weight: 700;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 8px;
}

.sheet-selector select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  background: #FFF;
  color: var(--navy);
  cursor: pointer;
}

.sheet-selector select:focus {
  outline: none;
  border-color: var(--red-primary);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.08);
}

.sheet-selector .sheet-info {
  font-size: 11px;
  color: var(--slate-light);
  margin-top: 6px;
}

/* ─── COLUMN VALIDATION CHECKLIST ─── */
.col-check-section {
  background: #FFF;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-top: 20px;
  box-shadow: var(--shadow-sm);
}

.col-check-section h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 16px;
}

.col-check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.col-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border-soft);
}

.col-check-item.ok       { background: #F0FBF4; border-color: #A8E6C0; color: #1a6a3a; }
.col-check-item.missing  { background: #FFF5F5; border-color: #F5C6CB; color: var(--red-primary); }
.col-check-item.optional { background: #FFFBF0; border-color: #FAE5B0; color: #7a5500; }

.col-check-item .ck-icon  { font-size: 16px; flex-shrink: 0; }
.col-check-item .ck-label { font-weight: 700; min-width: 180px; }

.ck-found {
  font-size: 11px;
  font-family: var(--font-mono);
  opacity: 0.8;
  margin-left: auto;
  background: rgba(0,0,0,0.06);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Info / warn / error boxes */
.info-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  background: #EBF5FB;
  border: 1.5px solid #AED6F1;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--ict-blue);
  margin: 12px 0;
  line-height: 1.6;
}

.warn-box  { background: #FFFBF0; border-color: #FAE5B0; color: #7a5500; }
.error-box { background: #FFF5F5; border-color: #F5C6CB; color: var(--red-primary); }

.confirm-btn-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* ─── MATCH SUMMARY CARDS ─── */
.match-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.match-card {
  background: #FFF;
  border: 2px solid var(--border);
  border-top-width: 4px;
  border-radius: var(--radius-md);
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.match-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.match-card.full    { border-top-color: #27AE60; }
.match-card.partial { border-top-color: #F39C12; }
.match-card.none    { border-top-color: #E74C3C; }

.match-card .num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}

.match-card .lab {
  font-size: 11px;
  font-weight: 700;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: 6px;
}

.match-card .pct {
  font-size: 11.5px;
  color: var(--slate-light);
  margin-top: 4px;
  font-weight: 500;
}

/* ─── RESULT TABLE ROW COLORING ─── */
tr.full-match td     { background: #F0FBF4 !important; }
tr.partial-match td  { background: #FFFBF0 !important; }
tr.no-match td       { background: #FFF5F5 !important; }
tr.expansion-row td  { background: #F5F0FF !important; opacity: 0.88; }

/* Keterangan badges */
.badge-full    { display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:999px; background:#DDF5E8; color:#1a6a3a; font-size:11px; font-weight:700; white-space:nowrap; }
.badge-partial { background:#FFF0CC; color:#7a5500; }
.badge-none    { background:#FFE0E0; color:#c41920; }
.badge-expand  { background:#EEE8FF; color:#4A235A; }

/* ─── PROGRESS LOG ─── */
.process-log {
  background: var(--navy);
  color: #9DE8C8;
  font-family: var(--font-mono);
  font-size: 12px;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  max-height: 220px;
  overflow-y: auto;
  margin: 16px 0;
  line-height: 1.9;
}

.process-log .log-info    { color: #9DE8C8; }
.process-log .log-warn    { color: #FAE5A0; }
.process-log .log-success { color: #81E6B8; font-weight: 700; }
.process-log .log-err     { color: #FF7070; }

/* ─── CUSTOM YEAR FORM ─── */
.custom-year-form {
  background: #FFF;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.custom-year-form h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 22px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 7px;
}

.form-field input[type="number"],
.form-field select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--surface);
  color: var(--navy);
  transition: all 0.18s ease;
}

.form-field input[type="number"]:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--red-primary);
  background: #FFF;
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.08);
}

.divider-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--slate-light);
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 14px 0 12px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.radio-card-group {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.radio-card {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.radio-card:hover { border-color: var(--red-primary); background: var(--red-light); }

.radio-card.selected {
  border-color: var(--red-primary);
  background: var(--red-light);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.08);
}

.radio-card .rc-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.radio-card .rc-desc {
  font-size: 11.5px;
  color: var(--slate);
  line-height: 1.5;
}

/* ─── SIDEBAR WARNING BADGE ─── */
.sidebar-warn-badge {
  margin: 14px 0;
  padding: 10px 12px;
  background: rgba(243, 156, 18, 0.12);
  border: 1px solid rgba(243, 156, 18, 0.3);
  border-radius: 8px;
  font-size: 11px;
  color: #FAD37A;
  line-height: 1.7;
}

/* ─── RESPONSIVE MATCHING ─── */
@media (max-width: 900px) {
  .form-row               { grid-template-columns: 1fr; }
  .match-summary-grid     { grid-template-columns: repeat(2, 1fr); }
  .step-label             { display: none; }
  .confirm-btn-group      { flex-direction: column; }
  .radio-card-group       { flex-direction: column; }
}

/* ══════════════════════════════════════════════════════════════════════
   CLOUD UPLOAD EXTENSIONS
   ══════════════════════════════════════════════════════════════════════ */

/* Upload file item (per file progress) */
.upload-file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}
.upload-file-item .file-icon { font-size: 20px; flex-shrink: 0; }
.upload-file-item .file-info { flex: 1; min-width: 0; }
.upload-file-item .file-name {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--navy);
}
.upload-file-item .file-size { font-size: 11px; color: var(--slate); }
.upload-file-item .file-status { font-size: 12px; font-weight: 700; flex-shrink: 0; }
.upload-file-item .file-status.uploading { color: var(--navy); }
.upload-file-item .file-status.done      { color: #27AE60; }
.upload-file-item .file-status.error     { color: var(--red-primary); }

/* Per-file progress bar */
.upload-prog-bar-bg {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}
.upload-prog-bar {
  height: 100%;
  background: var(--navy);
  border-radius: 2px;
  transition: width 0.2s ease, background 0.3s ease;
  width: 0%;
}

/* Warning box */
.warning-box {
  background: #FEF9E7;
  border: 2px solid #F39C12;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.warning-box .warning-title {
  font-weight: 800;
  font-size: 14px;
  color: #B7770D;
  margin-bottom: 8px;
}
.warning-box ul {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--slate);
  line-height: 1.8;
}
.warning-box code {
  background: rgba(0,0,0,0.06);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Auto-delete info badge */
.autodelete-badge {
  background: #EBF5FB;
  border: 1.5px solid #AED6F1;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 12px;
  color: var(--ict-blue);
  margin-top: 12px;
  line-height: 1.6;
}

/* Sidebar cloud mode badge */
.sidebar-mode-badge {
  margin: 14px 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.7;
}
.sidebar-mode-badge.cloud {
  background: rgba(14, 102, 85, 0.15);
  border: 1px solid rgba(14, 102, 85, 0.3);
  color: #52D9B9;
}
