:root {
  --primary: #2563eb;
  --primary-glow: rgb(37 99 235 / 15%);
  --noon: #b45309;
  --keeta: #047857;
  --talabat: #ea580c;
  --bg: #f8fafc;
  --card-bg: #fff;
  --glass-border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #475569;
  --success: #10b981;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Inter, sans-serif;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(at 0% 0%, rgb(241 245 249 / 50%) 0, transparent 50%),
    radial-gradient(at 50% 0%, rgb(219 234 254 / 30%) 0, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

.glass {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1.25rem;
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 5%),
    0 2px 4px -2px rgb(0 0 0 / 5%),
    0 10px 15px -3px rgb(0 0 0 / 3%);
}

.app-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Nav */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  margin-bottom: 3rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

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

.logo-icon {
  color: var(--primary);
  width: 32px;
  height: 32px;
}

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

.brand {
  font-family: Outfit, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 1px;
}

.sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Utilities */
.flex {
  display: flex;
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.space-x-3 > * + * {
  margin-left: 0.75rem;
}
.space-x-4 > * + * {
  margin-left: 1rem;
}
.space-x-6 > * + * {
  margin-left: 1.5rem;
}
.h-8 {
  height: 2rem;
}
.w-auto {
  width: auto;
}
.rounded-full {
  border-radius: 9999px;
}
.bg-white-10 {
  background: rgb(255 255 255 / 10%);
}
.border-white-20 {
  border: 1px solid rgb(255 255 255 / 20%);
}

.nav-btn {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: var(--text-main);
  padding: 0.6rem 1.25rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 5%);
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-btn:hover {
  background: #f8fafc;
  border-color: var(--primary);
}

.status-badge {
  background: rgb(16 185 129 / 10%);
  color: var(--success);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgb(16 185 129 / 70%);
  }
  70% {
    box-shadow: 0 0 0 10px rgb(16 185 129 / 0%);
  }
  100% {
    box-shadow: 0 0 0 0 rgb(16 185 129 / 0%);
  }
}

/* Hero */
.hero-section {
  text-align: center;
  margin-bottom: 3rem;
}

.hero-section h1 {
  font-family: Outfit, sans-serif;
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #0f172a, #2563eb);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.hero-section p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.category-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-align: left;
  color: inherit;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 5%);
}

.category-card:hover {
  transform: translateY(-4px);
  background: rgb(255 255 255 / 5%);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 20%);
}

/* Platform Specific Hover Colors */
.category-card[data-platform="Noon"]:hover {
  border-color: rgb(234 179 8 / 50%);
  background: rgb(234 179 8 / 5%);
}

.category-card[data-platform="Keeta"]:hover {
  border-color: rgb(236 72 153 / 50%);
  background: rgb(236 72 153 / 5%);
}

.category-card[data-platform="Talabat"]:hover {
  border-color: rgb(249 115 22 / 50%);
  background: rgb(249 115 22 / 5%);
}

