
: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;
}


/* Cabecera compartida RIFAS.DMZ.UY */
.home-header { position:sticky; top:0; z-index:100; background:#172337; color:white; box-shadow:0 3px 15px #101b3030; }
.home-bar { max-width:1240px; margin:auto; min-height:62px; padding:8px 18px; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px; }
.home-logo { display:flex; align-items:center; justify-self:start; text-decoration:none; color:white; }
.home-logo-mark { display:grid; place-items:center; width:40px; height:40px; border-radius:11px; background:#e5f0ff; color:#17365c; font-weight:900; letter-spacing:-1px; font-size:14px; }
.home-logo img { max-width:105px; max-height:43px; object-fit:contain; }
.home-brand { font-size:clamp(16px,2.5vw,22px); font-weight:800; letter-spacing:.035em; color:white; text-decoration:none; white-space:nowrap; }
.home-nav { justify-self:end; display:flex; align-items:center; gap:3px; }
.home-nav a { color:#e8edf5; text-decoration:none; font-size:13px; font-weight:600; padding:10px 8px; border-radius:7px; white-space:nowrap; }
.home-nav a:hover,.home-nav a:focus-visible { background:#31435c; color:white; }
.home-menu-toggle { display:none; justify-self:end; background:transparent; border:1px solid #7d8ca1; color:white; border-radius:8px; width:42px; height:39px; font-size:24px; cursor:pointer; }
@media(max-width:1050px) {
 .home-bar { grid-template-columns:1fr auto 1fr; }
 .home-menu-toggle { display:block; }
 .home-nav { display:none; position:absolute; top:100%; left:0; right:0; background:#172337; padding:8px 16px 15px; box-shadow:0 12px 18px #17233733; flex-direction:column; align-items:stretch; }
 .home-nav.home-nav-open { display:flex; }
 .home-nav a { padding:12px; font-size:15px; }
}
@media(max-width:420px) { .home-bar { padding:8px 12px; } .home-logo-mark { width:34px; height:34px; font-size:12px; } .home-logo img { max-width:63px; } .home-main { padding:20px 12px 45px; } .home-info { padding:16px; } }

/* Identidad RIFASWEB.UY — cabecera */
.home-header { background:#0b1c42; }
.home-logo { width:54px; height:48px; overflow:hidden; border-radius:10px; background:#fff; }
.home-logo img { display:block; width:54px; height:48px; max-width:none; max-height:none; object-fit:cover; object-position:left center; }
.home-brand { color:#fff; }
.home-brand:hover { color:#f9b916; }
@media (max-width:1050px) { .home-nav { background:#0b1c42; } }

/* RIFASWEB.UY: logo completo + login + menú */
.home-bar.home-bar-brandless {
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:14px;
}
.home-logo.home-logo-full {
 width:clamp(155px, 24vw, 245px);
 height:56px;
 background:white;
 border-radius:10px;
 overflow:hidden;
 flex-shrink:0;
}
.home-logo.home-logo-full img {
 display:block;
 width:100%;
 height:100%;
 max-width:none;
 max-height:none;
 object-fit:contain;
 object-position:center;
}
.home-header-actions { display:flex; align-items:center; gap:12px; margin-left:auto; }
.home-admin-login {
 display:inline-flex;
 align-items:center;
 justify-content:center;
 width:38px;
 height:38px;
 color:#e8edf5;
 border:1px solid #7d8ca1;
 border-radius:9px;
 text-decoration:none;
 flex-shrink:0;
}
.home-admin-login:hover,.home-admin-login:focus-visible { color:#f9b916; border-color:#f9b916; }
@media(max-width:1050px) {
 .home-header-actions { gap:9px; }
 .home-nav { z-index:101; }
}
@media(max-width:420px) {
 .home-logo.home-logo-full { width:170px; height:60px; }
 .home-bar.home-bar-brandless { gap:10px; }
 .home-header-actions { gap:7px; }
}

