/* ─── Botiq Panel · main.css ─────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Onest:wght@300;400;500;600;700;800&display=swap');

/* ── Variables ── */
:root {
    --g: #16a872;
    --gd: #0d9060;
    --gl: #f0fdf8;
    --gb: #a7f3d0;
    /* secondary "AI" accent — used only in glows/gradients */
    --ai: #6366f1;
    --ai2: #22d3ee;

    --bg: #f6f8f9;
    --s0: #ffffff;
    --s1: #ffffff;
    --s2: #f8f9fb;
    --s3: #f0f2f5;

    --b1: #e7eaee;
    --b2: #f0f2f5;

    --t1: #0d1424;
    --t2: #424b5b;
    --t3: #9ca3af;

    /* gradients (borrowed from landing) */
    --grad-g: linear-gradient(135deg, #1bbd80 0%, #0d9060 100%);
    --grad-ai: linear-gradient(135deg, #16a872 0%, #14b8a6 45%, #6366f1 100%);
    --grad-text: linear-gradient(120deg, #16a872 0%, #0fb38f 50%, #2f9bd8 100%);

    --r8: 8px;
    --r12: 12px;
    --r16: 16px;
    --r20: 20px;
    --r24: 24px;

    --sidebar-w: 220px;
    --header-h: 56px;

    /* layered shadows (borrowed from landing) */
    --shadow: 0 2px 4px rgba(13, 20, 36, .04), 0 8px 24px rgba(13, 20, 36, .06);
    --shadow-lg: 0 4px 8px rgba(13, 20, 36, .04), 0 24px 48px rgba(13, 20, 36, .10);
    --shadow-glow: 0 12px 32px rgba(22, 168, 114, .22);
}

/* ── Reset ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Onest', sans-serif;
    background: var(--bg);
    color: var(--t1);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Ambient page backdrop: soft color wash + faint grid (borrowed from landing) */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(58% 48% at 82% 2%, rgba(99, 102, 241, .07) 0%, transparent 60%),
        radial-gradient(55% 45% at 6% 3%, rgba(22, 168, 114, .10) 0%, transparent 55%),
        radial-gradient(70% 60% at 50% 102%, rgba(34, 211, 238, .05) 0%, transparent 60%);
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(13, 20, 36, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13, 20, 36, .035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 0%, transparent 75%);
    pointer-events: none;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    font-family: inherit;
}

input,
textarea,
select {
    font-family: inherit;
}

/* ── Layout ── */
.layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    grid-template-rows: var(--header-h) 1fr;
    min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
    grid-row: 1 / 3;
    background: var(--s0);
    border-right: 1px solid var(--b1);
    display: flex;
    flex-direction: column;
    padding: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    height: var(--header-h);
    border-bottom: 1px solid var(--b1);
    flex-shrink: 0;
}

.sidebar-logo img {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.sidebar-logo span {
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -.3px;
}

.sidebar-logo em {
    color: var(--g);
    font-style: normal;
}

.sidebar-nav {
    padding: 12px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-section {
    font-size: 10px;
    font-weight: 700;
    color: var(--t3);
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 12px 10px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--r8);
    color: var(--t2);
    font-size: 13px;
    font-weight: 500;
    transition: all .15s;
    position: relative;
}

.nav-item:hover {
    background: var(--s2);
    color: var(--t1);
}

.nav-item.active {
    background: var(--gl);
    color: var(--g);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--g);
}

.nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: .7;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
    opacity: 1;
}

.sidebar-bottom {
    padding: 12px 10px;
    border-top: 1px solid var(--b1);
    flex-shrink: 0;
}

.support-wrap {
    position: relative;
    margin-bottom: 6px;
}

.support-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border-radius: var(--r8);
    color: var(--t2);
    font-size: 13px;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    transition: background .15s, color .15s;
    text-align: left;
}

.support-btn:hover {
    background: var(--s2);
    color: var(--t1);
}

.support-btn .nav-icon {
    opacity: .7;
}

.support-btn:hover .nav-icon {
    opacity: 1;
}

.support-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--s0);
    border: 1px solid var(--b1);
    border-radius: var(--r8);
    padding: 8px 10px;
    box-shadow: var(--shadow);
    align-items: center;
    gap: 6px;
    z-index: 100;
}

.support-popup.open {
    display: flex;
}

