:root {
  --ink: #17231d; --ink-soft: #304038; --muted: #6d766f; --paper: #f3f2eb; --card: #fff;
  --green: #bdeebc; --green-dark: #1d6a45; --amber: #ffd469; --danger: #9c392e; --line: #dfe3dc;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--paper); }
body { margin: 0; min-width: 320px; min-height: 100vh; min-height: 100dvh; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(34,114,75,.28); outline-offset: 2px; }
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); }
.boot p { margin: 0; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--amber); color: var(--ink); font-size: 22px; font-weight: 900; }
.shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 252px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--ink); color: #fff; padding: 28px 20px; display: flex; flex-direction: column; z-index: 4; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 850; letter-spacing: -.02em; }
.brand-copy small { display: block; color: #9caaa1; font-size: 11px; font-weight: 600; margin-top: 3px; letter-spacing: .02em; }
.nav { display: grid; gap: 7px; margin-top: 40px; }
.nav button { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; border-radius: 13px; padding: 13px 14px; text-align: left; background: transparent; color: #cbd3cd; cursor: pointer; }
.nav button:hover { background: rgba(255,255,255,.06); }
.nav button.active { background: var(--ink-soft); color: #fff; }
.nav-icon { width: 22px; text-align: center; font-size: 17px; }
.nav-count { margin-left: auto; min-width: 23px; padding: 3px 7px; border-radius: 999px; background: var(--amber); color: var(--ink); text-align: center; font-size: 11px; font-weight: 850; }
.sidebar-foot { margin-top: auto; padding: 15px; border: 1px solid rgba(255,255,255,.09); border-radius: 15px; color: #b6c0b9; font-size: 12px; line-height: 1.5; }
.sidebar-foot strong { color: #fff; display: block; margin-bottom: 3px; }
.main { min-width: 0; padding: 34px clamp(22px,4vw,58px) 64px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.eyebrow { display: block; margin-bottom: 6px; color: var(--green-dark); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .1em; }
.top h1, .page-title { margin: 0; font-size: clamp(27px,3.7vw,42px); line-height: 1.08; letter-spacing: -.045em; }
.top p, .page-subtitle { margin: 8px 0 0; color: var(--muted); }
.profile-chip { display: flex; align-items: center; gap: 11px; border: 0; border-radius: 16px; background: var(--card); padding: 8px 11px 8px 8px; color: var(--ink); box-shadow: 0 8px 25px rgba(29,46,37,.05); cursor: pointer; }
.avatar { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 50%; background: var(--green); font-weight: 850; }
.profile-chip span:last-child { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 750; }
.install-card { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding: 15px 17px; border-radius: 17px; background: var(--ink); color: #fff; }
.install-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px; background: var(--amber); color: var(--ink); font-size: 21px; }
.install-card strong { display: block; font-size: 14px; }
.install-card p { margin: 3px 0 0; color: #b8c2bb; font-size: 12px; }
.install-card .button { margin-left: auto; white-space: nowrap; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin: 27px 0; }
.metric, .card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 30px rgba(29,46,37,.035); }
.metric { min-width: 0; padding: 19px; }
.metric-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.metric-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; background: #edf5ed; color: var(--green-dark); }
.metric strong { display: block; margin-top: 8px; font-size: clamp(21px,2.4vw,29px); letter-spacing: -.035em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric small { display: block; margin-top: 4px; color: var(--muted); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 33px 0 14px; }
.section-head h2 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.button { border: 0; border-radius: 12px; padding: 11px 16px; background: var(--green); color: var(--ink); font-weight: 780; cursor: pointer; transition: transform .12s,filter .12s; }
.button:hover { filter: brightness(.97); }
.button:active { transform: translateY(1px); }
.button.secondary { background: #edf0ec; }
.button.dark { background: var(--ink); color: #fff; }
.button.danger { background: #f5e2df; color: var(--danger); }
.button.small { padding: 8px 11px; font-size: 12px; }
.button:disabled { opacity: .55; cursor: wait; }
.link-button { border: 0; padding: 0; background: none; color: var(--green-dark); font-weight: 750; cursor: pointer; }
.order-list { display: grid; gap: 12px; }
.order { padding: 20px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 20px; }
.order-top { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.badge { display: inline-flex; border-radius: 999px; padding: 6px 10px; background: #fff1ca; color: #684c00; font-size: 11px; font-weight: 800; }
.badge.ACCEPTED { background: #e4f2ff; color: #1b5f90; }
.badge.IN_PROGRESS { background: var(--green); color: #195438; }
.badge.COMPLETED { background: #e4f5e9; color: #236842; }
.badge.CANCELLED { background: #f5e2df; color: var(--danger); }
.order-number { color: var(--muted); font-size: 12px; }
.order h3 { margin: 13px 0 7px; font-size: 19px; letter-spacing: -.02em; }
.order-details { display: grid; gap: 5px; color: var(--muted); font-size: 13px; }
.order-details span { display: flex; align-items: start; gap: 8px; }
.order-details b { color: var(--ink); font-weight: 700; }
.order-actions { min-width: 212px; display: flex; flex-direction: column; justify-content: space-between; align-items: stretch; gap: 12px; }
.price { text-align: right; }
.price strong { display: block; font-size: 20px; }
.price small { color: var(--muted); }
.action-row { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.timer { display: inline-flex; align-items: center; justify-content: center; padding: 8px 11px; border-radius: 10px; background: #e8f6e9; color: var(--green-dark); font-variant-numeric: tabular-nums; font-weight: 850; }
.empty { padding: 42px 24px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 18px; margin-bottom: 6px; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 26px 0 16px; }
.tab { border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; background: var(--card); color: var(--muted); cursor: pointer; }
.tab.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.calendar-strip { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 9px; margin: 25px 0 17px; overflow-x: auto; padding-bottom: 4px; }
.day { min-width: 84px; border: 1px solid var(--line); border-radius: 16px; padding: 12px 8px; background: var(--card); color: var(--muted); text-align: center; cursor: pointer; }
.day b { display: block; margin: 5px 0 2px; color: var(--ink); font-size: 21px; }
.day.active { border-color: var(--ink); background: var(--ink); color: #c6cec8; }
.day.active b { color: #fff; }
.schedule-card { padding: 21px; }
.schedule-card h2 { margin: 0 0 5px; font-size: 20px; }
.schedule-card>p { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.slot-list { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; }
.slot { position: relative; border: 1px solid var(--line); border-radius: 14px; background: #f8f9f7; padding: 14px 8px; text-align: center; cursor: pointer; }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot strong { display: block; font-size: 14px; }
.slot small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.slot.selected { border-color: #77bd80; background: #e7f6e8; }
.slot.booked { border-color: #dfbd75; background: #fff3d9; cursor: not-allowed; }
.schedule-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 20px; }
.schedule-note { color: var(--muted); font-size: 12px; }
.finance-grid, .profile-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 16px; margin-top: 26px; }
.finance-card, .form-card { padding: 24px; }
.finance-card h2, .form-card h2 { margin: 0 0 7px; font-size: 19px; }
.finance-card p, .form-card>p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.finance-total { margin: 24px 0 6px; font-size: clamp(30px,5vw,46px); font-weight: 900; letter-spacing: -.05em; }
.finance-rows { margin-top: 20px; border-top: 1px solid var(--line); }
.finance-row { display: flex; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.finance-row span { color: var(--muted); }
.commission-card { background: var(--ink); color: #fff; border: 0; }
.commission-card p, .commission-card .finance-row span { color: #b7c1ba; }
.commission-card .finance-rows, .commission-card .finance-row { border-color: rgba(255,255,255,.1); }
.form { display: grid; gap: 14px; margin-top: 20px; }
.form label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.input { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfa; padding: 12px 13px; color: var(--ink); }
textarea.input { min-height: 100px; resize: vertical; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; }
.profile-side { display: grid; align-content: start; gap: 14px; }
.profile-summary { padding: 22px; text-align: center; }
.profile-summary .avatar { width: 74px; height: 74px; margin: 0 auto 13px; font-size: 22px; }
.profile-summary h2 { margin: 0 0 5px; font-size: 20px; }
.profile-summary p { margin: 0; color: var(--muted); font-size: 13px; }
.verified { display: inline-flex; margin-top: 13px; border-radius: 999px; padding: 7px 10px; background: #e4f5e9; color: var(--green-dark); font-size: 11px; font-weight: 800; }
.login-page { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(430px,.85fr); background: var(--ink); }
.login-visual { padding: clamp(32px,6vw,80px); color: #fff; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(circle at 20% 90%,rgba(189,238,188,.18),transparent 36%),radial-gradient(circle at 90% 10%,rgba(255,212,105,.13),transparent 31%); }
.login-copy { max-width: 650px; }
.login-copy h1 { margin: 0; font-size: clamp(45px,7vw,78px); line-height: .96; letter-spacing: -.065em; }
.login-copy p { max-width: 520px; margin: 22px 0 0; color: #b7c1ba; font-size: 18px; line-height: 1.55; }
.login-points { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.login-points span { border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: 9px 12px; color: #d2d9d4; font-size: 12px; }
.login-panel { display: grid; place-items: center; background: var(--paper); padding: 28px; border-radius: 28px 0 0 28px; }
.login-card { width: min(100%,410px); }
.login-card h2 { margin: 23px 0 7px; font-size: 30px; letter-spacing: -.04em; }
.login-card>p { margin: 0; color: var(--muted); line-height: 1.5; }
.phone-wrap { position: relative; }
.phone-prefix { position: absolute; left: 13px; bottom: 13px; color: var(--ink); }
.phone-wrap .input { padding-left: 36px; }
.check { display: grid; grid-template-columns: 18px 1fr; gap: 9px; align-items: start; color: var(--muted); font-size: 11px; line-height: 1.45; }
.check input { margin: 2px 0 0; accent-color: var(--green-dark); }
.check a { color: var(--green-dark); }
.login-submit { width: 100%; padding: 14px; }
.code-input { font-size: 26px; text-align: center; letter-spacing: .32em; font-variant-numeric: tabular-nums; }
.error { border-radius: 12px; padding: 11px 12px; background: #f5e2df; color: var(--danger); font-size: 12px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 18px; background: rgba(15,24,19,.62); backdrop-filter: blur(5px); }
.modal { width: min(100%,520px); max-height: 90vh; overflow: auto; border-radius: 22px; background: var(--card); padding: 23px; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.modal-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.modal-head h2 { margin: 0; font-size: 22px; }
.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.close { border: 0; border-radius: 50%; width: 34px; height: 34px; background: #edf0ec; cursor: pointer; }
.modal-order-details { margin-top: 20px; gap: 10px; line-height: 1.4; }
.modal-order-details span { min-width: 0; overflow-wrap: anywhere; }
.modal-description { padding-top: 3px; border-top: 1px solid var(--line); }
.call-client-button { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; margin-top: 24px; text-align: center; text-decoration: none; }
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 40; max-width: calc(100% - 32px); transform: translate(-50%,30px); opacity: 0; pointer-events: none; border-radius: 13px; background: var(--ink); color: #fff; padding: 12px 16px; box-shadow: 0 13px 35px rgba(0,0,0,.2); transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.mobile-nav { display: none; }
@media (max-width:1060px) { .metrics { grid-template-columns: 1fr 1fr; } .slot-list { grid-template-columns: repeat(3,1fr); } }
@media (max-width:780px) {
  .shell { display: block; min-height: 100dvh; overflow: visible; } .sidebar { position: static; height: auto; padding: calc(14px + env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) 14px max(18px,env(safe-area-inset-left)); } .sidebar .nav,.sidebar-foot { display: none; }
  .sidebar .brand { min-height: 54px; } .sidebar .brand-mark { flex: 0 0 44px; } .sidebar .brand-copy { min-width: 0; line-height: 1.15; }
  .main { min-height: calc(100dvh - 82px); padding: 23px max(15px,env(safe-area-inset-right)) calc(126px + env(safe-area-inset-bottom)) max(15px,env(safe-area-inset-left)); } .profile-chip span:last-child { display: none; } .top { align-items: start; } .top p { font-size: 13px; }
  .install-card { align-items: start; flex-wrap: wrap; } .install-card .button { width: 100%; margin-left: 0; } .metrics { margin-top: 20px; } .metric { padding: 16px; }
  .order { grid-template-columns: 1fr; } .order-actions { min-width: 0; } .price { text-align: left; } .action-row { justify-content: stretch; } .action-row .button { flex: 1; }
  .calendar-strip { grid-template-columns: repeat(14,82px); } .slot-list { grid-template-columns: 1fr 1fr; } .schedule-actions { align-items: stretch; flex-direction: column; }
  .finance-grid,.profile-grid { grid-template-columns: 1fr; } .login-page { display: flex; flex-direction: column; min-height: 100dvh; background: var(--paper); color: var(--ink); } .login-visual { min-height: 300px; flex: 0 0 auto; padding: calc(22px + env(safe-area-inset-top)) max(22px,env(safe-area-inset-right)) 48px max(22px,env(safe-area-inset-left)); background-color: var(--ink); color: #fff; }
  .login-visual .brand { color: #fff; } .login-visual .brand-copy small { color: #c3cec6; } .login-copy h1 { color: #fff; font-size: 47px; } .login-copy p { margin-top: 16px; color: #d0d8d2; font-size: 15px; } .login-points { display: none; }
  .login-panel { min-height: 0; flex: 1 0 auto; margin-top: -24px; padding: 32px max(20px,env(safe-area-inset-right)) calc(44px + env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left)); border-radius: 25px 25px 0 0; position: relative; background: var(--paper); color: var(--ink); }
  .login-card { color: var(--ink); } .login-card h2 { color: var(--ink); } .login-card>p,.login-card label { color: #566159; } .login-card .input { border-color: #cbd3cc; background: #fff; color: var(--ink); }
  .mobile-nav { position: fixed; left: max(10px,env(safe-area-inset-left)); right: max(10px,env(safe-area-inset-right)); bottom: max(9px,env(safe-area-inset-bottom)); z-index: 15; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); min-height: 70px; border: 1px solid rgba(255,255,255,.08); border-radius: 18px; padding: 7px 5px; background: rgba(23,35,29,.98); box-shadow: 0 12px 35px rgba(0,0,0,.24); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transform: translateZ(0); transition: opacity .16s ease,transform .16s ease; }
  .mobile-nav button { display: grid; justify-items: center; gap: 3px; border: 0; background: none; color: #9daba2; font-size: 10px; padding: 4px 1px; } .mobile-nav button span:first-child { font-size: 18px; } .mobile-nav button.active { color: var(--amber); }
  .keyboard-open .mobile-nav,body:has(input:focus) .mobile-nav,body:has(textarea:focus) .mobile-nav { opacity: 0; pointer-events: none; transform: translateY(calc(100% + 40px)); }
  .modal-backdrop { align-items: end; padding: max(14px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left)); }
  .order-modal { width: 100%; max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 28px); padding: 24px 24px 22px; }
}
@media (max-width:460px) { .metrics { gap: 9px; } .metric strong { font-size: 21px; } .section-head { align-items: start; } .section-head .button { padding: 9px 11px; font-size: 12px; } .slot-list { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior: auto!important; transition: none!important; } }
