:root {
    --primary: #0b7bc1;
    --primary-dark: #085e92;
    --bg: #f5f7fb;
    --panel: #ffffff;
    --text: #203040;
    --muted: #6c7a89;
    --border: #e6ebf2;
    --shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 270px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 24px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding: 8px 8px 18px 8px;
    border-bottom: 1px solid rgba(255,255,255,.15);
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.15);
    font-size: 1.25rem;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-brand h5 {
    margin: 0;
    font-weight: 700;
}

.sidebar-brand small {
    color: rgba(255,255,255,.75);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 14px;
    color: #fff;
    text-decoration: none;
    transition: .2s ease;
    font-weight: 500;
}

.nav-link-custom:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
}

.nav-link-danger {
    margin-top: 18px;
    background: rgba(255,255,255,.08);
}

.main-content {
    flex: 1;
    padding: 28px;
}

.topbar {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.page-subtitle {
    color: var(--muted);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f7faff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--primary-dark);
    font-weight: 600;
}

.content-area {
    width: 100%;
}

.kpi-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
}

.kpi-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.bg-primary-soft {
    background: color-mix(in srgb, var(--primary) 12%, white);
    color: var(--primary);
}

.bg-success-soft {
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
}

.bg-warning-soft {
    background: rgba(255, 193, 7, 0.16);
    color: #9a6b00;
}

.bg-info-soft {
    background: rgba(13, 202, 240, 0.16);
    color: #0b7285;
}

.kpi-body h3 {
    margin: 4px 0 0;
    font-size: 1.9rem;
    font-weight: 700;
}

.kpi-label {
    color: var(--muted);
    font-size: .95rem;
}

.panel-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    height: 100%;
}

.panel-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.table-modern thead th {
    background: #f8fafc;
    color: var(--muted);
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table-modern td,
.table-modern th {
    padding: 14px 16px;
    vertical-align: middle;
}

.quick-actions {
    padding: 10px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-action-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text);
    background: #fff;
    transition: .2s ease;
}

.quick-action-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.06);
    color: var(--primary-dark);
}

.quick-action-item i {
    font-size: 1.2rem;
    color: var(--primary);
}

.quick-action-item small {
    display: block;
    color: var(--muted);
}

.form-control-color {
    width: 64px;
    min-width: 64px;
    height: 42px;
    padding: 4px;
}

.branding-preview {
    border-radius: 22px;
    padding: 24px;
    background: linear-gradient(180deg, var(--preview-primary) 0%, var(--preview-secondary) 100%);
    color: white;
}

.branding-preview__header {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}

.branding-preview__logo {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: rgba(255,255,255,.14);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.branding-preview__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.branding-preview__logo i {
    font-size: 1.8rem;
}

.branding-preview__header h4 {
    margin: 0 0 4px;
    font-size: 1.2rem;
    font-weight: 700;
}

.branding-preview__header p,
.branding-preview__body span {
    margin: 0;
    color: rgba(255,255,255,.84);
}

.branding-preview__body {
    display: grid;
    gap: 6px;
}

@media (max-width: 991px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        padding: 16px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
}

#calendar {
    width: 100%;
    min-height: 700px;
}

.fc {
    background: #ffffff;
    border-radius: 18px;
}

.fc-toolbar {
    margin-bottom: 1rem !important;
    gap: .5rem;
    flex-wrap: wrap;
}

.fc-toolbar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.fc-button {
    border-radius: 10px !important;
    text-transform: none !important;
    font-weight: 600;
    box-shadow: none !important;
    background: var(--primary) !important;
    border: none !important;
}

.fc-button:hover {
    background: var(--primary-dark) !important;
}

.fc-button-primary:not(:disabled).fc-button-active,
.fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background: var(--primary-dark) !important;
    border: none !important;
}

.fc-daygrid-day,
.fc-timegrid-slot,
.fc-scrollgrid {
    border-color: #edf0f5 !important;
}