.support-email {
    flex: 1;
    font-size: 12px;
    font-weight: 500;
    color: var(--t1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: all;
}

.support-copy {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--t3);
    border-radius: 4px;
    transition: color .15s, background .15s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.support-copy:hover {
    color: var(--g);
    background: var(--gl);
}

.plan-badge {
    background: var(--s2);
    border: 1px solid var(--b1);
    border-radius: var(--r12);
    padding: 10px 12px;
    transition: border-color .15s, background .15s;
}

.plan-badge:hover {
    border-color: var(--gb);
    background: var(--s3);
}

.plan-badge-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--g);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.plan-badge-bar-bg {
    height: 4px;
    background: var(--s3);
    border-radius: 99px;
    overflow: hidden;
}

.plan-badge-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--g), var(--gd));
    border-radius: 99px;
    transition: width .4s ease;
}

.plan-badge-label {
    font-size: 10px;
    color: var(--t3);
    margin-top: 5px;
}

/* ── Header ── */
.header {
    grid-column: 2;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--b1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--t1);
}

.header-sub {
    font-size: 12px;
    color: var(--t3);
    margin-top: 1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--r8);
    font-size: 13px;
    font-weight: 600;
    border: none;
    transition: all .15s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--grad-g);
    color: #fff;
    box-shadow: 0 4px 12px rgba(22, 168, 114, .18);
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-ghost {
    background: transparent;
    color: var(--t2);
    border: 1px solid var(--b1);
}

.btn-ghost:hover {
    background: var(--s2);
    color: var(--t1);
}

.btn-danger {
    background: rgba(239, 68, 68, .12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, .2);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, .2);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--g), var(--gd));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

/* ── Main content ── */
.main {
    grid-column: 2;
    padding: 28px;
    overflow-y: auto;
}

/* ── Cards ── */
.card {
    background: var(--s1);
    border: 1px solid var(--b1);
    border-radius: var(--r16);
    padding: 20px;
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--t1);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title-sub {
    font-size: 12px;
    font-weight: 400;
    color: var(--t3);
}

/* ── Stat cards ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--s1);
    border: 1px solid var(--b1);
    border-radius: var(--r16);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    transition: transform .15s ease, box-shadow .15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--t1);
    letter-spacing: -.5px;
    line-height: 1;
}

.stat-delta {
    font-size: 12px;
    color: var(--t3);
    margin-top: 5px;
}

.stat-delta.up {
    color: var(--g);
}

.stat-delta.down {
    color: #f87171;
}

/* ── Table ── */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    font-size: 12px;
    font-weight: 700;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 0 12px 12px;
    text-align: left;
    border-bottom: 1px solid var(--b1);
}

tbody tr {
    border-bottom: 1px solid var(--b1);
    transition: background .12s;
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--s2);
}

tbody td {
    padding: 12px;
    font-size: 13px;
    color: var(--t2);
}

tbody td:first-child {
    color: var(--t1);
    font-weight: 500;
}

/* ── Status badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
}

.badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.badge-confirmed {
    background: var(--gl);
    color: var(--g);
}

.badge-pending {
    background: rgba(245, 158, 11, .1);
    color: #fbbf24;
}

.badge-cancelled {
    background: rgba(239, 68, 68, .1);
    color: #f87171;
}

/* ── Resource dot ── */
.resource-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--t2);
}

.resource-dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dot-color, var(--g));
    flex-shrink: 0;
}

/* ── Toggle switch ── */
.toggle {
    position: relative;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-track {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 99px;
    transition: background .2s;
    cursor: pointer;
}

.toggle input:checked+.toggle-track {
    background: var(--g);
}

.toggle-track::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s;
}

.toggle input:checked+.toggle-track::after {
    transform: translateX(16px);
}

/* ── Form elements ── */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--t2);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    background: var(--s0);
    border: 1.5px solid var(--b1);
    border-radius: var(--r8);
    padding: 9px 12px;
    font-size: 13px;
    color: var(--t1);
    outline: none;
    transition: border-color .15s;
}

.form-input:focus {
    border-color: var(--g);
    box-shadow: 0 0 0 3px rgba(22,168,114,.12);
}

.form-input::placeholder {
    color: var(--t3);
}

select.form-input {
    appearance: none;
}

.form-hint {
    font-size: 12px;
    color: var(--t3);
    margin-top: 5px;
}

/* ── Calendar grid ── */
.cal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.cal-nav {
    display: flex;
    gap: 4px;
}

