/* =====================================================
   Document Tracking Management System
   Enterprise ERP Style — Navy Blue Theme
   ===================================================== */

/* ── Variables ─────────────────────────────────────── */
:root {
  --navy-950:  #040d1e;
  --navy-900:  #0a1628;
  --navy-800:  #0f2246;
  --navy-700:  #163261;
  --navy-600:  #1e4080;
  --navy-500:  #2557a7;
  --navy-400:  #3b72cc;
  --navy-300:  #5b91e0;
  --navy-200:  #9ab8ef;
  --navy-100:  #dce8fc;
  --navy-50:   #f0f5fe;

  --accent:    #0ea5e9;
  --accent-lt: #e0f2fe;

  --success:   #10b981;
  --warning:   #f59e0b;
  --danger:    #ef4444;
  --info:      #6366f1;

  --gray-950:  #0c0c0d;
  --gray-900:  #111113;
  --gray-800:  #1c1c1f;
  --gray-700:  #2e2e33;
  --gray-600:  #52525b;
  --gray-500:  #71717a;
  --gray-400:  #a1a1aa;
  --gray-300:  #d4d4d8;
  --gray-200:  #e4e4e7;
  --gray-100:  #f4f4f5;
  --gray-50:   #fafafa;
  --white:     #ffffff;

  --sidebar-w: 260px;
  --topbar-h:  64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.14), 0 4px 8px rgba(0,0,0,.08);
  --shadow-xl: 0 20px 60px rgba(0,0,0,.20);

  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;

  --transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
}

/* ── Sidebar ───────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--navy-900);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform var(--transition);
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--navy-400), var(--accent));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37,87,167,.5);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  color: white;
  letter-spacing: .5px;
  line-height: 1.2;
}

.brand-sub {
  font-size: 10px;
  color: var(--navy-200);
  letter-spacing: .6px;
  text-transform: uppercase;
  font-weight: 500;
}

.sidebar-close {
  background: none;
  border: none;
  color: var(--navy-200);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.sidebar-close:hover { color: white; background: rgba(255,255,255,.1); }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  margin: 10px 12px;
  background: rgba(255,255,255,.05);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,.06);
}

.user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--navy-500), var(--accent));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--navy-200);
  margin-top: 1px;
}

/* ── Sidebar Nav ───────────────────────────────────── */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--navy-400);
  padding: 16px 8px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--navy-200);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
  margin-bottom: 2px;
  cursor: pointer;
}

.nav-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

.nav-item:hover {
  background: rgba(255,255,255,.07);
  color: white;
}

.nav-item.active {
  background: linear-gradient(135deg, var(--navy-600), var(--navy-500));
  color: white;
  box-shadow: 0 2px 8px rgba(37,87,167,.4);
}

.nav-item.active i { color: var(--accent); }

.nav-logout {
  color: #fca5a5;
  border: 1px solid rgba(252,165,165,.2);
}

.nav-logout:hover {
  background: rgba(239,68,68,.15) !important;
  color: #fca5a5 !important;
  border-color: rgba(239,68,68,.3);
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.07);
}

.sidebar-version {
  text-align: center;
  font-size: 11px;
  color: var(--navy-400);
  margin-top: 8px;
  font-family: var(--font-mono);
}

/* ── Main Wrapper ──────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  flex: 1;
  transition: margin-left var(--transition);
}

/* ── Topbar ────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar-toggle {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--gray-600);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.topbar-toggle:hover { background: var(--gray-100); color: var(--navy-700); }

.topbar-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-800);
  letter-spacing: -.2px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-800);
}

.topbar-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--navy-600), var(--accent));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
}

/* ── Page Content ──────────────────────────────────── */
.page-content {
  flex: 1;
  padding: 28px 28px 40px;
}

.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -.5px;
}

.page-header p {
  color: var(--gray-500);
  margin-top: 4px;
  font-size: 14px;
}

