:root {
    --app-primary: #5b4b8a;
    --app-primary-dark: #3f3561;
    --app-accent: #e83e8c;
    --app-bg: #f5f7fb;
    --app-card-radius: 16px;
    --app-touch-size: 46px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--app-bg);
    margin: 0;
    padding: 0;
    color: #1f2937;
}

/* Menú principal unificado: celular, tablet y escritorio */
.app-navbar {
    background: linear-gradient(135deg, var(--app-primary-dark), var(--app-primary));
    box-shadow: 0 6px 18px rgba(31, 41, 55, 0.18);
    padding: 0.55rem 0;
    z-index: 1030;
}

.app-navbar-container {
    gap: 0.75rem;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: var(--app-touch-size);
    padding: 0.25rem 0.2rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.app-brand-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255,255,255,.16);
    padding: 3px;
}

.app-navbar-toggler {
    min-height: var(--app-touch-size);
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 14px;
    padding: 0.45rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.app-menu-text {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

.app-nav-list {
    gap: 0.25rem;
}

.app-navbar .nav-link {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.95rem;
    border-radius: 14px;
    color: rgba(255,255,255,.9);
    font-size: 1rem;
    font-weight: 600;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
    white-space: nowrap;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus,
.app-navbar .nav-link.active {
    background: rgba(255,255,255,.17);
    color: #fff;
}

.app-navbar .nav-link:active {
    transform: scale(.98);
}

.app-user-item {
    display: flex;
    align-items: center;
}

.app-user-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: rgba(255,255,255,.13);
    color: rgba(255,255,255,.9) !important;
    font-size: 0.9rem;
    font-weight: 600;
}

.app-logout-link {
    color: #ffd1d1 !important;
}

.app-logout-link:hover,
.app-logout-link:focus {
    background: rgba(220, 53, 69, .3) !important;
    color: #fff !important;
}

/* Controles más cómodos para celular/touch */
.btn,
.form-control,
.form-select,
.input-group-text {
    min-height: var(--app-touch-size);
}

.btn {
    border-radius: 12px;
    font-weight: 600;
}

.btn-sm,
.btn-small {
    min-height: 38px;
    padding: 0.45rem 0.75rem;
}

.card,
.form-card,
.report-card,
.metric-card,
.service-card,
.card-producto,
.empleado-card,
.card-cita {
    border-radius: var(--app-card-radius);
}

.table-responsive {
    border-radius: var(--app-card-radius);
}

/* Botones del inicio: más touch y consistentes */
.boton-menu {
    min-height: 104px;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(31,41,55,.12);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.boton-menu:hover,
.boton-menu:focus {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(31,41,55,.16);
    filter: brightness(1.04);
}

/* Calendar styles */
#calendar {
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    padding: 1rem;
}

.fc-header-toolbar {
    background-color: #007bff;
    color: white;
    border-radius: 10px 10px 0 0;
    padding: 1rem;
}

.fc-header-toolbar .fc-button {
    background-color: #0056b3;
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    margin: 0 0.5rem;
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s;
}

.fc-header-toolbar .fc-button:hover {
    background-color: #003d7a;
}

.fc-daygrid-day {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

.fc-daygrid-day:hover {
    background-color: #e9ecef;
}

.fc-event {
    border-radius: 8px;
    color: #ffffff;
    padding: 0.5rem;
    font-size: 0.9rem;
}

.fc-event.fc-event-main {
    background-color: #007bff;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fc-event.fc-event-main:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

/* Login page styles */
body.login-page {
    background: url('../../images/2.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.login-container h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

.login-container .form-group {
    margin-bottom: 1rem;
}

.login-container .btn-primary {
    width: 100%;
}

.login-container .alert {
    margin-top: 20px;
}

@media (max-width: 1199.98px) {
    .app-navbar .navbar-collapse {
        margin-top: 0.75rem;
        padding: 0.6rem;
        border-radius: 18px;
        background: rgba(0,0,0,.16);
    }

    .app-nav-list {
        gap: 0.45rem;
    }

    .app-navbar .nav-link,
    .app-user-pill {
        width: 100%;
        justify-content: flex-start;
        min-height: 50px;
        padding-left: 1rem;
        padding-right: 1rem;
        font-size: 1.05rem;
    }

    .app-user-item {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .container,
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .app-brand {
        font-size: 1.1rem;
    }

    .app-brand-logo {
        width: 34px;
        height: 34px;
    }

    h1,
    .h1 {
        font-size: 1.65rem;
    }

    h2,
    .h2 {
        font-size: 1.35rem;
    }

    .boton-menu {
        min-height: 92px;
        padding: 1.15rem !important;
        font-size: 1rem !important;
    }

    #calendar {
        max-width: 100%;
        padding: 0.65rem;
    }

    .fc-header-toolbar {
        flex-direction: column;
        gap: 0.6rem;
        align-items: stretch !important;
    }

    .fc-header-toolbar .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .fc-header-toolbar .fc-button {
        padding: 0.55rem 0.8rem;
        margin: 0;
    }

    .fc-event {
        font-size: 0.8rem;
        padding: 0.35rem;
    }
}

@media print {
    .app-navbar {
        display: none !important;
    }
}

/* =========================================================
   Estilo unificado touch/móvil para pantallas administrativas
   ========================================================= */
.touch-page {
    max-width: 1320px;
}

.touch-page .page-hero,
.touch-hero {
    border-radius: 26px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 14px 35px rgba(17, 24, 39, .08);
    border: 1px solid rgba(226, 232, 240, .9);
}

.touch-page .hero-title,
.touch-hero .hero-title {
    font-size: clamp(1.55rem, 4vw, 2.35rem);
    font-weight: 800;
    color: #111827;
}

.touch-page .hero-subtitle,
.touch-hero .hero-subtitle {
    color: #64748b;
    font-size: 1rem;
}

.touch-btn,
.touch-page .touch-btn {
    min-height: 48px;
    border-radius: 16px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
}

.touch-form-card,
.touch-list-card,
.touch-filter-card {
    border-radius: 22px;
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 0 10px 25px rgba(15, 23, 42, .06);
    background: #fff;
}

.touch-summary-card {
    border: 0;
    border-radius: 22px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
    min-height: 112px;
}

.touch-summary-label {
    color: #64748b;
    font-size: .88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.touch-summary-number {
    color: #111827;
    font-size: 2rem;
    line-height: 1;
    font-weight: 900;
}

.touch-entity-card {
    --entity-color: var(--app-primary);
    border: 0;
    border-left: 8px solid var(--entity-color);
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .09);
    overflow: hidden;
}

.touch-entity-header {
    background: linear-gradient(135deg, rgba(248, 250, 252, 1), rgba(255, 255, 255, 1));
    border-bottom: 1px solid #eef2f7;
}

.touch-entity-title {
    font-size: 1.2rem;
    color: #111827;
    font-weight: 800;
}

.touch-info-row {
    display: flex;
    gap: .65rem;
    align-items: flex-start;
    color: #334155;
    font-size: .98rem;
}

.touch-info-icon {
    width: 30px;
    min-width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #f1f5f9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.touch-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.touch-action-grid .btn,
.touch-action-grid button {
    min-height: 48px;
    border-radius: 16px;
    font-weight: 800;
    width: 100%;
}

.touch-empty-state {
    border-radius: 26px;
    background: #fff;
    border: 1px dashed #cbd5e1;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.touch-page .form-control,
.touch-page .form-select {
    border-radius: 16px;
    min-height: 50px;
}

.touch-page textarea.form-control {
    min-height: 90px;
}

.touch-status-pill {
    border-radius: 999px;
    padding: .5rem .8rem;
    font-weight: 800;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .container-fluid.touch-page {
        padding-left: .85rem !important;
        padding-right: .85rem !important;
    }

    .touch-page .page-hero,
    .touch-hero {
        border-radius: 22px;
    }

    .touch-top-actions {
        width: 100%;
        display: grid !important;
        grid-template-columns: 1fr 1fr;
    }

    .touch-top-actions .btn {
        width: 100%;
    }

    .touch-summary-number {
        font-size: 1.75rem;
    }

    .touch-entity-card {
        border-radius: 22px;
    }

    .touch-entity-card .card-body,
    .touch-entity-header {
        padding: 1rem !important;
    }

    .touch-action-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Estilo base tipo Citas: cards limpias para pantallas touch
   ========================================================= */
.salon-card-page {
    max-width: 1320px;
}

.salon-hero-card {
    border-radius: 26px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 14px 35px rgba(17, 24, 39, .08);
    border: 1px solid rgba(226, 232, 240, .9);
}

.salon-hero-title {
    font-size: clamp(1.55rem, 4vw, 2.35rem);
    font-weight: 900;
    color: #111827;
    letter-spacing: .01em;
}

.salon-hero-subtitle {
    color: #64748b;
    font-size: 1rem;
}

.salon-control-card {
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 22px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .06);
    background: #fff;
}

.salon-summary-card {
    border: 0;
    border-radius: 22px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
    min-height: 106px;
    background: #fff;
}

.salon-summary-label {
    color: #64748b;
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.salon-summary-number {
    color: #111827;
    font-size: 2rem;
    line-height: 1;
    font-weight: 900;
}

.salon-touch-btn {
    min-height: 48px;
    border-radius: 16px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
}

.salon-item-card {
    --salon-card-color: #e83e8c;
    border: 0;
    border-left: 7px solid var(--salon-card-color);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .09);
    overflow: hidden;
    min-height: 100%;
}

.salon-item-card:hover {
    box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
}

.salon-item-title {
    font-size: 1.18rem;
    color: #111827;
    font-weight: 900;
    line-height: 1.2;
}

.salon-item-mini {
    color: #64748b;
    font-size: .88rem;
    font-weight: 700;
}

.salon-time-pill,
.salon-price-pill,
.salon-stock-pill {
    border-radius: 999px;
    padding: .5rem .75rem;
    font-size: .82rem;
    font-weight: 900;
    white-space: nowrap;
}

.salon-time-pill {
    background: #111827;
    color: #fff;
}

.salon-price-pill {
    background: #ecfdf5;
    color: #047857;
}

.salon-stock-pill {
    background: #f1f5f9;
    color: #334155;
}

.salon-info-row {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    color: #334155;
    font-size: .96rem;
}

.salon-info-icon {
    width: 30px;
    min-width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #f1f5f9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.salon-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.salon-actions-grid .btn,
.salon-actions-grid button {
    min-height: 46px;
    border-radius: 15px;
    font-weight: 800;
    width: 100%;
}

.salon-empty-card {
    border-radius: 26px;
    background: #fff;
    border: 1px dashed #cbd5e1;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.salon-form-card .form-control,
.salon-form-card .form-select,
.salon-control-card .form-control,
.salon-control-card .form-select {
    border-radius: 16px;
    min-height: 50px;
}

.salon-form-card textarea.form-control {
    min-height: 86px;
}

.salon-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    background: color-mix(in srgb, var(--salon-card-color) 13%, #ffffff);
    color: var(--salon-card-color);
    border: 1px solid color-mix(in srgb, var(--salon-card-color) 24%, #ffffff);
}

.salon-section-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: #111827;
}

.salon-inventory-box {
    background: #f8fafc;
    border: 1px solid #e9ecef;
    border-radius: 18px;
    padding: 14px;
}

.salon-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
}

.salon-quick-grid .btn {
    min-height: 44px;
    border-radius: 14px;
    font-weight: 900;
}

@media (max-width: 767.98px) {
    .container-fluid.salon-card-page {
        padding-left: .85rem !important;
        padding-right: .85rem !important;
    }

    .salon-hero-card,
    .salon-control-card,
    .salon-item-card,
    .salon-empty-card {
        border-radius: 22px;
    }

    .salon-top-actions {
        width: 100%;
        display: grid !important;
        grid-template-columns: 1fr 1fr;
    }

    .salon-top-actions .btn {
        width: 100%;
    }

    .salon-summary-number {
        font-size: 1.75rem;
    }

    .salon-actions-grid {
        grid-template-columns: 1fr;
    }
}
