/* ATAS Web design system (WEB-4) — ported from the design prototype.
   Every terminal surface (header, module toolbars, dropdowns, modals, footer,
   cookie consent) shares these variables and building blocks. */

:root {
    --bg-app: #0a0c14;
    --bg-tabsbar: #06070d;
    --bg-panel: #0d0f1c;
    --bg-toolbar: #0f1222;
    --bg-chart: #0b0d18;
    --bg-hover: #191d33;
    --bg-active: #232849;
    --bg-menu: #13162b;
    --bg-modal: #14172c;
    --border: #1d2138;
    --border-light: #2b3153;
    --text: #d3d6e6;
    --text-muted: #6a708e;
    --text-dim: #464c68;
    --accent: #7c5cfc;          /* violet — active elements, CTA */
    --accent-hover: #8f73ff;
    --green: #1fc77e;
    --red: #e2605e;
    --warn: #f2b53d;            /* delayed-data indication */
    --radius: 6px;
}

/* ============ HEADER (top tabs bar) ============ */
.tabs-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 12px;
    background: var(--bg-tabsbar);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    position: relative;
    z-index: 80;
}

.tabs-bar button { font-family: inherit; font-size: inherit; color: inherit; background: none; border: none; cursor: pointer; }

.brand {
    display: flex; align-items: center; gap: 8px;
    margin-right: 10px;
    user-select: none;
    flex-shrink: 0;
}
.brand .brand-logo { height: 26px; display: block; }
.brand .brand-name { font-size: 15px; font-weight: 800; letter-spacing: .06em; color: #fff; }

.addwidget-btn {
    display: flex; align-items: center; gap: 7px;
    height: 32px; padding: 0 12px;
    margin-right: 4px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light) !important;
    color: var(--text) !important;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.addwidget-btn:hover { background: var(--bg-hover) !important; border-color: var(--text-muted) !important; }

.ws-tabs-strip { display: flex; align-items: center; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ws-tabs-strip::-webkit-scrollbar { display: none; }

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px 0 16px;
    min-width: 120px;
    border-radius: var(--radius);
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    user-select: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s, color .12s;
}
.tab:hover { background: var(--bg-hover); }
.tab.active {
    background: var(--bg-active);
    border-color: var(--border-light);
    color: var(--text);
}
.tab .tab-title { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab .tab-close {
    display: flex; align-items: center; justify-content: center;
    width: 18px; height: 18px;
    border-radius: 4px;
    color: var(--text-muted);
    opacity: 0;
}
.tab:hover .tab-close, .tab.active .tab-close { opacity: 1; }
.tab .tab-close:hover { background: var(--border-light); color: var(--text); }
.tab .tab-rename { background: var(--bg-hover); color: var(--text); border: 1px solid var(--accent); border-radius: 4px; padding: 2px 6px; font-size: 13px; width: 110px; outline: none; }

.tab-add {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: var(--radius);
    color: var(--text-muted);
    flex-shrink: 0;
}
.tab-add:hover { background: var(--bg-hover); color: var(--text); }

.tabs-bar .spacer { flex: 1; }

.connector {
    display: flex; align-items: center; gap: 7px;
    height: 32px; padding: 0 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    white-space: nowrap;
    cursor: default;
    user-select: none;
    flex-shrink: 0;
}
.connector .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--warn);
    box-shadow: 0 0 6px rgba(242, 181, 61, .7);
    flex-shrink: 0;
}
.connector .c-name { color: var(--text); font-weight: 600; }

.promo-btn {
    display: flex; align-items: center; gap: 7px;
    height: 32px; padding: 0 16px;
    border-radius: var(--radius);
    background: var(--accent) !important;
    color: #fff !important;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .12s;
}
.promo-btn:hover { background: var(--accent-hover) !important; }

.menu-btn {
    display: flex; align-items: center; gap: 7px;
    height: 32px; padding: 0 12px;
    border-radius: var(--radius);
    color: var(--text);
    font-weight: 600;
    flex-shrink: 0;
}
.menu-btn:hover { background: var(--bg-hover); }

/* the header language switcher — a compact menu-btn variant with the globe icon */
.lang-btn { gap: 5px; padding: 0 9px; color: var(--text-muted); font-weight: 600; font-size: 12px; }
.lang-btn:hover { color: var(--text); }
.lang-btn svg { flex-shrink: 0; }

