/* Shared look for the internal panels (admin.html, checkin.html) — misma
   identidad de marca SDE 2026 que el sitio público: fondo cálido claro
   #faf7f1, acentos violeta/naranja/verde/turquesa, FoundersGrotesk. */

@font-face {
    font-family: 'FoundersGrotesk';
    src: url('../foundersgrotesk-light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FoundersGrotesk';
    src: url('../foundersgrotesk-medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    background: #faf7f1;
    color: #14120f;
    font-family: 'FoundersGrotesk', 'Arial', sans-serif;
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #985ac7; }

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    background: #ffffff;
    border-bottom: 3px solid #e6e1d6;
    flex-wrap: wrap;
}

.panel-header .logo {
    height: 34px;
}

.panel-header h1 {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.panel-main {
    flex: 1;
    padding: 1.5rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* ---------- Login gate ---------- */
.login-screen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    background: #ffffff;
    border: 2px solid #e6e1d6;
    box-shadow: 0 20px 50px rgba(20, 18, 15, 0.1);
    border-radius: 16px;
    padding: 2.2rem;
    max-width: 380px;
    width: 100%;
    text-align: center;
}

.login-card h1 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 1.4rem;
    background: linear-gradient(45deg, #985ac7, #ea6e08, #34ae24, #ba2a1f, #985ac7);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: panelGradient 3s ease-in-out infinite;
}

@keyframes panelGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: transparent;
    border: 2px solid #d8d3c8;
    color: #14120f;
    font-family: 'FoundersGrotesk', 'Arial', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover { background: #14120f; color: #fff; border-color: #14120f; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-accent {
    border-color: #ea6e08;
    color: #bb5806;
}

.btn-accent:hover {
    background: #ea6e08;
    color: #fff;
    border-color: #ea6e08;
}

.btn-danger {
    border-color: #ba2a1f;
    color: #952219;
}

.btn-danger:hover { background: #ba2a1f; color: #fff; border-color: #ba2a1f; }

.btn-block { width: 100%; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.78rem; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1rem; text-align: left; }

.field label {
    display: block;
    font-size: 0.8rem;
    color: #8a8378;
    font-weight: 300;
    margin-bottom: 0.3rem;
}

.input, select.input, textarea.input {
    width: 100%;
    background: #faf8f4;
    border: 2px solid #d8d3c8;
    border-radius: 8px;
    color: #14120f;
    font-family: 'FoundersGrotesk', 'Arial', sans-serif;
    font-size: 0.95rem;
    padding: 0.55rem 0.7rem;
}

.input:focus { border-color: #ea6e08; background: #ffffff; }

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #3a352c;
    font-weight: 300;
}

.error-text { color: #ba2a1f; font-size: 0.85rem; min-height: 1.1em; }
.hint-text { color: #8a8378; font-size: 0.75rem; margin-top: 0.25rem; }

/* ---------- Cards / sections ---------- */
.panel-card {
    background: #ffffff;
    border: 1px solid #e6e1d6;
    border-radius: 14px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}

.panel-card h2 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #985ac7;
}

.panel-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* ---------- Secciones desplegables (accordion) ---------- */
details.panel-card {
    padding: 0;
}

details.panel-card > summary.panel-card-header {
    cursor: pointer;
    list-style: none;
    padding: 1.2rem;
    margin-bottom: 0;
    user-select: none;
}

details.panel-card > summary.panel-card-header::-webkit-details-marker { display: none; }
details.panel-card > summary.panel-card-header::marker { display: none; }

details.panel-card > .panel-card-body {
    padding: 0 1.2rem 1.2rem;
}

.accordion-chevron {
    color: #8a8378;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

details.panel-card[open] > summary .accordion-chevron {
    transform: rotate(180deg);
}

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table th, .data-table td {
    padding: 0.55rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid #e6e1d6;
    white-space: nowrap;
}

.data-table th {
    color: #8a8378;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:hover td { background: #faf8f4; }

/* ---------- Badges ---------- */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-green { background: #34ae24; color: #fff; }
.badge-gray { background: #d8d3c8; color: #6b6459; }
.badge-orange { background: #ea6e08; color: #fff; }
.badge-blue { background: #34ae24; color: #fff; }
.badge-red { background: #ba2a1f; color: #fff; }

/* ---------- Toggle switch ---------- */
.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #d8d3c8;
    border-radius: 24px;
    transition: 0.2s;
}

.switch .slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}

.switch input:checked + .slider { background: #985ac7; }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 18, 15, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 1rem;
}

.modal-overlay.hidden { display: none; }

.modal-box {
    background: #ffffff;
    border: 2px solid #e6e1d6;
    box-shadow: 0 20px 50px rgba(20, 18, 15, 0.18);
    border-radius: 16px;
    padding: 1.6rem;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-box h2 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.toast {
    position: fixed;
    bottom: 16px;
    right: 16px;
    background: #ffffff;
    border: 1px solid #e6e1d6;
    box-shadow: 0 10px 30px rgba(20, 18, 15, 0.15);
    color: #14120f;
    padding: 0.7rem 1.1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    z-index: 1200;
}

.toast-success { border-color: #34ae24; }
.toast-error { border-color: #ba2a1f; }

.muted { color: #8a8378; font-size: 0.85rem; }

.flex-row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

@media (max-width: 640px) {
    .panel-main { padding: 1rem; }
    .data-table th, .data-table td { font-size: 0.75rem; padding: 0.4rem; }
}