.fc-col-header-cell {
    background: #f8fafc;
    padding: 10px 0;
}

.fc-day-today {
    background: color-mix(in srgb, var(--primary) 8%, white) !important;
    border: 1px solid color-mix(in srgb, var(--primary) 20%, white);
}

.fc-event {
    border: none !important;
    border-radius: 20px !important;
    padding: 3px 10px !important;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: grab;
}

.fc-event:active {
    cursor: grabbing;
}

.evento-confirmada {
    background: #198754 !important;
    color: #fff !important;
}

.evento-pendiente {
    background: #ffc107 !important;
    color: #212529 !important;
}

.evento-cancelada {
    background: #dc3545 !important;
    color: #fff !important;
}

.evento-completada {
    background: var(--primary) !important;
    color: #fff !important;
}

.evento-default {
    background: #6c757d !important;
    color: #fff !important;
}

input[readonly] {
    background-color: #f8f9fa !important;
    color: #495057 !important;
    font-weight: 600;
}

.fc-timegrid-slot {
    height: 1.6rem !important;
}

.fc-timegrid-axis {
    font-weight: 600;
    color: #475569;
    font-size: 0.85rem;
}

.fc-timegrid-event {
    border: none !important;
    border-radius: 12px !important;
    padding: 4px 6px !important;
    font-size: 0.78rem;
    font-weight: 600;
}

.fc-timegrid-event .fc-event-time {
    font-weight: 700;
    font-size: 0.75rem;
}

.fc-timegrid-event .fc-event-title {
    white-space: normal !important;
    line-height: 1.15;
    font-size: 0.78rem;
}

.fc-col-header-cell-cushion {
    text-transform: capitalize;
    font-weight: 700;
    font-size: 0.9rem;
}

.fc-timegrid-now-indicator-line {
    border-color: #dc2626 !important;
}

@media (max-width: 768px) {
    #calendar {
        min-height: 500px;
    }

    .fc-toolbar-title {
        font-size: 1.05rem;
    }

    .fc-header-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}

.hero-panel {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 86%, white) 0%, color-mix(in srgb, var(--primary-dark) 86%, white) 100%);
    color: #fff;
    border-radius: calc(var(--radius) + 6px);
    padding: 28px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: 20px;
    align-items: center;
}

.hero-panel h2 {
    margin: 6px 0 10px;
    font-size: 2rem;
    font-weight: 800;
}

.hero-panel p {
    margin: 0;
    color: rgba(255,255,255,.88);
    max-width: 760px;
}

.hero-panel-compact h2 {
    font-size: 1.8rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

.hero-metrics {
    display: grid;
    gap: 14px;
}

.hero-metric-card {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 22px;
    padding: 18px 20px;
    backdrop-filter: blur(8px);
}

.hero-metric-card span,
.hero-metric-card small {
    display: block;
    color: rgba(255,255,255,.78);
}

.hero-metric-card strong {
    display: block;
    margin: 6px 0;
    font-size: 1.8rem;
    font-weight: 800;
}

.section-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    background: #f4f8ff;
    border: 1px solid var(--border);
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 700;
}

.panel-card-accent {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.insight-list {
    display: grid;
    gap: 14px;
    padding: 18px 20px 20px;
}

.insight-item,
.ranking-item,
.agenda-strip-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.insight-item {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
}

.insight-item span,
.ranking-item small,
.agenda-strip-item p {
    color: var(--muted);
}

.insight-item strong,
.ranking-item span {
    font-size: 1.05rem;
    font-weight: 700;
}

.ranking-item {
    padding: 14px 8px;
    border-bottom: 1px solid var(--border);
}

.ranking-item:last-child {
    border-bottom: none;
}

.agenda-strip {
    display: grid;
    gap: 12px;
    padding: 18px 20px 20px;
}

.agenda-strip-item {
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.agenda-strip-item strong {
    display: block;
    margin-bottom: 4px;
}

.agenda-strip-item p {
    margin: 0;
}

.agenda-strip-time {
    min-width: 58px;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary-dark);
}

@media (max-width: 991px) {
    .hero-panel {
        grid-template-columns: 1fr;
        padding: 22px;
    }
}

@media (max-width: 768px) {
    .agenda-strip-item,
    .ranking-item,
    .insight-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .agenda-strip-time {
        min-width: auto;
    }
}

.public-booking-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--primary) 18%, transparent), transparent 34%),
        linear-gradient(180deg, #f7fafc 0%, #eef4fa 100%);
    padding: 28px;
}

