:root {
    --app-bg: #f3f6fb;
    --app-surface: #ffffff;
    --app-surface-soft: #f8fafc;
    --app-border: #dbe4ef;
    --app-text: #122033;
    --app-muted: #5f6f82;
    --app-primary: #1f6feb;
    --app-primary-dark: #174ea6;
    --app-accent: #0f766e;
    --app-warning: #b45309;
    --app-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

body.app-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at top right, rgba(31, 111, 235, 0.08), transparent 24rem),
        linear-gradient(180deg, #f8fbff 0%, var(--app-bg) 34%, #eef3f8 100%);
    color: var(--app-text);
}

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

.app-footer {
    flex-shrink: 0;
    border-top: 1px solid rgba(219, 228, 239, 0.85);
    color: var(--app-muted);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(2px);
}

a {
    color: var(--app-primary);
}

a:hover {
    color: var(--app-primary-dark);
}

.app-navbar {
    background: linear-gradient(135deg, #0f1c2f 0%, #13253d 55%, #173257 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-brand-mark {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #1f6feb, #0f766e);
    color: #fff;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.app-brand-subtitle {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.62);
}

.app-nav-links {
    gap: 0.35rem;
    margin-left: 1rem;
}

.app-nav-links .nav-link {
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    color: rgba(255, 255, 255, 0.74);
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
}

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

.app-user-tools {
    margin-top: 0.5rem;
}

.app-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
}

.app-user-chip:hover {
    color: #fff;
}

.app-user-avatar {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 700;
}

.app-user-name {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
}

.app-user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.66);
}

.btn {
    border-radius: 0.75rem;
    padding: 0.6rem 1rem;
    font-weight: 600;
}

.btn-sm {
    border-radius: 0.65rem;
    padding: 0.42rem 0.78rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--app-primary) 0%, #1d4ed8 100%);
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(31, 111, 235, 0.2);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #1c64d6 0%, #1e40af 100%);
    border-color: transparent;
}

.btn-outline-secondary {
    border-color: var(--app-border);
    color: var(--app-text);
}

.btn-outline-secondary:hover {
    background: var(--app-surface-soft);
    border-color: var(--app-border);
    color: var(--app-text);
}

.card {
    border: 1px solid rgba(219, 228, 239, 0.92);
    border-radius: 1rem;
    box-shadow: var(--app-shadow);
    background: rgba(255, 255, 255, 0.96);
}

.card-body {
    padding: 1.4rem;
}

.table {
    --bs-table-bg: transparent;
}

.table thead th {
    border-bottom-width: 1px;
    color: var(--app-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.table > :not(caption) > * > * {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
    border-color: rgba(219, 228, 239, 0.78);
}

.table-hover tbody tr:hover {
    --bs-table-accent-bg: rgba(31, 111, 235, 0.03);
}

.form-control,
.form-select {
    border-radius: 0.8rem;
    border-color: var(--app-border);
    padding: 0.72rem 0.9rem;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(31, 111, 235, 0.45);
    box-shadow: 0 0 0 0.22rem rgba(31, 111, 235, 0.14);
}

.form-label {
    font-weight: 600;
    color: var(--app-text);
}

.text-secondary,
.form-text,
.text-muted {
    color: var(--app-muted) !important;
}

.badge {
    border-radius: 999px;
    padding: 0.55rem 0.7rem;
    font-weight: 600;
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    padding: 2rem;
    border-radius: 1.2rem;
    background: linear-gradient(135deg, #0f1c2f 0%, #163154 58%, #1f6feb 100%);
    color: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    inset: auto -6rem -6rem auto;
    width: 15rem;
    height: 15rem;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 68%);
}

.dashboard-hero-subtitle {
    max-width: 42rem;
    color: rgba(255, 255, 255, 0.78);
}

.dashboard-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
    font-weight: 600;
}

.stat-card {
    height: 100%;
}

.stat-label {
    color: var(--app-muted);
    font-size: 0.84rem;
    font-weight: 600;
}

.stat-value {
    margin-top: 0.4rem;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--app-text);
}

.stat-note {
    margin-top: 0.55rem;
    color: var(--app-muted);
    font-size: 0.88rem;
}

.feature-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.feature-link:hover {
    color: inherit;
}

.feature-card {
    height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.feature-link:hover .feature-card {
    transform: translateY(-2px);
    border-color: rgba(31, 111, 235, 0.28);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
}

.feature-kicker {
    display: inline-block;
    margin-bottom: 0.85rem;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--app-accent);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.section-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--app-text);
}

.auth-shell {
    min-height: calc(100vh - 10rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    overflow: hidden;
}

.auth-side {
    height: 100%;
    padding: 2rem;
    background: linear-gradient(160deg, #0f1c2f 0%, #163154 62%, #0f766e 100%);
    color: #fff;
}

.auth-side p {
    color: rgba(255, 255, 255, 0.76);
}

.auth-side ul {
    padding-left: 1rem;
    color: rgba(255, 255, 255, 0.82);
}

.app-panel-title {
    margin-bottom: 0.25rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.list-group-item {
    border-color: rgba(219, 228, 239, 0.82);
}

.confirm-message-body {
    white-space: pre-line;
    line-height: 1.45;
}

.fc .calendar-day-past,
.fc .fc-day-past {
    background: rgba(148, 163, 184, 0.14) !important;
}

.fc .calendar-slot-past {
    background: rgba(148, 163, 184, 0.18) !important;
}

.fc .calendar-slot-label-past {
    color: #64748b !important;
}

.fc .calendar-event-past {
    opacity: .62;
    filter: saturate(.78);
}

.rdv-selected-slot {
    border: 1px solid #bfdbfe;
    border-radius: .9rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 1.15rem 1.25rem;
}

.rdv-selected-slot-label {
    color: #1d4ed8;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.rdv-selected-slot-value {
    color: #0f172a;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    font-weight: 800;
    line-height: 1.15;
}

@media (max-width: 767.98px) {
}

@media (max-width: 991.98px) {
    .app-nav-links {
        margin-left: 0;
        margin-bottom: 1rem;
    }

    .app-user-tools {
        align-items: flex-start !important;
    }
}

@media (max-width: 767.98px) {
    .dashboard-hero {
        padding: 1.5rem;
    }

    .stat-value {
        font-size: 1.7rem;
    }

    .card-body {
        padding: 1.15rem;
    }
}