.cal-nav-btn {
    width: 30px;
    height: 30px;
    background: var(--s2);
    border: 1px solid var(--b1);
    border-radius: var(--r8);
    color: var(--t2);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .15s;
}

.cal-nav-btn:hover {
    background: var(--s3);
    color: var(--t1);
}

.cal-date-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--t1);
}

.cal-resources {
    display: grid;
    gap: 1px;
    background: var(--b1);
    border: 1px solid var(--b1);
    border-radius: var(--r12);
    overflow: hidden;
}

.cal-resource-header {
    display: grid;
    background: var(--s2);
}

.cal-res-col {
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 700;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: .05em;
    border-right: 1px solid var(--b1);
    display: flex;
    align-items: center;
    gap: 7px;
}

.cal-res-col:last-child {
    border-right: none;
}

.cal-res-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cal-time-grid {
    display: grid;
    background: var(--s1);
}

.cal-time-row {
    display: grid;
    border-bottom: 1px solid var(--b1);
    min-height: 52px;
}

.cal-time-row:last-child {
    border-bottom: none;
}

.cal-time-label {
    padding: 8px 12px;
    font-size: 11px;
    color: var(--t3);
    font-weight: 500;
    border-right: 1px solid var(--b1);
    display: flex;
    align-items: flex-start;
    width: 60px;
    flex-shrink: 0;
}

.cal-slot {
    padding: 6px 8px;
    border-right: 1px solid var(--b1);
    position: relative;
}

.cal-slot:last-child {
    border-right: none;
}

.cal-booking {
    background: var(--gl);
    border: 1px solid var(--gb);
    border-left: 3px solid var(--g);
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: background .12s;
}

.cal-booking:hover {
    background: rgba(22, 168, 114, .18);
}

.cal-booking-name {
    font-weight: 700;
    color: var(--t1);
}

.cal-booking-service {
    color: var(--t3);
    margin-top: 1px;
}

/* ── Service list ── */
.service-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--b1);
}

.service-item:last-child {
    border-bottom: none;
}

.service-info {
    flex: 1;
    min-width: 0;
}

.service-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--t1);
}

.service-meta {
    font-size: 11px;
    color: var(--t3);
    margin-top: 2px;
}

.service-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--t1);
    margin-right: 12px;
}

/* ── Bar chart ── */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 80px;
    padding-top: 4px;
}

.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.bar {
    width: 100%;
    background: var(--gl);
    border: 1px solid var(--gb);
    border-radius: 4px 4px 0 0;
    transition: background .15s;
    min-height: 4px;
}

.bar.today {
    background: var(--g);
    border-color: var(--g);
}

.bar-label {
    font-size: 10px;
    color: var(--t3);
    font-weight: 500;
}

/* ── Top questions ── */
.question-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--b1);
}

.question-item:last-child {
    border-bottom: none;
}

.question-text {
    flex: 1;
    font-size: 13px;
    color: var(--t2);
}

.question-bar-wrap {
    width: 120px;
}

.question-bar-bg {
    height: 4px;
    background: var(--s3);
    border-radius: 99px;
    overflow: hidden;
}

.question-bar-fill {
    height: 100%;
    background: var(--g);
    border-radius: 99px;
}

.question-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--t1);
    width: 28px;
    text-align: right;
}

/* ── Settings sections ── */
.settings-section {
    margin-bottom: 28px;
}

.settings-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 12px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 0;
    border-bottom: 1px solid var(--b1);
    gap: 16px;
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-row-info {
    flex: 1;
    min-width: 0;
}

.settings-row-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--t1);
}

.settings-row-hint {
    font-size: 12px;
    color: var(--t3);
    margin-top: 2px;
}

/* ── Grid helpers ── */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.gap-16 {
    gap: 16px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-20 {
    margin-bottom: 20px;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-8 {
    gap: 8px;
}

.gap-12 {
    gap: 12px;
}

/* ── Misc ── */
.dot-live {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--g);
    box-shadow: 0 0 0 2px rgba(22, 168, 114, .25);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 2px rgba(22, 168, 114, .25);
    }

    50% {
        box-shadow: 0 0 0 5px rgba(22, 168, 114, .05);
    }
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--t3);
    font-size: 13px;
}

/* ── Responsive (базовый) ── */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-w: 64px;
    }

    .sidebar-logo span,
    .nav-item span,
    .nav-section,
    .plan-badge {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 10px;
    }

    .main {
        padding: 16px;
    }
}

