﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(18, 181, 228, 0.24);
}

html {
  position: relative;
  min-height: 100%;
}

:root {
    --app-side-width: 190px;
    --app-nav-height: 72px;
    --app-core-radius: 14px;
    --app-core-border: rgba(12, 60, 90, 0.08);
    --app-core-shadow: 0 1px 3px rgba(9, 34, 52, 0.05);
    --app-btn-font: "Manrope", "Segoe UI", sans-serif;
    --app-btn-radius: 10px;
    --app-btn-focus-ring: rgba(18, 181, 228, 0.28);
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
    font-family: var(--app-btn-font);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.01em;
    border-radius: var(--app-btn-radius);
    padding: 0.48rem 1rem;
    border-width: 1px;
    border-style: solid;
    border-color: rgba(12, 60, 90, 0.18);
    background: #ffffff;
    color: #0f172a;
    box-shadow: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.btn:hover:not(:disabled):not(.disabled) {
    background: #f4f7fb;
    border-color: rgba(12, 60, 90, 0.3);
}

.btn:active:not(:disabled):not(.disabled) {
    background: #eaeff6;
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.2rem var(--app-btn-focus-ring);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.48;
    pointer-events: none;
}

.btn-sm {
    font-size: 0.78rem;
    border-radius: 8px;
    padding: 0.3rem 0.65rem;
}

.btn-lg {
    font-size: 0.95rem;
    border-radius: 12px;
    padding: 0.7rem 1.35rem;
}

/* Primary */
.btn-primary {
    background: #0b7ea7;
    color: #ffffff;
    border-color: #0b7ea7;
}

.btn-primary:hover:not(:disabled):not(.disabled) {
    background: #0a6d91;
    border-color: #0a6d91;
    color: #ffffff;
}

.btn-primary:active:not(:disabled):not(.disabled) {
    background: #095e7e;
    border-color: #095e7e;
}

.btn-primary:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(11, 126, 167, 0.3);
}

/* Outline primary */
.btn-outline-primary {
    background: transparent;
    color: #0b617f;
    border-color: rgba(11, 126, 167, 0.38);
}

.btn-outline-primary:hover:not(:disabled):not(.disabled) {
    background: rgba(18, 181, 228, 0.07);
    border-color: rgba(11, 126, 167, 0.52);
    color: #0b617f;
}

.btn-outline-primary:active:not(:disabled):not(.disabled) {
    background: rgba(18, 181, 228, 0.13);
}

.btn-check:checked + .btn-outline-primary,
.btn-outline-primary.active,
.btn-outline-primary.dropdown-toggle.show {
    background: #0b7ea7;
    color: #ffffff;
    border-color: #0b7ea7;
}

/* Outline secondary */
.btn-outline-secondary {
    background: transparent;
    color: #374151;
    border-color: rgba(12, 60, 90, 0.2);
}

.btn-outline-secondary:hover:not(:disabled):not(.disabled) {
    background: rgba(12, 60, 90, 0.05);
    border-color: rgba(12, 60, 90, 0.32);
    color: #0f172a;
}

.btn-outline-secondary:active:not(:disabled):not(.disabled) {
    background: rgba(12, 60, 90, 0.09);
}

.btn-check:checked + .btn-outline-secondary,
.btn-outline-secondary.active {
    background: rgba(12, 60, 90, 0.1);
    border-color: rgba(12, 60, 90, 0.38);
    color: #0f172a;
}

/* Danger */
.btn-danger {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}

.btn-danger:hover:not(:disabled):not(.disabled) {
    background: #c62020;
    border-color: #c62020;
    color: #ffffff;
}

.btn-danger:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.28);
}

/* Outline danger */
.btn-outline-danger {
    background: transparent;
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.32);
}

.btn-outline-danger:hover:not(:disabled):not(.disabled) {
    background: rgba(220, 38, 38, 0.06);
    border-color: rgba(220, 38, 38, 0.48);
    color: #991b1b;
}

.btn-check:checked + .btn-outline-danger,
.btn-outline-danger.active {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}

/* Success */
.btn-success {
    background: #0d9488;
    color: #ffffff;
    border-color: #0d9488;
}

.btn-success:hover:not(:disabled):not(.disabled) {
    background: #0b7d72;
    border-color: #0b7d72;
    color: #ffffff;
}

/* Warning */
.btn-warning {
    background: #f59e0b;
    color: #451a03;
    border-color: #f59e0b;
}

.btn-warning:hover:not(:disabled):not(.disabled) {
    background: #d97706;
    border-color: #d97706;
}

/* Outline warning */
.btn-outline-warning {
    background: transparent;
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.38);
}

.btn-outline-warning:hover:not(:disabled):not(.disabled) {
    background: rgba(245, 158, 11, 0.07);
    border-color: rgba(245, 158, 11, 0.52);
    color: #78350f;
}

.btn-check:checked + .btn-outline-warning,
.btn-outline-warning.active {
    background: #f59e0b;
    color: #451a03;
    border-color: #f59e0b;
}

/* Link */
.btn-link:not(.nav-link) {
    background: transparent;
    border-color: transparent;
    color: #0b7ea7;
    padding: 0;
    font-weight: 600;
    letter-spacing: normal;
    box-shadow: none;
}

.btn-link:not(.nav-link):hover:not(:disabled):not(.disabled) {
    background: transparent;
    border-color: transparent;
    color: #095874;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.btn-link:not(.nav-link):focus-visible {
    border-radius: 6px;
    box-shadow: 0 0 0 0.18rem rgba(18, 181, 228, 0.22);
}

body {
  margin-bottom: 0;
}

body.app-auth {
    background: #eef2f7;
    color: #0f172a;
}

/* Login: modern, clinic-inspired, responsive */
.login-page {
    --login-accent: #12b5e4;
    --login-accent-strong: #0b7ea7;
    --login-surface: rgba(255, 255, 255, 0.9);
    --login-border: rgba(12, 60, 90, 0.14);
    --login-shadow: 0 28px 55px rgba(9, 34, 52, 0.16);
    position: relative;
    max-width: 1040px;
    margin: 0 auto;
    padding: 1.15rem 0.55rem 0.35rem;
    font-family: "Manrope", "Segoe UI", sans-serif;
}

.login-page::before,
.login-page::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    z-index: 0;
}

.login-page::before {
    width: 250px;
    height: 250px;
    top: -70px;
    left: -45px;
    background: radial-gradient(circle at 30% 30%, rgba(18, 181, 228, 0.26), rgba(18, 181, 228, 0.02) 70%);
}

.login-page::after {
    width: 300px;
    height: 300px;
    right: -60px;
    bottom: -100px;
    background: radial-gradient(circle at 70% 30%, rgba(11, 126, 167, 0.2), rgba(11, 126, 167, 0.02) 72%);
}

