/* Estilos CSS Globales - Diseño Limpio Estilo Google / AppSheets (Mobile-First) */
:root {
    --primary-color: #000000; /* Negro Principal */
    --secondary-color: #f8f9fa; /* Gris Claro Google */
    --text-color: #3c4043; /* Texto Principal */
    --text-muted: #5f6368; /* Texto Secundario */
    --border-color: #dadce0; /* Borde estándar de Google */
    --bg-color: #ffffff; /* Fondo de contenedores */
    --error-color: #d93025; /* Rojo alerta Google */
    --success-color: #188038; /* Verde éxito Google */
    --font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: #f8f9fa; /* Fondo general gris */
    line-height: 1.5;
    -webkit-tap-highlight-color: transparent;
    padding-bottom: 70px; /* Margen inferior para la barra de navegación */
}

/* Encabezado limpio de Google */
header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

header img.salon-logo {
    height: 32px;
    max-width: 120px;
    object-fit: contain;
}

header h1 {
    font-size: 18px;
    font-weight: 500;
}

/* Contenedor Principal */
main {
    max-width: 600px; /* Enfoque mobile-first centrado en escritorio */
    margin: 0 auto;
    padding: 16px;
}

/* Tarjetas estilo Google / AppSheets */
.card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Formularios de Google */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: #ffffff;
    color: var(--text-color);
    outline: none;
    transition: border-color 0.15s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

/* Botones Planos y de Contorno */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}

.btn-primary {
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
}

.btn-primary:hover {
    background-color: #bdc1c6;
    border-color: #bdc1c6;
    color: #000000;
}

.btn-secondary {
    background-color: #ffffff;
    border-color: #000000;
    color: #000000;
}

.btn-secondary:hover {
    background-color: #bdc1c6;
    border-color: #bdc1c6;
    color: #000000;
}

.btn-danger {
    background-color: var(--error-color);
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #b31412;
}

/* Barra de Navegación Inferior Móvil (Bottom Navigation) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    gap: 2px;
}

.nav-item svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.nav-item.active {
    color: var(--primary-color);
}

/* Alertas estilo Google */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.alert-danger {
    background-color: #fce8e6;
    color: var(--error-color);
    border-color: #fad2cf;
}

.alert-success {
    background-color: #e6f4ea;
    color: var(--success-color);
    border-color: #ceead6;
}

/* Clases Útiles */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.d-none { display: none !important; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Contenedor de Select con buscador */
.searchable-select {
    position: relative;
    width: 100%;
}
.select-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1050;
    margin-top: 4px;
}
.select-dropdown-list.d-none {
    display: none !important;
}
.select-dropdown-item {
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-color);
    cursor: pointer;
    transition: background-color 0.15s;
    border-bottom: 1px solid var(--border-color);
}
.select-dropdown-item:last-child {
    border-bottom: none;
}
.select-dropdown-item:hover, .select-dropdown-item.highlighted {
    background-color: var(--secondary-color);
}
.select-dropdown-item.no-results {
    color: var(--text-muted);
    cursor: default;
    background: none !important;
}
