:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-main: #ffffff;
    --text-muted: #aaaaaa;
    --accent-color: #FFD700;
    --button-bg: #00E5FF;
    --button-text: #000000;
    --error-color: #ff5252;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.logo { 
    width: 90%; 
    max-width: 500px; 
    height: auto; 
    margin: 0 auto 20px auto; 
    display: block; 
}

h1 { color: var(--accent-color); font-size: 24px; margin-bottom: 10px; }
p { font-size: 16px; line-height: 1.5; margin-bottom: 20px; }
.highlight { color: var(--accent-color); font-weight: bold; font-size: 18px; margin: 30px 0; }

.form-group { text-align: left; margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: bold; }

input[type="text"], input[type="password"], input[type="number"], input[type="tel"], input[type="file"], input[type="date"], select {
    width: 100%; padding: 12px; box-sizing: border-box;
    background-color: #2c2c2c; color: var(--text-main);
    border: 1px solid #444; border-radius: 6px; font-size: 16px;
}

.btn-container { display: flex; gap: 10px; margin-top: 20px; }
.btn {
    flex: 1; padding: 12px; border: none; border-radius: 6px; cursor: pointer;
    font-size: 16px; font-weight: bold; transition: 0.3s;
}
.btn-submit { background-color: var(--button-bg); color: var(--button-text); }
.btn-submit:hover { opacity: 0.8; transform: scale(1.02); box-shadow: 0 0 12px rgba(0,229,255,0.4); }
.btn-cancel { background-color: transparent; color: var(--text-main); border: 1px solid var(--text-main); text-decoration: none; display: inline-block; text-align: center; }
.btn-cancel:hover { background-color: rgba(255,255,255,0.1); transform: scale(1.02); box-shadow: 0 0 12px rgba(255,255,255,0.1); }

.top-bar { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 20px; align-items: center; }
.btn-small { padding: 6px 10px; font-size: 13px; flex: unset; width: auto; font-weight: normal; border-radius: 4px; }
.btn-small:hover { transform: scale(1.05); box-shadow: 0 0 8px rgba(255,215,0,0.3); }