.login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 1rem;
    background:
        radial-gradient(300px 150px at 8% 0%, rgba(18, 181, 228, 0.16), transparent 70%),
        radial-gradient(320px 170px at 96% 100%, rgba(14, 116, 144, 0.13), transparent 72%),
        linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 255, 0.96));
    border: 1px solid var(--login-border);
    border-radius: 26px;
    box-shadow: var(--login-shadow);
    overflow: hidden;
}

.login-hero {
    padding: 2rem 1.8rem 2rem 2rem;
    border-right: 1px solid rgba(12, 60, 90, 0.1);
}

.login-kicker {
    display: inline-flex;
    margin: 0 0 0.7rem;
    padding: 0.25rem 0.68rem;
    border-radius: 999px;
    background: rgba(18, 181, 228, 0.14);
    color: #0b617f;
    font-weight: 700;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-hero-title {
    margin: 0 0 0.68rem;
    max-width: 18ch;
    font-family: "Playfair Display", "Georgia", serif;
    font-size: clamp(1.62rem, 2.55vw, 2.2rem);
    color: #0f172a;
    line-height: 1.12;
}

.login-hero-text {
    margin: 0;
    max-width: 52ch;
    color: rgba(15, 23, 42, 0.76);
    font-size: 0.98rem;
}

.login-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.48rem;
    margin-top: 1.05rem;
}

.login-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(12, 60, 90, 0.14);
    background: rgba(255, 255, 255, 0.82);
    font-size: 0.76rem;
    font-weight: 600;
    color: #1f2937;
}

.login-feature-list {
    margin-top: 1rem;
    display: grid;
    gap: 0.55rem;
}

.login-feature {
    border-radius: 15px;
    padding: 0.72rem 0.82rem;
    background: var(--login-surface);
    border: 1px solid rgba(12, 60, 90, 0.1);
    box-shadow: 0 10px 18px rgba(9, 34, 52, 0.08);
}

.login-feature h3 {
    margin: 0 0 0.2rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
}

.login-feature p {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(31, 41, 55, 0.8);
}

.login-panel {
    position: relative;
    padding: 1.9rem 1.55rem 1.55rem;
    background: linear-gradient(170deg, rgba(255, 255, 255, 0.99), rgba(242, 249, 255, 0.98));
}

.login-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(180px 130px at 84% 0%, rgba(18, 181, 228, 0.13), transparent 68%);
    pointer-events: none;
}

.login-panel > * {
    position: relative;
    z-index: 1;
}

.login-brand {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.74rem;
    border-radius: 999px;
    background: rgba(11, 126, 167, 0.12);
    color: #0b617f;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 0.72rem;
}

.login-title {
    margin: 0;
    font-size: 1.78rem;
    line-height: 1.1;
    font-family: "Playfair Display", "Georgia", serif;
}

.login-subtitle {
    margin: 0.42rem 0 1rem;
    color: rgba(15, 23, 42, 0.72);
    font-size: 0.94rem;
}

.login-field .form-label {
    margin-bottom: 0.4rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(15, 23, 42, 0.7);
}