/* ── Stat Cards ────────────────────────────────────── */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

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

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.stat-card.total::before   { background: linear-gradient(90deg, var(--navy-500), var(--accent)); }
.stat-card.complete::before { background: linear-gradient(90deg, var(--success), #34d399); }
.stat-card.pending::before  { background: linear-gradient(90deg, var(--warning), #fcd34d); }
.stat-card.incomplete::before { background: linear-gradient(90deg, var(--danger), #f87171); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

.stat-card.total .stat-icon    { background: var(--navy-50); color: var(--navy-600); }
.stat-card.complete .stat-icon { background: #ecfdf5; color: var(--success); }
.stat-card.pending .stat-icon  { background: #fffbeb; color: var(--warning); }
.stat-card.incomplete .stat-icon { background: #fef2f2; color: var(--danger); }

.stat-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
  margin-top: 6px;
}

/* ── Cards ─────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header-custom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--gray-100);
  background: linear-gradient(135deg, var(--navy-50), var(--white));
}

.card-header-custom h5 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-800);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.card-header-custom h5 i {
  color: var(--navy-500);
}

.card-body-custom {
  padding: 24px;
}

/* ── Tables ────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.dtms-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}

.dtms-table thead th {
  background: var(--navy-900);
  color: var(--navy-100);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 13px 16px;
  white-space: nowrap;
  border: none;
  position: sticky;
  top: 0;
}

.dtms-table thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.dtms-table thead th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }

.dtms-table tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}

.dtms-table tbody tr:last-child { border-bottom: none; }

.dtms-table tbody tr:hover { background: var(--navy-50); }

.dtms-table tbody td {
  padding: 13px 16px;
  vertical-align: middle;
  color: var(--gray-700);
}

.dtms-table tbody tr:nth-child(even) {
  background: var(--gray-50);
}

.dtms-table tbody tr:nth-child(even):hover {
  background: var(--navy-50);
}

/* ── Badges ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: .3px;
}

.badge-complete   { background: #dcfce7; color: #15803d; }
.badge-pending    { background: #fef9c3; color: #a16207; }
.badge-incomplete { background: #fee2e2; color: #b91c1c; }
.badge-info       { background: var(--navy-100); color: var(--navy-700); }

/* ── Doc Status Pills ──────────────────────────────── */
.doc-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.doc-pill.available {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.doc-pill.available:hover {
  background: #1d4ed8;
  color: white;
}

.doc-pill.null {
  background: #fef2f2;
  color: var(--danger);
  border: 1px dashed #fca5a5;
  cursor: default;
}

/* ── Buttons ───────────────────────────────────────── */
.btn-navy {
  background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
  color: white;
  border: none;
  padding: 9px 20px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-navy:hover {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15,34,70,.3);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  color: white;
  border: none;
  padding: 9px 20px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-accent:hover {
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14,165,233,.4);
}

.btn-sm-icon {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}

.btn-view   { background: #eff6ff; color: var(--navy-600); }
.btn-edit   { background: #ecfdf5; color: var(--success); }
.btn-delete { background: #fef2f2; color: var(--danger); }

.btn-view:hover   { background: var(--navy-600); color: white; }
.btn-edit:hover   { background: var(--success); color: white; }
.btn-delete:hover { background: var(--danger); color: white; }

/* ── Forms ─────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-800);
  margin-bottom: 6px;
}

.form-label .required { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--white);
  transition: all var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--navy-400);
  box-shadow: 0 0 0 3px rgba(37,87,167,.12);
}

.form-control::placeholder { color: var(--gray-400); }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

/* File upload area */
.file-upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  background: var(--gray-50);
}

.file-upload-area:hover, .file-upload-area.drag-over {
  border-color: var(--navy-400);
  background: var(--navy-50);
}

.file-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-upload-icon { font-size: 32px; color: var(--gray-400); margin-bottom: 8px; }
.file-upload-text { font-size: 13px; color: var(--gray-500); }
.file-upload-text strong { color: var(--navy-600); }
.file-upload-name { font-size: 12px; color: var(--success); margin-top: 6px; display: none; font-weight: 600; }

/* ── Search Bar ────────────────────────────────────── */
.search-bar {
  position: relative;
}

.search-bar input {
  padding-left: 42px;
}

.search-bar .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 14px;
  pointer-events: none;
}

/* ── Filter Bar ────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Alert ─────────────────────────────────────────── */
.alert-custom {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger   { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning  { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-info     { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── Modal ─────────────────────────────────────────── */
.modal-content {
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: white;
  border: none;
  padding: 20px 24px;
}

.modal-header .modal-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header .btn-close {
  filter: invert(1);
  opacity: .8;
}

.modal-body { padding: 28px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--gray-100); }

/* ── Login Page ────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 50%, var(--navy-700) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(37,87,167,.3) 0%, transparent 70%);
  top: -200px; right: -200px;
  border-radius: 50%;
}

.login-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(14,165,233,.2) 0%, transparent 70%);
  bottom: -100px; left: -100px;
  border-radius: 50%;
}

.login-card {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 48px 44px;
  width: 420px;
  max-width: 95vw;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 1;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.login-logo-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--navy-700), var(--accent));
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: white;
  box-shadow: 0 8px 24px rgba(37,87,167,.4);
}

.login-logo-text h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.2;
}

.login-logo-text p {
  font-size: 12px;
  color: var(--gray-500);
  margin: 0;
}

.login-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 24px 0;
}

/* ── Dashboard Chart ───────────────────────────────── */
.chart-container {
  position: relative;
  height: 260px;
}

/* ── History Timeline ──────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px;
  background: var(--gray-200);
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--navy-500);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--navy-200);
}

.timeline-content {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.timeline-meta {
  font-size: 11px;
  color: var(--gray-400);
  margin-bottom: 4px;
  font-family: var(--font-mono);
}

.timeline-desc {
  font-size: 13.5px;
  color: var(--gray-700);
  font-weight: 500;
}

/* ── Invoice Number ────────────────────────────────── */
.invoice-number {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-700);
  background: var(--navy-50);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--navy-100);
}

/* ── Pagination ────────────────────────────────────── */
.pagination-custom {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: flex-end;
}

.page-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--gray-200);
  background: white;
  color: var(--gray-600);
  text-decoration: none;
}

.page-btn:hover    { background: var(--navy-50); color: var(--navy-700); border-color: var(--navy-200); }
.page-btn.active   { background: var(--navy-700); color: white; border-color: var(--navy-700); }
.page-btn.disabled { opacity: .4; pointer-events: none; }

/* ── Sidebar Overlay (Mobile) ──────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 999;
  backdrop-filter: blur(2px);
}

/* ── No Data ───────────────────────────────────────── */
.no-data {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-400);
}

.no-data i { font-size: 48px; margin-bottom: 12px; display: block; }
.no-data p { font-size: 15px; font-weight: 500; }

/* ── Detail Section ────────────────────────────────── */
.doc-download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.doc-download-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  transition: all var(--transition);
}

.doc-download-card.has-doc {
  border-color: var(--navy-200);
  background: var(--navy-50);
}

.doc-download-card.has-doc:hover {
  border-color: var(--navy-400);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.doc-download-card i { font-size: 28px; }
.doc-download-card.has-doc i { color: var(--navy-600); }
.doc-download-card:not(.has-doc) i { color: var(--gray-300); }

.doc-type-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ── Audit Trail Table ─────────────────────────────── */
.activity-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--navy-100);
  color: var(--navy-700);
}

/* ── Animations ────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up { animation: fadeInUp .35s ease forwards; }

.stat-card { animation: fadeInUp .4s ease forwards; }
.stat-card:nth-child(1) { animation-delay: .05s; }
.stat-card:nth-child(2) { animation-delay: .10s; }
.stat-card:nth-child(3) { animation-delay: .15s; }
.stat-card:nth-child(4) { animation-delay: .20s; }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.show { display: block; }

  .main-wrapper { margin-left: 0; }
  .page-content { padding: 20px 16px 32px; }
}

@media (max-width: 575.98px) {
  .page-content { padding: 16px 12px 28px; }
  .stat-value { font-size: 28px; }
  .login-card { padding: 32px 24px; }
  .topbar { padding: 0 16px; }
}

/* ── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ── Utilities ─────────────────────────────────────── */
.text-navy   { color: var(--navy-700) !important; }
.text-muted-sm { font-size: 12px; color: var(--gray-400); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.mb-28  { margin-bottom: 28px; }
