/* --- PALETA DE COLORES "BARBER SHOP" (Oscuro/Dorado) --- */
:root {
    --primary: #e6b31e; /* Dorado Barber */
    --primary-hover: #d4a017;
    
    --dark: #1a1a1a;    /* Fondo Tarjetas */
    --darker: #111111;  /* Fondo Body */
    --light: #f4f4f4;   /* Texto Principal */
    --gray: #333333;    /* Inputs/Fondos secundarios */
    
    --border: #444;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--darker);
    color: var(--light);
    line-height: 1.6;
}

/* --- CONTENEDORES --- */
.container {
    max-width: 500px; /* Vista Móvil */
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- HEADER HÍBRIDO (LOGO + TEXTO) --- */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.brand-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.brand-title, .header h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.2rem;
    color: var(--primary);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
}

.header p { color: #888; font-style: italic; }

.site-logo {
    max-width: 120px;
    height: auto;
    display: block;
}

@media (min-width: 600px) {
    .brand-container { flex-direction: row; }
    .brand-title { font-size: 3rem; }
}

/* --- TARJETAS (CARD) --- */
.booking-card {
    background-color: var(--dark);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border-top: 4px solid var(--primary);
    margin-bottom: 20px;
}

h2, h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary);
}

/* --- FORMULARIOS --- */
.form-group { margin-bottom: 15px; }
.form-row { display: flex; gap: 10px; }
.form-row .form-group { flex: 1; }

label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #aaa;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    background: var(--gray);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
}

/* --- BOTONES --- */
.btn-submit {
    width: 100%;
    padding: 15px;
    background-color: var(--primary);
    color: var(--darker);
    border: none;
    font-weight: bold;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.btn-submit:hover { background-color: var(--primary-hover); }
.btn-submit:disabled { background-color: #555; cursor: not-allowed; color: #888; }

/* --- ALERTAS --- */
.alert {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
}
.alert.success { background: #2ecc71; color: white; }
.alert.error { background: #e74c3c; color: white; }

/* --- HORARIOS (GRID) --- */
.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.time-slot {
    background: #333;
    padding: 10px 5px;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    border: 1px solid #444;
    transition: all 0.2s;
    color: white;
}

.time-slot:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.time-slot.selected {
    background: var(--primary);
    color: #111;
    font-weight: bold;
    border-color: var(--primary);
    transform: scale(1.05);
}

.time-slot.disabled {
    background: #1a1a1a;
    color: #444;
    cursor: not-allowed;
    border-color: transparent;
    text-decoration: line-through;
}

/* --- BOTÓN CÁMARA (NUEVO) --- */
.camera-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #252525;
    border: 2px dashed #555;
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.camera-btn:hover {
    background-color: #333;
    border-color: var(--primary);
    color: var(--primary);
}

/* --- ADMIN DASHBOARD --- */
.admin-container { max-width: 1000px; }

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.admin-header h1 { color: var(--primary); margin: 0; font-size: 1.5rem; }
.admin-brand-row { display: flex; align-items: center; gap: 15px; }
.admin-logo-size { max-width: 80px; }

.btn-link { color: #fff; text-decoration: none; margin-right: 15px; font-size: 0.9rem; }
.btn-logout {
    background: #e74c3c;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
}

/* KPIs Tarjetas */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.kpi-card {
    background: var(--dark);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border-left: 4px solid var(--primary); /* Borde dorado por defecto */
    text-decoration: none;
    color: white;
    transition: transform 0.2s;
}

.kpi-card:hover { transform: translateY(-3px); }
.kpi-card.money { border-left-color: #2ecc71; }
.kpi-card.action-card { border-left-color: #3498db; }

.kpi-card .icon { font-size: 2rem; margin-right: 15px; opacity: 0.8; }
.kpi-card .info h3 { margin: 0; font-size: 1.5rem; }
.kpi-card .info p { margin: 0; color: #aaa; font-size: 0.8rem; }

/* TABLAS */
.table-responsive { overflow-x: auto; }
.citas-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.9rem;
}

.citas-table th, .citas-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.citas-table th { background-color: #222; color: var(--primary); }

/* Badges Estado */
.badge { padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }
.badge.pendiente { background: #f39c12; color: #fff; }
.badge.confirmada { background: #2ecc71; color: #fff; }
.badge.cancelada { background: #e74c3c; color: #fff; }
.badge.completada { background: #34495e; color: #ccc; }

.estado-completada td { color: #666; }

/* Botones de acción tabla */
.btn-icon {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 5px;
    color: white;
    margin-right: 5px;
    text-decoration: none;
}
.btn-icon.check { background: #2ecc71; }
.btn-icon.cancel { background: #e74c3c; }
.btn-icon.trash { background: #666; }

/* Footer */
footer {
    text-align: center;
    margin-top: auto;
    padding-top: 20px;
    font-size: 0.8rem;
    color: #666;
}
/* --- CORRECCIONES PARA EL BOTÓN WHATSAPP --- */
.btn-whatsapp {
    display: inline-block;
    background-color: #25D366; /* Verde Oficial */
    color: white !important;   /* Texto blanco forzado */
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    margin-top: 5px;
    border: 1px solid #128C7E;
    transition: background 0.3s;
}

.btn-whatsapp:hover {
    background-color: #128C7E; /* Verde más oscuro al pasar mouse */
}

/* --- CORRECCIONES RESPONSIVAS (CELULARES) --- */
@media (max-width: 600px) {
    /* 1. Header en columna para que no se amontone */
    .admin-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    /* 2. Contenedor de botones flexible */
    .actions {
        display: flex;
        flex-wrap: wrap; /* Permite que bajen a otra línea si no caben */
        justify-content: center;
        gap: 10px; /* Espacio entre botones */
        width: 100%;
    }

    /* 3. Ajustar tamaño de botones en celular */
    .btn-logout, .btn-link {
        margin: 0; /* Quitamos márgenes viejos */
        padding: 8px 12px; /* Un poco más pequeños */
        font-size: 0.8rem;
        flex: 1; /* Que intenten ocupar el mismo ancho */
        min-width: 80px; /* Tamaño mínimo */
        text-align: center;
    }
    
    /* El logo y título centrados */
    .admin-brand-row {
        justify-content: center;
    }
}
@media (max-width: 400px) {
    .time-slots-grid { grid-template-columns: repeat(3, 1fr); }
    .header h1 { font-size: 2rem; }
}