/* Platform Specific Active Colors */
.category-card.active {
  border-color: var(--active-theme-color, var(--primary));
  background: var(--active-theme-bg, rgb(37 99 235 / 5%));
  box-shadow:
    0 0 15px var(--active-theme-bg, rgb(37 99 235 / 20%)),
    inset 0 0 10px var(--active-theme-bg, transparent);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.card-icon.noon {
  background: rgb(255 238 0 / 10%);
  color: var(--noon);
}
.card-icon.keeta {
  background: rgb(0 255 136 / 10%);
  color: var(--keeta);
}
.card-icon.talabat {
  background: rgb(255 94 0 / 10%);
  color: var(--talabat);
}

.category-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.category-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.talabat-group {
  grid-column: span 1;
}

.city-chips {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.city-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
}

.city-chip:hover {
  background: #e2e8f0;
}

.city-chip.active {
  background: var(--talabat);
  color: white;
  border-color: var(--talabat);
}

/* Upload Container */
.upload-container {
  padding: 2.5rem;
  margin-bottom: 3rem;
  border-radius: 1.5rem;
  border: 1px solid var(--active-theme-color, rgb(255 255 255 / 10%));
  box-shadow: 0 0 40px var(--active-theme-bg, rgb(0 0 0 / 30%));
  transition: all 0.4s ease;
}

.active-selection-indicator {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.active-selection-indicator strong {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.drop-zone {
  border: 2px dashed var(--active-theme-color, rgb(255 255 255 / 20%));
  border-radius: 1rem;
  padding: 3rem 2rem;
  text-align: center;
  background: var(--active-theme-bg, rgb(0 0 0 / 20%));
  transition: all 0.3s ease;
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary);
  background: rgb(37 99 235 / 2%);
}

.icon-box {
  width: 64px;
  height: 64px;
  background: rgb(59 130 246 / 10%);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.drop-zone h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.drop-zone p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.btn {
  padding: 0.8rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px rgb(59 130 246 / 30%);
}

.btn-primary:hover {
  transform: scale(1.05);
  background: #2563eb;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-large {
  padding: 1rem 3rem;
  font-size: 1.2rem;
}

/* File Info */
.file-info {
  animation: slideUp 0.4s ease-out;
}

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

.file-card {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.file-icon {
  width: 40px;
  height: 40px;
  color: var(--success);
  margin-right: 1.5rem;
}

.file-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.file-details .name {
  font-weight: 600;
  font-size: 1.1rem;
}
.file-details .size {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.remove-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
}

.remove-btn:hover {
  background: rgb(239 68 68 / 10%);
  color: #ef4444;
}

.process-actions {
  text-align: center;
}

/* Preview Section */
.preview-section {
  padding: 2rem;
  margin-bottom: 3rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1.5rem;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: #fff !important;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  max-width: 500px;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 5%);
}

.search-box i {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-main);
  width: 100%;
  outline: none;
  font-size: 0.9rem;
}

.header-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logout-btn {
  background: rgb(239 68 68 / 10%);
  border: 1px solid rgb(239 68 68 / 20%);
  color: #ef4444;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn i {
  width: 16px;
  height: 16px;
}
.logout-btn:hover {
  background: rgb(239 68 68 / 20%);
  border-color: #ef4444;
  transform: translateY(-1px);
}

.status-badge {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}

.btn-outline:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgb(239 68 68 / 5%);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  border-radius: 0.5rem;
}

.action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 0.4rem;
  transition: all 0.2s;
}

.action-btn:hover {
  background: rgb(239 68 68 / 10%);
  color: #ef4444;
}

.action-btn i {
  width: 16px;
  height: 16px;
}

.table-wrapper {
  overflow-x: auto;
}

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

th {
  text-align: left;
  padding: 1rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
  font-weight: 500;
}

td {
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
}

tr:hover td {
  background: #f8fafc;
}

/* Loader Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgb(248 250 252 / 85%);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-content {
  text-align: center;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgb(59 130 246 / 10%);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 2rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Login Styles */
.login-card {
  padding: 3rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
  animation: slideUp 0.5s ease-out;
}

.login-header {
  margin-bottom: 2rem;
}
.auth-icon {
  width: 48px;
  height: 48px;
  color: var(--primary);
  margin-bottom: 1rem;
}
.login-header h2 {
  font-family: Outfit, sans-serif;
  font-size: 1.5rem;
  letter-spacing: 1px;
}
.login-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.login-form {
  text-align: left;
}
.input-group {
  margin-bottom: 1.5rem;
}
.input-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.input-group input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
}

.input-group input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 15%);
}

.btn-block {
  width: 100%;
  justify-content: center;
  margin-top: 1rem;
}

.error-text {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 1rem;
  text-align: center;
}

/* Success Toast */
.success-toast {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #10b981;
  color: white;
  padding: 1rem 2rem;
  border-radius: 3rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 25px rgb(16 185 129 / 40%);
  z-index: 2000;
  animation: toastIn 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.hidden {
  display: none !important;
}

footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 2rem 0;
}

