:root {
  --bg-dark: #0a0e1a;
  --bg-card: rgba(18, 26, 44, 0.75);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.3);
  --primary-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --accent-purple: #7f53ac;
  --accent-pink: #647eee;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --radius-lg: 16px;
  --radius-md: 10px;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

.hidden { display: none !important; }
.mt-20 { margin-top: 20px; }

/* GLASSMORPHISM CARD */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* LOGIN SCREEN */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background: radial-gradient(circle at 50% 30%, #1a2542 0%, #0a0e1a 70%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px;
}

.brand-header {
  text-align: center;
  margin-bottom: 30px;
}

.brand-logo {
  font-size: 3rem;
  margin-bottom: 10px;
}

.brand-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* FORMS & INPUTS */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(10, 14, 26, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: #00f2fe;
  box-shadow: 0 0 12px var(--border-glow);
}

/* BUTTONS */
.btn {
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #000;
  font-weight: 700;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-block { width: 100%; }

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: 6px;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.4);
}

.btn-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
  background: rgba(245, 158, 11, 0.4);
}

/* DASHBOARD LAYOUT */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 260px;
  background: rgba(12, 18, 32, 0.95);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 16px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.logo-icon { font-size: 2rem; }

.brand-titles h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.badge-tech {
  font-size: 0.7rem;
  padding: 2px 8px;
  background: rgba(0, 242, 254, 0.15);
  color: #00f2fe;
  border-radius: 20px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.nav-item:hover, .nav-item.active {
  background: rgba(0, 242, 254, 0.1);
  color: #00f2fe;
}

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

.admin-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.btn-logout {
  width: 100%;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* MAIN CONTENT */
.main-content {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success-color);
  box-shadow: 0 0 10px var(--success-color);
}

/* METRICS GRID */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.metric-card {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.metric-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.metric-icon.cyan { background: rgba(0, 242, 254, 0.15); color: #00f2fe; }
.metric-icon.green { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.metric-icon.purple { background: rgba(127, 83, 172, 0.15); color: #a78bfa; }
.metric-icon.orange { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.metric-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
}

.metric-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* DATA TABLES */
.table-card {
  padding: 24px;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 14px 16px;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
}

.data-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* BADGES DE ESTADO */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-active { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-banned { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-credit { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.badge-annual { background: rgba(168, 85, 247, 0.2); color: #c084fc; }

/* MODAL */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-card {
  width: 90%;
  max-width: 500px;
  padding: 30px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.alert-error {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-top: 12px;
}

.code-banner {
  background: #000;
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 10px;
  border: 1px solid var(--border-glow);
}

.code-banner code {
  color: #00f2fe;
  font-family: monospace;
  font-size: 0.95rem;
}
