@font-face {
    font-family: "Assistant";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/assistant/Assistant-Variable.ttf") format("truetype");
}

:root {
    --apptor-primary: #5b5ce2;
    --apptor-primary-dark: #4546bd;
    --apptor-primary-soft: #efefff;
    --apptor-accent: #0ea5a8;
    --apptor-ink: #172033;
    --apptor-muted: #6b7280;
    --apptor-line: #e8eaf1;
    --apptor-surface: #ffffff;
    --apptor-bg: #f6f7fb;
    --apptor-sidebar: #17182f;
    --apptor-sidebar-width: 278px;
    --apptor-radius: 20px;
    --apptor-shadow: 0 18px 55px rgba(30, 34, 78, .08);
}

* { box-sizing: border-box; }
html { background: var(--apptor-bg); }
body {
    color: var(--apptor-ink);
    font-family: "Assistant", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: -.01em;
}
a { color: var(--apptor-primary); font-weight: 600; text-underline-offset: 3px; }
a:hover { color: var(--apptor-primary-dark); }
.btn { border-radius: 12px; font-weight: 700; min-height: 44px; padding-inline: 1rem; }
.btn-sm { min-height: 38px; }
.btn-primary {
    --bs-btn-bg: var(--apptor-primary);
    --bs-btn-border-color: var(--apptor-primary);
    --bs-btn-hover-bg: var(--apptor-primary-dark);
    --bs-btn-hover-border-color: var(--apptor-primary-dark);
    --bs-btn-active-bg: var(--apptor-primary-dark);
    --bs-btn-active-border-color: var(--apptor-primary-dark);
    box-shadow: 0 10px 24px rgba(91, 92, 226, .22);
}
.btn-outline-secondary {
    --bs-btn-color: #4b5563;
    --bs-btn-border-color: #dfe2ea;
    --bs-btn-hover-bg: #f2f3f8;
    --bs-btn-hover-border-color: #d7d9e3;
    --bs-btn-hover-color: var(--apptor-ink);
}
.form-label { color: #343a4a; font-size: .94rem; font-weight: 700; margin-bottom: .45rem; }
.form-control {
    background: #fbfbfd;
    border: 1px solid #dfe2ea;
    border-radius: 13px;
    min-height: 50px;
    padding: .72rem .95rem;
}
.form-control-lg { font-size: 1rem; min-height: 54px; }
.form-control:hover { border-color: #c8ccda; }
.form-control:focus {
    background: #fff;
    border-color: #9293ef;
    box-shadow: 0 0 0 .25rem rgba(91, 92, 226, .12);
}
.alert { border: 0; border-radius: 14px; }

.auth-body {
    align-items: center;
    background:
        radial-gradient(circle at 8% 12%, rgba(91, 92, 226, .14), transparent 29rem),
        radial-gradient(circle at 94% 88%, rgba(14, 165, 168, .12), transparent 27rem),
        #f7f7fc;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}
.auth-shell { max-width: 1120px; }
.auth-stage {
    background: rgba(255, 255, 255, .8);
    border: 1px solid rgba(255, 255, 255, .85);
    border-radius: 28px;
    box-shadow: 0 30px 90px rgba(43, 46, 105, .13);
    display: grid;
    grid-template-columns: minmax(0, .86fr) minmax(440px, 1.14fr);
    min-height: 650px;
    overflow: hidden;
}
.auth-visual {
    background: linear-gradient(145deg, rgba(20, 22, 55, .2), rgba(20, 22, 55, .02)), linear-gradient(145deg, #25275f, #5657d9 58%, #10a5a8);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 3rem;
    position: relative;
}
.auth-visual::before, .auth-visual::after {
    border: 1px solid rgba(255, 255, 255, .17);
    border-radius: 50%;
    content: "";
    position: absolute;
}
.auth-visual::before { height: 25rem; inset-inline-end: -13rem; top: -9rem; width: 25rem; }
.auth-visual::after { bottom: -9rem; height: 19rem; inset-inline-start: -7rem; width: 19rem; }
.auth-visual-content, .auth-visual-footer { position: relative; z-index: 1; }
.auth-visual h2 {
    font-size: clamp(2rem, 3.5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.08;
    margin-bottom: 1.25rem;
    max-width: 11ch;
}
.auth-visual p { color: rgba(255, 255, 255, .78); font-size: 1.08rem; line-height: 1.7; max-width: 30rem; }
.auth-benefits { display: grid; gap: .75rem; margin: 2rem 0 0; padding: 0; }
.auth-benefits li { align-items: center; display: flex; gap: .7rem; list-style: none; }
.benefit-check {
    align-items: center;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 auto;
    height: 28px;
    justify-content: center;
    width: 28px;
}
.auth-card { align-items: center; background: var(--apptor-surface); display: flex; }
.auth-card-inner { margin-inline: auto; max-width: 510px; padding: clamp(2rem, 5vw, 4.5rem); width: 100%; }
.auth-kicker { color: var(--apptor-primary); display: block; font-size: .82rem; font-weight: 800; letter-spacing: .04em; margin-bottom: .5rem; }
.brand { color: var(--apptor-ink); font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; text-decoration: none; }
.brand-light, .brand-light:hover { color: #fff; }
.brand-logo-icon {
    aspect-ratio: 1;
    border-radius: 50%;
    flex: 0 0 auto;
    height: 42px;
    object-fit: contain;
    width: 42px;
}
.brand-mark {
    align-items: center;
    background: linear-gradient(135deg, #7475f4, #4b4cca);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 12px;
    box-shadow: 0 9px 22px rgba(43, 45, 146, .26);
    color: #fff;
    display: inline-flex;
    font-size: 1.05rem;
    height: 42px;
    justify-content: center;
    width: 42px;
}
.auth-visual .brand-mark, .sidebar .brand-mark { background: rgba(255, 255, 255, .13); box-shadow: none; }
.auth-heading { font-size: clamp(1.8rem, 4vw, 2.35rem); font-weight: 750; letter-spacing: -.035em; }

.dashboard-body { background: var(--apptor-bg); min-height: 100vh; }
.sidebar {
    background: radial-gradient(circle at 80% 8%, rgba(105, 106, 241, .22), transparent 12rem), var(--apptor-sidebar);
    bottom: 0;
    color: #fff;
    inset-inline-start: 0;
    position: fixed;
    top: 0;
    width: var(--apptor-sidebar-width);
    z-index: 1030;
}
.sidebar-section-label { color: rgba(255, 255, 255, .36); font-size: .72rem; font-weight: 700; letter-spacing: .08em; padding: 1rem 1.1rem .45rem; }
.sidebar .nav-link, .sidebar-mobile .nav-link {
    border-radius: 12px;
    color: rgba(255, 255, 255, .68);
    font-weight: 600;
    min-height: 48px;
    padding: .7rem .9rem;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.sidebar .nav-link:hover, .sidebar .nav-link.active, .sidebar-mobile .nav-link:hover, .sidebar-mobile .nav-link.active { background: rgba(255, 255, 255, .1); color: #fff; }
.sidebar .nav-link.active, .sidebar-mobile .nav-link.active { box-shadow: inset -3px 0 0 #8b8cf8; }
.sidebar .nav-link.disabled, .sidebar-mobile .nav-link.disabled { color: rgba(255, 255, 255, .36); }
.nav-icon {
    align-items: center;
    background: rgba(255, 255, 255, .06);
    border-radius: 9px;
    display: inline-flex;
    flex: 0 0 auto;
    height: 32px;
    justify-content: center;
    width: 32px;
}
.nav-icon svg { height: 18px; stroke: currentColor; width: 18px; }
.sidebar-footer { border-top: 1px solid rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .44); font-size: .78rem; margin-top: auto; padding: 1.25rem 1.5rem; }
.sidebar-mobile { --bs-offcanvas-width: min(88vw, 330px); background: var(--apptor-sidebar); color: #fff; }
.dashboard-main { min-height: 100vh; }
.topbar {
    backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, .88) !important;
    border-color: rgba(225, 228, 238, .88) !important;
    z-index: 1020;
}
.topbar-title { font-weight: 750; letter-spacing: -.025em; }
.mobile-menu-button { align-items: center; border-color: var(--apptor-line); display: inline-flex; height: 42px; justify-content: center; padding: 0; width: 42px; }
.mobile-menu-button svg { height: 21px; stroke: currentColor; width: 21px; }
.page-content { margin-inline: auto; max-width: 1480px; }
.welcome-panel {
    background: radial-gradient(circle at 10% 15%, rgba(255, 255, 255, .15), transparent 16rem), linear-gradient(125deg, #24265f, #5556d6 55%, #0f9b9e);
    border-radius: 24px;
    box-shadow: 0 20px 55px rgba(61, 63, 164, .2);
    color: #fff;
    overflow: hidden;
    position: relative;
}
.welcome-panel::before, .welcome-panel::after { border: 1px solid rgba(255, 255, 255, .17); border-radius: 50%; content: ""; position: absolute; }
.welcome-panel::before { height: 19rem; inset-inline-end: -6rem; top: -9rem; width: 19rem; }
.welcome-panel::after { bottom: -8rem; height: 14rem; inset-inline-end: 8rem; width: 14rem; }
.welcome-panel > * { position: relative; z-index: 1; }
.eyebrow { color: #d6d7ff; font-size: .78rem; font-weight: 800; letter-spacing: .05em; }
.welcome-title { font-size: clamp(2rem, 4vw, 3.35rem); font-weight: 750; letter-spacing: -.045em; line-height: 1.05; }
.welcome-copy { color: rgba(255, 255, 255, .76); font-size: 1.08rem; line-height: 1.7; max-width: 54rem; }
.status-pill {
    align-items: center;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    display: inline-flex;
    font-weight: 700;
    gap: .55rem;
    padding: .7rem 1rem;
}
.status-dot { background: #75f0c7; border-radius: 50%; box-shadow: 0 0 0 5px rgba(117, 240, 199, .12); height: 8px; width: 8px; }
.metric-card, .empty-state, .next-steps-card { border: 1px solid rgba(229, 231, 239, .85) !important; border-radius: var(--apptor-radius); box-shadow: var(--apptor-shadow); }
.metric-card { overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.metric-card:hover { box-shadow: 0 22px 60px rgba(30, 34, 78, .12); transform: translateY(-2px); }
.metric-icon { align-items: center; background: var(--apptor-primary-soft); border-radius: 12px; color: var(--apptor-primary); display: inline-flex; height: 44px; justify-content: center; width: 44px; }
.metric-icon svg { height: 21px; stroke: currentColor; width: 21px; }
.metric-value { font-size: 2.35rem; font-weight: 750; letter-spacing: -.05em; line-height: 1; }
.empty-icon { align-items: center; background: #e8faf5; border-radius: 14px; color: #11856f; display: inline-flex; font-size: 1.35rem; height: 52px; justify-content: center; width: 52px; }
.section-heading { font-size: 1.2rem; font-weight: 750; }
.setup-step { align-items: center; border: 1px solid var(--apptor-line); border-radius: 15px; display: flex; gap: 1rem; min-height: 74px; padding: .9rem 1rem; }
.setup-step-number { align-items: center; background: var(--apptor-primary-soft); border-radius: 11px; color: var(--apptor-primary); display: inline-flex; flex: 0 0 auto; font-weight: 800; height: 38px; justify-content: center; width: 38px; }
.setup-step small { color: var(--apptor-muted); }

@media (min-width: 992px) { .dashboard-main { margin-inline-start: var(--apptor-sidebar-width); } }
@media (max-width: 991.98px) {
    .auth-shell { max-width: 680px; }
    .auth-stage { display: flex; flex-direction: column; min-height: 0; }
    .auth-visual { order: -1; }
    .auth-visual { min-height: 245px; padding: 2rem; }
    .auth-visual h2 { font-size: 2rem; max-width: 16ch; }
    .auth-benefits, .auth-visual-footer { display: none; }
}
@media (max-width: 575.98px) {
    .auth-body { align-items: flex-start; background: #fff; }
    .auth-shell { padding: 0 !important; }
    .auth-stage { border: 0; border-radius: 0; box-shadow: none; min-height: 100vh; }
    .auth-visual { min-height: 205px; padding: 1.5rem; }
    .auth-visual h2 { font-size: 1.7rem; margin-bottom: .75rem; }
    .auth-visual p { font-size: .96rem; line-height: 1.55; }
    .auth-card-inner { padding: 2rem 1.35rem 2.5rem; }
    .welcome-panel { border-radius: 18px; }
    .page-content { padding: .25rem !important; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
/* Phase 2 workspace */
.page-heading { min-height: 74px; }
.page-title { font-size: clamp(1.75rem, 3vw, 2.35rem); font-weight: 760; letter-spacing: -.04em; }
.content-card, .team-card {
    border: 1px solid rgba(229, 231, 239, .9) !important;
    border-radius: var(--apptor-radius);
    box-shadow: var(--apptor-shadow);
    overflow: hidden;
}
.team-card { transition: transform .2s ease, box-shadow .2s ease; }
.team-card:hover { box-shadow: 0 22px 60px rgba(30, 34, 78, .12); transform: translateY(-2px); }
.is-muted { opacity: .62; }
.app-table thead th { background: #fafafe; border-bottom-color: var(--apptor-line); color: #6b7280; font-size: .78rem; font-weight: 800; letter-spacing: .025em; padding: 1rem 1.25rem; white-space: nowrap; }
.app-table tbody td { border-bottom-color: #eef0f5; padding: 1rem 1.25rem; vertical-align: middle; }
.app-table tbody tr:last-child td { border-bottom: 0; }
.table-description { max-width: 22rem; }
.color-dot { background: var(--item-color, var(--apptor-primary)); border-radius: 50%; box-shadow: 0 0 0 5px color-mix(in srgb, var(--item-color, var(--apptor-primary)) 12%, transparent); flex: 0 0 auto; height: 12px; width: 12px; }
.status-badge { background: #f0f1f5; border-radius: 999px; color: #6b7280; display: inline-flex; font-size: .78rem; font-weight: 750; padding: .35rem .65rem; white-space: nowrap; }
.status-badge.status-active { background: #e8faf5; color: #087863; }
.feature-empty { align-items: center; display: flex; flex-direction: column; padding: clamp(3rem, 8vw, 6rem) 1.5rem; text-align: center; }
.feature-empty.compact { padding: 2.5rem 1.25rem; }
.feature-empty h3, .feature-empty h4 { font-size: 1.25rem; font-weight: 750; margin: .9rem 0 .4rem; }
.feature-empty p { color: var(--apptor-muted); margin-bottom: 1.25rem; max-width: 30rem; }
.feature-empty-icon, .soft-icon { align-items: center; background: var(--apptor-primary-soft); border-radius: 16px; color: var(--apptor-primary); display: inline-flex; font-size: 1.45rem; height: 54px; justify-content: center; width: 54px; }
.soft-icon.danger { background: #fff0f1; color: #c2414d; }
.modal-content { border: 0; border-radius: 22px; box-shadow: 0 28px 90px rgba(25, 28, 72, .2); overflow: hidden; }
.modal-header, .modal-footer { border-color: var(--apptor-line); padding: 1.25rem 1.5rem; }
.modal-body { padding: 1.5rem; }
.modal-kicker { color: var(--apptor-primary); display: block; font-size: .74rem; font-weight: 800; letter-spacing: .05em; }
.form-select { background-color: #fbfbfd; border: 1px solid #dfe2ea; border-radius: 13px; min-height: 50px; padding-block: .72rem; }
.form-select:focus { border-color: #9293ef; box-shadow: 0 0 0 .25rem rgba(91, 92, 226, .12); }
.form-control-color { padding: .45rem; }
.form-check-input:checked { background-color: var(--apptor-primary); border-color: var(--apptor-primary); }
.selection-grid { display: grid; gap: .7rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.selection-card { align-items: center; background: #fbfbfd; border: 1px solid var(--apptor-line); border-radius: 14px; cursor: pointer; display: flex; gap: .8rem; min-height: 66px; padding: .8rem 1rem; transition: border-color .18s ease, background-color .18s ease; }
.selection-card:has(input:checked) { background: var(--apptor-primary-soft); border-color: #b9baf7; }
.selection-card strong, .selection-card small { display: block; }
.selection-card small { color: var(--apptor-muted); margin-top: .1rem; }
.staff-avatar { align-items: center; background: var(--item-color, var(--apptor-accent)); border-radius: 16px; box-shadow: 0 10px 24px color-mix(in srgb, var(--item-color, var(--apptor-accent)) 22%, transparent); color: #fff; display: inline-flex; flex: 0 0 auto; font-size: 1.35rem; font-weight: 800; height: 54px; justify-content: center; width: 54px; }
.staff-services { background: #fafafe; border: 1px solid var(--apptor-line); border-radius: 13px; min-height: 70px; padding: .8rem 1rem; }
.min-w-0 { min-width: 0; }
.inline-empty { background: #fafafe; border: 1px dashed #d7dae6; border-radius: 14px; color: var(--apptor-muted); padding: 1.4rem; text-align: center; }
.hours-list { display: grid; gap: .65rem; }
.hours-row { align-items: center; display: grid; gap: .5rem; grid-template-columns: minmax(112px, 1.2fr) minmax(95px, 1fr) auto minmax(95px, 1fr) 42px; }
.hours-row .form-control, .hours-row .form-select { min-height: 44px; padding-block: .55rem; }
.btn-icon { align-items: center; display: inline-flex; justify-content: center; min-height: 42px; padding: 0; width: 42px; }
.is-invalid.selection-grid { border: 1px solid var(--bs-form-invalid-border-color); border-radius: 14px; padding: .35rem; }

@media (max-width: 767.98px) {
    .selection-grid { grid-template-columns: 1fr; }
    .app-table thead th, .app-table tbody td { padding-inline: .9rem; }
    .hours-row { background: #fafafe; border: 1px solid var(--apptor-line); border-radius: 14px; grid-template-columns: 1fr 1fr 42px; padding: .75rem; }
    .hours-row [data-hours-day] { grid-column: 1 / -1; }
    .hours-row > span { display: none; }
    .hours-row [data-hours-remove] { grid-column: 3; grid-row: 2; }
}
/* Phase 3 clients */
.client-toolbar { background: #fff; }
.search-box { max-width: 44rem; position: relative; }
.search-box .form-control { padding-inline-start: 3rem; }
.search-icon { color: var(--apptor-muted); font-size: 1.45rem; inset-inline-start: 1rem; line-height: 1; pointer-events: none; position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.client-count { font-size: .9rem; font-weight: 700; white-space: nowrap; }
.btn-reset { background: none; border: 0; color: inherit; padding: 0; }
.client-identity { align-items: center; display: inline-flex; gap: .8rem; min-width: 13rem; }
.client-identity:hover strong { color: var(--apptor-primary); }
.client-avatar { align-items: center; background: linear-gradient(135deg, #6f70ef, #4142b1); border-radius: 13px; color: #fff; display: inline-flex; flex: 0 0 auto; font-size: 1rem; font-weight: 800; height: 42px; justify-content: center; width: 42px; }
.client-avatar-lg { border-radius: 18px; font-size: 1.7rem; height: 68px; width: 68px; }
.client-pagination { background: #fff; }
.consent-panel { background: #fafafe; border: 1px solid var(--apptor-line); border-radius: 14px; padding: 1rem; }
.profile-loading { color: var(--apptor-muted); padding: 3rem 1rem; text-align: center; }
.client-profile-hero { align-items: center; background: linear-gradient(135deg, #f3f3ff, #edfafa); border-radius: 18px; display: flex; gap: 1rem; margin-bottom: 1.25rem; padding: 1.25rem; }
.client-profile-hero h3 { font-size: 1.45rem; font-weight: 760; margin: 0 0 .35rem; }
.profile-grid { display: grid; gap: .75rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.profile-grid > div { background: #fafafe; border: 1px solid var(--apptor-line); border-radius: 14px; min-height: 82px; padding: .85rem 1rem; }
.profile-grid small, .profile-grid strong { display: block; }
.profile-grid small { color: var(--apptor-muted); font-size: .78rem; margin-bottom: .25rem; }
.profile-grid strong { overflow-wrap: anywhere; }
.profile-notes, .profile-history { border-top: 1px solid var(--apptor-line); margin-top: 1.25rem; padding-top: 1.25rem; }
.profile-notes h4, .profile-history h4 { font-size: 1rem; font-weight: 760; margin-bottom: .75rem; }
.profile-notes p { background: #fafafe; border-radius: 12px; color: #4b5563; margin: 0; min-height: 54px; padding: .8rem 1rem; white-space: pre-wrap; }

@media (max-width: 767.98px) {
    .client-toolbar { align-items: stretch !important; }
    .search-box { max-width: none; }
    .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 479.98px) {
    .profile-grid { grid-template-columns: 1fr; }
    .client-profile-hero { align-items: flex-start; }
}

/* Phase 4 appointment engine */
.calendar-shell { overflow: hidden; }
.calendar-toolbar { background: linear-gradient(135deg, #fff, #fafafe); }
.calendar-toolbar .form-select { min-width: 12rem; }
.appointment-setup-actions { align-items: center; display: flex; flex: 0 0 auto; gap: .75rem; }
.appointment-setup-actions .btn { align-items: center; display: inline-flex; justify-content: center; line-height: 1; }
#appointmentCalendar { --fc-border-color: #e8e9f2; --fc-button-bg-color: #5657d9; --fc-button-border-color: #5657d9; --fc-button-hover-bg-color: #4243b7; --fc-button-active-bg-color: #34359d; --fc-event-border-color: transparent; }
#appointmentCalendar .fc-toolbar-title { color: var(--apptor-text); font-family: "Assistant", sans-serif; font-size: 1.35rem; font-weight: 760; }
#appointmentCalendar .fc-toolbar-chunk, #appointmentCalendar .fc-button-group { align-items: center; display: flex; }
#appointmentCalendar .fc-toolbar-chunk { gap: .75rem; }
#appointmentCalendar .fc-button-group { gap: .5rem; }
#appointmentCalendar .fc-button { align-items: center; border-radius: 10px !important; box-shadow: none; display: inline-flex; font-family: "Assistant", sans-serif; font-weight: 700; justify-content: center; line-height: 1; margin: 0 !important; min-height: 40px; }
#appointmentCalendar .fc-col-header-cell-cushion, #appointmentCalendar .fc-daygrid-day-number { color: #45465c; text-decoration: none; }
#appointmentCalendar .fc-timegrid-slot-label-cushion { color: var(--apptor-muted); font-size: .78rem; }
#appointmentCalendar .fc-event { border-radius: 8px; box-shadow: 0 3px 10px rgba(31, 33, 77, .12); cursor: pointer; font-weight: 700; padding: 2px 4px; }
.availability-panel { background: linear-gradient(135deg, #f8f8ff, #f2fbfb); border: 1px solid #dddff4; border-radius: 16px; padding: 1rem; }
.appointment-slots { display: flex; flex-wrap: wrap; gap: .5rem; min-height: 42px; }
.slot-chip { background: #fff; border: 1px solid #d6d8e8; border-radius: 10px; color: #34354a; font-weight: 750; min-width: 62px; padding: .45rem .7rem; transition: .15s ease; }
.slot-chip:hover, .slot-chip.active { background: var(--apptor-primary); border-color: var(--apptor-primary); color: #fff; transform: translateY(-1px); }
.appointment-detail-hero { align-items: center; background: linear-gradient(135deg, #f5f5ff, #effafa); border-radius: 18px; display: grid; gap: 1rem; grid-template-columns: auto 1fr auto; margin-bottom: 1.25rem; padding: 1.2rem; }
.appointment-detail-hero h3 { font-size: 1.35rem; font-weight: 780; margin: 0; }
.appointment-detail-hero p { color: var(--apptor-muted); margin: .2rem 0 0; }
.appointment-color { background: var(--appointment-color); border-radius: 50%; box-shadow: 0 0 0 6px rgba(255,255,255,.75); height: 18px; width: 18px; }
.appointment-actions, .appointment-notes, .status-history { border-top: 1px solid var(--apptor-line); padding-top: 1.25rem; }
.appointment-actions h4, .appointment-notes h4, .status-history h4 { font-size: 1rem; font-weight: 780; margin-bottom: .8rem; }
.appointment-note { background: #fafafe; border: 1px solid var(--apptor-line); border-radius: 13px; margin-bottom: .65rem; padding: .8rem 1rem; }
.appointment-note strong, .appointment-note small { display: block; }
.appointment-note small { color: var(--apptor-muted); font-size: .75rem; }
.appointment-note p { margin: .45rem 0 0; white-space: pre-wrap; }
.status-history ul { list-style: none; margin: 0; padding: 0; }
.status-history li { align-items: center; border-bottom: 1px solid #f0f1f6; display: flex; justify-content: space-between; padding: .55rem 0; }
.status-history small { color: var(--apptor-muted); }
.appointment-status-cancelled, .appointment-status-no_show { background: #f1f3f5; color: #697386; }
.appointment-status-completed { background: #e7f8ef; color: #087443; }

@media (max-width: 767.98px) {
    #appointmentCalendar .fc-header-toolbar { align-items: stretch; flex-direction: column; gap: .75rem; }
    #appointmentCalendar .fc-toolbar-chunk { display: flex; justify-content: center; }
    #appointmentCalendar .fc-toolbar-title { font-size: 1.15rem; }
    .calendar-toolbar .form-select { min-width: 0; }
    .appointment-setup-actions { width: 100%; }
    .appointment-setup-actions .btn { flex: 1 1 0; }
    .appointment-detail-hero { align-items: start; grid-template-columns: auto 1fr; }
    .appointment-detail-hero .status-badge { grid-column: 1 / -1; justify-self: start; }
}

/* Phase 7 reports and dashboard polish */
.welcome-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: flex-end; }
.welcome-actions .btn { min-width: 128px; }
.welcome-outline { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255,255,255,.36); --bs-btn-hover-bg: rgba(255,255,255,.12); --bs-btn-hover-border-color: rgba(255,255,255,.55); --bs-btn-hover-color: #fff; }
.dashboard-metrics { display: grid; gap: 1rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-metric-card { align-items: flex-start; background: #fff; border: 1px solid rgba(229,231,239,.9); border-radius: var(--apptor-radius); box-shadow: var(--apptor-shadow); display: flex; justify-content: space-between; min-height: 164px; padding: 1.45rem; transition: transform .2s ease, box-shadow .2s ease; }
.dashboard-metric-card:hover { box-shadow: 0 22px 60px rgba(30,34,78,.12); transform: translateY(-2px); }
.dashboard-metric-card > div { display: flex; flex-direction: column; min-width: 0; }
.dashboard-metric-card small { color: var(--apptor-muted); font-size: .84rem; font-weight: 700; }
.dashboard-metric-card strong { font-size: 2.35rem; font-weight: 780; letter-spacing: -.055em; line-height: 1; margin: .55rem 0 .7rem; }
.dashboard-metric-card > div > span { color: #8a91a1; font-size: .78rem; }
.metric-icon.tone-blue { background: #eaf2ff; color: #276fc5; }
.metric-icon.tone-violet { background: #efefff; color: #595ad7; }
.metric-icon.tone-teal { background: #e1f8f5; color: #07836d; }
.metric-icon.tone-green { background: #e7f8ef; color: #087443; }
.dashboard-section-heading { align-items: flex-start; border-bottom: 1px solid var(--apptor-line); display: flex; justify-content: space-between; padding: 1.35rem 1.5rem; }
.dashboard-section-heading.compact { border-bottom: 0; padding: 0 0 1rem; }
.dashboard-section-heading h2 { font-size: 1.1rem; font-weight: 780; margin: 0 0 .2rem; }
.dashboard-section-heading p { color: var(--apptor-muted); font-size: .82rem; margin: 0; }
.dashboard-section-heading > a { font-size: .85rem; text-decoration: none; }
.dashboard-empty { align-items: center; display: flex; gap: 1rem; min-height: 260px; padding: 2rem; }
.dashboard-empty-icon { align-items: center; background: #e7f8ef; border-radius: 18px; color: #087443; display: flex; flex: 0 0 auto; font-size: 1.4rem; height: 64px; justify-content: center; width: 64px; }
.dashboard-empty h3 { font-size: 1.15rem; font-weight: 780; margin: 0 0 .35rem; }
.dashboard-empty p { color: var(--apptor-muted); margin: 0 0 1rem; }
.upcoming-list { display: grid; }
.upcoming-row { align-items: center; border-bottom: 1px solid #eef0f5; color: var(--apptor-ink); display: grid; gap: 1rem; grid-template-columns: 58px 8px minmax(0,1fr) auto 18px; min-height: 82px; padding: .75rem 1.5rem; text-decoration: none; transition: background-color .16s ease; }
.upcoming-row:last-child { border-bottom: 0; }
.upcoming-row:hover { background: #fafafe; color: var(--apptor-ink); }
.upcoming-date { align-items: center; background: #f5f6fa; border-radius: 12px; display: flex; flex-direction: column; justify-content: center; min-height: 54px; }
.upcoming-date strong { font-size: 1.15rem; line-height: 1; }
.upcoming-date small { color: var(--apptor-muted); font-size: .65rem; margin-top: .25rem; }
.upcoming-color { background: var(--upcoming-color); border-radius: 99px; height: 34px; width: 5px; }
.upcoming-main strong, .upcoming-main small { display: block; }
.upcoming-main small { color: var(--apptor-muted); font-size: .78rem; margin-top: .18rem; }
.upcoming-row time { font-size: 1rem; font-weight: 780; }
.upcoming-arrow { color: #a0a6b4; }
.dashboard-insights { display: grid; gap: .85rem; }
.dashboard-insights > div { background: linear-gradient(135deg,#f8f8ff,#f4fbfb); border: 1px solid var(--apptor-line); border-radius: 15px; padding: 1rem; }
.dashboard-insights span, .dashboard-insights strong, .dashboard-insights small { display: block; }
.dashboard-insights span { color: var(--apptor-muted); font-size: .78rem; font-weight: 700; }
.dashboard-insights strong { font-size: 1.65rem; letter-spacing: -.04em; margin: .25rem 0; }
.dashboard-insights small { color: #9096a5; font-size: .7rem; }
.quick-actions { display: grid; gap: .8rem; grid-template-columns: repeat(5,minmax(0,1fr)); }
.quick-actions a { background: #fafafe; border: 1px solid var(--apptor-line); border-radius: 14px; color: var(--apptor-ink); min-height: 116px; padding: 1rem; text-decoration: none; transition: border-color .18s ease, transform .18s ease; }
.quick-actions a:hover { border-color: #bfc1ef; color: var(--apptor-ink); transform: translateY(-2px); }
.quick-actions span { align-items: center; background: var(--apptor-primary-soft); border-radius: 9px; color: var(--apptor-primary); display: flex; font-size: .72rem; font-weight: 800; height: 28px; justify-content: center; margin-bottom: .7rem; width: 28px; }
.quick-actions strong, .quick-actions small { display: block; }
.quick-actions small { color: var(--apptor-muted); font-size: .72rem; margin-top: .2rem; }
.report-periods { align-items: center; background: #fff; border: 1px solid var(--apptor-line); border-radius: 13px; display: flex; gap: .25rem; padding: .3rem; }
.report-period { border-radius: 9px; color: #62697a; font-size: .82rem; font-weight: 750; min-width: 64px; padding: .5rem .7rem; text-align: center; text-decoration: none; }
.report-period:hover { background: #f4f5fa; color: var(--apptor-ink); }
.report-period.is-active { background: var(--apptor-primary); box-shadow: 0 7px 16px rgba(91,92,226,.22); color: #fff; }
.report-metrics { display: grid; gap: 1rem; grid-template-columns: repeat(4,minmax(0,1fr)); }
.report-metric { align-items: center; background: #fff; border: 1px solid rgba(229,231,239,.9); border-radius: var(--apptor-radius); box-shadow: var(--apptor-shadow); display: flex; gap: 1rem; min-height: 142px; padding: 1.3rem; }
.report-metric-icon { align-items: center; border-radius: 15px; display: flex; flex: 0 0 auto; font-size: 1.25rem; font-weight: 800; height: 52px; justify-content: center; width: 52px; }
.report-metric-icon.is-blue { background: #eaf2ff; color: #276fc5; }
.report-metric-icon.is-green { background: #e7f8ef; color: #087443; }
.report-metric-icon.is-violet { background: #efefff; color: #595ad7; }
.report-metric-icon.is-amber { background: #fff4df; color: #a96805; }
.report-metric small, .report-metric strong, .report-metric span { display: block; }
.report-metric small { color: var(--apptor-muted); font-size: .76rem; font-weight: 700; }
.report-metric strong { font-size: 1.65rem; letter-spacing: -.04em; line-height: 1.1; margin: .3rem 0; }
.report-metric div > span { color: #949aa8; font-size: .7rem; }
.report-grid { display: grid; gap: 1.5rem; grid-template-columns: minmax(0,1.65fr) minmax(300px,.85fr); }
.report-card-heading { align-items: flex-start; display: flex; justify-content: space-between; }
.report-card-heading h3, .report-table-heading h3 { font-size: 1.08rem; font-weight: 780; margin: 0 0 .2rem; }
.report-card-heading p, .report-table-heading p { color: var(--apptor-muted); font-size: .78rem; margin: 0; }
.report-total-pill { background: var(--apptor-primary-soft); border-radius: 999px; color: var(--apptor-primary); font-size: .75rem; font-weight: 750; padding: .4rem .7rem; }
.trend-chart { align-items: end; display: flex; gap: clamp(.28rem,1vw,.8rem); height: 265px; margin-top: 1.5rem; overflow-x: auto; padding: 1rem .2rem 0; }
.trend-column { align-items: center; display: flex; flex: 1 0 24px; flex-direction: column; height: 100%; justify-content: end; min-width: 24px; }
.trend-value { color: #7b8292; font-size: .65rem; margin-bottom: .35rem; }
.trend-bar { align-items: end; background: #f0f1f7; border-radius: 7px 7px 3px 3px; display: flex; height: 190px; overflow: hidden; width: min(100%,30px); }
.trend-bar i { background: linear-gradient(180deg,#7778ee,#4f50cf); border-radius: 7px 7px 3px 3px; display: block; height: var(--bar-height); width: 100%; }
.trend-column small { color: #8b91a0; font-size: .58rem; margin-top: .45rem; white-space: nowrap; }
.report-empty { align-items: center; display: flex; flex-direction: column; justify-content: center; min-height: 260px; padding: 2rem; text-align: center; }
.report-empty.compact { min-height: 260px; }
.report-empty > span { align-items: center; background: var(--apptor-primary-soft); border-radius: 16px; color: var(--apptor-primary); display: flex; font-size: 1.5rem; height: 58px; justify-content: center; width: 58px; }
.report-empty h4 { font-size: 1.05rem; font-weight: 780; margin: .85rem 0 .3rem; }
.report-empty p { color: var(--apptor-muted); font-size: .85rem; margin: 0 0 1rem; max-width: 320px; }
.status-breakdown { display: grid; gap: 1rem; margin-top: 1.5rem; }
.status-report-row { display: grid; gap: .4rem; grid-template-columns: 1fr auto; }
.status-report-row > div:first-child { align-items: center; display: flex; gap: .5rem; }
.status-report-row strong { font-size: .82rem; }
.status-report-row small { color: var(--apptor-muted); font-size: .68rem; margin-inline-start: auto; }
.status-report-row > span { color: var(--apptor-muted); font-size: .72rem; }
.status-report-dot { background: #adb3c0; border-radius: 50%; height: 8px; width: 8px; }
.status-progress { background: #eef0f5; border-radius: 99px; grid-column: 1/-1; height: 7px; overflow: hidden; }
.status-progress i { background: #adb3c0; border-radius: 99px; display: block; height: 100%; width: var(--progress); }
.is-completed { background: #20a779 !important; }.is-confirmed { background: #595ad7 !important; }.is-pending { background: #d29221 !important; }.is-arrived,.is-progress { background: #2d80cc !important; }.is-cancelled { background: #9299a8 !important; }.is-no-show { background: #d35a68 !important; }
.report-client-grid { display: grid; gap: 1rem; grid-template-columns: repeat(4,minmax(0,1fr)); }
.client-insight-card { background: linear-gradient(135deg,#fff,#fafafe); border: 1px solid var(--apptor-line); border-radius: 17px; padding: 1.2rem; }
.client-insight-card span, .client-insight-card strong, .client-insight-card small { display: block; }
.client-insight-card span { color: var(--apptor-muted); font-size: .78rem; font-weight: 700; }
.client-insight-card strong { font-size: 1.75rem; letter-spacing: -.04em; margin: .2rem 0; }
.client-insight-card small { color: #9298a6; font-size: .7rem; }
.report-table-heading { border-bottom: 1px solid var(--apptor-line); padding: 1.25rem 1.5rem; }
.report-table th { background: #fafafe; color: #7c8392; font-size: .7rem; font-weight: 800; padding: .8rem 1rem; white-space: nowrap; }
.report-table td { border-bottom-color: #eef0f5; font-size: .82rem; padding: .9rem 1rem; vertical-align: middle; white-space: nowrap; }
.report-table tbody tr:last-child td { border-bottom: 0; }
.report-table td:first-child { align-items: center; display: flex; gap: .55rem; min-width: 140px; }
.report-color { background: var(--report-color); border-radius: 50%; box-shadow: 0 0 0 4px color-mix(in srgb,var(--report-color) 13%,transparent); height: 9px; width: 9px; }
@media (max-width:1199.98px) { .dashboard-metrics,.report-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }.quick-actions { grid-template-columns: repeat(3,minmax(0,1fr)); }.report-grid { grid-template-columns: 1fr; } }
@media (max-width:767.98px) { .welcome-actions { justify-content: stretch; }.welcome-actions .btn { flex: 1; }.dashboard-metrics,.report-metrics,.report-client-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.dashboard-metric-card { min-height: 145px; }.report-periods { max-width: 100%; overflow-x: auto; }.report-period { flex: 1 0 auto; }.page-heading .report-periods { width: 100%; }.quick-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }.upcoming-row { gap: .7rem; grid-template-columns: 50px 5px minmax(0,1fr) auto; padding-inline: 1rem; }.upcoming-arrow { display: none; }.trend-chart { height: 235px; }.trend-bar { height: 165px; } }
@media (max-width:479.98px) { .dashboard-metrics,.report-metrics,.report-client-grid { grid-template-columns: 1fr; }.dashboard-metric-card { min-height: 130px; }.dashboard-empty { align-items: flex-start; flex-direction: column; }.quick-actions { grid-template-columns: 1fr; }.quick-actions a { min-height: 95px; }.upcoming-main small { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.report-metric { min-height: 120px; }.report-trend-card .card-body,.report-status-card .card-body { padding: 1.2rem !important; } }