/* ── Auth pages ─────────────────────────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--s1);
    border: 1px solid var(--b1);
    border-radius: var(--r20);
    padding: 36px;
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.auth-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--grad-g);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(22, 168, 114, .25);
}

.auth-logo-name {
    font-size: 18px;
    font-weight: 800;
}

.auth-logo-name em {
    color: var(--g);
    font-style: normal;
}

.auth-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--t1);
    margin-bottom: 6px;
    letter-spacing: -.3px;
}

.auth-sub {
    font-size: 13px;
    color: var(--t3);
    margin-bottom: 24px;
    line-height: 1.5;
}

.auth-footer {
    text-align: center;
    font-size: 12px;
    color: var(--t3);
    margin-top: 20px;
}

.auth-footer a {
    color: var(--g);
    font-weight: 600;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--t3);
    margin: 16px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--b1);
}

/* ── Onboarding ─────────────────────────────────────────────────────────── */
.ob-page {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

.ob-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    border-bottom: 1px solid var(--b1);
    flex-shrink: 0;
}

.ob-logo {
    font-size: 16px;
    font-weight: 800;
}

.ob-logo em {
    color: var(--g);
    font-style: normal;
}

.ob-step-label {
    font-size: 12px;
    color: var(--t3);
}

.ob-progress-bar {
    height: 2px;
    background: var(--s2);
    flex-shrink: 0;
}

.ob-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--g), var(--gd));
    transition: width .4s ease;
}

.ob-body {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 24px;
    overflow-y: auto;
}

.ob-card {
    width: 100%;
    max-width: 580px;
}

.ob-step {
    display: none;
}

.ob-step.active {
    display: block;
}

.ob-step-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--gl);
    border: 1px solid var(--gb);
    border-radius: 99px;
    padding: 3px 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--g);
    margin-bottom: 12px;
}

.ob-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--t1);
    letter-spacing: -.4px;
    margin-bottom: 6px;
    line-height: 1.2;
}

.ob-sub {
    font-size: 14px;
    color: var(--t3);
    margin-bottom: 28px;
    line-height: 1.6;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.cat-chip {
    padding: 7px 14px;
    background: var(--s2);
    border: 1.5px solid var(--b1);
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    color: var(--t2);
    cursor: pointer;
    transition: all .15s;
    user-select: none;
}

.cat-chip:hover {
    border-color: var(--gb);
    color: var(--t1);
}

.cat-chip.selected {
    background: var(--gl);
    border-color: var(--g);
    color: var(--g);
}

.hours-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hours-row {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 10px;
}

.hours-day {
    font-size: 13px;
    font-weight: 600;
    color: var(--t2);
}

.hours-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hours-inputs input[type="time"] {
    width: 88px;
    padding: 6px 8px;
    background: var(--s2);
    border: 1px solid var(--b1);
    border-radius: var(--r8);
    font-size: 12px;
    color: var(--t1);
    outline: none;
    font-family: 'Onest', sans-serif;
}

.hours-inputs input[type="time"]:focus {
    border-color: var(--g);
}

.hours-inputs input[type="time"]:disabled {
    opacity: .3;
}

.hours-sep {
    font-size: 11px;
    color: var(--t3);
}

.ai-box {
    background: var(--s2);
    border: 1px solid var(--gb);
    border-radius: var(--r12);
    padding: 14px 16px;
    margin-top: 8px;
}

.ai-box-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--g);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-box textarea {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 13px;
    color: var(--t1);
    line-height: 1.6;
    font-family: 'Onest', sans-serif;
    resize: none;
}

.photo-zone {
    border: 2px dashed var(--b2);
    border-radius: var(--r16);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    background: var(--s1);
}

.photo-zone:hover,
.photo-zone.drag-over {
    border-color: var(--g);
    background: var(--gl);
}

.photo-zone-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.photo-zone-label {
    font-size: 14px;
    color: var(--t2);
    margin-bottom: 4px;
    font-weight: 600;
}

.photo-zone-hint {
    font-size: 13px;
    color: var(--t3);
}