.login-field .form-control {
    min-height: 3.18rem;
    border-radius: 13px;
    border-color: rgba(12, 60, 90, 0.17);
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.login-field .form-control::placeholder {
    color: rgba(100, 116, 139, 0.85);
}

.login-field .form-control:focus {
    border-color: rgba(11, 126, 167, 0.45);
    background: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(18, 181, 228, 0.16);
}

.login-check .form-check-input {
    border-color: rgba(12, 60, 90, 0.35);
}

.login-check .form-check-label {
    color: rgba(15, 23, 42, 0.8);
    font-size: 0.9rem;
}

.login-link {
    color: var(--login-accent-strong);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.86rem;
}

.login-link:hover {
    color: #095874;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.login-alert {
    margin-bottom: 0.75rem;
    border-radius: 13px;
    border: 1px solid rgba(220, 53, 69, 0.28);
    background: rgba(248, 215, 218, 0.5);
    color: #8a2a37;
    font-size: 0.84rem;
    padding: 0.65rem 0.78rem;
}

.login-alert:empty {
    display: none;
}

.login-submit {
    border: none;
    border-radius: 14px;
    min-height: 3.2rem;
    background: linear-gradient(120deg, #12b5e4, #0b7ea7);
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 16px 28px rgba(11, 126, 167, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 32px rgba(11, 126, 167, 0.34);
    filter: brightness(1.02);
}

.login-submit:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(18, 181, 228, 0.22), 0 20px 32px rgba(11, 126, 167, 0.34);
}

.login-foot-actions {
    margin-top: 0.95rem;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
}

.login-meta {
    position: relative;
    z-index: 1;
    margin: 0.72rem 0 0;
    text-align: center;
    color: rgba(15, 23, 42, 0.56);
    font-size: 0.76rem;
}

@media (max-width: 991.98px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-hero {
        border-right: 0;
        border-bottom: 1px solid rgba(12, 60, 90, 0.1);
        padding: 1.5rem 1.3rem 1.15rem;
    }

    .login-feature-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .login-panel {
        padding: 1.35rem 1.3rem 1.25rem;
    }
}

@media (max-width: 767.98px) {
    .login-page {
        padding: 0.55rem 0.12rem 0;
    }

    .login-shell {
        border-radius: 20px;
    }

    .login-hero-title {
        max-width: none;
        font-size: clamp(1.42rem, 7vw, 1.75rem);
    }

    .login-feature-list {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .login-foot-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
}

/* Pricing accordion: keep expanded body in the same blue as the header */
.pricing-accordion .accordion-button:not(.collapsed) + .accordion-collapse,
.pricing-accordion .accordion-button:not(.collapsed) + .accordion-collapse .accordion-body {
    background-color: var(--bs-accordion-active-bg);
}

.navbar-brand-logo {
    height: 48px;
    width: auto;
    max-width: 260px;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(9, 34, 52, 0.18));
    mask-image: radial-gradient(120% 90% at 50% 50%, #000 62%, transparent 100%);
    mask-mode: alpha;
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 90%, transparent), linear-gradient(to bottom, transparent, black 20%, black 90%, transparent);
    -webkit-mask-composite: intersect;
    mask-composite: intersect;
}

.navbar-shell {
    padding-left: 0.5rem;
    padding-right: 0.75rem;
}

/* Top navigation */
.app-navbar {
    --nav-link: #0f172a;
    --nav-link-hover: rgba(18, 181, 228, 0.12);
    --nav-link-active: rgba(18, 181, 228, 0.18);
    --nav-accent: #12b5e4;
    --nav-accent-strong: #0b7ea7;
    font-family: "Manrope", "Segoe UI", sans-serif;
    background: #ffffff;
    border-bottom: 1px solid rgba(12, 60, 90, 0.09);
    box-shadow: 0 1px 3px rgba(9, 34, 52, 0.05);
    padding-block: .55rem;
    position: relative;
    z-index: 1030;
}

.app-navbar .navbar-shell {
    max-width: 1536px;
    margin-inline: auto;
    padding-inline: 0.9rem;
    gap: 1.25rem;
    position: relative;
    z-index: 1;
}

.app-auth .app-navbar .navbar-shell {
    
}

.app-navbar .navbar-brand {
    padding: 0;
}

.app-navbar .brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.28rem 0.6rem;
    border-radius: 14px;
    background: rgba(18, 181, 228, 0.07);
    border: 1px solid rgba(18, 181, 228, 0.18);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.app-navbar .brand-lockup.brand-has-logo {
    padding: 0;
    background: transparent;
    border-color: transparent;
}

.app-navbar .brand-lockup:hover {
    background: rgba(18, 181, 228, 0.12);
    border-color: rgba(18, 181, 228, 0.28);
}

.brand-logo-frame {
    display: grid;
    place-items: center;
    padding: 0.28rem 0.5rem;
    border-radius: 10px;
    background: rgba(18, 181, 228, 0.1);
    border: 1px solid rgba(18, 181, 228, 0.2);
}

.app-navbar .brand-lockup.brand-has-logo .brand-logo-frame {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.brand-logo-fallback {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.12em;
    color: var(--nav-accent-strong);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.app-navbar .navbar-brand-text,
.brand-name {
    font-family: "Playfair Display", "Georgia", serif;
    font-weight: 600;
    letter-spacing: 0.3px;
    font-size: 1.02rem;
    color: #0f172a;
}

.brand-subtitle {
    font-size: 0.62rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.55);
}

.app-navbar .navbar-nav {
    gap: 0.35rem;
    align-items: center;
}

.app-navbar .navbar-nav .nav-link {
    position: relative;
    padding: 0.42rem 0.8rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--nav-link);
    line-height: 1.1;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.app-navbar .navbar-nav .nav-link:hover {
    background: var(--nav-link-hover);
    color: #0b1526;
    box-shadow: inset 0 0 0 1px rgba(18, 181, 228, 0.18);
    transform: translateY(-1px);
}

.app-navbar .navbar-nav .nav-link.text-body:hover {
    background: transparent;
    box-shadow: none;
    transform: none;
}

.app-navbar .navbar-nav .nav-link.active,
.app-navbar .navbar-nav .nav-link[aria-current="page"] {
    background: var(--nav-link-active);
    color: var(--nav-accent-strong);
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(18, 181, 228, 0.25);
}

.app-navbar .navbar-toggler {
    border: 1px solid rgba(12, 60, 90, 0.2);
    border-radius: 12px;
    padding: 0.3rem 0.6rem;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 10px 20px rgba(9, 34, 52, 0.12);
}

/* User dropdown in top navbar */
.nav-user-wrap {
    display: flex;
    align-items: center;
}

.nav-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.3rem 0.7rem 0.3rem 0.3rem;
    border: 1px solid rgba(12, 60, 90, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 4px 12px rgba(9, 34, 52, 0.08);
    font-family: "Manrope", "Segoe UI", sans-serif;
    cursor: pointer;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nav-user-btn:hover {
    border-color: rgba(18, 181, 228, 0.32);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 18px rgba(9, 34, 52, 0.12);
}

.nav-user-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(18, 181, 228, 0.22), 0 6px 16px rgba(9, 34, 52, 0.1);
}

.nav-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(135deg, #12b5e4, #0b7ea7);
    color: #fff;
    font-family: "Nunito Sans", "Manrope", sans-serif;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
}

.nav-user-label {
    font-size: 0.84rem;
    font-weight: 600;
    color: #0f172a;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-user-caret {
    color: rgba(15, 23, 42, 0.45);
    transition: transform 0.2s ease;
    flex: 0 0 auto;
}

.nav-user-btn[aria-expanded="true"] .nav-user-caret {
    transform: rotate(180deg);
}

.nav-user-menu {
    min-width: 210px;
    border-radius: 18px !important;
    border: 1px solid rgba(12, 60, 90, 0.12) !important;
    box-shadow: 0 20px 48px rgba(9, 34, 52, 0.16) !important;
    padding: 0.55rem !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(12px);
    margin-top: 0.45rem !important;
}

.nav-user-menu-header {
    padding: 0.35rem 0.6rem 0.55rem;
}

.nav-user-menu-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-user-menu-role {
    display: inline-flex;
    margin-top: 0.22rem;
    padding: 0.14rem 0.52rem;
    border-radius: 999px;
    background: rgba(18, 181, 228, 0.12);
    color: #0b617f;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.nav-user-divider {
    margin: 0 0.3rem !important;
    opacity: 0.1 !important;
}

.nav-user-menu-item {
    display: block;
    width: 100%;
    border-radius: 11px;
    padding: 0.5rem 0.7rem;
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 0.87rem;
    font-weight: 500;
    color: #0f172a;
    text-decoration: none;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.nav-user-menu-item:hover {
    background: rgba(12, 60, 90, 0.06);
    color: #0b1526;
}

.nav-user-menu-item--danger {
    color: #c0392b;
}

.nav-user-menu-item--danger:hover {
    background: rgba(192, 57, 43, 0.07);
    color: #c0392b;
}

.nav-guest-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-navbar .badge {
    font-weight: 600;
}

.app-nav-groups {
    gap: 0.35rem;
}

.app-nav-group .dropdown-toggle::after {
    margin-left: 0.35rem;
    vertical-align: 0.15em;
}

.app-nav-group .dropdown-menu {
    border-radius: 18px;
    border: 1px solid rgba(12, 60, 90, 0.12);
    box-shadow: 0 20px 45px rgba(9, 34, 52, 0.16);
    padding: 0.6rem;
    min-width: 230px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.app-nav-group .dropdown-item {
    border-radius: 12px;
    padding: 0.5rem 0.7rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-nav-group .dropdown-item .badge {
    font-size: 0.65rem;
}

.app-nav-group .dropdown-item:hover {
    background: rgba(12, 60, 90, 0.06);
}

@media (min-width: 992px) {
    .app-nav-group:hover > .dropdown-menu {
        display: block;
    }
}

@media (max-width: 991.98px) {
    .app-navbar .navbar-collapse {
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid rgba(12, 60, 90, 0.12);
        border-radius: 18px;
        padding: 0.6rem 0.6rem 0.85rem;
        margin-top: 0.6rem;
        box-shadow: 0 14px 32px rgba(9, 34, 52, 0.16);
        backdrop-filter: blur(10px);
    }

    .app-navbar .navbar-nav {
        padding-top: 0.25rem;
    }

    .app-auth .app-navbar .navbar-shell {
        padding-left: 0.9rem;
    }
}

/* App shell + side navigation */
.app-shell {
    max-width: 95%;
    margin-inline: auto;
    min-height: calc(100vh - var(--app-nav-height));
}

.app-shell-auth {
    max-width: none;
    padding-left: calc(var(--app-side-width) + 0.1rem);
}

.app-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--app-nav-height));
    padding-bottom: 0;
}

.app-main > .container {
    flex: 1 0 auto;
}

.app-footer {
    position: relative;
    margin-bottom: 0;
    margin-top: auto;
}

.app-footer-shell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.85rem;
    padding: 0.6rem 0.95rem;
    border-radius: 12px;
    border: 1px solid rgba(12, 60, 90, 0.08);
    background: #ffffff;
    box-shadow: none;
}

.app-footer-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.app-footer-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "Nunito Sans", "Manrope", "Segoe UI", sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    font-weight: 800;
    color: #0b7ea7;
    background: rgba(18, 181, 228, 0.14);
    border: 1px solid rgba(18, 181, 228, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    flex: 0 0 38px;
}

.app-footer-content {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3rem 0.5rem;
    min-width: 0;
}

.app-footer-brand {
    font-family: "Playfair Display", "Georgia", serif;
    font-size: 0.95rem;
    line-height: 1.1;
    color: #0f172a;
    white-space: nowrap;
}

.app-footer-copy {
    color: rgba(15, 23, 42, 0.62);
    font-size: 0.78rem;
    line-height: 1.3;
}

.app-footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    color: rgba(15, 23, 42, 0.55);
}

.app-shell-auth .app-main > .container {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0.9rem;
    padding-right: 0.9rem;
}

.app-shell-auth .app-main > .app-footer > .container {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0.9rem;
    padding-right: 0.9rem;
}

.app-shell-auth .settings-shell {
    margin-left: 0;
    margin-right: auto;
}

/* Core content surface */
.app-core {
    position: relative;
    background: #ffffff;
    border: 1px solid var(--app-core-border);
    border-radius: var(--app-core-radius);
    box-shadow: var(--app-core-shadow);
    padding: 1rem 1.25rem 1.75rem;
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .app-core {
        border-radius: 12px;
        padding: 1rem 1rem 1.4rem;
    }

    .app-footer-shell {
        border-radius: 16px;
        padding: 0.68rem 0.78rem;
    }
}

.app-side-nav {
    --bs-offcanvas-width: var(--app-side-width);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    /* --app-chrome-height la calcula site.js midiendo el aviso de licencia (si está
       presente) + la cabecera, porque su altura combinada varía según el mensaje. Sin
       JS (o antes de que corra), --app-nav-height es un valor de reserva razonable. */
    padding-top: var(--app-chrome-height, var(--app-nav-height));
    font-family: "Nunito Sans", "Manrope", "Segoe UI", sans-serif;
    border-radius: 0 20px 20px 0;
    border-right: 1px solid rgba(12, 60, 90, 0.09);
    background: #f8fbff;
    box-shadow: 2px 0 16px rgba(9, 34, 52, 0.07);
    z-index: 1020;
}

.app-side-nav .offcanvas-header {
    border-bottom: 1px solid rgba(12, 60, 90, 0.12);
}

.app-side-nav .offcanvas-body {
    padding: 0.85rem;
    max-height: calc(100vh - var(--app-chrome-height, var(--app-nav-height)));
    overflow: auto;
}

.app-side-menu {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.app-side-group {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding-top: 0.12rem;
}

.app-side-group + .app-side-group {
    margin-top: 0.28rem;
    border-top: 1px solid rgba(12, 60, 90, 0.07);
    padding-top: 0.4rem;
}

.app-side-link,
.app-side-toggle {
    border-radius: 10px;
    padding: 0.52rem 0.72rem;
    font-family: "Nunito Sans", "Manrope", "Segoe UI", sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    color: #3d5166;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: transparent;
    border: none;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.app-side-link.active {
    background: rgba(18, 181, 228, 0.12);
    color: #0b4a65;
    font-weight: 700;
    box-shadow: inset 3px 0 0 #0b7ea7;
}

.app-side-toggle[aria-expanded="true"] {
    color: #0b4a65;
    font-weight: 700;
}

.app-side-link:hover,
.app-side-toggle:hover {
    background: rgba(12, 60, 90, 0.06);
    color: #0b1526;
}

.app-side-toggle {
    width: 100%;
    text-align: left;
}

.app-side-chevron {
    width: 8px;
    height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
    opacity: 0.55;
    flex: 0 0 auto;
}

.app-side-toggle[aria-expanded="true"] .app-side-chevron {
    transform: rotate(45deg);
}

.app-side-submenu {
    margin: 0.08rem 0 0.2rem 0.7rem;
    padding: 0.18rem 0 0.22rem 0.7rem;
    border-left: 1.5px solid rgba(18, 181, 228, 0.22);
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.app-side-subgroup + .app-side-subgroup {
    margin-top: 0.28rem;
}

.app-side-subtoggle {
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    border-radius: 8px;
    padding: 0.3rem 0.5rem;
    color: rgba(61, 81, 102, 0.68);
    font-family: "Nunito Sans", "Manrope", "Segoe UI", sans-serif;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.app-side-subtoggle:hover {
    background: rgba(12, 60, 90, 0.04);
    color: rgba(61, 81, 102, 0.9);
}

.app-side-subtoggle .app-side-chevron {
    width: 6px;
    height: 6px;
}

.app-side-subgroup-links {
    margin-top: 0.18rem;
    padding-left: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.app-side-sublink {
    border-radius: 8px;
    padding: 0.38rem 0.62rem 0.38rem 0.88rem;
    position: relative;
    font-family: "Nunito Sans", "Manrope", "Segoe UI", sans-serif;
    font-weight: 500;
    font-size: 0.84rem;
    letter-spacing: 0.01em;
    color: #4a6070;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.app-side-sublink::before {
    content: "";
    position: absolute;
    left: 0.38rem;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: rgba(11, 126, 167, 0.35);
    transform: translateY(-50%);
}

.app-side-sublink.active {
    background: rgba(18, 181, 228, 0.13);
    color: #0b2a3e;
    font-weight: 700;
}

.app-side-sublink.active::before {
    background: #0b7ea7;
    box-shadow: 0 0 0 2px rgba(18, 181, 228, 0.18);
}

.app-side-sublink:hover {
    background: rgba(12, 60, 90, 0.05);
    color: #0b1526;
}

.app-side-sublink .badge {
    font-size: 0.68rem;
    font-weight: 700;
}

.settings-nav-groups {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.settings-nav-group {
    display: flex;
    flex-direction: column;
}

.settings-nav-toggle {
    width: 100%;
    border: 0;
    border-radius: 16px;
    padding: 0.85rem 0.95rem;
    background: linear-gradient(180deg, rgba(18, 181, 228, 0.1), rgba(255, 255, 255, 0.96));
    color: #17324a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    text-align: left;
}

.settings-nav-toggle-title {
    display: block;
    font-family: "Nunito Sans", "Manrope", "Segoe UI", sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
}

.settings-nav-toggle-description {
    display: block;
    margin-top: 0.12rem;
    color: #5d7286;
    font-size: 0.78rem;
}

.settings-nav-chevron {
    width: 9px;
    height: 9px;
    border-right: 2px solid #0b7ea7;
    border-bottom: 2px solid #0b7ea7;
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
    flex: 0 0 auto;
}

.settings-nav-toggle[aria-expanded="true"] .settings-nav-chevron {
    transform: rotate(45deg);
}

.settings-nav-links {
    margin-top: 0.45rem;
    padding-left: 0.5rem;
    border-left: 2px solid rgba(18, 181, 228, 0.2);
}

.settings-nav-links .list-group-item {
    border: 0;
    border-radius: 12px;
    margin-bottom: 0.22rem;
    padding: 0.7rem 0.85rem;
}

.settings-nav-links .list-group-item.active {
    background: rgba(18, 181, 228, 0.14);
    color: #0b1526;
    font-weight: 700;
}

@media (min-width: 992px) {
    .app-side-nav.offcanvas-lg {
        visibility: visible !important;
        transform: none !important;
    }
}

@media (max-width: 991.98px) {
    .app-shell {
        padding-top: 1rem;
    }

    .app-shell-auth {
        padding-left: 0;
    }

    .app-side-nav {
        border-radius: 0 18px 18px 0;
        top: var(--app-chrome-height, var(--app-nav-height));
        height: calc(100vh - var(--app-chrome-height, var(--app-nav-height)));
        padding-top: 0;
        z-index: 1045;
    }

    .app-footer-shell {
        gap: 0.65rem;
    }
}

@media (max-width: 575.98px) {
    .app-footer-shell {
        padding: 0.62rem 0.68rem;
    }

    .app-footer-badge {
        width: 36px;
        height: 36px;
        border-radius: 11px;
        font-size: 0.72rem;
        flex-basis: 36px;
    }

    .app-footer-brand {
        font-size: 0.92rem;
    }

    .app-footer-copy {
        font-size: 0.75rem;
    }
}

.clinic-logo-preview {
    height: 72px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
    background: #fff;
}

.clinic-favicon-preview {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: #fff;
}

.branding-grid .branding-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 1rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.branding-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.branding-title {
    font-weight: 600;
    color: #0f172a;
}

.branding-chip {
    font-size: .72rem;
    font-weight: 600;
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.12);
    padding: .15rem .5rem;
    border-radius: 999px;
}

.branding-preview {
    height: 110px;
    border-radius: 14px;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), #fff);
    display: flex;
    align-items: center;
    justify-content: center;
}

.branding-preview-image {
    max-height: 72px;
    max-width: 100%;
    object-fit: contain;
}

.branding-preview-icon {
    max-height: 48px;
}

.branding-preview-empty {
    color: rgba(15, 23, 42, 0.5);
    font-size: .82rem;
}

.branding-field .form-control {
    border-radius: 12px;
}

.branding-toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
}

.branding-help {
    font-size: .82rem;
    color: rgba(15, 23, 42, 0.6);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Bootstrap cards inside app-core: flat, borde sutil, sin sombra */
.app-core .card {
    border-radius: 12px !important;
    box-shadow: none !important;
    border-color: rgba(12, 60, 90, 0.09) !important;
}

.app-core .card.border-0 {
    border: 1px solid rgba(12, 60, 90, 0.09) !important;
}

.app-core .card-header {
    background: transparent;
    border-bottom-color: rgba(12, 60, 90, 0.07);
}

.app-core hr {
    opacity: .08;
}

/* Filter form buttons: alineados con el nuevo sistema de botones */
.filter-form .btn.w-100 {
    min-height: unset;
    border-radius: var(--app-btn-radius);
}

/* Page header: compact, refined typography */
.app-core h1.h3 {
    font-family: "Playfair Display", "Georgia", serif;
    font-size: 1.18rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.015em;
    line-height: 1.2;
    margin-bottom: 0.15rem;
}

.app-core h1.h3 + .text-muted,
.app-core h1.h3 + div.text-muted {
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 0.76rem !important;
    color: rgba(15, 23, 42, 0.46) !important;
    line-height: 1.35;
    margin-bottom: 0;
}

.app-core .d-flex:has(> div > h1.h3),
.app-core [class*="page-head"]:has(h1.h3) {
    margin-bottom: 0.85rem !important;
}

/* Settings area */
.settings-shell {
    max-width: 100%;
    margin-inline: auto;
}

.opacity-10 {
    opacity: .1 !important;
}

.settings-shell .table > :not(caption) > * > * {
    padding-top: .85rem;
    padding-bottom: .85rem;
}

.settings-shell .table thead th {
    font-weight: 600;
    color: rgba(33, 37, 41, .75);
}

/* Schedule segments */
.schedule-segment-row .form-control {
    flex: 1 1 0;
    min-width: 0;
}

.schedule-segment-remove {
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Agenda */
.agenda-shell {
    --agenda-accent: #12b5e4;
    --agenda-accent-strong: #0b7ea7;
    --agenda-border: rgba(12, 60, 90, 0.12);
}

.agenda-page-head .h3 {
    margin-bottom: .15rem;
}

.agenda-week-range {
    margin-top: .25rem;
    font-size: .82rem;
    font-weight: 600;
    color: rgba(11, 126, 167, 0.92);
}

.agenda-overview-card {
    background:
        radial-gradient(260px 160px at 8% 0%, rgba(18, 181, 228, 0.11), transparent 70%),
        radial-gradient(320px 180px at 96% 100%, rgba(11, 126, 167, 0.08), transparent 72%),
        linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(245, 251, 255, 0.98));
}

.agenda-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

.agenda-kpi-item {
    border: 1px solid var(--agenda-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 22px rgba(9, 34, 52, 0.08);
    padding: .72rem .85rem;
}

.agenda-kpi-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(15, 23, 42, 0.6);
    font-weight: 700;
}

.agenda-kpi-value {
    margin-top: .14rem;
    font-size: 1.38rem;
    line-height: 1.05;
    font-weight: 700;
    color: #0f172a;
}

.agenda-kpi-hint {
    margin-top: .18rem;
    font-size: .75rem;
    color: rgba(15, 23, 42, 0.62);
}

.agenda-status-row {
    margin-top: .75rem;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.agenda-status-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .26rem .62rem;
    border: 1px solid rgba(12, 60, 90, 0.16);
    font-size: .74rem;
    font-weight: 700;
    color: #0f172a;
}

.agenda-day-strip {
    margin-top: .8rem;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .5rem;
}

.agenda-day-pill {
    border: 1px solid var(--agenda-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 16px rgba(9, 34, 52, 0.06);
    text-align: left;
    padding: .55rem .62rem;
    display: grid;
    gap: .08rem;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.agenda-day-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(9, 34, 52, 0.1);
}

.agenda-day-pill.is-today {
    border-color: rgba(11, 126, 167, 0.52);
    background: linear-gradient(130deg, rgba(18, 181, 228, 0.17), rgba(255, 255, 255, 0.92));
}

.agenda-day-pill-title {
    font-size: .84rem;
    font-weight: 700;
    color: #0f172a;
}

.agenda-day-pill-date {
    font-size: .72rem;
    color: rgba(15, 23, 42, 0.65);
}

.agenda-day-pill-meta {
    font-size: .72rem;
    color: rgba(15, 23, 42, 0.72);
    line-height: 1.2;
}

.agenda-day-pill-meta.secondary {
    color: rgba(11, 126, 167, 0.86);
    font-weight: 600;
}

.agenda-board-card {
    overflow: hidden;
}

.agenda-week {
    --agenda-days: 7;
    --agenda-ppm: 1.1;
    --agenda-gap: 14px;
    --agenda-time-col-width: 84px;
    --agenda-day-min-width: 190px;
    overflow-x: auto;
    padding-bottom: .25rem;
}

.agenda-header,
.agenda-body {
    display: grid;
    grid-template-columns: var(--agenda-time-col-width) repeat(var(--agenda-days), minmax(var(--agenda-day-min-width), 1fr));
    gap: var(--agenda-gap);
}

.agenda-header {
    align-items: stretch;
    padding-bottom: .75rem;
    border-bottom: 1px solid rgba(33, 37, 41, .08);
}

.agenda-day-header {
    border: 1px solid var(--agenda-border);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 249, 255, 0.98));
    box-shadow: 0 8px 20px rgba(9, 34, 52, 0.08);
    text-align: center;
    padding: .42rem .34rem;
    display: grid;
    gap: .05rem;
}

.agenda-day-header-today {
    border-color: rgba(11, 126, 167, 0.5);
    background: linear-gradient(165deg, rgba(18, 181, 228, 0.2), rgba(255, 255, 255, 0.98));
}

.agenda-day-hours {
    font-size: .68rem;
    color: rgba(15, 23, 42, 0.65);
}

.agenda-day-header-meta {
    margin-top: .08rem;
    display: grid;
    gap: .02rem;
    font-size: .67rem;
    color: rgba(15, 23, 42, 0.78);
}

.agenda-day-header-meta span:last-child {
    color: rgba(11, 126, 167, 0.88);
    font-weight: 600;
}

.agenda-body {
    padding-top: .75rem;
}

.agenda-time-col {
    position: relative;
    height: var(--agenda-day-height);
}

.agenda-time {
    height: calc(60px * var(--agenda-ppm));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    color: rgba(33, 37, 41, .55);
    border-top: 1px solid rgba(33, 37, 41, .06);
    box-sizing: border-box;
}

.agenda-day-col {
    position: relative;
    height: var(--agenda-day-height);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(11, 126, 167, .04), rgba(15, 23, 42, .02));
    border: 1px solid rgba(12, 60, 90, .12);
    overflow: hidden;
}

.agenda-day-col::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent calc(60px * var(--agenda-ppm) - 1px),
        rgba(33, 37, 41, .07) calc(60px * var(--agenda-ppm) - 1px),
        rgba(33, 37, 41, .07) calc(60px * var(--agenda-ppm))
    );
    opacity: .7;
}

.agenda-open-segment {
    position: absolute;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.02));
    border-top: 1px solid rgba(16, 185, 129, 0.14);
    border-bottom: 1px solid rgba(16, 185, 129, 0.12);
    pointer-events: none;
}

