:root {
  --bg: #f7f9f6;
  --surface: #ffffff;
  --surface-2: #f5f8f5;
  --ink: #24332c;
  --muted: #64736a;
  --line: #e1e9e2;
  --nav: #ffffff;
  --nav-ink: #33473a;
  --nav-muted: #617467;
  --nav-active: #eaf4e9;
  --nav-active-ink: #355a39;
  --nav-hover: #f1f7f0;
  --nav-label: #617467;
  --accent: #ee6b4d;
  --accent-dark: #d95538;
  --lime: #cadd62;
  --purple: #a78bcf;
  --mint: #85c9b6;
  --yellow: #e7c35b;
  --shadow: 0 8px 28px rgba(37, 69, 48, .045);
}

/* Prospective leads */
#page-leads { width: 100%; }
.leads-header, .leads-toolbar, .lead-column-head, .lead-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.leads-header { margin-bottom: 14px; }
.sidebar .main-nav .nav-item { min-height: 34px; }
.sidebar .nav-label { margin-top: 10px; margin-bottom: 4px; }
@media (max-height: 740px) { .sidebar .main-nav .nav-item { min-height: 32px; } }
@media (max-height: 680px) { .sidebar .main-nav .nav-item { min-height: 27px; } }
@media (max-height: 620px) { .sidebar .main-nav .nav-item { min-height: 25px; } }
.leads-header h1 { margin: 0; }
.leads-toolbar { flex-wrap: wrap; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.leads-toolbar input, .leads-toolbar select { min-height: 36px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); font-size: 12px; }
.leads-toolbar input { flex: 1 1 260px; }
.leads-toolbar select { flex: 0 1 180px; }
.leads-view-switch { display: flex; padding: 3px; border-radius: 11px; background: var(--surface-2); }
.leads-view-switch button { border: 0; border-radius: 8px; background: transparent; padding: 7px 12px; color: var(--muted); font-size: 12px; cursor: pointer; }
.leads-view-switch button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.leads-summary { margin: 12px 3px; color: var(--muted); font-size: 12px; }
.leads-board { display: grid; grid-template-columns: repeat(6, minmax(190px, 1fr)); gap: 10px; overflow-x: auto; align-items: start; padding-bottom: 12px; }
.lead-column { min-height: 310px; padding: 9px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.lead-column[data-stage="new"] { border-top: 3px solid #ef927f; }
.lead-column[data-stage="contact"] { border-top: 3px solid #81afd7; }
.lead-column[data-stage="proposal"] { border-top: 3px solid #b49bd4; }
.lead-column[data-stage="qualified"] { border-top: 3px solid #d9bb62; }
.lead-column[data-stage="converted"] { border-top: 3px solid #78b996; }
.lead-column[data-stage="lost"] { border-top: 3px solid #a6aca9; }
.lead-column-head { padding: 5px 4px 11px; font-size: 12px; }
.lead-column-head span { min-width: 22px; padding: 3px 6px; text-align: center; border-radius: 7px; background: var(--surface); color: var(--muted); }
.lead-column-body { display: grid; align-content: start; gap: 8px; min-height: 240px; }
.lead-empty { margin: 12px 4px; color: var(--muted); font-size: 12px; }
.lead-card { padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.lead-card[draggable="true"] { cursor: grab; }
.lead-card-main { display: grid; gap: 5px; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.lead-card-main strong { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.lead-card-main span, .lead-card-meta { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.lead-card-meta { display: grid; gap: 3px; padding-top: 9px; }
.lead-card-actions { margin-top: 11px; }
.lead-card-actions button, .leads-list button { border: 0; padding: 0; background: transparent; color: var(--accent); font-size: 11px; cursor: pointer; text-align: left; }
.lead-card-actions small { color: var(--muted); white-space: nowrap; }
.leads-list { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.leads-list table { width: 100%; border-collapse: collapse; font-size: 12px; }
.leads-list th, .leads-list td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.leads-list th { background: var(--surface-2); color: var(--muted); font-weight: 600; }
.leads-list td:first-child button { color: var(--ink); font-weight: 600; }
.leads-list select { max-width: 150px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink); font-size: 11px; }
.modal.lead-modal { width: min(650px, calc(100vw - 28px)); max-height: calc(100vh - 28px); overflow-y: auto; }
.modal.lead-modal.chat-open { width: min(1050px, calc(100vw - 28px)); height: min(820px, calc(100vh - 28px)); display: flex; flex-direction: column; overflow: hidden; }
.lead-head-actions { display: flex; align-items: center; gap: 10px; }
.lead-chat-panel { padding: 12px 20px 20px; min-height: 0; flex: 1; display: flex; flex-direction: column; }
.lead-chat-panel.hidden { display: none; }
.lead-chat-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; font-size: 13px; }
.lead-chat-message { padding: 12px; color: var(--muted); font-size: 13px; }
.lead-chat-frame { width: 100%; min-height: 0; flex: 1; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.lead-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; padding: 18px 22px; }
.lead-form-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.lead-form-grid input, .lead-form-grid select, .lead-form-grid textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 400; }
.lead-form-wide { grid-column: 1 / -1; }
@media (max-width: 700px) { .lead-form-grid { grid-template-columns: 1fr; } .leads-board { grid-template-columns: repeat(6, 220px); } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-y: scroll; scrollbar-gutter: stable; }
body { margin: 0; font-family: Inter, "Segoe UI", Arial, sans-serif; color: var(--ink); background: var(--bg); min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px 1fr; }
.sidebar { background: var(--nav); color: var(--nav-ink); border-right: 1px solid var(--line); padding: 16px 15px; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 232px; z-index: 20; overflow: hidden; }
.sidebar::-webkit-scrollbar { display: none; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 16px; }
.brand-home { display: flex; align-items: center; gap: 11px; width: 100%; padding: 0; border: 0; border-radius: 12px; background: transparent; color: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.brand-home:hover strong { color: #537d45; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand strong { display: block; color: var(--ink); font-size: 16px; line-height: 1.1; }
.brand span { font-size: 13px; color: var(--nav-muted); letter-spacing: .04em; }
.brand-info { display: grid; justify-items: start; gap: 6px; min-width: 0; }
.app-version { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 8px; border: 1px solid #dbe8d9; border-radius: 999px; color: #527047 !important; background: #f0f7ec; font-size: 11px !important; font-weight: 700; letter-spacing: 0 !important; white-space: nowrap; }
.brand .app-version { min-height: 18px; padding: 2px 6px; font-size: 9px !important; }
.auth-brand .app-version { color: #777c65 !important; background: #f5f6ee; border-color: var(--line); }
.main-nav { display: grid; gap: 2px; }
.nav-item { border: 0; background: transparent; color: var(--nav-muted); min-height: 37px; border-radius: 10px; display: flex; gap: 12px; align-items: center; padding: 0 12px; text-align: left; cursor: pointer; transition: .18s ease; }
.nav-item:hover { background: var(--nav-hover); color: var(--nav-ink); }
.nav-item.active { background: var(--nav-active); color: var(--nav-active-ink); box-shadow: inset 3px 0 #79a267; }
.nav-icon { width: 18px; text-align: center; font-size: 17px; }
.nav-item > span:nth-child(2) { flex: 1; font-size: 13px; font-weight: 600; }
.nav-item b, .nav-item i { font-style: normal; font-size: 13px; border-radius: 10px; padding: 2px 7px; background: #edf1eb; color: #566b58; }
.nav-item i { background: #edf4d6; color: #596d20; }
.nav-item i.pink { background: #fcebe8; color: #b55348; }
.nav-label { color: var(--nav-label); font-size: 12px; font-weight: 700; letter-spacing: .12em; margin: 16px 13px 7px; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 5px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 13px; font-style: normal; font-weight: 800; color: #39382f; border: 2px solid var(--surface); }
.a1 { background: #e8bd8e; } .a2 { background: #9bcacb; } .a3 { background: #c5a9da; } .a4 { background: #e39182; }
.profile-mini { border-top: 1px solid var(--line); padding: 9px 4px 0; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; }
.profile-mini strong { display: block; color: var(--nav-ink); font-size: 13px; }
.profile-mini span { display: block; color: var(--nav-muted); font-size: 13px; margin-top: 2px; }
.profile-mini button { color: #888; background: none; border: 0; cursor: pointer; }
.auth-profile-link { color: inherit; text-decoration: none; }
.auth-profile-link:hover strong { color: #537d45; }
.role-preview { display: grid; gap: 5px; padding: 0 4px; }
.role-preview label { color: var(--nav-muted); font-size: 12px; font-weight: 700; }
.role-preview select { width: 100%; min-height: 34px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--nav-ink); padding: 0 10px; cursor: pointer; }
.role-preview select:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.sidebar-theme-toggle { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--nav-muted); font-size: 12px; font-weight: 700; text-align: left; cursor: pointer; }
.sidebar-theme-toggle:hover { background: var(--nav-hover); color: var(--nav-ink); }
.sidebar-theme-toggle:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.theme-toggle-icon { width: 22px; height: 22px; display: inline-grid; place-items: center; flex: 0 0 22px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--nav-ink); font-size: 16px; line-height: 1; }

.main-content { grid-column: 2; min-width: 0; }
.topbar { height: 69px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 15; display: flex; align-items: center; padding: 0 32px; justify-content: space-between; gap: 22px; }
.search-box { height: 38px; width: min(385px, 38vw); border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; display: flex; align-items: center; padding: 0 11px; gap: 8px; }
.search-box input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; font-size: 13px; color: var(--ink); }
.search-box kbd { border: 1px solid #dfdfd6; background: white; color: #999; border-radius: 5px; font-size: 13px; padding: 3px 5px; }
.top-actions { display: flex; align-items: center; gap: 8px; position: relative; }
.exchange-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 17px; min-height: 42px; padding: 8px 32px; background: var(--surface); border-bottom: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 700; }
.exchange-rates-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; width: fit-content; max-width: 100%; padding: 5px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.exchange-rates-group > * { white-space: nowrap; }
.exchange-title { color: #687333; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }
.exchange-strip small { color: var(--muted); font-size: 13px; font-weight: 600; }
.exchange-strip a { color: var(--accent); font-size: 13px; text-decoration: none; }
.exchange-strip a:hover { text-decoration: underline; }
.view-mode-badge { color: #65712f; background: #eef3d9; border-radius: 20px; padding: 8px 11px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.preview-exit { color: var(--accent); font-size: 13px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.preview-exit:hover { text-decoration: underline; }
.auth-loading [data-new-request], .view-mode [data-new-request],
.auth-loading #editRequestBtn, .view-mode #editRequestBtn,
.auth-loading #newClientBtn, .view-mode #newClientBtn,
.auth-loading #newPaymentBtn, .view-mode #newPaymentBtn,
.auth-loading #editPaymentBtn, .view-mode #editPaymentBtn,
.auth-loading #newCatalogHotelBtn, .view-mode #newCatalogHotelBtn,
.view-mode .tourists-panel .mini-action, .view-mode .services-panel .mini-action { display: none; }
.season-chip { display: flex; align-items: center; gap: 7px; padding: 7px 10px; font-size: 13px; font-weight: 700; color: #66712f; background: #f0f4d9; border-radius: 20px; white-space: nowrap; }
.season-chip span { width: 7px; height: 7px; background: #95a43c; border-radius: 50%; box-shadow: 0 0 0 4px #dde7ac; }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; cursor: pointer; position: relative; }
.notification i { position: absolute; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; top: 6px; right: 7px; border: 1px solid white; }
.notification-panel { position: absolute; z-index: 35; right: 0; top: 43px; width: min(300px, calc(100vw - 24px)); padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 14px 30px rgba(20,23,18,.16); }
.notification-panel h3 { margin: 0 0 9px; color: var(--ink); font-size: 14px; }
.notification-panel button { display: block; width: 100%; border: 0; border-radius: 8px; padding: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.notification-panel button:hover { background: var(--surface-2); }
.notification-panel p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.primary-button, .secondary-button { border: 0; min-height: 38px; border-radius: 9px; padding: 0 16px; font-weight: 700; font-size: 13px; cursor: pointer; transition: .18s; }
.primary-button { background: var(--accent); color: white; box-shadow: 0 5px 14px rgba(238,107,77,.18); }
.primary-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.primary-button span { font-size: 16px; margin-right: 4px; }
.secondary-button { background: #efefe9; color: #57574f; }
.mobile-menu { display: none; background: transparent; border: 0; font-size: 20px; }
.content-wrap { padding: 30px 32px 48px; max-width: 1500px; margin: 0 auto; }
.page { display: none; }
.page.active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } }
.welcome-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 23px; }
.eyebrow { color: #66776b !important; font-weight: 800; font-size: 13px !important; letter-spacing: .15em; margin: 0 0 7px !important; }
h1 { font-size: clamp(25px, 2.5vw, 34px); letter-spacing: -.035em; line-height: 1; margin: 0 0 9px; }
.welcome-row h1 .welcome-spark { color: var(--accent); font-size: .72em; }
.welcome-row p, .section-title-row p { color: var(--muted); font-size: 13px; margin: 0; }
.weather { display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 8px 13px; border-radius: 12px; }
.weather-icon { font-size: 24px; color: var(--yellow); }
.weather strong { display: block; font-size: 15px; }
.weather small { display: block; color: var(--muted); font-size: 13px; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 14px; }
.metric-card { position: relative; min-height: 147px; padding: 17px 18px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(60,100,70,.08); }
.metric-card.coral { background: #fff3ee; } .metric-card.purple { background: #f5f0fb; } .metric-card.mint { background: #ecf8f2; } .metric-card.yellow { background: #fff9e7; }
.metric-head { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 2; }
.metric-icon { width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.7); display: grid; place-items: center; font-weight: 800; }
.trend { font-size: 13px; font-style: normal; font-weight: 800; border-radius: 12px; padding: 4px 7px; background: rgba(255,255,255,.7); }
.trend.up { color: #478b66; } .trend.neutral { color: #9a7829; }
.metric-card p { font-size: 13px; color: #5f7064; margin: 13px 0 3px; position: relative; z-index: 2; }
.metric-value { font-weight: 800; font-size: 23px; letter-spacing: -.03em; position: relative; z-index: 2; }
.metric-card small { color: #657568; font-size: 13px; position: relative; z-index: 2; }
.spark { position: absolute; right: 13px; bottom: 13px; width: 86px; height: 45px; display: flex; align-items: flex-end; gap: 5px; opacity: .58; }
.spark i { width: 8px; background: var(--accent); border-radius: 3px 3px 1px 1px; }
.progress-ring { position: absolute; width: 60px; right: 10px; bottom: 6px; opacity: .65; }
.progress-ring circle { fill: none; stroke: #ded2ed; stroke-width: 4; }
.progress-ring .fill { stroke: #9477ba; stroke-dasharray: 38 100; stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; }
.meter { width: 76px; height: 6px; background: #cae5da; position: absolute; right: 15px; bottom: 23px; border-radius: 5px; }
.meter span { display: block; height: 100%; background: #4ca786; border-radius: 5px; }
.plane-path { position: absolute; right: 10px; bottom: 8px; width: 78px; height: 50px; border-bottom: 2px dashed #dfbc4d; border-radius: 50%; opacity: .7; }
.plane-path span { position: absolute; right: 3px; bottom: -7px; transform: rotate(-15deg); color: #aa8625; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(275px, .85fr); gap: 14px; margin-bottom: 14px; }
.dashboard-currency-summary { margin-bottom: 10px; padding: 10px 14px; }
.dashboard-currency-summary .panel-head { align-items: center; margin-bottom: 7px; }
.dashboard-currency-summary .panel-head h2 { font-size: 14px; }
.dashboard-currency-summary .panel-head p, .dashboard-currency-count { color: var(--muted); font-size: 11px; }
.dashboard-currency-summary .panel-head p { margin: 0; }
.dashboard-currency-count { white-space: nowrap; }
.dashboard-currency-scroll { overflow-x: auto; }
.dashboard-currency-table { min-width: 600px; font-size: 11px; font-variant-numeric: tabular-nums; }
.dashboard-currency-row { display: grid; grid-template-columns: minmax(135px, 1.15fr) repeat(4, minmax(0, 1fr)); align-items: center; gap: 10px; min-height: 25px; padding: 3px 8px; border-top: 1px solid var(--line); }
.dashboard-currency-row > span:not(:first-child) { text-align: right; white-space: nowrap; }
.dashboard-currency-row strong { font-weight: 650; }
.dashboard-currency-head { min-height: 21px; padding-block: 0 3px; border-top: 0; color: var(--muted); font-size: 10px; }
.dashboard-currency-converted { background: var(--surface-2); border-radius: 6px; }
.dashboard-currency-summary .dashboard-rate-warning { margin: 6px 8px 0; font-size: 11px; }
.dashboard-grid > .panel { min-height: 345px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 19px 20px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel h2 { margin: 0 0 4px; font-size: 15px; letter-spacing: -.02em; }
.panel-head p { margin: 0; color: var(--muted); font-size: 13px; }
.text-button { background: none; border: 0; color: var(--accent); font-size: 13px; font-weight: 800; cursor: pointer; }
.text-button span { margin-left: 5px; }
.funnel { display: grid; gap: 7px; }
.funnel-step { display: grid; grid-template-columns: 1fr 82px; align-items: center; gap: 10px; }
.funnel-bar { height: 28px; width: var(--w); min-width: 130px; border-radius: 6px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; transition: width .5s ease; }
.funnel-step.empty .funnel-bar { background: var(--surface-2); color: var(--muted); }
.dashboard-empty { margin: 10px 0; color: var(--muted); font-size: 12px; }
.funnel-bar strong { font-size: 13px; }
.funnel-step small { color: #99998f; font-size: 13px; }
.b1 { background: #fce4dc; color: #9a503b; } .b2 { background: #ece4f5; color: #715691; } .b3 { background: #e0f0e9; color: #397761; } .b4 { background: #f8edc7; color: #836918; } .b5 { background: #f6e9b2; color: #7e651e; } .b6 { background: #dae4a5; color: #57621e; }
.funnel-footer { border-top: 1px solid var(--line); margin-top: 13px; padding-top: 11px; display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.funnel-footer i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-right: 5px; }
.funnel-footer strong { color: var(--ink); }
.funnel-footer b { color: #5d6c25; font-size: 13px; }
.payment-breakdown { display: grid; gap: 9px; }
.payment-breakdown-row { display: grid; grid-template-columns: minmax(128px, 158px) minmax(64px, 1fr) minmax(165px, auto); align-items: center; gap: 12px; min-height: 29px; }
.payment-breakdown-label { display: flex; align-items: center; justify-content: space-between; gap: 7px; min-width: 0; font-size: 12px; color: var(--ink); }
.payment-breakdown-label strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.payment-breakdown-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.payment-breakdown-track i { display: block; height: 100%; border-radius: inherit; }
.payment-breakdown-row.unpaid .payment-breakdown-track i { background: #e9ad66; }
.payment-breakdown-row.partial .payment-breakdown-track i { background: #dfc46d; }
.payment-breakdown-row.paid .payment-breakdown-track i { background: #9fca76; }
.payment-breakdown-row.unpriced .payment-breakdown-track i { background: #aeb8ad; }
.payment-breakdown-row small { color: var(--muted); font-size: 11px; line-height: 1.3; text-align: right; font-variant-numeric: tabular-nums; }
.dashboard-rate-warning { margin: 8px 0 0; color: #a25e33; font-size: 11px; }
.dashboard-heading-count { display: inline-grid; place-items: center; min-width: 21px; min-height: 21px; margin-left: 3px; padding: 0 5px; border-radius: 7px; background: var(--surface-2); color: var(--muted); font-size: 11px; vertical-align: 1px; }
.travel-pulse { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 9px; }
.travel-pulse-item { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 2px 6px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.travel-pulse-item span { min-width: 0; color: var(--muted); font-size: 11px; line-height: 1.2; }
.travel-pulse-item strong { color: var(--ink); font-size: 16px; line-height: 1; font-variant-numeric: tabular-nums; }
.travel-pulse-item small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.dashboard-subhead { margin: 0 0 6px; color: var(--ink); font-size: 11px; font-weight: 700; }
.dashboard-finance-grid .metric-value.negative { color: #b44837; }
.count-badge { display: grid; place-items: center; width: 26px; height: 26px; background: #fee7df; color: #b34e36; border-radius: 8px; font-size: 13px; font-weight: 800; }
.attention-list { display: grid; }
.attention-item { border: 0; border-bottom: 1px solid var(--line); background: transparent; display: grid; grid-template-columns: 10px 1fr auto; gap: 9px; align-items: center; padding: 10px 0; text-align: left; cursor: pointer; }
.attention-item:hover strong { color: var(--accent); }
.attention-item strong { display: block; font-size: 13px; margin-bottom: 3px; }
.attention-item small { color: var(--muted); font-size: 13px; }
.attention-item time { color: #a5a59b; font-size: 13px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; } .red { background: #e86854; } .orange { background: #e9a655; } .blue { background: #6ba4be; } .purple-dot { background: #a688c7; }
.full-link { border: 0; background: transparent; width: 100%; padding: 12px 0 0; text-align: left; color: #686861; font-size: 13px; cursor: pointer; }
.full-link span { float: right; color: var(--accent); }
.date-chip { border: 1px solid var(--line); background: var(--surface-2); border-radius: 7px; padding: 6px 9px; color: #777; font-size: 13px; }
.departure-table { display: grid; }
.departure-row { display: grid; grid-template-columns: 1.25fr 1fr 1fr .55fr; align-items: center; border-top: 1px solid var(--line); padding: 10px 0; font-size: 13px; gap: 10px; }
.departure-row.header { border: 0; padding: 0 0 7px; color: #aaa; font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.departure-row b { display: block; }
.departure-row small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; font-weight: 400; }
.client-cell { display: flex; align-items: center; gap: 8px; }
.status-tag { font-style: normal; border-radius: 12px; padding: 5px 7px; font-size: 13px; white-space: nowrap; }
.status-tag.ready { color: #477d66; background: #e1f1ea; } .status-tag.docs { color: #9a6533; background: #fff0d8; }
.destination-list { display: grid; gap: 14px; }
.destination-list > div { display: grid; grid-template-columns: 28px minmax(105px, 1fr) 75px 20px; gap: 8px; align-items: center; }
.country-flag { display: inline-block; width: 22px; height: 15px; border: 1px solid rgba(0,0,0,.1); border-radius: 2px; background-position: center; background-size: contain; background-repeat: no-repeat; vertical-align: -2px; box-shadow: 0 1px 2px rgba(0,0,0,.13); flex: 0 0 auto; }
.destination-list .country-flag { width: 23px; height: 16px; }
.destination-list b { font-size: 13px; }
.destination-list b small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; font-weight: 400; }
.destination-list > div > strong { font-size: 13px; }
.dest-bar { height: 5px; background: #efefe9; border-radius: 4px; overflow: hidden; }
.dest-bar i { height: 100%; display: block; background: var(--lime); border-radius: 4px; }

.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 26px; }
.calendar-title { align-items: center; margin-bottom: 16px; gap: 16px; }
.directory-title-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.directory-title-actions button { min-height: 36px; white-space: nowrap; }
.calendar-title h1 { margin: 0; }
.calendar-controls, .calendar-agenda-tools { display: flex; align-items: center; gap: 7px; }
.calendar-controls .secondary-button { min-height: 36px; padding: 7px 11px; }
.calendar-controls #calendarPrevMonth, .calendar-controls #calendarNextMonth { min-width: 36px; padding: 5px; font-size: 23px; line-height: 1; }
.calendar-controls input, .calendar-agenda-tools input { min-height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); padding: 0 10px; font-size: 12px; }
.calendar-agenda-tools input { width: min(310px, 38vw); }
.calendar-overview { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 0 0 12px; }
.calendar-overview h2 { margin: 0; font-size: 18px; font-weight: 750; }
.calendar-overview-counts { display: flex; gap: 14px; color: var(--muted); font-size: 12px; }
.calendar-overview-counts b { color: var(--ink); }
.calendar-event-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px 16px; margin-bottom: 12px; }
.calendar-event-filters, .calendar-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.calendar-event-filters button { min-height: 30px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 11px; cursor: pointer; }
.calendar-event-filters button.active { border-color: #9cbba2; background: var(--nav-active); color: var(--nav-active-ink); font-weight: 700; }
.calendar-legend { gap: 7px 14px; color: var(--muted); font-size: 11px; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.calendar-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; }
.calendar-legend .departure { background: #3270b9; }
.calendar-legend .stay { background: #3b9875; }
.calendar-legend .return { background: #d8775f; }
.calendar-board { padding: 0; overflow-x: auto; }
.calendar-board-inner { min-width: 686px; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { border-bottom: 1px solid var(--line); background: var(--surface-2); }
.calendar-weekdays span { padding: 9px 10px; color: var(--muted); font-size: 11px; font-weight: 750; text-align: right; }
.calendar-day { min-width: 0; min-height: 108px; padding: 7px 6px 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day:nth-last-child(-n + 7) { border-bottom: 0; }
.calendar-day.calendar-outside { background: var(--surface-2); }
.calendar-day.calendar-selected { box-shadow: inset 0 0 0 2px #80ae82; }
.calendar-day-number { display: grid; place-items: center; width: 25px; height: 25px; margin-left: auto; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.calendar-day-number:hover, .calendar-selected .calendar-day-number { background: var(--nav-active); }
.calendar-today .calendar-day-number { background: var(--accent); color: #fff; }
.calendar-outside .calendar-day-number { color: var(--muted); }
.calendar-day-events { display: grid; gap: 3px; margin-top: 4px; }
.calendar-event { display: flex; align-items: center; gap: 4px; width: 100%; min-width: 0; padding: 4px 5px; border: 0; border-radius: 5px; background: #e9f2eb; color: #315b43; font-size: 10px; text-align: left; cursor: pointer; }
.calendar-event:hover { filter: brightness(.95); }
.calendar-event b { flex: none; }
.calendar-event span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event-departure { background: #e7f0fc; color: #295f9e; }
.calendar-event-stay { background: #e3f3e9; color: #28684c; }
.calendar-event-return { background: #fcece7; color: #a14d3d; }
.calendar-more { width: 100%; border: 0; background: transparent; color: var(--muted); font-size: 10px; text-align: left; cursor: pointer; }
.calendar-agenda { margin-top: 13px; padding: 15px; }
.calendar-agenda-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.calendar-agenda-heading h2 { margin: 0; font-size: 16px; }
.calendar-agenda-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.calendar-agenda-tools .secondary-button { min-height: 36px; font-size: 11px; }
.calendar-filter-tabs { display: flex; flex-wrap: wrap; gap: 5px; padding: 12px 0 10px; border-bottom: 1px solid var(--line); }
.calendar-filter-tabs button { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 11px; cursor: pointer; }
.calendar-filter-tabs button.active { border-color: #a8c9a7; background: var(--nav-active); color: var(--nav-active-ink); font-weight: 700; }
.calendar-filter-tabs b { margin-left: 3px; }
.calendar-agenda-list { max-height: 340px; overflow-y: auto; }
.calendar-agenda-item { display: grid; grid-template-columns: minmax(145px, 205px) minmax(0, 1fr) auto 14px; align-items: center; gap: 8px; width: 100%; padding: 3px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; line-height: 1.2; }
.calendar-agenda-item:hover { background: var(--surface-2); }
.calendar-agenda-date { color: var(--muted); font-size: 11px; }
.calendar-agenda-main { min-width: 0; }
.calendar-agenda-main strong, .calendar-agenda-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-agenda-main strong { font-size: 11px; }
.calendar-agenda-main small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.calendar-agenda-main .calendar-agenda-detail { margin-top: 2px; }
.calendar-agenda-meta { display: flex; align-items: center; gap: 12px; min-width: 0; }
.calendar-agenda-main .calendar-agenda-meta small { flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-agenda-main .calendar-agenda-meta .calendar-agenda-weather { flex: 1; min-width: 0; }
.calendar-agenda-main .calendar-agenda-weather { color: #37765a; }
.calendar-period { padding: 5px 8px; border-radius: 7px; background: var(--surface-2); color: var(--muted); font-size: 10px; white-space: nowrap; }
.calendar-period-current { background: #fff0e6; color: #a54d35; }
.calendar-period-future { background: #eaf1fb; color: #386688; }
.calendar-period-departure { background: #e7f0fc; color: #295f9e; }
.calendar-period-stay { background: #e3f3e9; color: #28684c; }
.calendar-period-return { background: #fcece7; color: #a14d3d; }
.calendar-agenda-arrow { color: var(--muted); font-size: 18px; }
.calendar-empty { padding: 22px 3px; color: var(--muted); font-size: 12px; }
body.dark .calendar-event-departure { background: #304a65; color: #d2e7ff; }
body.dark .calendar-event-stay { background: #315344; color: #d1f0df; }
body.dark .calendar-event-return { background: #604138; color: #ffd5ca; }
body.dark .calendar-period-current { background: #634238; color: #ffcfba; }
body.dark .calendar-period-future { background: #30475b; color: #c7ddf4; }
body.dark .calendar-period-departure { background: #304a65; color: #d2e7ff; }
body.dark .calendar-period-stay { background: #315344; color: #d1f0df; }
body.dark .calendar-period-return { background: #604138; color: #ffd5ca; }
body.dark .calendar-agenda-main .calendar-agenda-weather { color: #a8d8ba; }
@media (max-width: 820px) { .calendar-title, .calendar-agenda-heading { align-items: flex-start; flex-direction: column; } .calendar-agenda-tools, .calendar-agenda-tools input { width: 100%; } .calendar-overview { align-items: flex-start; flex-direction: column; } .calendar-agenda-item { grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; } .calendar-agenda-date { grid-column: 1 / -1; } .calendar-agenda-meta { flex-wrap: wrap; gap: 0 8px; } .calendar-agenda-arrow { display: none; } }
.section-title-row h1 { margin-bottom: 9px; }
.section-heading { display: flex; align-items: center; gap: 9px; min-width: 0; }
.section-heading h1 { margin: 0; }
.section-help { position: relative; flex: none; }
.section-help summary { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #d5e3d8; border-radius: 50%; background: #f1f7f1; color: #5e7866; font-size: 13px; font-weight: 800; font-style: normal; line-height: 1; cursor: pointer; list-style: none; user-select: none; }
.section-help summary::-webkit-details-marker { display: none; }
.section-help summary:hover, .section-help[open] summary { border-color: #97bb9d; background: #e4f1e5; color: #355c3e; }
.section-help-content { position: absolute; z-index: 25; top: calc(100% + 10px); left: -12px; width: min(300px, calc(100vw - 48px)); padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 12px 32px rgba(31, 58, 39, .14); font-size: 12px; line-height: 1.45; }
.section-help-content strong { display: block; margin-bottom: 5px; font-size: 12px; }
.section-help-content p { margin: 0; color: var(--muted); font-size: 12px; }
.finance-title h1 { margin-bottom: 0; }
.request-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.tab-pills, .view-controls { display: flex; background: #ecf2ec; border-radius: 10px; padding: 3px; gap: 2px; }
.tab-pills button, .view-controls button { border: 0; background: transparent; border-radius: 8px; padding: 7px 11px; font-size: 13px; cursor: pointer; color: #78786f; }
.tab-pills button.active, .view-controls button.active { background: white; color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.tab-pills b { font-size: 13px; margin-left: 5px; color: #999; }
.view-controls { background: transparent; }
.view-controls button { border: 1px solid var(--line); background: var(--surface); }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(225px, 1fr)); gap: 13px; align-items: start; overflow-x: auto; padding-bottom: 12px; }
.kanban-column { min-width: 225px; background: #edf3ed; border-radius: 13px; padding: 11px; min-height: 480px; }
.kanban-title { display: flex; align-items: center; justify-content: space-between; padding: 3px 3px 11px; }
.kanban-title span { font-size: 13px; font-weight: 800; }
.kanban-title i { font-style: normal; color: #888; background: #dcded5; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; font-size: 13px; }
.kanban-cards { display: grid; gap: 9px; min-height: 400px; }
.lead-card { background: var(--surface); border: 1px solid rgba(0,0,0,.035); box-shadow: 0 5px 13px rgba(34,34,29,.045); border-radius: 11px; padding: 12px; cursor: grab; transition: .18s; }
.lead-card:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(34,34,29,.08); }
.lead-card.dragging { opacity: .5; transform: rotate(2deg); }
.lead-top { display: flex; justify-content: space-between; margin-bottom: 10px; }
.source-tag { font-size: 13px; font-weight: 800; color: #777; background: #f0f0eb; padding: 4px 6px; border-radius: 5px; }
.lead-top time { color: #a0a096; font-size: 13px; }
.lead-card h3 { margin: 0 0 5px; font-size: 13px; }
.lead-card p { color: #85857b; font-size: 13px; margin: 0 0 11px; }
.lead-info { display: flex; justify-content: space-between; align-items: end; border-top: 1px solid var(--line); padding-top: 9px; }
.lead-info strong { font-size: 13px; display: block; }
.lead-info small { color: #999; font-size: 13px; }
.lead-manager { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; background: #e8bd8e; font-size: 13px; font-weight: 800; }
.drop-highlight { outline: 2px dashed var(--accent); outline-offset: -5px; }
.requests-table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
.requests-table-wrap table { width: 100%; border-collapse: collapse; min-width: 720px; }
.requests-table-wrap th, .requests-table-wrap td { text-align: left; border-bottom: 1px solid var(--line); padding: 14px; font-size: 13px; }
.requests-table-wrap th { color: #999; font-size: 13px; letter-spacing: .08em; background: var(--surface-2); }
.requests-title { margin-bottom: 18px; }
.requests-title h1 { margin-bottom: 0; }
.request-title-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.finance-title-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.requests-header { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 10px; padding: 16px 18px 13px; border: 1px solid var(--line); border-radius: var(--card-radius, 16px); background: var(--surface); box-shadow: var(--shadow); }
.requests-header > * { min-width: 0; }
.requests-header .requests-title, .requests-header .registry-commandbar { margin-bottom: 0; }
.requests-header .requests-title h1 { font-size: 29px; }
.requests-header .request-title-actions { gap: 6px; }
.requests-header .request-title-actions button { min-height: 34px; padding-inline: 11px; font-size: 12px; }
.requests-header .request-title-actions .primary-button span { font-size: 14px; }
.requests-header .tab-pills button, .requests-header .view-controls button { min-height: 31px; padding: 5px 9px; font-size: 11px; }
.requests-header .tab-pills b { font-size: 11px; }
.requests-header .tab-pills { min-width: 0; flex: 1 1 auto; }
.requests-header .view-controls { flex: 0 0 auto; }
.registry-commandbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.registry-commandbar .tab-pills { max-width: 70%; overflow-x: auto; }
.requests-header .registry-commandbar .tab-pills { max-width: none; }
.registry-commandbar .tab-pills button { white-space: nowrap; }
.requests-header { position: relative; z-index: 10; }
.registry-commandbar { position: relative; }
.view-controls button.has-selection { border-color: #80a078; color: #416b43; background: #e9f4e5; }
.request-settings-popover { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: min(320px, calc(100vw - 40px)); padding: 14px; display: grid; gap: 11px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 34px rgba(28, 45, 31, .18); }
.request-settings-title { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.request-settings-close { border: 0; background: transparent; color: var(--muted); font-size: 21px; line-height: 1; cursor: pointer; }
.request-settings-popover > label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.request-settings-popover select { width: 100%; min-height: 36px; padding: 6px 9px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 13px; }
.request-settings-actions { display: flex; justify-content: flex-end; gap: 7px; padding-top: 3px; }
.request-settings-actions button { min-height: 34px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--ink); cursor: pointer; font-size: 12px; }
.request-settings-actions .primary-button { border-color: transparent; background: var(--accent); color: white; }
.request-column-options { display: grid; max-height: min(320px, 50vh); overflow-y: auto; }
.request-column-options label { display: flex; align-items: center; gap: 9px; min-height: 31px; padding: 4px 2px; color: var(--ink); font-size: 12px; cursor: pointer; }
.request-column-options input { accent-color: #66945c; }
.request-column-options input:disabled + span { opacity: .7; }
body.dark .view-controls button.has-selection { border-color: #70936d; color: #cce9c5; background: #354838; }
.registry-hint { background: #fff9db; border: 1px solid #f1e7af; color: #786d32; border-radius: 8px 8px 0 0; padding: 7px 11px; font-size: 13px; }
.registry-hint span { margin-right: 5px; }
.registry-table { border-radius: 12px 12px 0 0; max-height: min(54vh, 480px); overflow-x: hidden; overflow-y: auto; box-shadow: var(--shadow); }
.registry-table table { width: 100%; min-width: 0; table-layout: fixed; font-variant-numeric: tabular-nums; }
.registry-table thead { position: sticky; top: 0; z-index: 5; }
.registry-table th { padding: 7px 6px; white-space: normal; overflow-wrap: anywhere; color: #5f7064; background: #f0f5f0; border-right: 1px solid var(--line); letter-spacing: .02em; font-size: 11px; line-height: 1.25; }
.registry-table td { padding: 6px; white-space: normal; overflow-wrap: anywhere; vertical-align: top; border-right: 1px solid #f0f0ea; font-size: 12px; line-height: 1.3; }
.registry-table th:nth-child(1) { width: 8%; }.registry-table th:nth-child(2) { width: 9%; }
.registry-table th:nth-child(3) { width: 23%; }.registry-table th:nth-child(4) { width: 17%; }
.registry-table th:nth-child(5) { width: 7%; }.registry-table th:nth-child(6) { width: 4%; }
.registry-table th:nth-child(7) { width: 12%; }.registry-table th:nth-child(8) { width: 10%; }
.registry-table th:nth-child(9) { width: 10%; }
.registry-subline { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 500; }
.request-person-name, .request-manager-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.registry-table .table-weather { white-space: normal; }
.registry-table .registry-subline.amount-profit { color: #428064; font-weight: 700; }
.registry-table tbody tr { cursor: pointer; transition: background .12s; }
.registry-table tbody tr:nth-child(even) { background: #fbfdfb; }
.registry-table tbody tr:hover { background: #f0f7ed; }
.registry-table tbody tr.selected { background: #e6f2dd; box-shadow: inset 3px 0 #79a267; }
.requests-table-totals { overflow: hidden; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; background: #eff5e8; box-shadow: var(--shadow); font-size: 12px; font-variant-numeric: tabular-nums; }
.request-total-row { display: grid; align-items: stretch; font-weight: 750; }
.request-total-row > * { min-width: 0; padding: 6px; border-top: 1px solid #dce8d8; border-right: 1px solid var(--line); overflow-wrap: anywhere; }
.request-total-caption { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.request-total-empty { padding: 8px 10px; color: var(--muted); }
.order-status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; }
.order-status i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.order-status.paid { color: #38775d; }.order-status.paid i { background: #4da57c; }
.order-status.partial { color: #9a6c24; }.order-status.partial i { background: #e3a84d; }
.order-status.overdue { color: #ac4737; }.order-status.overdue i { background: #e06451; }
.request-trip-completed { color: #627391; font-weight: 600; white-space: nowrap; }
.amount-debt { color: #bd4f3d; font-weight: 800; }.amount-profit { color: #428064; font-weight: 800; }
.registry-details { display: grid; grid-template-columns: .9fr 1.4fr; gap: 10px; margin-top: 10px; }
.registry-details .panel { padding: 13px; min-height: 180px; }
.registry-details .request-payments { grid-column: 1 / -1; min-height: 0; }
.request-payment-summary { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 12px 0 5px; color: var(--muted); font-size: 13px; }
.request-payment-summary b { color: var(--ink); }
.request-payment-summary .amount-debt { color: #bd4f3d; }
.request-payment-list { display: grid; gap: 6px; margin-top: 7px; }
.request-payment-item { width: 100%; display: grid; grid-template-columns: 110px 110px minmax(0, 1fr) 140px 90px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: var(--surface); color: var(--ink); text-align: left; font-size: 13px; cursor: pointer; }
.request-payment-item:hover { background: #f3f5e1; }
.request-payment-item .purpose { color: var(--muted); overflow-wrap: anywhere; }
.request-payment-status.posted { font-weight: 700; font-style: italic; }
.request-payment-empty { color: var(--muted); padding: 12px 0; font-size: 13px; }
.request-payment-warning { color: #ab593e; font-weight: 700; }
.detail-head { display: flex; justify-content: space-between; align-items: start; border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.detail-head h2 { margin: 0 0 3px; font-size: 13px; }.detail-head p { margin: 0; color: var(--muted); font-size: 13px; }
.mini-action { border: 1px solid var(--line); background: var(--surface-2); border-radius: 7px; padding: 5px 8px; font-size: 13px; cursor: pointer; }
.detail-table { margin-top: 6px; }
.detail-row { display: grid; grid-template-columns: 1.5fr .8fr .9fr .65fr; gap: 8px; align-items: center; min-height: 30px; border-bottom: 1px solid var(--line); font-size: 13px; }
.detail-row.service-row { grid-template-columns: 1.3fr 1fr .9fr .65fr; }
.detail-row.service-row > span { min-width: 0; overflow-wrap: anywhere; }
.service-order-details { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.25; }
.detail-row.tourist-missing, .detail-row.service-missing { display: block; padding: 9px 0; color: var(--muted); font-size: 11px; }
.detail-label { color: #999; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.registry-details .detail-label { min-height: 26px; color: #7f8c82; font-size: 11px; font-weight: 750; letter-spacing: .015em; line-height: 1.25; }
.tourist-name { display: flex; align-items: center; gap: 6px; font-weight: 700; }.tourist-name i { color: #4d9b70; font-style: normal; }
.confirm-chip { display: inline-block; border-radius: 10px; padding: 3px 6px; background: #e1f0e9; color: #3e775f; font-size: 13px; font-weight: 800; }
.confirm-chip.waiting { background: #fff0d4; color: #8f6925; }
.registry-statusbar { border: 1px solid var(--line); border-top: 0; background: #f5f9f4; border-radius: 0 0 9px 9px; padding: 8px 12px; color: var(--muted); font-size: 12px; }
.registry-currency-totals { display: grid; gap: 2px; margin-top: 4px; }
.registry-currency-row { display: grid; grid-template-columns: minmax(110px, 1fr) repeat(4, minmax(0, 1fr)); align-items: center; gap: 10px; padding: 4px 0; }
.registry-currency-row + .registry-currency-row { border-top: 1px solid var(--line); }
.registry-currency-row strong { color: var(--ink); }
.registry-converted-total { border-top: 1px solid var(--line); margin-top: 3px; padding-top: 7px; }
.registry-rate-warning { color: #ab593e; font-weight: 700; }
.registry-statusbar b { color: var(--ink); }
.hidden { display: none !important; }

.placeholder-page { min-height: 68vh; place-items: center; align-content: center; text-align: center; }
.placeholder-page.active { display: grid; }
.placeholder-icon { width: 60px; height: 60px; border-radius: 18px; background: #eef2d5; color: #687029; display: grid; place-items: center; font-size: 26px; margin-bottom: 16px; }
.placeholder-page p { max-width: 470px; color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0 0 18px; }
.mock-stats { display: flex; gap: 10px; }
.mock-stats span { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 20px; color: var(--muted); font-size: 13px; }
.mock-stats b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 3px; }
.client-layout { display: grid; grid-template-columns: 280px 1fr; gap: 14px; }
.city-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 14px; }
.city-filters button { min-height: 32px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12px; white-space: nowrap; cursor: pointer; }
.city-filters button:hover, .city-filters button:focus-visible { border-color: #9dbb95; color: var(--ink); }
.city-filters button[aria-pressed="true"] { background: var(--nav-active); color: var(--nav-active-ink); border-color: #a8c79f; font-weight: 700; }
.city-filters b { margin-left: 4px; font-size: 11px; font-variant-numeric: tabular-nums; }
.directory-count { margin: 0 0 7px; color: var(--muted); font-size: 11px; }
.directory-more { display: block; width: 100%; margin-top: 8px; font-size: 12px; }
.partner-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; color: var(--muted); font-size: 12px; }
.partner-toolbar input { width: min(360px, 100%); min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); outline: none; }
.partner-table-wrap { padding: 0; overflow-x: auto; max-width: 100%; }
.partner-table { width: 100%; min-width: 1050px; table-layout: fixed; border-collapse: collapse; }
.partner-table th, .partner-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 12px; vertical-align: middle; overflow-wrap: break-word; word-break: normal; }
.partner-table th { background: var(--surface-2); color: var(--muted); font-size: 11px; white-space: nowrap; }
.partner-table tbody tr:hover { background: var(--surface-2); }
.partner-table th:nth-child(1) { width: 15%; }
.partner-table th:nth-child(2) { width: 11%; }
.partner-table th:nth-child(3) { width: 14%; }
.partner-table th:nth-child(4) { width: 10%; }
.partner-table th:nth-child(5) { width: 7%; }
.partner-table th:nth-child(6) { width: 7%; }
.partner-table th:nth-child(7) { width: 9%; }
.partner-table th:nth-child(8) { width: 8%; }
.client-table th:nth-child(1) { width: 14%; }
.client-table th:nth-child(2) { width: 10%; }
.client-table th:nth-child(3) { width: 11%; }
.client-table th:nth-child(4) { width: 14%; }
.client-table th:nth-child(5), .client-table th:nth-child(6) { width: 7%; }
.partner-table th:last-child, .partner-table td:last-child { width: 104px; box-sizing: border-box; text-align: center; white-space: nowrap; overflow-wrap: normal; background: var(--surface); }
.partner-table th:last-child { background: var(--surface-2); }
.partner-actions { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; }
.partner-actions .mini-action { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 32px; box-sizing: border-box; padding: 0; border-radius: 9px; }
.partner-actions .mini-action svg { width: 16px; height: 16px; }
.partner-table tbody tr:hover td:last-child { background: var(--surface-2); }
.partner-table td:nth-child(7) { font-variant-numeric: tabular-nums; }
.client-table + .partner-empty { text-align: left; }
.client-table td:last-child { cursor: default; }
.partner-actions .partner-delete { color: #ba4c3b; }
.partner-empty { margin: 0; padding: 24px; color: var(--muted); font-size: 13px; }
.partner-more { display: block; margin: 14px auto; }
.partner-modal { width: min(680px, 100%); max-height: calc(100dvh - 32px); }
.partner-modal .modal-head .close-partner { width: 34px; height: 34px; border: 0; border-radius: 8px; background: var(--surface-2); font-size: 23px; cursor: pointer; }
.partner-modal .partner-form-grid { margin-top: 14px; }
.partner-modal .auth-error { min-height: 0; margin: 12px 0 0; }
.client-list-panel { padding: 12px; }
.client-list-panel #clientList { max-height: min(62vh, 560px); overflow-y: auto; scrollbar-gutter: stable; }
.client-list-item span:nth-child(2) { min-width: 0; }
.client-list-item b, .client-list-item small { overflow-wrap: break-word; word-break: normal; }
.client-search { border: 1px solid var(--line); background: var(--surface-2); border-radius: 9px; height: 38px; display: flex; align-items: center; padding: 0 10px; color: var(--muted); margin-bottom: 10px; }
.client-search input { border: 0; outline: 0; background: transparent; min-width: 0; flex: 1; padding-left: 7px; font-size: 13px; color: var(--ink); }
.client-list-item { border: 0; background: transparent; border-radius: 10px; width: 100%; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 10px 8px; text-align: left; cursor: pointer; }
.client-list-item.active, .client-list-item:hover { background: #f0f2e2; }
.client-list-item b { display: block; font-size: 13px; }
.client-list-item small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.client-list-item i { font-style: normal; color: #aaa; }
.client-list-empty { padding: 18px 10px; color: var(--muted); font-size: 13px; }
.client-profile { padding: 16px 18px; font-size: 12px; }
.profile-hero { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.profile-hero > .avatar { width: 46px; height: 46px; font-size: 12px; }
.profile-hero h2 { margin: 0 0 3px; font-size: 17px; }
.profile-hero p { margin: 0; color: var(--muted); font-size: 12px; }
.profile-hero-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.profile-hero-actions .secondary-button { white-space: nowrap; }
.profile-hero-actions .client-delete { color: #b8473a; }
.client-profile .secondary-button { min-height: 34px; padding: 0 11px; font-size: 12px; }
.loyalty-level { background: #fff1c9; color: #8a6814; border-radius: 20px; padding: 5px 9px; font-size: 12px; font-weight: 800; }
.profile-kpis { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); padding: 12px 0; }
.profile-kpis div { padding: 0 11px; border-right: 1px solid var(--line); }
.profile-kpis div:first-child { padding-left: 0; } .profile-kpis div:last-child { border: 0; }
.profile-kpis b { display: block; font-size: 13px; }
.profile-kpis span { color: var(--muted); font-size: 11px; }
.profile-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-top: 14px; }
.profile-columns h3 { font-size: 12px; margin: 0 0 8px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.tag-cloud span { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px 7px; font-size: 11px; }
.note-box { background: #fff6df; border-radius: 9px; padding: 8px; font-size: 11px; line-height: 1.4; color: #74643a; }
.timeline { border-left: 1px solid var(--line); margin-left: 3px; display: grid; gap: 10px; }
.timeline div { position: relative; padding-left: 14px; }
.timeline i { position: absolute; left: -4px; top: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.timeline b, .timeline small { display: block; font-size: 11px; }
.timeline small { color: var(--muted); margin-top: 2px; font-size: 11px; }
.module-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 14px; }
.module-cards article { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 17px; box-shadow: var(--shadow); }
.module-cards span, .module-cards small { display: block; color: var(--muted); font-size: 13px; }
.module-cards b { display: block; font-size: 21px; margin: 8px 0; }
.module-cards .positive { color: #4a8b6b; }
#page-finance .module-cards { gap: 10px; margin-bottom: 12px; }
#page-finance .module-cards article { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 10px; min-height: 68px; padding: 10px 14px; }
#page-finance .module-cards span { grid-column: 1; grid-row: 1; font-size: 11px; }
#page-finance .module-cards b { grid-column: 2; grid-row: 1 / span 2; margin: 0; font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
#page-finance .module-cards b span { display: block; color: var(--ink); font-size: inherit; }
#page-finance .module-cards b span + span { margin-top: 4px; }
#page-finance .module-cards small { grid-column: 1; grid-row: 2; font-size: 11px; }
@media (max-width: 1180px) and (min-width: 761px) {
  #page-finance .module-cards article { grid-template-columns: minmax(0, 1fr); }
  #page-finance .module-cards b { grid-column: 1; grid-row: 2; text-align: left; }
  #page-finance .module-cards small { grid-row: 3; }
}
.legend { display: flex; gap: 12px; font-size: 13px; color: var(--muted); }
.legend i { width: 7px; height: 7px; display: inline-block; border-radius: 2px; margin-right: 4px; }
.legend .sales { background: var(--accent); } .legend .profit { background: var(--lime); }
.big-chart { height: 245px; border-bottom: 1px solid var(--line); display: flex; align-items: end; justify-content: space-around; padding: 20px 8%; background: repeating-linear-gradient(to top, transparent 0, transparent 48px, var(--line) 49px); }
.big-chart > div { width: 15%; height: var(--h); position: relative; display: flex; align-items: end; gap: 5px; }
.big-chart i, .big-chart b { display: block; width: 55%; height: 100%; background: var(--accent); border-radius: 7px 7px 0 0; }
.big-chart b { height: var(--profit-h, 28%); background: var(--lime); }
.big-chart small { position: absolute; bottom: -37px; white-space: nowrap; font-size: 13px; color: var(--muted); }
.payment-row { display: grid; grid-template-columns: 10px 1fr 100px 80px; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 13px; }
.payment-row b small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; font-weight: 400; }
.payment-row time { color: var(--muted); font-size: 13px; }
.finance-tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.finance-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); padding: 9px 13px; white-space: nowrap; font-size: 13px; font-weight: 700; cursor: pointer; }
.finance-tabs button.active { color: var(--ink); border-color: var(--accent); }.finance-tabs b { margin-left: 5px; color: #aaa; font-size: 13px; }
.finance-workspace { display: grid; grid-template-columns: 210px 1fr; gap: 12px; }
.payment-filters { padding: 13px; align-self: start; }.payment-filters .detail-head { margin-bottom: 12px; }
.payment-filters label { display: grid; gap: 5px; margin-bottom: 10px; color: #777; font-size: 13px; font-weight: 700; }
.payment-filters input, .payment-filters select { width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 7px; padding: 8px; color: var(--ink); font-size: 13px; outline: 0; }
.payment-filters .primary-button { width: 100%; margin-top: 3px; }
.payment-register { min-width: 0; display: grid; gap: 10px; }
.payment-table { max-height: 285px; overflow: auto; border-radius: 11px; }.payment-table table { min-width: 1030px; font-variant-numeric: tabular-nums; }.payment-table thead { position: sticky; top: 0; z-index: 2; }.payment-table th { padding: 9px; white-space: nowrap; }.payment-table td { padding: 9px; white-space: nowrap; }.payment-table tbody tr { cursor: pointer; }.payment-table tbody tr:hover { background: #f3f5e1; }.payment-table tbody tr.selected { background: #e5efb9; }.payment-table tfoot { background: #f4f0d4; font-weight: 800; }
.payment-order-link { border: 0; background: none; padding: 0; color: #b24e37; font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.payment-direction { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 800; }.payment-direction i { width: 8px; height: 8px; border-radius: 50%; background: #55a77e; }.payment-direction.out i { background: #e3954c; }.payment-direction.refund i { background: #9a85c1; }
.payment-detail { padding: 14px; }.payment-detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }.payment-detail-grid div { background: var(--surface-2); border-radius: 8px; padding: 9px; }.payment-detail-grid small, .payment-detail-grid b { display: block; }.payment-detail-grid small { color: var(--muted); font-size: 13px; margin-bottom: 4px; }.payment-detail-grid b { font-size: 13px; }
.payment-allocation h3 { font-size: 13px; margin: 13px 0 6px; }.allocation-row { display: grid; grid-template-columns: .7fr 1fr 1fr 1fr 1fr; gap: 7px; padding: 7px; background: #efefe9; color: #888; font-size: 13px; font-weight: 800; }.allocation-row.values { background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 600; }
.payment-modal { width: min(850px, 100%); }.payment-form-body { background: var(--surface-2); border-block: 1px solid var(--line); padding: 20px 24px; max-height: 63vh; overflow-y: auto; }.payment-form-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 15px; }.payment-form-summary div { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }.payment-form-summary span, .payment-form-summary b { display: block; }.payment-form-summary span { color: var(--muted); font-size: 13px; }.payment-form-summary b { margin-top: 5px; font-size: 14px; }.payment-form-summary .positive { color: #3d8157; }
.document-grid, .integration-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.document-grid { grid-template-columns: minmax(0, 360px); }
#page-documents .section-title-row { flex-wrap: wrap; gap: 14px; }
.doc-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-align: left; cursor: pointer; box-shadow: var(--shadow); transition: .18s; }
.document-grid article.doc-card { cursor: default; }
.document-grid article.doc-card:hover { transform: none; border-color: var(--line); }
.doc-card:hover { transform: translateY(-2px); border-color: #d5d5ca; }
.doc-card > span { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #f1ebf8; color: #7d5fa3; font-size: 13px; font-weight: 900; }
.doc-card b, .doc-card small, .doc-card i { display: block; }
.doc-card b { font-size: 13px; margin: 16px 0 5px; }
.doc-card small { color: var(--muted); font-size: 13px; min-height: 28px; }
.doc-card i { color: var(--accent); font-size: 13px; font-style: normal; margin-top: 14px; }
.contract-template-download { display: inline-block; margin-top: 14px; color: var(--accent); font-size: 13px; font-weight: 700; text-decoration: none; }
.contract-template-download:hover { text-decoration: underline; }
.contract-template-message { min-height: 18px; margin: 13px 0 0; color: var(--muted); font-size: 13px; }
.campaign-banner { display: grid; grid-template-columns: 1fr 180px; align-items: center; background: #e8efbb; border-radius: 15px; padding: 24px 30px; margin-bottom: 14px; overflow: hidden; }
.campaign-banner h2 { margin: 0 0 7px; font-size: 20px; }.campaign-banner p { color: #626846; font-size: 13px; margin: 0 0 14px; }
.campaign-banner > span { justify-self: center; font-size: 72px; font-weight: 900; color: rgba(74,84,28,.22); }
.integration-grid { grid-template-columns: repeat(2, 1fr); }
.integration-grid article { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; }
.integration-grid article > span { width: 42px; height: 42px; border-radius: 11px; background: #eef2d7; color: #667026; display: grid; place-items: center; font-size: 13px; font-weight: 900; }
.integration-grid b, .integration-grid small { display: block; }.integration-grid b { font-size: 13px; }.integration-grid small { color: var(--muted); font-size: 13px; margin-top: 4px; }
.integration-grid button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 7px 9px; font-size: 13px; cursor: pointer; }.integration-grid button.connected { color: #4b8068; background: #e5f2eb; border-color: #cee4da; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(20,21,18,.62); backdrop-filter: blur(5px); display: grid; place-items: center; padding: 20px; }
.modal { width: min(590px, 100%); max-height: 90vh; overflow-y: auto; background: var(--surface); border-radius: 18px; padding: 24px; box-shadow: 0 24px 80px rgba(0,0,0,.25); animation: modalIn .24s ease; }
.modal.application-flow { width: min(980px, 100%); height: min(660px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.application-flow .modal-head { padding: 24px 28px 16px; margin: 0; align-items: center; }
.application-flow .modal-head h2 { font-size: 24px; }
.flow-caption { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.flow-steps { display: grid; grid-template-columns: repeat(6, 1fr); padding: 0 28px 18px; gap: 0; }
.flow-steps button { position: relative; border: 0; background: transparent; color: #a1a198; display: flex; align-items: center; gap: 8px; padding: 0; cursor: pointer; font-size: 13px; font-weight: 800; }
.flow-steps button::after { content: ''; height: 2px; background: var(--line); flex: 1; order: 2; }
.flow-steps button:last-child::after { display: none; }
.flow-steps i { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 50%; background: #ecece6; font-style: normal; }
.flow-steps button.active, .flow-steps button.done { color: var(--ink); }
.flow-steps button.active i { background: var(--accent); color: white; box-shadow: 0 0 0 4px #fde7e0; }
.flow-steps button.done i { background: var(--lime); color: #3d4519; }
.flow-steps button.done::after { background: var(--lime); }
.flow-body { background: var(--surface-2); border-block: 1px solid var(--line); flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 24px 28px; }
.flow-panel { display: none; animation: enter .22s ease; }.flow-panel.active { display: block; }
.flow-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.flow-heading > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #e8edc6; color: #626d28; font-size: 18px; }
.flow-heading h3 { margin: 0 0 4px; font-size: 17px; }.flow-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.checkbox-line { display: flex !important; grid-template-columns: none; flex-direction: row; align-items: center; background: var(--surface); border: 1px solid var(--line); padding: 10px; border-radius: 9px; }
.checkbox-line input { width: auto !important; }
.tourist-editor { display: grid; gap: 8px; margin-top: 18px; }
.tourist-editor .tourist-entry { display: grid; grid-template-columns: 30px minmax(140px, 1.5fr) 75px minmax(125px, 1fr) minmax(130px, 1fr) minmax(125px, 1fr) 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.tourist-editor input, .tourist-editor select { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 9px; font-size: 13px; color: var(--ink); }
.tourist-editor .tourist-remove { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); cursor: pointer; }
.tourist-editor .tourist-remove:hover:not(:disabled) { color: #c64c3b; border-color: #eac3bb; background: #fff4f1; }
.tourist-editor .tourist-remove:disabled { opacity: .4; cursor: not-allowed; }
.tourist-editor .tourist-remove svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tourist-editor > button { justify-self: start; margin-top: 5px; }
.service-editor { display: grid; gap: 9px; }
.service-order-list { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.service-order-item { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-bottom: 1px solid var(--line); }
.service-order-item:last-child { border-bottom: 0; }
.service-order-row { min-width: 0; width: 100%; display: grid; grid-template-columns: minmax(110px, .8fr) minmax(150px, 1.5fr) minmax(110px, 1fr) auto; gap: 12px; align-items: center; border: 0; padding: 12px 14px; background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.service-order-row:hover, .service-order-row:focus-visible { background: var(--surface-2); }
.service-order-remove { width: 30px; height: 30px; display: grid; place-items: center; margin-right: 10px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); cursor: pointer; }
.service-order-remove:hover, .service-order-remove:focus-visible { color: #c64c3b; border-color: #eac3bb; background: var(--surface-2); }
.service-order-remove svg { width: 16px; height: 16px; }
.service-order-row strong { font-size: 13px; }
.service-order-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.service-order-row .service-row-cost small { display: block; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 11px; font-weight: 400; }
.service-order-row em { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; }
.service-add-row { margin-top: 10px; }
.service-total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-top: 14px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); font-size: 13px; }
.service-total strong { font-size: 14px; }
.service-total > strong { flex: 0 0 auto; margin-left: auto; white-space: nowrap; font-size: 18px; font-variant-numeric: tabular-nums; }
.service-total small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.service-edit-backdrop { position: fixed; inset: 0; z-index: 140; background: rgba(20, 31, 26, .48); backdrop-filter: blur(4px); }
.service-editor#serviceEditor { display: none; position: fixed; z-index: 141; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(680px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 24px 80px rgba(0,0,0,.24); }
.service-editor#serviceEditor.editing { display: grid; grid-template-columns: minmax(0, 1fr); }
.service-editor#serviceEditor > * { min-width: 0; }
.service-editor-head, .service-editor-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.service-editor-head h3 { margin: 0; font-size: 18px; }
.service-editor#serviceEditor > .service-currency-field { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, 190px); align-items: center; gap: 10px; padding: 8px 11px; color: var(--ink); font-size: 13px; font-weight: 600; }
.service-editor#serviceEditor > .service-currency-field select { min-width: 0; width: 100%; }
.service-editor-actions { border-top: 1px solid var(--line); padding-top: 14px; justify-content: flex-end; }
#serviceEditor > .hotel-service-row, #serviceEditor > .flight-service, #serviceEditor > .request-service-extras, #serviceEditor > [data-service-kind] { display: none; }
#serviceEditor[data-active-service="hotel"] > .hotel-service-row { display: grid; }
#serviceEditor[data-active-service="flight"] > .flight-service { display: none; }
#serviceEditor[data-active-service="hotel"] > .request-service-extras, #serviceEditor[data-active-service="flight"] > .request-service-extras { display: grid; grid-template-columns: minmax(0, 1fr); }
#serviceEditor[data-active-service="hotel"] .flight-order-field, #serviceEditor[data-active-service="hotel"] .flight-price-fields, #serviceEditor[data-active-service="flight"] .hotel-order-field { display: none; }
#serviceEditor[data-active-service="transfer"] > [data-service-kind="transfer"], #serviceEditor[data-active-service="insurance"] > [data-service-kind="insurance"] { display: grid; }
#serviceEditor[data-active-service="extra"] > [data-service-kind="extra"] { display: block; }
.service-editor label { display: grid; grid-template-columns: 20px 1.1fr 1.3fr 90px; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px; }
.service-editor#serviceEditor { min-width: 0; }
#serviceEditor .request-service-extras label, #serviceEditor .service-detail-field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; width: 100%; color: var(--ink); font-size: 13px; font-weight: 600; }
#serviceEditor .request-service-extras textarea, #serviceEditor .service-detail-field textarea { display: block; grid-column: 1; min-width: 0; width: 100%; min-height: 150px; max-height: 40dvh; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 400; line-height: 1.45; resize: vertical; }
#serviceEditor .extra-service-fields .service-detail-field input { min-width: 0; width: 100%; min-height: 38px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 400; }
#serviceEditor > .service-detail-field[data-service-kind] { display: none; }
#serviceEditor[data-active-service="transfer"] > .service-detail-field[data-service-kind="transfer"], #serviceEditor[data-active-service="insurance"] > .service-detail-field[data-service-kind="insurance"] { display: grid; }
#serviceEditor .extra-service-fields > .service-detail-field { margin-top: 12px; }
#serviceEditor .service-price-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; margin-top: 10px; }
#serviceEditor > label[data-service-kind="transfer"]:not(.service-detail-field), #serviceEditor > label[data-service-kind="insurance"]:not(.service-detail-field) { grid-template-columns: 20px repeat(2, minmax(0, 1fr)); align-items: start; }
#serviceEditor > label[data-service-kind="transfer"]:not(.service-detail-field) > span, #serviceEditor > label[data-service-kind="insurance"]:not(.service-detail-field) > span { grid-column: 2 / -1; }
#serviceEditor > label[data-service-kind="transfer"]:not(.service-detail-field) > select, #serviceEditor > label[data-service-kind="insurance"]:not(.service-detail-field) > select { display: none; }
#serviceEditor > label[data-service-kind="transfer"]:not(.service-detail-field) > i, #serviceEditor > label[data-service-kind="insurance"]:not(.service-detail-field) > i { grid-row: 2; min-width: 0; width: 100%; }
#serviceEditor > label[data-service-kind="transfer"]:not(.service-detail-field) > i:first-of-type, #serviceEditor > label[data-service-kind="insurance"]:not(.service-detail-field) > i:first-of-type { grid-column: 2; }
#serviceEditor > label[data-service-kind="transfer"]:not(.service-detail-field) > i:last-of-type, #serviceEditor > label[data-service-kind="insurance"]:not(.service-detail-field) > i:last-of-type { grid-column: 3; }
#serviceEditor > label[data-service-kind="transfer"]:not(.service-detail-field) small { display: none; }
.service-editor b, .service-editor small { display: block; }.service-editor b { font-size: 13px; }.service-editor small { color: var(--muted); font-size: 13px; margin-top: 3px; }
.service-editor select { border: 1px solid var(--line); background: var(--surface-2); border-radius: 7px; padding: 8px; font-size: 13px; color: var(--ink); }.service-editor i { font-style: normal; text-align: right; font-size: 13px; font-weight: 800; }
.hotel-service-row { display: grid; grid-template-columns: 20px minmax(0, .8fr) minmax(0, 1.7fr); gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px; }
.hotel-service-row b, .hotel-service-row small { display: block; }
.hotel-service-row b { font-size: 13px; }
.hotel-service-row small { color: var(--muted); font-size: 13px; margin-top: 3px; }
.hotel-service-row input[type="text"] { min-width: 0; width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 7px; padding: 8px; font-size: 13px; color: var(--ink); }
.hotel-manual-fields { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.hotel-manual-fields .service-partner-field { grid-column: 1 / -1; }
.hotel-name-picker { min-width: 0; grid-column: 1 / -1; position: relative; z-index: 2; }
.hotel-service-row .hotel-search-status { margin-top: 5px; font-size: 11px; line-height: 1.35; }
.hotel-suggestions { position: absolute; z-index: 30; top: calc(100% - 16px); left: 0; right: 0; max-height: 245px; overflow-y: auto; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 14px 28px rgba(20, 23, 18, .18); }
.hotel-suggestion { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px; text-align: left; border: 0; border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; font-size: 12px; }
.hotel-suggestion:hover, .hotel-suggestion.active { background: var(--surface-2); }
.hotel-suggestion span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hotel-suggestion b { flex: 0 0 auto; color: #9a741b; white-space: nowrap; }
.hotel-service-row i { font-style: normal; text-align: right; font-size: 13px; font-weight: 700; color: var(--muted); }
.service-editor .service-partner-field, .service-editor .service-price-field { display: grid; grid-template-columns: 1fr; gap: 5px; min-width: 0; padding: 0; border: 0; background: none; color: var(--muted); font-size: 12px; font-weight: 600; }
.service-editor .service-partner-field select, .service-editor .service-price-field input { min-width: 0; width: 100%; min-height: 36px; border: 1px solid var(--line); border-radius: 7px; padding: 8px; background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 400; }
.service-editor select:disabled { opacity: .55; cursor: not-allowed; }
.service-editor [data-service-kind] > i { display: grid; gap: 5px; min-width: 130px; text-align: left; font-size: 12px; color: var(--muted); }
.service-editor [data-service-kind] > i input { width: 100%; min-height: 36px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 400; }
.flight-service { padding: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.service-editor .flight-toggle { display: flex; align-items: center; gap: 10px; border: 0; padding: 0; background: none; }
.flight-toggle input { margin: 0; }
.flight-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.flight-fields.is-disabled { opacity: .48; }
.service-editor .flight-fields label { display: grid; grid-template-columns: 1fr; align-items: stretch; gap: 5px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 700; }
.flight-fields input { min-width: 0; width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); color: var(--ink); font: inherit; }
.hotel-stars { color: #b98513; font-size: 17px; letter-spacing: 1px; white-space: nowrap; }
.service-hotel-stars { display: block; margin-top: 3px; font-size: 13px; }
.resort-load-error { display: flex; align-items: center; gap: 12px; color: #a64530; font-size: 13px; }
.cost-layout { display: grid; grid-template-columns: 1fr 240px; gap: 20px; }
.cost-summary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }.cost-summary > span { color: var(--muted); font-size: 13px; text-transform: uppercase; }.cost-summary > b { display: block; font-size: 24px; margin: 7px 0 18px; }.cost-summary div { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding: 10px 0; }.cost-summary small { color: var(--muted); }.cost-summary strong { font-size: 13px; }.cost-summary .positive { color: #3d8157; }
.final-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }.final-summary article { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 13px; }.final-summary small, .final-summary b { display: block; }.final-summary small { color: var(--muted); font-size: 13px; margin-bottom: 5px; }.final-summary b { font-size: 13px; }
.final-check { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; font-weight: 700; }
.modal-actions.flow-actions { display: flex; align-items: center; flex: 0 0 auto; flex-wrap: wrap; gap: 10px; min-height: 72px; padding: 16px 28px; margin: 0; }
.flow-action-spacer { flex: 1; }
.flow-actions .primary-button, .flow-actions .secondary-button { min-height: 40px; min-width: 108px; font-size: 13px; text-align: center; }
@keyframes modalIn { from { opacity: 0; transform: scale(.96) translateY(8px); } }
.modal-head { display: flex; justify-content: space-between; margin-bottom: 22px; }
.modal-head h2 { margin: 0; font-size: 22px; }
.modal-head .close-modal, .modal-head .close-client { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; font-size: 24px; cursor: pointer; color: #888; }
.modal-head .close-modal:hover, .modal-head .close-client:hover { background: var(--surface-2); color: var(--ink); }
.modal-head .close-catalog { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; font-size: 24px; cursor: pointer; color: #888; }
.modal-head .close-catalog:hover { background: var(--surface-2); color: var(--ink); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid label { display: grid; gap: 6px; font-size: 13px; font-weight: 800; color: #666; }
.form-grid label.wide { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 9px; padding: 10px 11px; outline: none; font-size: 13px; color: var(--ink); }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(238,107,77,.1); }
.application-flow .form-grid label { gap: 8px; font-size: 13px; }
.application-flow .form-grid input, .application-flow .form-grid select, .application-flow .form-grid textarea { min-height: 44px; font-size: 13px; }
.form-grid textarea { min-height: 75px; resize: vertical; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.client-modal { width: min(640px, 100%); max-height: calc(100dvh - 32px); }
.client-modal .form-grid { margin-top: 20px; }
.client-modal .modal-head { margin-bottom: 0; }
.client-document-fields { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; }
.client-document-fields summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; font-size: 15px; font-weight: 700; }
.client-document-fields summary::-webkit-details-marker { display: none; }
.client-document-fields summary span { color: var(--muted); transition: transform .2s ease; }
.client-document-fields[open] summary span { transform: rotate(180deg); }
.client-profile-section { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.client-profile-section h3 { margin: 0 0 9px; font-size: 14px; }
.client-profile-section h3 small { color: var(--muted); font-weight: 500; }
.client-document-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.client-document-grid > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 8px; min-width: 0; }
.client-document-grid small, .client-document-grid strong { display: block; overflow-wrap: anywhere; }
.client-document-grid small { color: var(--muted); margin-bottom: 3px; font-size: 10px; }
.client-document-grid strong { font-size: 12px; }
.client-document-grid .client-identifier strong { overflow-wrap: normal; white-space: nowrap; overflow-x: auto; font-variant-numeric: tabular-nums; }
.client-trip { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 9px; overflow: hidden; }
.client-trip summary { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; cursor: pointer; padding: 13px; background: var(--surface-2); }
.client-trip summary span { color: var(--muted); }
.client-trip-content { padding: 13px; line-height: 1.5; }
.client-trip-content p { margin: 0 0 8px; }
.client-trip-content ul { margin: 0 0 10px; padding-left: 22px; }
.client-history-note { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.trash-panel { padding: 16px 20px; }
.trash-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.trash-tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.trash-tabs button:hover, .trash-tabs button.active { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.trash-tabs b { min-width: 19px; padding: 2px 5px; border-radius: 7px; background: var(--surface); text-align: center; font-size: 11px; }
.trash-section h2 { font-size: 15px; margin: 16px 0 6px; }
.trash-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding: 12px 0; }
.trash-row strong, .trash-row small { display: block; }
.trash-row small, .trash-empty { color: var(--muted); margin-top: 4px; }
.users-trash-panel { margin-top: 16px; padding: 20px; }
.users-trash-panel h2 { margin: 0 0 7px; }
.users-trash-panel > p { color: var(--muted); }
.task-board { max-width: 920px; padding: 20px; }
.task-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 13px; margin-bottom: 18px; }
.task-tabs button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 8px 12px; border-radius: 8px; font: inherit; }
.task-tabs button.active { background: var(--surface-2); color: var(--ink); font-weight: 800; }
.task-compose, .task-edit-form { display: grid; grid-template-columns: minmax(180px, 1fr) 145px 125px 125px auto; gap: 9px; align-items: center; }
.task-compose input, .task-compose select, .task-edit-form input, .task-edit-form select { min-width: 0; min-height: 41px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--ink); font: inherit; }
.task-error { min-height: 18px; color: #b74436; }
#taskError:empty { display: none; }
.task-item { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.task-check { flex: 0 0 22px; width: 22px; height: 22px; border: 2px solid #d7a25b; border-radius: 50%; background: transparent; cursor: pointer; }
.task-check.priority-1 { border-color: #e46a55; }
.task-check.priority-3 { border-color: #86aaa0; }
.task-main { flex: 1; min-width: 0; }
.task-main strong, .task-main small { display: block; overflow-wrap: anywhere; }
.task-main small { color: var(--muted); margin-top: 3px; }
.task-item.completed .task-main strong { text-decoration: line-through; color: var(--muted); }
.task-edit-form { flex: 1; grid-template-columns: minmax(160px, 1fr) 135px 115px 115px auto auto; }
.task-empty { color: var(--muted); padding: 18px 0; }
@media (max-width: 760px) { .task-compose, .task-edit-form { grid-template-columns: 1fr 1fr; } .task-compose input[name="title"], .task-edit-form input[name="title"] { grid-column: 1 / -1; } .client-document-grid { grid-template-columns: 1fr; } }

/* Task board */
.task-workspace { display: grid; grid-template-columns: 225px minmax(0, 1fr); gap: 18px; align-items: start; }
.task-sidebar { padding: 14px; display: grid; gap: 3px; position: sticky; top: 96px; }
.task-view, .task-project { width: 100%; border: 0; background: transparent; border-radius: 9px; padding: 10px 12px; text-align: left; color: var(--ink); font: inherit; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.task-view.active, .task-project.active { background: var(--surface-2); font-weight: 800; }
.task-view b, .task-project b { color: var(--muted); font-size: 12px; }
.task-sidebar-label { color: var(--muted); font-size: 11px; letter-spacing: .09em; font-weight: 900; margin: 20px 10px 6px; }
.task-sidebar-heading { display: flex; align-items: center; justify-content: space-between; }
.task-section-menu { position: relative; letter-spacing: 0; font-weight: 500; }
.task-section-menu summary { list-style: none; color: var(--muted); font-size: 18px; line-height: 1; padding: 1px 6px; border-radius: 6px; cursor: pointer; }
.task-section-menu summary::-webkit-details-marker { display: none; }
.task-section-menu summary:hover { background: var(--surface-2); color: var(--ink); }
.task-section-menu button { position: absolute; top: 26px; right: 0; z-index: 5; width: max-content; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: var(--surface); color: var(--ink); box-shadow: 0 6px 18px rgba(24,32,22,.12); cursor: pointer; font: inherit; }
.task-managed-row { display: flex; align-items: center; min-width: 0; }
.task-managed-row .task-project { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.task-remove { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; padding: 4px 7px; border-radius: 6px; }
.task-remove:hover { color: #c75040; background: var(--surface-2); }
.task-sidebar-add { border: 0; background: transparent; color: var(--muted); text-align: left; cursor: pointer; font: inherit; padding: 8px 12px; }
.task-sidebar-add:hover { color: var(--accent); }
.task-sidebar-form { display: grid; gap: 6px; padding: 5px; }
.task-sidebar-form.hidden { display: none; }
.task-sidebar-form input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: var(--surface); color: var(--ink); }
.task-sidebar-form button { border: 0; background: var(--surface-2); color: var(--ink); border-radius: 7px; padding: 7px; cursor: pointer; }
.task-label-name { min-width: 0; flex: 1; overflow-wrap: anywhere; padding: 9px 12px; }
.task-sidebar-empty { color: var(--muted); font-size: 12px; padding: 5px 12px; margin: 0; }
.task-content { min-width: 0; }
.task-compose { display: grid; grid-template-columns: minmax(180px, 1fr) 142px 130px 145px 125px auto; gap: 8px; padding: 13px; align-items: center; }
.task-compose input, .task-compose select { width: 100%; min-width: 0; min-height: 39px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: var(--surface-2); color: var(--ink); font: inherit; }
.task-compose .primary-button { min-height: 39px; }
.task-columns { display: flex; align-items: flex-start; gap: 16px; min-width: 0; overflow-x: auto; padding: 4px 2px 14px; }
.task-column { flex: 1 0 220px; min-width: 220px; max-width: 360px; }
.task-column-head { display: flex; align-items: center; justify-content: space-between; min-height: 34px; margin-bottom: 9px; }
.task-column-head h3 { margin: 0; font-size: 12px; letter-spacing: .03em; }
.task-column-head small { color: var(--muted); font-weight: 500; margin-left: 5px; }
.task-column-menu { position: relative; flex: none; }
.task-column-menu > summary { list-style: none; border: 0; border-radius: 7px; padding: 3px 9px; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.task-column-menu > summary::-webkit-details-marker { display: none; }
.task-column-menu > summary:hover, .task-column-menu[open] > summary { background: var(--surface-2); color: var(--ink); }
.task-column-menu-panel { position: fixed; z-index: 35; width: 215px; max-height: calc(100dvh - 16px); overflow-y: auto; visibility: hidden; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 12px 28px rgba(24,32,22,.16); }
.task-column-menu-panel[data-positioned] { visibility: visible; }
#page-tasks:has(.task-column-menu[open]) { animation: none; }
.task-column-menu-panel button { display: block; width: 100%; border: 0; border-radius: 6px; padding: 9px 10px; background: transparent; color: var(--ink); text-align: left; font: inherit; font-size: 12px; cursor: pointer; }
.task-column-menu-panel button:hover { background: var(--surface-2); }
.task-column-menu-panel button:last-child { color: #c75040; border-top: 1px solid var(--line); border-radius: 0; }
.task-column-list { display: grid; gap: 9px; }
.task-column.drag-over { outline: 2px dashed var(--accent); outline-offset: 5px; border-radius: 8px; }
.task-card.drag-over { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.task-card.dragging { opacity: .45; }
.task-card[draggable="true"] { cursor: grab; }
.task-card { display: flex; gap: 9px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 13px 11px; box-shadow: 0 3px 9px rgba(24,32,22,.04); }
.task-card .task-check { margin-top: 2px; }
.task-card-open { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); padding: 0; text-align: left; cursor: pointer; font: inherit; }
.task-card-open strong, .task-card-open small, .task-card-open span { display: block; overflow-wrap: anywhere; }
.task-card-open strong { font-size: 13px; line-height: 1.4; }
.task-card-open small { color: var(--muted); margin-top: 5px; font-size: 12px; line-height: 1.4; max-height: 3em; overflow: hidden; }
.task-card-open span { color: #667c76; font-size: 11px; margin-top: 9px; }
.task-card-open em { color: #c75040; font-style: normal; font-weight: 800; }
.task-card-labels { display: flex !important; flex-wrap: wrap; gap: 4px; }
.task-card-labels i { font-style: normal; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.task-card.completed strong { color: var(--muted); text-decoration: line-through; }
.task-add-card, .task-add-section { border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit; text-align: left; padding: 11px 5px; }
.task-add-section { flex: 0 0 250px; max-width: 260px; align-self: flex-start; border-radius: 9px; background: var(--surface-2); padding: 12px 14px; }
.task-add-card:hover, .task-add-section:hover { color: var(--accent); }
.task-inline-form { display: grid; gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 3px 9px rgba(24,32,22,.04); }
.task-inline-title { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; outline: none; }
.task-inline-title::placeholder { color: var(--muted); }
.task-inline-menu { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.task-inline-menu details { min-width: 0; }
.task-inline-menu details[open] { flex: 1 0 100%; }
.task-inline-menu summary { list-style: none; display: inline-flex; align-items: center; max-width: 100%; min-height: 26px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 11px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-inline-menu summary::-webkit-details-marker { display: none; }
.task-inline-menu summary:hover { color: var(--accent); border-color: var(--accent); }
.task-inline-menu-body { display: grid; gap: 7px; margin-top: 7px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.task-inline-menu-body label { display: grid; gap: 5px; font-size: 11px; color: var(--muted); }
.task-inline-menu-body :is(input:not([type="checkbox"]), select, textarea) { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 7px; padding: 6px; background: var(--surface); color: var(--ink); font: inherit; }
.task-inline-menu-body textarea { resize: vertical; }
.task-inline-labels label { display: flex; align-items: center; color: var(--ink); }
.task-inline-actions { display: flex; justify-content: end; gap: 7px; align-items: center; }
.task-inline-actions button { border: 0; border-radius: 8px; cursor: pointer; }
.task-inline-actions [data-inline-cancel] { color: var(--muted); background: transparent; font-size: 20px; padding: 2px 8px; }
.task-inline-actions .task-inline-submit { min-width: 34px; min-height: 32px; background: var(--accent); color: white; font-size: 18px; }
.task-inline-actions .task-inline-submit:disabled { opacity: .5; cursor: wait; }
.task-section-form { display: flex; flex-wrap: wrap; gap: 8px; padding: 11px 0; }
.task-section-form.hidden { display: none; }
.task-section-form input { flex: 1; min-width: 180px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.task-detail-modal { width: min(860px, calc(100vw - 24px)); }
.task-detail-body { display: grid; grid-template-columns: minmax(0, 1fr) 235px; }
.task-detail-main, .task-detail-side { padding: 22px; display: grid; gap: 15px; align-content: start; }
.task-detail-side { background: var(--surface-2); border-left: 1px solid var(--line); }
.task-detail-body label { display: grid; gap: 6px; font-size: 12px; font-weight: 800; color: var(--muted); }
.task-detail-body :is(input:not([type="checkbox"]), select, textarea) { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.task-detail-body textarea { resize: vertical; }
.task-detail-main h3 { margin: 6px 0 0; font-size: 14px; }
.task-subtask { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.task-subtask label { display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: 13px; font-weight: 500; }
.task-subtask button { background: transparent; border: 0; cursor: pointer; color: var(--muted); font-size: 20px; }
.task-subtask-add { display: flex; gap: 8px; }
.task-subtask-add input { flex: 1; }
.task-detail-labels { display: grid; gap: 8px; }
.task-detail-labels strong { color: var(--muted); font-size: 12px; }
.task-detail-labels > div { display: flex; flex-wrap: wrap; gap: 6px; }
.task-detail-labels .task-label-option { display: flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; font-weight: 500; color: var(--ink); }
@media (max-width: 1100px) { .task-compose { grid-template-columns: repeat(3, minmax(0, 1fr)); } .task-compose input[name="title"] { grid-column: 1 / -1; } }
@media (max-width: 760px) { .task-workspace { grid-template-columns: 1fr; } .task-sidebar { position: static; display: flex; flex-wrap: wrap; } .task-view, .task-project { width: auto; } .task-sidebar-label { width: 100%; margin: 8px 0 0; } .task-projects { display: flex; flex-wrap: wrap; } .task-detail-body { grid-template-columns: 1fr; } .task-detail-side { border-left: 0; border-top: 1px solid var(--line); } .task-compose { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.catalog-filters { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(220px, .8fr) minmax(220px, 1.3fr); gap: 14px; padding: 18px; margin-bottom: 14px; }
.catalog-filters label, .catalog-form-grid label { display: grid; gap: 7px; min-width: 0; color: #606057; font-size: 13px; font-weight: 800; }
.catalog-filters input, .catalog-filters select, .catalog-form-grid input, .catalog-form-grid select { width: 100%; min-width: 0; min-height: 42px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; background: var(--surface-2); color: var(--ink); outline: none; }
.catalog-filters :is(input, select):focus, .catalog-form-grid :is(input, select):focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(238,107,77,.1); }
.catalog-summary { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.catalog-groups { display: grid; gap: 14px; }
.catalog-group { overflow: hidden; }
.catalog-group header { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.catalog-group header .country-flag { width: 27px; height: 19px; }
.catalog-group header small { display: block; color: var(--muted); font-size: 12px; }
.catalog-group header h2 { margin: 2px 0 0; font-size: 18px; }
.catalog-group header > span:last-child { margin-left: auto; color: var(--muted); font-size: 13px; }
.catalog-hotel-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.catalog-hotel { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.catalog-hotel:nth-child(odd) { border-right: 1px solid var(--line); }
.catalog-hotel span { overflow-wrap: anywhere; }
.catalog-hotel b { color: #b78422; letter-spacing: 2px; white-space: nowrap; }
.catalog-more { justify-self: center; margin: 8px 0 20px; }
.catalog-empty { padding: 24px; color: var(--muted); }
.catalog-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.catalog-name-field { grid-column: 1 / -1; }
.catalog-form-error { min-height: 20px; margin: 12px 0 0; color: #bc422f; font-size: 13px; }
.toast-container { position: fixed; z-index: 200; right: 20px; top: 20px; display: grid; gap: 8px; }
.toast { background: var(--surface); color: var(--ink); border: 1px solid var(--line); padding: 12px 15px; border-radius: 12px; box-shadow: 0 10px 30px rgba(31,58,39,.13); font-size: 13px; animation: toastIn .3s ease; }
.toast b { color: #43835a; margin-right: 5px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

body.dark { --bg: #1e201d; --surface: #292b27; --surface-2: #242622; --ink: #f2f2ea; --muted: #a7a89e; --line: #3a3c36; --nav: #252822; --nav-ink: #f2f2ea; --nav-muted: #b2b8ad; --nav-active: #3b4534; --nav-active-ink: #e8f4df; --nav-hover: #333b30; --nav-label: #9eaa98; --shadow: 0 10px 30px rgba(0,0,0,.15); }
body.dark .topbar { background: rgba(35,37,33,.87); }
body.dark .sidebar { background: rgba(37,40,34,.92); }
body.dark .app-version { background: #394334; border-color: #52644a; color: #e2f0dc !important; }
body.dark .nav-item b, body.dark .nav-item i { background: #3d4538; color: #e0e9d7; }
body.dark .nav-item i.pink { background: #5c3935; color: #ffb6a4; }
body.dark .metric-card { color: #2d2d28; }
body.dark .search-box kbd { background: #33352f; border-color: #4a4c45; }
body.dark .kanban-column { background: #232520; }
body.dark .tab-pills { background: #242620; }
body.dark .tab-pills button.active, body.dark .view-controls button.active { background: #353831; }

/* Authentication and access management */
.nav-item[href] { text-decoration: none; }
.auth-page { min-height: 100vh; background: radial-gradient(circle at 12% 8%, #f9e9df 0, transparent 34%), radial-gradient(circle at 88% 90%, #e9efd0 0, transparent 38%), var(--bg); }
.auth-shell { min-height: 100vh; padding: 34px 18px; display: grid; place-items: center; }
.auth-card { width: min(460px, 100%); background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 28px 80px rgba(42,43,36,.13); padding: 34px; text-align: center; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 11px; margin-bottom: 28px; text-align: left; }
.auth-brand .brand-mark { width: 42px; height: 42px; flex: 0 0 42px; }
.auth-brand strong { display: block; font-size: 18px; }
.auth-brand span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.telegram-badge { width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 21px; display: grid; place-items: center; background: #2aabee; color: white; box-shadow: 0 12px 28px rgba(42,171,238,.23); transform: rotate(-3deg); }
.telegram-badge svg { width: 33px; fill: currentColor; transform: rotate(3deg); }
.auth-card h1 { font-size: 31px; margin-bottom: 24px; }
.password-login-form { display: grid; gap: 9px; text-align: left; }
.password-login-form #accountTelegramCodeBlock { display: grid; gap: 8px; }
.password-login-form #sendAccountPasswordCode { min-height: 38px; }
.password-login-form label { font-size: 13px; font-weight: 800; color: #55574d; }
.password-login-form input { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); padding: 0 13px; outline-color: var(--accent); }
.password-login-form .primary-button { min-height: 48px; margin-top: 9px; font-size: 15px; }
.password-tools { display: flex; gap: 8px; margin-top: 3px; }
.password-tools .secondary-button { min-height: 34px; padding: 5px 10px; font-size: 12px; }
.auth-divider { color: var(--muted); margin: 17px 0; display: flex; align-items: center; gap: 12px; font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.account-back { display: inline-block; margin-top: 20px; color: var(--accent); text-decoration: none; font-size: 13px; font-weight: 800; }
.telegram-login, .bot-link { width: 100%; min-height: 50px; border: 0; border-radius: 13px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; background: #2aabee; color: white; font-weight: 800; text-decoration: none; cursor: pointer; }
.telegram-login:hover, .bot-link:hover { background: #1598da; }
.telegram-login:disabled { opacity: .55; cursor: wait; }
.auth-progress { margin-top: 18px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 15px; padding: 16px; text-align: left; }
.auth-step { display: flex; align-items: center; gap: 10px; color: #58584f; font-size: 13px; line-height: 1.4; }
.auth-step i { width: 24px; height: 24px; border-radius: 50%; background: #e9ebd8; color: #66712f; display: grid; place-items: center; font-style: normal; font-weight: 900; flex: 0 0 auto; }
.bot-link { min-height: 42px; margin: 12px 0; justify-content: center; font-size: 13px; }
.auth-wait { display: flex; align-items: center; gap: 9px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.auth-wait > span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #d4d6ca; border-top-color: var(--accent); animation: authSpin .8s linear infinite; }
@keyframes authSpin { to { transform: rotate(360deg); } }
.auth-error { min-height: 18px; color: #c54d39; font-size: 13px; margin-top: 12px; }
.auth-note { margin: 4px 0 0; color: #9a9a90; font-size: 13px; line-height: 1.5; }

.users-main { padding: 36px 40px 56px; max-width: 1500px; width: 100%; }
.users-main .exchange-strip { margin: -12px 0 25px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 11px; }
.auth-card .exchange-strip { justify-content: center; margin-top: 20px; padding: 14px 0 0; border: 0; border-top: 1px solid var(--line); gap: 7px 12px; }
.auth-card .exchange-title { flex-basis: 100%; }
.users-page-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.users-page-head p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; }
.users-bot-button { display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }
.users-head-actions { display: flex; align-items: center; gap: 9px; }
.view-mode #addAccountButton { display: none; }
.users-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 14px; }
.users-stats article { min-height: 105px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; justify-content: space-between; }
.users-stats span { color: var(--muted); font-size: 13px; font-weight: 700; }
.users-stats b { font-size: 27px; }
.users-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.users-toolbar { padding: 19px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.users-toolbar h2 { margin: 0 0 4px; font-size: 17px; }
.users-toolbar p { margin: 0; color: var(--muted); font-size: 13px; }
.users-toolbar input { width: min(330px, 40vw); min-height: 38px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 0 12px; outline: 0; }
.users-table-wrap { overflow: auto; }
.users-table { width: 100%; border-collapse: collapse; min-width: 850px; }
.users-table th { padding: 11px 15px; background: #f7f7f2; color: #8d8d83; text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.users-table td { padding: 13px 15px; border-top: 1px solid var(--line); font-size: 13px; }
.user-person { display: flex; align-items: center; gap: 10px; }
.user-person > i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: #f0e6dc; color: #8b604d; font-style: normal; font-weight: 900; }
.user-person b, .user-person small { display: block; }
.user-person small { color: var(--muted); margin-top: 3px; }
.mono { font-family: Consolas, monospace; color: #66665e; }
.user-group { display: inline-flex; padding: 5px 8px; border-radius: 8px; background: #f0f1e5; color: #677030; font-weight: 700; }
.user-mode { color: var(--muted); font-weight: 700; }
.access-status { display: block; font-weight: 600; }
.user-presence { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: var(--muted); font-size: 11px; }
.user-presence i { width: 7px; height: 7px; border-radius: 50%; background: #aab4aa; }
.user-presence.online i { background: #48aa78; box-shadow: 0 0 0 2px #e1f2e8; }
.access-status i { width: 7px; height: 7px; border-radius: 50%; background: #b9b9b0; }
.access-status.active i { background: #65ad86; box-shadow: 0 0 0 3px #e1f2e8; }
.access-status.pending i { background: #d8a33f; box-shadow: 0 0 0 3px #fbefd3; }
.access-status.disabled i { background: #c86c5a; box-shadow: 0 0 0 3px #f8e5e1; }
.user-row-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.user-edit { display: inline-block; border: 1px solid var(--line); border-radius: 8px; background: white; padding: 6px 10px; font-size: 13px; text-decoration: none; cursor: pointer; }
.user-edit:hover { border-color: var(--accent); color: var(--accent); }
.users-empty { color: var(--muted); text-align: center; padding: 40px !important; }
.table-weather { display: block; color: #517b75; font-size: 13px; margin-top: 4px; font-weight: 700; white-space: nowrap; }
.resort-weather { grid-column: 1 / -1; border: 1px solid #dfe7cf; border-radius: 10px; background: #f5f8ed; color: #52684b; padding: 12px 14px; font-size: 13px; line-height: 1.45; }
.resort-weather a, .weather a { color: #5b7853; font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
.weather a { margin-left: 12px; white-space: nowrap; }
.user-access-modal { width: min(680px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; }
.user-access-modal .modal-head { align-items: center; gap: 20px; margin: 0; padding: 20px 28px; border-bottom: 1px solid var(--line); }
.user-access-modal .close-user[aria-label="Закрыть"] { flex: 0 0 36px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.user-access-modal .close-user[aria-label="Закрыть"]:hover { color: var(--ink); background: var(--surface); }
.user-form-grid { padding: 22px 28px 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 18px; align-items: start; }
.user-form-grid label { min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 7px; color: #67675f; font-size: 13px; font-weight: 400; }
.user-form-grid .user-field-wide { grid-column: 1 / -1; }
.user-form-grid input, .user-form-grid select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 42px; border: 1px solid var(--line); border-radius: 9px; padding: 0 11px; background: white; outline: 0; font: inherit; font-weight: 400; color: var(--ink); }
.user-form-grid input::placeholder { font-weight: 400; }
.user-form-grid input:focus, .user-form-grid select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.user-form-grid input[readonly] { background: var(--surface-2); color: var(--muted); }
.user-form-grid label small { color: var(--muted); font-size: 11px; line-height: 1.35; font-weight: 500; }
.user-form-grid .password-tools { flex-wrap: wrap; margin-top: 0; }
.user-form-grid label.hidden { display: none; }
.user-form-grid #sendUserPasswordCode { min-height: 34px; padding: 5px 10px; font-size: 12px; }
.user-access-modal .auth-error { margin: 0 28px; }
.user-access-modal .modal-actions { margin: 0; padding: 18px 28px 24px; border-top: 1px solid var(--line); }

/* iOS-inspired visual system: glass for navigation, solid surfaces for content. */
:root {
  --glass: rgba(255, 255, 255, .78);
  --glass-border: rgba(255, 255, 255, .88);
  --focus-ring: rgba(74, 131, 88, .22);
  --card-radius: 20px;
  --control-radius: 12px;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  background: radial-gradient(circle at 95% 0%, #edf7f3 0, transparent 34%),
    radial-gradient(circle at 12% 96%, #f1f5fb 0, transparent 35%), var(--bg);
}
h1, h2, h3, .metric-value { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Arial, sans-serif; }
h1 { font-size: clamp(28px, 2.6vw, 36px); line-height: 1.12; letter-spacing: -.04em; font-weight: 750; }
h2, h3 { letter-spacing: -.025em; }
button, input, select, textarea { font-family: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:where(button, a, input, select, textarea, summary):focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: #637869; opacity: 1; }

.sidebar {
  background: var(--glass);
  border-right-color: var(--glass-border);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 8px 0 32px rgba(41, 77, 52, .04);
}
.brand { padding-bottom: 16px; }
.brand strong { font-weight: 800; letter-spacing: -.035em; }
.nav-item { border-radius: var(--control-radius); }
.nav-item.active { font-weight: 750; }
@media (max-height: 800px) {
  .sidebar { padding-top: 10px; padding-bottom: 10px; }
  .brand { padding-bottom: 10px; }
  .nav-item { min-height: 36px; }
  .nav-label { margin-top: 12px; margin-bottom: 5px; }
  .profile-mini { padding-top: 6px; }
}
@media (max-height: 740px) {
  .sidebar { padding-top: 8px; padding-bottom: 8px; }
  .brand { padding-bottom: 8px; }
  .main-nav, .sidebar-bottom { gap: 1px; }
  .nav-item { min-height: 34px; }
  .nav-label { margin-top: 9px; margin-bottom: 4px; }
  .role-preview select { min-height: 32px; }
  .sidebar-theme-toggle { min-height: 36px; }
}
@media (max-height: 680px) {
  .sidebar { padding-top: 6px; padding-bottom: 6px; }
  .brand { padding-bottom: 5px; }
  .brand-mark { width: 32px; height: 32px; flex-basis: 32px; }
  .brand-info { gap: 2px; }
  .nav-item { min-height: 29px; }
  .nav-label { margin-top: 5px; margin-bottom: 2px; }
  .profile-mini { padding-top: 4px; }
  .role-preview { gap: 2px; }
  .role-preview select { min-height: 29px; }
  .sidebar-theme-toggle { min-height: 33px; }
}
@media (max-height: 620px) {
  .sidebar { padding-top: 4px; padding-bottom: 4px; }
  .brand { padding-bottom: 3px; }
  .brand-mark { width: 28px; height: 28px; flex-basis: 28px; }
  .nav-item { min-height: 26px; }
  .nav-icon { font-size: 15px; }
  .nav-label { margin-top: 3px; margin-bottom: 1px; }
  .profile-mini { padding-top: 3px; }
  .avatar { width: 26px; height: 26px; }
  .role-preview select { min-height: 27px; }
  .sidebar-theme-toggle { min-height: 30px; }
}
@media (max-height: 580px) {
  .nav-item { min-height: 25px; }
  .sidebar-theme-toggle { min-height: 28px; }
}
.role-preview select, .search-box, .icon-button, .view-controls button,
.tab-pills button, .secondary-button, .user-edit, .mini-action { border-radius: var(--control-radius); }
.topbar {
  height: 76px;
  background: var(--glass);
  border-bottom-color: var(--glass-border);
  box-shadow: 0 4px 24px rgba(41, 77, 52, .035);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}
.search-box { min-height: 42px; background: rgba(255, 255, 255, .7); border-color: #dce7df; }
.search-box:focus-within { border-color: #8aaf92; box-shadow: 0 0 0 4px var(--focus-ring); }
.icon-button { width: 40px; height: 40px; background: rgba(255, 255, 255, .78); }
.icon-button:hover, .secondary-button:hover, .mini-action:hover { background: #edf5ed; border-color: #cfe0d0; }
.primary-button, .secondary-button { min-height: 42px; border-radius: var(--control-radius); }
.primary-button { background: #dc684f; box-shadow: 0 6px 14px rgba(210, 98, 72, .16); }
.primary-button:hover { background: #c7533c; }
.secondary-button { background: #edf2ed; color: #435b49; }
.season-chip, .view-mode-badge { border: 1px solid #dce9d7; }
.exchange-strip { min-height: 40px; padding-block: 5px; background: rgba(255, 255, 255, .8); font-size: 11px; }
.exchange-strip small, .exchange-strip a { font-size: 11px; }

.content-wrap { width: 100%; max-width: 1520px; padding: 30px 32px 56px; }
.section-title-row, .welcome-row { align-items: center; gap: 18px; margin-bottom: 24px; }
.section-title-row p, .welcome-row p { line-height: 1.5; }
.metrics-grid, .dashboard-grid, .module-cards, .users-stats, .catalog-groups,
.document-grid, .integration-grid { gap: 16px; }
.panel, .metric-card, .module-cards article, .doc-card, .integration-grid article,
.users-stats article, .users-panel, .catalog-group, .requests-table-wrap,
.task-card, .task-inline-form, .weather { border-radius: var(--card-radius); }
.panel, .module-cards article, .doc-card, .integration-grid article,
.users-stats article, .users-panel { box-shadow: var(--shadow); }
.metric-card { box-shadow: 0 7px 22px rgba(45, 70, 55, .035); }
.panel-head { align-items: center; }
.panel h2 { font-size: 17px; font-weight: 750; }
.tab-pills { border: 1px solid #e0eae1; background: rgba(238, 245, 238, .75); border-radius: 14px; }
.tab-pills button, .view-controls button { min-height: 35px; }
.tab-pills button.active, .view-controls button.active { background: var(--surface); box-shadow: 0 2px 7px rgba(34, 62, 42, .08); }
.kanban { gap: 16px; }
.kanban-column { border: 1px solid #e0eae1; border-radius: var(--card-radius); }
.lead-card { border-color: var(--line); border-radius: 15px; }
.registry-table, .payment-table, .users-table-wrap { scrollbar-color: #c9d7cb transparent; }
.payment-table tfoot { background: #eff5e8; }
.payment-table tbody tr:hover, .request-payment-item:hover { background: #f1f7ee; }
.payment-table tbody tr.selected { background: #e6f2dd; }
.client-list-item.active, .client-list-item:hover { background: #ecf5e8; }
.users-table th { background: #f1f6f1; color: #617365; }
.task-view.active, .task-project.active { background: #ecf5e8; color: #355a39; }
.task-card { padding: 15px; }
.task-inline-form { padding: 15px; }
.catalog-filters { align-items: end; gap: 16px; }

@media (min-width: 1080px) {
  body:has(#page-overview.active) .content-wrap { padding: 30px 76px 56px 32px; }
  #page-overview .welcome-row { margin-bottom: 10px; }
  #page-overview .welcome-row .eyebrow { margin-bottom: 3px !important; font-size: 11px !important; }
  #page-overview .welcome-row h1 { margin-bottom: 3px; font-size: 27px; }
  #page-overview .welcome-row p:not(.eyebrow) { font-size: 11px; }
  #page-overview .weather { padding: 6px 9px; }
  #page-overview .weather-icon { font-size: 20px; }
  #page-overview .weather strong { font-size: 13px; }
  #page-overview .weather small, #page-overview .weather a { font-size: 11px; }
  #page-overview .metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
  #page-overview .metric-card { min-height: 98px; padding: 7px 12px; }
  #page-overview .metric-icon { width: 21px; height: 21px; }
  #page-overview .trend { padding: 2px 5px; font-size: 10px; }
  #page-overview .metric-card p { margin: 4px 0 1px; font-size: 11px; }
  #page-overview .metric-value { font-size: 18px; }
  #page-overview .dashboard-finance-grid .metric-value { font-size: clamp(14px, 1.15vw, 18px); white-space: nowrap; }
  #page-overview .metric-card small { font-size: 10px; }
  #page-overview .spark { right: 10px; bottom: 10px; height: 30px; transform: scale(.8); transform-origin: bottom right; }
  #page-overview .progress-ring { width: 45px; right: 8px; bottom: 3px; }
  #page-overview .meter { bottom: 14px; }
  #page-overview .plane-path { transform: scale(.75); transform-origin: bottom right; }
  #page-overview .dashboard-grid { grid-template-columns: minmax(0, 1.5fr) minmax(275px, .85fr); gap: 10px; margin-bottom: 10px; }
  #page-overview .dashboard-grid.lower { margin-bottom: 0; }
  #page-overview .dashboard-grid > .panel { min-height: 0; padding: 11px 14px; }
  #page-overview .panel-head { margin-bottom: 8px; }
  #page-overview .panel h2 { margin-bottom: 2px; font-size: 14px; }
  #page-overview .panel-head p, #page-overview .text-button { font-size: 11px; }
  #page-overview .funnel { gap: 4px; }
  #page-overview .funnel-bar { height: 22px; font-size: 11px; }
  #page-overview .funnel-bar strong, #page-overview .funnel-step small { font-size: 11px; }
  #page-overview .funnel-footer { margin-top: 7px; padding-top: 7px; font-size: 11px; }
  #page-overview .funnel-footer b { font-size: 11px; }
  #page-overview .payment-breakdown { gap: 7px; }
  #page-overview .payment-breakdown-row { min-height: 26px; }
  #page-overview .attention-item { padding: 3px 0; line-height: 1.2; }
  #page-overview .attention-item strong { margin-bottom: 2px; font-size: 11px; }
  #page-overview .attention-item small, #page-overview .attention-item time { font-size: 11px; }
  #page-overview .full-link { padding-top: 7px; font-size: 11px; }
  #page-overview .date-chip { padding: 4px 7px; font-size: 11px; }
  #page-overview .departure-row { padding: 4px 0; font-size: 11px; }
  #page-overview .departure-row.header { padding-bottom: 5px; font-size: 10px; }
  #page-overview .departure-row small { font-size: 10px; }
  #page-overview .client-cell .avatar { width: 25px; height: 25px; font-size: 10px; }
  #page-overview .status-tag { padding: 3px 5px; font-size: 10px; }
  #page-overview .destination-list { gap: 6px; line-height: 1.2; }
  #page-overview .travel-pulse-item { padding: 5px 8px; }
  #page-overview .travel-pulse-item span { font-size: 10px; }
  #page-overview .travel-pulse-item strong { font-size: 14px; }
  #page-overview .destination-list b small { margin-top: 2px; }
  #page-overview .destination-list b, #page-overview .destination-list > div > strong { font-size: 11px; }
  #page-overview .destination-list b small { font-size: 10px; }
}

.modal-backdrop { background: rgba(40, 61, 49, .38); backdrop-filter: blur(10px); }
.modal { border: 1px solid rgba(255, 255, 255, .84); border-radius: 24px; box-shadow: 0 28px 90px rgba(31, 58, 39, .2); }
.modal-head { align-items: center; gap: 18px; }
.modal-head h2 { font-size: 24px; letter-spacing: -.035em; }
.modal-head .close-modal, .modal-head .close-client, .modal-head .close-catalog,
.user-access-modal .close-user[aria-label="Закрыть"] { border-radius: var(--control-radius); }
.flow-body, .payment-form-body, .task-detail-side { background: #f7faf7; }
.flow-heading > span { border-radius: 14px; }
.form-grid, .user-form-grid, .catalog-form-grid { gap: 16px; }
.form-grid label, .user-form-grid label, .catalog-filters label,
.catalog-form-grid label { color: #506457; }
.form-grid :is(input, select, textarea), .user-form-grid :is(input, select),
.catalog-filters :is(input, select), .catalog-form-grid :is(input, select),
.password-login-form input, .task-detail-body :is(input:not([type="checkbox"]), select, textarea) {
  border-radius: var(--control-radius);
  background: var(--surface);
  min-height: 44px;
}
.form-grid :is(input, select, textarea):focus, .user-form-grid :is(input, select):focus,
.catalog-filters :is(input, select):focus, .catalog-form-grid :is(input, select):focus {
  border-color: #80a789;
  box-shadow: 0 0 0 4px var(--focus-ring);
}
.auth-page { background: radial-gradient(circle at 13% 14%, rgba(239, 213, 153, .34), transparent 30%), radial-gradient(circle at 88% 80%, rgba(157, 207, 180, .34), transparent 35%), linear-gradient(135deg, #24483e, #4f796c 56%, #91b6a2); }
.auth-shell { padding: 20px 14px; }
.auth-card { width: min(400px, 100%); padding: 27px 28px; border-radius: 22px; box-shadow: 0 24px 70px rgba(23, 53, 43, .25); }
.auth-card h1 { margin: 0 0 20px; font-size: 27px; letter-spacing: -.04em; }
.auth-card .password-login-form { gap: 7px; }
.auth-card .password-login-form input { min-height: 42px; }
.auth-card .password-login-form .primary-button { min-height: 44px; margin-top: 7px; font-size: 14px; }
.auth-card .auth-divider { margin: 12px 0; }
.auth-card .telegram-login { min-height: 44px; }
.auth-card .auth-error { min-height: 14px; margin-top: 8px; }
.auth-card .exchange-strip { margin-top: 10px; padding-top: 10px; gap: 4px 8px; font-size: 10px; }
.auth-card .exchange-title { flex-basis: 100%; }
.auth-card .exchange-strip small, .auth-card .exchange-strip a { font-size: 10px; }
.auth-card.telegram-active { width: min(360px, 100%); padding: 22px 24px; }
.auth-card.telegram-active h1 { margin-bottom: 14px; font-size: 23px; }
.auth-card.telegram-active .password-login-form,
.auth-card.telegram-active .auth-divider,
.auth-card.telegram-active .telegram-login,
.auth-card.telegram-active .exchange-strip { display: none; }
.auth-card.telegram-active .auth-progress { margin-top: 0; padding: 12px; border-radius: 13px; }
.auth-card.telegram-active .auth-step { font-size: 12px; gap: 8px; }
.auth-card.telegram-active .auth-step i { width: 22px; height: 22px; flex-basis: 22px; }
.auth-card.telegram-active .bot-link { min-height: 38px; margin: 9px 0; }
.auth-card.telegram-active .auth-wait { margin-top: 10px; padding-top: 10px; font-size: 12px; }
.auth-progress-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
.auth-progress-actions button { border: 0; background: transparent; color: #506457; cursor: pointer; font: inherit; font-size: 11px; padding: 4px 0; }
.auth-progress-actions button:hover { text-decoration: underline; }
.users-main { padding: 18px 24px 32px; }
.users-main .exchange-strip { margin: 0 0 14px; padding: 6px 10px; min-height: 34px; }
.users-page-head { margin-bottom: 14px; }
.users-page-head h1 { margin: 0; }
.users-stats { gap: 10px; margin-bottom: 12px; }
.users-stats article { min-height: 70px; padding: 10px 14px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
.users-stats span { font-size: 12px; }
.users-stats b { font-size: 22px; }
.users-panel { padding: 10px 12px; overflow: visible; }
.users-toolbar { padding: 6px 8px 10px; gap: 12px; }
.users-toolbar h2 { margin: 0; font-size: 15px; }
.users-toolbar .section-help-content p { font-size: 12px; }
.users-table th { padding: 8px 10px; font-size: 11px; }
.users-table td { padding: 8px 10px; font-size: 12px; }
.notification-panel, .hotel-suggestions, .task-section-menu button {
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(31, 58, 39, .15);
}
body.dark { --glass: rgba(37, 40, 34, .88); --glass-border: rgba(87, 97, 82, .6); --focus-ring: rgba(171, 210, 153, .32); }
body.dark { background: var(--bg); }
body.dark .flow-body, body.dark .payment-form-body, body.dark .task-detail-side { background: var(--surface-2); }
body.dark .search-box, body.dark .icon-button { background: rgba(49, 54, 45, .8); border-color: var(--line); }
body.dark .secondary-button { background: #3b4338; color: var(--ink); }
body.dark .requests-table-totals, body.dark .payment-table tfoot,
body.dark .users-table th { background: #30372d; }
body.dark .request-total-row > * { border-top-color: #4d6149; }
body.dark .task-view.active, body.dark .task-project.active { background: var(--nav-active); color: var(--ink); }
@media (prefers-reduced-transparency: reduce) {
  .sidebar, .topbar { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 1120px) {
  .catalog-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-payment-item { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-payment-item .purpose { grid-column: 1 / -1; }
  .registry-table { max-height: none; overflow: hidden; }
  .requests-table-totals { display: none; }
  .registry-table table, .registry-table tbody { display: block; width: 100%; }
  .registry-table thead { display: none; }
  .registry-table tbody { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 10px; padding: 10px; }
  .registry-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
  .registry-table tbody td { display: block; min-width: 0; border: 0; padding: 0; }
  .registry-table tbody td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 700; }
  .registry-table tbody td:nth-child(4) { grid-column: 1 / -1; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .payment-breakdown-row { grid-template-columns: minmax(110px, 150px) minmax(50px, 1fr) minmax(130px, auto); }
  .dashboard-grid > .panel { min-height: 0; }
  .topbar { padding: 0 20px; }
  .exchange-strip { padding-inline: 20px; }
  .content-wrap { padding: 25px 20px 40px; }
  .season-chip { display: none; }
  .document-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .payment-breakdown-row { grid-template-columns: minmax(0, 1fr) minmax(58px, 1fr); gap: 4px 10px; }
  .payment-breakdown-row small { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 1000px) {
  .registry-details, .finance-workspace { grid-template-columns: minmax(0, 1fr); }
  .registry-commandbar { flex-wrap: wrap; }
  .registry-commandbar .tab-pills { max-width: 100%; }
}
@media (max-width: 760px) {
  .welcome-row { flex-direction: column; align-items: stretch; }
  .weather { align-self: flex-start; }
  .catalog-filters, .catalog-form-grid, .catalog-hotel-list { grid-template-columns: 1fr; }
  .catalog-name-field { grid-column: auto; }
  .catalog-hotel:nth-child(odd) { border-right: 0; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-105%); transition: transform .25s ease; box-shadow: 15px 0 50px rgba(0,0,0,.25); }
  .sidebar.open { transform: translateX(0); }
  .main-content { grid-column: 1; }
  .mobile-menu { display: block; }
  .topbar { padding: 0 14px; gap: 8px; }
  .search-box { width: auto; flex: 1; }
  .search-box kbd, .top-actions .icon-button { display: none; }
  .primary-button { padding: 0 11px; }
  .top-actions .primary-button { font-size: 0; width: 38px; padding: 0; }
  .top-actions .primary-button span { font-size: 19px; margin: 0; }
  .content-wrap { padding: 20px 14px 38px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 135px; padding: 14px; }
  .metric-value { font-size: 18px; }
  .departure-row { grid-template-columns: 1.3fr 1fr .8fr; }
  .departure-row > span:nth-child(3) { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid label.wide { grid-column: auto; }
  .flow-steps { overflow-x: auto; grid-template-columns: repeat(6, minmax(90px, 1fr)); }
  .flow-steps button::after { display: none; }
  .application-flow .modal-head { padding: 20px 18px 14px; }
  .flow-steps { padding: 0 18px 16px; }
  .flow-body { min-height: 0; padding: 18px; }
  .modal-actions.flow-actions { padding: 14px 18px; }
  .cost-layout { grid-template-columns: 1fr; }
  .tourist-editor .tourist-entry { grid-template-columns: 30px 1fr; }
  .tourist-editor .tourist-entry input, .tourist-editor .tourist-entry select { grid-column: 2; }
  .tourist-editor .tourist-remove { grid-column: 2; justify-self: end; }
  .service-editor label { grid-template-columns: 20px 1fr; }
  .service-order-row { grid-template-columns: 1fr auto; }
  .service-order-row span { grid-column: 1; }
  .service-order-row em { grid-column: 2; grid-row: 1 / span 3; }
  .service-editor select, .service-editor i { grid-column: 2; }
  #serviceEditor > label[data-service-kind="transfer"]:not(.service-detail-field), #serviceEditor > label[data-service-kind="insurance"]:not(.service-detail-field) { grid-template-columns: 20px repeat(2, minmax(0, 1fr)); }
  #serviceEditor .service-price-pair { grid-template-columns: 1fr; }
  .hotel-service-row { grid-template-columns: 20px 1fr; }
  .hotel-manual-fields { grid-column: 2; }
  .hotel-manual-fields, .flight-fields { grid-template-columns: 1fr; }
  .final-summary { grid-template-columns: 1fr; }
  .section-title-row { align-items: start; }
  .mock-stats { flex-wrap: wrap; justify-content: center; }
  .registry-commandbar { align-items: stretch; flex-direction: column; }
  .registry-commandbar .tab-pills { max-width: 100%; }
  .registry-details { grid-template-columns: 1fr; }
  .registry-currency-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; }
  .registry-currency-row strong { grid-column: 1 / -1; }
  .client-layout, .profile-columns { grid-template-columns: 1fr; }
  .profile-hero { grid-template-columns: 46px 1fr; }
  .profile-hero-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .client-list-panel { display: block; }
  .profile-kpis { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .module-cards, .integration-grid { grid-template-columns: 1fr; }
  .finance-workspace { grid-template-columns: 1fr; }
  .payment-filters { display: none; }
  .payment-detail-grid { grid-template-columns: repeat(2, 1fr); }
  .campaign-banner { grid-template-columns: 1fr; }
  .campaign-banner > span { display: none; }
  .users-sidebar { display: none; }
  .users-main { padding: 18px 14px 32px; }
  .users-page-head, .users-toolbar { align-items: stretch; flex-direction: column; }
  .users-toolbar input { width: 100%; }
  .users-stats { grid-template-columns: repeat(2, 1fr); }
  .auth-card { padding: 24px 20px; border-radius: 20px; }
}
@media (max-width: 620px) {
  .user-access-modal .modal-head { padding: 20px 18px 16px; }
  .user-form-grid { padding: 18px 18px 10px; grid-template-columns: 1fr; gap: 15px; }
  .user-access-modal .auth-error { margin: 0 18px; }
  .user-access-modal .modal-actions { padding: 16px 18px 20px; }
}
@media (max-width: 450px) {
  .welcome-row { align-items: end; }
  .weather { padding: 6px 8px; }
  .weather-icon { font-size: 18px; }
  .metrics-grid { grid-template-columns: 1fr; }
  .request-toolbar { align-items: flex-start; gap: 10px; flex-direction: column; }
  .tab-pills { width: 100%; overflow-x: auto; }
  .destination-list > div { grid-template-columns: 26px minmax(100px, 1fr) 60px 18px; }
}

/* Shared CRM type scale: use the requests page as the reference. */
:root {
  --crm-page-title: 29px;
  --crm-section-title: 17px;
  --crm-body-text: 13px;
  --crm-caption-text: 12px;
}
body { font-size: var(--crm-body-text); }
.content-wrap .page h1, .users-page-head h1 { font-size: var(--crm-page-title); }
#page-overview .welcome-row h1 { font-size: var(--crm-page-title); }
.panel h2, .catalog-group header h2, .campaign-banner h2, .users-toolbar h2 { font-size: var(--crm-section-title); }
.catalog-hotel, .users-table td, .users-stats span, .task-view, .task-project { font-size: var(--crm-body-text); }
.users-table th, #page-finance .module-cards span, #page-finance .module-cards small { font-size: var(--crm-caption-text); }
.content-wrap .page > .section-title-row > button, .users-head-actions .primary-button, .users-head-actions .secondary-button { font-size: 12px; }
@media (min-width: 1080px) {
  #page-overview .welcome-row p:not(.eyebrow),
  #page-overview .metric-card p, #page-overview .panel-head p, #page-overview .text-button,
  #page-overview .funnel-bar, #page-overview .funnel-bar strong, #page-overview .funnel-step small,
  #page-overview .funnel-footer, #page-overview .funnel-footer b,
  #page-overview .attention-item strong, #page-overview .attention-item small, #page-overview .attention-item time,
  #page-overview .full-link, #page-overview .date-chip, #page-overview .departure-row,
  #page-overview .destination-list b, #page-overview .destination-list > div > strong { font-size: var(--crm-body-text); }
  #page-overview .metric-card small, #page-overview .departure-row.header,
  #page-overview .departure-row small, #page-overview .destination-list b small,
  #page-overview .trend, #page-overview .status-tag { font-size: var(--crm-caption-text); }
}

/* Complete the dark palette for surfaces with fixed light colours. */
body.dark { color-scheme: dark; }
body.dark .exchange-strip { background: #292d28; border-color: var(--line); color: var(--ink); }
body.dark .exchange-title { color: #d1dfa0; }
body.dark .season-chip, body.dark .view-mode-badge { background: #3b432d; border-color: #566043; color: #e0ecb1; }
body.dark .season-chip span { box-shadow: 0 0 0 4px #56633a; }
body.dark .section-help summary { background: #354238; border-color: #526653; color: #e0ebdf; }
body.dark .section-help summary:hover, body.dark .section-help[open] summary { background: #425747; border-color: #719174; color: #fff; }
body.dark .eyebrow { color: #aebfac !important; }
body.dark input::placeholder, body.dark textarea::placeholder { color: #aab7aa; }
body.dark .search-box kbd { color: #c2cbc0; }
body.dark .tab-pills, body.dark .view-controls { background: #30372f; border-color: #465147; }
body.dark .tab-pills button, body.dark .view-controls button { color: #b8c5b7; }
body.dark .tab-pills button.active, body.dark .view-controls button.active { background: #465448; color: #f4f8f1; }
body.dark .tab-pills b { color: #becbbd; }
body.dark .registry-hint { background: #443b27; border-color: #6f5c37; color: #f3dfac; }
body.dark .registry-table th { background: #303930; color: #d0ded0; }
body.dark .registry-table tbody tr:nth-child(even) { background: #2b302b; }
body.dark .registry-table tbody tr:hover, body.dark .payment-table tbody tr:hover, body.dark .request-payment-item:hover { background: #344136; }
body.dark .registry-table tbody tr.selected, body.dark .payment-table tbody tr.selected { background: #3d503e; }
body.dark .requests-table-totals, body.dark .payment-table tfoot { background: #343e32; color: var(--ink); }
body.dark .registry-statusbar { background: #2e372e; border-color: var(--line); }
body.dark .allocation-row { background: #343c34; color: #c2cec1; }
body.dark .client-list-item.active, body.dark .client-list-item:hover { background: #3a4b3a; color: var(--ink); }
body.dark .note-box { background: #413723; color: #f2ddad; }
body.dark .campaign-banner { background: #3a482f; color: #f1f5e6; }
body.dark .campaign-banner .eyebrow { color: #c9d7a9 !important; }
body.dark .campaign-banner h2 { color: #f4f7ed; }
body.dark .campaign-banner p { color: #c8d4bd; }
body.dark .campaign-banner > span { color: rgba(202, 221, 155, .3); }
body.dark .metric-card { color: var(--ink); }
body.dark .metric-card.coral { background: #40312d; }
body.dark .metric-card.purple { background: #373042; }
body.dark .metric-card.mint { background: #2c4037; }
body.dark .metric-card.yellow { background: #433c29; }
body.dark .metric-card p, body.dark .metric-card small { color: #c7d2c5; }
body.dark .metric-icon, body.dark .trend { background: rgba(255, 255, 255, .1); }
body.dark .trend.up, body.dark .module-cards .positive, body.dark .amount-profit,
body.dark .registry-table .registry-subline.amount-profit { color: #96d7ae; }
body.dark .trend.neutral { color: #f0d58d; }
body.dark .meter, body.dark .dest-bar { background: #465449; }
body.dark .funnel-bar.b1 { background: #604039; color: #ffdfd3; }
body.dark .funnel-bar.b2 { background: #51435e; color: #f0dfff; }
body.dark .funnel-bar.b3 { background: #355448; color: #d4f4e3; }
body.dark .funnel-bar.b4 { background: #665833; color: #fff0bf; }
body.dark .funnel-bar.b5 { background: #625636; color: #fff0bf; }
body.dark .funnel-bar.b6 { background: #58623a; color: #f0f5c2; }
body.dark .status-tag.ready, body.dark .confirm-chip { background: #315344; color: #c7efdc; }
body.dark .status-tag.docs, body.dark .confirm-chip.waiting { background: #58462a; color: #f4dcaa; }
body.dark .funnel-footer b { color: #d6e8a0; }
body.dark .full-link, body.dark .date-chip { color: #c3d0c3; }
body.dark .count-badge { background: #58352e; color: #ffc9b7; }
body.dark .loyalty-level { background: #58482b; color: #f7dda4; }
body.dark .order-status.paid, body.dark .tourist-name i { color: #9cddb5; }
body.dark .order-status.partial, body.dark .hotel-stars, body.dark .catalog-hotel b { color: #e7c57e; }
body.dark .order-status.overdue, body.dark .amount-debt { color: #f29d8d; }
body.dark .users-table th { background: #303930; color: #d0ded0; }
body.dark .user-edit, body.dark .user-form-grid :is(input, select) { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
body.dark .user-group { background: #424b32; color: #e1edb1; }
body.dark .user-person > i { background: #514238; color: #f5d4bf; }
body.dark .doc-card > span { background: #43374f; color: #e5d2f8; }
body.dark .integration-grid article > span { background: #3d4a32; color: #deedb5; }
body.dark .integration-grid button.connected { background: #2d493b; border-color: #456b56; color: #c1ead2; }
body.dark .flow-steps i, body.dark .flow-heading > span { background: #3b4933; color: #dcebb8; }
body.dark .flow-steps button.active i { background: var(--accent); color: #fff; box-shadow: 0 0 0 4px #634036; }
body.dark .source-tag, body.dark .kanban-title i { background: #394238; color: #d7e3d5; }
body.dark .placeholder-icon { background: #3e4b32; color: #e0edb9; }
body.dark .resort-weather { background: #303e31; border-color: #4b644e; color: #d2e7d2; }
body.dark .resort-weather a, body.dark .weather a { color: #b5d9ba; }
body.dark :is(.form-grid, .user-form-grid, .catalog-filters, .catalog-form-grid) label,
body.dark .payment-filters label { color: #c1cfc1; }
body.dark .auth-card { background: var(--surface); border-color: var(--line); }
body.dark .auth-brand .app-version { background: #394334; color: #e2f0dc !important; }
body.dark .password-login-form label { color: #d1dcd0; }
body.dark .auth-step { color: #c3cfc0; }
body.dark .auth-step i { background: #435136; color: #e2edbc; }

/* Shared Bitrix-style shell: compact navigation and a persistent action rail. */
.app-shell { grid-template-columns: 232px minmax(0, 1fr) 52px; }
.sidebar { transition: width .2s ease, padding .2s ease; }
.sidebar-collapse { position: absolute; top: 22px; right: 7px; z-index: 2; width: 25px; height: 25px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--nav-muted); font-size: 23px; line-height: 1; cursor: pointer; }
.sidebar-collapse:hover { background: var(--nav-hover); color: var(--nav-ink); }
.sidebar .nav-icon { width: 23px; flex: 0 0 23px; font-size: 20px; line-height: 1; }
.sidebar .nav-item { gap: 9px; }
.utility-rail { position: fixed; top: 76px; right: 0; bottom: 0; z-index: 18; width: 60px; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 7px; border-left: 1px solid var(--line); background: var(--surface); box-shadow: -4px 0 20px rgba(27, 58, 36, .04); }
.users-main + .utility-rail { top: 0; }
.utility-action { position: relative; width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 44px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); color: var(--nav-ink); font-size: 24px; line-height: 1; text-decoration: none; cursor: pointer; }
.utility-action svg { width: 23px; height: 23px; }
.utility-action:hover, .utility-action:focus-visible { background: var(--nav-active); color: var(--nav-active-ink); border-color: #a3c29f; }
.utility-action .utility-count { position: absolute; right: -4px; top: -5px; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 3px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10px; font-style: normal; font-weight: 800; }
.utility-action.notification i:not(.hidden) { width: 8px; height: 8px; top: 6px; right: 6px; }
.season-indicator { position: absolute; right: 5px; bottom: 5px; width: 7px; height: 7px; border-radius: 50%; background: #a8ba4b; box-shadow: 0 0 0 2px var(--surface-2); }
.utility-rail .notification-panel, .utility-rail .utility-popover { position: absolute; top: 17px; right: 67px; width: 286px; z-index: 35; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 15px 35px rgba(20, 31, 21, .18); }
.utility-rail .notification-panel { padding: 13px; }
.utility-rail .utility-popover { top: 73px; padding: 16px; font-size: 13px; }
.utility-popover p { margin: 7px 0 0; color: var(--muted); line-height: 1.5; }
.search-box { width: 42px; height: 42px; padding: 0; gap: 0; border-radius: 13px; overflow: hidden; transition: width .2s ease; }
.search-box .search-toggle { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border: 0; background: transparent; color: var(--nav-ink); font-size: 26px; cursor: pointer; }
.search-box input, .search-box kbd { display: none; }
.search-box.is-open { width: min(385px, 42vw); gap: 4px; padding-right: 8px; }
.search-box.is-open input { display: block; }
.search-box.is-open kbd { display: inline-block; }
.welcome-meta { display: flex; align-items: center; justify-content: flex-end; gap: 14px; min-width: 0; }
.welcome-meta .eyebrow { margin: 0 !important; white-space: nowrap; }
body.sidebar-collapsed .app-shell { grid-template-columns: 72px minmax(0, 1fr) 52px; }
body.sidebar-collapsed .sidebar { width: 72px; padding-inline: 10px; }
body.sidebar-collapsed .sidebar .brand { padding: 0 23px 14px 0; }
body.sidebar-collapsed .sidebar .brand-mark { width: 28px; height: 28px; flex-basis: 28px; }
body.sidebar-collapsed .sidebar .brand-info,
body.sidebar-collapsed .sidebar .nav-label,
body.sidebar-collapsed .sidebar .nav-item > span:nth-child(2),
body.sidebar-collapsed .sidebar .nav-item b,
body.sidebar-collapsed .sidebar .nav-item i,
body.sidebar-collapsed .sidebar .role-preview,
body.sidebar-collapsed .sidebar .profile-mini > div:nth-child(2),
body.sidebar-collapsed .sidebar .theme-toggle-label { display: none !important; }
body.sidebar-collapsed .sidebar .nav-item { justify-content: center; padding-inline: 0; }
body.sidebar-collapsed .sidebar .nav-icon { width: auto; flex-basis: auto; font-size: 22px; }
body.sidebar-collapsed .sidebar .profile-mini { display: flex; flex-direction: column; justify-content: center; gap: 3px; }
body.sidebar-collapsed .sidebar .profile-mini .auth-logout { min-height: 22px; }
body.sidebar-collapsed .sidebar .sidebar-theme-toggle { justify-content: center; padding: 0; }

/* Request opens above the list, with the existing edit flow one action away. */
.request-peek-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(20, 31, 23, .34); backdrop-filter: blur(2px); }
.request-peek { position: fixed; top: 0; right: 0; bottom: 0; z-index: 71; width: min(760px, calc(100vw - 40px)); display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: -22px 0 60px rgba(17, 29, 20, .2); animation: requestPeekIn .22s ease; }
.request-peek-open { overflow: hidden; }
@keyframes requestPeekIn { from { transform: translateX(24px); opacity: .7; } to { transform: translateX(0); opacity: 1; } }
.request-peek-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.request-peek-head .eyebrow { margin-bottom: 4px !important; font-size: 11px !important; }
.request-peek-head h2 { margin: 0; font-size: 22px; }
.request-peek-close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 24px; cursor: pointer; }
.request-peek-body { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 26px 28px; }
.request-peek-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.request-peek-summary h3 { margin: 0 0 6px; font-size: 20px; }
.request-peek-summary p { margin: 0; color: var(--muted); font-size: 13px; }
.request-peek-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 22px; }
.request-peek-grid > div { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.request-peek-grid small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.request-peek-grid strong { overflow-wrap: anywhere; font-size: 13px; }
.request-peek-section { margin: 22px 0 0; }
.request-peek-section h3 { margin: 0 0 10px; font-size: 15px; }
.request-peek-section p { margin: 0; color: var(--muted); font-size: 13px; }
.request-peek-list { display: grid; gap: 6px; }
.request-peek-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.request-peek-list small { color: var(--muted); text-align: right; white-space: pre-wrap; overflow-wrap: anywhere; }
.request-peek-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 26px; border-top: 1px solid var(--line); background: var(--surface); }
body.dark .utility-rail, body.dark .utility-rail :is(.notification-panel, .utility-popover), body.dark .request-peek { background: var(--surface); border-color: var(--line); }

@media (max-height: 680px) {
  .sidebar-collapse { top: 8px; }
  body.sidebar-collapsed .sidebar .brand { padding-bottom: 5px; }
}
@media (max-width: 760px) {
  .app-shell, body.sidebar-collapsed .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar, body.sidebar-collapsed .sidebar { width: 232px; padding-inline: 15px; }
  body.sidebar-collapsed .sidebar .brand-info, body.sidebar-collapsed .sidebar .role-preview:not(.hidden) { display: grid !important; }
  body.sidebar-collapsed .sidebar .nav-label, body.sidebar-collapsed .sidebar .nav-item > span:nth-child(2),
  body.sidebar-collapsed .sidebar .profile-mini > div:nth-child(2) { display: block !important; }
  body.sidebar-collapsed .sidebar .theme-toggle-label { display: inline !important; }
  body.sidebar-collapsed .sidebar .nav-item b:not(.hidden), body.sidebar-collapsed .sidebar .nav-item i:not(.hidden) { display: inline-block !important; }
  body.sidebar-collapsed .sidebar .brand { padding: 0 10px 16px; }
  body.sidebar-collapsed .sidebar .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
  body.sidebar-collapsed .sidebar .nav-item { justify-content: flex-start; padding-inline: 12px; }
  body.sidebar-collapsed .sidebar .profile-mini { display: grid; grid-template-columns: 34px 1fr auto; }
  body.sidebar-collapsed .sidebar .sidebar-theme-toggle { justify-content: flex-start; padding: 0 11px; }
  .sidebar-collapse { display: none; }
  .users-sidebar { display: flex; }
  .users-mobile-menu { display: block; margin-bottom: 8px; }
  .utility-rail, .users-main + .utility-rail { top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: 58px; flex-direction: row; justify-content: center; gap: 18px; padding: 6px 10px; border-left: 0; border-top: 1px solid var(--line); }
  .utility-action { width: 42px; height: 42px; flex-basis: 42px; }
  .utility-rail .notification-panel, .utility-rail .utility-popover { top: auto; right: 12px; bottom: 65px; }
  .main-content { padding-bottom: 58px; }
  .search-box.is-open { width: min(385px, calc(100vw - 110px)); }
  .welcome-meta { justify-content: flex-start; flex-wrap: wrap; }
  .request-peek { width: 100vw; }
  .request-peek-head, .request-peek-body, .request-peek-actions { padding-inline: 18px; }
  .request-peek-grid { grid-template-columns: 1fr 1fr; }
}

/* Keep search and rates in the same flex row so opening search moves the rates. */
.topbar { justify-content: flex-start; gap: 10px; }
.topbar .exchange-strip { flex: 0 0 auto; min-width: 0; min-height: 36px; margin-right: auto; padding: 0; border: 0; background: transparent; }
.topbar .exchange-rates-group { flex-wrap: nowrap; gap: 8px; max-width: 100%; min-height: 36px; padding: 4px 9px; }
.topbar .exchange-rates-group > * { flex: 0 0 auto; }
.topbar .search-box { flex: 0 0 36px; width: 36px; height: 36px; min-height: 36px; border-radius: 11px; }
.topbar .search-box .search-toggle { width: 34px; height: 34px; flex-basis: 34px; font-size: 23px; }
.topbar .search-box.is-open { flex: 0 1 min(385px, 42vw); min-width: 0; box-shadow: 0 12px 28px rgba(30, 50, 34, .13); }
.topbar .search-box .search-toggle svg { width: 17px; height: 17px; }
.topbar .search-box .search-close { display: none; width: 30px; height: 30px; flex: 0 0 30px; padding: 0; border: 0; background: transparent; color: #c5cfcb; font-size: 23px; line-height: 1; cursor: pointer; }
.topbar .search-box .search-close:hover, .topbar .search-box .search-close:focus-visible { color: #fff; }
.topbar .search-box.is-open .search-toggle { display: none; }
.topbar .search-box.is-open .search-close { display: grid; place-items: center; }
.topbar .search-box.is-open input { padding-left: 12px; }
.topbar .search-box input::-webkit-search-cancel-button { display: none; }
.topbar .top-actions { margin-left: auto; }
/* A single graphite command strip and circular shortcuts, shared by all CRM pages. */
.topbar, body:has(#page-overview.active) .topbar, body.dark .topbar { height: 62px; min-height: 62px; background: #292e2f; border-bottom-color: #424a49; }
.topbar .search-box, body.dark .topbar .search-box { background: #394142; border-color: #596260; color: #f5f7f2; }
.topbar .search-box .search-toggle, .topbar .mobile-menu { color: #f5f7f2; }
.topbar .search-box input, body.dark .topbar .search-box input { color: #f5f7f2; }
.topbar .search-box input::placeholder { color: #b8c4bf; }
.topbar .search-box kbd, body.dark .topbar .search-box kbd { background: #303738; border-color: #596260; color: #cdd8d1; }
.topbar .exchange-rates-group { background: #394142; border-color: #596260; color: #f5f7f2; }
.topbar .exchange-title { color: #d7e38c; }
.topbar .exchange-strip small { color: #b8c4bf; }
.topbar .top-actions { gap: 10px; }
.topbar-profile { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border: 1px solid #596260; border-radius: 999px; background: #394142; text-decoration: none; }
.topbar-profile:hover, .topbar-profile:focus-visible { border-color: #c5d99b; background: #47534d; }
.topbar-profile-avatar { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #bddbca; color: #26342c; font-size: 11px; font-weight: 800; }
.utility-rail, .users-main + .utility-rail, body.dark .utility-rail { background: #292e2f; border-left-color: #424a49; box-shadow: -4px 0 20px rgba(19, 27, 26, .12); }
.utility-action, .utility-action:link, .utility-action:visited { border-radius: 50%; background: #3d4646; border-color: #596260; color: #f5f7f2; }
.utility-action:hover, .utility-action:focus-visible { background: #53635d; border-color: #a8c7ad; color: #fff; }
.utility-action.season-action { background: #4a543c; border-color: #657246; color: #e5edae; }
.utility-action .season-indicator { box-shadow: 0 0 0 2px #4a543c; }
.utility-divider { width: 30px; height: 1px; flex: 0 0 1px; margin: 4px 0; background: #596260; }
.utility-action.utility-shortcut { font-size: 17px; font-weight: 700; }
.utility-shortcut.requests { background: #345c68; border-color: #4a7886; }
.utility-shortcut.clients { background: #594a72; border-color: #746493; }
.utility-shortcut.finance { background: #42633b; border-color: #628354; }
/* Text-only brand with a hamburger control in the sidebar header. */
.sidebar, body.dark .sidebar { --nav-ink: #f2f6f2; --nav-muted: #b9c6bf; --nav-active: #495a56; --nav-active-ink: #fff; --nav-hover: #3a4644; --nav-label: #a6b5ac; --line: #46514e; --ink: #f2f6f2; background: #292e2f; border-right-color: #424a49; }
.sidebar .brand { gap: 9px; min-height: 54px; padding: 0 0 14px; border-bottom: 1px solid #424a49; margin-bottom: 9px; }
.sidebar .brand-home { flex: 1; width: auto; min-width: 0; }
.sidebar .brand-home:hover strong { color: #d6e69d; }
.sidebar .brand .app-version { color: #cadbbb !important; background: #3b4b42; border-color: #566e58; }
.sidebar .sidebar-theme-toggle, .sidebar .role-preview select { background: #394142; border-color: #515c59; color: #dbe5dc; }
.sidebar .theme-toggle-icon { background: #303839; border-color: #596260; color: #f2f6f2; }
.sidebar .avatar { border-color: #394142; }
.sidebar .auth-profile-link:hover strong { color: #d6e69d; }
.sidebar .sidebar-collapse { position: static; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; background: #394142; border-color: #515c59; color: #f3f7f2; font-size: 19px; }
.sidebar .sidebar-collapse:hover, .sidebar .sidebar-collapse:focus-visible { background: #4b5a55; color: #fff; border-color: #91ae97; }
body.sidebar-collapsed .sidebar .brand { justify-content: center; padding: 0 0 14px; }
body.sidebar-collapsed .sidebar .brand-home { display: none; }
body.sidebar-collapsed .sidebar .sidebar-collapse { display: grid; }
/* Match the top rule across expanded/collapsed navigation, content and shortcuts. */
.sidebar, body.dark .sidebar { padding-top: 0; }
.sidebar .brand, body.sidebar-collapsed .sidebar .brand { height: var(--shell-header-height, 62px); min-height: var(--shell-header-height, 62px); flex: 0 0 var(--shell-header-height, 62px); margin: 0 0 8px; padding: 0; border-bottom: 1px solid #424a49; }
.utility-rail, .users-main + .utility-rail { top: 0; width: 52px; gap: 9px; padding: calc(var(--shell-header-height, 62px) + 8px) 6px 12px; }
.utility-rail::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: var(--shell-header-height, 62px); border-bottom: 1px solid #424a49; pointer-events: none; }
/* The command strip spans the shortcut rail, with the profile centered over it. */
.topbar { width: calc(100% + 52px); padding-right: 8px; z-index: 19; }
.users-main { width: 100%; max-width: none; padding: 0; }
.users-content { width: 100%; max-width: 1520px; margin: 0 auto; padding: 30px 76px 56px 32px; }
.users-main .topbar .exchange-strip { min-height: 36px; margin: 0 auto 0 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.users-topbar .topbar-profile { margin-left: auto; }
.utility-action, .utility-action:link, .utility-action:visited { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; font-size: 21px; }
.utility-action svg { width: 19px; height: 19px; }
.utility-rail .notification-panel { top: calc(var(--shell-header-height, 62px) + 8px); right: 59px; }
.utility-rail .utility-popover { top: calc(var(--shell-header-height, 62px) + 53px); right: 59px; }
@media (max-width: 1250px) and (min-width: 761px) {
  .topbar, body:has(#page-overview.active) .topbar { height: auto; min-height: 62px; flex-wrap: wrap; padding-block: 7px; }
  .topbar .exchange-strip { order: 3; flex-basis: 100%; }
  .topbar .exchange-rates-group { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .topbar { width: 100%; padding-right: 14px; }
  .topbar, body:has(#page-overview.active) .topbar { height: auto; min-height: 58px; flex-wrap: wrap; padding-block: 6px; }
  .topbar .exchange-strip { order: 3; flex-basis: 100%; width: 100%; }
  .topbar .exchange-rates-group { flex-wrap: wrap; gap: 4px 8px; }
  .topbar .search-box.is-open { flex: 1 1 0; width: auto; }
  .utility-rail, .users-main + .utility-rail { top: auto; width: 100%; height: 50px; padding: 6px 10px; gap: 16px; }
  .utility-rail .notification-panel, .utility-rail .utility-popover { top: auto; }
  .utility-rail .notification-panel, .utility-rail .utility-popover { bottom: 57px; }
  .utility-divider, .utility-shortcut { display: none !important; }
  .main-content { padding-bottom: 50px; }
  .sidebar .sidebar-collapse, body.sidebar-collapsed .sidebar .sidebar-collapse { display: none; }
  .sidebar .brand-home, body.sidebar-collapsed .sidebar .brand-home { display: flex; }
  .sidebar .brand, body.sidebar-collapsed .sidebar .brand { height: 58px; min-height: 58px; flex-basis: 58px; padding: 0 10px; }
  .users-content { padding: 18px 14px 32px; }
  .users-topbar .users-mobile-menu { margin-bottom: 0; }
  .utility-rail::before { display: none; }
}

/* Floating shortcuts share the page backdrop instead of a separate rail. */
.app-shell { grid-template-columns: 232px minmax(0, 1fr); }
body.sidebar-collapsed .app-shell { grid-template-columns: 72px minmax(0, 1fr); }
.topbar { width: 100%; }
.utility-rail, .users-main + .utility-rail, body.dark .utility-rail { background: transparent; border: 0; box-shadow: none; }
.utility-rail::before { display: none; }
.utility-action:not(:hover):not(:focus-visible) { opacity: .72; }
.utility-action:hover, .utility-action:focus-visible { opacity: 1; }
.content-wrap { padding-right: 76px; }
.users-content { padding-right: 76px; }

.company-details-form { max-width: 960px; padding: 22px; }
.company-details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.company-details-grid label { display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 700; }
.company-details-grid input { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 500; }
.company-details-grid input:focus { outline: 2px solid #95b99b; outline-offset: 1px; }
.company-details-grid input:disabled { opacity: .7; }
.company-details-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.company-details-actions p { margin: 0; color: var(--muted); font-size: 12px; }
@media (max-width: 760px) {
  .app-shell, body.sidebar-collapsed .app-shell { grid-template-columns: minmax(0, 1fr); }
  .utility-rail, .users-main + .utility-rail, body.dark .utility-rail { background: #292e2f; border-top: 1px solid #424a49; }
  .content-wrap, .users-content { padding-right: 14px; }
  .company-details-grid { grid-template-columns: 1fr; }
  .company-details-form { padding: 16px; }
  .company-details-actions { align-items: stretch; flex-direction: column; }
}

/* Compact request wizard, shared by all six steps. */
.modal.application-flow { width: min(1240px, calc(100vw - 24px)); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); }
.application-flow .modal-head { padding: 16px 22px 10px; }
.application-flow .modal-head h2 { font-size: 21px; }
.application-flow .flow-caption { margin-top: 3px; font-size: 11px; }
.application-flow .flow-steps { padding: 0 22px 11px; }
.application-flow .flow-steps button { font-size: 11px; gap: 6px; }
.application-flow .flow-steps i { width: 24px; height: 24px; flex-basis: 24px; }
.application-flow .flow-body { padding: 14px 22px; }
.application-flow .flow-heading { gap: 9px; margin-bottom: 11px; }
.application-flow .flow-heading > span { width: 34px; height: 34px; font-size: 15px; }
.application-flow .flow-heading h3 { font-size: 15px; }
.application-flow .flow-heading p { font-size: 11px; }
.application-flow .form-grid { gap: 9px 12px; }
.application-flow .form-grid label { gap: 4px; font-size: 11px; font-weight: 600; }
.application-flow .form-grid :is(input, select, textarea) { min-height: 36px; padding: 7px 9px; font-size: 12px; font-weight: 400; }
.application-flow .form-grid textarea { min-height: 58px; }
.application-flow .tourist-editor { gap: 5px; margin-top: 10px; }
.application-flow .tourist-editor .tourist-entry { gap: 6px; margin-bottom: 4px; }
.application-flow .tourist-editor :is(input, select) { padding: 7px; font-size: 11px; }
.application-flow .service-order-row { padding: 10px 12px; }
.application-flow .modal-actions.flow-actions { min-height: 54px; padding: 9px 22px; }
@media (max-width: 760px) {
  .modal.application-flow { width: calc(100vw - 12px); height: calc(100dvh - 12px); max-height: calc(100dvh - 12px); }
  .application-flow .modal-head { padding: 12px 14px 8px; }
  .application-flow .flow-steps { padding: 0 14px 9px; }
  .application-flow .flow-body { padding: 12px 14px; }
  .application-flow .modal-actions.flow-actions { padding: 8px 14px; }
}

/* Payment editor: compact typography and spacing without changing the form fields. */
.payment-modal { width: min(680px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.payment-modal .modal-head { flex: 0 0 auto; margin: 0; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.payment-modal .modal-head .eyebrow { margin: 0 0 3px !important; font-size: 10px !important; font-weight: 600; letter-spacing: .1em; }
.payment-modal .modal-head h2 { font-size: 19px; font-weight: 600; }
.payment-modal .flow-caption { margin-top: 3px; font-size: 11px; }
.payment-modal .modal-head .close-payment { width: 30px; height: 30px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--ink); font-size: 18px; cursor: pointer; }
.payment-modal .payment-form-body { flex: 1 1 auto; min-height: 0; max-height: none; padding: 12px 18px; overflow-y: auto; }
.payment-modal .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.payment-modal .form-grid label { min-width: 0; gap: 4px; font-size: 11px; font-weight: 400; }
.payment-modal .form-grid :is(input, select, textarea) { min-width: 0; min-height: 34px; padding: 6px 9px; font-size: 12px; font-weight: 400; }
.payment-modal .form-grid textarea { min-height: 54px; }
.payment-modal .form-grid .checkbox-line { min-height: 34px; padding: 6px 9px; gap: 7px; }
.payment-modal .form-grid input[type="checkbox"] { min-height: 0; }
.payment-modal .payment-form-summary { gap: 7px; margin-top: 10px; }
.payment-modal .payment-form-summary div { padding: 8px 10px; }
.payment-modal .payment-form-summary span { font-size: 11px; }
.payment-modal .payment-form-summary b { margin-top: 3px; font-size: 12px; font-weight: 600; }
.payment-modal .modal-actions { flex: 0 0 auto; margin: 0; padding: 10px 18px; border-top: 1px solid var(--line); }
.payment-modal .modal-actions button { min-height: 36px; padding: 0 12px; font-size: 12px; font-weight: 600; }
@media (max-width: 560px) {
  .payment-modal .form-grid { grid-template-columns: 1fr; }
  .payment-modal .form-grid label.wide { grid-column: auto; }
  .payment-modal .payment-form-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Payment history uses the same compact reading scale as the request register. */
#page-finance .finance-title { margin-bottom: 14px; }
#page-finance .finance-title h1 { font-size: 25px; }
#page-finance .finance-title-actions button { min-height: 36px; padding-inline: 12px; font-size: 11px; }
#page-finance .module-cards { gap: 8px; margin-bottom: 9px; }
#page-finance .module-cards article { min-height: 58px; padding: 8px 12px; }
#page-finance .module-cards b { font-size: 13px; font-weight: 600; }
#page-finance .module-cards b span + span { margin-top: 2px; }
#page-finance .finance-tabs { margin-bottom: 9px; }
#page-finance .finance-tabs button { padding: 7px 10px; font-size: 11px; font-weight: 500; }
#page-finance .finance-tabs b { font-size: 11px; font-weight: 500; }
#page-finance .finance-workspace { gap: 10px; }
#page-finance .payment-filters { padding: 11px; }
#page-finance .payment-filters .detail-head { margin-bottom: 9px; }
#page-finance .payment-filters .detail-head h2 { font-size: 14px; font-weight: 600; }
#page-finance .payment-filters .detail-head p { font-size: 11px; }
#page-finance .payment-filters label { gap: 4px; margin-bottom: 8px; font-size: 11px; font-weight: 500; }
#page-finance .payment-filters :is(input, select) { min-height: 34px; padding: 6px 8px; font-size: 11px; font-weight: 400; }
#page-finance .payment-filters .primary-button { min-height: 36px; font-size: 11px; font-weight: 600; }
#page-finance .payment-table :is(th, td) { padding: 6px 8px; font-size: 11px; letter-spacing: 0; }
#page-finance .payment-table th { font-weight: 600; }
#page-finance .payment-table td { font-weight: 400; }
#page-finance .payment-table td strong, #page-finance .payment-order-link,
#page-finance .payment-direction { font-size: 11px; font-weight: 600; }
#page-finance .payment-table tfoot { font-weight: 600; }
#page-finance .payment-detail { padding: 11px 12px; }
#page-finance .payment-detail .detail-head h2 { font-size: 14px; font-weight: 600; }
#page-finance .payment-detail .detail-head p { font-size: 11px; }
#page-finance .payment-detail .mini-action { min-height: 30px; padding: 5px 8px; font-size: 11px; font-weight: 500; }
#page-finance .payment-detail-grid { gap: 6px; margin: 9px 0; }
#page-finance .payment-detail-grid div { padding: 7px 8px; }
#page-finance .payment-detail-grid small { margin-bottom: 3px; font-size: 11px; }
#page-finance .payment-detail-grid b { font-size: 11px; font-weight: 600; }
#page-finance .payment-allocation h3 { margin: 9px 0 5px; font-size: 11px; font-weight: 600; }
#page-finance .allocation-row { gap: 5px; padding: 6px; font-size: 11px; font-weight: 500; }
#page-finance .allocation-row.values { font-size: 11px; font-weight: 500; }

/* Client and partner editors share one compact, balanced form layout. */
#clientModal, #partnerModal { padding: 12px; }
.directory-modal { width: min(680px, 100%); max-height: calc(100dvh - 24px); padding: 0; display: flex; flex-direction: column; overflow: hidden; font-style: normal; }
.directory-modal .modal-head { flex: 0 0 auto; min-width: 0; margin: 0; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.directory-modal .modal-head h2 { min-width: 0; font-size: 19px; font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; }
.directory-modal .modal-head :is(.close-client, .close-partner) { flex: 0 0 auto; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--ink); font-size: 18px; cursor: pointer; }
.directory-form-body { flex: 1 1 auto; min-height: 0; padding: 14px 18px; overflow-y: auto; overscroll-behavior: contain; }
.directory-modal .form-grid, .directory-modal.client-modal .form-grid, .directory-modal.partner-modal .partner-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; margin-top: 0; }
.directory-modal .form-grid label { min-width: 0; gap: 4px; color: var(--ink); font-size: 11px; font-weight: 400; line-height: 1.3; }
.directory-modal .form-grid :is(input, select, textarea) { min-width: 0; min-height: 36px; padding: 7px 10px; font-size: 12px; font-weight: 400; font-style: normal; line-height: 1.35; }
.directory-modal .form-grid :is(input, textarea)::placeholder { font-weight: 400; font-style: normal; }
.directory-modal .form-grid textarea { min-height: 62px; resize: vertical; }
.directory-modal .client-document-fields { margin-top: 12px; padding-top: 10px; }
.directory-modal .client-document-fields summary { min-height: 26px; font-size: 12px; font-weight: 600; }
.directory-modal .client-document-fields[open] > .form-grid { margin-top: 9px; }
.directory-modal .auth-error { min-height: 0; margin: 8px 0 0; font-size: 11px; font-weight: 400; }
.directory-modal .auth-error:empty { display: none; }
.directory-modal .modal-actions { flex: 0 0 auto; margin: 0; padding: 10px 18px; border-top: 1px solid var(--line); }
.directory-modal .modal-actions button { min-height: 36px; padding: 0 12px; font-size: 12px; font-weight: 600; }
@media (max-width: 560px) {
  #clientModal, #partnerModal { padding: 8px; }
  .directory-modal { width: 100%; max-height: calc(100dvh - 16px); }
  .directory-modal .modal-head { padding: 12px 14px 10px; }
  .directory-form-body { padding: 12px 14px; }
  .directory-modal .form-grid, .directory-modal.client-modal .form-grid, .directory-modal.partner-modal .partner-form-grid { grid-template-columns: minmax(0, 1fr); }
  .directory-modal .form-grid label.wide { grid-column: auto; }
  .directory-modal .modal-actions { padding: 9px 14px; }
}

/* Unified sidebar icons and a restrained page transition. */
.sidebar .brand .app-version { min-height: 15px; padding: 1px 5px; font-size: 8px !important; line-height: 1.2; }
.sidebar .nav-icon { width: 25px; height: 25px; flex: 0 0 25px; display: grid; place-items: center; border-radius: 8px; background: transparent; transition: color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.sidebar .nav-icon svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar .nav-item:hover .nav-icon, .sidebar .nav-item:focus-visible .nav-icon { color: #d9edb2; background: rgba(201, 230, 160, .12); transform: translateY(-1px) scale(1.06); }
.sidebar .nav-item.active .nav-icon { color: #e3f6bd; background: rgba(205, 239, 164, .17); box-shadow: 0 0 0 1px rgba(205, 239, 164, .12) inset; animation: nav-icon-enter .28s ease-out; }
.sidebar .nav-item:focus-visible { outline: 2px solid #bddd94; outline-offset: 2px; }
body.sidebar-collapsed .sidebar .nav-icon { width: 25px; flex: 0 0 25px; }
.page.active { animation: page-enter .24s cubic-bezier(.2, .75, .3, 1); }
.users-content { animation: page-enter .24s cubic-bezier(.2, .75, .3, 1); }
@keyframes nav-icon-enter { from { transform: scale(.82); opacity: .55; } to { transform: scale(1); opacity: 1; } }
@keyframes page-enter { from { opacity: .55; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .sidebar .nav-icon { transition: none; }
  .sidebar .nav-item.active .nav-icon, .page.active, .users-content { animation: none; }
}

/* Company directory and its persistent editor. */
.company-list-panel { width: 100%; padding: 6px 18px 12px; }
.company-list { display: grid; }
.company-list-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(180px, 1fr) 178px 98px; align-items: center; gap: 12px; min-height: 64px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.company-list-row > .mini-action { justify-self: end; }
.company-list-main, .company-list-meta { display: grid; gap: 3px; min-width: 0; }
.company-list-main strong { color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.company-list-main span, .company-list-meta span { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.company-default-badge { color: #466a4c; background: #e9f3e8; border-radius: 999px; padding: 6px 10px; font-size: 11px; white-space: nowrap; }
body.dark .company-default-badge { color: #d4eacb; background: #354a38; }
.company-empty { margin: 24px 4px; color: var(--muted); font-size: 13px; }
#companyListMessage { margin: 10px 4px 0; color: var(--muted); font-size: 11px; }
.company-details-modal { width: min(780px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.company-details-modal .modal-head { flex: 0 0 auto; margin: 0; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.company-details-modal .modal-head h2 { font-size: 19px; }
.company-details-close { flex: 0 0 auto; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--ink); cursor: pointer; }
.company-details-form-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px; }
.company-details-modal .company-details-grid { gap: 12px 16px; }
.company-details-modal .company-details-grid label { gap: 5px; font-size: 11px; font-weight: 500; }
.company-details-modal .company-details-grid input { min-height: 36px; padding: 7px 10px; font-size: 12px; font-weight: 400; }
.company-details-modal .company-details-actions { flex: 0 0 auto; margin: 0; padding: 12px 20px; }
.company-details-buttons { display: flex; justify-content: flex-end; gap: 8px; }
.contract-company-select { max-width: 190px; min-height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; background: var(--surface-2); color: var(--ink); font-size: 11px; }
@media (max-width: 760px) {
  .company-list-row { grid-template-columns: minmax(0, 1fr) auto; }
  .company-list-meta { grid-column: 1 / -1; grid-row: 2; }
  .company-list-row .mini-action, .company-default-badge { grid-row: 3; }
  .company-details-form-body { padding: 14px; }
  .company-details-modal .company-details-actions { padding: 10px 14px; }
}
.wazzup-connect{display:grid;grid-template-columns:minmax(220px,1fr) minmax(320px,2fr);gap:24px;align-items:end;margin-top:18px;padding:20px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}
.wazzup-connect h2{margin:0 0 6px;font-size:17px}.wazzup-connect p{margin:0 0 8px;font-size:13px}.wazzup-connect small{font-size:12px}.wazzup-connect-fields{display:grid;grid-template-columns:minmax(160px,1fr) minmax(180px,1fr) auto;gap:10px;align-items:end}.wazzup-connect-fields label{display:grid;gap:5px;font-size:12px}.wazzup-connect-fields input{width:100%;min-width:0;box-sizing:border-box;height:40px}.wazzup-connect-fields button{height:40px;white-space:nowrap}@media(max-width:960px){.wazzup-connect,.wazzup-connect-fields{grid-template-columns:1fr}}
.wazzup-connect-fields .wazzup-replace{grid-column:1/-1;display:flex;align-items:center;gap:8px}.wazzup-connect-fields .wazzup-replace input{width:16px;height:16px}