.photo-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.photo-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: var(--s3);
    border: 1px solid var(--b1);
    overflow: hidden;
    position: relative;
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-thumb-rm {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: rgba(0, 0, 0, .75);
    border-radius: 50%;
    font-size: 9px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-entry {
    background: var(--s2);
    border: 1px solid var(--b1);
    border-radius: var(--r12);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-entry-top {
    display: flex;
    gap: 8px;
    align-items: center;
}

.service-entry-top .svc-name {
    flex: 1;
}

.service-entry-row {
    display: grid;
    grid-template-columns: 1fr 1fr 28px;
    gap: 8px;
    align-items: center;
}

.service-entry-desc {
    display: flex;
    gap: 8px;
}

.service-entry-desc .svc-desc {
    flex: 1;
    min-height: 60px;
    resize: vertical;
    line-height: 1.5;
}

.service-remove {
    width: 28px;
    height: 28px;
    background: rgba(239, 68, 68, .1);
    border: none;
    border-radius: 6px;
    color: #f87171;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    flex-shrink: 0;
    font-size: 14px;
}

.service-remove:hover {
    background: rgba(239, 68, 68, .2);
}

.resource-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resource-entry {
    display: grid;
    grid-template-columns: 1fr 140px 28px;
    gap: 8px;
    align-items: center;
    background: var(--s2);
    border: 1px solid var(--b1);
    border-radius: var(--r12);
    padding: 10px 12px;
}

.resource-services-host {
    grid-column: 1 / -1;
}

.ob-resource-services {
    background: rgba(255, 255, 255, .78);
    border: 1px dashed var(--b1);
    border-radius: 10px;
    padding: 10px 12px;
}

.ob-resource-services-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.ob-resource-services-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--t2);
}

.ob-resource-services-note {
    font-size: 11px;
    color: var(--t3);
    margin-top: 2px;
}

.ob-resource-services-actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ob-resource-services-btn {
    border: none;
    background: transparent;
    color: var(--g);
    font-size: 12px;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
}

.ob-resource-services-btn:hover {
    color: var(--gd);
}

.ob-resource-services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ob-resource-service-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid var(--b1);
    background: var(--s0);
    font-size: 12px;
    font-weight: 600;
    color: var(--t2);
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}

.ob-resource-service-chip:hover {
    border-color: var(--gb);
}

.ob-resource-service-chip.selected {
    background: var(--gl);
    border-color: var(--gb);
    color: var(--g);
}

.ob-resource-service-chip input {
    margin: 0;
    accent-color: var(--g);
}

.ob-resource-services-empty {
    font-size: 12px;
    color: var(--t3);
}

.final-checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--s2);
    border: 1px solid var(--b1);
    border-radius: var(--r12);
    font-size: 13px;
}

.check-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.check-label {
    flex: 1;
    color: var(--t1);
    font-weight: 500;
}

.check-status {
    font-size: 11px;
    color: var(--g);
    font-weight: 700;
}

.ob-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 28px;
    gap: 10px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(22, 168, 114, .3);
    border-top-color: var(--g);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
/* ── Settings tabs ── */
.settings-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--b1);
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
}
.settings-tabs::-webkit-scrollbar { display: none; }

.settings-tab {
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--t3);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
    margin-bottom: -1px;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    font-family: 'Onest', sans-serif;
}
.settings-tab:hover { color: var(--t2); }
.settings-tab.active {
    color: var(--g);
    border-bottom-color: var(--g);
}

.settings-tab-panel { display: none; }
.settings-tab-panel.active { display: block; }

/* ── "Другое" chip reveal ── */
.cat-chip-other-field {
    display: none;
    margin-top: 10px;
    animation: fadeSlideIn .2s ease;
}
.cat-chip-other-field.visible { display: block; }

/* ── Photo zone optional badge ── */
.optional-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--s3);
    border: 1px solid var(--b2);
    border-radius: 99px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--t3);
    margin-left: 8px;
}

/* ── Category required marker ── */
.cat-chips-required {
    position: relative;
}
.cat-chips-error {
    font-size: 12px;
    color: #f87171;
    margin-top: 6px;
    display: none;
}
.cat-chips-error.visible { display: block; }

/* ── Resource type chips in onboarding ── */
.res-type-select {
    width: 100%;
    background: var(--s2);
    border: 1px solid var(--b1);
    border-radius: var(--r8);
    padding: 9px 12px;
    font-size: 13px;
    color: var(--t1);
    outline: none;
    font-family: 'Onest', sans-serif;
}
.res-type-select:focus { border-color: var(--g); }

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Knowledge base textarea ── */
.kb-textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.6;
    font-size: 13px;
}