.agenda-now-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(239, 68, 68, 0.82);
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.24);
    z-index: 4;
    pointer-events: none;
}

.agenda-now-line::before {
    content: "";
    position: absolute;
    left: 6px;
    top: -4px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ef4444;
}

.agenda-event {
    position: absolute;
    z-index: 5;
    left: 10px;
    right: 10px;
    padding: .46rem 2rem .46rem .6rem;
    border-radius: .85rem;
    color: #0f172a;
    background: rgba(13, 110, 253, .14);
    border: 1px solid rgba(13, 110, 253, .18);
    box-shadow: 0 .35rem .9rem rgba(0, 0, 0, .08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-decoration: none;
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.agenda-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 .45rem 1rem rgba(0, 0, 0, .11);
}

.agenda-event-time {
    font-size: .74rem;
    color: rgba(33, 37, 41, .74);
    line-height: 1.2;
}

.agenda-event-title {
    font-weight: 700;
    font-size: .88rem;
    line-height: 1.15;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.agenda-event-subtitle {
    font-size: .74rem;
    color: rgba(33, 37, 41, .78);
    line-height: 1.2;
    margin-top: .12rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.agenda-event-flags {
    position: absolute;
    top: 5px;
    right: 7px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.agenda-event-flag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .7);
    flex-shrink: 0;
}

.agenda-event-flag-dot--afterseason {
    background: #f59e0b;
}

.agenda-event-flag-dot--booking {
    background: #0ea5e9;
}

.agenda-event-membership {
    width: 16px;
    height: 16px;
    min-width: 16px;
    border-width: 1px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .7);
}

.agenda-event-membership svg {
    width: 9px;
    height: 9px;
}

.agenda-event-membership .membership-medal-img {
    width: 9px;
    height: 9px;
}

.agenda-event-overlap-badge {
    position: absolute;
    top: 5px;
    right: 7px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .85);
    line-height: 1;
    z-index: 2;
}

