/* =====================================================
   WARRANTY PORTAL — Vercel-inspired dark UI
   ===================================================== */

/* ---------- Google Font ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  /* Backgrounds */
  --bg-base:      #000000;
  --bg-surface:   #0a0a0a;
  --bg-card:      #111111;
  --bg-hover:     #1a1a1a;
  --bg-input:     #0a0a0a;

  /* Borders */
  --border:       #2a2a2a;
  --border-light: #1f1f1f;
  --border-focus: #555555;

  /* Text */
  --text-primary:   #ededed;
  --text-secondary: #a3a3a3;
  --text-muted:     #666666;
  --text-inverse:   #000000;

  /* Accent colours */
  --accent:        #ffffff;
  --accent-hover:  #e5e5e5;
  --blue:          #0070f3;
  --blue-hover:    #338ef7;

  /* Status */
  --success:       #30a46c;
  --success-bg:    rgba(48, 164, 108, 0.1);
  --success-border:rgba(48, 164, 108, 0.2);

  --warning:       #e27b0c;
  --warning-bg:    rgba(226, 123, 12, 0.1);
  --warning-border:rgba(226, 123, 12, 0.2);

  --danger:        #e5484d;
  --danger-bg:     rgba(229, 72, 77, 0.1);
  --danger-border: rgba(229, 72, 77, 0.2);

  --info:          #0070f3;
  --info-bg:       rgba(0, 112, 243, 0.1);
  --info-border:   rgba(0, 112, 243, 0.2);

  --neutral:       #666666;
  --neutral-bg:    rgba(102, 102, 102, 0.1);
  --neutral-border:rgba(102, 102, 102, 0.2);

  /* Radii */
  --radius-sm:  4px;
  --radius:     8px;
  --radius-md:  10px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full:9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
  --shadow:    0 4px 16px rgba(0,0,0,0.6);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.8);

  /* Transitions */
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --nav-height: 60px;
  --container:  1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul { list-style: none; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--border-focus); }

/* ======================================================
   LAYOUT
   ====================================================== */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.page-wrapper {
  min-height: calc(100vh - var(--nav-height));
  padding: 40px 0 80px;
}

/* ======================================================
   NAVIGATION
   ====================================================== */

.navbar {
  height: var(--nav-height);
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 24px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.navbar-brand svg {
  color: var(--blue);
  flex-shrink: 0;
}

.navbar-brand span.brand-sub {
  color: var(--text-muted);
  font-weight: 400;
}

.navbar-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition), background-color var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.navbar-end {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-card);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--blue);
  color: white;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

/* ======================================================
   AUTH PAGE
   ====================================================== */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse 80% 80% at 50% -20%, rgba(0,112,243,0.1) 0%, transparent 60%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  text-align: center;
}

.auth-logo-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--blue), #00c6ff);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(0,112,243,0.3), 0 4px 16px rgba(0,112,243,0.2);
}

.auth-logo h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.auth-logo p {
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ======================================================
   FORM COMPONENTS
   ====================================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

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

.form-input,
.form-select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.form-error {
  font-size: 12px;
  color: var(--danger);
}

/* ======================================================
   BUTTONS
   ====================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  outline: none;
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  height: 48px;
  padding: 0 24px;
  font-size: 15px;
}

.btn-full { width: 100%; }

/* Primary (white on black) */
.btn-primary {
  background: var(--accent);
  color: var(--text-inverse);
  border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Secondary (outlined) */
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-focus);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* Warning */
.btn-warning {
  background: rgba(226,123,12,0.12);
  color: var(--warning);
  border-color: rgba(226,123,12,0.3);
}
.btn-warning:hover:not(:disabled) {
  background: rgba(226,123,12,0.2);
  border-color: var(--warning);
}

/* Danger */
.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}
.btn-danger:hover:not(:disabled) {
  background: var(--danger);
  color: white;
}

/* Blue */
.btn-blue {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.btn-blue:hover:not(:disabled) {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
}

/* Loading state */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}
.btn.loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ======================================================
   BADGES / STATUS
   ====================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid;
  white-space: nowrap;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-success  { color: var(--success);  background: var(--success-bg);  border-color: var(--success-border); }
.badge-warning  { color: var(--warning);  background: var(--warning-bg);  border-color: var(--warning-border); }
.badge-danger   { color: var(--danger);   background: var(--danger-bg);   border-color: var(--danger-border); }
.badge-info     { color: var(--info);     background: var(--info-bg);     border-color: var(--info-border); }
.badge-neutral  { color: var(--neutral);  background: var(--neutral-bg);  border-color: var(--neutral-border); }

