:root {
    --primary: #38bdf8;
    --primary-hover: #0ea5e9;
    --secondary: #475569;
    --accent: #fbbf24;
    --bg: #0f172a;
    --text: #f8fafc;
    --card-bg: #1e293b;
    --border: #334155;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
}

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

.main-header {
    background-color: #1e3a8a;
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.main-header h1 { margin: 0; font-weight: 800; }

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

.form-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}
.form-group label { font-weight: 600; margin-bottom: 0.5rem; }
.form-group input[type="text"] {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}
.form-group label {
    display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-weight: 400;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--secondary); color: white; }
.btn-accent { background: var(--accent); color: white; }
.btn-gradient {
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
}
.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.6);
}

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border); }

.badge { padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.875rem; font-weight: 600; }
.badge-creado { background: #334155; color: #cbd5e1; }
.badge-en_curso { background: #166534; color: #dcfce7; }
.badge-finalizado { background: #7f1d1d; color: #fca5a5; }
.badge-pendiente { background: #78350f; color: #fde68a; }
.badge-en_juego { background: #1e3a8a; color: #bfdbfe; }
.badge-entregado { background: #14532d; color: #bbf7d0; }

.header-flex { display: flex; justify-content: space-between; align-items: center; }

/* Panel Operador */
.panel-layout { display: flex; gap: 1rem; }
.panel-sidebar { width: 220px; flex-shrink: 0; background: var(--card-bg); padding: 1rem; border-radius: 12px; border: 1px solid var(--border); }
.panel-main { flex-grow: 1; background: var(--card-bg); padding: 1rem; border-radius: 12px; border: 1px solid var(--border); }

.numero-gigante {
    font-size: 3.5rem;
    font-weight: 900;
    text-align: center;
    background: #0f172a;
    border-radius: 12px;
    padding: 1rem;
    color: var(--primary);
}

.tablero-bingo { display: flex; flex-direction: column; gap: 0.5rem; }
.tablero-fila { display: flex; align-items: center; gap: 1rem; }
.letra-bingo { font-size: 1.5rem; font-weight: 800; color: var(--primary); width: 30px; text-align: center; }
.numeros-fila { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.bolilla {
    width: 38px; height: 38px; border-radius: 50%;
    background: #334155; color: #94a3b8;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem; transition: all 0.2s;
}
.bolilla.cantada {
    background: var(--primary);
    color: white;
    transform: scale(1.15);
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.4);
}

/* Custom Pattern Creator */
.custom-pattern-wrapper {
    display: flex; gap: 20px; align-items: flex-start; margin-top: 10px;
}
.grid-creator {
    display: grid;
    grid-template-columns: repeat(5, 40px);
    grid-template-rows: repeat(5, 40px);
    gap: 5px;
    background: #334155;
    padding: 10px;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}
.grid-cell {
    background: #0f172a; border-radius: 4px; cursor: pointer; transition: 0.2s;
    border: 2px solid transparent;
}
.grid-cell:hover { border-color: var(--primary); }
.grid-cell.selected { background: var(--primary); box-shadow: 0 0 10px rgba(59,130,246,0.5); }
.grid-cell.free-cell {
    background: #475569; cursor: not-allowed; display: flex; align-items: center; justify-content: center;
    font-weight: bold; color: white;
}
.custom-pattern-controls { flex: 1; display: flex; flex-direction: column; gap: 10px; }

/* Dashboard Layout AdminLTE-style */
body.dashboard-layout { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
    width: 180px;
    background-color: #0f172a;
    color: white;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    transition: 0.3s;
}
.sidebar-header {
    padding: 20px;
    background: #1e293b;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
}
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}
.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #cbd5e1;
    gap: 10px;
    transition: 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sidebar-menu li a:hover, .sidebar-menu li a.active {
    background-color: var(--card-bg);
    color: white;
    border-left: 4px solid var(--primary);
}
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0b1121;
}
.topbar {
    height: 60px;
    background: #1e293b;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}
.badge-plan {
    padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: bold;
}
.badge-plan.premium { background: var(--accent); color: #000; }
.badge-plan.free { background: var(--secondary); color: #fff; }
