:root {
  --bg: #f4f5f0;
  --surface: #ffffff;
  --surface-soft: #f8f9f5;
  --ink: #18221c;
  --muted: #6c7971;
  --line: #e1e6e1;
  --sidebar: #111713;
  --sidebar-soft: #1a231d;
  --lime: #c9f36b;
  --lime-deep: #91c734;
  --orange: #ff8a55;
  --red: #e75a5a;
  --blue: #5d8de7;
  --yellow: #f0c75e;
  --green: #3ca376;
  --radius: 18px;
  --shadow: 0 18px 55px rgba(21, 33, 25, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--bg); font-family: "Manrope", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; z-index: 30; top: 0; height: 100vh; padding: 25px 18px 20px; display: flex; flex-direction: column; color: #e7eee9; background: var(--sidebar); overflow-y: auto; }
.brand { padding: 0 10px 26px; display: flex; align-items: center; gap: 10px; font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 16px; letter-spacing: -.06em; }
.brand > span:last-child > span { color: var(--lime); }
.brand-mark { position: relative; width: 34px; height: 29px; display: block; }
.brand-mark i { position: absolute; display: block; background: var(--lime); }
.brand-mark i:first-child { width: 29px; height: 12px; top: 3px; left: 1px; border-radius: 4px 9px 3px 3px; transform: skewX(-16deg); }
.brand-mark i:last-child { width: 24px; height: 10px; bottom: 3px; left: 5px; border: 3px solid var(--lime); border-top: 0; background: transparent; border-radius: 0 0 5px 5px; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; z-index: 2; bottom: 0; width: 7px; height: 7px; border: 2px solid var(--sidebar); background: var(--lime); border-radius: 50%; }
.brand-mark::before { left: 6px; }.brand-mark::after { right: 4px; }

.workshop-switcher { padding: 10px; display: grid; grid-template-columns: 35px 1fr 20px; gap: 10px; align-items: center; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; background: rgba(255,255,255,.035); }
.workshop-avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; background: var(--lime); color: var(--sidebar); font-size: 11px; font-weight: 800; }
.workshop-switcher > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.workshop-switcher b { font-size: 11px; }.workshop-switcher small { color: #809087; font-size: 9px; }
.workshop-switcher button { border: 0; background: transparent; color: #75857b; cursor: pointer; }

.main-nav { margin-top: 28px; display: grid; gap: 5px; }
.nav-caption { padding: 0 11px 8px; color: #65746b; text-transform: uppercase; font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.main-nav a { position: relative; padding: 11px 12px; display: flex; align-items: center; gap: 11px; border-radius: 10px; color: #93a198; font-size: 12px; font-weight: 600; transition: background .2s, color .2s; }
.main-nav a:hover { color: white; background: rgba(255,255,255,.04); }
.main-nav a.active { color: var(--sidebar); background: var(--lime); font-weight: 800; }
.main-nav a svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.main-nav a i { min-width: 20px; height: 20px; margin-left: auto; padding: 0 6px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.09); color: white; font-size: 8px; font-style: normal; }
.main-nav a.active i { background: var(--sidebar); color: var(--lime); }

.sidebar-card { position: relative; margin-top: auto; padding: 17px; overflow: hidden; border: 1px solid rgba(201,243,107,.17); border-radius: 15px; background: linear-gradient(145deg, #1e2c22, #172019); }
.sidebar-card::after { content: ""; position: absolute; width: 100px; height: 100px; right: -45px; top: -48px; border-radius: 50%; background: rgba(201,243,107,.08); }
.sidebar-card > svg { width: 20px; color: var(--lime); fill: none; stroke: currentColor; stroke-width: 1.7; }
.sidebar-card b { margin-top: 11px; display: block; font-size: 11px; }
.sidebar-card p { margin: 7px 0 12px; color: #8d9c92; font-size: 9px; line-height: 1.5; }
.soon-chip { padding: 5px 7px; border-radius: 6px; background: rgba(201,243,107,.1); color: var(--lime); font-size: 8px; font-weight: 800; }
.sidebar-card-button { position: relative; z-index: 2; border: 0; cursor: pointer; }
.sidebar-footer { padding: 18px 8px 0; display: flex; align-items: center; gap: 9px; color: #809087; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(201,243,107,.08); }
.sidebar-footer > span:last-child { display: flex; flex-direction: column; }.sidebar-footer b { color: #a7b3ab; font-size: 9px; }.sidebar-footer small { font-size: 8px; }

.main-area { min-width: 0; }
.topbar { position: sticky; z-index: 20; top: 0; min-height: 84px; padding: 18px 30px; display: flex; align-items: center; gap: 20px; background: rgba(244,245,240,.9); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(24,34,28,.06); }
.page-heading { min-width: 230px; }.page-heading h1 { margin: 0; font-size: 19px; letter-spacing: -.04em; }.page-heading p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.topbar-actions { min-width: 0; margin-left: auto; display: flex; align-items: center; gap: 9px; }
.global-search { position: relative; width: min(310px, 28vw); height: 42px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.global-search > svg { width: 16px; margin-left: 13px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.global-search input { min-width: 0; width: 100%; height: 100%; padding: 0 8px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.global-search kbd { margin-right: 9px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; color: #89958e; background: var(--surface-soft); font-family: inherit; font-size: 8px; white-space: nowrap; }
.global-search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.search-result { width: 100%; padding: 10px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.search-result:hover { background: var(--surface-soft); }.search-result span { display: flex; flex-direction: column; }.search-result b { font-size: 10px; }.search-result small { color: var(--muted); font-size: 8px; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer; }
.icon-button svg { width: 17px; fill: none; stroke: var(--ink); stroke-width: 1.7; }.notifications { position: relative; }.notifications i { position: absolute; right: 9px; top: 8px; width: 6px; height: 6px; border: 2px solid white; border-radius: 50%; background: var(--orange); }
.primary-button { height: 42px; padding: 0 15px; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 11px; background: var(--sidebar); color: white; cursor: pointer; font-size: 10px; font-weight: 800; box-shadow: 0 8px 20px rgba(17,23,19,.15); }
.primary-button span { color: var(--lime); font-size: 18px; font-weight: 500; }
.mobile-menu { display: none; }

.view-root { padding: 26px 30px 70px; }
.page-loader { min-height: 65vh; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; }
.page-loader span { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--lime-deep); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-screen { min-height: calc(100vh - 180px); display: grid; place-items: center; }.login-card { width: min(390px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 23px; background: white; box-shadow: var(--shadow); }.login-brand { display: flex; align-items: center; gap: 9px; font-family: "Unbounded", sans-serif; font-size: 15px; }.login-brand .brand-mark { transform: scale(.85); transform-origin: left center; }.login-brand b { letter-spacing: -.06em; }.login-brand em { color: var(--lime-deep); font-style: normal; }.login-icon { width: 44px; height: 44px; margin-top: 35px; display: grid; place-items: center; border-radius: 13px; background: var(--sidebar); color: var(--lime); }.login-icon svg { width: 20px; fill: none; stroke: currentColor; }.login-card h2 { margin: 18px 0 7px; font-size: 22px; letter-spacing: -.04em; }.login-card > p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }.login-card form { margin-top: 22px; display: grid; gap: 8px; }.login-card form label { color: var(--muted); font-size: 8px; font-weight: 700; }.login-card form input { height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: var(--surface-soft); font-size: 10px; }.login-card form input:focus { border-color: var(--lime-deep); box-shadow: 0 0 0 3px rgba(145,199,52,.1); }.login-card form button { height: 44px; margin-top: 4px; border: 0; border-radius: 10px; background: var(--sidebar); color: white; cursor: pointer; font-size: 9px; font-weight: 800; }.login-card > small { margin-top: 17px; display: block; color: var(--muted); text-align: center; font-size: 7px; }

.section-topline { margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-topline h2 { margin: 0; font-size: 15px; letter-spacing: -.03em; }.section-topline p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.section-actions { display: flex; align-items: center; gap: 8px; }
.ghost-button, .small-button { padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; font-size: 9px; font-weight: 700; }
.small-button.dark { border-color: var(--sidebar); background: var(--sidebar); color: white; }.small-button.dark span { color: var(--lime); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.stat-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat-head { display: flex; align-items: center; justify-content: space-between; }.stat-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-soft); color: var(--green); }.stat-icon.orange { color: var(--orange); background: #fff2eb; }.stat-icon.blue { color: var(--blue); background: #eef3ff; }.stat-icon.yellow { color: #b58417; background: #fff8df; }
.stat-icon svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }.stat-trend { color: var(--green); font-size: 8px; font-weight: 800; }.stat-trend.neutral { color: var(--muted); }
.stat-value { margin-top: 22px; display: block; font-size: clamp(22px, 2.2vw, 31px); line-height: 1; letter-spacing: -.06em; }.stat-label { margin-top: 7px; display: block; color: var(--muted); font-size: 9px; }

.dashboard-grid { margin-top: 15px; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, .7fr); gap: 14px; }
.dashboard-side { display: grid; align-content: start; gap: 14px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-header { padding: 17px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }.panel-header h3 { margin: 0; font-size: 12px; }.panel-header > span { color: var(--muted); font-size: 8px; font-weight: 700; }.panel-header a, .panel-header button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 8px; font-weight: 700; }
.queue-list { padding: 5px 10px 10px; }.queue-item { width: 100%; padding: 12px 8px; display: grid; grid-template-columns: 38px minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 11px; align-items: center; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; }.queue-item:last-child { border-bottom: 0; }.queue-item:hover { background: #fafbf8; }
.car-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-soft); font-size: 9px; font-weight: 800; }.queue-main, .queue-client { min-width: 0; display: flex; flex-direction: column; }.queue-main b, .queue-client b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }.queue-main small, .queue-client small { margin-top: 3px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.queue-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }.queue-right time { color: var(--muted); font-size: 8px; }
.status-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border-radius: 7px; background: #eef1ee; color: #59675e; font-size: 7px; font-weight: 800; white-space: nowrap; }.status-chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }.status-in_progress { color: #2c7558; background: #e8f6ef; }.status-waiting_parts { color: #9a6b0f; background: #fff6d9; }.status-ready { color: #3469b5; background: #edf4ff; }.status-scheduled { color: #6f667a; background: #f3eff7; }.status-done { color: #627169; background: #eef1ef; }.status-cancelled { color: #a14d4d; background: #fff0f0; }

.low-stock-list { padding: 9px 13px 14px; display: grid; gap: 4px; }.stock-alert { padding: 9px 4px; display: flex; align-items: center; gap: 10px; }.stock-alert-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: #fff3e9; color: var(--orange); }.stock-alert-icon svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }.stock-alert > span:nth-child(2) { min-width: 0; display: flex; flex: 1; flex-direction: column; }.stock-alert b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }.stock-alert small { color: var(--muted); font-size: 8px; }.stock-alert > strong { color: var(--red); font-size: 9px; }
.reminder-mini-list { padding: 7px 12px 12px; }.reminder-mini { width: 100%; padding: 9px 3px; display: flex; align-items: center; gap: 9px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }.reminder-mini:last-child { border-bottom: 0; }.reminder-mini > span:first-child { width: 28px; height: 28px; display: grid; place-items: center; flex: none; border-radius: 8px; background: #eef3ff; color: var(--blue); }.reminder-mini.overdue > span:first-child { color: var(--red); background: #fff0f0; }.reminder-mini svg { width: 14px; fill: none; stroke: currentColor; }.reminder-mini > span:last-child { min-width: 0; display: flex; flex-direction: column; }.reminder-mini b { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }.reminder-mini small { color: var(--muted); font-size: 7px; }
.empty-state { min-height: 210px; padding: 35px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }.empty-state span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-soft); color: var(--muted); }.empty-state svg { width: 20px; fill: none; stroke: currentColor; }.empty-state b { margin-top: 12px; font-size: 11px; }.empty-state p { max-width: 280px; margin: 5px 0 0; color: var(--muted); font-size: 9px; }

.toolbar { margin-bottom: 14px; padding: 10px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }.toolbar-search { min-width: 190px; flex: 1; display: flex; align-items: center; }.toolbar-search svg { width: 16px; margin: 0 9px; fill: none; stroke: var(--muted); stroke-width: 1.8; }.toolbar-search input { width: 100%; border: 0; outline: 0; font-size: 10px; }.filter-tabs { display: flex; align-items: center; gap: 4px; }.filter-tabs button { padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 8px; font-weight: 700; }.filter-tabs button.active { background: var(--sidebar); color: white; }

.data-table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }.data-table { width: 100%; border-collapse: collapse; }.data-table th { padding: 12px 14px; background: var(--surface-soft); color: var(--muted); text-align: left; text-transform: uppercase; font-size: 7px; letter-spacing: .08em; }.data-table td { padding: 13px 14px; border-top: 1px solid var(--line); vertical-align: middle; font-size: 9px; }.data-table tbody tr { cursor: pointer; transition: background .15s; }.data-table tbody tr:hover { background: #fafbf8; }.table-main { display: flex; flex-direction: column; gap: 3px; }.table-main b { font-size: 10px; }.table-main small { color: var(--muted); font-size: 8px; }.money { font-weight: 800; white-space: nowrap; }.muted { color: var(--muted); }.plate { display: inline-flex; padding: 4px 6px; border: 1px solid #cbd2cc; border-radius: 5px; background: white; font-family: monospace; font-size: 8px; font-weight: 700; }

.client-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }.client-card { padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }.client-head { display: flex; align-items: center; gap: 10px; }.client-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--sidebar); color: var(--lime); font-size: 10px; font-weight: 800; }.client-head > span { min-width: 0; display: flex; flex: 1; flex-direction: column; }.client-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }.client-head small { color: var(--muted); font-size: 8px; }.client-head button { width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 8px; background: white; cursor: pointer; }.client-vehicles { min-height: 47px; margin-top: 15px; padding: 10px; border-radius: 9px; background: var(--surface-soft); }.client-vehicles span { display: block; color: var(--muted); font-size: 8px; }.client-vehicles b { margin-top: 3px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }.client-footer { margin-top: 13px; display: flex; justify-content: space-between; color: var(--muted); font-size: 8px; }.client-footer strong { color: var(--ink); }

.inventory-summary { margin-bottom: 13px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }.summary-pill { padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }.summary-pill span { color: var(--muted); font-size: 8px; }.summary-pill b { font-size: 14px; letter-spacing: -.03em; }.margin-positive { color: var(--green); font-weight: 800; }.stock-low { color: var(--red); font-weight: 800; }

.month-picker { height: 35px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); font-size: 9px; font-weight: 700; }
.finance-grid { margin-top: 14px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr); gap: 14px; }.debt-list { max-height: 340px; padding: 6px 12px 12px; overflow: auto; }.debt-row { width: 100%; padding: 12px 5px; display: grid; grid-template-columns: minmax(170px, 1fr) minmax(90px, .7fr) auto; align-items: center; gap: 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }.debt-row:last-child { border-bottom: 0; }.debt-row:hover { background: var(--surface-soft); }.debt-row > span:first-child, .debt-row > span:last-child { display: flex; flex-direction: column; }.debt-row b { font-size: 9px; }.debt-row small { color: var(--muted); font-size: 7px; }.debt-row strong { margin-top: 3px; color: var(--red); font-size: 9px; text-align: right; }.payment-progress { height: 5px; overflow: hidden; border-radius: 4px; background: #edf0ed; }.payment-progress i { height: 100%; display: block; border-radius: inherit; background: var(--green); }
.category-list { padding: 10px 15px 15px; }.category-row { padding: 8px 0; display: grid; grid-template-columns: minmax(90px, 1fr) minmax(50px, .7fr) auto; align-items: center; gap: 8px; }.category-row > span:first-child { display: flex; flex-direction: column; }.category-row b { font-size: 8px; }.category-row small { color: var(--muted); font-size: 7px; }.category-row strong { font-size: 8px; }.category-bar { height: 5px; overflow: hidden; border-radius: 4px; background: #edf0ed; }.category-bar i { height: 100%; display: block; border-radius: inherit; background: var(--orange); }.panel-empty-text { padding: 20px; font-size: 9px; }
.ledger-panel { margin-top: 14px; }.data-table-wrap.embedded { border: 0; border-radius: 0 0 var(--radius) var(--radius); }.finance-kind { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: #eaf6ef; color: var(--green); font-size: 13px; font-weight: 800; }.finance-kind.expense { color: var(--red); background: #fff0f0; }.finance-table .money.income { color: var(--green); }.finance-table .money.expense { color: var(--red); }.row-action { width: 25px; height: 25px; border: 1px solid var(--line); border-radius: 7px; background: white; cursor: pointer; }.row-action.danger { color: var(--red); }

.reminders-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 14px; align-items: start; }.reminder-tabs { width: max-content; margin-bottom: 12px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: white; }.reminder-list { display: grid; gap: 9px; }.reminder-card { padding: 15px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: start; gap: 12px; border: 1px solid var(--line); border-radius: 14px; background: white; }.reminder-card.overdue { border-color: #efc4c4; box-shadow: inset 3px 0 var(--red); }.reminder-card.completed { opacity: .62; }.reminder-check { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--surface-soft); color: var(--muted); font-size: 15px; font-weight: 800; }.reminder-card.overdue .reminder-check { color: var(--red); background: #fff0f0; }.reminder-card.completed .reminder-check { color: var(--green); background: #eaf6ef; }.reminder-copy { min-width: 0; }.reminder-copy > b { font-size: 11px; }.reminder-copy p { margin: 4px 0 8px; color: var(--muted); font-size: 8px; }.reminder-copy small { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 7px; }.reminder-copy small button { padding: 3px 6px; border: 0; border-radius: 5px; background: var(--surface-soft); cursor: pointer; font-size: 7px; font-weight: 700; }.reminder-copy em { margin-top: 7px; display: block; color: var(--red); font-size: 7px; font-style: normal; }.reminder-meta { display: flex; align-items: center; gap: 7px; }.reminder-meta button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: white; cursor: pointer; font-size: 8px; font-weight: 700; }.telegram-state { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: #eaf3fb; color: #2699d6; }.telegram-state.sent { color: var(--green); background: #eaf6ef; }.telegram-state svg { width: 14px; fill: none; stroke: currentColor; }
.telegram-panel { padding: 23px; border-radius: 17px; background: var(--sidebar); color: white; }.telegram-logo { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 13px; background: #2699d6; }.telegram-logo svg { width: 23px; fill: none; stroke: white; }.telegram-panel h3 { margin: 18px 0 8px; font-size: 14px; }.telegram-panel p { margin: 0; color: #9aa89f; font-size: 9px; line-height: 1.6; }.telegram-panel button { width: 100%; margin-top: 18px; padding: 10px; border: 0; border-radius: 9px; background: var(--lime); color: var(--sidebar); cursor: pointer; font-size: 9px; font-weight: 800; }

.team-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(310px, .9fr); gap: 14px; }.employee-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }.employee-card { padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }.employee-head { display: flex; align-items: center; gap: 10px; }.employee-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #e8eee9; color: var(--ink); font-size: 10px; font-weight: 800; }.employee-head > span { display: flex; flex: 1; flex-direction: column; }.employee-head b { font-size: 10px; }.employee-head small { color: var(--muted); font-size: 8px; }.employee-stats { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.employee-stats div { padding: 10px; border-radius: 9px; background: var(--surface-soft); }.employee-stats span { display: block; color: var(--muted); font-size: 7px; }.employee-stats b { margin-top: 3px; display: block; font-size: 11px; }.employee-actions { margin-top: 11px; display: flex; gap: 6px; }.employee-actions button { flex: 1; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: white; cursor: pointer; font-size: 8px; font-weight: 700; }
.payroll-list { padding: 8px 15px 15px; }.payroll-row { padding: 10px 0; display: grid; grid-template-columns: 33px 1fr auto; gap: 9px; align-items: center; border-bottom: 1px solid var(--line); }.payroll-row:last-child { border-bottom: 0; }.payroll-kind { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 10px; background: #eaf6ef; color: var(--green); font-size: 14px; }.payroll-kind.payment { background: #eef3ff; color: var(--blue); }.payroll-row > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }.payroll-row b { font-size: 9px; }.payroll-row small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 7px; }.payroll-row strong { font-size: 9px; }.payroll-row strong.payment { color: var(--blue); }

dialog { color: var(--ink); }.form-dialog, .detail-drawer { border: 0; padding: 0; background: var(--surface); box-shadow: 0 28px 90px rgba(8,15,10,.25); }.form-dialog::backdrop, .detail-drawer::backdrop { background: rgba(9,15,11,.55); backdrop-filter: blur(4px); }.form-dialog { width: min(720px, calc(100% - 28px)); max-height: 92vh; border-radius: 22px; overflow: auto; }.dialog-close, .drawer-close { position: absolute; z-index: 4; top: 16px; right: 16px; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: white; cursor: pointer; font-size: 21px; line-height: 1; }.dialog-header { padding: 28px 30px 22px; border-bottom: 1px solid var(--line); }.dialog-header span { color: var(--lime-deep); text-transform: uppercase; font-size: 8px; font-weight: 800; letter-spacing: .12em; }.dialog-header h2 { margin: 8px 0 4px; font-size: 20px; letter-spacing: -.04em; }.dialog-header p { margin: 0; color: var(--muted); font-size: 9px; }.dialog-body { padding: 24px 30px 29px; }.form-section + .form-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }.form-section-title { margin-bottom: 12px; display: flex; align-items: center; gap: 9px; }.form-section-title span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; background: var(--sidebar); color: var(--lime); font-size: 8px; font-weight: 800; }.form-section-title b { font-size: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }.field { min-width: 0; display: flex; flex-direction: column; gap: 6px; }.field.full { grid-column: 1 / -1; }.field label { color: var(--muted); font-size: 8px; font-weight: 700; }.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: var(--surface-soft); color: var(--ink); font-size: 10px; transition: border .2s, box-shadow .2s; }.field input, .field select { height: 40px; padding: 0 11px; }.field textarea { min-height: 76px; padding: 10px 11px; resize: vertical; }.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--lime-deep); box-shadow: 0 0 0 3px rgba(145,199,52,.1); }.form-actions { margin-top: 24px; display: flex; justify-content: flex-end; gap: 8px; }.form-actions button { min-width: 105px; height: 40px; border-radius: 9px; cursor: pointer; font-size: 9px; font-weight: 800; }.button-secondary { border: 1px solid var(--line); background: white; }.button-submit { border: 0; background: var(--sidebar); color: white; }.button-submit span { color: var(--lime); }
.checkbox-field { display: flex; align-items: center; gap: 10px; cursor: pointer; }.checkbox-field.full { grid-column: 1 / -1; }.checkbox-field input { width: 17px; height: 17px; accent-color: var(--lime-deep); }.checkbox-field span { display: flex; flex-direction: column; }.checkbox-field b { font-size: 9px; }.checkbox-field small { color: var(--muted); font-size: 7px; }.telegram-help { margin-bottom: 17px; padding: 14px; border-radius: 11px; background: #eaf3fb; }.telegram-help b { font-size: 10px; }.telegram-help ol { margin: 8px 0 0; padding-left: 17px; color: var(--muted); font-size: 8px; line-height: 1.7; }.telegram-form-status { margin-top: 14px; color: var(--muted); font-size: 8px; }.telegram-form-status.connected { color: var(--green); font-weight: 800; }

.detail-drawer { width: min(650px, 100%); max-width: none; height: 100vh; max-height: none; margin: 0 0 0 auto; border-radius: 0; overflow: auto; }.detail-drawer[open] { animation: drawerIn .25s ease both; } @keyframes drawerIn { from { transform: translateX(35px); opacity: .7; } }
.drawer-hero { padding: 28px 30px 24px; background: var(--sidebar); color: white; }.drawer-hero-top { padding-right: 40px; display: flex; align-items: center; gap: 8px; color: #91a096; font-size: 8px; }.drawer-hero h2 { margin: 14px 0 5px; font-size: 24px; letter-spacing: -.05em; }.drawer-hero p { margin: 0; color: #a8b4ac; font-size: 10px; }.drawer-hero .status-chip { margin-top: 17px; }.drawer-body { padding: 24px 30px 45px; }.drawer-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }.drawer-summary div { padding: 11px; border-radius: 10px; background: var(--surface-soft); }.drawer-summary span { display: block; color: var(--muted); font-size: 7px; }.drawer-summary b { margin-top: 4px; display: block; font-size: 10px; }.drawer-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }.drawer-section h3 { margin: 0 0 11px; font-size: 11px; }.drawer-section .field textarea { min-height: 95px; }.drawer-save { position: sticky; bottom: 0; margin: 23px -30px -45px; padding: 13px 30px; display: flex; justify-content: flex-end; background: rgba(255,255,255,.94); border-top: 1px solid var(--line); backdrop-filter: blur(10px); }.drawer-save button { height: 40px; padding: 0 18px; border: 0; border-radius: 9px; background: var(--sidebar); color: white; cursor: pointer; font-size: 9px; font-weight: 800; }
.drawer-quick-actions { margin-top: 9px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.drawer-quick-actions button { height: 38px; border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer; font-size: 8px; font-weight: 800; }.drawer-quick-actions button:first-child { border-color: var(--sidebar); background: var(--sidebar); color: white; }.payment-list { display: grid; gap: 6px; }.payment-row { padding: 9px; display: grid; grid-template-columns: 30px 1fr auto 24px; gap: 8px; align-items: center; border-radius: 9px; background: var(--surface-soft); }.payment-method { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #eaf6ef; color: var(--green); font-size: 11px; font-weight: 800; }.payment-row > span:nth-child(2) { display: flex; flex-direction: column; }.payment-row b { font-size: 8px; }.payment-row small { color: var(--muted); font-size: 7px; }.payment-row strong { color: var(--green); font-size: 9px; }.payment-row button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; }
.order-items { display: grid; gap: 7px; }.order-item-row { padding: 10px; display: grid; grid-template-columns: 1fr auto; gap: 8px; border-radius: 9px; background: var(--surface-soft); }.order-item-row span { display: flex; flex-direction: column; }.order-item-row b { font-size: 9px; }.order-item-row small { color: var(--muted); font-size: 7px; }.order-item-row strong { font-size: 9px; }.add-line-form { margin-top: 8px; padding: 11px; display: grid; grid-template-columns: 1fr 70px 90px auto; gap: 7px; border: 1px dashed #cfd6d0; border-radius: 10px; }.add-line-form input, .add-line-form select { min-width: 0; height: 35px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 8px; }.add-line-form button { border: 0; border-radius: 7px; background: var(--lime); cursor: pointer; font-weight: 800; }

.mobile-nav { display: none; }.sidebar-scrim { display: none; }.toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; max-width: calc(100% - 30px); padding: 11px 15px; border-radius: 9px; background: var(--sidebar); color: white; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: .2s; font-size: 9px; }.toast.visible { opacity: 1; transform: translate(-50%, 0); }.toast.error { background: #9c3737; }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .sidebar { padding-left: 14px; padding-right: 14px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .client-grid { grid-template-columns: repeat(2, 1fr); }
  .global-search { width: min(260px, 25vw); }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; width: 250px; transform: translateX(-105%); transition: transform .25s ease; box-shadow: 20px 0 60px rgba(0,0,0,.2); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; z-index: 25; inset: 0; display: block; background: rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .2s; }.sidebar-scrim.visible { opacity: 1; pointer-events: auto; }
  .mobile-menu { width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: white; }.mobile-menu span { width: 16px; height: 1px; display: block; background: var(--ink); }.mobile-menu span + span { margin-top: -15px; }
  .page-heading { min-width: 0; }.page-heading p { display: none; }
  .global-search, .notifications { display: none; }
  .dashboard-grid, .team-layout, .finance-grid, .reminders-layout { grid-template-columns: 1fr; }
  .telegram-panel { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; }.telegram-panel h3 { margin: 3px 0 5px; }.telegram-panel p, .telegram-panel button { grid-column: 2; }.telegram-panel button { width: max-content; padding-left: 18px; padding-right: 18px; }
  .view-root { padding-bottom: 95px; }
  .mobile-nav { position: fixed; z-index: 24; left: 12px; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); height: 63px; padding: 7px 10px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 19px; background: rgba(17,23,19,.95); backdrop-filter: blur(16px); box-shadow: 0 16px 45px rgba(0,0,0,.24); }.mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: #7f8d84; }.mobile-nav a.active { color: var(--lime); }.mobile-nav svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }.mobile-nav small { font-size: 7px; }.mobile-nav button { width: 44px; height: 44px; margin: -21px auto 0; border: 4px solid var(--bg); border-radius: 50%; background: var(--lime); color: var(--sidebar); font-size: 24px; box-shadow: 0 8px 20px rgba(0,0,0,.22); }
  .data-table-wrap { overflow-x: auto; }.data-table { min-width: 760px; }
}

@media (max-width: 560px) {
  .topbar { min-height: 70px; padding: 13px 14px; }.page-heading h1 { font-size: 15px; }.topbar-actions { margin-left: auto; }.primary-button { width: 39px; padding: 0; justify-content: center; font-size: 0; }.primary-button span { font-size: 22px; }
  .view-root { padding: 16px 14px 94px; }
  .section-topline { align-items: flex-start; }.section-actions { flex-wrap: wrap; justify-content: flex-end; }.section-actions .ghost-button { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }.stat-card { padding: 14px; border-radius: 14px; }.stat-value { margin-top: 17px; font-size: 23px; }.stat-label { font-size: 8px; }.stat-icon { width: 30px; height: 30px; }
  .dashboard-grid { gap: 10px; }.queue-item { grid-template-columns: 35px minmax(0,1fr) auto; }.queue-client { display: none; }.queue-right time { display: none; }
  .toolbar { align-items: stretch; flex-direction: column; }.filter-tabs { max-width: 100%; overflow-x: auto; }.filter-tabs button { white-space: nowrap; }
  .client-grid, .employee-grid { grid-template-columns: 1fr; }.inventory-summary { grid-template-columns: 1fr; }
  .debt-row { grid-template-columns: 1fr auto; gap: 7px; }.debt-row .payment-progress { grid-column: 1 / -1; grid-row: 2; }.reminder-card { grid-template-columns: 32px minmax(0, 1fr); }.reminder-check { width: 32px; height: 32px; }.reminder-meta { grid-column: 2; }.telegram-panel { display: block; }.telegram-panel p, .telegram-panel button { width: 100%; }.reminder-tabs { max-width: 100%; overflow-x: auto; }
  .form-dialog { width: calc(100% - 12px); max-height: 96vh; border-radius: 18px; }.dialog-header { padding: 24px 21px 18px; }.dialog-body { padding: 20px 21px 24px; }.form-grid { grid-template-columns: 1fr; }.field.full { grid-column: auto; }.form-actions { flex-direction: column-reverse; }.form-actions button { width: 100%; }
  .detail-drawer { width: 100%; }.drawer-hero, .drawer-body { padding-left: 20px; padding-right: 20px; }.drawer-summary { grid-template-columns: 1fr 1fr; }.drawer-save { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }.add-line-form { grid-template-columns: 1fr 64px; }.add-line-form select { grid-column: span 1; }
}

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