:root {
  color-scheme: light;
  --brand-50: #f5f3ff;
  --brand-100: #ede9fe;
  --brand-600: #7052d9;
  --brand-700: #5941b0;
  --aqua-100: #ccfbf5;
  --aqua-500: #14b8a6;
  --coral-100: #ffe3d8;
  --coral-500: #f36f56;
  --slate-25: #fcfcfd;
  --slate-50: #f8f9fb;
  --slate-100: #f1f3f6;
  --slate-200: #e5e7eb;
  --slate-400: #9ca3af;
  --slate-500: #6b7280;
  --slate-600: #4b5563;
  --slate-800: #1f2937;
  --slate-900: #111827;
  --success: #17855b;
  --success-bg: #eaf7f0;
  --warning: #c87513;
  --warning-bg: #fff6e7;
  --danger: #c83e4d;
  --danger-bg: #fdedef;
  --info: #3478d4;
  --info-bg: #edf4fd;
  --surface: #ffffff;
  --border: #e5e7eb;
  --shadow-1: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-2: 0 16px 40px rgba(49, 46, 129, .10);
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--slate-50);
  color: var(--slate-800);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--slate-50); }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.brand-large { font-size: 30px; }
.logo-mark { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(145deg, var(--brand-600), var(--aqua-500)); box-shadow: var(--shadow-1); flex: 0 0 auto; }
.brand-large .logo-mark { width: 52px; height: 52px; border-radius: 17px; }
.logo-mark svg { width: 23px; height: 23px; }
.brand-large .logo-mark svg { width: 32px; height: 32px; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 6px 10px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: 13px; font-weight: 800; letter-spacing: .02em; margin: 0 0 12px; }
.serif { font-family: "Lora", serif; font-style: italic; font-weight: 500; color: var(--brand-700); }

