/* ================================
   LA COPA - Admin/Dashboard CSS
   Shared across superadmin, client dashboard, and polla admin
   ================================ */

:root {
    --green-900: #0a1f12;
    --green-800: #0d2818;
    --green-700: #1a472a;
    --green-600: #2d6a3f;
    --green-500: #3d8b56;
    --green-400: #4caf50;
    --gold: #f5a623;
    --gold-light: #ffd54f;
    --gold-dark: #c68400;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --red: #ef4444;
    --blue: #3b82f6;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body { font-family: 'Inter', -apple-system, sans-serif; background: var(--gray-50); color: var(--gray-800); line-height: 1.5; }

/* Auth pages */
.auth-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(150deg, var(--green-900), var(--green-800));
    padding: 24px;
}
.auth-card {
    background: var(--white); border-radius: 16px; padding: 40px;
    width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.auth-card__logo {
    text-align: center; margin-bottom: 32px;
    font-family: 'Bebas Neue', sans-serif; font-size: 2rem; color: var(--green-700);
    letter-spacing: 2px;
}
.auth-card__title { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.auth-card__subtitle { color: var(--gray-500); font-size: 0.9rem; margin-bottom: 28px; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: 0.85rem; color: var(--gray-700); margin-bottom: 6px; }
.form-control {
    width: 100%; padding: 12px 16px; border: 2px solid var(--gray-200);
    border-radius: 10px; font-size: 0.95rem; transition: var(--transition);
    background: var(--white); color: var(--gray-800);
}
.form-control:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(61,139,86,0.15); }
.form-control::placeholder { color: var(--gray-400); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: 10px; font-weight: 600; font-size: 0.95rem;
    text-decoration: none; border: none; cursor: pointer; transition: var(--transition);
}
.btn--primary { background: var(--green-700); color: var(--white); }
.btn--primary:hover { background: var(--green-600); }
.btn--gold { background: var(--gold); color: var(--green-900); }
.btn--gold:hover { background: var(--gold-light); }
.btn--danger { background: var(--red); color: var(--white); }
.btn--outline { border: 2px solid var(--gray-300); color: var(--gray-700); background: transparent; }
.btn--outline:hover { border-color: var(--green-500); color: var(--green-600); }
.btn--sm { padding: 8px 16px; font-size: 0.85rem; }
.btn--full { width: 100%; }
.btn--block { display: flex; width: 100%; }

/* Alert */
.alert {
    padding: 14px 18px; border-radius: 10px; margin-bottom: 20px;
    font-size: 0.9rem; font-weight: 500;
}
.alert--error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert--success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert--info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* Dashboard layout */
.dash { display: flex; min-height: 100vh; }
.dash__sidebar {
    width: 260px; background: var(--green-900); color: var(--white);
    padding: 24px 0; position: fixed; top: 0; bottom: 0; left: 0;
    overflow-y: auto; z-index: 100;
}
.dash__sidebar-logo {
    padding: 0 24px 24px; font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem; color: var(--gold); letter-spacing: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.dash__nav { padding: 16px 0; }
.dash__nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 24px; color: rgba(255,255,255,0.7);
    text-decoration: none; font-size: 0.9rem; font-weight: 500;
    transition: var(--transition);
}
.dash__nav a:hover, .dash__nav a.active {
    color: var(--gold); background: rgba(245,166,35,0.1);
}
.dash__nav-section { padding: 8px 24px 4px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.3); margin-top: 12px; }
.dash__content { margin-left: 260px; flex: 1; padding: 32px; min-height: 100vh; }
.dash__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.dash__title { font-size: 1.5rem; font-weight: 800; }
.dash__subtitle { color: var(--gray-500); font-size: 0.9rem; }

/* Cards */
.card {
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--gray-200); padding: 24px;
    margin-bottom: 24px;
}
.card__title { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }
.card--stat {
    display: flex; align-items: center; gap: 16px; padding: 20px 24px;
}
.card--stat .stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}
.card--stat .stat-value { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.card--stat .stat-label { font-size: 0.8rem; color: var(--gray-500); margin-top: 2px; }

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

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table th { text-align: left; padding: 12px 16px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-500); border-bottom: 2px solid var(--gray-200); }
table td { padding: 12px 16px; font-size: 0.9rem; border-bottom: 1px solid var(--gray-100); }
table tr:hover td { background: var(--gray-50); }

/* Badge */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 50px;
    font-size: 0.75rem; font-weight: 600;
}
.badge--green { background: #dcfce7; color: #166534; }
.badge--red { background: #fef2f2; color: #991b1b; }
.badge--yellow { background: #fef9c3; color: #854d0e; }
.badge--blue { background: #dbeafe; color: #1e40af; }
.badge--gray { background: var(--gray-100); color: var(--gray-600); }

/* Grid */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Color picker */
.color-picker-group { display: flex; align-items: center; gap: 12px; }
.color-picker-group input[type="color"] { width: 48px; height: 40px; border: 2px solid var(--gray-200); border-radius: 8px; cursor: pointer; padding: 2px; }

/* Link styles */
.link { color: var(--green-600); text-decoration: none; font-weight: 500; }
.link:hover { color: var(--green-700); text-decoration: underline; }

/* Password toggle */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--gray-400); padding: 4px; display: flex; align-items: center; }
.pw-toggle:hover { color: var(--gray-600); }
.pw-toggle svg { width: 20px; height: 20px; }

/* Responsive */
@media (max-width: 768px) {
    .dash__sidebar { display: none; }
    .dash__content { margin-left: 0; padding: 16px; }
    .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
