/* admin.css — Estilos del panel de administración Rock States */

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

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
    min-height: 100vh;
}

/* ── Login ──────────────────────────────────────────────────────────── */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-box {
    background: #242424;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.login-box h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    text-align: center;
    color: #fff;
}

.login-box label { font-size: 0.875rem; color: #aaa; }

.login-box input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 1rem;
}

.login-box input:focus {
    outline: none;
    border-color: #e07b39;
}

/* ── Panel ───────────────────────────────────────────────────────────── */
.panel-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0 1.5rem;
    border-bottom: 1px solid #333;
    margin-bottom: 1.5rem;
}

.panel-titulo {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
}

.panel-card {
    background: #242424;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.panel-card h3 {
    font-size: 1rem;
    margin-bottom: 1.25rem;
    color: #e07b39;
}

/* ── Formulario ─────────────────────────────────────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #aaa;
}

.form-grid label.full-width { grid-column: 1 / -1; }

.form-grid label.checkbox-label {
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    color: #e0e0e0;
    font-size: 0.95rem;
}

.form-grid label.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #e07b39;
}

.form-grid input {
    padding: 0.55rem 0.75rem;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 0.95rem;
}

.form-grid input:focus {
    outline: none;
    border-color: #e07b39;
}

.form-grid textarea {
    padding: 0.55rem 0.75rem;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 0.95rem;
    resize: vertical;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

.form-grid textarea:focus {
    outline: none;
    border-color: #e07b39;
}

.form-grid input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.aviso-fecha-fin {
    display: none;
    font-size: 0.78rem;
    color: #e0a84a;
    margin-top: 0.3rem;
    line-height: 1.3;
}

#f-fin:focus ~ .aviso-fecha-fin,
#f-fin:not(:placeholder-shown) ~ .aviso-fecha-fin {
    display: block;
}

/* ── Botones ─────────────────────────────────────────────────────────── */
button {
    cursor: pointer;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
    transition: background 0.2s;
}

#btn-login, #btn-anadir {
    background: #e07b39;
    color: #fff;
    width: 100%;
    margin-top: 0.5rem;
    font-weight: bold;
}

#btn-login:hover, #btn-anadir:hover  { background: #c9692a; }
#btn-login:disabled, #btn-anadir:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secundario {
    background: transparent;
    border: 1px solid #555;
    color: #aaa;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

.btn-secundario:hover { border-color: #aaa; color: #e0e0e0; }

/* ── Lista de conciertos ─────────────────────────────────────────────── */
.lista-eventos {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.evento-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 6px;
    animation: slideIn 0.85s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-22px); }
    to   { opacity: 1; transform: translateX(0); }
}

.evento-item.inactivo {
    opacity: 0.85;
    border-left: 3px solid #e06060;
}

.evento-item.destacado {
    border: 2px solid #e07b39;
    background: rgba(224, 123, 57, 0.12);
    animation: boteNaranja 0.7s ease-in-out infinite;
}


@keyframes boteNaranja {
    0%   { transform: translateY(0)    scale(1);    box-shadow: 0 0 0   0   rgba(224,123,57,0.6); }
    25%  { transform: translateY(-7px) scale(1.01); box-shadow: 0 6px 14px 0   rgba(224,123,57,0.35); }
    55%  { transform: translateY(-3px) scale(1.005);box-shadow: 0 3px  8px 0   rgba(224,123,57,0.25); }
    75%  { transform: translateY(-5px) scale(1.008);box-shadow: 0 5px 12px 0   rgba(224,123,57,0.3); }
    100% { transform: translateY(0)    scale(1);    box-shadow: 0 0 0   0   rgba(224,123,57,0); }
}

.evento-estado { font-size: 1.1rem; flex-shrink: 0; }

.evento-nombre {
    flex: 1;
    font-weight: 600;
    color: #e0e0e0;
}

.evento-fecha {
    font-size: 0.85rem;
    color: #888;
    flex-shrink: 0;
}

.btn-accion {
    flex-shrink: 0;
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
}