.public-booking-shell {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.public-booking-hero,
.public-booking-card {
    border-radius: 28px;
    border: 1px solid var(--border);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.public-booking-hero {
    padding: 32px;
    color: #fff;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    position: sticky;
    top: 24px;
}

.public-booking-hero h1 {
    margin: 14px 0 8px;
    font-size: 2.3rem;
    font-weight: 800;
}

.public-booking-hero p {
    color: rgba(255,255,255,.86);
}

.public-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.1);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
}

.public-booking-points {
    display: grid;
    gap: 14px;
    margin-top: 30px;
}

.public-booking-points div {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
}

.public-booking-footer {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.16);
    display: grid;
    gap: 4px;
}

.public-booking-card {
    background: #fff;
    padding: 32px;
}

.public-booking-card h2 {
    margin: 0 0 6px;
    font-size: 2rem;
    font-weight: 800;
}

.public-booking-filters {
    padding: 22px;
    margin-bottom: 26px;
    background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
    border: 1px solid var(--border);
    border-radius: 24px;
}

.public-filter-btn {
    margin-top: 18px;
    border-radius: 14px;
    padding-inline: 18px;
    font-weight: 700;
}

.public-slot-section {
    margin-bottom: 24px;
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.slot-pill input {
    display: none;
}

.slot-pill span {
    display: block;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #fff;
    text-align: center;
    font-weight: 700;
    color: var(--text);
    transition: .2s ease;
    cursor: pointer;
}

.slot-pill input:checked + span {
    background: color-mix(in srgb, var(--primary) 12%, white);
    border-color: color-mix(in srgb, var(--primary) 40%, white);
    color: var(--primary-dark);
    box-shadow: 0 10px 24px rgba(11, 123, 193, 0.14);
}

.empty-state-box {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px;
    border-radius: 20px;
    border: 1px dashed #cdd9e8;
    background: #fbfdff;
    color: var(--text);
}

.empty-state-box i {
    font-size: 1.2rem;
    color: var(--primary);
}

.public-booking-actions {
    margin-top: 24px;
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 991px) {
    .public-booking-shell {
        grid-template-columns: 1fr;
    }

    .public-booking-hero {
        position: static;
    }
}

@media (max-width: 768px) {
    .public-booking-body {
        padding: 16px;
    }

    .public-booking-card,
    .public-booking-hero,
    .public-booking-filters {
        padding: 22px;
    }

    .public-booking-card h2,
    .public-booking-hero h1 {
        font-size: 1.8rem;
    }
}
.single-column-shell {
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
}

.booking-summary-card {
    margin-top: 28px;
    padding: 20px;
    border-radius: 22px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.14);
}

.booking-summary-card h3 {
    margin-bottom: 14px;
    font-size: 1.1rem;
    font-weight: 700;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row span {
    color: rgba(255,255,255,.78);
}

.status-card-panel {
    padding: 42px;
}

.status-icon {
    width: 86px;
    height: 86px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
}

.status-success {
    background: rgba(25, 135, 84, 0.14);
    color: #198754;
}

.status-warning {
    background: rgba(255, 193, 7, 0.18);
    color: #8a6300;
}

.status-danger {
    background: rgba(220, 53, 69, 0.14);
    color: #dc3545;
}

.status-message {
    max-width: 560px;
    margin: 14px auto 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.status-pill {
    color: #fff;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: transparent;
}