@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Retextured Modern Design Tokens */
  --bg-deep: #07090e;
  --bg-surface: rgba(15, 23, 42, 0.72);
  --bg-surface-elevated: rgba(24, 32, 53, 0.85);
  --bg-surface-hover: rgba(30, 41, 69, 0.9);
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(56, 189, 248, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #38bdf8;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;

  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  color: var(--text-primary);
  background: 
    radial-gradient(1200px 700px at 0% -5%, rgba(56, 189, 248, 0.12), transparent),
    radial-gradient(1100px 600px at 100% 0%, rgba(99, 102, 241, 0.14), transparent),
    radial-gradient(900px 800px at 50% 100%, rgba(16, 185, 129, 0.05), transparent),
    var(--bg-deep);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Modern matrix grid texture */
.bg-grid {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  opacity: 0.7;
  z-index: 0;
}

.header, .main, .footer {
  position: relative;
  z-index: 1;
}

/* ============================================================
   👑 TOP UTILITY / ADMIN BAR
   ============================================================ */
.top-utility-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 0 0.25rem;
}

.device-status-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-medium);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.device-status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e, 0 0 4px #22c55e;
  animation: radarPulse 2s infinite;
}

@keyframes radarPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.btn-admin-manage {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-admin-manage:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(99, 102, 241, 0.5);
  filter: brightness(1.1);
}

.btn-logout-small {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout-small:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ffffff;
  border-color: #f87171;
}

/* ============================================================
   HEADER & BRAND
   ============================================================ */
.header {
  padding: 1.5rem 1.5rem 1.25rem;
  max-width: 1240px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 50%, #ec4899 100%);
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  position: relative;
  flex-shrink: 0;
}

.brand-mark::after {
  content: "🏢";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  margin: 0.2rem 0 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

/* ============================================================
   CARD GLASSMORPHISM ARCHITECTURE
   ============================================================ */
.main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.card {
  background: var(--bg-surface);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.section-title {
  margin: 0 0 1.2rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--accent-cyan);
  border-radius: 2px;
}

/* ============================================================
   STATS OVERVIEW GRID
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.stat {
  background: rgba(24, 32, 53, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.stat:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 69, 0.65);
  border-color: var(--border-medium);
}

/* Retextured Top Accent Line for each stat */
.stat[data-stat="allottee"] { border-top: 2px solid var(--accent-cyan); }
.stat[data-stat="2008"] { border-top: 2px solid var(--accent-indigo); }
.stat[data-stat="2023"] { border-top: 2px solid var(--accent-emerald); }
.stat[data-stat="plots"] { border-top: 2px solid var(--accent-amber); }

.stat-value {
  font-family: var(--font-mono);
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.1;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Shimmer Loading */
.stat.shimmer .stat-value {
  background: linear-gradient(90deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0.1) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  color: transparent;
  border-radius: 6px;
}

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

/* ============================================================
   COMMAND-BAR SEARCH SECTION
   ============================================================ */
.search-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.search-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.search-row input {
  flex: 1 1 280px;
  min-width: 0;
  height: 52px;
  padding: 0 1.25rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-medium);
  background: rgba(10, 15, 29, 0.8);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 500;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.search-row input::placeholder {
  color: rgba(148, 163, 184, 0.55);
  font-family: var(--font-main);
  font-weight: 400;
}

.search-row input:focus {
  border-color: var(--accent-cyan);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-primary {
  height: 52px;
  border: none;
  border-radius: var(--radius-md);
  padding: 0 2rem;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font-main);
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #4f46e5 100%);
  box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-width: 130px;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1.5px);
  box-shadow: 0 12px 30px -4px rgba(37, 99, 235, 0.6);
  filter: brightness(1.08);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.hint {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.hint code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.15em 0.45em;
  border-radius: 6px;
}

.btn-ghost {
  margin-top: 0.75rem;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  border: 1px dashed var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: not-allowed;
}

.error-msg {
  margin: 0.75rem 0 0;
  color: var(--accent-rose);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ============================================================
   RETEXTURED DATA TABLES (Fintech Terminal Grade)
   ============================================================ */
.results {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.results-note {
  margin: 0;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent-cyan);
  font-size: 0.92rem;
  font-weight: 600;
}

.table-block {
  padding: 1.5rem;
}

.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.75rem;
}

.table-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.table-wrap {
  position: relative;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(11, 15, 25, 0.75);
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

/* Sleek custom scrollbars */
.table-wrap::-webkit-scrollbar {
  height: 8px;
}
.table-wrap::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 4px;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 4px;
}
.table-wrap::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table--wide {
  width: max-content;
  min-width: 100%;
}

.data-table th,
.data-table td {
  padding: 0.85rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

/* RETEXTURED MODERN TABLE HEAD (Replaces old Georgia / Blue-Grey) */
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-sizing: border-box;
  background: #0f172a;
  color: #94a3b8;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
  vertical-align: middle;
  border-top: none;
  border-left: none;
  border-right: none;
  border-bottom: 2px solid rgba(56, 189, 248, 0.25);
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

.data-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.06);
  box-shadow: inset 3px 0 0 var(--accent-cyan);
}

.data-table td:first-child {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-cyan);
  white-space: nowrap;
}

