/* ============================================================
   AuthentiQR — Global Custom Styles
   ============================================================ */

/* Material Symbols defaults */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  user-select: none;
  vertical-align: middle;
  line-height: 1;
}

/* ── Page Transitions ─────────────────────────────── */
#app {
  min-height: 100vh;
}

.page-enter {
  animation: fadeSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ── Sidebar ────────────────────────────────────────── */
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: #5c636a;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  margin-bottom: 2px;
}
.sidebar-nav-item:hover {
  background: #f3f4f6;
  color: #111827;
}
.sidebar-nav-item.active {
  background: #e6eeff;
  color: #002a58;
  font-weight: 600;
}

/* ── Cards ──────────────────────────────────────────── */
.card {
  background: #ffffff;
  border: 1px solid #c3c6d2;
  border-radius: 0.75rem;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: 0 8px 24px rgba(0,42,88,0.07);
}

/* ── Metric Card ─────────────────────────────────────── */
.metric-card {
  background: #ffffff;
  border: 1px solid #c3c6d2;
  border-radius: 0.75rem;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.metric-card:hover {
  box-shadow: 0 8px 24px rgba(0,42,88,0.08);
  transform: translateY(-2px);
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 0.5rem;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: #002a58;
  color: #ffffff;
}
.btn-primary:hover { background: #004080; box-shadow: 0 4px 12px rgba(0,42,88,0.25); }

.btn-secondary {
  background: #50d9fe;
  color: #001f27;
}
.btn-secondary:hover { background: #4cd6fb; }

.btn-outline {
  background: transparent;
  border: 1.5px solid #c3c6d2;
  color: #424750;
}
.btn-outline:hover { border-color: #002a58; color: #002a58; background: #eff4ff; }

.btn-danger {
  background: #ba1a1a;
  color: #ffffff;
}
.btn-danger:hover { background: #93000a; }

.btn-ghost {
  background: transparent;
  color: #424750;
}
.btn-ghost:hover { background: #eff4ff; color: #002a58; }

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 0.375rem;
}
.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
}

/* ── Status Chips ─────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chip-success  { background: #dcfce7; color: #166534; }
.chip-warning  { background: #fef3c7; color: #92400e; }
.chip-danger   { background: #ffdad6; color: #93000a; }
.chip-info     { background: #e0f2fe; color: #0369a1; }
.chip-neutral  { background: #f1f5f9; color: #475569; }
.chip-primary  { background: #d6e3ff; color: #0e4686; }
.chip-secondary{ background: #b3ebff; color: #004e5f; }

/* ── Tables ──────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #424750;
  background: #eff4ff;
  border-bottom: 1px solid #c3c6d2;
}
.data-table td {
  padding: 12px 16px;
  font-size: 14px;
  color: #0d1c2e;
  border-bottom: 1px solid #e6eeff;
  vertical-align: middle;
}
.data-table tr:hover td { background: #f8f9ff; }
.data-table tbody tr:nth-child(even) td { background: #fafcff; }
.data-table tr:last-child td { border-bottom: none; }

/* ── Skeleton Loading ────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, 
    #e6eeff 25%, 
    #f8f9ff 37%, 
    #e6eeff 63%
  );
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: 0.375rem;
}

@keyframes skeleton-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.skeleton-card {
  height: 88px;
  border-radius: 0.75rem;
}

.skeleton-row {
  height: 48px;
  margin-bottom: 2px;
}

.skeleton-text {
  height: 14px;
  width: 60%;
}

.skeleton-text-sm {
  height: 10px;
  width: 40%;
}

.skeleton-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* ── Forms ───────────────────────────────────────────── */
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #c3c6d2;
  border-radius: 0.5rem;
  font-size: 14px;
  font-family: "Public Sans", sans-serif;
  color: #0d1c2e;
  background: #ffffff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-input:focus {
  border-color: #002a58;
  box-shadow: 0 0 0 3px rgba(0,42,88,0.1);
}
.form-input::placeholder { color: #737781; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #424750;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-select {
  width: 100%;
  padding: 10px 36px 10px 14px;
  border: 1.5px solid #c3c6d2;
  border-radius: 0.5rem;
  font-size: 14px;
  font-family: "Public Sans", sans-serif;
  color: #0d1c2e;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23737781'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.15s;
  outline: none;
}
.form-select:focus { border-color: #002a58; box-shadow: 0 0 0 3px rgba(0,42,88,0.1); }

/* ── Search Input ─────────────────────────────────────── */
.search-wrapper { position: relative; }
.search-wrapper .material-symbols-outlined {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #737781;
  font-size: 18px;
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1.5px solid #c3c6d2;
  border-radius: 9999px;
  font-size: 14px;
  font-family: "Public Sans", sans-serif;
  outline: none;
  background: #eff4ff;
  transition: border-color 0.15s, background 0.15s;
}
.search-input:focus { border-color: #002a58; background: #ffffff; }

/* ── Modal ───────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.15s ease-out;
}
.modal-box {
  background: #ffffff;
  border-radius: 1rem;
  padding: 32px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.2s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: translateY(0); } }

/* ── Progress Bar ─────────────────────────────────────── */
.progress-bar {
  height: 8px;
  border-radius: 9999px;
  background: #e6eeff;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: #002a58;
  transition: width 0.6s ease;
}

/* ── Toast ───────────────────────────────────────────── */
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 0.75rem;
  min-width: 280px;
  max-width: 380px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  pointer-events: all;
  animation: toastIn 0.25s ease-out;
  font-size: 14px;
  font-weight: 500;
}
.toast-success { background: #166534; color: #ffffff; }
.toast-error   { background: #93000a; color: #ffffff; }
.toast-warning { background: #92400e; color: #ffffff; }
.toast-info    { background: #002a58; color: #ffffff; }

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

/* ── Stat Bar Chart (CSS only) ───────────────────────── */
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.bar-chart-bar {
  flex: 1;
  background: #d6e3ff;
  border-radius: 4px 4px 0 0;
  transition: background 0.2s, height 0.5s;
  cursor: pointer;
  position: relative;
}
.bar-chart-bar:hover { background: #a9c7ff; }
.bar-chart-bar.active { background: #002a58; }
.bar-chart-bar .bar-label {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #737781;
  white-space: nowrap;
}

/* ── Timeline ────────────────────────────────────────── */
.timeline-item { display: flex; gap: 16px; }
.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #002a58;
  flex-shrink: 0;
  margin-top: 4px;
  position: relative;
}
.timeline-dot::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% + 20px);
  background: #c3c6d2;
}
.timeline-item:last-child .timeline-dot::after { display: none; }

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c3c6d2; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #737781; }

/* ── Utilities ───────────────────────────────────────── */
.truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar-hidden { display: none !important; }
  .main-no-sidebar { margin-left: 0 !important; }

  /* Ensure tables scroll horizontally on mobile */
  .data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Reduce card padding on mobile */
  .card { padding: 16px; }

  /* Toast full width on mobile */
  .toast { min-width: unset; max-width: calc(100vw - 32px); width: calc(100vw - 32px); }

  /* Modal full width on mobile */
  .modal-box { padding: 20px; border-radius: 0.75rem; }
}

/* Ensure sidebar transition works smoothly */
#sidebar {
  will-change: transform;
}

/* Touch-friendly minimum tap target */
.sidebar-nav-item {
  min-height: 44px;
}

/* ── Tab Navigation ──────────────────────────────────── */
.qr-tab {
  position: relative;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}
.qr-tab.tab-active {
  color: #002a58;
  border-bottom-color: #002a58;
  background: rgba(0, 42, 88, 0.05);
}
.qr-tab:not(.tab-active):hover {
  background: rgba(0, 42, 88, 0.03);
}
@ k e y f r a m e s   a u t o - r e f r e s h - p r o g r e s s   {   f r o m   {   w i d t h :   1 0 0 % ;   }   t o   {   w i d t h :   0 % ;   }   }  
 