/* Responsive */
.preview-section.detailed-view {
  max-width: 100%;
  border-radius: 0;
  border-left: none;
  border-right: none;
}

.preview-section.detailed-view .table-wrapper {
  max-height: 70vh;
}

.preview-section.detailed-view table {
  font-size: 0.8rem;
}

.history-section {
  padding: 2rem;
  margin-bottom: 3rem;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: 0.75rem;
  transition: all 0.2s;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 5%);
}

.history-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.history-item .item-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.history-item .item-meta {
  display: flex;
  flex-direction: column;
}

.history-item .item-tag {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.3rem;
  background: var(--primary);
  color: white;
  font-weight: 600;
  margin-bottom: 0.2rem;
  width: fit-content;
}

.history-item .item-name {
  font-weight: 500;
}

.history-item .item-date {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Modal */
.modal-card {
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  background: white; /* Make the payslip area white for realism */
  color: #1f2937;
  margin: 1.5rem;
  border-radius: 0.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--glass-border);
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

/* Payslip Preview Style */
.preview-payslip {
  font-family: Inter, sans-serif;
}

.preview-payslip header {
  background: var(--primary);
  color: white;
  padding: 2rem;
  margin: -2rem -2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.preview-payslip h2 {
  margin: 0;
  font-size: 1.5rem;
}
.preview-payslip .company-info {
  text-align: right;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.info-item {
  display: flex;
  gap: 0.5rem;
  font-size: 0.9rem;
}
.info-item label {
  font-weight: 700;
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}

.preview-table th {
  background: #f3f4f6;
  color: #374151;
  padding: 0.75rem;
  text-align: left;
  border-bottom: 2px solid #e5e7eb;
}

.preview-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.85rem;
}

/* Action Buttons */
.eye-btn {
  color: var(--primary) !important;
}

.eye-btn:hover {
  background: rgb(59 130 246 / 10%) !important;
}

/* Role Selector Tabs */
.role-selector {
  display: flex;
  background: #f1f5f9;
  padding: 0.25rem;
  border-radius: 0.75rem;
  margin-bottom: 2rem;
  border: 1px solid #e2e8f0;
}

.role-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.role-tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 10%);
}

/* Rider Portal Stats */
.rider-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: left;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 5%);
}

.stat-card .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  font-family: Outfit, sans-serif;
}

.stat-card.earnings {
  border-left: 4px solid var(--success);
}
.stat-card.deductions {
  border-left: 4px solid #ef4444;
}
.stat-card.net {
  border-left: 4px solid var(--primary);
}

/* Document Upload Fields */
.upload-box {
  cursor: pointer;
  text-align: left;
}

.upload-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 0.75rem;
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  transition: all 0.2s;
  overflow: hidden;
  position: relative;
}

.upload-dropzone:hover {
  border-color: var(--primary);
  background: rgb(37 99 235 / 2%);
}

.upload-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
}

.upload-label {
  margin-top: 0.25rem;
  font-weight: 500;
}

/* Nav Link Active Indicator */
#admin-nav-tabs .nav-btn.active {
  border-color: var(--primary);
  background: rgb(37 99 235 / 5%);
  font-weight: 600;
}

/* Card Guidelines Overlay inside dropzone */
.card-guide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0.35;
  transition: opacity 0.2s;
  z-index: 2;
}

.upload-dropzone:hover .card-guide-overlay {
  opacity: 0.65;
}

/* Hide guideline card overlay when preview image is visible */
.upload-dropzone:has(img:not(.hidden)) .card-guide-overlay {
  display: none;
}

.card-outline {
  width: 80%;
  height: 70%;
  border: 1.5px dashed var(--primary);
  border-radius: 0.5rem;
  position: relative;
  box-sizing: border-box;
}

.card-chip {
  width: 14px;
  height: 10px;
  background: #cbd5e1;
  border-radius: 2px;
  position: absolute;
  top: 15%;
  left: 10%;
}

