/* KYC.me.co.bw — Dashboard / App Design System */

:root {
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --primary: #0f172a;
  --primary-light: #1e293b;
  --accent: #10b981;
  --accent-2: #6366f1;
  --gradient: linear-gradient(135deg, #10b981 0%, #6366f1 100%);
  --gradient-warm: linear-gradient(135deg, #f59e0b, #ef4444);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(15,23,42,.04);
  --shadow: 0 4px 24px rgba(15,23,42,.06);
  --shadow-lg: 0 20px 50px rgba(15,23,42,.10);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1,h2,h3,h4,h5,h6 { font-weight: 800; line-height: 1.25; color: var(--primary); letter-spacing: -0.02em; }
a { color: var(--accent); transition: color .15s; }
a:hover { color: #059669; }

/* --- Shared App Card Layout --- */
.app-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.app-card {
  width: 100%; max-width: 780px;
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}
@media(max-width:576px) { .app-page { padding: 0; } .app-card { border-radius: 0; box-shadow: none; border: none; min-height: 100vh; } }

/* Page header */
.page-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; padding: 2.5rem 2rem; position: relative; overflow: hidden;
}
.page-header::after {
  content: ''; position: absolute; top: -50%; right: -15%;
  width: 350px; height: 350px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.22) 0%, transparent 60%);
}
.page-header>* { position: relative; z-index: 1; }
.page-header h1 { color: #fff; font-size: 1.75rem; margin:0; }
.page-header .subtitle { opacity: .85; margin: .25rem 0 0; }

/* Stepper */
.stepper { display: flex; align-items: center; gap: .5rem; }
.step {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
  background: rgba(255,255,255,.15); color: rgba(255,255,255,.8);
  border: 2px solid rgba(255,255,255,.2);
}
.step.active { background: var(--gradient); color: #fff; border-color: transparent; box-shadow: 0 0 0 4px rgba(16,185,129,.25); }
.step.done { background: var(--success); color: #fff; border-color: transparent; }
.step-line { flex:1; height:3px; border-radius:3px; background:rgba(255,255,255,.15); }
.step-line.done { background: var(--success); }

/* Forms */
.form-label { font-weight: 600; font-size: .88rem; color: var(--text); margin-bottom: .35rem; }
.form-control, .form-select {
  border: 1.5px solid var(--border); border-radius: var(--radius-xs);
  padding: .85rem 1rem; font-size: .95rem; background: #fff;
  transition: all .2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 4px rgba(16,185,129,.12); outline:none;
}
.form-control-lg { padding: 1rem 1.25rem; font-size: 1.05rem; }
.form-check-input { width:1.15rem; height:1.15rem; border-radius:6px; }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }

/* Buttons */
.btn {
  border-radius: var(--radius-xs); font-weight: 600; padding: .75rem 1.4rem; transition: all .2s; border:none;
  display: inline-flex; align-items: center; gap: .45rem;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 8px 20px -6px rgba(16,185,129,.35); }
.btn-primary:hover { color: #fff; box-shadow: 0 12px 28px -6px rgba(16,185,129,.5); }
.btn-lg { padding: 1rem 1.75rem; font-size: 1rem; }
.btn-sm { padding: .5rem .95rem; font-size: .85rem; }
.btn-pill { border-radius: 999px; }

/* Cards */
.card-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem;
  box-shadow: var(--shadow-sm); transition: box-shadow .2s;
}
.card-section:hover { box-shadow: var(--shadow); }

/* Upload zone */
.upload-zone {
  position: relative; border: 2px dashed #cbd5e1; border-radius: var(--radius);
  padding: 2.5rem 1rem; text-align: center; background: var(--bg);
  transition: all .2s;
}
.upload-zone:hover { border-color: var(--accent); background: #ecfdf5; }
.upload-zone i { font-size: 2.5rem; color: var(--accent); margin-bottom: .75rem; }
.upload-zone input[type=file] { position:absolute; inset:0; opacity:0; cursor:pointer; }
.upload-zone.has-file { border-color: var(--accent); background: #ecfdf5; }

/* Alerts */
.alert { border: none; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }

/* Dashboard layout */
.dashboard-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 280px; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 1.5rem 1rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 2rem; text-decoration: none; }
.sidebar-brand .logo {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--gradient); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.2rem;
}
.sidebar-brand h5 { font-weight: 800; margin: 0; color: var(--primary); }
.sidebar-nav { display: flex; flex-direction: column; gap: .15rem; }
.sidebar-nav .nav-link {
  color: var(--text-muted); font-weight: 600; padding: .8rem 1rem;
  border-radius: var(--radius-xs); display: flex; align-items: center; gap: .65rem; transition: all .2s;
}
.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link.active { color: var(--accent); background: #ecfdf5; }
.sidebar-footer { margin-top: auto; padding-top: 1rem; }
.sidebar-user { background: var(--bg); border-radius: var(--radius-xs); padding: .8rem 1rem; }
.main-content { flex: 1; padding: 2rem; background: var(--bg); min-width:0; }
@media(max-width:767px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1040; transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-content { padding:1rem; }
  .mobile-nav-toggle { display: inline-flex !important; }
}
.mobile-nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-xs);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--primary); font-size: 1.25rem; cursor: pointer;
}
.sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 1035;
}
@media(max-width:767px) { .sidebar-backdrop.show { display: block; } }

