/* =====================================================================
   FREEFIRE TOURNAMENT — Premium Modern Gaming Web App
   Mobile-First • Glassmorphism • Micro-interactions • Premium Design
   ===================================================================== */

:root {
  /* Primary Brand Colors */
  --primary: #ff6b00;
  --primary-dark: #e55a00;
  --primary-light: #ff8a2c;
  --accent-cyan: #00d9ff;
  --accent-purple: #7c4dff;
  --accent-pink: #ff3d71;

  /* Status Colors */
  --success: #00d84f;
  --warning: #ffa500;
  --danger: #ff3b5b;
  --info: #00d9ff;

  /* Light Premium Background */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #eef2f7;
  --bg-overlay: rgba(255, 255, 255, 0.7);

  /* Text Colors */
  --text-primary: #0f1419;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --text-inverse: #ffffff;

  /* Borders & Dividers */
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-dark: #94a3b8;
  --border-glass: rgba(255, 255, 255, 0.2);

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #ff6b00 0%, #ff3d71 100%);
  --grad-accent: linear-gradient(135deg, #7c4dff 0%, #00d9ff 100%);
  --grad-success: linear-gradient(135deg, #00d84f 0%, #00d9ff 100%);
  --grad-glass: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
  --grad-card: linear-gradient(135deg, rgba(255,107,0,0.08) 0%, rgba(124,77,255,0.04) 100%);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 20, 25, 0.05);
  --shadow-sm: 0 4px 12px rgba(15, 20, 25, 0.08);
  --shadow-md: 0 12px 24px rgba(15, 20, 25, 0.12);
  --shadow-lg: 0 20px 40px rgba(15, 20, 25, 0.16);
  --shadow-xl: 0 30px 60px rgba(15, 20, 25, 0.2);
  --glow-primary: 0 0 20px rgba(255, 107, 0, 0.3);
  --glow-success: 0 0 20px rgba(0, 216, 79, 0.3);

  /* Border Radius */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* Touch Target */
  --tap: 48px;

  /* Transitions */
  --trans-fast: 0.15s ease;
  --trans-base: 0.25s ease;
  --trans-slow: 0.35s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 800px 400px at 50% 0%, rgba(255, 107, 0, 0.08), transparent 70%),
    radial-gradient(ellipse 600px 400px at 100% 100%, rgba(124, 77, 255, 0.06), transparent 70%);
}

body > * {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
  border-radius: var(--radius-md);
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 20px;
  padding-top: calc(12px + env(safe-area-inset-top));
  box-shadow: var(--shadow-xs);
  transition: all var(--trans-base);
}

.navbar-brand {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.logo-badge {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: white;
  -webkit-text-fill-color: white;
  box-shadow: var(--glow-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-links a,
.nav-links button {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--trans-fast);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: rgba(255, 107, 0, 0.08);
}

.btn-logout {
  background: var(--grad-primary) !important;
  color: white !important;
  padding: 8px 16px !important;
  font-weight: 700 !important;
  box-shadow: var(--glow-primary) !important;
}

.btn-logout:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md) !important;
}