.agenda-event-overlap-peers {
    margin-top: .25rem;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.agenda-event-overlap-peer-row {
    font-size: .72rem;
    color: rgba(33, 37, 41, .7);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    padding-left: .5rem;
    border-left: 2px solid rgba(33, 37, 41, .2);
}

.appointment-origin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.12rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    line-height: 1.15;
    white-space: nowrap;
}

.appointment-origin-badge--app {
    color: #075985;
    background: rgba(14, 165, 233, 0.18);
    border-color: rgba(14, 165, 233, 0.35);
}

.appointment-origin-badge--dashboard {
    color: #065f46;
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.32);
}

.appointment-origin-badge--unknown {
    color: #334155;
    background: rgba(148, 163, 184, 0.14);
    border-color: rgba(148, 163, 184, 0.38);
}

.agenda-event-origin {
    margin-top: 0.16rem;
    line-height: 1;
}

.agenda-event-origin .appointment-origin-badge {
    max-width: 100%;
    font-size: 0.62rem;
    padding: 0.1rem 0.42rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agenda-time,
.agenda-line {
    box-sizing: border-box;
}

.agenda-event-draft {
    background: rgba(253, 224, 71, .28);
    border-color: rgba(234, 179, 8, .5);
}

.agenda-event-planned {
    background: rgba(253, 224, 71, .28);
    border-color: rgba(234, 179, 8, .5);
}

.agenda-event-confirmed {
    background: rgba(59, 130, 246, .16);
    border-color: rgba(59, 130, 246, .32);
}

.agenda-event-completed {
    background: rgba(25, 135, 84, .15);
    border-color: rgba(25, 135, 84, .3);
}

.agenda-event-cancelled {
    background: rgba(108, 117, 125, .12);
    border-color: rgba(108, 117, 125, .24);
    text-decoration: line-through;
}

.agenda-event-noshow {
    background: rgba(245, 158, 11, .16);
    border-color: rgba(245, 158, 11, .28);
}

.agenda-event-blocked {
    background: rgba(220, 38, 38, .14);
    border-color: rgba(220, 38, 38, .3);
}

.agenda-slot-menu {
    position: fixed;
    width: min(290px, calc(100vw - 1.5rem));
    z-index: 1080;
    border: 1px solid rgba(12, 60, 90, 0.14);
    border-radius: 18px;
    background:
        radial-gradient(160px 120px at 92% 8%, rgba(18, 181, 228, 0.14), transparent 65%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.98));
    box-shadow: 0 22px 46px rgba(9, 34, 52, 0.2);
    backdrop-filter: blur(8px);
    animation: agenda-slot-menu-enter 0.18s ease;
}