/* ======================================================
   CARDS
   ====================================================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.card-body {
  padding: 24px;
}

.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--transition);
}

.stat-card:hover { border-color: var(--border-focus); }

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ======================================================
   PAGE HEADER
   ====================================================== */

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

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.page-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.breadcrumb a {
  color: var(--text-secondary);
  transition: color var(--transition);
}
.breadcrumb a:hover { color: var(--text-primary); }
.breadcrumb-sep { color: var(--text-muted); }
.breadcrumb-current { color: var(--text-primary); }

/* ======================================================
   TOOLBAR / FILTERS
   ====================================================== */

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 38px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}

.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--border-focus); }

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-select {
  height: 38px;
  padding: 0 32px 0 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color var(--transition);
}

.filter-select:focus { border-color: var(--border-focus); }
.filter-select option { background: var(--bg-card); }

/* ======================================================
   TABLE
   ====================================================== */

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

thead th:first-child { padding-left: 20px; }
thead th:last-child  { padding-right: 20px; text-align: right; }

tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background-color var(--transition);
  cursor: pointer;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-hover); }

tbody td {
  padding: 14px 16px;
  color: var(--text-primary);
  vertical-align: middle;
}

tbody td:first-child { padding-left: 20px; }
tbody td:last-child  { padding-right: 20px; text-align: right; }

.td-code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13px;
  color: var(--blue);
  font-weight: 500;
}

.td-muted {
  color: var(--text-secondary);
  font-size: 13px;
}

.td-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

/* ======================================================
   PAGINATION
   ====================================================== */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.page-btn:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border);
}

.page-btn.active {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-primary);
  font-weight: 600;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ======================================================
   DETAIL PAGE COMPONENTS
   ====================================================== */

.detail-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.detail-title-group {
  flex: 1;
}

.detail-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.detail-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* Info grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.info-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.info-card-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.info-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-list {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.info-key {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.info-value {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
}

.info-value.mono {
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--blue);
}

/* Progress / timeline */
.warranty-timeline {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 8px;
}

.timeline-step {
  flex: 1;
  text-align: center;
  position: relative;
}

.timeline-step::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 14px;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.timeline-step:last-child::before { display: none; }

.timeline-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-hover);
  border: 2px solid var(--border);
  margin: 0 auto 6px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.timeline-step.completed .timeline-dot {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.timeline-step.current .timeline-dot {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.timeline-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ======================================================
   ALERT / NOTIFICATION
   ====================================================== */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid;
  font-size: 14px;
}

.alert-success { color: var(--success); background: var(--success-bg); border-color: var(--success-border); }
.alert-warning { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-border); }
.alert-danger  { color: var(--danger);  background: var(--danger-bg);  border-color: var(--danger-border); }
.alert-info    { color: var(--info);    background: var(--info-bg);    border-color: var(--info-border); }

/* ======================================================
   EMPTY STATE
   ====================================================== */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  gap: 12px;
  color: var(--text-muted);
}

.empty-state svg {
  color: var(--border);
  margin-bottom: 8px;
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.empty-state p {
  font-size: 14px;
  text-align: center;
  max-width: 320px;
}

/* ======================================================
   LOADING
   ====================================================== */

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
  height: 14px;
}

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ======================================================
   TOAST NOTIFICATIONS
   ====================================================== */

#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 14px;
  color: var(--text-primary);
  pointer-events: all;
  animation: slideIn 0.2s ease;
  max-width: 360px;
}

.toast.success { border-color: var(--success-border); }
.toast.error   { border-color: var(--danger-border); }
.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.toast.success .toast-dot { background: var(--success); }
.toast.error   .toast-dot { background: var(--danger); }

/* ======================================================
   QR CODE
   ====================================================== */

.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px;
}

.qr-frame {
  padding: 16px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.qr-label {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ======================================================
   PROGRESS BAR
   ====================================================== */

.progress {
  height: 6px;
  background: var(--bg-hover);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar {
  height: 100%;
  background: var(--success);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.progress-bar.warning { background: var(--warning); }
.progress-bar.danger  { background: var(--danger); }

/* ======================================================
   ANIMATIONS
   ====================================================== */

@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes shimmer  { to { background-position: -200% 0; } }

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

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

.fade-in { animation: fadeIn 0.2s ease; }

/* ======================================================
   RESPONSIVE
   ====================================================== */

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .page-wrapper { padding: 24px 0 60px; }

  .navbar-nav { display: none; }
  .navbar-inner { gap: 12px; }

  .stat-grid { grid-template-columns: repeat(2, 1fr); }

  .info-grid { grid-template-columns: 1fr; }

  .detail-header { flex-direction: column; }
  .detail-title { font-size: 22px; }

  .auth-card { padding: 28px 24px; }

  .toolbar { flex-direction: column; align-items: stretch; }
  .search-wrapper { min-width: unset; }

  .pagination { flex-direction: column; align-items: center; }

  thead th, tbody td { padding: 10px 12px; }
  thead th:first-child, tbody td:first-child { padding-left: 12px; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 20px; }
}
