
:root	{
	color-scheme: light;
	}

 html	{
	 background:#F0ECE9;
	}
/*
body	{
	background:#F0ECE9;
	color:#222;
	} */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f4f6;
    color: #222;
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.login-contenedor {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}

.login-card h1 {
    margin: 0;
    text-align: center;
    font-size: 30px;
}

.login-subtitulo {
    text-align: center;
    margin: 8px 0 24px;
    color: #666;
}

.form-grupo {
    margin-bottom: 16px;
}

.form-grupo label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.form-grupo input,
.form-grupo select,
.form-grupo textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cfd4dc;
    border-radius: 10px;
    font-size: 16px;
}

.form-grupo input:focus,
.form-grupo select:focus,
.form-grupo textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.btn {
    display: inline-block;
    border: 0;
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    text-align: center;
}

.btn-principal {
    background: #2563eb;
    color: #fff;
}

.btn-principal:hover {
    background: #1d4ed8;
}

.btn-ancho {
    width: 100%;
}

.alerta {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.alerta-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    color: #777;
}

.topbar {
    background: #111827;
    color: #fff;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar h1 {
    margin: 0;
    font-size: 24px;
}

.topbar p {
    margin: 4px 0 0;
    color: #d1d5db;
}

.contenedor {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.card {
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

.card_comision {
    background: #fff;
    border-radius: 16px;
    padding: 5px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

.grid-rifas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 20px;
}

.rifa-card h2 {
    margin: 0;
    font-size: 21px;
}

.rifa-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.badge {
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.estado-borrador {
    background: #e5e7eb;
    color: #374151;
}

.estado-activa {
    background: #dcfce7;
    color: #166534;
}

.estado-finalizada {
    background: #dbeafe;
    color: #1e40af;
}

.estado-cancelada {
    background: #fee2e2;
    color: #991b1b;
}

.resumen-numeros {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 18px 0;
}

.resumen-item {
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
}

.resumen-item strong {
    display: block;
    font-size: 22px;
}

.resumen-item span {
    font-size: 13px;
}

.resumen-item.libre {
    background: #dcfce7;
    color: #166534;
}

.resumen-item.reservado {
    background: #fef9c3;
    color: #854d0e;
}

.resumen-item.vendido {
    background: #fee2e2;
    color: #991b1b;
}

.acciones-card {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-secundario {
    background: #e5e7eb;
    color: #111827;
}

.btn-secundario:hover {
    background: #d1d5db;
}

@media (max-width: 600px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .contenedor {
        padding: 16px;
    }

    .resumen-numeros {
        grid-template-columns: 1fr;
    }

    .acciones-card .btn {
        width: 100%;
    }
}

.grid-admin {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

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

.alerta-ok {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.tabla-responsive {
    width: 100%;
    overflow-x: auto;
}

.tabla {
    width: 100%;
    border-collapse: collapse;
   /* min-width: 780px; */
}

.tb {
    width: 100%;
    border-collapse: collapse;
   /* min-width: 780px; */
}

.tb th,
.tb td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

.tabla th,
.tabla td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

.tabla th {
    background: #f9fafb;
    font-size: 14px;
}

.tb th {
    background: #f9fafb;
    font-size: 14px;
}

.btn-mini {
    padding: 7px 10px;
    font-size: 13px;
    border-radius: 8px;
}

textarea {
    resize: vertical;
}

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

.topbar-acciones {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 18px;
    margin-top: 10px;
}

.texto-ayuda {
    color: #6b7280;
    margin-top: -6px;
}

.grilla-numeros {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.numero-btn {
    border: 0;
    border-radius: 12px;
    padding: 14px 6px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    min-height: 52px;
}

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

.numero-libre {
    background: #dcfce7;
    color: #166534;
}

.numero-reservado {
    background: #fef9c3;
    color: #854d0e;
}

.numero-vendido {
    background: #fee2e2;
    color: #991b1b;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 999;
}

.modal.oculto {
    display: none;
}

.modal-contenido {
    background: #fff;
    width: 100%;
    max-width: 460px;
    border-radius: 16px;
    padding: 24px;
    position: relative;
    box-shadow: 0 12px 35px rgba(0,0,0,0.25);
}

.modal-cerrar {
    position: absolute;
    top: 10px;
    right: 14px;
    border: 0;
    background: transparent;
    font-size: 30px;
    cursor: pointer;
    color: #555;
}

@media (max-width: 600px) {
    .topbar-acciones {
        width: 100%;
    }

    .topbar-acciones .btn {
        width: 100%;
    }

    .grilla-numeros {
        grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
        gap: 8px;
    }

    .numero-btn {
        min-height: 46px;
        font-size: 14px;
    }
}

.leyenda-numeros {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.leyenda-numeros span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.leyenda {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    display: inline-block;
}

.leyenda.libre {
    background: #dcfce7;
    border: 1px solid #166534;
}

.leyenda.reservado {
    background: #fef9c3;
    border: 1px solid #854d0e;
}

.leyenda.vendido {
    background: #fee2e2;
    border: 1px solid #991b1b;
}

.numero-btn:disabled {
    cursor: not-allowed;
    opacity: 0.85;
}

.numero-btn:disabled:hover {
    transform: none;
}

.filtros-numeros {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 10px;
    margin-top: 16px;
}

.filtros-numeros input,
.filtros-numeros select {
    width: 100%;
    padding: 12px;
    border: 1px solid #cfd4dc;
    border-radius: 10px;
    font-size: 16px;
}

@media (max-width: 600px) {
    .filtros-numeros {
        grid-template-columns: 1fr;
    }
}

.grid-comprobantes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.comprobante-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px;
    background: #f9fafb;
    text-align: center;
}

.comprobante-img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.comprobante-pdf {
    height: 180px;
    border-radius: 10px;
    background: #fee2e2;
    color: #991b1b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 12px;
}

.btn-peligro {
    background: #fee2e2;
    color: #991b1b;
}

.btn-peligro:hover {
    background: #fecaca;
}

.paginacion {
    margin-top: 18px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