.agenda-slot-menu .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.agenda-slot-menu-head {
    border-bottom: 1px solid rgba(12, 60, 90, 0.1);
}

.agenda-slot-menu-kicker {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: rgba(11, 126, 167, 0.88);
    margin-bottom: 0.18rem;
}

.agenda-slot-menu-time {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.82);
}

.agenda-slot-option {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
    padding: 0.52rem 0.58rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-align: left;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.agenda-slot-option:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(9, 34, 52, 0.12);
}

.agenda-slot-option:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(37, 140, 251, 0.2);
}

.agenda-slot-option-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.78rem;
    flex: 0 0 30px;
}

.agenda-slot-option-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
}

.agenda-slot-option-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.15;
}

.agenda-slot-option-subtitle {
    font-size: 0.73rem;
    color: rgba(15, 23, 42, 0.62);
    line-height: 1.15;
}

.agenda-slot-option-block {
    border-color: rgba(245, 158, 11, 0.26);
    background: linear-gradient(120deg, rgba(255, 247, 230, 0.95), rgba(255, 255, 255, 0.9));
}

.agenda-slot-option-block .agenda-slot-option-icon {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.32);
}

.agenda-slot-option-manage {
    border-color: rgba(99, 102, 241, 0.22);
    background: linear-gradient(120deg, rgba(238, 242, 255, 0.95), rgba(255, 255, 255, 0.9));
}