/* ── Resource entry row ── */
.resource-entry {
    display: grid;
    grid-template-columns: 1fr 120px auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

/* ── Photo thumb ── */
.photo-thumb {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: var(--r8);
    overflow: hidden;
    flex-shrink: 0;
}
.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.photo-thumb-rm {
    position: absolute;
    top: 2px; right: 2px;
    width: 18px; height: 18px;
    background: rgba(0,0,0,.6);
    color: #fff;
    border-radius: 50%;
    font-size: 9px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}

/* ── Dot live ── */
.dot-live {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--g);
    flex-shrink: 0;
    animation: pulse-green 2s ease-in-out infinite;
}
@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(22,168,114,.5); }
    50% { box-shadow: 0 0 0 5px rgba(22,168,114,0); }
}

/* ── Auth divider ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--t3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--b1);
}

/* ── Final checklist ── */
.final-checklist {
    background: var(--s2);
    border: 1px solid var(--b1);
    border-radius: var(--r12);
    overflow: hidden;
}
.check-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--b1);
    font-size: 13px;
}
.check-row:last-child { border-bottom: none; }
.check-icon { font-size: 16px; flex-shrink: 0; }
.check-label { flex: 1; font-weight: 600; color: var(--t1); }
.check-status { color: var(--g); font-size: 12px; font-weight: 700; }

/* ── ob-step-tag bump ── */
.ob-step-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--gl);
    border: 1px solid var(--gb);
    border-radius: 99px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--g);
    margin-bottom: 12px;
}

.schedule-layout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;       /* на узком — wrap вниз */
}
 
.schedule-card {
    flex: 0 0 auto;        /* не растягивается — по содержимому */
    min-width: 400px;
}
 
.intervals-card {
    flex: 0 0 260px;       /* фиксированная правая колонка */
    position: sticky;
    top: calc(var(--header-h) + 16px);  /* прилипает при скролле */
}
 
/* На узком экране — интервалы на всю ширину под расписанием */
@media (max-width: 720px) {
    .intervals-card {
        flex: 1 1 100%;
        position: static;
    }
}

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn .15s ease;
}

.modal-box {
    background: var(--s1);
    border: 1px solid var(--b1);
    border-radius: var(--r16);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    animation: slideUp .2s ease;
}

.modal-header {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--b1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--t1);
}

.modal-close {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: var(--s2);
    color: var(--t2);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--s3);
}

.modal-body {
    padding: 18px 20px;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--b1);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Calendar preview (onboarding step 3) ── */
.cal-preview {
    background: var(--s2);
    border: 1px solid var(--gb);
    border-radius: var(--r12);
    padding: 12px 14px;
    margin: 14px 0;
}

.cal-preview-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--g);
    margin-bottom: 10px;
}

.cal-preview-scroll {
    overflow-x: auto;
}

.cal-preview-empty {
    font-size: 13px;
    color: var(--t3);
    text-align: center;
    padding: 10px 0;
}

.cal-grid {
    display: grid;
    gap: 1px;
    background: var(--b1);
    border: 1px solid var(--b1);
    border-radius: var(--r8);
    overflow: hidden;
    min-width: 160px;
}

.cal-cell {
    background: var(--s1);
    padding: 5px 7px;
    font-size: 12px;
}

.cal-corner {
    background: var(--s2);
}

.cal-col-head {
    background: var(--s2);
    font-weight: 700;
    color: var(--t1);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
}

.cal-time {
    background: var(--s2);
    color: var(--t3);
    font-size: 11px;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.cal-slot {
    min-height: 26px;
}

.cal-slot.cal-booked {
    background: var(--gl);
}

.cal-booking-chip {
    font-size: 11px;
    color: var(--g);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Onboarding mobile ── */
@media (max-width: 580px) {
    .ob-body {
        padding: 20px 12px;
    }
    .ob-topbar {
        padding: 10px 14px;
    }
    .ob-title {
        font-size: 20px;
    }
    .ob-sub {
        font-size: 13px;
        margin-bottom: 20px;
    }
    .ob-nav {
        margin-top: 20px;
    }
    .hours-inputs input[type="time"] {
        width: 76px;
        font-size: 11px;
    }
    .photo-zone {
        padding: 20px 16px;
    }
    .service-entry-row {
        grid-template-columns: 1fr 1fr 28px;
    }
    .resource-entry {
        grid-template-columns: 1fr 28px;
        grid-template-rows: auto auto;
    }
    .resource-entry select {
        grid-column: 1;
    }
    .resource-entry button {
        grid-row: 1;
        grid-column: 2;
    }
}