.card-photo-placeholder {
  width: 18px;
  height: 22px;
  border: 1.5px solid #cbd5e1;
  position: absolute;
  bottom: 15%;
  right: 10%;
  border-radius: 2px;
}

/* Camera Guideline frames */
.camera-guideline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* Pulsing and glow for instruction banner */
#camera-instruction-banner {
  animation: bannerPulse 2s infinite ease-in-out;
}

@keyframes bannerPulse {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 4px 12px rgb(37 99 235 / 30%);
  }

  50% {
    transform: translateX(-50%) scale(1.03);
    box-shadow: 0 6px 18px rgb(37 99 235 / 60%);
    background: #1d4ed8;
  }
} /* Card Guidelines Outline Styles */
.camera-card-box {
  width: 85%;
  height: 60%;
  border: 3.5px dashed rgb(255 255 255 / 70%);
  border-radius: 12px;
  margin: auto;
  position: absolute;
  inset: 0;
  box-shadow: 0 0 0 9999px rgb(0 0 0 / 55%);
  transition: all 0.3s ease;
}

/* Turns green when aligned / captured successfully */
.camera-card-box.success {
  border-color: #10b981 !important;
  border-style: solid !important;
  box-shadow:
    0 0 25px rgb(16 185 129 / 65%),
    0 0 0 9999px rgb(0 0 0 / 45%) !important;
}

.camera-card-chip {
  width: 32px;
  height: 24px;
  border: 2px solid rgb(255 255 255 / 45%);
  border-radius: 4px;
  position: absolute;
  top: 30%;
  left: 8%;
  transition: all 0.3s ease;
}

.camera-card-box.success .camera-card-chip {
  border-color: #10b981;
  background: rgb(16 185 129 / 15%);
}

.camera-card-photo {
  width: 48px;
  height: 60px;
  border: 2px solid rgb(255 255 255 / 45%);
  border-radius: 4px;
  position: absolute;
  bottom: 12%;
  right: 8%;
  transition: all 0.3s ease;
}

.camera-card-box.success .camera-card-photo {
  border-color: #10b981;
  background: rgb(16 185 129 / 15%);
}

.camera-selfie-oval {
  width: 200px;
  height: 240px;
  border: 3.5px dashed rgb(255 255 255 / 70%);
  border-radius: 50%;
  margin: auto;
  position: absolute;
  inset: 0;
  box-shadow: 0 0 0 9999px rgb(0 0 0 / 55%);
  transition: all 0.3s ease;
}

.camera-selfie-oval.success {
  border-color: #10b981 !important;
  border-style: solid !important;
  box-shadow:
    0 0 25px rgb(16 185 129 / 65%),
    0 0 0 9999px rgb(0 0 0 / 45%) !important;
}

/* Detailed card guide layouts */
.camera-card-header-bar {
  position: absolute;
  top: 6%;
  left: 5%;
  right: 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgb(255 255 255 / 25%);
  padding-bottom: 2px;
}

.camera-card-box.success .camera-card-header-bar {
  border-color: rgb(16 185 129 / 30%);
}

.uae-text-guide {
  font-size: 7px;
  font-weight: 700;
  color: rgb(255 255 255 / 50%);
  letter-spacing: 0.5px;
}

.camera-card-box.success .uae-text-guide {
  color: rgb(16 185 129 / 80%);
}

.uae-crest-guide {
  width: 10px;
  height: 10px;
  background: rgb(255 255 255 / 30%);
  border-radius: 50%;
}

.camera-card-box.success .uae-crest-guide {
  background: rgb(16 185 129 / 60%);
}

