:root {
  --bg: #090d11;
  --panel: #11171d;
  --panel-2: #151c23;
  --line: #26303a;
  --line-soft: #1c242d;
  --text: #f1f4f7;
  --muted: #8e9aa8;
  --accent: #66f27f;
  --accent-soft: rgba(102, 242, 127, .1);
  --blue: #7bb5ff;
  --yellow: #f2c66d;
  --red: #ff7d7d;
  --violet: #c2a8ff;
  --shadow: 0 22px 60px rgba(0, 0, 0, .22);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 18px; border-right: 1px solid var(--line-soft); background: #0b1015; display: flex; flex-direction: column; z-index: 40; }
.brand { display: flex; align-items: center; gap: 11px; padding: 3px 7px 28px; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: #071009; font-weight: 950; font-size: 18px; box-shadow: 0 0 28px rgba(102,242,127,.14); }
.brand-mark.large { width: 46px; height: 46px; border-radius: 13px; font-size: 22px; }
.brand-name { font-weight: 900; letter-spacing: .11em; font-size: 13px; }
.brand-sub { margin-top: 3px; color: #677381; font-size: 8px; letter-spacing: .13em; }
.nav { display: grid; gap: 5px; }
.nav-item { width: 100%; border: 1px solid transparent; background: transparent; color: #8f9aa7; border-radius: 10px; padding: 10px 11px; display: grid; grid-template-columns: 23px 1fr auto; align-items: center; gap: 7px; text-align: left; cursor: pointer; font-size: 11px; }
.nav-item:hover { background: #11171d; color: #dfe5eb; }
.nav-item.active { color: #f6f8fa; background: #151c22; border-color: #222c35; }
.nav-item.active .nav-icon { color: var(--accent); }
.nav-icon { color: #6f7a87; font-size: 16px; }
.nav-badge, .soon-pill { justify-self: end; border-radius: 999px; font-size: 8px; }
.nav-badge { min-width: 19px; text-align: center; padding: 3px 5px; color: #0a130c; background: var(--accent); font-weight: 900; }
.soon-pill { padding: 3px 6px; border: 1px solid #29333d; color: #6e7a87; }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--line-soft); padding: 17px 6px 2px; display: grid; gap: 11px; }
.connection-pill { display: flex; align-items: center; gap: 7px; color: #7e8996; font-size: 9px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 11px rgba(102,242,127,.48); }
.open-chat { color: #aeb8c3; text-decoration: none; font-size: 9px; }
.main { padding: 0 32px 46px; min-width: 0; }
.topbar { min-height: 88px; display: flex; align-items: center; gap: 13px; margin-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
.topbar h1 { font-size: 16px; margin: 0 0 4px; }
.topbar p { margin: 0; color: #73808d; font-size: 9px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.mode-badge { border: 1px solid #2d3741; color: #8995a2; border-radius: 999px; padding: 5px 8px; font-size: 8px; font-weight: 800; }
.mode-badge.ai { color: var(--accent); border-color: rgba(102,242,127,.26); background: var(--accent-soft); }
.icon-button, .menu-button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid #29333d; background: #12181e; cursor: pointer; }
.icon-button:hover, .menu-button:hover { border-color: #3a4652; }
.menu-button { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 10px; background: #1b232c; border: 1px solid #2d3740; display: grid; place-items: center; font-size: 9px; font-weight: 800; color: #c8d0d9; }
.view { display: none; }
.view.active { display: block; }
.hero-row { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin: 23px 0 19px; }
.eyebrow { margin: 0; color: var(--accent); font-size: 8px; font-weight: 900; letter-spacing: .15em; }
.hero-row h2, .calendar-toolbar h2 { margin: 6px 0 7px; font-size: clamp(25px, 3vw, 38px); letter-spacing: -.04em; }
.muted { color: var(--muted); }
.hero-row .muted { margin: 0; max-width: 600px; line-height: 1.55; font-size: 11px; }
.last-sync { color: #64707d; font-size: 9px; white-space: nowrap; }
.last-sync strong { color: #aeb8c2; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin-bottom: 13px; }
.kpi-card { min-height: 139px; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(180deg, rgba(255,255,255,.012), transparent), var(--panel); display: flex; flex-direction: column; }
.kpi-card.accent { background: radial-gradient(circle at 95% 0%, rgba(102,242,127,.12), transparent 42%), var(--panel); }
.kpi-head { display: flex; justify-content: space-between; color: #929eaa; font-size: 9px; }
.kpi-icon { color: #5f6c78; font-size: 14px; }
.kpi-value { margin-top: 17px; font-size: 36px; line-height: 1; font-weight: 840; letter-spacing: -.05em; }
.kpi-value small { color: #7c8995; font-size: 14px; font-weight: 600; }
.kpi-foot { margin-top: auto; display: flex; gap: 7px; color: #687582; font-size: 8px; }
.positive { color: var(--accent); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.overview-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: 12px; }
.activity-panel, .status-panel, .recent-panel, .calendar-panel, .day-panel, .unscheduled-panel, .presets-panel { padding: 19px; }
.panel-head { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 17px; }
.panel-head h3 { margin: 5px 0 0; font-size: 13px; }
.panel-chip { color: #8e99a5; border: 1px solid #2c3640; background: #151c22; border-radius: 999px; padding: 5px 8px; font-size: 8px; }
.text-button { border: 0; background: transparent; color: var(--accent); cursor: pointer; font-size: 9px; }
.chart { height: 185px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; }
.chart-col { height: 100%; display: grid; grid-template-rows: 1fr auto; gap: 8px; min-width: 0; }
.chart-bar-wrap { height: 100%; display: flex; align-items: end; }
.chart-bar { width: 100%; min-height: 5px; position: relative; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #75f58a, #45bf60); box-shadow: 0 0 20px rgba(102,242,127,.08); }
.chart-bar span { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 8px; color: #7d8996; }
.level-0 { height: 3%; opacity: .2; } .level-1 { height: 10%; } .level-2 { height: 20%; } .level-3 { height: 30%; } .level-4 { height: 40%; } .level-5 { height: 50%; } .level-6 { height: 60%; } .level-7 { height: 70%; } .level-8 { height: 80%; } .level-9 { height: 90%; } .level-10 { height: 100%; }
.chart-label { color: #74808c; text-align: center; font-size: 8px; text-transform: capitalize; }
.capacity-list { display: grid; gap: 8px; }
.capacity-row { width: 100%; display: grid; grid-template-columns: 1fr 160px; gap: 14px; align-items: center; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; cursor: pointer; text-align: left; }
.capacity-row:last-child { border-bottom: 0; }
.capacity-row > div:first-child { display: grid; gap: 3px; }
.capacity-row strong { font-size: 10px; text-transform: capitalize; }
.capacity-row span { color: var(--muted); font-size: 8px; }
.capacity-meter { display: grid; grid-template-columns: 1fr 31px; gap: 7px; align-items: center; }
progress { width: 100%; height: 6px; border: 0; border-radius: 999px; overflow: hidden; background: #202831; }
progress::-webkit-progress-bar { background: #202831; border-radius: 999px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.recent-panel, .unscheduled-panel, .presets-panel { margin-top: 12px; }
.toolbar { display: grid; gap: 13px; margin-bottom: 17px; }
.search-wrap { max-width: 540px; display: flex; align-items: center; gap: 10px; padding: 0 13px; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; }
.search-wrap input { flex: 1; color: var(--text); background: transparent; border: 0; outline: 0; padding: 11px 0; font-size: 11px; }
.search-wrap input::placeholder { color: #65717d; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-tab { border: 1px solid var(--line); background: var(--panel); color: var(--muted); padding: 7px 10px; border-radius: 999px; cursor: pointer; font-size: 9px; }
.filter-tab span { margin-left: 3px; color: #c9d0d7; }
.filter-tab.active { background: var(--accent); border-color: var(--accent); color: #071009; font-weight: 850; }
.filter-tab.active span { color: #071009; }
.lead-list { display: grid; gap: 8px; }
.lead-card { display: grid; grid-template-columns: minmax(180px, 1.05fr) minmax(180px, 1.4fr) minmax(130px, .8fr) auto; gap: 16px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); cursor: pointer; transition: .15s ease; }
.lead-card:hover { transform: translateY(-1px); border-color: #384552; background: #141b22; }
.lead-title { font-weight: 760; font-size: 12px; }
.lead-title span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-meta { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 8px; }
.lead-problem { color: #c2cbd4; font-size: 10px; line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lead-contact { font-size: 9px; color: #aeb8c2; }
.lead-contact strong { display: block; margin-bottom: 3px; color: #edf1f4; }
.status-badge { justify-self: end; padding: 5px 8px; border-radius: 999px; border: 1px solid transparent; font-size: 8px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.status-new { color: var(--accent); background: var(--accent-soft); border-color: rgba(102,242,127,.18); }
.status-contacted { color: var(--blue); background: rgba(123,181,255,.09); border-color: rgba(123,181,255,.16); }
.status-booked { color: var(--violet); background: rgba(194,168,255,.09); border-color: rgba(194,168,255,.16); }
.status-closed { color: #8e99a5; background: rgba(142,153,165,.07); border-color: rgba(142,153,165,.14); }
.compact .lead-card { grid-template-columns: minmax(160px, 1fr) minmax(200px, 1.3fr) auto; padding: 12px 14px; }
.compact .lead-contact { display: none; }
.empty-state { border: 1px dashed #2b3540; border-radius: 13px; padding: 42px 18px; text-align: center; color: var(--muted); font-size: 10px; }
.empty-mini { padding: 23px 8px; color: var(--muted); text-align: center; font-size: 9px; }

.calendar-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .65fr); gap: 12px; }
.calendar-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.calendar-toolbar h2 { font-size: 27px; text-transform: capitalize; }
.calendar-toolbar .muted { margin: 0; font-size: 9px; }
.calendar-controls { display: flex; gap: 7px; }
.secondary-button, .secondary-small, .primary-small { border-radius: 9px; cursor: pointer; }
.secondary-button { height: 34px; border: 1px solid #2d3843; background: #141b22; color: #c4cbd3; padding: 0 11px; font-size: 9px; }
.calendar-legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 16px 0 12px; color: var(--muted); font-size: 8px; }
.calendar-legend span { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.legend-dot.free { background: var(--accent); } .legend-dot.partial { background: var(--yellow); } .legend-dot.full { background: var(--red); } .legend-dot.closed { background: #4e5965; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 0 4px 7px; color: #6f7b87; font-size: 8px; text-align: center; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.calendar-day { min-height: 112px; text-align: left; padding: 10px; border: 1px solid #26313a; border-radius: 11px; background: #0e1419; cursor: pointer; display: flex; flex-direction: column; gap: 5px; position: relative; }
.calendar-day:hover { border-color: #42505e; }
.calendar-day.outside { opacity: .4; }
.calendar-day.selected { outline: 2px solid rgba(102,242,127,.52); outline-offset: -2px; }
.calendar-day.today .day-number::after { content: 'dnes'; margin-left: 5px; color: var(--accent); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.calendar-day.free { background: linear-gradient(180deg, rgba(102,242,127,.055), transparent 45%), #0e1419; }
.calendar-day.partial { background: linear-gradient(180deg, rgba(242,198,109,.075), transparent 45%), #0e1419; }
.calendar-day.full { background: linear-gradient(180deg, rgba(255,125,125,.085), transparent 45%), #0e1419; }
.calendar-day.closed { background: #0c1116; color: #596572; }
.calendar-day.partial progress::-webkit-progress-value { background: var(--yellow); }
.calendar-day.partial progress::-moz-progress-bar { background: var(--yellow); }
.calendar-day.full progress::-webkit-progress-value { background: var(--red); }
.calendar-day.full progress::-moz-progress-bar { background: var(--red); }
.day-number { font-size: 11px; font-weight: 850; }
.day-state { margin-top: 4px; color: #d9dfe4; font-size: 9px; font-weight: 700; }
.calendar-day.closed .day-state { color: #5e6a76; }
.day-jobs-count { color: #7f8b97; font-size: 8px; }
.calendar-day progress { margin-top: auto; }
.day-panel { align-self: start; position: sticky; top: 106px; }
.day-capacity { border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px; background: #0e1419; }
.day-capacity progress { margin: 11px 0 7px; }
.day-capacity small { color: var(--muted); font-size: 8px; }
.capacity-summary { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.capacity-summary strong { font-size: 25px; }
.capacity-summary span { color: var(--muted); font-size: 8px; }
.closed-day-message { color: #74808c; font-size: 9px; line-height: 1.5; }
.day-jobs { display: grid; gap: 7px; margin-top: 11px; }
.day-job { border: 1px solid var(--line); background: #111820; border-radius: 10px; padding: 10px; display: flex; justify-content: space-between; gap: 12px; text-align: left; cursor: pointer; }
.day-job:hover { border-color: #3a4652; }
.day-job div { display: grid; gap: 3px; }
.day-job strong { font-size: 9px; }
.day-job span { color: var(--muted); font-size: 8px; }
.day-job-time { text-align: right; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.settings-card { padding: 20px; }
.settings-list { display: grid; }
.settings-list > div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 10px; }
.settings-list span { color: var(--muted); }
.settings-note { margin: 16px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.settings-note.wide { margin: -6px 0 16px; max-width: 900px; }
code { color: #d8e0e7; background: #1a222a; border: 1px solid #28323c; padding: 2px 5px; border-radius: 5px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 17px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.toggle-row span:first-child { display: grid; gap: 3px; }
.toggle-row strong { font-size: 10px; }
.toggle-row small { color: var(--muted); font-size: 8px; }
.fake-toggle { width: 35px; height: 20px; border-radius: 999px; background: #28323c; position: relative; flex: 0 0 auto; }
.fake-toggle::after { content: ''; width: 14px; height: 14px; border-radius: 50%; position: absolute; top: 3px; left: 3px; background: #6e7b88; }
.fake-toggle.on { background: rgba(102,242,127,.18); }
.fake-toggle.on::after { left: 18px; background: var(--accent); }
.preset-table { display: grid; }
.preset-row { display: grid; grid-template-columns: minmax(220px, 1.5fr) .65fr .8fr .65fr; gap: 15px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line-soft); font-size: 9px; }
.preset-row strong { font-size: 9px; }
.preset-row span { color: #aab4be; }
.preset-head { color: #71808d; text-transform: uppercase; letter-spacing: .08em; font-size: 7px; }
.preset-head span { color: #71808d; }
.review-pill { justify-self: start; display: inline-flex; padding: 4px 7px; border-radius: 999px; font-size: 7px; font-weight: 800; white-space: nowrap; }
.review-pill.auto { color: var(--accent); background: rgba(102,242,127,.08); border: 1px solid rgba(102,242,127,.16); }
.review-pill.manual { color: var(--yellow); background: rgba(242,198,109,.08); border: 1px solid rgba(242,198,109,.17); }

.coming-card { max-width: 820px; margin: 8vh auto; text-align: center; padding: 45px; background: radial-gradient(circle at top, rgba(102,242,127,.09), transparent 48%), var(--panel); border: 1px solid var(--line); border-radius: 22px; }
.coming-icon { width: 63px; height: 63px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 17px; background: var(--accent-soft); color: var(--accent); font-size: 27px; border: 1px solid rgba(102,242,127,.17); }
.coming-card h2 { font-size: 31px; margin: 7px 0 10px; }
.coming-card > p:not(.eyebrow) { color: var(--muted); max-width: 620px; margin: 0 auto; line-height: 1.7; font-size: 11px; }
.feature-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 28px; }
.feature-preview div { background: #0e1419; border: 1px solid var(--line); border-radius: 13px; padding: 16px; display: grid; gap: 5px; }
.feature-preview strong { font-size: 20px; }
.feature-preview span { color: var(--muted); font-size: 8px; }

.auth-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(4,6,8,.88); backdrop-filter: blur(10px); display: grid; place-items: center; padding: 20px; }
.auth-backdrop.hidden { display: none; }
.auth-card { width: min(410px, 100%); background: #10161b; border: 1px solid #29333d; border-radius: 20px; padding: 28px; box-shadow: 0 30px 90px rgba(0,0,0,.45); }
.auth-card h2 { font-size: 21px; margin: 6px 0 8px; }
.auth-card > .muted { margin: 0 0 19px; font-size: 10px; }
.auth-card label { display: grid; gap: 7px; color: #b7c0ca; font-size: 9px; }
.auth-card input { width: 100%; border: 1px solid #2c3641; border-radius: 9px; background: #0b1014; color: #fff; outline: 0; padding: 11px 12px; }
.primary-button { width: 100%; margin-top: 12px; border: 0; border-radius: 9px; background: var(--accent); color: #071009; padding: 11px; font-weight: 900; cursor: pointer; }
.auth-help, .auth-error { margin: 12px 0 0; font-size: 9px; line-height: 1.5; }
.auth-help { color: var(--muted); text-align: center; }
.auth-error { color: var(--red); min-height: 14px; }
.hidden { display: none !important; }
.auth-card label + label { margin-top: 10px; }
.auth-switch { display: block; margin: 10px auto 0; }
.user-box { display: grid; gap: 5px; padding: 11px; border: 1px solid var(--line-soft); border-radius: 11px; background: #0e1419; }
.user-name { font-size: 10px; font-weight: 800; color: var(--text); overflow-wrap: anywhere; }
.user-meta { font-size: 8px; color: var(--muted); }
.service-switch { display: grid; gap: 5px; margin-top: 4px; color: var(--muted); font-size: 8px; }
.service-switch select { width: 100%; border: 1px solid #2c3742; background: #0b1116; color: #edf1f4; border-radius: 8px; padding: 7px 8px; font-size: 9px; }
.user-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; }
.user-actions .text-button { padding: 0; }
.text-button:focus-visible, .service-switch select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.48); opacity: 0; pointer-events: none; transition: .2s; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.lead-drawer { position: fixed; right: 0; top: 0; z-index: 60; width: min(520px, 100%); height: 100vh; background: #0f151a; border-left: 1px solid var(--line); transform: translateX(102%); transition: .24s ease; overflow-y: auto; padding: 25px; }
.lead-drawer.open { transform: translateX(0); }
.drawer-close { position: absolute; right: 17px; top: 17px; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #171e25; cursor: pointer; font-size: 20px; }
.drawer-header { padding: 39px 0 19px; border-bottom: 1px solid var(--line-soft); }
.drawer-header h2 { margin: 6px 0; font-size: 23px; }
.drawer-header p { color: var(--muted); font-size: 9px; margin: 0; }
.detail-grid { display: grid; margin-top: 13px; }
.detail-row { display: grid; grid-template-columns: 105px 1fr; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 9px; }
.detail-row span { color: var(--muted); }
.detail-row strong { font-weight: 600; color: #edf1f4; word-break: break-word; }
.schedule-box { margin-top: 18px; padding: 16px; border: 1px solid #2b3740; border-radius: 14px; background: #111920; }
.schedule-heading { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.schedule-heading h3 { margin: 5px 0 0; font-size: 12px; }
.schedule-box label { display: grid; gap: 6px; margin-top: 9px; color: #a8b3bd; font-size: 8px; }
.schedule-box input, .schedule-box select { width: 100%; border: 1px solid #2c3742; background: #0b1116; color: #edf1f4; border-radius: 8px; padding: 9px 10px; outline: 0; font-size: 9px; }
.schedule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.schedule-box label.check-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: #edf1f4; font-size: 9px; font-weight: 700; cursor: pointer; }
.schedule-box label.check-row input { width: 14px; height: 14px; margin: 0; padding: 0; accent-color: var(--accent); cursor: pointer; }
.schedule-box label.check-row input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.estimate-hint { margin-top: 8px; color: #72808d; font-size: 8px; line-height: 1.45; }
.schedule-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 12px; }
.primary-small, .secondary-small { padding: 9px 10px; font-size: 8px; }
.primary-small { border: 0; background: var(--accent); color: #071009; font-weight: 900; }
.secondary-small { border: 1px solid #33404c; background: #171e25; color: #c1c9d1; }
.drawer-actions { display: grid; gap: 9px; margin-top: 19px; }
.drawer-actions h4 { margin: 0; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .12em; }
.status-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.status-action { border: 1px solid var(--line); background: var(--panel-2); border-radius: 9px; padding: 9px; cursor: pointer; font-size: 8px; }
.status-action.active { border-color: rgba(102,242,127,.45); color: var(--accent); }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.quick-link { text-align: center; text-decoration: none; color: #e6ebef; background: #171e25; border: 1px solid var(--line); padding: 10px; border-radius: 9px; font-size: 8px; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 25px; transform: translate(-50%, 18px); z-index: 120; opacity: 0; pointer-events: none; background: #edf3ee; color: #0c140f; padding: 9px 12px; border-radius: 9px; font-size: 9px; font-weight: 750; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast { max-width: min(92vw, 520px); text-align: center; }

@media (max-width: 1120px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-grid, .calendar-layout { grid-template-columns: 1fr; }
  .day-panel { position: static; }
  .lead-card { grid-template-columns: 1fr 1.2fr auto; }
  .lead-contact { display: none; }
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; transform: translateX(-102%); width: 250px; transition: .2s; }
  .sidebar.open { transform: translateX(0); box-shadow: 30px 0 80px rgba(0,0,0,.55); }
  .main { padding: 0 15px 34px; }
  .menu-button { display: inline-grid; place-items: center; }
  .topbar { min-height: 78px; }
  .mode-badge { display: none; }
  .hero-row, .calendar-toolbar { align-items: flex-start; flex-direction: column; }
  .calendar-controls { width: 100%; }
  .calendar-grid { gap: 4px; }
  .calendar-day { min-height: 92px; padding: 7px; }
  .day-jobs-count { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .preset-row { grid-template-columns: 1.4fr .7fr .8fr; }
  .preset-row > :last-child { display: none; }
}
@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .lead-card, .compact .lead-card { grid-template-columns: 1fr auto; gap: 8px; }
  .lead-problem, .lead-contact { display: none; }
  .calendar-weekdays, .calendar-grid { gap: 3px; }
  .calendar-day { min-height: 79px; padding: 6px; }
  .day-state { font-size: 7px; }
  .calendar-day progress { height: 4px; }
  .schedule-grid, .schedule-actions { grid-template-columns: 1fr; }
  .preset-row { grid-template-columns: 1.3fr .7fr; }
  .preset-row > :nth-child(3), .preset-row > :nth-child(4) { display: none; }
}


/* Predbežné zákaznícke termíny */
.legend-dot.tentative { background:#d89b21; }
.calendar-day.tentative { background:linear-gradient(180deg,rgba(216,155,33,.11),transparent 48%),#0e1419; border-color:rgba(216,155,33,.42); }
.calendar-day.tentative progress::-webkit-progress-value { background:#d89b21; }
.calendar-day.tentative progress::-moz-progress-bar { background:#d89b21; }
.day-job.tentative-job { border-style:dashed; border-color:rgba(216,155,33,.52); background:rgba(216,155,33,.07); }
.day-job.tentative-job .day-job-time span { color:#d7ad58; }

/* Upozornenie na výpadok AI / vyčerpaný limit */
.system-alert { margin: 0 0 18px; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(242,198,109,.35); background: rgba(242,198,109,.08); color: var(--yellow); font-size: 12px; line-height: 1.5; font-weight: 650; }

/* Preserve line breaks in customer additions. */
.detail-row strong { white-space: pre-wrap; overflow-wrap: anywhere; }