.signin-btn {
    display: flex; align-items: center;
    height: 32px; padding: 0 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light) !important;
    color: var(--text) !important;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.signin-btn:hover { background: var(--bg-hover) !important; border-color: var(--text-muted) !important; }

/* ============ MODULE TOOLBARS (chart / heatmap headers) ============ */
.chart-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 40px;
    padding: 0 8px;
    background: var(--bg-toolbar);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    position: relative;
}

.chart-toolbar button { font-family: inherit; font-size: inherit; color: inherit; background: none; border: none; cursor: pointer; }

.tb-btn {
    display: flex; align-items: center; gap: 5px;
    height: 28px;
    padding: 0 7px;
    border-radius: 4px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.tb-btn:hover:not(:disabled) { background: var(--bg-hover); color: var(--text); }
.tb-btn.text { color: var(--text); }
.tb-btn.active { background: var(--bg-active); color: var(--text); }
.tb-btn:disabled { opacity: .4; cursor: default; }

.tb-instrument { font-weight: 700; color: var(--text); }
.tb-lots b { color: var(--text); font-weight: 700; margin-right: 3px; }

.tf-btn { font-weight: 600; padding: 0 8px; }
.tf-btn.active {
    color: var(--accent-hover);
    background: rgba(124, 92, 252, .14);
}

.tb-sep {
    width: 1px; height: 20px;
    background: var(--border-light);
    margin: 0 5px;
    flex-shrink: 0;
}

.tb-right { margin-left: auto; display: flex; align-items: center; gap: 2px; }

/* ============ DROPDOWNS (context menus) ============ */
.dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 180px;
    background: var(--bg-menu);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(0,0,0,.5);
    padding: 5px;
    z-index: 1000;
}
.dropdown.align-right { left: auto; right: 0; }
.dropdown button { font-family: inherit; font-size: inherit; color: inherit; background: none; border: none; cursor: pointer; }
.dropdown .dd-item {
    display: flex; align-items: center; gap: 9px;
    width: 100%;
    padding: 7px 10px;
    border-radius: 4px;
    color: var(--text);
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}
.dropdown .dd-item:hover { background: var(--bg-hover); }
.dropdown .dd-item.selected { color: var(--accent-hover); }
.dropdown .dd-item.disabled { opacity: .38; pointer-events: none; }
.dropdown .dd-item.available { color: #fff; font-weight: 600; }
.dropdown .dd-item.available .ic { color: var(--accent-hover); }
.dropdown .dd-sep { height: 1px; background: var(--border); margin: 5px 4px; }

.dd-item .chk { width: 14px; display: flex; justify-content: center; flex-shrink: 0; }
.dd-item .chk svg { visibility: hidden; }
.dd-item.checked > .chk svg { visibility: visible; }

.dd-item .ic { width: 16px; display: flex; justify-content: center; flex-shrink: 0; color: var(--text-muted); }
.dd-item.selected .ic { color: var(--accent-hover); }

.dd-item.has-sub { position: relative; }
.dd-item .sub-arrow { margin-left: auto; padding-left: 14px; color: var(--text-muted); display: flex; }
.submenu {
    display: none;
    position: absolute;
    left: calc(100% + 2px); top: -6px;
    min-width: 170px;
    background: var(--bg-menu);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(0,0,0,.5);
    padding: 5px;
}
.dd-item.has-sub:hover > .submenu { display: block; }
/* submenus of right-aligned dropdowns open towards the screen center */
.submenu.open-left { left: auto; right: calc(100% + 2px); }

.dd-desc {
    padding: 8px 10px 10px;
    max-width: 280px;
    white-space: normal;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.dd-item .scale-input {
    width: 52px;
    margin-left: auto;
    padding: 3px 6px;
    background: var(--bg-toolbar);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    color: var(--text);
    font-family: inherit;
    font-size: 12px;
}
.dd-item .scale-input:disabled { opacity: .45; }

/* invisible click-away layer under an open dropdown */
.dd-backdrop { position: fixed; inset: 0; z-index: 999; }

/* ============ TIMEFRAME PANEL ============ */
.tf-panel { min-width: 340px; padding: 14px; }
.tf-panel .tf-group { color: var(--text-muted); font-size: 10.5px; letter-spacing: .06em; font-weight: 700; margin: 12px 2px 8px; }
.tf-panel .tf-group:first-child { margin-top: 2px; }
.tf-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.tf-chip {
    min-width: 46px; height: 34px; padding: 0 12px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-light) !important;
    border-radius: 7px;
    background: transparent;
    color: var(--text);
    font-weight: 600; font-size: 12.5px;
}
.tf-chip:hover { background: var(--bg-hover) !important; }
.tf-chip.active { border-color: var(--accent) !important; color: var(--accent-hover) !important; background: rgba(124,92,252,.12) !important; }

/* ============ MODALS ============ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .55);
    display: flex;
    align-items: center; justify-content: center;
    z-index: 2000;
}

.modal {
    width: 300px;
    background: var(--bg-modal);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0,0,0,.6);
    padding: 16px;
    color: var(--text);
    font-size: 13px;
}
.modal button { font-family: inherit; font-size: inherit; color: inherit; background: none; border: none; cursor: pointer; }
.modal-close {
    display: flex; align-items: center; justify-content: center;
    width: 22px; height: 22px;
    border-radius: 4px;
    color: var(--text-muted);
}
.modal-close:hover { background: var(--bg-hover); color: var(--text); }

.modal-actions {
    display: flex; justify-content: space-between; gap: 10px;
    margin-top: 16px;
}
.modal-actions button {
    flex: 1;
    height: 34px;
    border-radius: 6px;
    font-weight: 600;
}
.btn-secondary { background: var(--bg-active) !important; color: var(--text) !important; }
.btn-secondary:hover { background: var(--border-light) !important; }
.btn-primary { background: var(--accent) !important; color: #fff !important; }
.btn-primary:hover { background: var(--accent-hover) !important; }

/* ============ CALENDAR (Go to date) ============ */
.cal-box {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    min-height: 220px;
}
.cal-nav {
    display: flex; align-items: center;
    padding: 2px 4px 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
}
.cal-nav .cal-month {
    flex: 1;
    text-align: center;
    font-weight: 700;
    color: var(--text);
}
.cal-nav button {
    display: flex; align-items: center; justify-content: center;
    width: 22px; height: 22px;
    border-radius: 4px;
    color: var(--text-muted);
}
.cal-nav button:hover { background: var(--bg-hover); color: var(--text); }
.cal-nav button:disabled { opacity: .3; pointer-events: none; }

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.cal-day {
    height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 5px;
    font-size: 12.5px;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}
.cal-day:hover { background: var(--bg-hover); }
.cal-day.head { color: var(--text-dim); cursor: default; }
.cal-day.head:hover { background: transparent; }
.cal-day.other { color: var(--text-dim); }
.cal-day.weekend { color: #c9877f; }
.cal-day.today { background: #1b4a41; color: #fff; }
.cal-day.sel { background: var(--accent); color: #fff; }

.cal-today-btn {
    display: block;
    margin: 12px auto 0;
    padding: 5px 14px;
    border-radius: 5px;
    background: var(--bg-active) !important;
    color: var(--text) !important;
    font-weight: 600;
}
.cal-today-btn:hover { background: var(--border-light) !important; }

/* ============ UPGRADE (feature limitation) MODAL ============ */
.download-modal {
    position: relative;
    width: 580px;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    text-align: left;
    padding: 32px 32px 26px;
}
.download-modal .modal-close { position: absolute; top: 14px; right: 14px; }
.dl-title {
    text-align: center;
    font-size: 27px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 18px;
}
.dl-sub {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 14px;
}
.dl-sub:last-of-type { margin-bottom: 22px; }
.dl-cards { display: flex; flex-direction: column; gap: 14px; }
.dl-card {
    background: #1a1f38;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 22px 22px 20px;
    display: flex;
    flex-direction: column;
}
.dl-card h3 {
    display: flex; align-items: center; gap: 10px;
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 14px;
}
.badge-new {
    background: linear-gradient(90deg, #b44bf2, #ff4fa0);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
}
.dl-list { padding: 0; margin: 0 0 18px; flex: 1; }
.dl-list li {
    list-style: none;
    display: flex; align-items: flex-start; gap: 10px;
    margin: 8px 0;
    color: var(--text);
    font-size: 13.5px;
    line-height: 1.4;
}
.dl-list li svg { margin-top: 3px; color: var(--green); flex-shrink: 0; }
.dl-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dl-btns.single { grid-template-columns: 1fr; max-width: 260px; }
.dl-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    background: var(--accent) !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 12.5px;
    white-space: nowrap;
    text-decoration: none;
    transition: background .12s;
}
.dl-btn:hover { background: var(--accent-hover) !important; }
.dl-btn.secondary { background: var(--bg-active) !important; color: var(--text) !important; }
.dl-btn.secondary:hover { background: var(--border-light) !important; }

.dl-stay {
    display: block;
    width: 100%;
    margin: 20px 0 0;
    padding: 4px;
    text-align: center;
}
.dl-stay .dl-stay-link {
    display: block;
    color: var(--accent-hover);
    font-size: 14px;
    font-weight: 600;
}
.dl-stay:hover .dl-stay-link { text-decoration: underline; text-underline-offset: 3px; }
.dl-stay .dl-stay-note {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12.5px;
}

/* ============ SIGN UP / SIGN IN MODALS ============ */
.signup-modal {
    position: relative;
    width: 420px;
    max-width: calc(100vw - 48px);
    padding: 30px 32px 26px;
    text-align: left;
}
.signup-modal .modal-close { position: absolute; top: 14px; right: 14px; }
.signup-title {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}
.signup-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 22px;
}
.form-hint {
    display: flex;
    gap: 10px;
    padding: 11px 13px;
    margin: 18px 0 20px;
    border-radius: 8px;
    background: rgba(124, 92, 252, .12);
    border: 1px solid rgba(124, 92, 252, .28);
    color: var(--text);
    font-size: 12.5px;
    line-height: 1.5;
}
.form-hint svg { flex-shrink: 0; margin-top: 1px; color: var(--accent-hover); }
.form-error {
    padding: 10px 13px;
    margin: 0 0 16px;
    border-radius: 8px;
    background: rgba(226, 96, 94, .12);
    border: 1px solid rgba(226, 96, 94, .35);
    color: var(--text);
    font-size: 12.5px;
    line-height: 1.5;
}
.form-field { margin-bottom: 18px; }
.form-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.form-field .req { color: var(--accent-hover); }
.form-field input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}
.form-field input::placeholder { color: var(--text-dim); }
.form-field input:focus { border-color: var(--accent); }

.form-check {
    display: flex; align-items: flex-start; gap: 10px;
    margin: 12px 0;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}
.form-check input {
    appearance: none;
    width: 18px; height: 18px;
    margin: 1px 0 0;
    border: 1.5px solid var(--accent);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-grid;
    place-content: center;
}
.form-check input::before {
    content: "";
    width: 10px; height: 8px;
    transform: scale(0);
    background: #fff;
    clip-path: polygon(11% 45%, 0 62%, 38% 100%, 100% 18%, 87% 5%, 36% 71%);
}
.form-check input:checked { background: var(--accent); }
.form-check input:checked::before { transform: scale(1); }
.form-check a { color: var(--accent-hover); text-decoration: none; }
.form-check a:hover { text-decoration: underline; }

.signup-submit {
    width: 100%;
    height: 44px;
    margin-top: 22px;
    border-radius: 8px;
    background: var(--accent) !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 14px;
    transition: background .12s;
}
.signup-submit:hover { background: var(--accent-hover) !important; }
.signup-submit:disabled {
    background: var(--bg-active) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
}
.signup-footer {
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
    color: var(--text);
    font-weight: 600;
}
.signup-footer a { color: var(--accent-hover); text-decoration: none; margin-left: 4px; cursor: pointer; }
.signup-footer a:hover { text-decoration: underline; }

/* ============ FOOTER ============ */
.terminal-footer {
    flex-shrink: 0;
    background: var(--bg-tabsbar);
    border-top: 1px solid var(--border);
    padding: 0 16px;
    height: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 10.5px;
    white-space: nowrap;
    overflow: hidden;
}
.terminal-footer .f-col { color: var(--text-muted); }
.terminal-footer .f-links {
    flex: 1;
    display: flex;
    gap: 18px;
    justify-content: flex-end;
    min-width: 0;
    overflow: hidden;
}
.terminal-footer .f-links a {
    color: var(--text-muted);
    text-decoration: none;
}
.terminal-footer .f-links a:hover { color: var(--text); }

/* ============ COOKIE CONSENT ============ */
.cookie-banner {
    position: fixed;
    left: 16px; bottom: 44px;
    width: 460px;
    max-width: calc(100vw - 32px);
    background: var(--bg-modal);
    color: var(--text);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: 0 10px 36px rgba(0,0,0,.55);
    padding: 20px 22px 18px;
    z-index: 1500;
    font-size: 13px;
}
.cookie-banner h3 { font-size: 15.5px; font-weight: 700; margin: 0 0 10px; color: #fff; }
.cookie-banner p { font-size: 13px; line-height: 1.55; color: var(--text-muted); margin: 0; }
.cookie-banner a { color: var(--accent-hover); text-decoration: none; }
.cookie-banner a:hover { text-decoration: underline; }
.cookie-actions { display: flex; gap: 12px; margin-top: 16px; }
.cookie-actions button {
    flex: 1;
    height: 38px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 13.5px;
    font-family: inherit;
    cursor: pointer;
}
.cookie-btn-outline { border: 1px solid var(--border-light); color: var(--text); background: transparent; }
.cookie-btn-outline:hover { background: var(--bg-hover); border-color: var(--text-muted); }
.cookie-btn-fill { background: var(--accent); color: #fff; border: none; }
.cookie-btn-fill:hover { background: var(--accent-hover); }

.cookie-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: flex-start; justify-content: center;
    padding: 24px;
    z-index: 2100;
    overflow-y: auto;
}
.cookie-modal {
    width: 760px;
    max-width: 100%;
    background: var(--bg-modal);
    color: var(--text);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0,0,0,.6);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 48px);
    font-size: 13px;
}
.cookie-modal button { font-family: inherit; cursor: pointer; }
.cookie-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}
.cookie-head h2 { font-size: 17px; font-weight: 700; color: #fff; margin: 0; }
.cookie-head .cookie-close { color: var(--text-muted); width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 4px; background: none; border: none; }
.cookie-head .cookie-close:hover { background: var(--bg-hover); color: var(--text); }
.cookie-body { padding: 18px 24px 6px; overflow-y: auto; }
.cookie-body .cookie-intro { font-size: 13px; line-height: 1.6; color: var(--text-muted); padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.cookie-intro .show-more { color: var(--accent-hover); cursor: pointer; display: inline-block; margin-top: 6px; }

.cookie-cat { padding: 16px 0 14px; border-bottom: 1px solid var(--border); }
.cookie-cat:last-child { border-bottom: none; }
.cookie-cat-head { display: flex; align-items: center; gap: 10px; }
.cookie-cat-head .cat-arrow { color: var(--text-dim); display: flex; }
.cookie-cat-head .cat-name { font-weight: 700; font-size: 14px; flex: 1; color: var(--text); }
.cookie-cat-head .always-active { color: var(--green); font-weight: 600; font-size: 13px; }
.cookie-cat p { font-size: 13px; line-height: 1.6; color: var(--text-muted); margin: 8px 0 0; padding-left: 26px; }

.switch { position: relative; width: 40px; height: 20px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
    position: absolute; inset: 0;
    background: var(--bg-active);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    cursor: pointer;
    transition: background .15s;
}
.switch .slider::before {
    content: "";
    position: absolute;
    width: 14px; height: 14px;
    left: 2px; top: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: transform .15s, background .15s;
}
.switch input:checked + .slider { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(20px); background: #fff; }

.cookie-foot {
    padding: 16px 24px 10px;
    border-top: 1px solid var(--border);
}
.cookie-foot .cookie-actions { margin-top: 0; }

/* ============ GLOBAL DRAWING TOOLS SIDEBAR ============ */
.draw-tools {
    width: 44px;
    flex: 0 0 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 0;
    background: var(--bg-toolbar);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    scrollbar-width: none;
}
.draw-tools::-webkit-scrollbar { display: none; }
.draw-tools button { background: none; border: none; cursor: pointer; font-family: inherit; }

.dt-btn {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 4px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.dt-btn:hover:not(:disabled) { background: var(--bg-hover); color: var(--text); }
.dt-btn.active { background: var(--bg-active); color: var(--accent); }
.dt-btn:disabled { opacity: .4; cursor: default; }

.dt-sep {
    width: 24px; height: 1px;
    background: var(--border-light);
    margin: 6px 0;
    flex-shrink: 0;
}
.dt-spacer { flex: 1; min-height: 6px; }