.agenda-slot-option-manage .agenda-slot-option-icon {
    background: rgba(99, 102, 241, 0.14);
    color: #4338ca;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.agenda-slot-option-new {
    border-color: rgba(16, 185, 129, 0.28);
    background: linear-gradient(120deg, rgba(236, 253, 245, 0.96), rgba(255, 255, 255, 0.92));
}

.agenda-slot-option-new .agenda-slot-option-icon {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.33);
}

@media (max-width: 1199.98px) {
    .agenda-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agenda-day-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .agenda-kpi-grid {
        grid-template-columns: 1fr;
    }

    .agenda-day-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@keyframes agenda-slot-menu-enter {
    from {
        opacity: 0;
        transform: translateY(4px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* Request appointment: mini calendar */
.appt-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: .45rem;
    align-items: center;
}

.appt-cal-dow {
    text-align: center;
    font-size: .75rem;
    color: rgba(33, 37, 41, .6);
    padding-bottom: .1rem;
}

.appt-cal-day {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: .9rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.appt-cal-day.appt-cal-day-out {
    opacity: .35;
}

.appt-cal-day.appt-cal-day-holiday:not(:disabled) {
    border-color: rgba(220, 53, 69, .35);
}

.appt-cal-day:disabled {
    opacity: .35;
    cursor: not-allowed;
}

/* Pricing availability: sticky save bar */
.pricing-savebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    background: #fff;
    border-top: 1px solid rgba(33, 37, 41, .08);
    box-shadow: 0 -8px 18px rgba(33, 37, 41, .08);
    padding: .75rem 0;
}

.pricing-savebar .btn {
    white-space: nowrap;
}

.pricing-savebar-spacer {
    height: 80px;
}

.pricing-club-row {
    background: rgba(13, 110, 253, 0.06);
}

.pricing-club-label,
.pricing-club-name,
.pricing-club-amount {
    font-weight: 600;
    color: #0d6efd;
}

/* Pricing availability: section tones */
.pricing-section {
    border: 1px solid transparent;
}

.pricing-section-dynamic {
    background: rgba(176, 219, 241, 0.4);
    border-color: rgba(99, 102, 241, 0.2);
}

.pricing-section-membership {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
}

.pricing-subcard {
    border: 1px solid transparent;
}

.pricing-subcard-rule {
    background: rgba(141 186 209 / 0.2);
    border-color: rgba(251, 191, 36, 0.28);
}

.pricing-subcard-membership {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.28);
}

.membership-highlight {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    padding: 0.6rem 0.85rem;
    border-radius: 0.85rem;
    background: rgba(13, 110, 253, 0.08);
    border: 1px solid rgba(13, 110, 253, 0.2);
    color: #0d6efd;
}

.membership-highlight-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.membership-highlight-name {
    font-weight: 700;
}

.membership-highlight-dates {
    font-size: 0.8rem;
    color: rgba(13, 110, 253, 0.85);
}

.membership-medal {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(13, 110, 253, 0.12);
    border: 1px solid rgba(13, 110, 253, 0.2);
    color: #0d6efd;
    box-shadow: 0 8px 16px rgba(13, 110, 253, 0.12);
}

.membership-medal-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid rgba(13, 110, 253, 0.25);
    color: #0d6efd;
}

.membership-medal-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.membership-medal-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

.membership-list-icon {
    width: 28px;
    height: 28px;
}

.membership-medal-text {
    font-weight: 600;
    font-size: 0.9rem;
}

.membership-medal-icon-oro {
    color: #c9a227;
}

.membership-medal-icon-plata {
    color: #8c8c8c;
}

.membership-medal-icon-bronce {
    color: #b87333;
}

.membership-icon-preview {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.membership-icon-preview svg {
    width: 22px;
    height: 22px;
    display: block;
}

.app-toast-region {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: min(360px, calc(100vw - 2rem));
    z-index: 1085;
    pointer-events: none;
}

.app-toast {
    --toast-bg: #f9fafb;
    --toast-border: rgba(148, 163, 184, 0.4);
    --toast-accent: #64748b;
    --toast-text: #0f172a;
    position: relative;
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: var(--toast-bg);
    border: 1px solid var(--toast-border);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.12);
    color: var(--toast-text);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: auto;
}

.app-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.app-toast.is-leaving {
    animation: toast-leave 0.2s ease forwards;
}

.app-toast[data-tone="success"] {
    --toast-bg: #edfdf5;
    --toast-border: rgba(52, 211, 153, 0.45);
    --toast-accent: #10b981;
}

.app-toast[data-tone="info"] {
    --toast-bg: #eef6ff;
    --toast-border: rgba(96, 165, 250, 0.45);
    --toast-accent: #3b82f6;
}

.app-toast[data-tone="warning"] {
    --toast-bg: #fff7ed;
    --toast-border: rgba(251, 191, 36, 0.55);
    --toast-accent: #f59e0b;
}

.app-toast[data-tone="danger"] {
    --toast-bg: #fff1f2;
    --toast-border: rgba(244, 114, 182, 0.45);
    --toast-accent: #f43f5e;
}

.app-toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--toast-border);
    display: grid;
    place-items: center;
    color: var(--toast-accent);
    font-weight: 700;
    font-size: 1.1rem;
}

