/* App mobile-first / híbrido */
html { -webkit-tap-highlight-color: transparent; }
body.app-shell { overscroll-behavior-y: none; }

.input-field {
    width: 100%;
    border: 1px solid rgb(212 212 216);
    border-radius: 0.75rem;
    padding: 0.625rem 1rem;
    font-size: 1rem;
    min-height: 2.75rem;
    background: inherit;
}
.dark .input-field {
    border-color: rgb(82 82 91);
    background: rgb(39 39 42);
}
.input-field:focus {
    outline: none;
}

[x-cloak] { display: none !important; }
#themeToggle { cursor: pointer; }

/* Nav legado (drawers antigos) */
.nav-link {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s;
}
.nav-link:hover { background: rgb(244 244 245); }
.dark .nav-link:hover { background: rgb(39 39 42); }

/* Header */
.app-header { padding-top: env(safe-area-inset-top); }

/* Alerts */
.app-alert {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
}
.app-alert-success {
    background: rgb(209 250 229);
    color: rgb(6 78 59);
}
.dark .app-alert-success {
    background: rgba(6, 78, 59, 0.35);
    color: rgb(167 243 208);
}
.app-alert-error {
    background: rgb(254 226 226);
    color: rgb(127 29 29);
}
.dark .app-alert-error {
    background: rgba(127, 29, 29, 0.35);
    color: rgb(252 165 165);
}

/* Bottom navigation */
.app-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgb(228 228 231);
    padding-bottom: env(safe-area-inset-bottom);
    backdrop-filter: blur(12px);
}
.dark .app-bottom-nav {
    background: rgba(24, 24, 27, 0.96);
    border-color: rgb(39 39 42);
}
.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.5rem 0.25rem;
    font-size: 0.625rem;
    font-weight: 500;
    color: rgb(113 113 122);
    min-height: 3.5rem;
    max-width: 5rem;
}
.bottom-nav-item span:last-child {
    text-align: center;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.bottom-nav-active { color: #f59e0b; }

/* Agenda compacta */
.agenda-compact .fc {
    font-size: 0.75rem;
}
.agenda-compact .fc-toolbar-title {
    font-size: 1rem !important;
    font-weight: 600;
}
.agenda-compact .fc-button {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.7rem !important;
}
.agenda-compact .fc-daygrid-day-number {
    font-size: 0.7rem;
    padding: 2px 4px;
}
.agenda-compact .fc-col-header-cell-cushion {
    font-size: 0.65rem;
    font-weight: 600;
}
.agenda-compact .fc-daygrid-day-frame {
    min-height: 2.5rem;
}
.agenda-compact .fc-event {
    font-size: 0.65rem;
    padding: 0 2px;
    margin-bottom: 1px;
}

/* Cards mobile agenda */
.agenda-day-cards { display: none; }
@media (max-width: 767px) {
    .agenda-table-wrap { display: none; }
    .agenda-day-cards { display: block; }
}
.agenda-card {
    border: 1px solid rgb(228 228 231);
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: white;
}
.dark .agenda-card {
    border-color: rgb(39 39 42);
    background: rgb(24 24 27);
}

/* Booking público */
.booking-page {
    min-height: calc(100vh - 4rem);
    padding-bottom: env(safe-area-inset-bottom);
}
.booking-card {
    background: rgba(24, 24, 27, 0.85);
    border: 1px solid rgba(var(--color-primary-rgb, 245, 158, 11), 0.2);
    border-radius: 1rem;
    padding: 1rem;
    backdrop-filter: blur(8px);
}
.booking-btn {
    width: 100%;
    min-height: 3rem;
    border-radius: 0.75rem;
    font-weight: 600;
    background: var(--gradient-brand, linear-gradient(135deg, #f59e0b, #10b981));
    color: var(--text-on-brand, #09090b);
    box-shadow: var(--shadow-brand, 0 4px 20px rgba(245, 158, 11, 0.35));
}
.booking-input {
    width: 100%;
    min-height: 3rem;
    background: rgb(24 24 27);
    border: 1px solid rgb(63 63 70);
    border-radius: 0.75rem;
    padding: 0 1rem;
    font-size: 1rem;
}

/* Stat cards touch */
@media (max-width: 640px) {
    .stat-grid-mobile { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