.btn-desactivar { background: #7a2222; color: #fcc; }
.btn-desactivar:hover { background: #a33; }

.btn-activar { background: #1d5c2e; color: #cfc; }
.btn-activar:hover { background: #267a3d; }

.btn-borrar { background: #3a1a1a; color: #f88; border: 1px solid #7a3030; margin-left: 0.5rem; }
.btn-borrar:hover { background: #6b1e1e; color: #fff; }

.btn-stock { background: #1a3a2a; color: #8fe8b0; border: 1px solid #2a7a50; margin-left: 0.5rem; }
.btn-stock:hover { background: #1e5c3a; color: #fff; }

.merch-item-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.merch-stock-ctrl { display: flex; align-items: center; gap: 0.25rem; }
.merch-stock-input {
    width: 4.5rem;
    padding: 0.25rem 0.4rem;
    font-size: 0.8rem;
    background: #1a1a1a;
    color: #eee;
    border: 1px solid #444;
    border-radius: 4px;
    text-align: center;
}

/* ── Modal resultado ────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.modal-box {
    background: #242424;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 2.5rem 2rem 2rem;
    max-width: 440px;
    width: 100%;
    position: relative;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    animation: modalEntrada 0.18s ease-out;
}

@keyframes modalEntrada {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.modal-cerrar {
    position: absolute;
    top: 0.6rem;
    right: 0.8rem;
    background: none;
    border: none;
    color: #999;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.modal-cerrar:hover { color: #fff; background: #444; }

.modal-icono  { font-size: 2.6rem; margin-bottom: 0.5rem; }
.modal-titulo { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.modal-mensaje { font-size: 0.95rem; color: #bbb; line-height: 1.5; }

.modal-box.modal-ok    { border-color: #2e7d4f; }
.modal-box.modal-error { border-color: #7a3030; }

/* ── Mensajes ────────────────────────────────────────────────────────── */
.error-msg { color: #e06060; font-size: 0.875rem; min-height: 1.2em; }
.ok-msg    { color: #60c080; font-size: 0.875rem; min-height: 1.2em; }
.cargando  { color: #888; font-size: 0.9rem; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .form-grid { grid-template-columns: 1fr; }
    .evento-item { flex-wrap: wrap; }
}

/* ── Selector de sección ─────────────────────────────────────────────── */
#seccion-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.selector-titulo {
    font-size: 1.2rem;
    color: #e07b39;
    margin-bottom: 2.5rem;
    text-align: center;
    font-weight: bold;
}

.seccion-selector {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.selector-card {
    background: linear-gradient(135deg, #2a2a2a, #111);
    border: 1px solid #333;
    border-radius: 16px;
    padding: 2.5rem 3rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    text-align: center;
    min-width: 160px;
    user-select: none;
}

.selector-card:hover, .selector-card:focus {
    transform: scale(1.04);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    border-color: #e07b39;
    outline: none;
}

.selector-card-icon  { font-size: 3rem; margin-bottom: 0.75rem; }
.selector-card-label { font-size: 1.1rem; font-weight: 600; color: #e0e0e0; }

/* ── Lista de merch ──────────────────────────────────────────────────── */
.lista-merch {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.merch-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 6px;
    animation: slideIn 0.85s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.merch-item.inactivo {
    opacity: 0.75;
    border-left: 3px solid #e06060;
}

.merch-item-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    background: #333;
    flex-shrink: 0;
}

.merch-item-nombre {
    flex: 1;
    font-weight: 600;
    color: #e0e0e0;
    font-size: 0.95rem;
}

.merch-item-meta {
    font-size: 0.8rem;
    color: #888;
    flex-shrink: 0;
    text-align: right;
    line-height: 1.4;
}

.form-grid select {
    padding: 0.55rem 0.75rem;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 0.95rem;
}

.form-grid select:focus {
    outline: none;
    border-color: #e07b39;
}

#btn-anadir-merch {
    background: #e07b39;
    color: #fff;
    font-weight: bold;
    padding: 0.6rem 1.4rem;
    margin-top: 1rem;
}
#btn-anadir-merch:hover { background: #c9692a; }
#btn-anadir-merch:disabled { opacity: 0.6; cursor: not-allowed; }

