/* v2-deploy-1784147432 */
/* ═══════════════════════════════════════════
   NEXMI SPA — Design System & Styles
   ═══════════════════════════════════════════ */

/* ─── CSS Variables ─── */
:root {
  --bg-primary: #080b0d;
  --bg-surface: #0f1414;
  --bg-surface-hover: #141a1a;
  --bg-elevated: #1a2121;
  --border: #1f2d2d;
  --border-focus: #2DD4A8;
  --primary: #2DD4A8;
  --primary-hover: #34E5B5;
  --primary-dim: rgba(45,212,168,0.12);
  --text-primary: #f3f4f6;
  --text-secondary: #9aa3ad;
  --text-muted: #5c646d;
  --success: #22c55e;
  --success-dim: rgba(34,197,94,0.12);
  --error: #ef4444;
  --error-dim: rgba(239,68,68,0.12);
  --warning: #f59e0b;
  --warning-dim: rgba(245,158,11,0.12);
  --info: #3b82f6;
  --info-dim: rgba(59,130,246,0.12);

  --sidebar-width: 260px;
  --header-height: 64px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  color: inherit;
}

a {
  color: var(--primary);
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ─── Utility Classes ─── */
.hidden { display: none !important; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

/* ─── Icons ─── */
.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════════ */

.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  z-index: 1000;
  overflow-y: auto;
  text-align: center;
}

.login-screen::before {
  content: "";
  display: inline-block;
  height: 100%;
  vertical-align: middle;
}

.login-card {
  display: inline-block;
  vertical-align: middle;
  text-align: left;
}

.login-card {
  width: 90%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  animation: fadeInUp 0.6s ease;
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.login-logo img {
  height: 64px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.login-subtitle {
  font-size: 0.875rem;
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.login-step {
  animation: fadeInUp 0.4s ease;
}

.login-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 1.5rem;
}

/* ─── OTP Inputs ─── */
.otp-container {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.otp-input {
  width: 48px;
  height: 56px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.otp-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

.otp-info {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  background: var(--primary-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
  text-align: center;
  letter-spacing: 0.25em;
}

/* ═══════════════════════════════════════════
   APP PLATFORM LAYOUT
   ═══════════════════════════════════════════ */

#app-platform {
  display: flex;
  min-height: 100vh;
  background: var(--bg-primary);
}

/* ─── Sidebar ─── */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition-slow);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo-img {
  height: 28px;
  width: auto;
}

.sidebar-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.sidebar-close {
  display: none;
  margin-left: auto;
  padding: 0.25rem;
  color: var(--text-secondary);
}

.sidebar-close svg {
  width: 20px;
  height: 20px;
}

.sidebar-nav {
  flex: 1;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  border: none;
  position: relative;
  cursor: pointer;
  width: 100%;
}

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

.nav-item.active {
  background: var(--primary-dim);
  color: var(--primary);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

/* ─── Mobile Sidebar Toggle ─── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* ─── Main Area ─── */
.main-area {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── Header ─── */
.header {
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.header-menu-btn {
  display: none;
  padding: 0.5rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}

.header-menu-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.header-menu-btn svg {
  width: 20px;
  height: 20px;
}

.header-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-dim);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
}

.user-details {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.user-email {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* ─── Content ─── */
.content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.page {
  animation: fadeIn 0.3s ease;
}

/* ─── Footer ─── */
.app-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-dim);
}

.btn-primary {
  background: var(--primary);
  color: #080b0d;
  border-color: var(--primary);
}

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

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-outline:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.btn-link {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.5rem;
}

.btn-link:hover {
  color: var(--primary);
}

.btn-logout {
  background: var(--error-dim);
  color: var(--error);
  border-color: rgba(239,68,68,0.2);
}

.btn-logout:hover {
  background: rgba(239,68,68,0.2);
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

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

/* ═══════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════ */

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

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

.form-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

.form-select {
  width: 100%;
  padding: 0.625rem 2rem 0.625rem 0.875rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-primary);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235c646d' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

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

/* ═══════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════ */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition-fast);
}

.card:hover {
  border-color: #2a3a3a;
}

/* ═══════════════════════════════════════════
   UPLOAD SECTION
   ═══════════════════════════════════════════ */

.upload-section {
  margin-bottom: 1.5rem;
}

.upload-card {
  background: var(--bg-surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
}

.upload-card:hover {
  border-color: var(--primary);
  background: var(--primary-dim);
}

.upload-card.drag-over {
  border-color: var(--primary);
  background: var(--primary-dim);
  transform: scale(1.01);
}

.upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  color: var(--primary);
}

.upload-icon svg {
  width: 100%;
  height: 100%;
}

.upload-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.upload-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* ─── Progress Bar ─── */
.upload-progress {
  display: none;
  margin-top: 1.25rem;
  width: 100%;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
}

.upload-progress.active {
  display: block;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.upload-status {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  min-height: 1.25rem;
}

/* ═══════════════════════════════════════════
   STATS GRID
   ═══════════════════════════════════════════ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stats-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color var(--transition-fast);
}

.stat-card:hover {
  border-color: #2a3a3a;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 22px;
  height: 22px;
}

.stat-icon-info {
  background: var(--info-dim);
  color: var(--info);
}

.stat-icon-success {
  background: var(--success-dim);
  color: var(--success);
}

.stat-icon-warning {
  background: var(--warning-dim);
  color: var(--warning);
}

.stat-icon-error {
  background: var(--error-dim);
  color: var(--error);
}

.stat-icon-primary {
  background: var(--primary-dim);
  color: var(--primary);
}

.stat-info {
  flex: 1;
  min-width: 0;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-suffix {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.125rem;
}

/* ═══════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════ */

.table-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

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

.table-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

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

.data-table thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table tbody td {
  padding: 0.875rem 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: var(--bg-surface-hover);
}

.data-table .cell-filename {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  color: var(--text-primary);
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.badge-concluido {
  background: var(--success-dim);
  color: var(--success);
}

.badge-enviado {
  background: var(--info-dim);
  color: var(--info);
}

.badge-processando {
  background: var(--warning-dim);
  color: var(--warning);
}

.badge-erro {
  background: var(--error-dim);
  color: var(--error);
}

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

/* ═══════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pagination-info {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-numbers {
  display: flex;
  gap: 0.25rem;
}

.page-number {
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.page-number:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.page-number.active {
  background: var(--primary);
  color: #080b0d;
  border-color: var(--primary);
}

/* ═══════════════════════════════════════════
   PAGE HEADER
   ═══════════════════════════════════════════ */

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

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════
   FILTERS BAR
   ═══════════════════════════════════════════ */

.filters-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.filters-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  position: relative;
  min-width: 160px;
}

.filter-group:has(.form-input) {
  flex: 1;
  max-width: 320px;
  min-width: 200px;
}

.filter-icon {
  position: absolute;
  left: 0.75rem;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
}

.filter-group .form-input {
  padding-left: 2.25rem;
}

/* ═══════════════════════════════════════════
   TOAST SYSTEM
   ═══════════════════════════════════════════ */

#toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.35s ease;
  max-width: 400px;
  min-width: 280px;
}

.toast-success {
  background: #132e1e;
  border: 1px solid rgba(34,197,94,0.3);
  color: var(--success);
}

.toast-error {
  background: #2e1515;
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--error);
}

.toast-warning {
  background: #2e2110;
  border: 1px solid rgba(245,158,11,0.3);
  color: var(--warning);
}

.toast-info {
  background: #151e2e;
  border: 1px solid rgba(59,130,246,0.3);
  color: var(--info);
}

.toast-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.toast-close {
  margin-left: auto;
  padding: 0.125rem;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
  cursor: pointer;
}

.toast-close:hover {
  opacity: 1;
}

/* ═══════════════════════════════════════════
   PLACEHOLDER PAGE
   ═══════════════════════════════════════════ */

.placeholder-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  min-height: 50vh;
}

.placeholder-icon {
  width: 80px;
  height: 80px;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.placeholder-icon svg {
  width: 100%;
  height: 100%;
}

.placeholder-page h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.placeholder-page p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 400px;
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

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

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: #2a3a3a;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3a4a4a;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
  :root {
    --sidebar-width: 260px;
  }

  .sidebar {
    transform: translateX(-100%);
  }

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

  .sidebar-close {
    display: block;
  }

  .main-area {
    margin-left: 0;
  }

  .header-menu-btn {
    display: block;
  }

  .header-title {
    font-size: 1rem;
  }

  .user-details {
    display: none;
  }

  .content {
    padding: 1rem;
  }

  .login-card {
    padding: 1.5rem;
  }

  .otp-input {
    width: 40px;
    height: 48px;
    font-size: 1.25rem;
  }

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

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

  .filters-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group,
  .filter-group:has(.form-input) {
    max-width: 100%;
    min-width: auto;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .stat-value {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 1.25rem;
  }

  .otp-container {
    gap: 0.5rem;
  }

  .otp-input {
    width: 36px;
    height: 44px;
    font-size: 1.125rem;
  }

  .stats-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
