/* =========================================================================
   Street Frame CRM — современная тема «графит и кармин».
   Единые токены поверх утилит Tailwind из index.html: поверхности, рамки,
   типографика, кнопки, поля, таблицы, меню. Подключается до mobile.css.
   ========================================================================= */

:root {
    --sf-bg: #07080c;
    --sf-surface: rgba(19, 21, 29, 0.78);
    --sf-surface-solid: #13151c;
    --sf-surface-2: #0c0e14;
    --sf-surface-3: rgba(255, 255, 255, 0.035);
    --sf-hover: rgba(255, 255, 255, 0.06);
    --sf-line: rgba(255, 255, 255, 0.07);
    --sf-line-strong: rgba(255, 255, 255, 0.12);
    --sf-text: #e8eaf0;
    --sf-muted: #8a91a3;
    --sf-faint: #5d6476;
    --sf-accent: #f43f5e;
    --sf-accent-2: #e11d48;
    --sf-accent-soft: rgba(244, 63, 94, 0.14);
    --sf-radius-lg: 20px;
    --sf-radius: 12px;
    --sf-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 30px -12px rgba(0, 0, 0, 0.7);
    --sf-font-display: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Фон и типографика ---------- */
html { background: var(--sf-bg); }
body {
    background:
        radial-gradient(900px 520px at 100% -10%, rgba(225, 29, 72, 0.13), transparent 60%),
        radial-gradient(800px 600px at -10% 110%, rgba(99, 102, 241, 0.07), transparent 60%),
        var(--sf-bg) !important;
    background-attachment: fixed !important;
    color: var(--sf-text);
    font-feature-settings: "cv11", "ss01", "tnum";
}
main { background: transparent !important; }

h1, h2, h3, .font-black, .font-extrabold {
    font-family: var(--sf-font-display);
    letter-spacing: -0.02em;
}
h1 { font-weight: 800 !important; }
.text-slate-400 { color: var(--sf-muted) !important; }
.text-slate-500 { color: var(--sf-faint) !important; }

/* ---------- Поверхности ---------- */
.bg-\[\#111827\], .glass-card {
    background: var(--sf-surface) !important;
    box-shadow: var(--sf-shadow);
}
.bg-\[\#111827\]\/95, .bg-\[\#111827\]\/70 { background: rgba(14, 16, 22, 0.86) !important; }
.bg-\[\#0b0f19\] { background: var(--sf-surface-2) !important; }
.bg-\[\#0b0f19\]\/90 { background: rgba(7, 8, 12, 0.82) !important; }
.bg-\[\#131b2e\], .bg-\[\#15171e\], .bg-\[\#1f293d\], .bg-\[\#17223b\] { background: var(--sf-surface-3) !important; }
.bg-slate-800, .bg-slate-800\/80, .bg-slate-800\/90 { background-color: rgba(255, 255, 255, 0.055) !important; }
.bg-slate-800\/60, .bg-slate-800\/40 { background-color: rgba(255, 255, 255, 0.04) !important; }
.hover\:bg-slate-700:hover, .hover\:bg-slate-800:hover { background-color: rgba(255, 255, 255, 0.1) !important; }
.hover\:bg-slate-800\/40:hover, .hover\:bg-slate-800\/60:hover { background-color: rgba(255, 255, 255, 0.035) !important; }

.border-slate-800, .border-slate-800\/80, .border-slate-800\/90, .border-slate-700\/80, .border-slate-700\/60 { border-color: var(--sf-line) !important; }
.border-slate-700 { border-color: var(--sf-line-strong) !important; }
.divide-slate-800\/60 > :not([hidden]) ~ :not([hidden]), .divide-slate-800 > :not([hidden]) ~ :not([hidden]) { border-color: var(--sf-line) !important; }

.rounded-2xl { border-radius: var(--sf-radius-lg) !important; }
.glass-card:hover { transform: none; border-color: var(--sf-line-strong) !important; }

/* Карточки-показатели: лёгкий подъём при наведении */
.grid > .rounded-2xl { transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
@media (hover: hover) {
    .grid > .rounded-2xl:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 18px 40px -16px rgba(0, 0, 0, 0.8); }
}

/* ---------- Шапка ---------- */
body > header {
    background: rgba(9, 10, 15, 0.72) !important;
    backdrop-filter: saturate(160%) blur(18px);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    border-bottom: 1px solid var(--sf-line) !important;
    box-shadow: none !important;
}

/* ---------- Боковое меню ---------- */
#mainAppSidebar {
    background: rgba(10, 11, 16, 0.92) !important;
    border-right: 1px solid var(--sf-line) !important;
}
#mainAppSidebar .tab-btn {
    position: relative;
    padding: 9px 12px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #a3aaba !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}
#mainAppSidebar .tab-btn { justify-content: flex-start !important; text-align: left !important; }
#mainAppSidebar .tab-btn > span:not([id]) { flex: 1 1 auto; text-align: left; line-height: 1.3; }
#mainAppSidebar .tab-btn > span[id] {
    flex: 0 0 auto;
    min-width: 22px; height: 20px;
    padding: 0 7px !important;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 9999px !important;
    font-size: 11px !important;
}
#mainAppSidebar .tab-btn:hover:not(.active) { background: var(--sf-hover) !important; color: #fff !important; }
#mainAppSidebar .tab-btn.active {
    color: #fff !important;
    background: linear-gradient(90deg, rgba(244, 63, 94, 0.18), rgba(244, 63, 94, 0.04)) !important;
    border-color: rgba(244, 63, 94, 0.22) !important;
}
#mainAppSidebar .tab-btn.active::before {
    content: "";
    position: absolute;
    left: -1px; top: 9px; bottom: 9px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--sf-accent);
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.8);
}
#mainAppSidebar .tab-btn svg, #mainAppSidebar .tab-btn i { color: #737b8e !important; }
#mainAppSidebar .tab-btn.active svg, #mainAppSidebar .tab-btn.active i { color: var(--sf-accent) !important; }

