/* Bot Panel v2.5 - Glassmorphism Theme */

:root,
[data-theme="dark"] {
  /* Primary Colors - Vibrant Gradient */
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --primary-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --accent-gradient: linear-gradient(135deg, #06b6d4, #3b82f6);

  /* Background Colors - Glassmorphism */
  --bg-dark: #0f172a;
  --bg-sidebar: rgba(30, 41, 59, 0.95);
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-solid: #1e293b;
  --bg-card-hover: rgba(51, 65, 85, 0.8);
  --bg-input: rgba(15, 23, 42, 0.8);
  --bg-body: #0f172a;

  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-main: #f8fafc;

  /* Status Colors */
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.15);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.15);

  /* Border & Shadow - Enhanced */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(255, 255, 255, 0.12);
  --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 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Glassmorphism */
  --glass-blur: blur(12px);
  --glass-bg: rgba(30, 41, 59, 0.7);
}

/* Light Theme */
[data-theme="light"] {
  --bg-dark: #f1f5f9;
  --bg-sidebar: rgba(255, 255, 255, 0.95);
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-card-solid: #ffffff;
  --bg-card-hover: rgba(241, 245, 249, 0.9);
  --bg-input: rgba(241, 245, 249, 0.9);
  --bg-body: #f1f5f9;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-main: #1e293b;

  --border-color: rgba(0, 0, 0, 0.08);
  --border-glass: rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.08);

  --glass-bg: rgba(255, 255, 255, 0.7);
}

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

