:root {
  --brand: rgba(138, 0, 5, 1);
  --brand-dark: #650004;
  --brand-soft: #fff2f2;
  --navy: #3d3838;
  --navy-2: #6f0004;
  --text: #1d2b3a;
  --muted: #657587;
  --line: #dce3ea;
  --canvas: #f5f7fa;
  --surface: #fff;
  --success: #16825d;
  --danger: #b42318;
  --sidebar-width: 264px;
  --header-height: 68px;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--canvas);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body { min-height: 100vh; margin: 0; color: var(--text); background: var(--canvas); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
.icon { display: block; flex: 0 0 auto; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; color: #f5e8e8; background: var(--brand); border-right: 1px solid rgba(255,255,255,.09); }
.sidebar__brand { height: var(--header-height); padding: 0 24px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar__logo { display: flex; align-items: center; text-decoration: none; }
.sidebar__logo img { display: block; width: 172px; max-width: 100%; max-height: 42px; object-fit: contain; object-position: left center; }
.brand-mark { width: 30px; height: 30px; display: inline-grid; place-items: center; color: #fff; background: var(--brand); font-size: 17px; font-weight: 800; letter-spacing: -.04em; }
.brand-mark--large { width: 44px; height: 44px; font-size: 23px; }
.auth-brand-logo { display: block; width: min(270px, 80%); height: auto; }
.brand-name { color: #fff; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.sidebar__nav { padding: 22px 14px; flex: 1; overflow-y: auto; }
.sidebar__label { margin: 0 10px 10px; color: #e5bfc0; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.nav-link { min-height: 44px; margin-bottom: 3px; padding: 0 12px; display: flex; align-items: center; gap: 12px; color: #f0d7d8; border-left: 3px solid transparent; text-decoration: none; transition: color .16s ease, background .16s ease, border-color .16s ease; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-link.is-active { color: #fff; border-left-color: #fff; background: rgba(255,255,255,.12); }
.sidebar__footer { min-height: 58px; padding: 0 24px; display: flex; align-items: center; gap: 9px; color: #e5bfc0; border-top: 1px solid rgba(255,255,255,.1); font-size: 12px; }
.status-dot { width: 8px; height: 8px; display: inline-block; flex: 0 0 auto; border-radius: 50%; background: #35ba84; box-shadow: 0 0 0 3px rgba(53,186,132,.13); }
.sidebar-backdrop { display: none; }
.workspace { min-height: 100vh; margin-left: var(--sidebar-width); display: flex; flex-direction: column; }
.topbar { height: var(--header-height); padding: 0 32px; display: flex; align-items: center; gap: 16px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.topbar__menu { display: none !important; }
.topbar__title { flex: 1; color: var(--navy); font-weight: 700; }
.topbar__user { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.topbar__user form { margin: 0 0 0 5px; }
.topbar__user-name { color: var(--text); font-size: 14px; font-weight: 600; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; color: var(--brand-dark); background: var(--brand-soft); border: 1px solid #f2c9da; font-size: 13px; font-weight: 800; }
.icon-button { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; color: var(--muted); background: transparent; border: 1px solid transparent; cursor: pointer; }
.icon-button:hover, .icon-button:focus-visible { color: var(--navy); background: #f3f6f8; border-color: var(--line); outline: none; }
.content { width: 100%; max-width: 1440px; margin: 0 auto; padding: 38px clamp(24px, 4vw, 58px) 56px; flex: 1; }
.footer { padding: 22px 32px; color: var(--muted); background: var(--surface); border-top: 1px solid var(--line); text-align: center; font-size: 12px; }
.page-heading { margin-bottom: 36px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.eyebrow { margin: 0 0 6px; color: var(--brand); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { margin: 0; color: var(--navy); font-size: clamp(30px, 4vw, 42px); line-height: 1.16; letter-spacing: -.035em; }
h2 { margin: 0; color: var(--navy); font-size: 21px; letter-spacing: -.015em; }
.page-heading__description, .section-heading p { margin: 8px 0 0; color: var(--muted); }
.connection-status { padding: 9px 12px; display: flex; align-items: center; gap: 9px; color: var(--success); background: #f0faf6; border: 1px solid #ccebdd; font-size: 12px; font-weight: 700; }
.section-heading { margin-bottom: 18px; display: flex; align-items: flex-end; justify-content: space-between; }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.service-card { min-height: 148px; padding: 20px; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .16s ease, transform .16s ease; }
.service-card:hover, .service-card:focus-visible { border-color: #c888a3; transform: translateY(-2px); outline: none; }
.service-card__icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); border: 1px solid #f4d4e1; }
.service-card__body { align-self: end; display: flex; flex-direction: column; gap: 3px; }
.service-card__body strong { color: var(--navy); font-size: 16px; }
.service-card__body small { color: var(--muted); line-height: 1.4; }
.service-card__arrow { align-self: center; color: #97a6b4; }
.support-banner { margin-top: 32px; padding: 28px 30px; display: flex; align-items: center; justify-content: space-between; gap: 28px; color: #f5e4e4; background: var(--navy-2); }
.support-banner h2 { color: #fff; }
.support-banner p:not(.eyebrow) { margin: 5px 0 0; color: #efd7d8; }
.support-banner p strong { color: #fff; }
.phone-link { width: 54px; height: 54px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: var(--brand); border: 1px solid var(--brand); text-decoration: none; transition: background .16s ease, transform .16s ease; }
.phone-link:hover, .phone-link:focus-visible { color: #fff; background: var(--brand-dark); transform: translateY(-2px); outline: 3px solid rgba(214,35,102,.22); }
.button { min-height: 42px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; text-decoration: none; font-weight: 700; cursor: pointer; transition: background .16s ease, border-color .16s ease; }
.button--primary { color: #fff; background: var(--brand); border-color: var(--brand); }
.button--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.button--secondary { color: var(--navy); background: #fff; border-color: #fff; }
.button--secondary:hover { background: #edf2f6; border-color: #edf2f6; }
.button--secondary-outline { color: var(--navy); background: #fff; border-color: #aebcc8; }
.button--secondary-outline:hover { color: var(--brand); border-color: var(--brand); }
.button--block { width: 100%; }
label { margin-bottom: 7px; display: block; color: var(--navy); font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 44px; padding: 9px 12px; color: var(--text); background: #fff; border: 1px solid #bfcbd5; border-radius: 0; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(138,0,5,.12); }
.alert { margin: 0 0 18px; padding: 12px 14px; border-left: 3px solid; font-size: 14px; }
.alert--danger { color: #7a271a; background: #fff4f2; border-color: var(--danger); }
.alert--success { color: #086645; background: #effaf5; border-color: var(--success); }
.auth-page { background: #fff; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 40%) 1fr; }
.auth-intro { padding: clamp(38px, 7vw, 90px); display: flex; flex-direction: column; justify-content: space-between; color: #f3dddd; background: var(--brand); }
.auth-intro h1 { margin: 12px 0 22px; color: #fff; font-size: clamp(44px, 6vw, 72px); line-height: 1.02; }
.auth-intro div > p:last-child { max-width: 480px; color: #f0dada; font-size: 17px; }
.auth-panel { padding: 32px; display: grid; place-items: center; }
.auth-card { width: min(100%, 420px); }
.auth-card h2 { font-size: 30px; }
.auth-steps { margin: 24px 0 20px; display: flex; align-items: center; }
.auth-step { width: 28px; height: 28px; display: grid; place-items: center; color: #8090a0; background: #fff; border: 1px solid var(--line); font-size: 12px; font-weight: 800; }
.auth-step.is-active { color: #fff; background: var(--brand); border-color: var(--brand); }
.auth-step-line { height: 1px; flex: 1; background: var(--line); }
.auth-step-line.is-active { background: var(--brand); }
.auth-card__lead { margin: 8px 0 28px; color: var(--muted); }
.auth-card form input { margin-bottom: 18px; }
.recaptcha { min-height: 78px; margin: 0 0 18px; overflow-x: auto; }
.masked-email { margin: 0 0 18px; padding: 11px 13px; color: var(--muted); background: #f4f7f9; border-left: 3px solid var(--brand); }
.masked-email strong { color: var(--navy); }
.secondary-action { margin-top: 12px; text-align: center; }
.secondary-action button { padding: 5px 8px; color: var(--brand); background: transparent; border: 0; font-size: 13px; font-weight: 700; cursor: pointer; }
.secondary-action button:disabled { color: var(--muted); cursor: not-allowed; }
.empty-state { min-height: 60vh; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-state__code { color: var(--brand); font-size: 13px; font-weight: 800; letter-spacing: .16em; }
.empty-state p { margin: 10px 0 22px; color: var(--muted); }
.module-panel { padding: clamp(24px, 4vw, 38px); background: #fff; border: 1px solid var(--line); }
.module-panel--center { min-height: 330px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.module-panel--center p { max-width: 620px; margin: 10px 0 24px; color: var(--muted); }
.module-icon { width: 58px; height: 58px; margin-bottom: 20px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); border: 1px solid #f4d4e1; }
.form-panel { max-width: 680px; }
.form-group { margin-bottom: 18px; }
.info-panel { margin-bottom: 18px; padding: 20px 24px; background: #eef4f8; border-left: 3px solid var(--navy-2); }
.info-panel h2 { font-size: 16px; }
.info-panel p { margin: 7px 0 0; color: var(--muted); }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.data-table th { padding: 12px 14px; color: var(--muted); background: #f5f7f9; border-bottom: 1px solid var(--line); text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.data-table td { padding: 15px 14px; border-bottom: 1px solid #e9eef2; vertical-align: middle; }
.data-table tbody tr:hover { background: #fbfcfd; }
.align-right { text-align: right !important; }
.tag { padding: 4px 7px; color: var(--navy); background: #edf2f6; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.button--small { min-height: 34px; padding: 0 12px; font-size: 12px; }
.button--danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.button--danger:hover { background: #8f1c13; border-color: #8f1c13; }
.empty-cell { padding: 34px !important; color: var(--muted); text-align: center; }
.table-actions { display: flex; justify-content: flex-end; gap: 7px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.detail-card { padding: 24px; background: #fff; border: 1px solid var(--line); }
.detail-card h2 { margin-bottom: 20px; font-size: 17px; }
.detail-card dl { margin: 0; }
.detail-card dt { margin-top: 14px; color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.detail-card dd { margin: 3px 0 0; color: var(--navy); font-weight: 650; }
.form-section { padding-bottom: 26px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.form-section h2 { margin-bottom: 18px; font-size: 17px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.form-actions { margin-top: 24px; display: flex; justify-content: flex-end; gap: 10px; }
.calls-result { margin-top: 18px; }
.calls-summary { margin-bottom: 24px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border: 1px solid var(--line); }
.calls-summary div { padding: 18px; display: flex; flex-direction: column; gap: 5px; border-right: 1px solid var(--line); }
.calls-summary div:last-child { border-right: 0; }
.calls-summary span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.calls-summary strong { color: var(--navy); font-size: 20px; }
.choice-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.choice, .hour-choice { position: relative; cursor: pointer; }
.choice input, .hour-choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span, .hour-choice span { min-height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: #fff; border: 1px solid var(--line); font-size: 13px; }
.choice input:checked + span, .hour-choice input:checked + span { color: #fff; background: var(--brand); border-color: var(--brand); }
.choice input:focus-visible + span, .hour-choice input:focus-visible + span { outline: 3px solid rgba(169,0,70,.15); }
.hour-grid { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 7px; }
.hour-choice span { width: 100%; padding: 0 6px; }
.hour-grid.is-disabled { opacity: .42; pointer-events: none; }
.hour-summary { display: flex; flex-wrap: wrap; gap: 4px; }
.hour-summary span { padding: 3px 6px; color: var(--navy); background: #edf2f6; font-size: 11px; }
.toggle-line { margin: 0; display: flex; align-items: center; gap: 8px; }
.toggle-line input { width: 17px; min-height: 17px; margin: 0; }
.service-settings { max-width: 760px; }
.setting-row { min-height: 78px; margin: 0; padding: 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); cursor: pointer; }
.setting-row > span:first-child { display: flex; flex-direction: column; gap: 3px; }
.setting-row small { color: var(--muted); font-weight: 400; }
.switch { position: relative; width: 42px; height: 24px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; }
.switch i { position: absolute; inset: 0; background: #b7c2cc; border-radius: 15px; transition: background .16s ease; }
.switch i::after { content:""; position:absolute; width:18px; height:18px; top:3px; left:3px; background:#fff; border-radius:50%; transition:transform .16s ease; }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 3px solid rgba(169,0,70,.15); }
@media (max-width: 1120px) { .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .app-shell.is-menu-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; z-index: 20; inset: 0; background: rgba(9,24,38,.52); }
  .app-shell.is-menu-open .sidebar-backdrop { display: block; }
  .workspace { margin-left: 0; }
  .topbar { padding: 0 18px; }
  .topbar__menu { display: inline-grid !important; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-intro { min-height: 310px; padding: 36px 28px; }
  .auth-intro h1 { font-size: 44px; }
  .auth-panel { min-height: 560px; padding: 42px 24px; }
  .detail-grid, .form-grid, .calls-summary { grid-template-columns: 1fr; }
  .calls-summary div { border-right: 0; border-bottom: 1px solid var(--line); }
  .calls-summary div:last-child { border-bottom: 0; }
  .hour-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
}
@media (max-width: 580px) {
  .auth-page { min-height: 100dvh; overflow: hidden; }
  .auth-shell { height: 100dvh; min-height: 0; grid-template-rows: 100px minmax(0, 1fr); overflow: hidden; }
  .auth-intro { height: 100px; min-height: 100px; padding: 0 18px; align-items: center; justify-content: center; }
  .auth-intro > div { display: none; }
  .auth-brand-logo { width: min(210px, 72%); }
  .auth-panel { min-height: 0; padding: 18px 20px; overflow: hidden; }
  .auth-card { transform: translateY(-16px); }
  .auth-card h2 { font-size: 27px; }
  .auth-steps { margin: 14px 0 12px; }
  .auth-card__lead { margin: 6px 0 16px; }
  .auth-card form input { margin-bottom: 12px; }
  .recaptcha { margin-bottom: 12px; }
  .content { padding: 28px 18px 44px; }
  .topbar__user-name { display: none; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 124px; }
  .support-banner { align-items: flex-start; flex-direction: column; }
  .support-banner .button { width: 100%; }
  .phone-link { width: 100%; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .hour-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