/* Search Highlights */
mark {
  background: rgba(234, 179, 8, 0.25);
  color: #fef08a;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  border-bottom: 1px solid #facc15;
}

.empty {
  margin: 0;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

/* Global Loader */
.global-loader {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 14, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99998;
}

.loader-ring {
  width: 46px;
  height: 46px;
  border: 3px solid rgba(56, 189, 248, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================================
   COLLECT UI AUTH MODAL
   ============================================================ */
.collect-auth-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(15, 23, 42, 0.95) 0%, rgba(7, 9, 14, 0.98) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  backdrop-filter: blur(16px);
}

.collect-card {
  width: 100%;
  max-width: 430px;
  background: #ffffff;
  color: #0f172a;
  border-radius: 24px;
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.7), 0 0 1px 1px rgba(255, 255, 255, 0.2);
  padding: 42px 36px;
  box-sizing: border-box;
  animation: collectCardPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes collectCardPop {
  0% { opacity: 0; transform: scale(0.96) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.collect-title {
  margin: 0 0 6px 0;
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.collect-subtitle {
  margin: 0 0 24px 0;
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.45;
}

.collect-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.4;
  text-align: left;
}

.collect-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.collect-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
}

.collect-field label {
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.collect-field input {
  height: 48px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 16px;
  font-size: 14.5px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.collect-field input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.collect-captcha-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.collect-captcha-canvas {
  height: 48px;
  width: 125px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  box-sizing: border-box;
  flex-shrink: 0;
}

.collect-captcha-refresh {
  height: 48px;
  width: 48px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.collect-captcha-refresh:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: rotate(30deg);
}

.collect-captcha-input {
  flex: 1;
  height: 48px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 3px;
  text-align: center;
  font-size: 16px;
}

.btn-collect-primary {
  width: 100%;
  height: 50px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 4px;
}

.btn-collect-primary:hover:not(:disabled) {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -2px rgba(15, 23, 42, 0.3);
}

.kbd-badge {
  background: rgba(255, 255, 255, 0.18);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
}

.collect-or-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 6px 0;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
}

.collect-or-divider::before,
.collect-or-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1.5px solid #e2e8f0;
}

.collect-or-divider span {
  padding: 0 14px;
}

.btn-collect-google {
  width: 100%;
  height: 50px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-collect-google:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

/* Device Approval Wait Screen */
.waiting-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.shield-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.pulse-glow {
  animation: shieldPulse 2s infinite;
}

@keyframes shieldPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(37, 99, 235, 0.4)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 14px rgba(37, 99, 235, 0.6)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(37, 99, 235, 0.4)); }
}

.waiting-subtitle {
  font-size: 13.5px;
  color: #64748b;
  margin: 8px 0 20px 0;
  line-height: 1.5;
}

.device-info-badge {
  width: 100%;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 20px;
  box-sizing: border-box;
}

.badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 4px 0;
}

.badge-label {
  color: #64748b;
  font-weight: 600;
}

.badge-val {
  color: #0f172a;
  font-weight: 700;
}

.badge-val.code {
  font-family: var(--font-mono);
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.status-indicator-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
  width: 100%;
  box-sizing: border-box;
}

.status-indicator-box.rejected {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.btn-rerequest {
  width: 100%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.2s;
}

.btn-rerequest:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.45);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #93c5fd;
  border-top-color: #1d4ed8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.hint-text {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 20px;
}

.btn-secondary {
  background: transparent;
  border: 1.5px solid #e2e8f0;
  color: #475569;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #f8fafc;
  color: #0f172a;
}

/* ============================================================
   ADMIN POPUP & DEVICE MANAGER MODAL
   ============================================================ */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  padding: 20px;
  backdrop-filter: blur(12px);
}

.admin-modal-card {
  width: 100%;
  max-width: 660px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  color: #f1f5f9;
  padding: 26px;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.8);
  box-sizing: border-box;
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 14px;
}

.admin-modal-header h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close-x {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 22px;
  cursor: pointer;
}

.btn-close-x:hover {
  color: #ffffff;
}

.admin-popup-content {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 20px;
}

.admin-info-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 13.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.admin-info-row:last-child {
  border-bottom: none;
}

.admin-info-label {
  color: #94a3b8;
  font-weight: 500;
}

.admin-info-val {
  font-weight: 700;
  color: #f8fafc;
}

.admin-btn-group {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn-action-approve {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.btn-action-approve:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-action-reject {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action-reject:hover {
  filter: brightness(1.1);
}

/* Device Manager Table */
.device-manager-table-wrap {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.device-manager-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.device-manager-table th {
  background: rgba(255, 255, 255, 0.06);
  padding: 11px 14px;
  text-align: left;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.device-manager-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.status-pill {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

.status-pill.approved {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.status-pill.pending {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.status-pill.rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-table-revoke {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.btn-table-reapprove {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