.filters-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
    background-color: #161616;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333;
}
.search-row { width: 100%; }
.controls-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.input-compact {
    padding: 4px 8px; font-size: 13px; background-color: #2c2c2c;
    color: var(--text-main); border: 1px solid #444; border-radius: 4px;
    height: 32px; box-sizing: border-box;
}
.search-main { width: 100%; font-size: 14px; padding: 8px 12px; height: 36px; }
.btn-compact {
    padding: 0 12px; font-size: 13px; height: 32px; display: inline-flex;
    align-items: center; justify-content: center; border-radius: 4px;
    font-weight: normal; text-decoration: none; cursor: pointer; border: 1px solid transparent;
}
.btn-csv { background: #2e7d32; color: white; }
.btn-csv:hover { background: #1b5e20; }

.coupon-box {
    background-color: #000; border: 2px dashed var(--accent-color);
    padding: 20px; font-size: 32px; letter-spacing: 5px; color: var(--accent-color);
    margin: 20px 0; font-weight: bold;
}
footer a { color: var(--button-bg); text-decoration: none; font-size: 14px; }

.table-responsive { width: 100%; overflow-x: auto; margin-top: 20px; }
.nowrap { white-space: nowrap; }

.modal { 
    position: fixed !important; z-index: 9999; left: 0; top: 0; width: 100vw; 
    height: 100vh; background-color: rgba(0,0,0,0.85); display: flex; 
    justify-content: center; align-items: center; 
}
.modal-content { 
    background-color: var(--card-bg); padding: 30px; border: 1px solid #444; 
    width: 90%; max-width: 350px; border-radius: 12px; text-align: center; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.pagination { margin-top: 20px; display: flex; justify-content: center; gap: 5px; flex-wrap: wrap; }
.page-link { padding: 8px 12px; background: #2c2c2c; color: var(--text-main); text-decoration: none; border-radius: 4px; border: 1px solid #444; font-size: 13px; }
.page-link.active { background: var(--button-bg); color: #000; font-weight: bold; }

/* MODIFICACIONES DETALLES DEL CUPÓN */
.btn-cerrar {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--error-color);
    font-size: 28px;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    font-weight: bold;
    transition: 0.2s;
}
.btn-cerrar:hover { color: #ff8a8a; transform: scale(1.1); }

.textarea-notas {
    width: 100%;
    background-color: #2c2c2c;
    color: var(--text-main);
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px;
    margin-top: 5px;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
}

/* Espaciado ajustado para los renglones */
.info-detalles p {
    margin-bottom: 6px;
    margin-top: 2px;
    line-height: 1.3;
}

/* TABLA MÁS DELGADA Y BOTONES MEJORADOS */
table td, table th {
    padding: 6px 8px;
    vertical-align: middle;
}
.btn-small {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
    line-height: 1.2;
}
.btn-small:hover {
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(255,215,0,0.3);
}

/* ===== FILTROS ===== */
.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: center;
    background: #1a1a1a;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid #333;
}
.filters input, .filters select {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    background: #2c2c2c;
    border: 1px solid #444;
    border-radius: 6px;
    color: var(--text-main);
    font-size: 14px;
}
.filters .btn {
    flex: unset;
    padding: 8px 18px;
    font-size: 14px;
    border-radius: 6px;
}
.filters .btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 10px rgba(255,215,0,0.2);
}

/* Contenedor para tipo de fecha y calendarios */
.fecha-fila {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1 1 auto;
    min-width: 200px;
}
.fecha-fila select.tipo-fecha {
    flex: 1 1 40%;
    min-width: 100px;
}
.fecha-fila input[type="date"] {
    flex: 1 1 30%;
    min-width: 80px;
    padding: 8px 6px;
}

/* ===== RESPONSIVE MÓVIL ===== */
@media (max-width: 768px) {
    body { padding: 0; align-items: flex-start; }
    .container { 
        max-width: 100%; 
        border-radius: 0; 
        box-shadow: none; 
        min-height: 100vh; 
        padding: 15px; 
        box-sizing: border-box;
    }
    .container > form, .container > div, .container > h1, .container > p { width: 100%; }
    .top-bar { flex-direction: column; align-items: flex-end; width: 100%; }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px;
    }
    .filters input, .filters select {
        width: 100%;
        min-width: unset;
        padding: 8px 10px;
        font-size: 14px;
        box-sizing: border-box;
    }
    .filters .btn {
        width: 100%;
        padding: 8px 12px;
        font-size: 14px;
        text-align: center;
    }
    .fecha-fila {
        flex-wrap: nowrap;
        gap: 6px;
        width: 100%;
    }
    .fecha-fila select.tipo-fecha {
        flex: 1 1 40%;
        min-width: 0;
        padding: 8px 6px;
        font-size: 13px;
    }
    .fecha-fila input[type="date"] {
        flex: 1 1 30%;
        min-width: 0;
        padding: 8px 4px;
        font-size: 13px;
    }
    .fecha-fila label {
        display: none;
    }
    
    .btn-small { font-size: 12px; padding: 4px 8px; }
    .btn-cancel { font-size: 14px; padding: 8px 12px; }
    
    .table-responsive { overflow-x: auto; }
    table { font-size: 13px; }
    th, td { padding: 4px 6px; }
    
    .modal-content { padding: 20px; max-width: 95%; }
}

@media (max-width: 480px) {
    .container { padding: 10px; }
    .filters { padding: 8px; gap: 6px; }
    .filters input, .filters select { padding: 6px 8px; font-size: 13px; }
    .filters .btn { padding: 6px 10px; font-size: 13px; }
    .fecha-fila select.tipo-fecha { font-size: 12px; padding: 6px 4px; }
    .fecha-fila input[type="date"] { font-size: 12px; padding: 6px 2px; }
    table { font-size: 12px; }
    th, td { padding: 3px 4px; }
    .btn-small { font-size: 11px; padding: 3px 6px; }
    .btn-cancel { font-size: 12px; padding: 6px 10px; }
    h1 { font-size: 20px; }
    .logo { max-width: 150px; }
}