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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

body.with-sidebar {
    display: flex;
}

.sidebar {
    width: 250px;
    background: white;
    min-height: 100vh;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    background: #667eea;
    color: white;
    text-align: center;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 18px;
    color: white;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.sidebar-menu a:hover {
    background: #f3f4f6;
    border-left-color: #667eea;
}

.sidebar-menu a.active {
    background: #ede9fe;
    border-left-color: #667eea;
    color: #667eea;
    font-weight: 600;
}

.sidebar-menu a span {
    margin-right: 10px;
    font-size: 20px;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    border-top: 1px solid #e5e7eb;
}

.sidebar-footer button {
    width: 100%;
    padding: 12px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.sidebar-footer button:hover {
    background: #dc2626;
}

.main-content {
    margin-left: 250px;
    padding: 20px;
    width: calc(100% - 250px);
}

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
        width: calc(100% - 200px);
    }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

h1 {
    text-align: center;
    color: #1f2937;
    margin-bottom: 30px;
    font-size: 2em;
    text-shadow: none;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

h2 {
    color: #667eea;
    margin-bottom: 20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6b7280;
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #4b5563;
}

.rifa-item {
    background: #f9fafb;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.rifa-item h3 {
    color: #333;
    margin-bottom: 10px;
}

.rifa-stats {
    display: flex;
    gap: 15px;
    margin: 15px 0;
}

.stat {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.stat.disponible {
    background: #d1fae5;
    color: #065f46;
}

.stat.tomado {
    background: #fee2e2;
    color: #991b1b;
}

.rifa-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.btn-small.btn-danger {
    background: #ef4444;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-actions .btn-secondary {
    flex: 1;
}

.form-actions .btn-primary {
    flex: 1;
}

.empty {
    text-align: center;
    color: #999;
    padding: 40px;
}

.portada {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.numerosGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.numero-btn {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
}

.numero-btn.disponible {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.numero-btn.disponible:hover {
    transform: scale(1.05);
}

.numero-btn.seleccionado {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.numero-btn.tomado {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

.seleccion-info {
    background: #f0f9ff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

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

.stat-card {
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-card.disponible {
    background: #d1fae5;
}

.stat-card.tomado {
    background: #fee2e2;
}

.stat-card.por-pagar {
    background: #fef3c7;
}

.stat-card.pagado {
    background: #dbeafe;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge.por_pagar {
    background: #fef3c7;
    color: #92400e;
}

.badge.pagado {
    background: #d1fae5;
    color: #065f46;
}

table select {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
}

.login-info {
    margin-top: 20px;
    padding: 15px;
    background: #f0f9ff;
    border-radius: 8px;
    font-size: 14px;
}

.login-info p {
    margin: 5px 0;
}

.btn-logout {
    padding: 10px 20px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.valor-rifa {
    margin-top: 15px;
    padding: 15px;
    background: #f0fdf4;
    border-radius: 8px;
    font-size: 18px;
    text-align: center;
}

.valor-rifa span {
    color: #10b981;
    font-size: 24px;
    font-weight: bold;
}

.rifa-valor {
    color: #10b981;
    font-weight: bold;
    margin: 10px 0;
}
