:root {
    --bg: #f5f7fb;
    --bg-soft: #eef3f8;
    --card: #ffffff;
    --primary: #0a84c6;
    --primary-dark: #07699c;
    --teal: #10b3c8;
    --teal-dark: #0891b2;
    --sidebar-start: #0489b8;
    --sidebar-end: #10b981;
    --sidebar-ink: #effbfd;
    --text: #0f172a;
    --muted: #6b7280;
    --line: #e8eef5;
    --line-strong: #d8e3ef;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #22c55e;
    --shadow: 0 14px 38px rgba(15, 23, 42, .07);
    --shadow-soft: 0 8px 18px rgba(15, 23, 42, .04);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --sidebar-width: 286px;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; font-family: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif; color: var(--text); background: linear-gradient(180deg, #f7fafc 0%, #f2f6fa 100%); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
.icon-16 { width: 16px; height: 16px; }
.icon-18 { width: 18px; height: 18px; }
.icon-20 { width: 20px; height: 20px; }
.app-shell { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--sidebar-start) 0%, var(--sidebar-end) 100%);
    color: var(--sidebar-ink);
    padding: 16px 14px 18px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    box-shadow: 10px 0 32px rgba(2, 132, 199, .14);
    z-index: 20;
}
.brand { display: flex; gap: 14px; align-items: center; }
.brand-side { padding: 8px 10px 14px; }
.brand-logo {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,255,255,.35), rgba(255,255,255,.15));
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 24px rgba(15, 23, 42, .12);
}
.brand-icon { display: inline-flex; align-items: center; justify-content: center; color: white; }
.brand-mark {
    background: linear-gradient(135deg, rgba(255,255,255,.24), rgba(255,255,255,.12));
    border: 1px solid rgba(255,255,255,.20);
    position: relative;
    overflow: hidden;
}
.brand-mark::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.18), transparent 42%);
}
.brand-mark::after {
    content: '';
    position: absolute;
    right: 10px;
    bottom: 9px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 0 0 4px rgba(255,255,255,.14);
}
.brand-mark span {
    position: relative;
    z-index: 1;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.04em;
    color: #fff;
    text-shadow: 0 2px 10px rgba(6, 37, 66, .22);
}
.brand h1 { font-size: 26px; line-height: .98; margin: 0; font-weight: 700; color: white; letter-spacing: -.03em; }
.brand p { margin: 5px 0 0; color: rgba(255,255,255,.84); font-size: 13px; font-weight: 600; letter-spacing: -.01em; }
.branch-box {
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: var(--radius-lg);
    padding: 12px 14px;
    margin: 6px 8px 18px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
}
.branch-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; opacity: .78; margin-bottom: 8px; font-weight: 700; }
.branch-pill { background: rgba(0,0,0,.12); padding: 10px 12px; border-radius: 12px; font-size: 13px; font-weight: 700; color: white; }
.nav { display: flex; flex-direction: column; gap: 8px; padding: 0 8px; }
.nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 16px;
    color: rgba(255,255,255,.9); transition: all .22s ease;
    font-weight: 600; font-size: 15px;
}
.nav a:hover { background: rgba(255,255,255,.13); transform: translateX(2px); }
.nav a.active {
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(245,250,255,.98));
    color: #0b6f95;
    box-shadow: 0 8px 20px rgba(11,111,149,.17);
}
.nav a.active .nav-svg { color: #0b7ac5; }
.nav-title { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.76); margin: 16px 12px 6px; font-weight: 700; }
.nav-svg { width: 20px; height: 20px; color: rgba(255,255,255,.92); flex-shrink: 0; }
.user-card {
    margin-top: auto;
    border-radius: 18px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
}
.avatar { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.24); color: white; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.user-meta { min-width: 0; display: flex; flex-direction: column; }
.user-meta span { font-weight: 700; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { color: rgba(255,255,255,.82); }
.logout-link { margin-left: auto; width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: white; background: rgba(0,0,0,.12); transition: .2s ease; }
.logout-link:hover { background: rgba(0,0,0,.2); }

/* Main */
.main { margin-left: var(--sidebar-width); width: calc(100% - var(--sidebar-width)); padding: 30px 26px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.topbar-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #f59e0b; font-size: 14px; font-weight: 700; }
.topbar h2 { margin: 8px 0 6px; font-size: 46px; line-height: 1.03; font-weight: 700; letter-spacing: -.03em; color: #091629; }
.topbar-subtitle { margin: 0; color: var(--muted); font-size: 18px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.topbar-date { padding: 13px 16px; border-radius: 16px; background: white; border: 1px solid var(--line); color: var(--muted); font-weight: 600; box-shadow: var(--shadow-soft); }

/* Generic UI */
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    padding: 24px;
}
.card h3 { margin: 0 0 14px; font-size: 22px; letter-spacing: -.02em; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.section-title h3 { margin: 0; font-size: 25px; }
.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 136px;
    position: relative;
    overflow: hidden;
}
.metric::after {
    content: '';
    position: absolute;
    right: -24px; bottom: -24px;
    width: 110px; height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(14,165,233,.14), rgba(16,185,129,.06));
}
.metric strong { display: block; font-size: 44px; line-height: 1; margin-top: 12px; font-weight: 700; letter-spacing: -.03em; }
.metric span { color: var(--muted); font-weight: 600; font-size: 15px; }
.metric-icon {
    width: 56px; height: 56px; border-radius: 18px;
    background: linear-gradient(135deg, #0ea5e9, #10b981);
    color: white; display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 14px 26px rgba(14,165,233,.24); position: relative; z-index: 1;
}
.metric-icon svg { width: 24px; height: 24px; }

.btn {
    border: 0; border-radius: 14px; padding: 12px 18px; font-weight: 700;
    cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: .22s ease;
    font-size: 14px;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), #1293d8); color: white; box-shadow: 0 14px 22px rgba(10,132,198,.2); }
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); transform: translateY(-1px); }
.btn-light { background: white; color: var(--text); border: 1px solid var(--line-strong); box-shadow: var(--shadow-soft); }
.btn-light:hover { border-color: #c8d8e9; transform: translateY(-1px); }
.btn-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: 9px 12px; font-size: 12px; border-radius: 12px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
label { color: #334155; font-size: 13px; font-weight: 700; letter-spacing: .02em; }
input, select, textarea {
    width: 100%; border: 1px solid var(--line-strong); border-radius: 16px; padding: 13px 14px;
    font: inherit; background: #fff; outline: none; color: #0f172a; transition: .18s ease;
}
input::placeholder, textarea::placeholder { color: #94a3b8; }
input:focus, select:focus, textarea:focus { border-color: #7dd3fc; box-shadow: 0 0 0 4px rgba(14,165,233,.10); }
textarea { min-height: 112px; resize: vertical; }
.filters {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end;
    padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fbfdff; margin-bottom: 16px;
}
.filters .form-group { min-width: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { padding: 15px 12px; border-bottom: 1px solid #edf2f7; text-align: left; font-size: 14px; vertical-align: top; }
tbody tr:hover { background: #fbfdff; }
th { color: #64748b; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
small { color: #64748b; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 11px; font-size: 12px; font-weight: 700; border: 1px solid transparent; }
.badge-success { background: #ecfdf3; color: #15803d; border-color: #bbf7d0; }
.badge-danger { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.badge-muted { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.alert { border-radius: 18px; padding: 14px 16px; margin-bottom: 18px; font-weight: 700; border: 1px solid transparent; }
.alert-success { background: #ecfdf3; color: #15803d; border-color: #bbf7d0; }
.alert-error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

/* Login */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top left, rgba(14,165,233,.16), transparent 24%), radial-gradient(circle at bottom right, rgba(16,185,129,.18), transparent 24%), linear-gradient(135deg, #eff8ff, #f8fbfd);
    padding: 20px;
}
.login-card {
    max-width: 460px; width: 100%; background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
    border-radius: 28px; padding: 34px; box-shadow: 0 30px 55px rgba(15,23,42,.10); border: 1px solid rgba(255,255,255,.8);
}
.login-card .brand { color: var(--text); margin-bottom: 26px; }
.login-brand-mark { width: 56px; height: 56px; border-radius: 18px; background: linear-gradient(135deg, #0f8dc9, #10b981); box-shadow: 0 14px 28px rgba(14,165,233,.24); }
.login-brand-mark span { font-size: 22px; }
.login-card .brand h1 { color: #0a3656; font-size: 29px; letter-spacing: -.04em; font-weight: 700; }
.login-card .brand p { color: #5b6b7d; font-size: 14px; font-weight: 600; }
.login-card h2 { margin: 0 0 8px; font-size: 31px; letter-spacing: -.04em; font-weight: 700; }
.login-card p { margin: 0 0 22px; color: var(--muted); }
.help { color: var(--muted); font-size: 13px; margin-top: 14px; }

.calendar-box { min-height: 640px; }
.fc { --fc-border-color: #e5edf6; --fc-page-bg-color: #fff; --fc-neutral-bg-color: #f7fafc; --fc-today-bg-color: rgba(14,165,233,.08); }
.fc .fc-button-primary { background: #0ea5e9; border-color: #0ea5e9; }
.fc .fc-button-primary:hover { background: #0284c7; border-color: #0284c7; }
.fc-theme-standard td, .fc-theme-standard th { border-color: #e8eef5; }

hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

@media (max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topbar h2 { font-size: 36px; }
}
@media (max-width: 960px) {
    .sidebar { position: static; width: 100%; height: auto; }
    .app-shell { flex-direction: column; }
    .main { margin-left: 0; width: 100%; padding: 20px 16px; }
    .grid-4, .grid-2, .form-grid, .filters { grid-template-columns: 1fr; }
    .topbar { align-items: flex-start; flex-direction: column; }
    .topbar h2 { font-size: 30px; }
    .branch-box { margin: 6px 0 18px; }
    .nav { padding: 0; }
}


.status-pill { display:inline-flex; align-items:center; border-radius:999px; padding:6px 11px; font-size:12px; font-weight: 700; border:1px solid transparent; }
.status-active { background:#ecfdf3; color:#15803d; border-color:#bbf7d0; }
.status-inactive { background:#f1f5f9; color:#64748b; border-color:#e2e8f0; }
.actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.action-form { display:inline; }
.btn-warning { background:#fff7ed; color:#c2410c; border:1px solid #fed7aa; }
.btn-warning:hover { background:#ffedd5; }
.btn-success { background:#ecfdf3; color:#15803d; border:1px solid #bbf7d0; }
.btn-success:hover { background:#dcfce7; }
.btn-ghost { background:#f8fafc; color:#334155; border:1px solid #e2e8f0; }
.btn-ghost:hover { background:#eef2f7; }
.table-card-actions th:last-child, .table-card-actions td:last-child { min-width: 280px; }
@media (max-width: 720px) {
  .topbar-actions { width:100%; justify-content:flex-start; }
  .topbar-date, .topbar-actions .btn { width:100%; justify-content:center; }
  .table-card-actions th:last-child, .table-card-actions td:last-child { min-width: 220px; }
  .actions .btn { width:100%; justify-content:center; }
}

/* ===== Ajustes responsive v2.2 ===== */
.mobile-menu-toggle,
.sidebar-close,
.sidebar-backdrop { display: none; }
.main, .card, .table-wrap { min-width: 0; }
.table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { min-width: 680px; }
.form-grid > *, .grid > *, input, select, textarea { min-width: 0; }

@media (max-width: 960px) {
    body { overflow-x: hidden; }
    .app-shell { display: block; min-height: 100vh; }
    .mobile-menu-toggle {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 35;
        width: 100%;
        align-items: center;
        gap: 12px;
        padding: 13px 16px;
        border: 0;
        background: linear-gradient(135deg, var(--sidebar-start), var(--sidebar-end));
        color: #fff;
        box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
        cursor: pointer;
    }
    .mobile-menu-toggle strong { font-size: 17px; letter-spacing: -.01em; }
    .hamburger-lines { display: inline-flex; width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.16); align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
    .hamburger-lines i { display: block; width: 18px; height: 2px; border-radius: 999px; background: #fff; }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(86vw, 310px);
        height: 100vh;
        transform: translateX(-106%);
        transition: transform .24s ease;
        z-index: 45;
        overflow-y: auto;
        padding-top: 18px;
    }
    body.menu-open .sidebar { transform: translateX(0); }
    .sidebar-close {
        display: inline-flex;
        position: absolute;
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
        border: 0;
        border-radius: 12px;
        align-items: center;
        justify-content: center;
        background: rgba(0,0,0,.15);
        color: #fff;
        font-size: 25px;
        line-height: 1;
        cursor: pointer;
    }
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15,23,42,.42);
        backdrop-filter: blur(2px);
        z-index: 40;
    }
    body.menu-open .sidebar-backdrop { display: block; }
    .brand-side { padding-right: 48px; }
    .main { margin-left: 0; width: 100%; padding: 20px 14px 32px; }
    .grid-4, .grid-2, .form-grid, .filters { grid-template-columns: 1fr; }
    .topbar { gap: 14px; }
    .topbar h2 { font-size: clamp(30px, 9vw, 40px); }
    .topbar-subtitle { font-size: 16px; line-height: 1.45; }
    .topbar-actions { width: 100%; justify-content: stretch; display: grid; grid-template-columns: 1fr; }
    .topbar-date, .topbar-actions .btn { width: 100%; justify-content: center; }
    .card { border-radius: 22px; padding: 18px; }
    .metric { min-height: 112px; }
    .metric strong { font-size: 38px; }
    .section-title { align-items: flex-start; }
    .section-title h3 { font-size: 24px; }
    .section-title .btn { flex-shrink: 0; }
    .filters { padding: 16px; }
    .actions .btn { width: auto; }
}

@media (max-width: 640px) {
    .main { padding: 18px 12px 28px; }
    .topbar h2 { font-size: 34px; }
    .grid { gap: 14px; }
    .card { padding: 16px; }
    .grid-4 { gap: 14px; }
    .section-title { flex-direction: column; }
    .section-title .btn { width: 100%; justify-content: center; }
    .form-grid { gap: 14px; }
    input, select, textarea { font-size: 16px; padding: 13px 14px; }
    .btn { width: 100%; justify-content: center; }
    .actions { display: grid; grid-template-columns: 1fr; width: 100%; }
    .actions .btn { width: 100%; }
    .table-wrap {
        border: 1px solid var(--line);
        border-radius: 18px;
        background: #fff;
        padding-bottom: 4px;
    }
    .table-wrap table { min-width: 720px; }
    th, td { padding: 13px 10px; }
    .calendar-box { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .calendar-box .fc { min-width: 720px; }
    .fc .fc-toolbar.fc-header-toolbar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        align-items: stretch;
    }
    .fc .fc-toolbar-title { font-size: 22px; text-align: center; }
    .fc .fc-toolbar-chunk { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
    .fc .fc-button { padding: 8px 10px; }
}

/* ===== Ajustes v2.5 - Dashboard por rol y reserva rápida ===== */
.dashboard-user-metrics { max-width: 720px; }
.dashboard-calendar-card { overflow: hidden; }
.dashboard-calendar-box { min-height: 520px; }
.section-note { margin: 6px 0 0; color: var(--muted); font-size: 15px; line-height: 1.45; max-width: 760px; }
.profile-resume {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 4px 0 22px;
}
.profile-resume > div {
    border: 1px solid var(--line);
    background: linear-gradient(135deg, #f8fafc, #eef9ff);
    border-radius: 18px;
    padding: 14px 16px;
}
.profile-resume span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.profile-resume strong { display: block; font-size: 16px; color: var(--text); }
.form-help { margin-top: 2px; color: #64748b; font-size: 12px; }
.reserva-fast-card { max-width: 1120px; }
.form-grid-fast { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1200px) {
    .form-grid-fast { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .dashboard-user-metrics { max-width: none; }
    .dashboard-calendar-box { min-height: 560px; }
    .form-grid-fast { grid-template-columns: 1fr; }
    .profile-resume { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .dashboard-calendar-box { min-height: 620px; }
    .dashboard-calendar-box .fc { min-width: 720px; }
}

/* v2.6 - Sala automática por sede */
.readonly-field {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    padding: 13px 14px;
    background: linear-gradient(135deg, #f8fafc, #eef9ff);
    color: #0f172a;
    font-weight: 700;
    min-height: 48px;
    display: flex;
    align-items: center;
}

/* v2.7 - Dashboard usuario pro: calendario protagonista */
.dashboard-user-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 28px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(14,165,233,.12), rgba(16,185,129,.11)), #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.hero-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 6px 11px;
    border-radius: 999px;
    background: #ecfeff;
    color: #0891b2;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.dashboard-user-hero h3 {
    margin: 0 0 8px;
    max-width: 760px;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.08;
    letter-spacing: -.04em;
}
.dashboard-user-hero p {
    margin: 0;
    max-width: 760px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.5;
}
.dashboard-user-hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.btn-hero {
    min-height: 48px;
    white-space: nowrap;
}
.dashboard-calendar-card-full {
    padding: 26px 28px 30px;
}
.dashboard-calendar-large {
    min-height: 680px;
}
.dashboard-calendar-large .fc {
    font-size: 14px;
}
.dashboard-calendar-large .fc .fc-toolbar-title {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.03em;
}
.dashboard-calendar-large .fc-timegrid-slot {
    height: 2.35em;
}
.calendar-title-row .section-note {
    margin-top: 4px;
}

@media (max-width: 960px) {
    .dashboard-user-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px;
    }
    .dashboard-user-hero-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .dashboard-user-hero-actions .btn {
        width: auto;
    }
    .dashboard-calendar-large {
        min-height: 620px;
    }
}

@media (max-width: 640px) {
    .dashboard-user-hero {
        padding: 18px;
        gap: 16px;
    }
    .dashboard-user-hero h3 {
        font-size: 25px;
    }
    .dashboard-user-hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .dashboard-user-hero-actions .btn {
        width: 100%;
    }
    .dashboard-calendar-card-full {
        padding: 18px;
    }
    .dashboard-calendar-large {
        min-height: 650px;
    }
    .dashboard-calendar-large .fc {
        min-width: 820px;
    }
}

/* v2.8 - Dashboard usuario optimizado: agenda rápida al costado y calendario protagonista */
.user-dashboard-top {
    display: grid;
    grid-template-columns: minmax(420px, 0.9fr) minmax(520px, 1.5fr);
    gap: 18px;
    align-items: stretch;
}
.user-metric-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.user-dashboard-top .metric {
    min-height: 132px;
}
.dashboard-user-hero-inline {
    height: 100%;
    min-height: 132px;
    padding: 20px 24px;
}
.dashboard-user-hero-inline h3 {
    font-size: clamp(22px, 2.2vw, 30px);
    max-width: 680px;
}
.dashboard-user-hero-inline p {
    max-width: 720px;
}
.dashboard-user-calendar-main {
    margin-top: 0;
}
.dashboard-user-calendar-main .calendar-title-row {
    margin-bottom: 10px;
}
.dashboard-user-calendar-main .dashboard-calendar-large {
    min-height: 720px;
}

@media (max-width: 1350px) {
    .user-dashboard-top {
        grid-template-columns: 1fr;
    }
    .dashboard-user-hero-inline {
        min-height: auto;
    }
}
@media (max-width: 760px) {
    .user-metric-pair {
        grid-template-columns: 1fr;
    }
    .dashboard-user-hero-inline {
        padding: 18px;
    }
}


/* v2.9 - Dashboard de usuario más limpio: agenda arriba, calendario protagonista */
.user-dashboard-top {
    grid-template-columns: minmax(420px, .78fr) minmax(650px, 1.72fr);
    align-items: stretch;
    margin-bottom: 8px;
}
.dashboard-user-hero-compact {
    min-height: 132px;
    padding: 18px 24px;
    box-shadow: 0 16px 35px rgba(14,165,233,.07);
}
.dashboard-user-hero-compact .hero-kicker {
    margin-bottom: 7px;
    padding: 5px 10px;
    font-size: 10px;
}
.dashboard-user-hero-compact h3 {
    max-width: 640px;
    font-size: clamp(20px, 2vw, 27px);
    line-height: 1.05;
}
.dashboard-user-hero-compact p {
    max-width: 700px;
    font-size: 14px;
}
.dashboard-user-calendar-main {
    margin-top: 0;
    padding-top: 26px;
}
.dashboard-user-calendar-main .calendar-title-row-user {
    align-items: center;
    margin-bottom: 12px;
}
.dashboard-user-calendar-main .dashboard-calendar-large {
    min-height: 760px;
}
.calendar-inline-action {
    white-space: nowrap;
}
@media (max-width: 1350px) {
    .user-dashboard-top { grid-template-columns: 1fr; }
    .dashboard-user-hero-compact { min-height: auto; }
}
@media (max-width: 760px) {
    .calendar-title-row-user { flex-direction: column; align-items: flex-start !important; }
    .calendar-inline-action { width: 100%; justify-content: center; }
    .dashboard-user-calendar-main .dashboard-calendar-large { min-height: 660px; }
}


/* v3.0 - Usuario común: se elimina botón duplicado dentro del calendario */
.calendar-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 10px 14px;
    border-radius: 999px;
    background: #eefaf9;
    color: #0f766e;
    border: 1px solid #c8f3ef;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -.01em;
}
.calendar-status-pill::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #10b981;
    margin-right: 8px;
    box-shadow: 0 0 0 4px rgba(16,185,129,.14);
}
@media (max-width: 760px) {
    .calendar-status-pill { width: 100%; }
}

/* v3.1 - Reserva rápida en modal para desktop */
/* v3.2 - protección para que el formulario modal no se muestre inline si el CSS queda en caché */
.modal-backdrop-app[hidden],
.reserva-modal[hidden] {
    display: none !important;
}

.modal-backdrop-app {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .42);
    backdrop-filter: blur(5px);
    z-index: 80;
    opacity: 0;
    visibility: hidden;
    transition: .22s ease;
}
.reserva-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: .22s ease;
}
.reserva-modal[aria-hidden="false"],
.reserva-modal[aria-hidden="false"] + * {
    pointer-events: auto;
}
body.reserva-modal-open .modal-backdrop-app,
.reserva-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
body.reserva-modal-open { overflow: hidden; }
.reserva-modal-panel {
    width: min(980px, 96vw);
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: 0 35px 80px rgba(15, 23, 42, .22);
    padding: 26px;
    position: relative;
    transform: translateY(14px) scale(.98);
    transition: .22s ease;
}
.reserva-modal[aria-hidden="false"] .reserva-modal-panel {
    transform: translateY(0) scale(1);
}
.reserva-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: #fff;
    color: #0f172a;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}
.reserva-modal-header {
    padding-right: 54px;
    margin-bottom: 18px;
}
.reserva-modal-header h3 {
    margin: 0 0 6px;
    font-size: 34px;
    line-height: 1.06;
    letter-spacing: -.04em;
}
.reserva-modal-header p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}
.profile-resume-modal {
    margin-bottom: 18px;
}
.form-grid-modal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
}
.reserva-modal form .form-group {
    margin-bottom: 14px;
}
.reserva-modal form textarea {
    min-height: 92px;
}
.reserva-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 10px;
}
.reserva-modal-alert {
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-weight: 700;
    border: 1px solid transparent;
}
.reserva-modal-alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}
.reserva-modal-alert-success {
    background: #ecfdf3;
    color: #15803d;
    border-color: #bbf7d0;
}
@media (max-width: 900px) {
    .reserva-modal,
    .modal-backdrop-app {
        display: none !important;
    }
}
@media (max-width: 640px) {
    .form-grid-modal,
    .profile-resume-modal {
        grid-template-columns: 1fr;
    }
    .reserva-modal-actions {
        flex-direction: column-reverse;
    }
    .reserva-modal-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* v3.3 - Login profesional y modal de reserva más compacto */
.login-page-pro {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        linear-gradient(135deg, rgba(14, 165, 233, .10), rgba(16, 185, 129, .08)),
        #eef8fc;
}
.login-shell-pro {
    width: min(1040px, 96vw);
    min-height: 620px;
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    background: #fff;
    border: 1px solid rgba(203, 213, 225, .75);
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 38px 90px rgba(15, 23, 42, .14);
}
.login-brand-panel {
    padding: 42px;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(6, 135, 180, .96), rgba(16, 185, 129, .96)),
        #0891b2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.login-brand-panel::before {
    content: '';
    position: absolute;
    width: 310px;
    height: 310px;
    right: -120px;
    top: -110px;
    border-radius: 999px;
    border: 44px solid rgba(255,255,255,.10);
}
.login-brand-panel::after {
    content: '';
    position: absolute;
    left: -80px;
    bottom: -90px;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
}
.login-brand-top,
.login-brand-content,
.login-feature-grid {
    position: relative;
    z-index: 1;
}
.login-brand-top {
    display: flex;
    align-items: center;
    gap: 16px;
}
.login-brand-top h1 {
    margin: 0;
    font-size: 34px;
    line-height: .96;
    font-weight: 700;
    letter-spacing: -.05em;
}
.login-brand-top p {
    margin: 6px 0 0;
    font-weight: 600;
    color: rgba(255,255,255,.86);
}
.login-brand-content {
    margin: 60px 0;
}
.login-brand-content h2 {
    max-width: 420px;
    margin: 12px 0 14px;
    font-size: 40px;
    line-height: 1.02;
    font-weight: 700;
    letter-spacing: -.055em;
}
.login-brand-content p {
    max-width: 420px;
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
    color: rgba(255,255,255,.86);
}
.login-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
}
.login-kicker.muted {
    color: #0785aa;
    background: #e7faff;
}
.login-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.login-feature-grid div {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(8px);
}
.login-feature-grid strong {
    display: block;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
}
.login-feature-grid span {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,.82);
}
.login-form-panel {
    padding: 56px 54px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.login-form-head h2 {
    margin: 16px 0 10px;
    font-size: 40px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -.055em;
    color: #08162a;
}
.login-form-head p {
    margin: 0 0 28px;
    max-width: 440px;
    color: #64748b;
    line-height: 1.6;
    font-size: 15px;
}
.login-form-panel form {
    display: grid;
    gap: 18px;
}
.login-submit {
    width: 100%;
    justify-content: center;
    padding: 15px 18px;
    border-radius: 16px;
    margin-top: 4px;
}
.login-help {
    margin-top: 18px;
    text-align: center;
    color: #64748b;
}
.login-page-pro .login-brand-mark {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    flex-shrink: 0;
    box-shadow: 0 16px 36px rgba(15,23,42,.16);
}
.login-page-pro .login-brand-mark span {
    font-size: 25px;
}

@media (min-width: 901px) {
    .reserva-modal-panel {
        width: min(960px, 94vw);
        max-height: 90vh;
        padding: 24px 26px;
    }
    .reserva-modal-header {
        margin-bottom: 14px;
    }
    .reserva-modal-header h3 {
        font-size: 32px;
    }
    .reserva-modal .profile-resume-modal {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-bottom: 14px;
    }
    .form-grid-modal {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 12px;
        margin-bottom: 12px;
    }
    .form-grid-modal .form-group:nth-child(1) { grid-column: span 3; }
    .form-grid-modal .form-group:nth-child(2) { grid-column: span 3; }
    .form-grid-modal .form-group-date { grid-column: span 2 !important; }
    .form-grid-modal .form-group-time-start { grid-column: span 2 !important; }
    .form-grid-modal .form-group-time-end { grid-column: span 2 !important; }
    .reserva-modal form .form-group {
        margin-bottom: 10px;
    }
    .reserva-modal form textarea {
        min-height: 76px;
    }
    .reserva-modal-actions {
        margin-top: 8px;
    }
}

@media (min-width: 901px) {
    .form-grid-fast {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 14px;
    }
    .form-grid-fast .form-group:nth-child(1) { grid-column: span 3; }
    .form-grid-fast .form-group:nth-child(2) { grid-column: span 3; }
    .form-grid-fast .form-group-date { grid-column: span 2 !important; }
    .form-grid-fast .form-group-time-start { grid-column: span 2 !important; }
    .form-grid-fast .form-group-time-end { grid-column: span 2 !important; }
}

@media (max-width: 900px) {
    .login-page-pro {
        padding: 18px;
    }
    .login-shell-pro {
        min-height: auto;
        grid-template-columns: 1fr;
        border-radius: 28px;
    }
    .login-brand-panel {
        padding: 28px;
    }
    .login-brand-content {
        margin: 32px 0;
    }
    .login-brand-content h2 {
        font-size: 30px;
    }
    .login-form-panel {
        padding: 32px 28px;
    }
    .login-form-head h2 {
        font-size: 32px;
    }
}
@media (max-width: 560px) {
    .login-feature-grid {
        grid-template-columns: 1fr;
    }
    .login-brand-top h1 {
        font-size: 28px;
    }
    .login-brand-content h2 {
        font-size: 27px;
    }
}


/* v3.4 - Ajuste administrador: gestión de usuarios más compacta */
.admin-users-layout {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
.create-user-card {
    padding: 20px;
}
.compact-card-title {
    margin-bottom: 14px;
}
.compact-card-title h3 {
    margin: 0;
    font-size: 21px;
    letter-spacing: -.03em;
}
.compact-card-title p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}
.form-grid-compact {
    grid-template-columns: 1fr !important;
    gap: 11px;
}
.form-grid-compact .form-group {
    gap: 6px;
}
.form-grid-compact label {
    font-size: 12px;
}
.form-grid-compact input,
.form-grid-compact select {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 13px;
    font-size: 14px;
}
.create-user-card .btn {
    margin-top: 14px;
    padding: 11px 15px;
    border-radius: 13px;
}
.registered-users-card {
    padding: 20px;
    overflow: hidden;
}
.users-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.counter-pill {
    white-space: nowrap;
    border: 1px solid #bae6fd;
    background: #eff6ff;
    color: #0369a1;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    padding: 7px 10px;
}
.registered-users-card .table-wrap {
    overflow-x: visible;
}
.users-admin-table {
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed;
}
.users-admin-table th,
.users-admin-table td {
    padding: 13px 8px;
    font-size: 13px;
    line-height: 1.25;
    vertical-align: middle;
    overflow-wrap: anywhere;
}
.users-admin-table th:nth-child(1), .users-admin-table td:nth-child(1) { width: 13%; }
.users-admin-table th:nth-child(2), .users-admin-table td:nth-child(2) { width: 18%; }
.users-admin-table th:nth-child(3), .users-admin-table td:nth-child(3) { width: 13%; }
.users-admin-table th:nth-child(4), .users-admin-table td:nth-child(4) { width: 15%; }
.users-admin-table th:nth-child(5), .users-admin-table td:nth-child(5) { width: 12%; }
.users-admin-table th:nth-child(6), .users-admin-table td:nth-child(6) { width: 29%; }
.users-admin-table .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}
.users-admin-table .action-form {
    display: inline-flex;
    margin: 0;
}
.btn-action-compact {
    padding: 8px 10px;
    font-size: 11px;
    border-radius: 11px;
    white-space: nowrap;
}

@media (max-width: 1400px) {
    .admin-users-layout {
        grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
    }
    .users-admin-table th,
    .users-admin-table td {
        font-size: 12px;
        padding: 12px 6px;
    }
    .btn-action-compact {
        padding: 7px 8px;
        font-size: 10.5px;
    }
}
@media (max-width: 1180px) {
    .admin-users-layout {
        grid-template-columns: 1fr;
    }
    .form-grid-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .registered-users-card .table-wrap {
        overflow-x: auto;
    }
    .users-admin-table {
        min-width: 780px !important;
    }
}
@media (max-width: 720px) {
    .form-grid-compact {
        grid-template-columns: 1fr !important;
    }
    .users-title-row {
        flex-direction: column;
    }
    .btn-full-mobile {
        width: 100%;
        justify-content: center;
    }
}

/* v3.5 - Eventos de calendario más informativos: solicitante y área */
.fc-event {
    border: 0 !important;
    border-radius: 8px !important;
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(2, 132, 199, .18);
}
.fc-v-event .fc-event-main {
    padding: 0 !important;
}
.agro-event-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 7px;
    line-height: 1.15;
    color: #fff;
    min-height: 100%;
    background: linear-gradient(135deg, #1688d8, #0f74c9);
}
.agro-event-time {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -.01em;
}
.agro-event-main {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.agro-event-place,
.agro-event-owner {
    font-size: 10.5px;
    font-weight: 600;
    opacity: .94;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.agro-event-owner {
    opacity: .98;
}
.fc-daygrid-event .agro-event-card {
    padding: 5px 7px;
}
.fc-daygrid-event .agro-event-place {
    display: none;
}
@media (max-width: 900px) {
    .agro-event-card {
        padding: 5px 6px;
    }
    .agro-event-main {
        font-size: 11px;
    }
    .agro-event-place,
    .agro-event-owner {
        font-size: 9.5px;
    }
}


/* v3.6 - Colores suaves por sede en calendario */
.fc-event.sede-agritac {
    background: transparent !important;
    box-shadow: 0 6px 14px rgba(34, 197, 94, .16) !important;
}
.fc-event.sede-agritac .agro-event-card {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #14532d;
    border: 1px solid #86efac;
    border-left: 5px solid #22c55e;
}
.fc-event.sede-procom {
    background: transparent !important;
    box-shadow: 0 6px 14px rgba(251, 146, 60, .16) !important;
}
.fc-event.sede-procom .agro-event-card {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    color: #7c2d12;
    border: 1px solid #fdba74;
    border-left: 5px solid #fb923c;
}
.fc-event.sede-tgf {
    background: transparent !important;
    box-shadow: 0 6px 14px rgba(168, 85, 247, .14) !important;
}
.fc-event.sede-tgf .agro-event-card {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    color: #4c1d95;
    border: 1px solid #d8b4fe;
    border-left: 5px solid #a855f7;
}
.fc-event.sede-default .agro-event-card {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #075985;
    border: 1px solid #7dd3fc;
    border-left: 5px solid #0ea5e9;
}
.fc-event.sede-agritac .agro-event-place,
.fc-event.sede-agritac .agro-event-owner,
.fc-event.sede-procom .agro-event-place,
.fc-event.sede-procom .agro-event-owner,
.fc-event.sede-tgf .agro-event-place,
.fc-event.sede-tgf .agro-event-owner,
.fc-event.sede-default .agro-event-place,
.fc-event.sede-default .agro-event-owner {
    opacity: .88;
}
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .04);
}
.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}
.legend-agritac { background: #22c55e; box-shadow: 0 0 0 3px #dcfce7; }
.legend-procom { background: #fb923c; box-shadow: 0 0 0 3px #ffedd5; }
.legend-tgf { background: #a855f7; box-shadow: 0 0 0 3px #f3e8ff; }
@media (max-width: 720px) {
    .calendar-legend {
        width: 100%;
    }
    .calendar-legend span {
        flex: 1 1 auto;
        justify-content: center;
        font-size: 11px;
        padding: 6px 8px;
    }
}

/* v3.7 - Reservas finalizadas o canceladas en gris suave */
.fc-event.sede-finalizada,
.fc-event.sede-cancelada {
    border: 0 !important;
    background: transparent !important;
}
.fc-event.sede-finalizada .agro-event-card {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0) !important;
    color: #334155 !important;
    border-left: 4px solid #94a3b8 !important;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .28) !important;
}
.fc-event.sede-cancelada .agro-event-card {
    background: linear-gradient(135deg, #f8fafc, #e5e7eb) !important;
    color: #64748b !important;
    border-left: 4px dashed #9ca3af !important;
    box-shadow: inset 0 0 0 1px rgba(156, 163, 175, .24) !important;
    opacity: .92;
}
.fc-event.sede-finalizada .agro-event-place,
.fc-event.sede-finalizada .agro-event-owner,
.fc-event.sede-cancelada .agro-event-place,
.fc-event.sede-cancelada .agro-event-owner {
    color: #475569 !important;
}
.agro-event-status {
    margin-top: 3px;
    display: inline-flex;
    width: fit-content;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(100, 116, 139, .14);
    color: #475569;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.legend-finalizada { background: #94a3b8; box-shadow: 0 0 0 3px #e2e8f0; }
.legend-cancelada { background: #cbd5e1; box-shadow: 0 0 0 3px #f1f5f9; }

/* v3.9 - Validación automática de disponibilidad antes de registrar */
.availability-feedback {
    margin: 12px 0 4px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    border: 1px solid transparent;
}
.availability-feedback-neutral {
    background: #f8fafc;
    color: #64748b;
    border-color: #e2e8f0;
}
.availability-feedback-checking {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.availability-feedback-success {
    background: #ecfdf3;
    color: #15803d;
    border-color: #bbf7d0;
}
.availability-feedback-error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}
.btn:disabled,
button:disabled {
    opacity: .58;
    cursor: not-allowed;
    transform: none !important;
}


/* v3.10 - Reserva admin compacta y validación desde hora inicio */
@media (min-width: 901px) {
    .form-grid-admin .form-group:nth-child(3) {
        grid-column: span 6;
    }
    .form-grid-admin .form-group-date,
    .form-grid-admin .form-group-time-start,
    .form-grid-admin .form-group-time-end {
        grid-column: span 2 !important;
    }
}


/* v3.12 - Reserva directa desde calendario + PWA */
.fc-timegrid-slot, .fc-daygrid-day { cursor: pointer; }
.fc-timegrid-slot:hover { background: rgba(14, 165, 233, .07); }
.duration-group { grid-column: 1 / -1 !important; }
.duration-options { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:10px; }
.duration-options button { width:100%; min-height:44px; border:1px solid #d8e4ee; background:#fff; color:#334155; border-radius:12px; padding:9px 10px; font:inherit; font-weight:700; line-height:1.15; white-space:nowrap; cursor:pointer; }
.duration-options button.active { color:#fff; background:#1187c9; border-color:#1187c9; box-shadow:0 8px 18px rgba(17,135,201,.2); }
.optional-label { color:#94a3b8; font-weight:600; }
.pwa-install-button { width:100%; margin-top:14px; border:1px solid #cfe3ef; background:#f5fbfe; border-radius:16px; padding:12px; display:flex; align-items:center; gap:12px; text-align:left; cursor:pointer; }
.pwa-install-button img { width:44px; height:44px; border-radius:12px; }
.pwa-install-button span { display:flex; flex-direction:column; color:#0f172a; }
.pwa-install-button small { color:#64748b; margin-top:2px; }
.pwa-ios-help { margin-top:12px; padding:12px 14px; border-radius:14px; background:#eef8fc; color:#334155; font-size:13px; line-height:1.4; }
@media(max-width:700px){
 .reserva-modal { align-items:stretch; padding:0; }
 .reserva-modal-panel { min-height:100dvh; max-height:100dvh; border-radius:0; overflow:auto; }
 .duration-options { display:grid; grid-template-columns:repeat(2,1fr); }
 .duration-options button { width:100%; }
}


/* v3.13 - refinamientos visuales mobile/app + dashboard usuario */
.brand-mark.brand-mark-image {
    background: transparent;
    border: 0;
    box-shadow: none;
}
.brand-mark.brand-mark-image::before,
.brand-mark.brand-mark-image::after {
    display: none;
}
.brand-mark.brand-mark-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.dashboard-user-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    background: linear-gradient(135deg, #f6fcfe 0%, #eff8fb 100%);
}
.dashboard-user-strip-copy h3 {
    margin: 8px 0 6px;
    font-size: 24px;
    letter-spacing: -.02em;
}
.dashboard-user-strip-copy p {
    margin: 0;
    color: var(--muted);
}
.dashboard-user-strip-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.dashboard-user-calendar-main .dashboard-calendar-large {
    min-height: 760px;
}

.fc .fc-timegrid-event-harness,
.fc .fc-daygrid-event-harness {
    margin-right: 2px;
}
.fc-timegrid-event .fc-event-main {
    height: 100%;
}
.agro-event-card {
    justify-content: flex-start;
}
.agro-event-main {
    white-space: normal;
    overflow: hidden;
    text-overflow: initial;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    line-height: 1.15;
    word-break: break-word;
}
.agro-event-place,
.agro-event-owner {
    white-space: normal;
    overflow: hidden;
    text-overflow: initial;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    line-height: 1.12;
    word-break: break-word;
}
.agro-event-card-compact {
    padding: 5px 6px;
    gap: 1px;
}
.agro-event-card-compact .agro-event-time {
    font-size: 10.5px;
}
.agro-event-card-compact .agro-event-main {
    font-size: 11.5px;
    -webkit-line-clamp: 2;
}
.agro-event-card-compact .agro-event-status {
    margin-top: 2px;
    font-size: 9px;
    padding: 1px 5px;
}
.agro-event-card-medium .agro-event-main {
    font-size: 11.5px;
}
.agro-event-owner-short {
    font-size: 10px;
}

@media (max-width: 900px) {
    .dashboard-user-strip {
        flex-direction: column;
        align-items: flex-start;
    }
    .dashboard-user-strip-actions {
        width: 100%;
        justify-content: stretch;
    }
    .dashboard-user-strip-actions .btn {
        flex: 1 1 220px;
        justify-content: center;
    }
}

@media (display-mode: standalone) {
    .login-page-pro {
        padding: 18px;
    }
    .login-shell-pro {
        max-width: 560px;
        width: 100%;
        min-height: auto;
        grid-template-columns: 1fr;
        border-radius: 28px;
        box-shadow: 0 20px 50px rgba(15, 23, 42, .14);
    }
    .login-brand-panel {
        display: none;
    }
    .login-form-panel {
        padding: 32px 28px;
    }
}

body.display-standalone .login-shell-pro {
    max-width: 560px;
    width: 100%;
    min-height: auto;
    grid-template-columns: 1fr;
}
body.display-standalone .login-brand-panel {
    display: none;
}
body.display-standalone .login-form-panel {
    padding: 32px 28px;
}


/* v3.14 - acceso directo al calendario y experiencia móvil */
.mobile-app-logo {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    object-fit: cover;
    box-shadow: 0 6px 14px rgba(0,0,0,.14);
}
.calendar-title-compact-user {
    margin-bottom: 8px;
}
.calendar-header-tools {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.calendar-title-compact-user .calendar-legend {
    margin-top: 0;
}
.dashboard-user-calendar-main {
    margin-top: 0;
}
.dashboard-user-calendar-main .dashboard-calendar-large {
    min-height: 790px;
}

@media (max-width: 900px) {
    .login-page-pro {
        padding: 0;
        min-height: 100dvh;
        align-items: stretch;
    }
    .login-shell-pro {
        width: 100%;
        max-width: none;
        min-height: 100dvh;
        grid-template-columns: 1fr;
        border-radius: 0;
        box-shadow: none;
    }
    .login-brand-panel {
        display: none !important;
    }
    .login-form-panel {
        width: 100%;
        min-height: 100dvh;
        padding: 34px 28px;
        justify-content: center;
    }
    .login-form-head {
        margin-bottom: 22px;
    }
    .login-form-head h2 {
        font-size: 36px;
        margin-bottom: 8px;
    }
    .login-form-head p {
        max-width: 430px;
    }
    .calendar-title-compact-user {
        align-items: flex-start;
        gap: 10px;
    }
    .calendar-header-tools {
        width: 100%;
        align-items: stretch;
    }
    .calendar-header-tools > .btn {
        width: 100%;
        justify-content: center;
    }
    .dashboard-user-calendar-main {
        padding: 16px 12px;
    }
    .dashboard-user-calendar-main .dashboard-calendar-large {
        min-height: 720px;
    }
    .fc .fc-toolbar {
        gap: 8px;
    }
    .fc .fc-toolbar-title {
        font-size: 20px !important;
    }
}

@media (max-width: 560px) {
    .login-form-panel {
        padding: 28px 20px;
    }
    .login-form-head h2 {
        font-size: 32px;
    }
    .pwa-install-button {
        padding: 12px;
    }
    .calendar-legend {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .calendar-legend span {
        width: 100%;
    }
}


/* v3.15 - Popup universal, cabecera compacta y reserva móvil reforzada */
.topbar-compact-dashboard {
    margin-bottom: 12px;
    align-items: center;
}
.topbar-compact-dashboard .topbar-eyebrow,
.topbar-compact-dashboard .topbar-subtitle {
    display: none;
}
.topbar-compact-dashboard h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1;
}
.topbar-compact-dashboard .topbar-date {
    padding: 10px 14px;
}
.page-dashboard.role-user .main {
    padding-top: 18px;
}
.page-dashboard.role-user .dashboard-calendar-card {
    padding-top: 18px;
}
.page-dashboard.role-user .calendar-title-row-user {
    margin-bottom: 10px;
}
.page-dashboard.role-user .calendar-title-row-user h3 {
    font-size: 23px;
}

@media (max-width: 900px) {
    .topbar-compact-dashboard {
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 8px;
    }
    .topbar-compact-dashboard h2 {
        font-size: 24px;
    }
    .topbar-compact-dashboard .topbar-actions {
        width: auto;
        margin-left: auto;
    }
    .topbar-compact-dashboard .topbar-date {
        display: none;
    }
    .topbar-compact-dashboard .btn {
        width: auto;
        padding: 9px 12px;
        font-size: 12px;
    }
    .page-dashboard.role-user .main {
        padding-top: 10px;
    }
    .page-dashboard.role-user .dashboard-calendar-card {
        padding: 14px;
        border-radius: 20px;
    }
    .page-dashboard.role-user .calendar-title-row-user {
        align-items: flex-start;
        gap: 8px;
    }
    .page-dashboard.role-user .calendar-title-row-user h3 {
        font-size: 20px;
    }
    .page-dashboard.role-user .section-note {
        font-size: 12px;
        margin-top: 4px;
    }
    .fc-timegrid-slot-lane,
    .fc-timegrid-slot {
        touch-action: pan-y;
    }
}


/* v3.16 - flujo móvil de reserva en página */
@media (max-width: 900px) {
    .reserva-fast-card {
        padding: 18px;
        border-radius: 22px;
    }
    .reserva-fast-card .section-title {
        align-items: flex-start;
        gap: 10px;
    }
    .reserva-fast-card .profile-resume {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .reserva-fast-card .form-grid-fast,
    .reserva-fast-card .form-grid-admin {
        grid-template-columns: 1fr !important;
    }
    .reserva-fast-card .duration-options {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .reserva-fast-card .duration-options button {
        width: 100%;
        min-height: 44px;
    }
    .reserva-fast-card textarea {
        min-height: 110px;
    }
}
@media (max-width: 520px) {
    .reserva-fast-card .profile-resume {
        grid-template-columns: 1fr;
    }
}

/* v3.19 - El aviso de instalación permanece oculto hasta que el navegador confirme que puede instalarse. */
.pwa-install-button[hidden],
.pwa-ios-help[hidden] {
    display: none !important;
}

/* v3.19.2 - Identidad visual Talsa Grape Farms */
:root {
    --primary: #66338f;
    --primary-dark: #4f246f;
    --teal: #7f4bab;
    --teal-dark: #66338f;
    --sidebar-start: #4f246f;
    --sidebar-end: #7b45a7;
    --sidebar-ink: #fff9ff;
    --bg: #f7f4fa;
    --bg-soft: #f1eaf7;
    --line: #ece4f2;
    --line-strong: #dacbe6;
    --shadow: 0 14px 38px rgba(79, 36, 111, .08);
    --shadow-soft: 0 8px 18px rgba(79, 36, 111, .05);
}
body {
    background: linear-gradient(180deg, #fbf9fd 0%, #f5f1f8 100%);
}
.sidebar {
    background:
        radial-gradient(circle at 100% 5%, rgba(255,255,255,.12), transparent 28%),
        linear-gradient(180deg, #512572 0%, #683391 52%, #7b45a7 100%);
    box-shadow: 10px 0 32px rgba(79,36,111,.18);
}
.sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .13;
    background-image: radial-gradient(ellipse at center, rgba(255,255,255,.55) 0 35%, transparent 37%);
    background-size: 24px 40px;
    background-position: 8px 2px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.45), transparent 50%);
}
.sidebar > * { position: relative; z-index: 1; }
.login-company-logo {
    width: 150px;
    max-height: 78px;
    margin-bottom: 28px;
    padding: 8px 12px;
    border-radius: 18px;
    background: rgba(255,255,255,.95);
    box-shadow: 0 14px 30px rgba(42,16,61,.18);
    position: relative;
    z-index: 1;
}
.nav a.active {
    color: #5d2d82;
    box-shadow: 0 8px 20px rgba(66,28,94,.18);
}
.nav a.active .nav-svg { color: #66338f; }
.btn-primary {
    background: linear-gradient(135deg, #5b287f, #7b45a7);
    box-shadow: 0 14px 22px rgba(102,51,143,.24);
}
.btn-primary:hover { background: linear-gradient(135deg, #4f246f, #66338f); }
input:focus, select:focus, textarea:focus {
    border-color: #a982c4;
    box-shadow: 0 0 0 4px rgba(102,51,143,.11);
}
.metric-icon { background: linear-gradient(135deg, #5b287f, #8b58b3); box-shadow: 0 14px 26px rgba(102,51,143,.23); }
.login-page-pro {
    background:
        radial-gradient(circle at top left, rgba(102,51,143,.14), transparent 25%),
        radial-gradient(circle at bottom right, rgba(146,104,178,.14), transparent 26%),
        linear-gradient(135deg, #f8f3fb, #fcfbfd);
}
.login-brand-panel {
    background:
        radial-gradient(circle at 78% 18%, rgba(255,255,255,.10), transparent 28%),
        linear-gradient(145deg, rgba(79,36,111,.99), rgba(123,69,167,.98)),
        #66338f;
}
.login-brand-panel::before { border-color: rgba(255,255,255,.09); }
.login-kicker.muted { color: #66338f; background: #f1e8f7; }
.login-form-head h2 { color: #26132f; }
.login-submit { background: linear-gradient(135deg, #5b287f, #7b45a7); }
.fc { --fc-today-bg-color: rgba(102,51,143,.07); }
.fc .fc-button-primary { background: #66338f; border-color: #66338f; }
.fc .fc-button-primary:hover,
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active { background: #4f246f; border-color: #4f246f; }
.fc-timegrid-slot:hover { background: rgba(102,51,143,.055); }
.duration-options button.active {
    background: #66338f;
    border-color: #66338f;
    box-shadow: 0 8px 18px rgba(102,51,143,.22);
}
.pwa-install-button {
    border-color: #d9c8e7;
    background: linear-gradient(180deg, #fbf8fd, #f4edf9);
    box-shadow: 0 8px 20px rgba(102,51,143,.07);
}
.pwa-install-button:hover { border-color: #b997d0; background: #f1e7f7; }
.pwa-install-button span { color: #2c1738; }
.pwa-install-button small { color: #765d83; }
.pwa-ios-help { background: #f3ebf8; color: #4b3458; }
.mobile-menu-toggle { background: linear-gradient(135deg, #5b287f, #7b45a7); }
.topbar-eyebrow { color: #7b45a7; }
.badge-success { background: #edf9ef; }

/* Colores funcionales por sede: se conservan sin cambios corporativos */
.fc-event.sede-agritac .agro-event-card { background: #dcfce7; border-color: #22c55e; color: #14532d; }
.fc-event.sede-procom .agro-event-card { background: #ffedd5; border-color: #f97316; color: #7c2d12; }
.fc-event.sede-tgf .agro-event-card { background: #f1e4fb; border-color: #9333ea; color: #581c87; }
.legend-agritac { background: #22c55e !important; }
.legend-procom { background: #f97316 !important; }
.legend-tgf { background: #9333ea !important; }

@media (max-width: 900px) {
    .login-company-logo { display: none; }
}


/* v3.20.0 - Calendario: desplazamiento táctil y formato horario uniforme */
.fc .fc-timegrid-slot-label-cushion {
    font-variant-numeric: tabular-nums;
    min-width: 48px;
    text-align: right;
}
.fc-timegrid-body,
.fc-timegrid-slots,
.fc-timegrid-cols {
    touch-action: pan-y;
}
@media (max-width: 900px) {
    .calendar-box .fc-scroller {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
    }
    .fc-timegrid-slot-lane,
    .fc-timegrid-slot,
    .fc-timegrid-col {
        touch-action: pan-y;
    }
}


/* v3.20.0 - DM Sans, duración ordenada, reservas recurrentes y login con visor de contraseña */
body {
    font-family: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-weight: 400;
}

.duration-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.duration-options button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 10px;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.15;
}

.recurrence-card {
    margin: 2px 0 16px;
    border: 1px solid #e3d7ec;
    border-radius: 18px;
    background: linear-gradient(180deg, #fdfbff 0%, #f8f3fb 100%);
    overflow: hidden;
}
.recurrence-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 16px;
    cursor: pointer;
    user-select: none;
}
.recurrence-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.recurrence-switch {
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: #d8cde1;
    position: relative;
    flex: 0 0 auto;
    transition: .2s ease;
    box-shadow: inset 0 0 0 1px rgba(79,36,111,.08);
}
.recurrence-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 10px rgba(30,20,40,.22);
    transition: .2s ease;
}
.recurrence-toggle input:checked + .recurrence-switch {
    background: #66338f;
}
.recurrence-toggle input:checked + .recurrence-switch::after {
    transform: translateX(20px);
}
.recurrence-toggle input:focus-visible + .recurrence-switch {
    outline: 3px solid rgba(102,51,143,.18);
    outline-offset: 2px;
}
.recurrence-toggle-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.recurrence-toggle-copy strong {
    color: #2a1734;
    font-size: 15px;
    font-weight: 700;
}
.recurrence-toggle-copy small {
    color: #786582;
    font-size: 12px;
    line-height: 1.4;
}
.recurrence-settings {
    border-top: 1px solid #eadff1;
    padding: 16px;
}
.recurrence-settings[hidden] {
    display: none !important;
}
.recurrence-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr 1.2fr;
    gap: 12px;
}
.recurrence-grid .form-group {
    margin-bottom: 0 !important;
}
.recurrence-preview {
    margin-top: 14px;
    padding: 13px 14px;
    border: 1px dashed #cdb8dc;
    border-radius: 15px;
    background: rgba(255,255,255,.72);
}
.recurrence-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.recurrence-preview-head > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.recurrence-preview-head span {
    color: #7b6486;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.recurrence-preview-head strong {
    color: #321b40;
    font-size: 14px;
    font-weight: 700;
}
.recurrence-preview-head small {
    color: #6f5a79;
    font-size: 12px;
    text-align: right;
}
.recurrence-date-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 11px;
}
.recurrence-date-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid #dfd0e9;
    border-radius: 999px;
    background: #fff;
    color: #59316f;
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
}
.recurrence-date-list .recurrence-more {
    background: #66338f;
    border-color: #66338f;
    color: #fff;
}
.recurrence-preview p {
    margin: 10px 0 0;
    color: #806d89;
    font-size: 11px;
    line-height: 1.45;
}

.badge-recurrence {
    display: inline-flex;
    margin-top: 6px;
    background: #f0e7f6;
    color: #66338f;
    border: 1px solid #dac6e8;
}

.password-field {
    position: relative;
}
.password-field input {
    width: 100%;
    padding-right: 54px;
}
.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 38px;
    height: 38px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #765784;
    cursor: pointer;
    transition: .18s ease;
}
.password-toggle:hover {
    background: #f2eaf7;
    color: #54256f;
}
.password-toggle:focus-visible {
    outline: 3px solid rgba(102,51,143,.18);
}
.password-toggle svg {
    width: 20px;
    height: 20px;
}
.password-toggle [hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    .duration-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .recurrence-grid {
        grid-template-columns: 1fr;
    }
    .recurrence-preview-head {
        flex-direction: column;
    }
    .recurrence-preview-head small {
        text-align: left;
    }
}

@media (max-width: 430px) {
    .duration-options {
        gap: 8px;
    }
    .duration-options button {
        min-height: 42px;
        font-size: 13px;
        padding-inline: 6px;
    }
    .recurrence-toggle,
    .recurrence-settings {
        padding-left: 13px;
        padding-right: 13px;
    }
}


/* v3.21.0 - Modal compacto y edición completa de reservas */
.reserva-modal .hero-kicker {
    background: #66338f;
    color: #fff;
    box-shadow: 0 7px 16px rgba(102, 51, 143, .18);
}
.reserva-modal-details {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.35fr);
    gap: 12px;
    align-items: start;
}
.reserva-modal-details .form-group {
    margin-bottom: 0 !important;
}

@media (min-width: 901px) {
    .reserva-modal {
        padding: 12px 18px;
    }
    .reserva-modal-panel {
        width: min(1040px, calc(100vw - 32px));
        max-height: calc(100dvh - 24px);
        padding: 16px 20px;
        border-radius: 22px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .reserva-modal-close {
        top: 12px;
        right: 14px;
        width: 36px;
        height: 36px;
        border-radius: 12px;
        font-size: 22px;
    }
    .reserva-modal-header {
        padding-right: 48px;
        margin-bottom: 9px;
    }
    .reserva-modal-header .hero-kicker {
        margin-bottom: 4px;
        padding: 4px 9px;
        font-size: 10px;
    }
    .reserva-modal-header h3 {
        margin-bottom: 2px;
        font-size: 28px;
    }
    .reserva-modal-header p {
        font-size: 13px;
        line-height: 1.35;
    }
    .reserva-modal .profile-resume-modal {
        gap: 10px;
        margin: 0 0 9px;
    }
    .reserva-modal .profile-resume-modal > div {
        padding: 9px 12px;
        border-radius: 14px;
    }
    .reserva-modal .profile-resume-modal span {
        margin-bottom: 2px;
        font-size: 10px;
    }
    .reserva-modal .profile-resume-modal strong {
        font-size: 14px;
    }
    .reserva-modal .form-grid-modal {
        gap: 8px 12px;
        margin-bottom: 8px;
    }
    .reserva-modal form .form-group {
        gap: 5px;
        margin-bottom: 7px;
    }
    .reserva-modal label {
        font-size: 12px;
    }
    .reserva-modal input,
    .reserva-modal select,
    .reserva-modal textarea,
    .reserva-modal .readonly-field {
        min-height: 40px;
        padding: 9px 11px;
        border-radius: 13px;
        font-size: 14px;
    }
    .reserva-modal .readonly-field {
        line-height: 1.25;
    }
    .reserva-modal .duration-options {
        gap: 7px;
    }
    .reserva-modal .duration-options button {
        min-height: 36px;
        padding: 7px 8px;
        border-radius: 10px;
        font-size: 13px;
    }
    .reserva-modal .form-help {
        font-size: 11px;
    }
    .reserva-modal .recurrence-card {
        margin: 0 0 8px;
        border-radius: 14px;
    }
    .reserva-modal .recurrence-toggle {
        gap: 10px;
        padding: 9px 12px;
    }
    .reserva-modal .recurrence-switch {
        width: 42px;
        height: 24px;
    }
    .reserva-modal .recurrence-switch::after {
        width: 18px;
        height: 18px;
    }
    .reserva-modal .recurrence-toggle input:checked + .recurrence-switch::after {
        transform: translateX(18px);
    }
    .reserva-modal .recurrence-toggle-copy strong {
        font-size: 13px;
    }
    .reserva-modal .recurrence-toggle-copy small {
        font-size: 10px;
    }
    .reserva-modal .recurrence-settings {
        padding: 10px 12px;
    }
    .reserva-modal .recurrence-grid {
        gap: 8px;
    }
    .reserva-modal .recurrence-preview {
        margin-top: 8px;
        padding: 8px 10px;
        border-radius: 12px;
    }
    .reserva-modal .recurrence-preview-head strong {
        font-size: 12px;
    }
    .reserva-modal .recurrence-preview-head small,
    .reserva-modal .recurrence-preview p,
    .reserva-modal .recurrence-date-list span {
        font-size: 10px;
    }
    .reserva-modal .recurrence-date-list {
        gap: 5px;
        margin-top: 7px;
    }
    .reserva-modal .recurrence-date-list span {
        min-height: 24px;
        padding: 3px 7px;
    }
    .reserva-modal form textarea {
        min-height: 52px;
        max-height: 72px;
        resize: none;
    }
    .reserva-modal-actions {
        gap: 9px;
        margin-top: 8px;
    }
    .reserva-modal-actions .btn {
        padding: 10px 16px;
        border-radius: 12px;
    }
}


.reserva-edit-card {
    max-width: 1160px;
}
.reserva-edit-heading {
    align-items: flex-start;
}
.edit-kicker {
    margin-bottom: 7px;
    background: #f0e7f6;
    color: #66338f;
}
.profile-resume-edit {
    margin-bottom: 16px;
}
.reserva-edit-details {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.35fr);
    gap: 14px;
    margin-top: 14px;
}
.reserva-edit-details textarea {
    min-height: 92px;
}
.reserva-edit-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
}
.recurrence-existing-card {
    padding: 0;
}
.recurrence-existing-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}
.recurrence-existing-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 12px;
    background: #66338f;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}
.recurrence-existing-content > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.recurrence-existing-content strong {
    color: #321b40;
    font-size: 14px;
}
.recurrence-existing-content small {
    color: #786582;
    line-height: 1.4;
}

@media (max-width: 900px) {
    .reserva-modal-details,
    .reserva-edit-details {
        grid-template-columns: 1fr;
    }
    .reserva-edit-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .reserva-edit-actions .btn {
        width: 100%;
        justify-content: center;
    }
}


.cancel-reservation-card {
    max-width: 920px;
}
.cancel-reservation-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.cancel-reservation-summary > div {
    padding: 14px 16px;
    border: 1px solid #e5d8ee;
    border-radius: 16px;
    background: linear-gradient(180deg, #fdfbff, #f8f3fb);
}
.cancel-reservation-summary span {
    display: block;
    margin-bottom: 4px;
    color: #7b6486;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.cancel-reservation-summary strong {
    color: #2f193c;
}
.cancel-summary-wide {
    grid-column: 1 / -1;
}
.cancel-series-note {
    margin-top: 14px;
}
.cancel-reservation-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
}
@media (max-width: 640px) {
    .cancel-reservation-summary {
        grid-template-columns: 1fr;
    }
    .cancel-summary-wide {
        grid-column: auto;
    }
    .cancel-reservation-actions {
        flex-direction: column-reverse;
    }
    .cancel-reservation-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* v3.23.0 - Modal de reserva sin desplazamiento horizontal */
.reserva-modal-panel {
    overflow-x: hidden;
}
.reserva-modal-form,
.reserva-modal-form > *,
.reserva-modal .profile-resume-modal,
.reserva-modal .form-grid-modal,
.reserva-modal .recurrence-card,
.reserva-modal .reserva-modal-details,
.reserva-modal .reserva-modal-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
.reserva-modal .profile-resume-modal > *,
.reserva-modal .form-grid-modal > *,
.reserva-modal .recurrence-grid > *,
.reserva-modal .reserva-modal-details > * {
    min-width: 0;
    max-width: 100%;
}
.reserva-modal input,
.reserva-modal select,
.reserva-modal textarea,
.reserva-modal .readonly-field,
.reserva-modal .duration-options {
    max-width: 100%;
}

@media (min-width: 901px) {
    .reserva-modal-panel {
        overflow-x: clip;
    }
}