@media (max-width: 640px) {
  .navbar {
    padding: 10px 16px;
  }
  .nav-links a {
    padding: 6px 10px;
    font-size: 1rem;
  }
  .nav-links button {
    padding: 6px 12px;
  }
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .container {
    padding: 24px 16px 80px;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .page-header h1 {
    font-size: 1.4rem;
  }
}

/* ===== AUTH PAGE ===== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
}

.auth-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 107, 0, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(124, 77, 255, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 450px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 2;
}

.auth-top {
  background: var(--grad-primary);
  padding: 40px 24px 24px;
  text-align: center;
  color: white;
  position: relative;
}

.auth-top::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 20px;
  background: inherit;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  opacity: 0.15;
}

.auth-logo {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.auth-logo span {
  color: #ffea00;
}

.auth-subtitle {
  color: rgba(255, 255, 255, 0.9);
  margin-top: 8px;
  font-weight: 500;
  font-size: 0.95rem;
}

.auth-body {
  padding: 32px 24px 28px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--trans-base);
}

.auth-tab.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.form-control,
.form-control-file {
  width: 100%;
  padding: 14px 16px;
  min-height: var(--tap);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 16px;
  outline: none;
  transition: all var(--trans-fast);
}

.form-control::placeholder {
  color: var(--text-tertiary);
}

.form-control:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.1);
}

.form-control:disabled {
  background: var(--bg-tertiary);
  cursor: not-allowed;
  opacity: 0.6;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  cursor: pointer;
}

.form-control-file {
  padding: 12px;
}

.form-hint {
  color: var(--text-tertiary);
  font-size: 0.75rem;
  margin-top: 6px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  min-height: var(--tap);
  background: var(--grad-primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all var(--trans-fast);
  box-shadow: var(--glow-primary), var(--shadow-sm);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.2);
  opacity: 0;
  transition: opacity var(--trans-fast);
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

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

.btn-block {
  width: 100%;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  box-shadow: none;
}

.btn-outline:hover:not(:disabled) {
  background: rgba(255, 107, 0, 0.08);
}

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

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

.btn-ghost {
  background: transparent;
  box-shadow: none;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, #00b84d 100%);
  box-shadow: 0 0 20px rgba(0, 216, 79, 0.3), var(--shadow-sm);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #ff1744 100%);
  box-shadow: 0 0 20px rgba(255, 59, 91, 0.3), var(--shadow-sm);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
  min-height: 36px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
}

@media (max-width: 640px) {
  .btn {
    min-height: 44px;
  }
}

/* ===== GRID & CARDS ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--trans-base);
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 0;
}

.card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
  line-height: 1.3;
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 14px;
  flex: 1;
}

.card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.card-stat {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
}

.card-stat .l {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.card-stat .v {
  font-size: 0.95rem;
  font-weight: 800;
  margin-top: 4px;
  color: var(--text-primary);
}

.card-stat .v.prize {
  background: var(--grad-success);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card-ribbon {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: var(--primary);
  color: white;
  box-shadow: var(--glow-primary);
  text-transform: uppercase;
}

.card-ribbon.open {
  background: var(--success);
  box-shadow: 0 0 16px rgba(0, 216, 79, 0.4);
}

.card-progress {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.card-progress > span {
  display: block;
  height: 100%;
  background: var(--grad-primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* ===== DETAIL PAGE ===== */
.detail-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.detail-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

@media (min-width: 768px) {
  .detail-img {
    height: 360px;
  }
}

.detail-body {
  padding: 32px 24px;
}

.detail-title {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .detail-title {
    font-size: 2.2rem;
  }
}

.detail-desc {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.7;
}

.stats-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  transition: all var(--trans-fast);
}

.stat-box:hover {
  border-color: var(--primary);
  background: rgba(255, 107, 0, 0.04);
}

.stat-label {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 800;
  margin-top: 6px;
  color: var(--text-primary);
}

.section-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 24px 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

/* ===== PLAYER INPUT CARDS ===== */
.player-input-card {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  transition: all var(--trans-fast);
}

.player-input-card:focus-within {
  border-color: var(--primary);
  background: white;
}

.player-input-card.leader {
  border-color: var(--primary);
  background: rgba(255, 107, 0, 0.04);
}

.player-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

/* ===== ALERTS ===== */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid;
  margin: 12px 0;
}

.alert-info {
  background: rgba(0, 217, 255, 0.08);
  border-color: rgba(0, 217, 255, 0.3);
  color: #0284c7;
}

.alert-danger {
  background: rgba(255, 59, 91, 0.08);
  border-color: rgba(255, 59, 91, 0.3);
  color: #dc2626;
}

.alert-success {
  background: rgba(0, 216, 79, 0.08);
  border-color: rgba(0, 216, 79, 0.3);
  color: #16a34a;
}