.camera-card-lines {
  position: absolute;
  bottom: 12%;
  left: 8%;
  width: 50%;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.line-sm {
  width: 30%;
  height: 2px;
  background: rgb(255 255 255 / 30%);
}
.line-md {
  width: 70%;
  height: 2px;
  background: rgb(255 255 255 / 30%);
}
.line-lg {
  width: 90%;
  height: 2px;
  background: rgb(255 255 255 / 30%);
}

.camera-card-box.success .line-sm,
.camera-card-box.success .line-md,
.camera-card-box.success .line-lg {
  background: rgb(16 185 129 / 50%);
}

/* ID Back side components */
.camera-card-magstrip {
  position: absolute;
  top: 15%;
  left: 0;
  width: 100%;
  height: 25px;
  background: rgb(255 255 255 / 20%);
}

.camera-card-box.success .camera-card-magstrip {
  background: rgb(16 185 129 / 20%);
}

.camera-card-hologram {
  position: absolute;
  top: 50%;
  left: 10%;
  width: 30px;
  height: 30px;
  border: 2px solid rgb(255 255 255 / 40%);
  border-radius: 50%;
}

.camera-card-box.success .camera-card-hologram {
  border-color: #10b981;
  background: rgb(16 185 129 / 10%);
}

.camera-card-mrz {
  position: absolute;
  bottom: 8%;
  left: 5%;
  right: 5%;
  font-family: monospace;
  font-size: 6px;
  color: rgb(255 255 255 / 45%);
  letter-spacing: 1px;
  line-height: 1.2;
  text-align: center;
}

.camera-card-box.success .camera-card-mrz {
  color: rgb(16 185 129 / 70%);
}

/* Responsive Styles */
@media (width <= 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (width <= 768px) {
  nav .logo {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
  }

  #admin-nav-tabs {
    margin-left: 0 !important;
    width: 100%;
    justify-content: center;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  nav .logout-btn {
    margin-left: 0 !important;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .preview-section {
    padding: 1.5rem;
  }

  .flex-row-mobile-stack {
    flex-direction: column;
    gap: 1rem;
  }

  .overlay-content {
    width: 95%;
    max-height: 95vh;
    overflow-y: auto;
    padding: 1.5rem;
  }

  /* Web camera on mobile */
  .camera-container {
    width: 100%;
    height: auto;
    max-width: 320px;
  }

  .camera-card-box {
    width: 280px;
    height: 180px;
  }

  .camera-selfie-oval {
    width: 180px;
    height: 240px;
  }
}

@media (width <= 480px) {
  .hero-section h1 {
    font-size: 1.75rem;
  }

  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .card-grid {
    grid-template-columns: 1fr !important;
  }

  .nav-btn span {
    display: none; /* Hide tab label text, show only icons on very small screens */
  }

  .nav-btn i {
    margin-right: 0 !important;
  }
}

/* Global Security Protections */
body {
  user-select: none;
  user-select: none;
  user-select: none;
  user-select: none;
}

img {
  -webkit-user-drag: none;
}

input,
textarea {
  user-select: text !important;
  user-select: text !important;
  user-select: text !important;
  user-select: text !important;
}

/* Request Dropdown & Animations */
.dropdown button:hover {
  background-color: rgb(255 255 255 / 10%);
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgb(16 185 129 / 40%);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgb(16 185 129 / 0%);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgb(16 185 129 / 0%);
  }
}

/* Spinner */
.spinner {
  border: 4px solid rgb(255 255 255 / 10%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border-left-color: var(--primary);
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Status Colors & Animations */
.status-pending {
  color: #ffbf00;
  font-weight: bold;
  animation: blinker 1.5s linear infinite;
}
.status-approved {
  color: #0f0;
  font-weight: bold;
}
.status-rejected {
  color: #f00;
  font-weight: bold;
}

@keyframes blinker {
  50% {
    opacity: 0;
  }
}

.hover-glow:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgb(59 130 246 / 20%);
  border-color: rgb(59 130 246 / 30%) !important;
}
.hover-glow:hover div {
  transform: scale(1.1);
}

#admin-nav-tabs::-webkit-scrollbar {
  height: 6px;
}
#admin-nav-tabs::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}
#admin-nav-tabs::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}
#admin-nav-tabs {
  -ms-overflow-style: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.05);
}