/* Stats */
.stat-card {
  background: var(--surface); border-radius: var(--radius); padding: 1.25rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card h6 { font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin:0; }
.stat-card h2 { font-weight: 800; margin: .25rem 0 0; }

/* Tables */
.table-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.table-card th {
  font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-muted); border-bottom: 2px solid var(--border); padding: 1rem;
  background: var(--bg);
}
.table-card td { vertical-align: middle; padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
.table-card tbody tr:hover { background: #f8fafc; }
.table-card tbody tr:last-child td { border-bottom: none; }

/* Badges */
.badge { font-weight: 600; padding: .45em .75em; border-radius: 8px; }

/* Utilities */
.gradient-text { background: var(--gradient); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.bg-gradient { background: var(--gradient); }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); margin: 1.5rem 0; }
.text-muted { color: var(--text-muted) !important; }
.text-accent { color: var(--accent) !important; }

/* Animations */
@keyframes fadeInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.animate-fade-up { animation: fadeInUp .6s cubic-bezier(.22,1,.36,1) both; }
.animate-fade { animation: fadeIn .5s ease both; }
.delay-100 { animation-delay: .1s; }
.delay-200 { animation-delay: .2s; }
.delay-300 { animation-delay: .3s; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }

/* V1 template compatibility aliases */
.table-admin { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.table-admin th { font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); border-bottom: 2px solid var(--border); padding: 1rem; background: var(--bg); }
.table-admin td { vertical-align: middle; padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
.table-admin tbody tr:hover { background: #f8fafc; }
.table-admin tbody tr:last-child td { border-bottom: none; }
.badge-status { font-weight: 600; padding: .45em .75em; border-radius: 8px; }
.text-muted-2 { color: var(--text-muted); }
.icon-box { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff; margin-bottom: 1rem; background: var(--gradient); box-shadow: 0 10px 20px -6px rgba(16,185,129,.35); }
.icon-box.success { background: linear-gradient(135deg, #22c55e, #16a34a); }

/* --- Document previews --- */
.entry-photo {
  width: 100%; height: 220px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #f8fafc;
  padding: .5rem;
}
.doc-thumb {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .75rem; text-align: center; text-decoration: none;
  height: 220px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #f8fafc;
  padding: 1rem;
  transition: all .2s;
}
.doc-thumb:hover { background: #f1f5f9; border-color: var(--accent); }
.doc-thumb i { font-size: 4rem; line-height: 1; }
.doc-thumb-pdf i { color: #ef4444; }
.doc-thumb-file i { color: var(--accent-2); }
.doc-thumb-label { font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.doc-thumb:hover .doc-thumb-label { color: var(--text); }

/* --- Upload progress --- */
.upload-progress { display: none; margin-top: 1.5rem; }
.upload-progress.active { display: block; }
.progress { height: 10px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.progress-bar { background: var(--gradient); transition: width .2s linear; }
.progress-info { display: flex; justify-content: space-between; font-size: .85rem; color: var(--text-muted); margin-top: .5rem; }

/* --- Image preview before upload --- */
.img-preview {
  max-width: 100%; max-height: 200px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  object-fit: contain;
}

/* --- Cropper modal --- */
.modal-cropper .modal-content { border-radius: var(--radius); border: none; }
.cropper-wrapper { max-height: 60vh; background: #0f172a; }
.cropper-wrapper img { max-width: 100%; display: block; }

/* Skip link ------------------------------------------------------------- */
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--primary); color: #fff;
  padding: .5rem 1rem; z-index: 9999;
  text-decoration: none; border-radius: 0 0 var(--radius-xs) 0;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* Focus visible --------------------------------------------------------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}

/* Reduced motion -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* --- Legal pages & footer strip --------------------------------------- */
.legal-strip {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: .35rem 1rem; padding: 1rem 1.25rem 1.25rem;
  font-size: .8rem; color: var(--text-muted); text-align: center;
}
.legal-strip a { color: var(--text-muted); text-decoration: none; }
.legal-strip a:hover { color: var(--accent); text-decoration: underline; }
.legal-strip-contact { width: 100%; margin-top: .25rem; font-size: .75rem; }
.legal-page { min-height: 100vh; background: var(--bg); }
.legal-hero { background: var(--primary); color: #fff; padding: 2.75rem 0 2.25rem; }
.legal-hero h1 { color: #fff; margin: .75rem 0 .35rem; font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.legal-brand { color: var(--accent); font-weight: 800; text-decoration: none; font-size: 1.05rem; }
.legal-brand:hover { color: #34d399; }
.legal-updated { color: rgba(255,255,255,.65); font-size: .85rem; margin: 0; }
.legal-nav {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .75rem; position: sticky; top: 1rem; display: flex; flex-direction: column; gap: .15rem;
}
.legal-nav a {
  color: var(--text-muted); text-decoration: none; font-size: .85rem; font-weight: 500;
  padding: .45rem .7rem; border-radius: var(--radius-xs);
}
.legal-nav a:hover { background: var(--surface-hover); color: var(--text); }
.legal-nav a.active { background: rgba(16,185,129,.1); color: var(--accent); font-weight: 700; }
.legal-nav .legal-nav-home { color: var(--text); font-weight: 700; border-bottom: 1px solid var(--border); border-radius: 0; margin-bottom: .35rem; }
.legal-doc {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: clamp(1.25rem, 3vw, 2.5rem); box-shadow: var(--shadow-sm);
}
.legal-doc h2 { margin-top: 0; font-size: 1.5rem; }
.legal-doc h3 { font-size: 1.05rem; margin-top: 1.75rem; }
.legal-doc p, .legal-doc li { color: #334155; font-size: .95rem; }
.legal-table { font-size: .85rem; }
.legal-table th { background: var(--bg); }
.legal-hub-list li { margin-bottom: .35rem; }
@media (max-width: 991px) { .legal-nav { position: static; } }

/* --- Cookie consent banner -------------------------------------------- */
.cookie-banner {
  position: fixed; inset: auto 0 0 0; z-index: 1080;
  background: var(--primary); color: #e2e8f0;
  box-shadow: 0 -8px 30px rgba(15,23,42,.35);
  padding: .9rem 1rem;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner {
  max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: .75rem 1.25rem;
}
.cookie-banner-text { margin: 0; font-size: .85rem; flex: 1 1 480px; }
.cookie-banner-text a { color: #34d399; }
.cookie-banner-actions { display: flex; gap: .5rem; flex-shrink: 0; }
.cookie-btn-outline {
  background: transparent; border: 1px solid rgba(255,255,255,.4); color: #e2e8f0;
}
.cookie-btn-outline:hover { background: rgba(255,255,255,.1); color: #fff; }