html {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Sticky Footer Layout */
.topbar {
  flex-shrink: 0;
}

.container {
  flex: 1 0 auto;
  min-height: calc(100vh - 50px - 120px);
  /* viewport - topbar - footer */
}

.footer {
  flex-shrink: 0;
  margin-top: auto !important;
}


/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

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

/* Premium Animations */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }

  100% {
    background-position: 1000px 0;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

@keyframes glowPulse {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  }

  50% {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.5);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes borderGlow {

  0%,
  100% {
    border-color: rgba(59, 130, 246, 0.3);
  }

  50% {
    border-color: rgba(139, 92, 246, 0.5);
  }
}

.animate-fade {
  animation: fadeIn 0.3s ease-out;
}

.animate-slide {
  animation: slideIn 0.3s ease-out;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-glow {
  animation: glowPulse 2s ease-in-out infinite;
}

/* ========== TOPBAR - COMPACT ========== */
.topbar {
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.topbar .wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 50px;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.topbar .brand-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.topbar .brand:hover .brand-icon {
  transform: scale(1.05);
}

.topbar .brand-icon svg {
  width: 16px;
  height: 16px;
  color: white;
}

.topbar .brand-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

/* NAVIGATION - COMPACT ICONS */
.topbar nav {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-wrap: wrap;
}

.topbar nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.topbar nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.topbar nav a.active {
  background: var(--primary);
  color: white;
}

.topbar nav a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Hide text on smaller screens */
@media (max-width: 1100px) {
  .topbar nav a span {
    display: none;
  }

  .topbar nav a {
    padding: 8px 10px;
  }
}

/* Theme Toggle Button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 4px;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.05);
  border-color: var(--primary);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.theme-toggle:hover svg {
  color: var(--primary-light);
}

/* Show/hide moon and sun based on theme */
[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

/* Logout Button */
.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0 !important;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  margin-left: 4px;
  transition: all 0.2s ease;
}

.logout-btn svg {
  color: var(--danger);
}

.logout-btn:hover {
  background: var(--danger);
  border-color: var(--danger);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.logout-btn:hover svg {
  color: white;
}


.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 16px;
  animation: fadeIn 0.3s ease-out;
}

/* ========== CARDS - Glassmorphism ========== */
.card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.card:hover {
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.3);
}

.card h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.card h2 svg {
  width: 20px;
  height: 20px;
  color: var(--primary-light);
}

.card h3 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* ========== STAT CARDS - Glassmorphism ========== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeIn 0.4s ease-out;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

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

.stat-card .icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.stat-card .icon.primary {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.stat-card .icon.success {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.stat-card .icon.warning {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

.stat-card .icon.danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.stat-card .icon.info {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.stat-card .content h4 {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.stat-card .content .value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-card .content .sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ========== GRIDS ========== */
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ========== QUICK ACTIONS ========== */
.quick-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.quick-action:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.quick-action svg {
  width: 16px;
  height: 16px;
}

/* ========== TABLES ========== */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.table thead {
  background: rgba(255, 255, 255, 0.02);
}

.table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.table tbody tr {
  transition: background 0.15s ease;
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

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

/* ========== FORMS ========== */
label {
  display: block;
  margin-bottom: 14px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

input,
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  margin-top: 6px;
  transition: all 0.15s ease;
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ========== BUTTONS ========== */
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

button:hover,
.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

button:active,
.btn:active {
  transform: translateY(0);
}

button svg,
.btn svg {
  width: 14px;
  height: 14px;
}

.btn.secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn.secondary:hover {
  background: var(--bg-card-hover);
  box-shadow: none;
}

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

.btn.success:hover {
  background: #16a34a;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn.danger {
  background: var(--danger);
}

.btn.danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn.warning {
  background: var(--warning);
  color: #000;
}

.btn.warning:hover {
  background: #d97706;
}

.btn.small {
  padding: 6px 12px;
  font-size: 11px;
}

/* ========== BADGES ========== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

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

.badge.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

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

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

.badge svg {
  width: 10px;
  height: 10px;
}

/* ========== ALERTS ========== */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 500;
  animation: fadeIn 0.2s ease-out;
}

.alert svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.alert.error,
.alert-danger {
  background: var(--danger-bg);
  color: #fca5a5;
  border-left: 3px solid var(--danger);
}

.alert.success,
.alert-success {
  background: var(--success-bg);
  color: #86efac;
  border-left: 3px solid var(--success);
}

.alert.warning,
.alert-warning {
  background: var(--warning-bg);
  color: #fcd34d;
  border-left: 3px solid var(--warning);
}

.alert.info {
  background: var(--info-bg);
  color: #93c5fd;
  border-left: 3px solid var(--info);
}

/* ========== CODE ========== */
code {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--primary-light);
}

/* ========== LOGIN PAGE ========== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.4s ease-out;
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
  animation: pulse 2s infinite;
}

.auth-logo svg {
  width: 28px;
  height: 28px;
  color: white;
}

.auth-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 12px;
}

.auth-form label {
  margin-bottom: 16px;
}

.auth-form input {
  padding: 12px 14px;
}

.auth-form button {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
}

.auth-footer {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.auth-footer p {
  color: var(--text-muted);
  font-size: 12px;
  margin: 0;
}

.auth-footer code {
  font-size: 10px;
}

/* ========== PAGINATION ========== */
.pagination {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 16px;
}

.pagination a,
.pagination span {
  padding: 6px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12px;
  transition: all 0.15s ease;
}

.pagination a:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pagination .current {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ========== FOOTER - SIMPLE ========== */
.footer {
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border-color);
  padding: 16px 0;
  margin-top: auto;
  flex-shrink: 0;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.footer-content .sep {
  opacity: 0.5;
}

.footer-content a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
}

.footer-content a:hover {
  color: var(--text-primary);
}

@media (max-width: 480px) {
  .footer-content {
    flex-direction: column;
    gap: 4px;
  }

  .footer-content .sep {
    display: none;
  }
}




/* Legacy */
.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 11px;
}

/* ========== UTILITIES ========== */
.text-center {
  text-align: center;
}

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

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

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

.mb-0 {
  margin-bottom: 0 !important;
}

.mt-20 {
  margin-top: 20px;
}

/* ========== CHART CONTAINER ========== */
.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  animation: fadeIn 0.3s ease-out;
}

.chart-container h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
}

/* ========== NOTIFICATION FORM ========== */
.notif-form textarea {
  min-height: 120px;
}

.target-options {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.target-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 10px 16px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all 0.15s ease;
  margin-bottom: 0;
}

.target-options label:hover {
  border-color: var(--primary);
}

.target-options input:checked+span {
  color: var(--primary-light);
  font-weight: 600;
}

.log-item {
  padding: 10px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 12px;
}

.log-item .time {
  color: var(--text-muted);
  font-size: 10px;
}

.log-item .status {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 9px;
  text-transform: uppercase;
}

.log-item .status.sent {
  background: var(--success-bg);
  color: var(--success);
}

.log-item .status.failed {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ========== FILTER ========== */
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-bar select {
  max-width: 180px;
  margin-top: 0;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-tabs a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.filter-tabs a svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
  transition: all 0.2s ease;
}

.filter-tabs a:hover {
  color: var(--text-primary);
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
}

.filter-tabs a:hover svg {
  opacity: 1;
  color: var(--primary-light);
}

.filter-tabs a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.filter-tabs a.active svg {
  opacity: 1;
  color: white;
}

/* ========== STAT BOX ========== */
.stat-box {
  background: var(--bg-input);
  padding: 14px;
  border-radius: var(--radius-md);
  text-align: center;
}

.stat-box .value {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-light);
}

.stat-box .label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.stat-box.warning .value {
  color: var(--warning);
}

.stat-box.success .value {
  color: var(--success);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.comment-text {
  max-width: 250px;
  font-size: 10px;
  color: var(--text-muted);
  word-break: break-word;
}

.match-select {
  max-width: 160px;
  font-size: 11px;
}

/* ========== STATUS GRID ========== */
.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.status-item {
  text-align: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all 0.15s ease;
}

.status-item:hover {
  transform: translateY(-2px);
}

.status-item .count {
  font-size: 20px;
  font-weight: 700;
}

.status-item .label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
}

.status-item.paid .count {
  color: var(--success);
}

.status-item.pending .count {
  color: var(--warning);
}

.status-item.error .count {
  color: var(--danger);
}

.status-item.cancelled .count {
  color: var(--text-muted);
}

/* ========== SPINNER ========== */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

@media (max-width: 900px) {

  .grid2,
  .grid3 {
    grid-template-columns: 1fr;
  }
}

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

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

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

  .topbar .wrap {
    padding: 0 12px;
  }

  .topbar nav a {
    padding: 6px 8px;
  }

  .topbar nav a svg {
    width: 14px;
    height: 14px;
  }

  .container {
    padding: 12px;
  }

  .card {
    padding: 14px;
  }

  .auth-card {
    padding: 20px;
    margin: 10px;
  }

  .quick-actions {
    flex-direction: column;
  }

  .quick-action {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .topbar .brand-text {
    display: none;
  }

  .stat-row {
    grid-template-columns: 1fr;
  }

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