.app-toast-icon::before {
    content: "!";
}

.app-toast[data-tone="success"] .app-toast-icon::before {
    content: "✓";
}

.app-toast[data-tone="info"] .app-toast-icon::before {
    content: "i";
}

.app-toast[data-tone="warning"] .app-toast-icon::before {
    content: "!";
}

.app-toast[data-tone="danger"] .app-toast-icon::before {
    content: "×";
}

.app-toast-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.app-toast-message {
    font-size: 0.88rem;
    color: rgba(15, 23, 42, 0.7);
}

.app-toast-close {
    position: absolute;
    top: 0.35rem;
    right: 0.45rem;
    border: none;
    background: transparent;
    color: rgba(15, 23, 42, 0.4);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.app-toast-close:hover {
    color: rgba(15, 23, 42, 0.7);
}

.app-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    background: linear-gradient(90deg, transparent, var(--toast-accent));
    opacity: 0.6;
    transform-origin: left;
    transform: scaleX(0);
}

.app-toast-progress.is-running {
    animation: toast-progress var(--toast-duration, 4500ms) linear forwards;
}

@keyframes toast-progress {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

@keyframes toast-leave {
    to {
        opacity: 0;
        transform: translateY(-6px);
    }
}

.service-emoji-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.service-emoji-button {
    width: 38px;
    height: 38px;
    padding: 0;
    font-size: 1.2rem;
    line-height: 1;
}

.service-emoji-preview {
    font-size: 1.5rem;
    line-height: 1;
}

.service-icon-emoji {
    font-size: 1.5rem;
    line-height: 1;
    display: block;
}

.patient-record-shell {
    border: 1px solid #dbe3ef !important;
    background-color: #ffffff !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08) !important;
}

.patient-record-shell > .card-body {
    background-color: #ffffff;
}

.patient-section-card {
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.patient-section-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1) !important;
}

.patient-section-toggle {
    width: 100%;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem !important;
    border-radius: 14px;
    border: 1px solid #dbe3ef !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    color: #0f172a !important;
    font-weight: 700;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.patient-section-toggle:hover {
    border-color: #c4d2e7 !important;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%) !important;
}

.patient-section-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.22rem rgba(59, 130, 246, 0.22);
}

.patient-section-toggle.accordion-button::after {
    width: 0.6rem;
    height: 0.6rem;
    margin-left: auto;
    background-image: none;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.patient-section-toggle.accordion-button:not(.collapsed)::after,
.patient-section-toggle[aria-expanded="true"]::after {
    transform: rotate(-135deg);
}

.patient-section-subtitle {
    margin-top: 0.35rem;
    margin-left: 0.2rem;
}

.patient-section-body {
    padding-top: 0.75rem;
}

/* Filtro desplegable de checkboxes (CORA: empleados/tratamientos; Agenda: empleado) */
.checkbox-dropdown-filter-toggle {
    font-weight: 500;
}

.checkbox-dropdown-filter-chevron {
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.6;
    flex: 0 0 auto;
}

.checkbox-dropdown-filter-menu {
    min-width: 240px;
    max-width: 320px;
}

.checkbox-dropdown-filter-options {
    max-height: 220px;
    overflow-y: auto;
}

.checkbox-dropdown-filter-options .form-check {
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
}

/* Aviso de cookies */
.cookie-banner {
    display: none;
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 1080;
    max-width: 480px;
    margin-inline: auto;
    background: #fff;
    color: #212529;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.18);
    padding: 0.85rem 1rem;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.82rem;
    line-height: 1.35;
}

.cookie-banner-visible {
    display: flex;
}

.cookie-banner-text {
    margin: 0;
}

.cookie-banner-accept {
    align-self: flex-end;
}

/* ── Ayuda ─────────────────────────────────────────────────────── */
.help-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1050;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #0c3c5a;
    color: #fff;
    font-family: var(--app-btn-font);
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(9, 34, 52, 0.3);
}

.help-fab:hover,
.help-fab:focus-visible {
    background: #12b5e4;
    color: #fff;
}

.help-group-title {
    color: #0c3c5a;
}

.help-content {
    max-width: 860px;
    line-height: 1.6;
}

.help-content h2 {
    font-size: 1.25rem;
    margin-top: 1.75rem;
}

.help-content h3 {
    font-size: 1.05rem;
    margin-top: 1.25rem;
}

.help-content img {
    max-width: 100%;
    border: 1px solid var(--app-core-border);
    border-radius: 8px;
}

.help-content table {
    width: 100%;
    margin: 1rem 0;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.help-content th,
.help-content td {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--app-core-border);
    vertical-align: top;
}

.help-content th {
    background: rgba(12, 60, 90, 0.05);
}

.help-content blockquote {
    margin: 1rem 0;
    padding: 0.6rem 1rem;
    border-left: 4px solid #12b5e4;
    background: rgba(18, 181, 228, 0.07);
    border-radius: 0 8px 8px 0;
}

.help-content blockquote p {
    margin: 0;
}