.alert-warning {
  background: rgba(255, 165, 0, 0.08);
  border-color: rgba(255, 165, 0, 0.3);
  color: #d97706;
}

.alert a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

/* ===== BADGES ===== */
.badge,
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-pending,
.status-pending {
  background: rgba(255, 165, 0, 0.12);
  color: #b45309;
  border: 1px solid rgba(255, 165, 0, 0.3);
}

.badge-approved,
.status-approved {
  background: rgba(0, 216, 79, 0.12);
  color: #15803d;
  border: 1px solid rgba(0, 216, 79, 0.3);
}

.badge-rejected,
.status-rejected {
  background: rgba(255, 59, 91, 0.12);
  color: #991b1b;
  border: 1px solid rgba(255, 59, 91, 0.3);
}

.badge-completed,
.status-completed {
  background: rgba(124, 77, 255, 0.12);
  color: #6d28d9;
  border: 1px solid rgba(124, 77, 255, 0.3);
}

/* ===== HISTORY CARDS ===== */
.history-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  transition: all var(--trans-base);
}

.history-card:hover {
  border-color: var(--primary);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.history-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 1.4rem;
}

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

.history-title {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--text-primary);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.history-meta {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.history-meta b {
  color: var(--text-primary);
  font-weight: 700;
}

/* ===== PAYMENT CARD ===== */
.payment-card {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  box-shadow: var(--shadow-md);
}

.pay-amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--grad-primary);
  color: white;
  margin-bottom: 20px;
  box-shadow: var(--glow-primary), var(--shadow-md);
  font-weight: 800;
}

.pay-amount .v {
  font-size: 1.8rem;
}

.pay-info {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.pay-info div + div {
  margin-top: 8px;
}

.pay-info code {
  background: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
}

/* ===== ADMIN SECTION ===== */
.admin-section {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.admin-section-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
  min-width: 640px;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  text-align: left;
  padding: 14px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  border-bottom: 1px solid var(--border-light);
}

.data-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
  color: var(--text-secondary);
}

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

.data-table tr:hover td {
  background: var(--bg-secondary);
}

/* ===== EMPTY STATES & LOADING ===== */
.loading-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--text-tertiary);
  flex-direction: column;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(15, 20, 25, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: var(--radius-xl);
  border: 2px dashed var(--border-light);
}

.empty-icon {
  font-size: 3.6rem;
  margin-bottom: 12px;
  opacity: 0.7;
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ===== TOASTS ===== */
.toast-container {
  position: fixed;
  top: calc(20px + env(safe-area-inset-top));
  right: 20px;
  left: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 400px;
}

@media (max-width: 640px) {
  .toast-container {
    right: 12px;
    left: 12px;
  }
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: white;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  transform: translateY(-120%);
  opacity: 0;
  animation: slideDown 0.3s ease forwards;
  font-size: 0.9rem;
  font-weight: 600;
  border-left: 4px solid transparent;
}

@keyframes slideDown {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast-success {
  border-left-color: var(--success);
}

.toast-error {
  border-left-color: var(--danger);
}

.toast-info {
  border-left-color: var(--info);
}

.toast-warning {
  border-left-color: var(--warning);
}

.toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ===== UTILITIES ===== */
.hidden {
  display: none !important;
}

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

.text-primary {
  color: var(--primary);
}

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.text-secondary {
  color: var(--text-secondary);
}

.muted {
  color: var(--text-tertiary);
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.spacer {
  height: 16px;
}

.divider {
  height: 1px;
  background: var(--border-light);
  margin: 20px 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .card {
    border-radius: var(--radius-md);
  }

  .detail-body {
    padding: 20px 16px;
  }

  .admin-section {
    padding: 16px;
  }
}

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

.navbar {
  display: flex;
  flex-direction: column; /* brand upar, links niche */
  align-items: center;
  padding: 15px;
}

.navbar-top {
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
}

.nav-links {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}