/* ---------- Кнопки ---------- */
button, a { transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease; }
button:active { transform: scale(0.98); }
.bg-gradient-to-r.from-red-600, .bg-gradient-to-br.from-red-600 {
    background-image: linear-gradient(135deg, #f43f5e 0%, #e11d48 55%, #be123c 100%) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 10px 24px -10px rgba(225, 29, 72, 0.75) !important;
}
.bg-gradient-to-r.from-emerald-600 {
    background-image: linear-gradient(135deg, #10b981 0%, #059669 60%, #0d9488 100%) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 10px 24px -12px rgba(16, 185, 129, 0.7) !important;
}

/* ---------- Поля ввода ---------- */
input[type="text"], input[type="number"], input[type="date"], input[type="month"], input[type="time"],
input[type="password"], input[type="tel"], input[type="url"], input[type="email"], select, textarea {
    background-color: var(--sf-surface-2) !important;
    border: 1px solid var(--sf-line-strong) !important;
    border-radius: var(--sf-radius) !important;
    color: var(--sf-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:hover, select:hover, textarea:hover { border-color: rgba(255, 255, 255, 0.2) !important; }
input:focus, select:focus, textarea:focus {
    outline: none !important;
    border-color: rgba(244, 63, 94, 0.7) !important;
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.14) !important;
}
::placeholder { color: #565d6e !important; }
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(0.75); cursor: pointer; }
select { background-image: none; }

/* ---------- Таблицы ---------- */
table { border-collapse: separate; border-spacing: 0; }
thead tr { background: rgba(255, 255, 255, 0.02) !important; }
thead th {
    font-size: 10.5px !important;
    letter-spacing: 0.08em !important;
    color: #7c8497 !important;
    font-weight: 700 !important;
    border-bottom: 1px solid var(--sf-line) !important;
    white-space: nowrap;
}
tbody tr { transition: background-color 0.12s ease; }
@media (hover: hover) { tbody tr:hover { background-color: rgba(255, 255, 255, 0.025) !important; } }
tfoot tr { background: linear-gradient(90deg, rgba(244, 63, 94, 0.08), transparent) !important; }
/* Кнопки действий в строках таблиц переносятся, а не уезжают за край */
td.text-right.space-x-1, td.text-right.space-x-1\.5 { white-space: normal; }
td.text-right.space-x-1 > *, td.text-right.space-x-1\.5 > * { margin: 2px 0 2px 6px !important; display: inline-flex; }

/* ---------- Бейджи ---------- */
.rounded-full.text-xs, .rounded-full.text-\[10px\], .rounded-full.text-\[11px\] { letter-spacing: 0.01em; }

/* ---------- Модальные окна ---------- */
.fixed.inset-0.bg-black\/80 {
    background: rgba(3, 4, 8, 0.7) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.fixed.inset-0.bg-black\/80 > div {
    background: var(--sf-surface-solid) !important;
    border: 1px solid var(--sf-line-strong) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 40px 80px -20px rgba(0, 0, 0, 0.85) !important;
    border-radius: 24px !important;
}

/* ---------- Нижнее меню телефона ---------- */
body > nav.fixed.bottom-0 {
    background: rgba(9, 10, 15, 0.82) !important;
    backdrop-filter: saturate(160%) blur(18px);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    border-top: 1px solid var(--sf-line) !important;
}

/* ---------- Уведомления ---------- */
#toastContainer > div { border-radius: 14px !important; backdrop-filter: blur(10px); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.8) !important; }

/* ---------- Полоса прокрутки ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent !important; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1) !important; border-radius: 9999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(244, 63, 94, 0.55) !important; background-clip: padding-box; }

/* =========================================================================
   БАЗА ЗНАНИЙ
   ========================================================================= */
.kb-hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(244, 63, 94, 0.22);
    background:
        radial-gradient(600px 260px at 85% -20%, rgba(244, 63, 94, 0.35), transparent 60%),
        radial-gradient(500px 300px at 0% 120%, rgba(99, 102, 241, 0.18), transparent 60%),
        linear-gradient(180deg, rgba(24, 16, 22, 0.95), rgba(14, 15, 21, 0.95));
    box-shadow: var(--sf-shadow);
}
.kb-hero::after {
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 18px 18px;
    mask-image: linear-gradient(90deg, transparent 0%, #000 60%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 60%);
    pointer-events: none;
}
.kb-hero > * { position: relative; z-index: 1; }
.kb-progress-track { height: 8px; border-radius: 9999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.kb-progress-bar { height: 100%; border-radius: 9999px; background: linear-gradient(90deg, #f43f5e, #fb7185); box-shadow: 0 0 16px rgba(244, 63, 94, 0.6); transition: width 0.4s ease; }

.kb-search {
    width: 100%;
    padding: 12px 14px 12px 42px !important;
    border-radius: 14px !important;
    background: rgba(7, 8, 12, 0.6) !important;
}

.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.kb-card {
    position: relative;
    text-align: left;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--sf-line);
    background: var(--sf-surface);
    box-shadow: var(--sf-shadow);
    display: flex; flex-direction: column; gap: 8px;
    min-height: 132px;
}
@media (hover: hover) { .kb-card:hover { border-color: rgba(244, 63, 94, 0.35); transform: translateY(-2px); } }
.kb-card.active {
    border-color: rgba(244, 63, 94, 0.6);
    background: linear-gradient(160deg, rgba(244, 63, 94, 0.16), rgba(19, 21, 29, 0.85) 55%);
    box-shadow: 0 0 0 1px rgba(244, 63, 94, 0.25), 0 16px 36px -18px rgba(225, 29, 72, 0.7);
}
.kb-card .kb-emoji {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--sf-line);
}
.kb-card.active .kb-emoji { background: rgba(244, 63, 94, 0.18); border-color: rgba(244, 63, 94, 0.35); }
.kb-card .kb-num { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; color: var(--sf-accent); text-transform: uppercase; }
.kb-card .kb-title { font-family: var(--sf-font-display); font-weight: 800; font-size: 14px; color: #fff; line-height: 1.25; }
.kb-card .kb-desc { font-size: 12px; color: var(--sf-muted); line-height: 1.45; }
.kb-card .kb-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--sf-faint); }
.kb-card .kb-done { color: #34d399; font-weight: 700; }
.kb-card .kb-hits { color: #fda4af; font-weight: 700; }
.kb-card.kb-hidden { display: none; }

.kb-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 1280px) { .kb-layout { grid-template-columns: minmax(0, 1fr) 260px; } }
.kb-toc { display: none; }
@media (min-width: 1280px) {
    .kb-toc { display: block; position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; }
}
.kb-toc a {
    display: block;
    padding: 7px 10px;
    border-left: 2px solid var(--sf-line);
    font-size: 12.5px;
    color: var(--sf-muted);
    line-height: 1.35;
}
.kb-toc a:hover { color: #fff; border-left-color: rgba(244, 63, 94, 0.6); background: rgba(255, 255, 255, 0.025); }
.kb-toc a.active { color: #fff; border-left-color: var(--sf-accent); }

/* Статья: удобная для чтения типографика */
.kb-article { max-width: 880px; }
.kb-article .theory-mod-section > h2 {
    font-size: clamp(1.6rem, 2.4vw, 2.2rem) !important;
    line-height: 1.15;
    text-transform: none;
    background: linear-gradient(90deg, #fff, #fecdd3);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.kb-article .theory-mod-section > p { font-size: 15px !important; color: #b4bac8 !important; }
.kb-article .glass-card { padding: 20px 22px !important; border-radius: 18px !important; }
.kb-article .glass-card > .font-bold:first-child {
    font-size: 16px !important;
    font-family: var(--sf-font-display);
    font-weight: 800 !important;
    margin-bottom: 10px !important;
}
.kb-article .text-slate-300.leading-relaxed { font-size: 14.5px !important; line-height: 1.75 !important; color: #c6cbd6 !important; }
.kb-article .uppercase.tracking-wider.text-slate-300 {
    margin-top: 32px !important;
    font-size: 12px !important;
    letter-spacing: 0.14em !important;
    color: #fda4af !important;
    display: flex; align-items: center; gap: 10px;
}
.kb-article .uppercase.tracking-wider.text-slate-300::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(244, 63, 94, 0.4), transparent); }
.kb-article table { width: 100%; font-size: 13.5px; }
.kb-article table th { padding: 12px 14px; text-align: left; background: rgba(255, 255, 255, 0.03); }
.kb-article table td { padding: 11px 14px; border-top: 1px solid var(--sf-line); color: #c6cbd6; vertical-align: top; white-space: normal; }
.kb-article .theory-notice-red {
    position: relative;
    padding: 12px 14px 12px 40px !important;
    border-radius: 12px !important;
    background: rgba(244, 63, 94, 0.08) !important;
    border: 1px solid rgba(244, 63, 94, 0.25) !important;
    color: #fecdd3 !important;
    font-size: 13.5px !important;
}
.kb-article .theory-notice-red::before { content: "⚠️"; position: absolute; left: 13px; top: 11px; }
.kb-article .theory-script-box {
    border-radius: 0 14px 14px 0 !important;
    background: linear-gradient(90deg, rgba(244, 63, 94, 0.1), rgba(244, 63, 94, 0.02)) !important;
    border-left: 3px solid var(--sf-accent) !important;
    color: #fecdd3 !important;
    font-size: 14px !important;
}
.kb-article .theory-dialogue { border-radius: 16px !important; background: var(--sf-surface-2) !important; border: 1px solid var(--sf-line) !important; font-size: 13.5px !important; }
.kb-article .badge-rate { border-radius: 8px; }
.kb-article mark, .kb-mark { background: rgba(250, 204, 21, 0.28); color: #fff; border-radius: 4px; padding: 0 2px; }
.kb-section-flash { animation: kb-flash 1.6s ease; }
@keyframes kb-flash { 0%, 40% { box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.7); } 100% { box-shadow: var(--sf-shadow); } }

.kb-footer-nav { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 28px; }
@media (min-width: 640px) { .kb-footer-nav { grid-template-columns: 1fr auto 1fr; align-items: stretch; } }
.kb-footer-nav button { padding: 14px 16px; border-radius: 16px; border: 1px solid var(--sf-line); background: var(--sf-surface); text-align: left; }
.kb-footer-nav button:hover { border-color: rgba(244, 63, 94, 0.4); }
.kb-footer-nav .kb-next { text-align: right; }
.kb-footer-nav .kb-read-btn { text-align: center; font-weight: 800; }
.kb-footer-nav .kb-read-btn.is-read { border-color: rgba(52, 211, 153, 0.45); color: #6ee7b7; background: rgba(16, 185, 129, 0.08); }

@media (max-width: 767px) {
    .kb-grid { grid-auto-flow: column; grid-auto-columns: 78%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
    .kb-card { scroll-snap-align: start; min-height: 120px; }
    .kb-article .glass-card { padding: 16px !important; }
    .kb-article .theory-mod-section > p { font-size: 14px !important; }
}

/* =========================================================================
   РАБОЧИЙ ДЕНЬ
   ========================================================================= */
.wd-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.wd-stat {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--sf-line);
    background: var(--sf-surface);
    box-shadow: var(--sf-shadow);
    min-width: 0;
}
.wd-stat-accent {
    border-color: rgba(16, 185, 129, 0.28);
    background: linear-gradient(160deg, rgba(16, 185, 129, 0.14), var(--sf-surface) 60%);
}
.wd-stat-label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sf-faint); }
.wd-stat-value { font-family: var(--sf-font-display); font-size: 24px; font-weight: 800; color: #fff; margin-top: 4px; line-height: 1.1; white-space: nowrap; }
.wd-stat-sub { font-size: 11.5px; color: var(--sf-muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wd-action {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid var(--sf-line-strong);
    min-height: 76px;
}
.wd-action-icon { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.wd-action-secondary { background: var(--sf-surface); box-shadow: var(--sf-shadow); }
.wd-action-secondary:hover { border-color: rgba(16, 185, 129, 0.45); }
.wd-action-primary {
    border-color: transparent;
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 55%, #be123c 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 16px 36px -14px rgba(225, 29, 72, 0.85);
}
.wd-action-primary:hover { filter: brightness(1.06); }

.wd-shift-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.wd-shift {
    position: relative;
    padding: 16px;
    border-radius: 22px;
    border: 1px solid var(--sf-line);
    background: var(--sf-surface);
    box-shadow: var(--sf-shadow);
    overflow: hidden;
}
.wd-shift::before {
    content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0;
    background: #34d399; box-shadow: 0 0 12px rgba(52, 211, 153, 0.7);
}
.wd-shift.is-paused::before { background: #fbbf24; box-shadow: 0 0 12px rgba(251, 191, 36, 0.6); }
.wd-shift.is-paused { background: linear-gradient(160deg, rgba(251, 191, 36, 0.07), var(--sf-surface) 50%); }

.wd-avatar {
    width: 44px; height: 44px; flex: 0 0 auto;
    border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--sf-font-display); font-weight: 800; font-size: 15px; color: #fff;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.55), rgba(190, 18, 60, 0.55));
    border: 1px solid rgba(244, 63, 94, 0.4);
}
.wd-avatar-sm { width: 36px; height: 36px; border-radius: 12px; font-size: 13px; }
.wd-avatar-xs { width: 28px; height: 28px; border-radius: 9px; font-size: 11px; }
.wd-pill {
    display: inline-flex; align-items: center; gap: 4px;
    max-width: 100%;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 11px; font-weight: 700;
    color: #cbd2de;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--sf-line);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wd-pill-green { color: #6ee7b7; background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.3); }
.wd-pill-amber { color: #fcd34d; background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.3); }
.wd-timer {
    flex: 0 0 auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px; font-weight: 800;
    padding: 6px 9px;
    border-radius: 10px;
    background: var(--sf-surface-2);
    border: 1px solid var(--sf-line);
}
.wd-progress { height: 8px; border-radius: 9999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.wd-progress-bar { height: 100%; border-radius: 9999px; background: linear-gradient(90deg, #f43f5e, #fb7185); transition: width 0.4s ease; }
.wd-progress-bar.is-done { background: linear-gradient(90deg, #10b981, #34d399); box-shadow: 0 0 12px rgba(52, 211, 153, 0.5); }

.wd-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wd-kv > div {
    padding: 8px 10px; border-radius: 12px;
    background: var(--sf-surface-2); border: 1px solid var(--sf-line);
    display: flex; flex-direction: column; gap: 2px; min-width: 0;
    font-size: 15px; font-weight: 800; color: #fff;
}
.wd-kv > div > span:first-child { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sf-faint); }
.wd-kv-btn { display: inline-flex; align-items: center; gap: 5px; color: #fda4af; font-weight: 800; }
.wd-kv-btn:hover { color: #fff; }

.wd-shift-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.wd-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 12.5px; font-weight: 700;
    color: #dbe1ea;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--sf-line);
    white-space: nowrap;
}
.wd-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.wd-btn-primary { color: #fff; border-color: transparent; background: linear-gradient(135deg, #f43f5e, #e11d48); box-shadow: 0 8px 18px -10px rgba(225, 29, 72, 0.9); }
.wd-btn-primary:hover { filter: brightness(1.08); background: linear-gradient(135deg, #f43f5e, #e11d48); }
.wd-btn-green { color: #6ee7b7; background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.35); }
.wd-btn-danger { color: #fda4af; background: rgba(244, 63, 94, 0.08); border-color: rgba(244, 63, 94, 0.3); }
.wd-btn-danger:hover { background: rgba(244, 63, 94, 0.18); color: #fff; }
.wd-icon-btn { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--sf-faint); }
.wd-icon-btn:hover { color: #fda4af; background: rgba(244, 63, 94, 0.1); }

.wd-empty {
    grid-column: 1 / -1;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 36px 16px; text-align: center;
    border-radius: 22px; border: 1px dashed var(--sf-line-strong);
    background: rgba(255, 255, 255, 0.015);
}
.wd-empty-icon { width: 56px; height: 56px; border-radius: 18px; display: flex; align-items: center; justify-content: center; color: #fda4af; background: rgba(244, 63, 94, 0.1); border: 1px solid rgba(244, 63, 94, 0.25); margin-bottom: 6px; }

.wd-receipt { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
@media (hover: hover) { .wd-receipt:hover { background: rgba(255, 255, 255, 0.02); } }
.wd-receipt-time { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--sf-faint); width: 40px; flex: 0 0 auto; }

/* Окна рабочего дня */
.wd-pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 42vh; overflow-y: auto; padding-right: 2px; }
.wd-pick {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--sf-line);
    background: var(--sf-surface-2);
}
.wd-pick:hover:not(:disabled) { border-color: var(--sf-line-strong); }
.wd-pick:disabled { opacity: 0.45; cursor: not-allowed; }
.wd-pick.active { border-color: rgba(16, 185, 129, 0.6); background: rgba(16, 185, 129, 0.08); }
.wd-radio { width: 20px; height: 20px; flex: 0 0 auto; border-radius: 9999px; border: 2px solid #475063; }
.wd-pick.active .wd-radio { border-color: #34d399; background: radial-gradient(circle, #34d399 45%, transparent 50%); }

.wd-chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
.wd-chip {
    display: flex; align-items: center; gap: 8px;
    flex: 0 0 auto; max-width: 220px;
    padding: 8px 12px 8px 8px;
    border-radius: 14px;
    border: 1px solid var(--sf-line);
    background: var(--sf-surface-2);
    scroll-snap-align: start;
}
.wd-chip.active { border-color: rgba(244, 63, 94, 0.65); background: rgba(244, 63, 94, 0.1); box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.12); }

.wd-amount-box { position: relative; }
.wd-amount-input {
    width: 100%;
    padding: 18px 48px 18px 18px !important;
    font-family: var(--sf-font-display);
    font-size: 40px !important;
    font-weight: 800;
    text-align: center;
    border-radius: 18px !important;
    letter-spacing: -0.02em;
    -moz-appearance: textfield;
}
.wd-amount-input::-webkit-outer-spin-button, .wd-amount-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wd-amount-currency { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 800; color: var(--sf-faint); pointer-events: none; }
#receiptModal .receipt-chip { padding: 10px 4px; font-size: 13px; }

.wd-segment { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--sf-surface-2); border: 1px solid var(--sf-line); }
.wd-segment-btn { flex: 1; padding: 11px 8px; border-radius: 11px; font-size: 14px; font-weight: 700; color: var(--sf-muted); }
.wd-segment-btn.active { color: #fff; background: rgba(255, 255, 255, 0.1); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 4px 12px -6px rgba(0, 0, 0, 0.8); }

.wd-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wd-preview > div { padding: 10px; border-radius: 12px; background: rgba(244, 63, 94, 0.06); border: 1px solid rgba(244, 63, 94, 0.18); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wd-preview span { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sf-faint); }
.wd-preview b { font-size: 15px; color: #fff; white-space: nowrap; }
.wd-mini { padding: 10px 12px; border-radius: 14px; background: var(--sf-surface-2); border: 1px solid var(--sf-line); min-width: 0; }

/* Плавающая кнопка «+ Чек» (только телефон) */
.wd-fab { display: none; }
@media (max-width: 767px) {
    .wd-fab:not(.hidden) {
        display: inline-flex; align-items: center; gap: 6px;
        position: fixed; right: 16px; z-index: 35;
        bottom: calc(var(--sf-nav-h, 64px) + 14px + env(safe-area-inset-bottom, 0px));
        padding: 14px 20px;
        border-radius: 9999px;
        font-size: 15px; font-weight: 800; color: #fff;
        background: linear-gradient(135deg, #f43f5e, #e11d48 60%, #be123c);
        box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 16px 34px -10px rgba(225, 29, 72, 0.9);
    }
    .wd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .wd-stat { padding: 12px 14px; }
    .wd-stat-value { font-size: 21px; }
    .wd-shift-grid { grid-template-columns: minmax(0, 1fr); }
    .wd-shift-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wd-btn { min-height: 44px; font-size: 13.5px; }
    .wd-action { padding: 14px; min-height: 64px; gap: 10px; }
    .wd-action-icon { width: 38px; height: 38px; }
    .wd-amount-input { font-size: 36px !important; }
    /* На телефоне уведомления сверху, под шапкой: не закрывают кнопки в шторках и плавающую кнопку */
    #startShiftLocationChips .receipt-chip { flex: 0 0 auto; padding: 7px 11px; font-size: 13px; }
}