.btn { min-height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 800; cursor: pointer; transition: .18s cubic-bezier(.2,.8,.2,1); }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, .login-form input:focus-visible, .nav-item:focus-visible, .admin-note:focus-visible { outline: 3px solid rgba(112, 82, 217, .22); outline-offset: 2px; }
.btn-primary { background: var(--brand-600); color: #fff; }
.btn-primary:hover { background: var(--brand-700); }
.btn-secondary { background: #fff; border-color: var(--border); color: var(--slate-800); }
.btn-soft { background: var(--brand-50); color: var(--brand-700); }
.btn-danger { background: var(--danger-bg); border-color: rgba(200, 62, 77, .18); color: var(--danger); }
.btn-danger:hover { background: #fbd9de; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { background: #fff; border-right: 1px solid var(--border); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { padding: 0 8px; }
.nav-list { display: grid; gap: 3px; }
.nav-item { min-height: 44px; padding: 0 12px; border-radius: 10px; display: flex; align-items: center; gap: 10px; color: var(--slate-600); font-size: 14px; font-weight: 700; }
.nav-item-with-badge { justify-content: flex-start; }
.nav-badge { margin-left: auto; min-width: 22px; min-height: 22px; display: inline-grid; place-items: center; padding: 0 7px; border-radius: 999px; background: var(--coral-500); color: #fff; font-size: 12px; font-weight: 900; }
.nav-item.active, .nav-item:hover { background: var(--brand-50); color: var(--brand-700); }
.nav-item span { min-width: 18px; text-align: center; }
.sidebar-settings { display: grid; gap: 3px; }
.sidebar-settings summary { cursor: pointer; list-style: none; }
.sidebar-settings summary::-webkit-details-marker { display: none; }
.sidebar-settings .subitem { margin-left: 28px; min-height: 38px; font-size: 13px; }
.sidebar-card { margin-top: auto; padding: 16px; background: linear-gradient(180deg, #fff, var(--brand-50)); border: 1px solid rgba(112, 82, 217, .16); border-radius: 16px; box-shadow: var(--shadow-1); }
.sidebar-card strong { display: block; margin-bottom: 6px; }
.sidebar-card p { color: var(--slate-500); font-size: 13px; margin: 0; }

.app-main { min-width: 0; padding: 24px; display: grid; grid-auto-rows: max-content; align-content: start; gap: 18px; }
.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 18px 22px; box-shadow: var(--shadow-1); }
.topbar h1 { margin: 0; font-size: clamp(26px, 4vw, 34px); line-height: 1.1; letter-spacing: -.04em; }
.compact-topbar { min-height: 0; padding: 10px 14px; border-radius: 14px; background: linear-gradient(135deg, #fff, var(--brand-50)); }
.compact-topbar .eyebrow { margin-bottom: 3px; padding: 3px 8px; font-size: 11px; }
.compact-topbar h1 { font-size: clamp(20px, 2.2vw, 24px); }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar-actions form { margin: 0; }
.action-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px; border: 1px solid rgba(112, 82, 217, .14); border-radius: 14px; background: radial-gradient(circle at top left, rgba(204, 251, 245, .62), transparent 34%), linear-gradient(135deg, #fff, var(--brand-50)); box-shadow: var(--shadow-1); }
.quick-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-menu { position: relative; }
.profile-menu summary { min-height: 38px; padding: 0 12px; border-radius: 10px; display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); color: var(--slate-800); font-size: 14px; font-weight: 900; cursor: pointer; list-style: none; }
.profile-menu summary::-webkit-details-marker { display: none; }
.profile-menu summary::after { content: "⌄"; color: var(--brand-700); font-weight: 900; }
.profile-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; width: 220px; padding: 8px; border-radius: 16px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-2); display: grid; gap: 4px; }
.profile-menu-panel a, .profile-menu-panel button { width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: 10px; display: flex; align-items: center; background: transparent; color: var(--slate-800); font: inherit; font-weight: 800; text-align: left; cursor: pointer; }
.profile-menu-panel a:hover, .profile-menu-panel button:hover { background: var(--brand-50); color: var(--brand-700); }
.profile-menu-panel form { margin: 0; }

.welcome-panel { display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: end; padding: 28px; border-radius: 24px; border: 1px solid rgba(112, 82, 217, .16); background: radial-gradient(circle at top right, rgba(204, 251, 245, .9), transparent 32%), linear-gradient(135deg, #fff, var(--brand-50)); box-shadow: var(--shadow-2); }
.welcome-panel h2 { max-width: 850px; margin-bottom: 10px; font-size: clamp(32px, 5vw, 48px); line-height: 1.08; letter-spacing: -.04em; }
.welcome-panel p { max-width: 760px; color: var(--slate-600); margin-bottom: 0; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card, .panel { background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-1); }
.stat-card { padding: 18px; display: grid; gap: 7px; }
.stat-card span { color: var(--slate-500); font-size: 13px; font-weight: 700; }
.stat-card strong { font-size: 30px; line-height: 1; letter-spacing: -.04em; }
.stat-card small { color: var(--slate-500); }
.content-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.panel { padding: 22px; min-width: 0; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.panel-head.compact { margin-bottom: 10px; }
.panel h2 { font-size: 22px; line-height: 1.2; letter-spacing: -.03em; margin-bottom: 5px; }
.panel p { color: var(--slate-500); margin-bottom: 0; }

.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.badge.brand { background: var(--brand-50); color: var(--brand-700); }
.badge.success { background: var(--success-bg); color: var(--success); }
.appointment-list, .task-list { display: grid; gap: 12px; }
.appointment-card { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--slate-100); border-radius: 16px; background: linear-gradient(135deg, #fff, var(--slate-50)); }
.appointment-card-mini { grid-template-columns: 76px minmax(0, 1fr); align-items: start; background: linear-gradient(135deg, rgba(112, 82, 217, .06), rgba(20, 184, 166, .06)); border-color: rgba(112, 82, 217, .14); }
.appointment-card-mini .badge { grid-column: 1 / -1; width: fit-content; }
.appointment-time { display: grid; gap: 3px; padding-right: 14px; border-right: 1px solid var(--slate-200); }
.appointment-time strong { color: var(--slate-900); font-size: 16px; }
.appointment-time span { color: var(--slate-500); font-size: 13px; font-weight: 700; }
.appointment-body h3 { margin: 0 0 4px; font-size: 17px; letter-spacing: -.02em; }
.appointment-body p { font-size: 14px; }
.inline-link { display: inline-flex; margin-top: 8px; color: var(--brand-700); font-size: 13px; font-weight: 800; }
.inline-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr); gap: 18px; align-items: start; }
.calendar-panel { background: radial-gradient(circle at top right, rgba(204, 251, 245, .72), transparent 30%), linear-gradient(145deg, #fff, var(--brand-50)); }
.upcoming-panel { background: linear-gradient(180deg, #fff, rgba(255, 227, 216, .34)); border-color: rgba(243, 111, 86, .18); }
.calendar-head { align-items: center; }
.calendar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.calendar-weekday { color: var(--brand-700); font-size: 12px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; text-align: center; }
.calendar-day { min-height: 116px; padding: 10px; border: 1px solid rgba(112, 82, 217, .12); border-radius: 16px; background: rgba(255, 255, 255, .84); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.calendar-day.muted { background: rgba(248, 249, 251, .66); opacity: .62; }
.calendar-day.today { border-color: rgba(112, 82, 217, .48); background: radial-gradient(circle at top right, rgba(204, 251, 245, .9), transparent 45%), linear-gradient(145deg, #fff, var(--brand-50)); box-shadow: 0 12px 28px rgba(112, 82, 217, .14); }
.calendar-day.today .calendar-date { background: var(--brand-600); color: #fff; }
.calendar-day-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.calendar-date { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 10px; color: var(--slate-800); font-weight: 900; }
.calendar-add { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: 18px; line-height: 1; font-weight: 900; border: 1px solid rgba(112, 82, 217, .18); }
.calendar-add:hover { background: var(--brand-600); color: #fff; }
.calendar-events { display: grid; gap: 5px; margin-top: 8px; }
.calendar-event { display: block; padding: 7px 8px; border-radius: 10px; background: linear-gradient(135deg, var(--brand-600), var(--aqua-500)); color: #fff; font-size: 12px; font-weight: 800; line-height: 1.25; box-shadow: 0 8px 18px rgba(112, 82, 217, .16); }
.calendar-event span { display: block; color: rgba(255, 255, 255, .78); font-size: 11px; }
.compact-list { max-height: 680px; overflow-y: auto; padding-right: 3px; }
.clients-panel { background: radial-gradient(circle at top right, rgba(255, 227, 216, .72), transparent 28%), linear-gradient(145deg, #fff, var(--brand-50)); }
.client-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.client-card { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 14px; padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, .86); border: 1px solid rgba(112, 82, 217, .14); box-shadow: var(--shadow-1); }
.client-avatar { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(145deg, var(--brand-600), var(--aqua-500)); color: #fff; font-weight: 900; letter-spacing: .02em; }
.client-card-body { min-width: 0; }
.client-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.client-card h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.03em; }
.client-card p { font-size: 14px; }
.client-meta { display: grid; gap: 8px; margin: 0; }
.client-meta div { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 10px; }
.client-meta dt { color: var(--slate-500); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.client-meta dd { margin: 0; color: var(--slate-800); font-size: 14px; }
.client-form-panel { background: radial-gradient(circle at top right, rgba(204, 251, 245, .5), transparent 35%), #fff; }
.notes-panel { background: radial-gradient(circle at top right, rgba(204, 251, 245, .58), transparent 30%), linear-gradient(145deg, #fff, var(--brand-50)); }
.notes-list { display: grid; gap: 12px; }
.note-card { padding: 16px; border: 1px solid rgba(112, 82, 217, .14); border-radius: 18px; background: rgba(255, 255, 255, .86); box-shadow: var(--shadow-1); }
.note-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.note-card h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.03em; }
.note-card p { font-size: 14px; }
.note-preview { color: var(--slate-600); line-height: 1.55; }
.billing-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: start; }
.billing-panel { background: radial-gradient(circle at top right, rgba(255, 227, 216, .5), transparent 30%), linear-gradient(145deg, #fff, var(--brand-50)); }
.package-list { display: grid; gap: 12px; }
.package-card { display: grid; gap: 10px; padding: 14px; border: 1px solid rgba(112, 82, 217, .14); border-radius: 16px; background: rgba(255, 255, 255, .86); box-shadow: var(--shadow-1); }
.request-list { display: grid; gap: 14px; }
.request-card { display: grid; gap: 12px; padding: 16px; border: 1px solid rgba(112, 82, 217, .14); border-radius: 18px; background: rgba(255,255,255,.9); box-shadow: var(--shadow-1); }
.request-card h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.03em; }
.package-card strong { display: block; margin-bottom: 4px; }
.package-card p { font-size: 14px; }
.documents-panel { background: radial-gradient(circle at top right, rgba(204, 251, 245, .5), transparent 30%), linear-gradient(145deg, #fff, var(--brand-50)); }
.document-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.document-card { display: grid; gap: 10px; padding: 16px; border: 1px solid rgba(112, 82, 217, .14); border-radius: 18px; background: rgba(255, 255, 255, .88); box-shadow: var(--shadow-1); }
.document-card strong { display: block; margin-bottom: 4px; }
.document-card p { color: var(--slate-500); font-size: 14px; overflow-wrap: anywhere; }
.inline-button-danger { margin-top: 8px; border: 0; background: transparent; color: var(--danger); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.inline-button { border: 0; background: transparent; color: var(--brand-700); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; padding: 0; }
.credential-panel { border-color: rgba(20, 184, 166, .25); background: radial-gradient(circle at top right, rgba(204, 251, 245, .72), transparent 32%), #fff; }
.credential-box { white-space: pre-line; overflow-wrap: anywhere; padding: 14px; border: 1px dashed rgba(112, 82, 217, .35); border-radius: 16px; background: rgba(255,255,255,.8); color: var(--slate-800); font-weight: 800; line-height: 1.7; }
.credential-hint { padding: 12px 14px; border-radius: 14px; background: var(--slate-50); color: var(--slate-600); font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.portal-page { background: radial-gradient(circle at 12% 8%, rgba(204, 251, 245, .55), transparent 28%), var(--slate-50); }
.portal-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0; display: grid; grid-auto-rows: max-content; gap: 18px; }
.portal-stats .stat-card { background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(244,240,255,.82)); }
.portal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.portal-request-panel { background: radial-gradient(circle at top right, rgba(255, 227, 216, .56), transparent 34%), #fff; }
.portal-documents { grid-template-columns: 1fr; }
.modal-dialog { width: min(860px, calc(100% - 28px)); max-height: min(82vh, 820px); padding: 0; border: 0; border-radius: 24px; background: transparent; color: var(--slate-800); }
.modal-dialog::backdrop { background: rgba(17, 24, 39, .42); backdrop-filter: blur(3px); }
.modal-card { max-height: min(82vh, 820px); overflow-y: auto; padding: 22px; border: 1px solid rgba(112, 82, 217, .16); border-radius: 24px; background: radial-gradient(circle at top right, rgba(204, 251, 245, .7), transparent 34%), linear-gradient(145deg, #fff, var(--brand-50)); box-shadow: 0 28px 80px rgba(15, 23, 42, .28); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.modal-head h2 { margin: 0; font-size: 26px; letter-spacing: -.04em; }
.modal-close { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--slate-800); font-size: 24px; line-height: 1; cursor: pointer; }
.modal-close:hover { background: var(--brand-50); color: var(--brand-700); }
.task-card { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 12px; padding: 14px; border-radius: 16px; background: var(--slate-50); border: 1px solid var(--slate-100); }
.task-card > span { width: 10px; border-radius: 999px; background: var(--brand-600); }
.task-card.warning > span { background: var(--warning); }
.task-card.success > span { background: var(--success); }
.task-card strong { display: block; margin-bottom: 3px; color: var(--slate-900); }
.task-card p { font-size: 14px; }
.empty-state { color: var(--slate-500); }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--slate-200); text-align: left; }
th { color: var(--slate-500); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }

.login-page { min-height: 100vh; background: radial-gradient(circle at 15% 15%, rgba(204, 251, 245, .95), transparent 30%), linear-gradient(135deg, var(--slate-900), var(--brand-700)); }
.login-shell { min-height: 100vh; width: min(1120px, calc(100% - 32px)); margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; align-items: center; padding: 42px 0; }
.login-brand-panel { color: #fff; }
.login-brand-panel .eyebrow { margin-top: 42px; background: rgba(255,255,255,.12); color: #fff; }
.login-brand-panel h1 { max-width: 660px; font-size: clamp(42px, 7vw, 68px); line-height: 1.04; letter-spacing: -.05em; margin-bottom: 20px; }
.login-brand-panel p { max-width: 650px; color: rgba(255,255,255,.76); font-size: 18px; }
.trust-list { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.trust-list span { min-height: 30px; display: inline-flex; align-items: center; padding: 4px 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: rgba(255,255,255,.88); font-size: 13px; font-weight: 700; }
.login-card { width: min(460px, 100%); justify-self: end; background: rgba(255,255,255,.97); border: 1px solid rgba(229,231,235,.86); border-radius: 28px; box-shadow: 0 28px 80px rgba(15, 23, 42, .28); padding: 34px; }
.login-card h2 { margin-bottom: 10px; color: var(--slate-800); font-size: 31px; letter-spacing: -.04em; }
.login-copy { color: var(--slate-500); }
.login-form { display: grid; gap: 10px; margin-top: 22px; }
.login-form label { font-weight: 800; color: var(--slate-800); }
.login-form input { width: 100%; min-height: 46px; border: 1px solid #cbd5e1; border-radius: 10px; padding: 0 14px; background: #fff; color: var(--slate-800); }
.login-form input:focus { border-color: var(--brand-600); }
.login-form button { margin-top: 8px; min-height: 48px; border: 0; border-radius: 12px; background: var(--brand-600); color: white; padding: 0 16px; font-weight: 800; cursor: pointer; }
.login-form button:hover { background: var(--brand-700); }
.form-error { background: var(--danger-bg); color: var(--danger); border-radius: 14px; padding: 12px 14px; }
.admin-note { display: inline-flex; margin-top: 18px; color: var(--brand-700); font-weight: 800; }
.login-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }

.signup-page { min-height: 100vh; background: radial-gradient(circle at 12% 10%, rgba(204, 251, 245, .95), transparent 28%), linear-gradient(135deg, var(--slate-50), #fff); }
.signup-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0; display: grid; grid-template-columns: .82fr 1.18fr; gap: 28px; align-items: start; }
.signup-intro { position: sticky; top: 28px; padding: 28px; border-radius: 28px; background: linear-gradient(145deg, var(--slate-900), var(--brand-700)); color: #fff; box-shadow: var(--shadow-2); }
.signup-intro .eyebrow { margin-top: 42px; background: rgba(255,255,255,.12); color: #fff; }
.signup-intro h1 { font-size: clamp(38px, 5vw, 58px); line-height: 1.05; letter-spacing: -.05em; margin-bottom: 18px; }
.signup-intro p { color: rgba(255,255,255,.78); font-size: 17px; }
.trust-list.dark span { border-color: rgba(255,255,255,.18); color: rgba(255,255,255,.88); }
.signup-card { padding: 28px; background: #fff; border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow-2); }
.signup-form { display: grid; gap: 24px; }
.signup-form fieldset { border: 0; padding: 0; margin: 0; }
.signup-form legend { font-size: 20px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 14px; color: var(--slate-800); }
.field-grid { display: grid; gap: 14px; }
.field-grid.two { grid-template-columns: repeat(2, 1fr); }
.field.full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 800; color: var(--slate-800); }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; border: 1px solid #cbd5e1; border-radius: 10px; padding: 0 14px; background: #fff; color: var(--slate-800); }
.field.checkbox-field { display: flex; align-items: end; }
.field.checkbox-field label { min-height: 46px; margin: 0; padding: 0 12px; display: inline-flex; align-items: center; gap: 9px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--slate-800); }
.field.checkbox-field input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; padding: 0; accent-color: var(--brand-600); }
.field textarea { min-height: 118px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(112, 82, 217, .22); outline-offset: 2px; border-color: var(--brand-600); }
.field .errorlist { margin: 7px 0 0; padding: 0; list-style: none; color: var(--danger); font-size: 13px; font-weight: 700; }
.form-panel { max-width: 980px; }
.appointment-form { display: grid; gap: 20px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.split-actions { justify-content: space-between; margin-top: 20px; }
.split-actions form { margin: 0; }
.signup-submit { width: 100%; min-height: 52px; }
.signup-footnote { margin: 0; text-align: center; color: var(--slate-500); }
.signup-footnote a { color: var(--brand-700); font-weight: 800; }

@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 72px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .sidebar .brand span:not(.logo-mark), .nav-item { justify-content: center; }
  .nav-item { padding: 0; }
  .nav-item:not(.active) { color: var(--slate-500); }
  .nav-item span + text, .nav-item { font-size: 0; }
  .nav-item span { font-size: 16px; }
  .sidebar-card { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .content-grid, .calendar-layout, .billing-grid, .login-shell { grid-template-columns: 1fr; }
  .document-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-grid { grid-template-columns: 1fr; }
  .client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-card { justify-self: start; }
}

@media (max-width: 720px) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar .brand span:not(.logo-mark) { display: inline; }
  .nav-list { grid-template-columns: repeat(3, 1fr); }
  .nav-item { font-size: 0; }
  .app-main { padding: 16px; }
  .topbar, .welcome-panel, .panel-head, .action-bar { display: grid; grid-template-columns: 1fr; }
  .profile-menu-panel { left: 0; right: auto; }
  .stats { grid-template-columns: 1fr; }
  .appointment-card { grid-template-columns: 1fr; align-items: start; }
  .appointment-time { padding-right: 0; padding-bottom: 10px; border-right: 0; border-bottom: 1px solid var(--slate-200); }
  .calendar-grid { gap: 5px; }
  .calendar-day { min-height: 92px; padding: 7px; border-radius: 12px; }
  .calendar-event { padding: 5px 6px; font-size: 11px; }
  .client-card { grid-template-columns: 1fr; }
  .client-grid { grid-template-columns: 1fr; }
  .document-grid { grid-template-columns: 1fr; }
  .client-meta div { grid-template-columns: 1fr; gap: 2px; }
  .modal-card { padding: 18px; }
  .login-shell { width: min(calc(100% - 24px), 1120px); padding: 24px 0; }
  .login-brand-panel h1 { font-size: 40px; }
  .login-card { padding: 24px; }
  .signup-shell { width: min(calc(100% - 24px), 1180px); grid-template-columns: 1fr; }
  .signup-intro { position: static; }
  .field-grid.two { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
