/* Страница входа — аккуратный минималистичный макет */
.admin-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.admin-login-page.admin-body::before {
    background: var(--admin-bg);
}
@media (max-width: 768px) {
    .admin-login-page.admin-body::before {
        background: var(--admin-bg) url(/static/background/admin_phone_background_login.svg) center center / cover no-repeat;
    }
}
@media (min-width: 769px) {
    .admin-login-page.admin-body::before {
        background: var(--admin-bg) url(/static/background/admin_pc_background_login.svg) center center / cover no-repeat;
    }
}

.admin-login-card {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--admin-border);
    border-radius: 20px;
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.admin-login-header {
    text-align: center;
    margin-bottom: 28px;
}
.admin-login-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    display: block;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}
.admin-login-header h1 {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.admin-login-header p {
    margin: 0;
    color: var(--admin-text-muted);
    font-size: 0.9rem;
    font-weight: 400;
}
.admin-login-form .admin-form-row {
    margin-bottom: 18px;
}
.admin-login-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--admin-text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}
.admin-login-form .admin-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 1rem;
    border: 1px solid var(--admin-border);
    background: var(--admin-bg);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-login-form .admin-input:focus {
    outline: none;
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px rgba(119, 246, 1, 0.12);
}
.admin-login-form .admin-input::placeholder {
    color: var(--admin-text-dim);
}
.admin-login-btn,
.admin-login-wrap .admin-login-btn,
.admin-login-wrap .admin-btn-primary {
    width: 100%;
    margin-top: 4px;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    background: #4216EB !important;
    color: #fff !important;
    border: none;
}
.admin-login-btn:hover,
.admin-login-wrap .admin-login-btn:hover,
.admin-login-wrap .admin-btn-primary:hover:not(:disabled) {
    background: #5c3aef !important;
    color: #fff !important;
}
.admin-login-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin: 12px 0 0;
    padding: 10px 12px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.admin-login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--admin-border);
}
.admin-login-footer a {
    color: var(--admin-text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}
.admin-login-footer a:hover {
    color: var(--admin-accent);
}

/* Скрываем senior_only до проверки роли — исключаем мерцание */
[data-admin-role="senior_only"] {
    display: none !important;
}
.admin-role-checked [data-admin-role="senior_only"] {
    display: none;
}
.admin-role-checked.admin-is-senior [data-admin-role="senior_only"] {
    display: revert !important;
}

[data-admin-role="labd_admin"] {
    display: none !important;
}
.admin-role-checked.admin-is-labd [data-admin-role="labd_admin"] {
    display: revert !important;
}

/* Админ-панель — CRM-стиль, тёмная тема без синих оттенков */

:root {
    --admin-bg: #141414;
    --admin-bg-elevated: #1a1a1a;
    --admin-bg-card: #1f1f1f;
    --admin-border: rgba(255, 255, 255, 0.06);
    --admin-border-subtle: rgba(255, 255, 255, 0.04);
    --admin-schedule-grid: rgba(63, 63, 70, 0.25);
    --admin-schedule-col-sep: rgba(63, 63, 70, 0.3);
    --admin-text: #fafafa;
    --admin-text-muted: #a3a3a3;
    --admin-text-dim: #737373;
    --admin-accent: #3B82F6;
    --admin-accent-hover: #60A5FA;
    --admin-accent-bg: rgba(59, 130, 246, 0.15);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}
/* Селекция текста — полупрозрачная, не сплошная белая */
body.admin-body ::selection,
.admin-body ::selection {
    background: rgba(255, 255, 255, 0.08) !important;
    color: inherit !important;
}
body.admin-body ::-moz-selection,
.admin-body ::-moz-selection {
    background: rgba(255, 255, 255, 0.08) !important;
    color: inherit !important;
}

/* Скроллбар — нейтральный серый */
.admin-body,
.admin-body * {
    scrollbar-color: #404040 #262626;
}
.admin-body::-webkit-scrollbar-track,
.admin-body *::-webkit-scrollbar-track {
    background: #262626 !important;
    border: none !important;
}
.admin-body::-webkit-scrollbar-thumb,
.admin-body *::-webkit-scrollbar-thumb {
    background: #404040 !important;
    box-shadow: none !important;
}

/* Заменяем body::before из main.css — фиксированный фон админки (не скроллится) */
.admin-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--admin-bg);
    z-index: -1;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

@media (max-width: 768px) {
    .admin-body::before {
        background: var(--admin-bg) url(/static/background/admin_phone_background.svg) center center / cover no-repeat;
    }
}
@media (min-width: 769px) {
    .admin-body::before {
        background: var(--admin-bg) url(/static/background/admin_pc_background.svg) center center / cover no-repeat;
    }
}

.admin-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--admin-bg);
    color: var(--admin-text);
    min-height: 100vh;
}

/* Контент на всю область; только сайдбар — воздушная фиксированная панель */
.admin-body {
    padding: 0;
}

.admin-layout-wrap {
    display: block;
}

/* Сайдбар: фиксированная, воздушная, скруглённая панель */
.admin-sidebar {
    position: fixed;
    left: 20px;
    top: 20px;
    bottom: 20px;
    width: 220px;
    flex-shrink: 0;
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--admin-border);
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    z-index: 100;
}

.admin-sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--admin-border);
    margin-bottom: 16px;
}

.admin-sidebar-logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.admin-sidebar-logo-img {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.admin-sidebar-logo-wrap:hover .admin-sidebar-logo-img {
    opacity: 1;
}

.admin-sidebar-logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--admin-accent);
    text-decoration: none;
}

.admin-sidebar-logo-wrap:hover .admin-sidebar-logo {
    color: var(--admin-accent-hover);
}

.admin-sidebar-label {
    font-size: 0.75rem;
    color: var(--admin-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
    display: block;
}

.admin-sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
    overflow-y: auto;
}

.admin-sidebar-group {
    margin-bottom: 4px;
}

.admin-sidebar-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: var(--admin-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.admin-sidebar-group-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--admin-text);
}

.admin-sidebar-group-chevron {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.admin-sidebar-group.collapsed .admin-sidebar-group-chevron {
    transform: rotate(-90deg);
}

.admin-sidebar-group-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    max-height: 500px;
}

.admin-sidebar-nav.ready .admin-sidebar-group-body {
    transition: max-height 0.25s ease, opacity 0.2s ease;
}

.admin-sidebar-group.collapsed .admin-sidebar-group-body {
    max-height: 0 !important;
    opacity: 0;
    pointer-events: none;
}

.admin-sidebar-link {
    display: table;
    width: 100%;
    table-layout: fixed;
    padding: 12px 14px;
    color: var(--admin-text-muted);
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.admin-sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--admin-text);
}

.admin-sidebar-link.active {
    background: rgba(66, 22, 235, 0.15);
    color: #fff;
}

.admin-sidebar-icon {
    display: table-cell;
    vertical-align: middle;
    width: 20px;
    padding-right: 10px;
    opacity: 0.85;
}

/* Иконки календаря визуально шире — добавляем отступ только для Бронирования и Расписание */
.admin-sidebar-link[href="/admin/bookings"] .admin-sidebar-icon,
.admin-sidebar-link[href="/engineer/schedule"] .admin-sidebar-icon {
    padding-right: 14px;
}

.admin-sidebar-icon svg {
    width: 20px;
    height: 20px;
    display: block;
    vertical-align: middle;
}

.admin-sidebar-link-text {
    display: table-cell;
    vertical-align: middle;
    line-height: 1.3;
}

.admin-sidebar-link.active .admin-sidebar-icon {
    opacity: 1;
    color: #60A5FA;
}

.admin-sidebar-footer {
    padding: 16px 20px 0;
    border-top: 1px solid var(--admin-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-sidebar-footer .admin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    background: #4216EB;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.admin-sidebar-footer .admin-link:hover {
    background: #5c3aef;
    color: #fff;
}

.admin-sidebar-footer .admin-link[href="/"] {
    background: var(--admin-bg-elevated);
    color: var(--admin-text);
    border: 1px solid var(--admin-border);
}

.admin-sidebar-footer .admin-link[href="/"]:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--admin-accent);
    color: var(--admin-accent);
}

/* Основной контент справа от фиксированного сайдбара */
.admin-main {
    margin-left: 260px;
    min-width: 0;
    padding: 24px 32px 40px;
    overflow-x: auto;
    min-height: 100vh;
}

.admin-container {
    max-width: 900px;
    margin: 0 auto;
}

.admin-container.admin-studios-manage,
.admin-container.admin-portfolio-manage {
    max-width: 1200px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--admin-border);
}

.admin-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: var(--admin-text);
}

.admin-link {
    color: var(--admin-accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.admin-link:hover {
    color: var(--admin-accent-hover);
}

/* Вкладки */
.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--admin-bg-card);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--admin-border);
}

.admin-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--admin-text-muted);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-tab:hover {
    color: var(--admin-text);
}

.admin-tab.active {
    background: var(--admin-accent-bg);
    color: var(--admin-accent);
}

.admin-tab-panel {
    display: none;
}

.admin-tab-panel.active {
    display: block;
}

/* Форма выкладки */
.admin-form {
    background: var(--admin-bg-card);
    border: 1px solid var(--admin-border);
    border-radius: 16px;
    padding: 28px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 28px;
}

.admin-form-main {
    min-width: 0;
}

.admin-form-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.admin-form-group {
    margin-bottom: 20px;
}

.admin-form-sidebar .admin-form-group {
    margin-bottom: 24px;
}

.admin-form-sidebar .admin-form-group:last-child {
    margin-bottom: 0;
}

.admin-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--admin-text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-form-group input[type="text"],
.admin-form-group textarea,
.admin-form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    color: var(--admin-text);
    font-family: inherit;
    font-size: 1rem;
}

.admin-form-group input:focus,
.admin-form-group textarea:focus,
.admin-form-group select:focus {
    outline: none;
    border-color: var(--admin-accent);
}

.admin-form-group input::placeholder,
.admin-form-group textarea::placeholder {
    color: var(--admin-text-dim);
}

.admin-form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.admin-form-group textarea#content {
    min-height: 220px;
}

.admin-json-field {
    font-family: ui-monospace, monospace;
    font-size: 0.875rem;
}

.admin-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--admin-text-muted);
}

.admin-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* Редактор Quill */
.admin-editor-wrap {
    min-height: 280px;
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
}

.admin-editor-wrap .ql-toolbar {
    background: var(--admin-bg-card);
    border-color: var(--admin-border);
    border-radius: 10px 10px 0 0;
}

.admin-editor-wrap .ql-container {
    border-color: var(--admin-border);
    border-radius: 0 0 10px 10px;
    font-size: 1rem;
}

.admin-editor-wrap .ql-editor {
    min-height: 240px;
    color: var(--admin-text);
}

.admin-editor-wrap .ql-editor.ql-blank::before {
    color: var(--admin-text-dim);
}

.admin-editor-wrap .ql-toolbar .ql-stroke {
    stroke: rgba(255, 255, 255, 0.25);
}

.admin-editor-wrap .ql-toolbar .ql-fill {
    fill: rgba(255, 255, 255, 0.5);
}

.admin-editor-wrap .ql-toolbar .ql-picker {
    color: var(--admin-text-muted);
}

.admin-editor-wrap .ql-toolbar button:hover .ql-stroke,
.admin-editor-wrap .ql-toolbar button.ql-active .ql-stroke {
    stroke: var(--admin-accent);
}

.admin-editor-wrap .ql-toolbar button:hover .ql-fill,
.admin-editor-wrap .ql-toolbar button.ql-active .ql-fill {
    fill: var(--admin-accent);
}

.admin-editor-wrap .ql-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Выпадающий список «Размер img» — тёмная тема */
.admin-editor-wrap .admin-editor-image-size,
.admin-editor-wrap select.ql-picker,
.admin-editor-wrap .ql-toolbar select {
    background: var(--admin-bg) !important;
    color: var(--admin-text) !important;
    border: 1px solid var(--admin-border) !important;
    border-radius: 6px !important;
}
.admin-editor-wrap .ql-toolbar .ql-picker-options {
    background: var(--admin-bg-elevated) !important;
    border: 1px solid var(--admin-border) !important;
    border-radius: 8px !important;
}
.admin-editor-wrap .ql-toolbar .ql-picker-item {
    color: var(--admin-text-muted) !important;
}
.admin-editor-wrap .ql-toolbar .ql-picker-item:hover {
    color: var(--admin-accent) !important;
}

/* Загрузка изображения */
.admin-image-upload {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--admin-bg);
    border: 2px dashed var(--admin-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
}

.admin-image-upload:hover {
    border-color: rgba(229, 160, 13, 0.4);
}

.admin-image-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
    width: 100%;
    height: 100%;
}

.admin-image-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.admin-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    margin: 0;
}

.admin-image-upload.is-dragover .admin-image-placeholder,
.admin-image-upload.is-dragover {
    border-color: rgba(229, 160, 13, 0.5);
    background: var(--admin-accent-bg);
}

.admin-image-icon {
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
}

.admin-image-text {
    font-size: 0.75rem;
}

.admin-image-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Галерея услуги */
.admin-gallery-section .admin-gallery-subtitle {
    margin: 0 0 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--admin-text-muted);
}
.admin-gallery-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.admin-gallery-tab {
    padding: 8px 14px;
    font-size: 0.85rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-bg);
    color: var(--admin-text-muted);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.admin-gallery-tab:hover {
    border-color: var(--admin-accent);
    color: var(--admin-accent);
}
.admin-gallery-tab.active {
    border-color: var(--admin-accent);
    color: var(--admin-accent);
    background: rgba(119, 246, 1, 0.06);
}
.admin-gallery-tab-empty {
    color: var(--admin-text-dim);
    font-size: 0.9rem;
}
.admin-gallery-tab-panel {
    display: none;
    padding: 12px 0;
}
.admin-gallery-tab-panel.active {
    display: block;
}
.admin-gallery-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}
.admin-gallery-item {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}
.admin-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.admin-gallery-item input {
    display: none;
}
.admin-gallery-item .admin-btn-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    padding: 0;
    font-size: 12px;
    border-radius: 6px;
    background: rgba(0,0,0,0.7);
    border: none;
    color: #fff;
    cursor: pointer;
    line-height: 1;
}
.admin-gallery-videos-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}
.admin-gallery-video-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.admin-gallery-video-item .gallery-video-src { flex: 1; min-width: 200px; }
.admin-gallery-video-item .gallery-video-title { width: 140px; }
.admin-gallery-video-item .admin-btn-remove {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    color: var(--admin-text-muted);
    cursor: pointer;
}

.admin-image-clear {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 8px;
    color: var(--admin-text);
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
}

.admin-image-clear:hover {
    background: rgba(255, 107, 107, 0.8);
}

/* Кнопки */
.admin-form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--admin-border);
}

.admin-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.admin-btn-primary {
    background: var(--admin-accent);
    color: #0f0f0f;
}

.admin-btn-primary:hover:not(:disabled) {
    background: var(--admin-accent-hover);
    transform: translateY(-1px);
}

.admin-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.admin-btn-secondary {
    background: var(--admin-bg-card);
    color: var(--admin-text);
    border: 1px solid var(--admin-border);
}

.admin-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
}

.admin-form-status {
    font-size: 0.85rem;
}

.admin-form-status.success {
    color: var(--admin-accent);
}

.admin-form-status.error {
    color: #ff6b6b;
}

.admin-form-hint {
    font-size: 0.75rem;
    color: var(--admin-text-dim);
    margin: 4px 0 10px;
}

.admin-btn-outline {
    background: transparent;
    border: 1px solid var(--admin-border);
    color: var(--admin-text-muted);
}

.admin-btn-outline:hover {
    border-color: var(--admin-accent);
    color: var(--admin-accent);
}

/* Кнопки перехода в услуги (статьи) */
.admin-service-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.admin-service-link-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.admin-service-link-row .admin-service-link-select {
    flex: 1;
    min-width: 0;
}

.admin-service-link-row .admin-service-link-label {
    flex: 1;
    min-width: 0;
}

.admin-service-link-remove {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--admin-border);
    background: transparent;
    color: var(--admin-text-muted);
    border-radius: 8px;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.admin-service-link-remove:hover {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.4);
}

/* Список статей */
.admin-articles-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-article-item {
    margin-bottom: 8px;
    position: relative;
}

.admin-article-edit {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--admin-accent-bg);
    border: 1px solid var(--admin-accent-hover);
    border-radius: 8px;
    color: var(--admin-accent) !important;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s;
    z-index: 2;
}

.admin-article-edit:link,
.admin-article-edit:visited,
.admin-article-edit:hover,
.admin-article-edit:active {
    color: var(--admin-accent) !important;
}

.admin-article-edit:hover {
    background: var(--admin-accent-hover);
    color: var(--admin-text) !important;
}

.admin-article-delete {
    position: absolute;
    top: 50%;
    left: 52px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 100, 100, 0.15);
    border: 1px solid rgba(255, 100, 100, 0.4);
    border-radius: 8px;
    color: #f66;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
}

.admin-article-delete:hover {
    background: rgba(255, 100, 100, 0.35);
    color: #fff;
    border-color: #f66;
}

.admin-article-item:has(.admin-article-delete) .admin-article-link {
    padding-left: 90px;
}

.admin-article-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px 14px 48px;
    background: var(--admin-bg-card);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    transition: all 0.2s;
}

.admin-article-link:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--admin-accent-hover);
}

.admin-article-thumb {
    width: 56px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--admin-bg);
}

.admin-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-article-info {
    flex: 1;
    min-width: 0;
}

.admin-article-title {
    display: block;
    font-weight: 600;
    color: var(--admin-text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-article-meta {
    font-size: 0.78rem;
    color: var(--admin-text-muted);
}

.admin-article-stats {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    font-size: 0.72rem;
    color: var(--admin-text-dim);
}

.admin-article-stats span {
    white-space: nowrap;
}

.admin-article-stats-block {
    padding: 12px 14px;
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.admin-stat-item {
    text-align: center;
    padding: 8px 4px;
    background: var(--admin-bg-elevated);
    border-radius: 8px;
    border: 1px solid var(--admin-border-subtle);
}

.admin-stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--admin-accent);
}

.admin-stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--admin-text-dim);
    margin-top: 2px;
}

.admin-article-arrow {
    color: var(--admin-accent);
    font-size: 1.1rem;
    opacity: 0.8;
}

.admin-empty-state {
    text-align: center;
    padding: 60px 24px;
    background: var(--admin-bg-card);
    border: 1px dashed var(--admin-border);
    border-radius: 16px;
}

.admin-empty-state p {
    color: var(--admin-text-muted);
    margin: 0 0 16px 0;
    font-size: 1rem;
}

/* Статистика пользователей */
.admin-stats {
    margin-bottom: 32px;
}

.admin-stats-cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.admin-stats-card {
    background: var(--admin-bg-card);
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    padding: 20px 24px;
    min-width: 180px;
}

.admin-stats-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--admin-accent);
    margin-bottom: 4px;
}

.admin-stats-label {
    font-size: 0.8rem;
    color: var(--admin-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-stats-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--admin-text);
    margin: 0 0 12px 0;
}

.admin-stats-platforms {
    margin-bottom: 28px;
}

.admin-stats-platform-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.admin-stats-platform-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--admin-text);
}

.admin-stats-platform-name {
    color: var(--admin-text-muted);
}

.admin-stats-platform-count {
    font-weight: 600;
    color: var(--admin-accent);
}

.admin-users-section {
    margin-top: 8px;
}

.admin-users-hint {
    font-size: 0.8rem;
    color: var(--admin-text-dim);
    margin: -6px 0 12px 0;
    max-width: 560px;
}

.admin-users-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: var(--admin-bg-card);
}

.admin-users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-users-table th,
.admin-users-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--admin-border-subtle);
}

.admin-users-table th {
    background: var(--admin-bg);
    color: var(--admin-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.75rem;
}

.admin-users-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.admin-users-table code {
    font-size: 0.8em;
    color: var(--admin-text-muted);
    background: var(--admin-bg);
    padding: 2px 6px;
    border-radius: 4px;
}

.admin-users-toolbar {
    margin: 18px 0 8px;
}

.admin-users-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.admin-users-search-label {
    font-size: 0.8rem;
    color: var(--admin-text-muted);
}

.admin-users-search-input {
    min-width: 220px;
    flex: 1 1 240px;
    max-width: 420px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--admin-border);
    background: var(--admin-bg-card);
    color: var(--admin-text);
    font: inherit;
}

.admin-users-search-btn {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--admin-border);
    background: var(--admin-accent);
    color: #0b0c10;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

.admin-users-search-reset {
    font-size: 0.85rem;
    color: var(--admin-text-muted);
}

.admin-users-bulk {
    margin: 18px 0 8px;
    padding: 16px;
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    background: var(--admin-bg-card);
}

.admin-users-bulk-text {
    width: 100%;
    min-height: 120px;
    margin: 0 0 12px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--admin-border);
    background: var(--admin-bg);
    color: var(--admin-text);
    font: inherit;
    resize: vertical;
}

.admin-users-bulk-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.admin-users-bulk-field {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--admin-text-muted);
}

.admin-users-bulk-field select,
.admin-users-role {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    background: var(--admin-bg);
    color: var(--admin-text);
    font: inherit;
}

.admin-users-bulk-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--admin-text);
}

.admin-users-bulk-report {
    margin: 12px 0 0;
    padding: 12px;
    border-radius: 10px;
    background: var(--admin-bg);
    color: var(--admin-text-muted);
    white-space: pre-wrap;
    font-size: 0.8rem;
}

.admin-users-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--admin-text-muted);
    white-space: nowrap;
}

.admin-users-table--badges td {
    vertical-align: middle;
}

/* Бургер-меню для мобилок */
.admin-burger-btn {
    display: none;
    position: fixed;
    top: calc(16px + var(--safe-top));
    left: calc(16px + var(--safe-left));
    z-index: 110;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--admin-bg-elevated);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.admin-burger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--admin-text);
    border-radius: 1px;
}

.admin-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 105;
}

/* Адаптив: бургер + сайдбар в выезжающей панели */
@media (max-width: 768px) {
    .admin-burger-btn {
        display: flex !important;
    }

    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        margin: 0;
        flex-direction: column;
        flex-wrap: nowrap;
        padding: calc(20px + var(--safe-top)) 0 calc(20px + var(--safe-bottom));
        padding-left: var(--safe-left);
        border-radius: 0;
        border-right: 1px solid var(--admin-border);
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 106;
        box-shadow: none;
    }

    .admin-sidebar.admin-sidebar-open {
        transform: translateX(0);
        box-shadow: 8px 0 24px rgba(0,0,0,0.4);
    }

    .admin-sidebar-header {
        padding: 0 20px 20px;
        margin-bottom: 16px;
        border-bottom: 1px solid var(--admin-border);
    }

    .admin-sidebar-nav {
        flex-direction: column;
        flex: 1;
        padding: 0 12px;
        overflow-y: auto;
    }

    .admin-sidebar-footer {
        width: 100%;
        padding: 16px 20px 0;
        border-top: 1px solid var(--admin-border);
    }

    .admin-main {
        margin-left: 0;
        padding: calc(72px + var(--safe-top)) calc(16px + var(--safe-right)) calc(32px + var(--safe-bottom)) calc(16px + var(--safe-left));
        overflow-x: hidden;
    }

    .admin-btn,
    .admin-tab {
        max-width: 100%;
        box-sizing: border-box;
    }

    .admin-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-schedule-filters .admin-select {
        min-width: 0;
        max-width: 100%;
    }

    .admin-schedule-filters,
    .admin-schedule-actions,
    .admin-schedule-nav {
        flex-wrap: wrap;
    }

    .admin-booking-panel-footer .admin-btn {
        flex: 0 1 auto;
        min-width: 0;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-form-sidebar {
        order: -1;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }

    .admin-form-sidebar .admin-form-group {
        flex: 1;
        min-width: 140px;
    }

    .admin-image-upload {
        aspect-ratio: 16 / 9;
        max-height: 160px;
    }
}

@media (max-width: 520px) {
    .admin-tabs {
        flex-direction: column;
    }
}

/* Модалка обрезки фото */
.admin-crop-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-crop-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.admin-crop-dialog {
    position: relative;
    background: var(--admin-bg-elevated);
    border: 1px solid var(--admin-border);
    border-radius: 16px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.admin-crop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--admin-border);
}

.admin-crop-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--admin-text);
}

.admin-crop-close {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--admin-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 8px;
}

.admin-crop-close:hover {
    color: var(--admin-text);
    background: rgba(255, 255, 255, 0.06);
}

.admin-crop-body {
    padding: 20px;
    overflow: hidden;
    flex: 1;
}

.admin-crop-wrap {
    max-height: 60vh;
    min-height: 300px;
    background: var(--admin-bg);
}

.admin-crop-wrap img {
    max-width: 100%;
    display: block;
}

.admin-crop-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--admin-border);
}

/* Шапка списка: кнопка + ссылка */
.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Блок изображения услуги: превью слева, справа URL и кнопки */
.admin-service-image {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
.admin-service-image-preview {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.admin-service-image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.admin-service-image-fields {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.admin-service-image-fields input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    color: var(--admin-text);
    font-size: 0.95rem;
}
.admin-service-image-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.admin-file-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0;
}
.admin-file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

/* Тарифы: карточки */
.admin-hint {
    font-size: 0.85rem;
    color: var(--admin-text-muted);
    margin: 4px 0 12px 0;
}
.admin-tariffs {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 12px;
}
.admin-tariff-card {
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 16px;
}
.admin-tariff-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.admin-tariff-drag-handle {
    flex-shrink: 0;
    cursor: grab;
    color: var(--admin-text-muted);
    padding: 4px 6px;
    border-radius: 6px;
    user-select: none;
    font-size: 1rem;
    line-height: 1;
}
.admin-tariff-drag-handle:hover {
    color: var(--admin-accent);
    background: var(--admin-bg-elevated);
}
.admin-tariff-drag-handle:active {
    cursor: grabbing;
}
.admin-tariff-card-ghost {
    opacity: 0.5;
    background: var(--admin-bg-elevated);
}
.admin-tariff-header .tariff-key {
    flex: 1;
    max-width: 180px;
    font-family: ui-monospace, monospace;
}
.admin-tariff-remove,
.admin-feature-remove {
    background: transparent;
    border: 1px solid var(--admin-border);
    color: var(--admin-text-muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
}
.admin-tariff-remove:hover,
.admin-feature-remove:hover {
    border-color: var(--admin-accent);
    color: var(--admin-accent);
}
.admin-tariff-card .tariff-name,
.admin-tariff-card .tariff-price {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: var(--admin-bg-elevated);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    color: var(--admin-text);
}
.admin-tariff-card .tariff-features label {
    font-size: 0.75rem;
    color: var(--admin-text-dim);
    margin-bottom: 6px;
    display: block;
}
.tariff-feature-row {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}
.tariff-feature-row .tariff-feature {
    flex: 1;
    padding: 8px 12px;
    background: var(--admin-bg-elevated);
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    color: var(--admin-text);
    font-size: 0.95rem;
}
.admin-add-feature {
    margin-top: 6px;
    padding: 6px 12px;
    font-size: 0.85rem;
    background: transparent;
    border: 1px dashed var(--admin-border);
    color: var(--admin-text-muted);
    border-radius: 8px;
    cursor: pointer;
}
.admin-add-feature:hover {
    border-color: var(--admin-accent);
    color: var(--admin-accent);
}

/* Таблица цен по городам */
.admin-prices-table-wrap {
    overflow-x: auto;
    margin-bottom: 8px;
}
.admin-prices-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.admin-prices-table th,
.admin-prices-table td {
    padding: 10px 12px;
    border: 1px solid var(--admin-border);
    text-align: left;
}
.admin-prices-table th {
    background: var(--admin-bg-elevated);
    color: var(--admin-text-muted);
    font-weight: 600;
}
.admin-prices-table .price-input {
    width: 100%;
    min-width: 120px;
    padding: 12px 14px;
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    color: var(--admin-text);
    box-sizing: border-box;
    font-size: 1rem;
    min-height: 44px;
}
.admin-prices-table .pbs-input {
    width: 100%;
    min-width: 120px;
    padding: 12px 14px;
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    color: var(--admin-text);
    box-sizing: border-box;
    font-size: 1rem;
    min-height: 44px;
}
.admin-prices-table .price-input:focus {
    outline: none;
    border-color: var(--admin-accent);
}
.admin-prices-table .pbs-input:focus {
    outline: none;
    border-color: var(--admin-accent);
}

@media (max-width: 820px) {
    .admin-prices-table .price-input,
    .admin-prices-table .pbs-input {
        min-width: 140px;
        padding: 14px 16px;
        font-size: 16px; /* iOS: не зумить на фокусе */
    }
}

/* Бронирования */
.admin-bookings-filters-hint {
    width: 100%; margin: 0 0 10px; font-size: 0.8rem; color: var(--admin-text-muted);
}
.admin-bookings-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.admin-bookings-filters label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--admin-text-muted);
}
.admin-select,
.admin-input {
    padding: 8px 12px;
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    color: var(--admin-text);
    font-size: 0.9rem;
}
.admin-bookings-tabs {
    margin-bottom: 16px;
}
.admin-tab {
    padding: 8px 16px;
    background: var(--admin-bg-elevated);
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    color: var(--admin-text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    margin-right: 8px;
}
.admin-tab.active {
    background: var(--admin-accent);
    border-color: var(--admin-accent);
    color: #fff;
}
.admin-table-wrap {
    overflow-x: auto;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.admin-table th,
.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--admin-border);
    text-align: left;
}
.admin-table th {
    background: var(--admin-bg-elevated);
    color: var(--admin-text-muted);
    font-weight: 600;
}
.admin-actions-cell {
    white-space: nowrap;
}
.admin-booking-row {
    cursor: pointer;
}
.admin-booking-row:hover {
    background: var(--admin-bg-elevated);
}
.admin-btn-sm {
    padding: 4px 10px;
    font-size: 0.8rem;
    margin-right: 4px;
}
.admin-btn-ok {
    background: #22c55e;
    color: #fff;
    border-color: #22c55e;
}
.admin-btn-no {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}
.admin-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}
.admin-badge.status-pending {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}
.admin-badge.status-ok {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}
.admin-badge.status-no {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}
.admin-badge.status-conflict {
    background: rgba(220, 38, 38, 0.2);
    color: #b91c1c;
    font-weight: 700;
    border: 1px solid rgba(220, 38, 38, 0.4);
}
.admin-badge.status-awaiting-prepayment {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}
.admin-empty-hint {
    color: var(--admin-text-muted);
    font-size: 0.9rem;
    margin-top: 12px;
}
.admin-schedule-wrap {
    overflow-x: auto;
}
.admin-schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.admin-schedule-table th,
.admin-schedule-table td {
    padding: 10px 12px;
    border: 1px solid var(--admin-border);
    text-align: left;
}
.admin-schedule-table th {
    background: var(--admin-bg-elevated);
    color: var(--admin-text-muted);
}

/* Расписание: по скелету — сверху фильтры, по центру колонки дней в ряд, снизу одна группа Назад/Вперёд */
.admin-bookings-page {
    position: relative;
    padding-right: 50px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}
.admin-schedule-section {
    background: var(--admin-bg-elevated);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--admin-border);
}

/* Верхняя полоса: только фильтры */
.admin-schedule-header {
    margin-bottom: 20px;
}
.admin-schedule-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 20px;
}
.admin-schedule-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--admin-border);
}
.admin-schedule-filter {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.admin-schedule-filter-label {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.admin-schedule-filters .admin-select { min-width: 160px; }
.admin-schedule-checkbox-wrap {
    align-self: flex-end;
}
.admin-schedule-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--admin-text);
    padding: 10px 14px;
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    transition: border-color 0.2s, background 0.2s;
}
.admin-schedule-checkbox:hover {
    border-color: var(--admin-text-muted);
}
.admin-schedule-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--admin-accent);
}
.admin-schedule-range-notice {
    display: none;
    margin: 0 0 12px 0;
    padding: 12px 16px 12px 44px;
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.14) 0%, rgba(127, 29, 29, 0.2) 100%);
    color: #fecaca;
    font-size: 0.9rem;
    line-height: 1.45;
    position: relative;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.admin-schedule-range-notice::before {
    content: "!";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.85);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 22px;
    text-align: center;
}
.admin-schedule-range-notice.is-visible {
    display: block;
}
.admin-schedule-columns-caption {
    font-size: 0.85rem;
    color: var(--admin-text-muted);
    margin: 0 0 10px 0;
}

/* Единый calendar board (не отдельные «столбики») */
.admin-schedule-columns-wrap {
    position: relative;
    overflow-x: auto;
    overflow-y: auto;
    min-height: 420px;
    max-height: 70vh;
    border-radius: 14px;
    border: 1px solid var(--admin-border);
    background: var(--admin-bg-elevated);
    margin-bottom: 20px;
    padding: 0;
}
.admin-schedule-skeleton {
    display: none !important;
}
.admin-inline-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--admin-border, #2A2A2A);
    border-top-color: var(--admin-accent, #0047FF);
    border-radius: 50%;
    animation: admin-upload-spin 0.75s linear infinite;
    flex-shrink: 0;
}
.admin-inline-spinner[hidden] {
    display: none !important;
}
.admin-inline-spinner--lg {
    width: 28px;
    height: 28px;
    border-width: 2.5px;
}
.admin-panel-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    padding: 32px 16px;
}
.admin-schedule-columns {
    display: flex;
    flex-direction: column;
    min-width: 100%;
    width: 100%;
    min-height: 100%;
}
.admin-schedule-header-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-width: 100%;
    gap: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--admin-bg-elevated);
    flex-shrink: 0;
    border-bottom: 1px solid var(--admin-border);
    box-shadow: none;
}
.admin-schedule-time-header-cell {
    width: 56px;
    flex-shrink: 0;
    min-height: 52px;
    position: sticky;
    left: 0;
    z-index: 100;
    background: var(--admin-bg-elevated);
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--admin-border);
}
.admin-schedule-day-headers {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    gap: 0;
    padding-left: 0;
}
.admin-schedule-day-header-cell {
    flex: 1 1 0;
    min-width: 112px;
    width: auto;
    min-height: 52px;
    padding: 8px 6px;
    line-height: 1.15;
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    background: transparent;
    border: none;
    border-right: 1px solid rgba(255,255,255,0.06);
    border-radius: 0;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--admin-text-muted);
}
.admin-schedule-day-header-cell .schedule-day-wd {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    color: var(--admin-text-muted);
}
.admin-schedule-day-header-cell .schedule-day-num {
    font-size: 1.05rem;
    font-weight: 650;
    color: var(--admin-text);
    line-height: 1.2;
}
.admin-schedule-day-header-cell.is-today .schedule-day-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--admin-accent, #3b82f6);
    color: #fff;
}
.admin-schedule-day-header-cell.is-today {
    background: rgba(59, 130, 246, 0.06);
}
.admin-schedule-day-header-cell--has-shifts {
    border-left-width: 0;
    box-shadow: inset 0 -2px 0 0 currentColor;
}
.admin-schedule-body-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    min-width: 100%;
    flex: 1;
    gap: 0;
}
.admin-schedule-day-cols {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    gap: 0;
    padding-left: 0;
}
.admin-schedule-time-col {
    width: 56px;
    flex-shrink: 0;
    position: sticky;
    left: 0;
    top: 0;
    z-index: 100;
    background: var(--admin-bg-elevated);
    background-color: var(--admin-bg-elevated);
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--admin-border);
    min-height: 480px;
    padding: 0 4px 0 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}
.admin-schedule-time-header {
    height: 44px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--admin-schedule-col-sep);
}
.admin-schedule-time-rows {
    display: flex;
    flex-direction: column;
}
.admin-schedule-time-row {
    font-size: 0.68rem;
    color: var(--admin-text-muted);
    text-align: right;
    padding-right: 8px;
    line-height: 20px;
    background: transparent;
    box-sizing: border-box;
    border-bottom: none;
    flex-shrink: 0;
}
.admin-schedule-time-row.hour { font-weight: 600; color: var(--admin-text); }
.admin-schedule-day-col {
    flex: 1 1 0;
    min-width: 112px;
    width: auto;
    position: relative;
    background: transparent;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    border: none;
    border-right: 1px solid rgba(255,255,255,0.06);
    box-shadow: none;
    overflow: visible;
}
.admin-schedule-day-col.is-today {
    background: rgba(59, 130, 246, 0.04);
}
.admin-schedule-day-cols .admin-schedule-day-col:last-child {
    border-right: none;
}
.admin-schedule-day-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 44px;
    padding: 0 10px;
    line-height: 44px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--admin-bg-elevated);
    border-bottom: 1px solid var(--admin-schedule-col-sep);
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.admin-schedule-day-rows {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    position: relative;
    z-index: 0;
    --row-h: 22px;
    background-image:
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent calc(var(--row-h) - 1px),
            rgba(255,255,255,0.04) calc(var(--row-h) - 1px),
            rgba(255,255,255,0.04) var(--row-h)
        );
    overflow: hidden;
    border-radius: 0;
}
.admin-schedule-day-cell {
    flex-shrink: 0;
    box-sizing: border-box;
}
.admin-schedule-day-cell:hover {
    background: rgba(255,255,255,0.03);
}
.admin-schedule-day-cards {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}
.admin-schedule-day-cards .admin-booking-card {
    pointer-events: auto;
}
.admin-booking-card--pending {
    opacity: 0.92;
    border-style: dashed;
}

/* Компактный вид для полгода/год */
.admin-schedule-columns.admin-schedule-compact .admin-schedule-day-header-cell,
.admin-schedule-columns.admin-schedule-compact .admin-schedule-day-col {
    flex: 0 0 auto;
    width: 64px;
    min-width: 64px;
}
.admin-schedule-columns.admin-schedule-compact .admin-schedule-day-rows {
    --row-h: 12px;
}
.admin-schedule-columns.admin-schedule-compact .admin-schedule-day-header-cell .schedule-day-num {
    font-size: 0.85rem;
}
.admin-schedule-columns.admin-schedule-compact .admin-schedule-day-header-cell .schedule-day-wd {
    display: none;
}

/* Нижняя полоса: только навигация Назад — период — Вперёд (одна группа по центру) */
.admin-schedule-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 16px 24px;
    background: var(--admin-bg);
    border-radius: 8px;
    border: 1px solid var(--admin-border);
}
.admin-schedule-nav-btn {
    min-width: 120px;
}
.admin-schedule-range-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 220px;
}
.admin-schedule-range-label {
    font-weight: 600;
    color: var(--admin-text);
    text-align: center;
    font-size: 0.95rem;
}

/* Fullscreen calendar overlay */
.schedule-fs {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    flex-direction: column;
    background: var(--admin-bg);
}
.schedule-fs.is-open {
    display: flex;
}
body.schedule-fs-open {
    overflow: hidden;
}
.schedule-fs-toolbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-bottom: 1px solid var(--admin-border);
    background: var(--admin-bg-elevated);
}
.schedule-fs-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.schedule-fs-nav .admin-btn {
    min-width: 0;
    padding: 8px 12px;
}
.schedule-fs-range {
    font-weight: 650;
    font-size: 0.95rem;
    color: var(--admin-text);
    min-width: 140px;
    text-align: center;
}
.schedule-fs-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.schedule-fs-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 12px 16px 16px;
}
.schedule-fs-body .admin-schedule-columns-wrap {
    flex: 1;
    min-height: 0;
    max-height: none;
    height: 100%;
    margin-bottom: 0;
}
.admin-booking-card {
    --booking-r: 119;
    --booking-g: 246;
    --booking-b: 1;
    position: absolute;
    z-index: 1;
    left: 3px;
    right: 3px;
    margin: 0;
    padding: 5px 7px;
    border-radius: 8px;
    font-size: 0.7rem;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left-width: 3px;
    border-left-style: solid;
    color: #fafafa;
    background: rgba(var(--booking-r, 119), var(--booking-g, 246), var(--booking-b, 1), 0.5) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.admin-booking-card:hover {
    transform: translateY(-1px) translateZ(0);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.22);
}
.admin-booking-card .card-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fafafa;
    min-width: 0;
    max-width: 100%;
    display: block;
}
.admin-booking-card .card-meta {
    color: #a3a3a3;
    margin-top: 2px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-booking-card .card-status {
    margin-top: 4px;
}
.admin-booking-card .card-status .admin-badge {
    font-size: 0.65rem;
    padding: 1px 5px;
    opacity: 0.95;
}
.admin-booking-card--confirmed {
    opacity: 1;
    background: rgb(var(--booking-r, 119), var(--booking-g, 246), var(--booking-b, 1)) !important;
}
/* Конфликт слота после оплаты — ярко заметная карточка */
.admin-booking-card--conflict {
    --booking-r: 220 !important;
    --booking-g: 38 !important;
    --booking-b: 38 !important;
    border-color: rgba(254, 202, 202, 0.65) !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.45), 0 4px 18px rgba(185, 28, 28, 0.5);
}

/* Панель заявки справа (не модалка) */
.admin-booking-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 100%;
    height: 100vh;
    background: var(--admin-bg);
    border-left: 1px solid var(--admin-border);
    box-shadow: -8px 0 32px rgba(0,0,0,0.35);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow: hidden;
}
.admin-booking-panel.open { transform: translateX(0); }
.admin-booking-panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: var(--admin-bg-elevated);
}
.admin-booking-panel-header h2 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.admin-booking-panel-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--admin-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.admin-booking-panel-close:hover { background: var(--admin-border); color: var(--admin-text); }
.admin-booking-panel-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.admin-booking-panel-tabs.bookings-saas-tabs {
    margin: 0 0 14px;
    flex-shrink: 0;
}
.admin-booking-panel-tabs .bookings-saas-tab {
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
    padding: 9px 10px;
}
#bookingPanelDetails { flex: 1; min-height: 0; overflow-y: auto; }
#bookingPanelHistory {
    flex: 1;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    margin: 0 -2px;
    padding: 2px 4px 8px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}
#bookingPanelHistory::-webkit-scrollbar { width: 5px; }
#bookingPanelHistory::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}
#bookingPanelHistory::-webkit-scrollbar-track { background: transparent; }

/* Audit timeline — booking panel history */
#bookingPanelHistory .audit-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-left: 16px;
    border-left: 2px solid #2A2A2A;
    margin-top: 16px;
    margin-right: 4px;
    margin-bottom: 8px;
}
#bookingPanelHistory .audit-timeline__item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
#bookingPanelHistory .audit-timeline__dot {
    position: absolute;
    left: -21px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #0047FF;
    box-shadow: 0 0 0 3px rgba(0, 71, 255, 0.15);
}
#bookingPanelHistory .audit-timeline__dot--create {
    background-color: #34C759;
    box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.15);
}
#bookingPanelHistory .audit-timeline__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #8E8E93;
    line-height: 1.3;
}
#bookingPanelHistory .audit-timeline__author {
    font-weight: 600;
    color: #AEAEB2;
}
#bookingPanelHistory .audit-timeline__sep {
    opacity: 0.6;
    user-select: none;
}
#bookingPanelHistory .audit-timeline__time {
    font-variant-numeric: tabular-nums;
}
#bookingPanelHistory .audit-timeline__card {
    background: #1C1C1E;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: #FFFFFF;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
#bookingPanelHistory .audit-timeline__text {
    margin: 0;
    word-break: break-word;
}
#bookingPanelHistory .audit-timeline__lead {
    font-weight: 500;
    margin-bottom: 2px;
}
#bookingPanelHistory .audit-timeline__detail {
    display: block;
    font-size: 13px;
    color: #AEAEB2;
    line-height: 1.45;
}
#bookingPanelHistory .audit-timeline__card strong {
    font-weight: 600;
    color: #0047FF;
}
#bookingPanelHistory .audit-timeline__card .audit-badge--confirmed {
    color: #34C759;
    background: rgba(52, 199, 89, 0.12);
}
#bookingPanelHistory .audit-timeline__card .audit-badge--pending {
    color: #FFD60A;
    background: rgba(255, 214, 10, 0.12);
}
#bookingPanelHistory .audit-timeline__card .audit-badge--awaiting_prepayment {
    color: #64D2FF;
    background: rgba(100, 210, 255, 0.12);
}
#bookingPanelHistory .audit-timeline__card .audit-badge--rejected {
    color: #FF453A;
    background: rgba(255, 69, 58, 0.12);
}
#bookingPanelHistory .audit-timeline__card .audit-badge--conflict {
    color: #FF9F0A;
    background: rgba(255, 159, 10, 0.12);
}
#bookingPanelHistory .audit-timeline__error {
    margin: 0;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(255, 69, 58, 0.1);
    border: 1px solid rgba(255, 69, 58, 0.15);
    font-size: 12px;
    color: #FF8A80;
    line-height: 1.35;
}
#bookingPanelHistory .audit-timeline__footer {
    margin: 16px 0 4px;
    padding-top: 12px;
    border-top: 1px solid #2A2A2A;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #636366;
}
#bookingPanelHistory .audit-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    vertical-align: baseline;
}
#bookingPanelHistory .audit-badge--muted {
    background: rgba(255, 255, 255, 0.06);
    color: #8E8E93;
}
#bookingPanelHistory .audit-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.06);
    color: #AEAEB2;
}
#bookingPanelHistory .audit-tag--old {
    text-decoration: line-through;
    opacity: 0.65;
}
#bookingPanelHistory .audit-timeline-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 16px;
    min-height: 160px;
}
#bookingPanelHistory .audit-timeline-empty__title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: #AEAEB2;
}
#bookingPanelHistory .audit-timeline-empty__hint {
    margin: 0;
    font-size: 13px;
    color: #636366;
    max-width: 240px;
    line-height: 1.4;
}
#bookingPanelHistory .audit-timeline--loading {
    border-left-color: #2A2A2A;
}
#bookingPanelHistory .audit-timeline--loading .audit-timeline__item {
    gap: 10px;
}
#bookingPanelHistory .audit-skeleton__lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
#bookingPanelHistory .audit-skeleton__line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #1C1C1E 25%, #2A2A2A 50%, #1C1C1E 75%);
    background-size: 200% 100%;
    animation: audit-shimmer 1.2s ease-in-out infinite;
}
#bookingPanelHistory .audit-skeleton__line--sm { width: 50%; height: 10px; }
@keyframes audit-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@media (max-width: 520px) {
    .admin-booking-panel-body { padding: 12px; }
    .admin-booking-panel-header { padding: 14px 16px; }
}
.admin-booking-panel-body .detail-block { margin-bottom: 20px; }
.admin-booking-panel-body .detail-block:last-child { margin-bottom: 0; }
.admin-booking-panel-body .detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--admin-text-muted);
    margin-bottom: 6px;
}
.admin-booking-panel-body .detail-value { font-size: 0.95rem; }
.admin-booking-conflict-banner {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.18) 0%, rgba(185, 28, 28, 0.12) 100%);
    border: 1px solid rgba(220, 38, 38, 0.45);
    color: #7f1d1d;
    font-size: 0.88rem;
    line-height: 1.45;
}
.admin-booking-conflict-banner strong {
    display: block;
    margin-bottom: 4px;
    color: #991b1b;
    font-size: 0.95rem;
}
.admin-booking-guest {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--admin-bg-elevated);
    border-radius: 10px;
    margin-bottom: 20px;
}
.admin-booking-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--admin-text-muted);
    flex-shrink: 0;
    overflow: hidden;
}
.admin-booking-avatar img { width: 100%; height: 100%; object-fit: cover; }
.admin-booking-guest-info { min-width: 0; }
.admin-booking-guest-name { font-weight: 600; font-size: 1rem; margin-bottom: 2px; }
.admin-booking-guest-contact { font-size: 0.85rem; color: var(--admin-text-muted); }
.admin-booking-guest-tg {
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--admin-text-muted);
}
.admin-booking-guest-info .admin-btn-link {
    margin-top: 4px;
    padding: 0;
    height: auto;
}
.admin-booking-client-link {
    margin: -8px 0 16px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.admin-booking-client-results {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 220px;
    overflow-y: auto;
}
.admin-booking-panel-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--admin-border);
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
}
.admin-booking-panel-footer .admin-btn {
    padding: 6px 12px;
    font-size: 0.78rem;
    min-width: 0;
}
.admin-booking-edit-form #bookingPanelSaveAll {
    padding: 8px 14px;
    font-size: 0.85rem;
    margin-top: 8px;
}
.admin-booking-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--admin-text-muted);
}
.admin-booking-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.admin-booking-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* Модалка добавления заявки */
.admin-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.admin-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); }
.admin-modal-dialog { position: relative; background: var(--admin-bg-elevated); border: 1px solid var(--admin-border); border-radius: 16px; width: 100%; max-width: 480px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 24px 48px rgba(0,0,0,0.5); }
.admin-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--admin-border); flex-shrink: 0; }
.admin-modal-header h3 { margin: 0; font-size: 1.1rem; font-weight: 600; }
.admin-modal-close { background: none; border: none; color: var(--admin-text-muted); font-size: 1.5rem; cursor: pointer; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.admin-modal-close:hover { color: var(--admin-text); background: rgba(255,255,255,0.06); }
.admin-modal-body { padding: 20px; overflow-y: auto; flex: 1; min-height: 0; }
.admin-modal-body .admin-form-row { margin-bottom: 1rem; }
.admin-modal-body .admin-form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.admin-modal-body label { display: block; font-size: 0.85rem; color: var(--admin-text-muted); margin-bottom: 0.35rem; }
.admin-modal-footer { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 20px; border-top: 1px solid var(--admin-border); flex-shrink: 0; background: var(--admin-bg-elevated); }
.admin-modal-footer .admin-btn { flex-shrink: 0; min-width: 100px; }
.admin-modal-footer .admin-btn-outline { border: 1px solid rgba(255,255,255,0.3); color: #e5e5e5; background: rgba(255,255,255,0.08); }
.admin-modal-footer .admin-btn-outline:hover { border-color: var(--admin-accent); color: var(--admin-accent); background: var(--admin-accent-bg); }
.admin-confirm-text { margin: 0; font-size: 1rem; }
#bookingConfirmModal .admin-modal-dialog { max-width: 360px; }
.admin-btn-link {
    background: transparent; border: none; color: var(--admin-text-muted);
}
.admin-btn-link:hover { color: var(--admin-text); background: rgba(255,255,255,0.06); }
.admin-textarea { width: 100%; max-width: 100%; padding: 8px 12px; border: 1px solid var(--admin-border); border-radius: 8px; background: var(--admin-bg); color: var(--admin-text); font-family: inherit; font-size: 0.9rem; resize: vertical; min-height: 60px; }
.admin-textarea:focus { outline: none; border-color: var(--admin-accent); }
.detail-block-comment .detail-value { display: flex; flex-direction: column; gap: 8px; }
.detail-block-comment .admin-btn-sm { align-self: flex-start; }
.admin-booking-edit-form { margin-top: 12px; }
.admin-booking-edit-form .admin-form-row { margin-bottom: 12px; }
.admin-booking-edit-form .detail-label { display: block; font-size: 0.75rem; color: var(--admin-text-muted); margin-bottom: 4px; }
.admin-booking-edit-form .admin-input,
.admin-booking-edit-form .admin-textarea { width: 100%; }
.admin-schedule-day-cell { cursor: pointer; }
.admin-schedule-day-cell:hover { background: rgba(119, 246, 1, 0.06); }

/* Форма добавления заявки — uniform 2-col grid */
.add-modal-tabs {
    display: flex;
    gap: 4px;
    padding: 0 1.25rem 0.75rem;
    border-bottom: 1px solid var(--admin-border);
    margin: 0;
}
.add-modal-tab {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--admin-text-muted);
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.add-modal-tab:hover { color: var(--admin-text); background: rgba(255,255,255,0.04); }
.add-modal-tab.active {
    color: #fff;
    background: rgba(66, 22, 235, 0.35);
    border-color: rgba(66, 22, 235, 0.5);
}
.add-break-standalone-form[hidden],
.add-booking-form[hidden] { display: none !important; }
.add-booking-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1rem; }
.add-booking-form .admin-form-row { display: flex; flex-direction: column; margin: 0; }
.add-booking-form .admin-form-row label { font-size: 0.8rem; margin-bottom: 0.35rem; }
.add-booking-form .admin-input { min-height: 38px; box-sizing: border-box; }
.add-booking-form .admin-textarea { min-height: 52px; resize: vertical; }
.add-booking-form .add-booking-engineer-btn { min-height: 38px; }
.add-booking-grid { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1rem; }
.add-booking-block { grid-column: 1 / -1; border: none; padding: 0; margin: 0; }
.add-booking-block legend { font-size: 0.7rem; font-weight: 600; color: var(--admin-text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.35rem; display: block; }
.add-booking-block-when { background: rgba(119, 246, 1, 0.04); border-radius: 10px; padding: 0.75rem 1rem; border: 1px solid rgba(119, 246, 1, 0.15); }
.add-booking-block-when legend { color: var(--admin-accent); }
.add-booking-block-when .add-booking-fields { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem 1rem; }
.add-booking-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1rem; }
.add-booking-fields-2, .add-booking-fields-3 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1rem; }
.add-booking-block-what .add-booking-fields { grid-template-columns: 1fr 1fr; }
.add-booking-block-client .add-booking-fields { grid-template-columns: 1fr 1fr; }
.add-booking-row { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1rem; }
.add-booking-row-status { align-items: center; }
.add-booking-row-status .add-booking-segmented { grid-column: 2; }
.add-booking-row { display: grid; gap: 0.75rem; margin-top: 1rem; }
.add-booking-row-extra { grid-template-columns: 1fr 1fr; }
.add-booking-row-status { margin-top: 1.25rem; }
.add-booking-status-label { font-size: 0.85rem; color: var(--admin-text-muted); margin-bottom: 0.5rem; display: block; }
.add-booking-segmented { display: inline-flex; background: var(--admin-bg); border: 1px solid var(--admin-border); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.add-booking-segmented-btn { padding: 6px 12px; font-size: 0.8rem; font-weight: 500; border: none; background: transparent; border-radius: 8px; cursor: pointer; transition: all 0.2s; }
.add-booking-segmented-btn[data-value="pending"] { color: #eab308; }
.add-booking-segmented-btn[data-value="pending"]:hover { background: rgba(234, 179, 8, 0.15); }
.add-booking-segmented-btn[data-value="pending"].active { background: rgba(234, 179, 8, 0.25); color: #fcd34d; }
.add-booking-segmented-btn[data-value="awaiting_prepayment"] { color: #3b82f6; }
.add-booking-segmented-btn[data-value="awaiting_prepayment"]:hover { background: rgba(59, 130, 246, 0.15); }
.add-booking-segmented-btn[data-value="awaiting_prepayment"].active { background: rgba(59, 130, 246, 0.25); color: #93c5fd; }
.add-booking-segmented-btn[data-value="confirmed"] { color: #22c55e; }
.add-booking-segmented-btn[data-value="confirmed"]:hover { background: rgba(34, 197, 94, 0.15); }
.add-booking-segmented-btn[data-value="confirmed"].active { background: rgba(34, 197, 94, 0.25); color: #86efac; }
.add-booking-segmented-btn[data-value="rejected"] { color: #ef4444; }
.add-booking-segmented-btn[data-value="rejected"]:hover { background: rgba(239, 68, 68, 0.15); }
.add-booking-segmented-btn[data-value="rejected"].active { background: rgba(239, 68, 68, 0.25); color: #fca5a5; }
.add-booking-engineer-picker { position: relative; }
.add-booking-engineer-btn { width: 100%; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.add-booking-engineer-btn[data-selected] { color: var(--admin-text); }
.add-booking-engineer-list { position: absolute; top: 100%; left: 0; right: 0; margin: 4px 0 0; padding: 6px 0; background: var(--admin-bg-elevated); border: 1px solid var(--admin-border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); z-index: 100; max-height: 200px; overflow-y: auto; list-style: none; }
.add-booking-engineer-list:not([hidden]) { display: block; }
.add-booking-engineer-list[hidden] { display: none; }
.add-booking-engineer-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; transition: background 0.15s; }
.add-booking-engineer-item:hover { background: rgba(255,255,255,0.06); }
.add-booking-engineer-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--admin-bg-card); }
.add-booking-engineer-avatar-init { display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; color: var(--admin-text-muted); background: var(--admin-border); }
.add-booking-engineer-name { font-size: 0.9rem; }
.add-booking-engineer-nick { font-size: 0.75rem; color: var(--admin-text-muted); margin-left: 4px; }
.add-booking-footer { gap: 16px; }
.add-booking-cancel { background: none; border: none; color: var(--admin-text-muted); font-size: 0.9rem; cursor: pointer; padding: 8px 0; }
.add-booking-cancel:hover { color: var(--admin-text); }
.add-booking-submit { background: #4216EB !important; color: #fff !important; border: none; padding: 10px 24px; border-radius: 10px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.add-booking-submit:hover { background: #5c3aef !important; }
.add-booking-form .admin-form-hint { grid-column: 1 / -1; margin: 0.5rem 0 0; }
.add-booking-break-row { grid-column: 1 / -1; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--admin-border); }
.add-booking-break-checkbox-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.9rem; color: var(--admin-text); }
.add-booking-break-checkbox { width: 18px; height: 18px; accent-color: var(--admin-accent); }
.add-booking-break-checkbox-text { font-weight: 500; }
.add-booking-break-hint { display: block; font-size: 0.75rem; color: var(--admin-text-muted); margin-top: 4px; margin-left: 28px; }
#addBookingModal .admin-modal-dialog,
#addBookingModal .crm-wizard-dialog {
    max-width: 520px;
    max-height: 94vh;
    width: 100%;
}

/* ——— CRM booking wizard ——— */
.crm-wizard-dialog {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.crm-wizard-header {
    padding: 1rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--admin-border);
    flex-shrink: 0;
}
.crm-wizard-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.crm-wizard-header-top h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}
.crm-wizard-draft-banner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 2.25rem 0.75rem 0.9rem;
    margin-bottom: 0.75rem;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.28);
}
.crm-wizard-draft-banner[hidden] {
    display: none !important;
}
.crm-wizard-draft-close {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--admin-text-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.crm-wizard-draft-close:hover {
    color: var(--admin-text);
    background: rgba(255,255,255,0.08);
}
.crm-wizard-draft-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.85rem;
    color: var(--admin-text);
}
.crm-wizard-draft-text strong { font-weight: 600; }
.crm-wizard-draft-actions { display: flex; gap: 0.5rem; align-items: center; }
.crm-wizard-context {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
}
.crm-wizard-context-chip {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--admin-border);
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
}
.crm-wizard-progress {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
}
.crm-wizard-progress-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: none;
    background: transparent;
    color: var(--admin-text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0.15rem;
    white-space: nowrap;
}
.crm-wizard-progress-item:disabled {
    opacity: 0.45;
    cursor: default;
}
.crm-wizard-progress-item.is-active {
    color: var(--admin-accent);
}
.crm-wizard-progress-item.is-done {
    color: var(--admin-text);
}
.crm-wizard-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    flex-shrink: 0;
}
.crm-wizard-progress-item.is-active .crm-wizard-progress-dot,
.crm-wizard-progress-item.is-done .crm-wizard-progress-dot {
    background: var(--admin-accent);
}
.crm-wizard-progress-line {
    flex: 0 0 18px;
    height: 1px;
    background: var(--admin-border);
}
.crm-wizard-step-label {
    margin: 0.55rem 0 0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--admin-accent);
}
.crm-wizard-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 1.25rem 1.25rem;
}
.crm-wizard-panel { display: flex; flex-direction: column; gap: 0.85rem; }
.crm-wizard-lead {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--admin-text);
}
.crm-wizard-lead--sub {
    margin-top: 0.5rem;
    font-size: 0.95rem;
}
.crm-wizard-field { display: flex; flex-direction: column; gap: 0.35rem; }
.crm-wizard-field label,
.crm-wizard-field-label {
    font-size: 0.8rem;
    color: var(--admin-text-muted);
}
.crm-wizard-select,
.crm-wizard-field .admin-input {
    min-height: 44px;
}
.crm-wizard-type-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
@media (min-width: 480px) {
    .crm-wizard-type-grid { grid-template-columns: 1fr 1fr; }
}
.crm-wizard-type-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    text-align: left;
    padding: 1.1rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--admin-border);
    background: rgba(255,255,255,0.03);
    color: var(--admin-text);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
    min-height: 120px;
}
.crm-wizard-type-card:hover {
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.06);
    transform: translateY(-1px);
}
.crm-wizard-type-icon { font-size: 1.4rem; line-height: 1; }
.crm-wizard-type-title { font-size: 1rem; font-weight: 600; }
.crm-wizard-type-desc { font-size: 0.8rem; color: var(--admin-text-muted); }
.crm-wizard-locked-place {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.2);
}
.crm-wizard-locked-place-main {
    font-weight: 600;
    font-size: 0.95rem;
}
.crm-wizard-when-card {
    padding: 0.9rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--admin-border);
}
.crm-wizard-when-date {
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.crm-wizard-slot-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
}
.crm-wizard-slot {
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid var(--admin-border);
    background: var(--admin-bg);
    color: var(--admin-text);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
}
.crm-wizard-slot.is-busy {
    opacity: 0.35;
    text-decoration: line-through;
    cursor: not-allowed;
}
.crm-wizard-slot.is-in-range {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.45);
}
.crm-wizard-slot.is-selected {
    background: #3B82F6;
    color: #fff;
    border-color: #3B82F6;
    font-weight: 700;
}
.crm-wizard-slot-range {
    margin-top: 0.65rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
}
.crm-date-btn {
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.crm-date-btn::after {
    content: '📅';
    font-size: 0.95rem;
    opacity: 0.75;
}
.crm-date-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 4000;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.crm-date-picker {
    width: 100%;
    max-width: 340px;
    background: var(--admin-bg-elevated);
    border: 1px solid var(--admin-border);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 24px 48px rgba(0,0,0,0.45);
}
.crm-date-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.crm-date-picker-title {
    font-weight: 650;
    font-size: 0.95rem;
}
.crm-date-picker-nav {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--admin-border);
    background: transparent;
    color: var(--admin-text);
    font-size: 1.25rem;
    cursor: pointer;
}
.crm-date-picker-nav:hover {
    border-color: #3B82F6;
    color: #93c5fd;
}
.crm-date-picker-dows {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.35rem;
    text-align: center;
    font-size: 0.72rem;
    color: var(--admin-text-muted);
}
.crm-date-picker-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}
.crm-date-picker-empty { min-height: 40px; }
.crm-date-picker-day {
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--admin-text);
    cursor: pointer;
    font-size: 0.88rem;
}
.crm-date-picker-day:hover {
    background: rgba(59, 130, 246, 0.12);
}
.crm-date-picker-day.is-today {
    border-color: rgba(59, 130, 246, 0.45);
}
.crm-date-picker-day.is-selected {
    background: #3B82F6;
    color: #fff;
    font-weight: 700;
}
.crm-date-picker-foot {
    display: flex;
    justify-content: space-between;
    margin-top: 0.85rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--admin-border);
}
.crm-wizard-slot-status {
    margin-top: 0.5rem;
    font-size: 0.82rem;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
}
.crm-wizard-slot-status.is-ok {
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
}
.crm-wizard-slot-status.is-bad {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}
.crm-wizard-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.crm-wizard-duration-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.crm-wizard-duration-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--admin-border);
    background: rgba(255,255,255,0.04);
    color: var(--admin-text);
    font-size: 1.25rem;
    cursor: pointer;
    flex-shrink: 0;
}
.crm-wizard-duration-btn:hover {
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.08);
}
.crm-wizard-duration-input {
    flex: 1;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    min-height: 44px;
}
.crm-wizard-field-note {
    font-weight: 400;
    color: var(--admin-text-muted);
    font-size: 0.75rem;
}
.crm-wizard-chip {
    min-height: 40px;
    padding: 0 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--admin-border);
    background: transparent;
    color: var(--admin-text);
    font-size: 0.85rem;
    cursor: pointer;
}
.crm-wizard-chip.is-active {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.5);
    color: var(--admin-accent);
    font-weight: 600;
}
.crm-wizard-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 0.35rem;
}
.crm-wizard-section + .crm-wizard-section {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--admin-border);
}
.crm-pay-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
@media (min-width: 480px) {
    .crm-pay-grid { grid-template-columns: 1fr 1fr; }
}
.crm-person-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}
.crm-person-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.crm-person-avatar--init {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--admin-text-muted);
    background: rgba(59, 130, 246, 0.12);
    color: var(--admin-accent);
}
.crm-person-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    padding: 0.75rem 0.85rem;
    border-radius: 14px;
    border: 1px solid var(--admin-border);
    background: rgba(255,255,255,0.03);
    color: var(--admin-text);
}
.crm-person-card.is-clickable {
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0.65rem 0.25rem;
}
.crm-person-card.is-clickable:hover,
button.crm-person-card.is-clickable:hover {
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
}
.crm-person-card.is-selected {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.07);
}
.crm-person-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    flex: 1;
}
.crm-person-card-name {
    font-weight: 650;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.crm-person-card-sub {
    font-size: 0.8rem;
    color: #93c5fd;
}
.crm-person-card-meta {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
}
.crm-person-card-clear {
    border: none;
    background: transparent;
    color: var(--admin-text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
}
.crm-person-card-clear:hover {
    color: var(--admin-text);
    background: rgba(255,255,255,0.06);
}
.crm-eng-grid {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.crm-eng-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    padding: 0.7rem 0.85rem;
    border-radius: 14px;
    border: 1px solid var(--admin-border);
    background: rgba(255,255,255,0.02);
    color: var(--admin-text);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.crm-eng-card:hover {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.05);
}
.crm-eng-card.is-selected {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
}
.crm-eng-card-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.crm-eng-card-name {
    font-weight: 650;
    font-size: 0.92rem;
}
.crm-eng-card-nick {
    font-size: 0.78rem;
    color: #93c5fd;
}
.crm-eng-card-role {
    font-size: 0.72rem;
    color: var(--admin-text-muted);
}
.crm-wizard-summary-card .crm-person-card {
    margin-top: 0.4rem;
    background: rgba(0,0,0,0.15);
}
.crm-wizard-client-list {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 0.5rem;
    max-height: 240px;
    overflow-y: auto;
}
.crm-wizard-link-btn {
    align-self: flex-start;
    border: none;
    background: transparent;
    color: var(--admin-accent);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.35rem 0;
}
.crm-wizard-new-client {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.crm-wizard-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.crm-wizard-status-btn {
    min-height: 36px;
    padding: 0 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    background: transparent;
    color: var(--admin-text-muted);
    font-size: 0.78rem;
    cursor: pointer;
}
.crm-wizard-status-btn.is-active {
    color: #fff;
    border-color: transparent;
    background: #4216EB;
}
.crm-wizard-hint {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: var(--admin-text-muted);
}
.crm-wizard-summary-card {
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid var(--admin-border);
    background: rgba(255,255,255,0.03);
}
.crm-wizard-summary-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}
.crm-wizard-summary-line { font-size: 0.95rem; margin-top: 0.15rem; }
.crm-wizard-summary-muted {
    font-size: 0.8rem;
    color: var(--admin-text-muted);
    margin-top: 0.15rem;
}
.crm-wizard-summary-divider {
    height: 1px;
    background: var(--admin-border);
    margin: 0.85rem 0;
}
.crm-wizard-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
    margin-top: 0.35rem;
}
.crm-wizard-summary-row span { color: var(--admin-text-muted); }
.crm-wizard-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    cursor: pointer;
}
.crm-wizard-check input { width: 18px; height: 18px; accent-color: var(--admin-accent); }
.crm-wizard-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--admin-border);
    flex-shrink: 0;
    background: var(--admin-bg-elevated);
}
.crm-wizard-footer-spacer { flex: 1; }
.crm-wizard-footer .admin-btn-primary {
    background: #4216EB;
    color: #fff;
    border: none;
    min-height: 44px;
    padding: 0 1.25rem;
    border-radius: 10px;
    font-weight: 600;
}
.crm-wizard-footer .admin-btn-primary:hover { background: #5c3aef; }
.crm-wizard-footer .admin-btn-primary:disabled { opacity: 0.6; cursor: wait; }
.crm-wizard-error {
    margin: 0;
    padding: 0.55rem 1.25rem 0.85rem;
    color: #fca5a5;
    font-size: 0.85rem;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .crm-wizard-modal {
        padding: 0;
        align-items: stretch;
    }
    .crm-wizard-dialog {
        max-width: none;
        max-height: none;
        height: 100%;
        min-height: 100dvh;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .crm-wizard-header {
        padding-top: max(0.85rem, env(safe-area-inset-top));
    }
    .crm-wizard-footer {
        padding-bottom: max(0.85rem, env(safe-area-inset-bottom));
        position: sticky;
        bottom: 0;
    }
    .crm-wizard-slot-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .crm-wizard-type-grid {
        grid-template-columns: 1fr;
    }
}


/* Оверлей загрузки файла */
.admin-upload-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}
.admin-upload-overlay.active {
    display: flex;
}
.admin-upload-overlay-content {
    text-align: center;
    padding: 2rem;
    background: var(--admin-bg-elevated);
    border: 1px solid var(--admin-border);
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    min-width: 260px;
}
.admin-upload-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    border: 3px solid var(--admin-border);
    border-top-color: var(--admin-accent);
    border-radius: 50%;
    animation: admin-upload-spin 0.9s linear infinite;
}
.admin-upload-overlay-text {
    margin: 0 0 0.35rem;
    font-weight: 600;
    color: var(--admin-text);
}
.admin-upload-overlay-hint {
    margin: 0;
    font-size: 0.85rem;
    color: var(--admin-text-muted);
}
@keyframes admin-upload-spin {
    to { transform: rotate(360deg); }
}

/* Блок смен звукарей — Timeline, единый модуль */
.admin-shifts-section {
    margin-top: 24px; padding: 20px;
    background: var(--admin-bg-card);
    border-radius: 14px;
    border: 1px solid var(--admin-border);
}
.admin-shifts-title { margin: 0 0 12px; font-size: 1rem; font-weight: 600; }
.admin-shifts-header {
    display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
    gap: 12px 20px; margin-bottom: 12px;
}
.admin-shifts-filter { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; flex: 1; min-width: 0; }
.admin-shifts-filter-label { font-size: 0.85rem; color: var(--admin-text-muted); }
.admin-shifts-studio-filters {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

/* Горизонтальный swipe студий — overflow изолирован внутри блока */
.studios-scroll-container {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    min-width: 0;
}

.studios-scroll-container::-webkit-scrollbar {
    display: none;
}

.studios-scroll-container .admin-shifts-studio-chip {
    flex: 0 0 auto;
}
/* Chips студий: заметные, непрозрачные */
.admin-shifts-studio-chip {
    padding: 8px 16px; border-radius: 10px; font-size: 0.85rem; font-weight: 500; cursor: pointer;
    border: 1px solid rgba(113, 113, 122, 0.5); background: rgba(255, 255, 255, 0.06);
    color: var(--admin-text); transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.admin-shifts-studio-chip:hover { border-color: rgba(113, 113, 122, 0.7); background: rgba(255, 255, 255, 0.1); }
.admin-shifts-studio-chip.admin-shifts-studio-chip--selected {
    border-color: var(--admin-accent); color: var(--admin-accent);
    background: color-mix(in srgb, var(--admin-accent) 18%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--admin-accent) 25%, transparent);
}
.admin-shifts-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-shifts-actions .admin-btn-sm {
    padding: 8px 14px; font-size: 0.85rem; font-weight: 600;
    background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(113, 113, 122, 0.5);
    color: var(--admin-text);
}
.admin-shifts-actions .admin-btn-sm:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--admin-accent); color: var(--admin-accent); }
.admin-shifts-actions .admin-btn-outline {
    padding: 10px 18px; font-size: 0.9rem; font-weight: 600;
    background: color-mix(in srgb, var(--admin-accent) 20%, transparent);
    border: 1px solid var(--admin-accent); color: var(--admin-accent);
}
.admin-shifts-actions .admin-btn-outline:hover { background: color-mix(in srgb, var(--admin-accent) 35%, transparent); color: #fff; }
.admin-shifts-hint { font-size: 0.8rem; color: var(--admin-text-muted); }

/* Инфо-бар: иконка (i) + приглушённый текст + горячие клавиши в тегах */
.admin-shifts-infobar {
    display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px;
    padding: 10px 14px; border-radius: 8px; background: rgba(113, 113, 122, 0.08);
    border: 1px solid rgba(113, 113, 122, 0.15);
}
.admin-shifts-infobar-icon {
    flex-shrink: 0; margin-top: 1px; color: var(--admin-text-muted);
}
.admin-shifts-infobar-text {
    font-size: 0.8rem; color: var(--admin-text-muted); line-height: 1.4;
}
.admin-shifts-key-hints { margin-left: 0.25em; }
.admin-key-tag {
    display: inline-block; padding: 2px 6px; border-radius: 4px;
    font-size: 0.75rem; font-weight: 500; background: rgba(113, 113, 122, 0.25);
    color: var(--admin-text); border: 1px solid rgba(113, 113, 122, 0.35);
}

/* Группы чипов по городам */
.admin-shifts-chip-group { margin-bottom: 8px; min-width: 0; max-width: 100%; }
.admin-shifts-chip-group:last-child { margin-bottom: 0; }
.admin-shifts-chip-group-label {
    display: block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--admin-text-muted); margin-bottom: 4px;
}
.admin-shifts-chip-group-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* Timeline wrap: при горизонтальном скролле колонка «Студия» остаётся видимой (sticky) */
.admin-shifts-timeline-wrap {
    overflow: auto; border-radius: 10px; background: var(--admin-bg-card);
    border: 1px solid rgba(113, 113, 122, 0.25);
    max-height: min(70vh, 560px);
}
.admin-shifts-timeline {
    font-size: 0.85rem;
    min-width: max-content;
    --shifts-col-w: 132px;
    --shifts-row-h: 80px;
    --shifts-studio-w: 160px;
    --shifts-card-h: 44px;
    --shifts-border: rgba(113, 113, 122, 0.2);
}
.admin-shifts-timeline-header {
    display: flex; position: sticky; top: 0; z-index: 20;
    border-bottom: 1px solid var(--shifts-border); background: var(--admin-bg-elevated);
    box-shadow: 0 1px 0 var(--shifts-border);
}
.admin-shifts-corner {
    width: var(--shifts-studio-w); min-width: var(--shifts-studio-w); flex-shrink: 0;
    padding: 10px 12px; border-right: 1px solid var(--shifts-border);
    font-weight: 600; box-sizing: border-box; background: var(--admin-bg-elevated);
    position: sticky; left: 0; z-index: 21;
}
.admin-shifts-days-row { display: flex; flex: 1; min-width: 0; }
.admin-shifts-day {
    width: var(--shifts-col-w); min-width: var(--shifts-col-w); max-width: var(--shifts-col-w);
    padding: 10px 8px; border-right: 1px solid var(--shifts-border);
    text-align: center; font-weight: 500; flex-shrink: 0; box-sizing: border-box;
    background: var(--admin-bg-elevated);
}
.admin-shifts-day--today { position: relative; border-left: 2px solid var(--admin-accent); }
.admin-shifts-timeline-row {
    display: flex; min-height: var(--shifts-row-h); height: var(--shifts-row-h);
    align-items: stretch; border-bottom: 1px solid var(--shifts-border);
}
.admin-shifts-timeline-row:last-child { border-bottom: none; }
.admin-shifts-timeline-studio {
    width: var(--shifts-studio-w); min-width: var(--shifts-studio-w); max-width: var(--shifts-studio-w);
    padding: 8px 12px; border-right: 1px solid var(--shifts-border);
    background: var(--admin-bg); flex-shrink: 0; box-sizing: border-box;
    display: flex; align-items: center; font-weight: 500;
    position: sticky; left: 0; z-index: 10;
}
.admin-shifts-studio-name {
    word-wrap: break-word; word-break: break-word; white-space: normal;
    line-height: 1.25; min-width: 0;
}
.admin-shifts-cells-row { display: flex; flex: 1; min-width: 0; }
.admin-shifts-cell {
    width: var(--shifts-col-w); min-width: var(--shifts-col-w); max-width: var(--shifts-col-w);
    height: var(--shifts-row-h); min-height: var(--shifts-row-h); box-sizing: border-box;
    padding: 6px; border-right: 1px solid var(--shifts-border);
    background: var(--admin-bg); cursor: pointer; position: relative;
    display: flex; flex-direction: column; gap: 4px; align-items: stretch; justify-content: flex-start;
    overflow-y: auto; overflow-x: hidden; transition: background 0.15s;
}
.admin-shifts-cell:hover { background: var(--admin-bg-elevated); }
.admin-shifts-cell--today::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
    background: var(--admin-accent); opacity: 0.7; pointer-events: none; z-index: 1;
}
.admin-shifts-cell--empty .admin-shifts-cell-plus {
    opacity: 0; transition: opacity 0.2s;
}
.admin-shifts-cell-group:hover .admin-shifts-cell-plus { opacity: 0.6; }
.admin-shifts-cell-plus {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    font-size: 1.5rem; font-weight: 300; color: var(--admin-text-muted); pointer-events: none;
    line-height: 1;
}
.admin-shifts-cell.admin-shifts-cell--conflict { background: rgba(239, 68, 68, 0.08); outline: 1px solid rgba(239, 68, 68, 0.3); }

/* Cards: glassmorphism, left accent, typography, avatar */
.admin-shifts-card {
    display: flex; align-items: center; gap: 8px; padding: 0 8px 0 0;
    height: var(--shifts-card-h); min-height: var(--shifts-card-h); flex-shrink: 0;
    border-radius: 6px; cursor: pointer; box-sizing: border-box; width: 100%;
    overflow: hidden; transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(113, 113, 122, 0.15);
    border-left: 4px solid var(--shift-color);
}
@supports (background: color-mix(in srgb, red 18%, transparent)) {
    .admin-shifts-card { background: color-mix(in srgb, var(--shift-color) 18%, transparent); }
}
@supports not (background: color-mix(in srgb, red 18%, transparent)) {
    .admin-shifts-card { background: rgba(0, 0, 0, 0.06); }
}
.admin-shifts-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.admin-shifts-card-avatar {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(113, 113, 122, 0.2);
}
@supports (background: color-mix(in srgb, red 35%, transparent)) {
    .admin-shifts-card-avatar { background: color-mix(in srgb, var(--shift-color) 35%, transparent); }
}
@supports not (background: color-mix(in srgb, red 35%, transparent)) {
    .admin-shifts-card-avatar { background: rgba(0, 0, 0, 0.08); }
}
.admin-shifts-card-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.admin-shifts-card-avatar-initials {
    font-size: 0.7rem; font-weight: 600; color: var(--admin-text);
    line-height: 1;
}
.admin-shifts-card-body {
    display: flex; flex-direction: column; justify-content: center; gap: 0;
    min-width: 0; flex: 1; overflow: hidden;
}
.engineer-name-selector,
.admin-shifts-card-name {
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--admin-text);
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-shifts-card-time { font-size: 0.7rem; opacity: 0.75; color: var(--admin-text-muted); }
.admin-shifts-card-time-edit { cursor: pointer; border-bottom: 1px dashed rgba(255,255,255,0.3); }
.admin-shifts-card-time-edit:hover { opacity: 1; }
.admin-shifts-card-del {
    opacity: 0; margin-left: auto; padding: 4px; flex-shrink: 0;
    border-radius: 4px; color: var(--admin-text-muted); font-size: 1.1rem; line-height: 1;
    transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.admin-shifts-card:hover .admin-shifts-card-del { opacity: 1; }
.admin-shifts-card-del:hover { background: rgba(239, 68, 68, 0.2); color: #dc2626; }

.admin-shifts-inline-dropdown {
    position: absolute; z-index: 100; background: var(--admin-bg-card); border: 1px solid var(--admin-border);
    border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.2); padding: 6px; max-height: 240px;
    overflow-y: auto; min-width: 180px;
}
.admin-shifts-inline-dropdown-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; cursor: pointer;
    font-size: 0.85rem; transition: background 0.1s;
}
.admin-shifts-inline-dropdown-item:hover { background: var(--admin-bg-elevated); }
.admin-shifts-inline-dropdown-item .admin-shifts-eng-color { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.admin-shifts-inline-dropdown-item .admin-shifts-eng-load { font-size: 0.75rem; color: var(--admin-text-muted); margin-left: auto; }
.admin-shifts-inline-dropdown-item.admin-shifts-dropdown-item--conflict { background: rgba(239, 68, 68, 0.15); color: #b91c1c; }

/* Popover редактирования времени смены */
.admin-shifts-time-edit-popover {
    background: var(--admin-bg-card); border: 1px solid var(--admin-border);
    border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    padding: 12px; min-width: 220px;
}
.admin-shifts-time-edit-row { margin-bottom: 10px; }
.admin-shifts-time-edit-row:last-of-type { margin-bottom: 0; }
.admin-shifts-time-edit-row label { display: block; font-size: 0.75rem; color: var(--admin-text-muted); margin-bottom: 6px; }
.admin-shifts-time-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-shifts-time-chip {
    padding: 6px 10px; font-size: 0.8rem; border-radius: 6px; cursor: pointer;
    border: 1px solid rgba(113, 113, 122, 0.4); background: rgba(255,255,255,0.05);
    color: var(--admin-text);
}
.admin-shifts-time-chip:hover { border-color: var(--admin-accent); color: var(--admin-accent); }
.admin-shifts-time-chip.active { border-color: var(--admin-accent); background: color-mix(in srgb, var(--admin-accent) 20%, transparent); color: var(--admin-accent); }
.admin-shifts-time-inputs { display: flex; align-items: center; gap: 8px; }
.admin-shifts-time-inputs .admin-input { width: 70px; }
.admin-shifts-time-edit-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--admin-border); }

/* Stats: widget cards with progress bar */
.admin-shifts-load { margin-top: 16px; }
.admin-shifts-load-title { font-size: 0.85rem; font-weight: 600; color: var(--admin-text-muted); margin-bottom: 12px; }
.admin-shifts-load-widgets {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px;
}
.admin-shifts-load-widget {
    background: var(--admin-bg-card); border: 1px solid rgba(113, 113, 122, 0.2);
    border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px;
}
.admin-shifts-load-widget-head {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.admin-shifts-load-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.admin-shifts-load-name { font-size: 0.85rem; font-weight: 500; color: var(--admin-text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-shifts-load-count { font-size: 0.8rem; color: var(--admin-text-muted); margin-left: auto; }
.admin-shifts-load-bar {
    height: 6px; border-radius: 3px; background: rgba(113, 113, 122, 0.2); overflow: hidden;
}
.admin-shifts-load-bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }

/* Breaks & Maintenance — премиум data table, dark mode */
.breaks-module { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
.breaks-module-header {
    display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
    gap: 16px 24px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--admin-border);
}
.breaks-module-title { margin: 0 0 4px; font-size: 1.1rem; font-weight: 600; color: var(--admin-text); }
.breaks-module-hint { margin: 0; font-size: 0.8rem; color: var(--admin-text-muted); }
.breaks-module-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.breaks-show-past-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.85rem; color: var(--admin-text-muted); }
.breaks-show-past-toggle:hover { color: var(--admin-text); }
.breaks-show-past-input { width: 16px; height: 16px; accent-color: var(--admin-accent); }
.breaks-quick-add-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25); }
.breaks-table-wrap {
    background: var(--admin-bg-elevated);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.breaks-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.breaks-table th { padding: 14px 18px; text-align: left; font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--admin-text-muted); background: rgba(0,0,0,0.2); border-bottom: 1px solid var(--admin-border); }
.breaks-table td { padding: 14px 18px; border-bottom: 1px solid var(--admin-border); color: var(--admin-text); vertical-align: middle; }
.breaks-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.breaks-table tbody tr:last-child td { border-bottom: none; }
.breaks-th-status { width: 90px; }
.breaks-th-date { width: 100px; }
.breaks-th-studio { min-width: 140px; }
.breaks-th-engineer { min-width: 160px; }
.breaks-th-time { width: 110px; }
.breaks-th-timeline { min-width: 180px; }
.breaks-th-actions { width: 48px; text-align: right; padding-right: 14px; }
.breaks-status { display: inline-block; padding: 4px 10px; border-radius: 8px; font-size: 0.75rem; font-weight: 600; }
.breaks-status--upcoming { background: rgba(59, 130, 246, 0.2); color: #60A5FA; }
.breaks-status--active { background: rgba(34, 197, 94, 0.2); color: #4ADE80; }
.breaks-status--past { background: rgba(113, 113, 122, 0.25); color: var(--admin-text-muted); }
.breaks-engineer-badge { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 10px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); font-size: 0.85rem; }
.breaks-engineer-badge--optional { opacity: 0.6; }
.breaks-engineer-avatar { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(113, 113, 122, 0.3); }
.breaks-engineer-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.breaks-engineer-avatar-initials { font-size: 0.65rem; font-weight: 700; color: var(--admin-text); }
.breaks-engineer-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px; }
.breaks-row-timeline { height: 8px; background: rgba(113, 113, 122, 0.15); border-radius: 4px; position: relative; overflow: hidden; }
.breaks-row-timeline-segment { position: absolute; top: 0; bottom: 0; background: linear-gradient(90deg, var(--admin-accent), #60A5FA); border-radius: 4px; box-shadow: 0 0 12px rgba(59, 130, 246, 0.5); transition: left 0.2s, width 0.2s; }
.breaks-delete-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: none; background: transparent; border-radius: 8px; color: var(--admin-text-muted); cursor: pointer; opacity: 0.5; transition: opacity 0.2s, background 0.2s, color 0.2s; }
.breaks-row:hover .breaks-delete-btn { opacity: 1; }
.breaks-delete-btn:hover { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.breaks-empty-hint { margin: 0; padding: 40px 24px; text-align: center; font-size: 0.9rem; color: var(--admin-text-muted); }

/* Breaks Modal */
.breaks-modal-dialog { max-width: 520px; border-radius: 12px; box-shadow: 0 24px 48px rgba(0,0,0,0.4); }
.breaks-modal-body { padding: 24px 28px; overflow: visible; max-height: none; }
#breakQuickAddModal .admin-modal-dialog { max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; }
#breakQuickAddModal .admin-modal-body { flex: 0 0 auto; }
.breaks-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.breaks-form-grid .admin-form-row { margin-bottom: 0; }
.breaks-form-grid label { font-size: 0.8rem; font-weight: 600; color: var(--admin-text-muted); margin-bottom: 6px; display: block; }
.breaks-time-row { grid-column: 1 / -1; }
.breaks-time-picker { display: flex; align-items: center; gap: 12px; }
.breaks-time-select { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; font-size: 0.95rem; }
.breaks-time-sep { color: var(--admin-text-muted); font-weight: 500; }
.breaks-timeline-preview { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--admin-border); }
.breaks-timeline-label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--admin-text-muted); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.breaks-timeline-bar { height: 10px; background: rgba(113, 113, 122, 0.2); border-radius: 6px; position: relative; overflow: hidden; }
.breaks-timeline-segment { position: absolute; top: 0; bottom: 0; background: linear-gradient(90deg, var(--admin-accent), #60A5FA); border-radius: 6px; box-shadow: 0 0 16px rgba(59, 130, 246, 0.5); transition: left 0.2s, width 0.2s; }
.breaks-timeline-hours { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.7rem; color: var(--admin-text-muted); }
.breaks-modal .admin-modal-footer .admin-btn-link { border: none; background: transparent; }

/* Модалка массового назначения смен (шаблон 2/2, 5/2, 3/3) */
.admin-modal-dialog-md { max-width: 560px; }
.shift-pattern-body { padding: 16px 20px; }
.shift-pattern-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 640px) { .shift-pattern-grid { grid-template-columns: 1fr; } }
.shift-pattern-col { display: flex; flex-direction: column; gap: 12px; }
.shift-pattern-form-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px;
}
.shift-pattern-form-grid .admin-form-row { margin-bottom: 0; }
.shift-pattern-form-grid .shift-pattern-full { grid-column: 1 / -1; }
.shift-pattern-form-grid label { font-size: 0.8rem; margin-bottom: 4px; }
.shift-pattern-form-grid .admin-input { width: 100%; min-width: 0; box-sizing: border-box; }
.shift-pattern-preview-strip { flex-wrap: wrap; max-width: 100%; overflow: hidden; }
.shift-pattern-preview-day { flex-shrink: 0; }
.shift-pattern-combobox { position: relative; }
.shift-pattern-engineer-list {
    position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px;
    max-height: 200px; overflow-y: auto; list-style: none; margin: 4px 0 0; padding: 6px;
    background: var(--admin-bg-card); border: 1px solid var(--admin-border);
    border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.2); z-index: 50;
    display: none;
}
.shift-pattern-engineer-list.open { display: block; }
.shift-pattern-engineer-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px;
    border-radius: 6px; cursor: pointer; font-size: 0.85rem;
}
.shift-pattern-engineer-item:hover { background: var(--admin-bg-elevated); }
.shift-pattern-eng-avatar {
    width: 28px; height: 28px; border-radius: 50%; overflow: hidden;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.shift-pattern-eng-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.shift-pattern-eng-avatar-initials { font-size: 0.7rem; font-weight: 600; color: var(--admin-text); }
.shift-pattern-label { font-size: 0.8rem; font-weight: 600; color: var(--admin-text-muted); display: block; margin-bottom: 6px; }
.shift-pattern-mode-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.shift-pattern-mode-chip {
    padding: 6px 14px; border-radius: 8px; font-size: 0.8rem; cursor: pointer;
    border: 1px solid rgba(113, 113, 122, 0.35); background: transparent;
    color: var(--admin-text); transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.shift-pattern-mode-chip:hover { border-color: rgba(113, 113, 122, 0.6); background: var(--admin-bg-elevated); }
.shift-pattern-mode-chip.shift-pattern-mode-chip--active {
    border-color: var(--admin-accent); color: var(--admin-accent);
}
@supports (background: color-mix(in srgb, red 15%, transparent)) {
    .shift-pattern-mode-chip.shift-pattern-mode-chip--active {
        background: color-mix(in srgb, var(--admin-accent) 15%, transparent);
    }
}
@supports not (background: color-mix(in srgb, red 15%, transparent)) {
    .shift-pattern-mode-chip.shift-pattern-mode-chip--active {
        background: var(--admin-accent-bg);
    }
}
.shift-pattern-custom { margin-top: 8px; }
.shift-pattern-custom label { font-size: 0.8rem; color: var(--admin-text-muted); display: block; margin-bottom: 4px; }
.shift-pattern-custom-inputs { display: flex; align-items: center; gap: 8px; }
.shift-pattern-custom-inputs .admin-input { width: 60px; }
.shift-pattern-preview-col { border-left: 1px solid var(--admin-border); padding-left: 20px; }
@media (max-width: 640px) { .shift-pattern-preview-col { border-left: none; padding-left: 0; border-top: 1px solid var(--admin-border); padding-top: 16px; } }
.shift-pattern-preview-header { margin-bottom: 10px; }
.shift-pattern-preview-title { font-size: 0.85rem; font-weight: 600; display: block; color: var(--admin-text); }
.shift-pattern-preview-hint { font-size: 0.75rem; color: var(--admin-text-muted); display: block; margin-top: 2px; }
.shift-pattern-preview-strip {
    display: flex; flex-wrap: wrap; gap: 4px;
}
.shift-pattern-preview-day {
    width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.75rem; border-radius: 6px; background: rgba(113, 113, 122, 0.15);
    color: var(--admin-text-muted);
}
.shift-pattern-preview-day--on {
    color: var(--admin-accent); font-weight: 600;
}
@supports (background: color-mix(in srgb, red 25%, transparent)) {
    .shift-pattern-preview-day--on {
        background: color-mix(in srgb, var(--admin-accent) 25%, transparent);
    }
}
@supports not (background: color-mix(in srgb, red 25%, transparent)) {
    .shift-pattern-preview-day--on { background: var(--admin-accent-bg); }
}
.shift-pattern-footer { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid var(--admin-border); }

/* Dashboard: KPI-карточки и графики */
.admin-dashboard { padding-bottom: 2rem; }
.admin-dashboard-header { margin-bottom: 24px; }
.admin-dashboard-period {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--admin-border);
    background: var(--admin-bg);
    color: var(--admin-text);
    font-size: 0.9rem;
    margin-right: 12px;
}
.dashboard-kpi {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.dashboard-kpi-card {
    background: var(--admin-bg-card);
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dashboard-kpi-revenue { border-left: 3px solid var(--admin-accent); }
.dashboard-kpi-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--admin-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.dashboard-kpi-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--admin-text);
    letter-spacing: -0.02em;
}
.dashboard-kpi-sub {
    font-size: 0.85rem;
    color: var(--admin-text-dim);
}
.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}
.dashboard-chart-wrap {
    background: var(--admin-bg-card);
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    padding: 20px;
    overflow: hidden;
}
.dashboard-chart-title {
    margin: 0 0 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--admin-text-muted);
}
.dashboard-chart { min-height: 200px; }
.dashboard-tables {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}
.dashboard-table-wrap {
    background: var(--admin-bg-card);
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    padding: 20px;
}
.dashboard-table-title {
    margin: 0 0 14px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--admin-text-muted);
}
.dashboard-table-empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--admin-text-dim);
}
.admin-table-compact th,
.admin-table-compact td { padding: 8px 12px; font-size: 0.9rem; }
.dashboard-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--admin-border);
}
.dashboard-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Phase 10: GlobalFilterPanel */
.dashboard-filterbar {
    background: var(--admin-bg-card);
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 24px;
}
.dashboard-filter-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.dashboard-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.dashboard-filter-chip {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--admin-border);
    background: var(--admin-bg);
    color: var(--admin-text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    white-space: nowrap;
}
.dashboard-filter-chip:hover { color: var(--admin-text); border-color: var(--admin-accent); }
.dashboard-filter-chip.active {
    background: var(--admin-accent-bg);
    border-color: var(--admin-accent);
    color: var(--admin-accent);
    font-weight: 600;
}
.dashboard-filter-range {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.dashboard-filter-range .admin-input {
    padding: 6px 10px;
    font-size: 0.82rem;
    min-height: 34px;
}
.dashboard-filter-range-sep { color: var(--admin-text-dim); font-size: 0.85rem; }
.dashboard-filter-compare {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--admin-text-muted);
    cursor: pointer;
    white-space: nowrap;
}
.dashboard-filter-compare input { accent-color: var(--admin-accent); width: 16px; height: 16px; }
.dashboard-filter-toggle-more {
    background: none;
    border: none;
    color: var(--admin-accent);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 4px;
    white-space: nowrap;
}
.dashboard-filter-toggle-more:hover { color: var(--admin-accent-hover); }
.dashboard-filter-reset {
    margin-left: auto;
}
.dashboard-filter-more {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--admin-border-subtle);
}
.dashboard-filter-more.open { display: grid; }
.dashboard-filter-more .admin-select { width: 100%; box-sizing: border-box; }

/* KPI: delta vs compare period */
.dashboard-kpi-delta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 999px;
    margin-left: 6px;
}
.dashboard-kpi-delta.up { color: #4ade80; background: rgba(74, 222, 128, 0.12); }
.dashboard-kpi-delta.down { color: #f87171; background: rgba(248, 113, 113, 0.12); }
.dashboard-kpi-warn {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.78rem;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
    border-radius: 6px;
    padding: 2px 8px;
    width: fit-content;
}

/* Chart toolbar + fullscreen expand */
.dashboard-chart-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.dashboard-chart-toolbar .dashboard-chart-title { margin: 0; }
.dashboard-chart-expand-btn {
    background: none;
    border: 1px solid var(--admin-border);
    color: var(--admin-text-muted);
    border-radius: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.dashboard-chart-expand-btn:hover { color: var(--admin-accent); border-color: var(--admin-accent); }
.admin-modal-fullscreen .admin-modal-dialog {
    max-width: 96vw;
    width: 96vw;
    height: 92vh;
    max-height: 92vh;
}
.admin-modal-fullscreen .admin-modal-body { display: flex; flex-direction: column; }
.admin-modal-fullscreen .dashboard-chart-fullscreen { flex: 1; min-height: 0; }
.admin-modal-fullscreen .admin-modal-header {
    flex-wrap: wrap;
    gap: 10px;
}
.admin-modal-body-with-sidebar { flex-direction: row !important; gap: 18px; }
.dashboard-chart-fullscreen-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dashboard-chart-fullscreen-sidebar {
    width: 300px;
    flex-shrink: 0;
    border-left: 1px solid var(--admin-border);
    padding-left: 18px;
    overflow-y: auto;
}
.dashboard-chart-fullscreen-sidebar h4 { margin: 0 0 12px; font-size: 0.95rem; color: var(--admin-text); }
.dashboard-chart-fullscreen-sidebar-section { margin-bottom: 18px; }
.dashboard-chart-fullscreen-sidebar-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--admin-text-dim);
    margin-bottom: 8px;
}
.dashboard-chart-fullscreen-sidebar-kv { display: flex; justify-content: space-between; font-size: 0.85rem; padding: 3px 0; color: var(--admin-text-muted); }
.dashboard-chart-fullscreen-sidebar-kv b { color: var(--admin-text); font-weight: 600; }
.dashboard-chart-fullscreen-sidebar-service { font-size: 0.82rem; color: var(--admin-text-muted); padding: 3px 0; }
.dashboard-chart-fullscreen-sidebar-journal-item { font-size: 0.8rem; padding: 6px 0; border-bottom: 1px solid var(--admin-border-subtle); }
.dashboard-chart-fullscreen-sidebar-journal-item:last-child { border-bottom: none; }
.dashboard-chart-fullscreen-sidebar-journal-item.sev-error { color: #f87171; }
@media (max-width: 900px) {
    .admin-modal-body-with-sidebar { flex-direction: column !important; }
    .dashboard-chart-fullscreen-sidebar { width: 100%; border-left: none; border-top: 1px solid var(--admin-border); padding-left: 0; padding-top: 12px; max-height: 220px; }
}

/* Контекстная детализация точки графика (hover drill-down) */
.dashboard-chart-detail {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--admin-border-subtle);
    font-size: 0.85rem;
    color: var(--admin-text-muted);
    min-height: 20px;
}
.dashboard-chart-detail-empty { color: var(--admin-text-dim); }
.dashboard-chart-detail-title { color: var(--admin-text); font-weight: 600; margin-bottom: 8px; }
.dashboard-chart-detail-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.dashboard-chart-detail-bar-label { flex: 0 0 180px; color: var(--admin-text-muted); }
.dashboard-chart-detail-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    overflow: hidden;
}
.dashboard-chart-detail-bar-fill { height: 100%; border-radius: 999px; background: var(--admin-accent); }
.dashboard-chart-detail-bar-value { flex: 0 0 auto; color: var(--admin-text); font-weight: 600; white-space: nowrap; }

/* Funnel (User Journey) */
.dashboard-funnel { display: flex; flex-direction: column; gap: 10px; }
.dashboard-funnel-step {
    display: grid;
    grid-template-columns: 160px 1fr 90px;
    align-items: center;
    gap: 12px;
}
.dashboard-funnel-label { font-size: 0.85rem; color: var(--admin-text-muted); }
.dashboard-funnel-track {
    display: block;
    height: 30px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}
.dashboard-funnel-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--admin-accent), var(--admin-accent-hover));
    border-radius: 8px;
    transition: width 0.4s ease;
    min-width: 3px;
}
.dashboard-funnel-step.is-biggest-drop .dashboard-funnel-fill { background: linear-gradient(90deg, #f87171, #fb923c); }
.dashboard-funnel-value { font-size: 0.9rem; font-weight: 600; text-align: right; }
.dashboard-funnel-pct { font-size: 0.75rem; color: var(--admin-text-dim); text-align: right; }
.dashboard-funnel-drop-note {
    margin-top: 4px;
    font-size: 0.82rem;
    color: #fb923c;
    background: rgba(251, 146, 60, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
}

.dashboard-funnel-nav {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--admin-border);
}

.dashboard-funnel-nav__title {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--admin-text-muted);
}

.dashboard-funnel-nav__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.dashboard-funnel-nav__card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--admin-border);
    background: rgba(255, 255, 255, 0.03);
}

.dashboard-funnel-nav__label {
    font-size: 0.8rem;
    color: var(--admin-text-muted);
}

.dashboard-funnel-nav__value {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--admin-text);
}

.dashboard-funnel-nav__pct {
    font-size: 0.72rem;
    color: var(--admin-text-dim);
}

/* Журнал событий (Phase 10, §3): человекочитаемая живая лента */
.dashboard-journal-filters { display: flex; gap: 6px; }
.dashboard-journal { display: flex; flex-direction: column; gap: 4px; max-height: 480px; overflow-y: auto; }
.dashboard-journal-day-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--admin-text-dim);
    margin: 14px 0 6px;
}
.dashboard-journal-day-label:first-child { margin-top: 0; }
.dashboard-journal-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 8px;
    border-radius: 10px;
    transition: background 0.15s;
}
.dashboard-journal-item:hover { background: rgba(255,255,255,0.04); }
.dashboard-journal-dot {
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-top: 6px;
    background: var(--admin-text-dim);
}
.dashboard-journal-item.sev-error .dashboard-journal-dot { background: #f87171; box-shadow: 0 0 0 3px rgba(248,113,113,0.15); }
.dashboard-journal-item.sev-warning .dashboard-journal-dot { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251,191,36,0.15); }
.dashboard-journal-item.sev-info .dashboard-journal-dot { background: var(--admin-accent); }
.dashboard-journal-body { flex: 1; min-width: 0; }
.dashboard-journal-title { font-size: 0.9rem; color: var(--admin-text); font-weight: 500; }
.dashboard-journal-item.sev-error .dashboard-journal-title { color: #f87171; font-weight: 600; }
.dashboard-journal-meta { font-size: 0.78rem; color: var(--admin-text-dim); margin-top: 2px; }
.dashboard-journal-desc { font-size: 0.82rem; color: var(--admin-text-muted); margin-top: 3px; }
.dashboard-journal-empty { color: var(--admin-text-dim); font-size: 0.9rem; padding: 12px 0; }
.dashboard-journal-day-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--admin-accent);
    background: rgba(119, 246, 1, 0.08);
    border: 1px solid rgba(119, 246, 1, 0.25);
    border-radius: 8px;
    padding: 7px 12px;
    margin-bottom: 10px;
}
.dashboard-journal-day-banner span { font-weight: 600; }
.dashboard-journal-day-banner button {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--admin-text-muted);
    cursor: pointer;
    font-size: 0.78rem;
    text-decoration: underline;
}
.dashboard-journal-day-banner button:hover { color: var(--admin-text); }
.dashboard-journal-item.is-highlighted { background: rgba(119, 246, 1, 0.08); box-shadow: inset 2px 0 0 var(--admin-accent); }

/* Heatmap legend */
.dashboard-heatmap-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--admin-text-dim);
    margin-top: 10px;
}
.dashboard-heatmap-legend-scale {
    display: inline-flex;
    height: 10px;
    width: 100px;
    border-radius: 4px;
    background: linear-gradient(90deg, #1c1c24 0%, #163a2a 20%, #1d6b3a 40%, #2ea043 60%, #77F601 80%, #c8ff4d 100%);
}
.dashboard-heatmap-legend-note { margin-left: auto; font-style: italic; }
.dashboard-heatmap-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
}
.dashboard-heatmap-tier-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.dashboard-heatmap-tier-tabs .dashboard-filter-chip {
    padding: 4px 10px;
    font-size: 0.78rem;
}

/* ApexCharts: тултипы читаемые на тёмной админке (иначе inherit #fafafa на белом фоне) */
.admin-dashboard .apexcharts-tooltip,
.admin-dashboard .apexcharts-xaxistooltip,
.admin-dashboard .apexcharts-yaxistooltip {
    background: #1a1a22 !important;
    border: 1px solid rgba(255,255,255,0.14) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45) !important;
    color: #f5f5f5 !important;
}
.admin-dashboard .apexcharts-tooltip *,
.admin-dashboard .apexcharts-xaxistooltip *,
.admin-dashboard .apexcharts-yaxistooltip * {
    color: #f5f5f5 !important;
}
.admin-dashboard .apexcharts-tooltip-title {
    background: #121218 !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}
.admin-dashboard .apexcharts-tooltip.apexcharts-theme-light {
    background: #1a1a22 !important;
    border-color: rgba(255,255,255,0.14) !important;
}

@media (max-width: 768px) {
    .dashboard-funnel-step { grid-template-columns: 110px 1fr 70px; gap: 8px; }
    .dashboard-chart-detail-bar-label { flex-basis: 120px; }
    .admin-modal-fullscreen .admin-modal-dialog { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
}

/* Phase 11: CRM Split View (клиенты + команда) */
.crm-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.crm-toolbar .admin-input,
.crm-toolbar .admin-select { min-height: 38px; }
.crm-search { flex: 1 1 220px; min-width: 180px; }
.crm-segment-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.crm-segment-tab {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--admin-border);
    background: var(--admin-bg-card);
    color: var(--admin-text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
}
.crm-segment-tab .crm-segment-count { color: var(--admin-text-dim); margin-left: 4px; }
.crm-segment-tab.active { background: var(--admin-accent-bg); border-color: var(--admin-accent); color: var(--admin-accent); font-weight: 600; }
.crm-segment-tab.active .crm-segment-count { color: var(--admin-accent); }

.crm-split {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 18px;
    align-items: start;
}
.crm-list {
    background: var(--admin-bg-card);
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    overflow-y: auto;
    max-height: 74vh;
}
.crm-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--admin-border-subtle);
    cursor: pointer;
    transition: background 0.15s;
}
.crm-list-item:last-child { border-bottom: none; }
.crm-list-item:hover { background: rgba(255,255,255,0.04); }
.crm-list-item.active { background: var(--admin-accent-bg); }
.crm-list-dot { flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; }
.crm-list-dot.seg-new { background: var(--admin-accent); }
.crm-list-dot.seg-returning { background: #4ade80; }
.crm-list-dot.seg-fading { background: #fbbf24; }
.crm-list-dot.seg-churned { background: #737373; }
.crm-list-dot.status-on_shift { background: #4ade80; }
.crm-list-dot.status-busy { background: #fbbf24; }
.crm-list-dot.status-off_grid { background: #737373; }
.crm-list-dot.status-inactive { background: #f87171; }
.crm-list-body { flex: 1; min-width: 0; }
.crm-list-name { font-size: 0.92rem; font-weight: 600; color: var(--admin-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-list-sub { font-size: 0.78rem; color: var(--admin-text-dim); margin-top: 2px; display: flex; gap: 6px; align-items: center; }
.crm-list-ltv { flex-shrink: 0; font-size: 0.85rem; font-weight: 600; color: var(--admin-text-muted); }
.crm-list-more {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px 14px;
    color: var(--admin-text-dim);
    font-size: 0.78rem;
    border-top: 1px solid var(--admin-border);
}
.admin-users-range {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--admin-text-dim);
    font-size: 0.8rem;
}
.admin-users-range .admin-input {
    width: auto;
    min-width: 0;
    padding: 4px 8px;
    font-size: 0.8rem;
}

.crm-detail {
    background: var(--admin-bg-card);
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    padding: 24px;
    min-height: 74vh;
    max-height: 74vh;
    overflow-y: auto;
}
.crm-detail-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--admin-text-dim); font-size: 0.95rem; text-align: center; }
.crm-detail-back { display: none; background: none; border: none; color: var(--admin-accent); font-size: 0.9rem; cursor: pointer; margin-bottom: 12px; padding: 0; }
.crm-detail-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.crm-avatar {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--admin-accent-bg); color: var(--admin-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 700; flex-shrink: 0;
}
.crm-detail-name { font-size: 1.2rem; font-weight: 700; color: var(--admin-text); }
.crm-detail-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.crm-badge {
    display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
    font-size: 0.75rem; font-weight: 600; background: rgba(255,255,255,0.06); color: var(--admin-text-muted);
}
.crm-badge.seg-new { background: var(--admin-accent-bg); color: var(--admin-accent); }
.crm-badge.seg-returning { background: rgba(74,222,128,0.14); color: #4ade80; }
.crm-badge.seg-fading { background: rgba(251,191,36,0.14); color: #fbbf24; }
.crm-badge.seg-churned { background: rgba(115,115,115,0.2); color: #a3a3a3; }
.crm-badge.status-on_shift { background: rgba(74,222,128,0.14); color: #4ade80; }
.crm-badge.status-busy { background: rgba(251,191,36,0.14); color: #fbbf24; }
.crm-badge.status-off_grid { background: rgba(115,115,115,0.2); color: #a3a3a3; }
.crm-badge.status-inactive { background: rgba(248,113,113,0.14); color: #f87171; }

.crm-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 22px; }
.crm-stat-card { background: var(--admin-bg-elevated); border: 1px solid var(--admin-border-subtle); border-radius: 12px; padding: 14px; }
.crm-stat-label { font-size: 0.75rem; color: var(--admin-text-dim); text-transform: uppercase; letter-spacing: 0.03em; }
.crm-stat-value { font-size: 1.25rem; font-weight: 700; color: var(--admin-text); margin-top: 4px; }
.crm-period-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid var(--admin-border-subtle);
    border-radius: 12px;
    background: var(--admin-bg-elevated);
}
.crm-period-nav {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--admin-border-subtle);
    background: transparent;
    color: var(--admin-text);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}
.crm-period-nav:hover { border-color: var(--admin-accent); color: var(--admin-accent); }
.crm-period-nav:disabled {
    opacity: 0.35;
    cursor: default;
    border-color: var(--admin-border-subtle);
    color: var(--admin-text-dim);
}
.crm-period-nav:disabled:hover {
    border-color: var(--admin-border-subtle);
    color: var(--admin-text-dim);
}
.crm-period-meta { flex: 1; min-width: 0; text-align: center; }
.crm-period-title { font-size: 1rem; font-weight: 700; color: var(--admin-text); }
.crm-period-sub { font-size: 0.8rem; color: var(--admin-text-dim); margin-top: 2px; }
.crm-period-range {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    margin: -4px 0 16px;
    padding: 0 2px;
}
.crm-period-range-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--admin-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    min-width: 0;
    flex: 1 1 120px;
}
.crm-period-date {
    width: 100%;
    min-height: 38px;
    padding: 6px 10px;
    font-size: 0.88rem;
    color-scheme: dark;
}
.crm-period-range .admin-btn {
    flex: 0 0 auto;
    min-height: 38px;
}

.crm-tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--admin-border); }
.crm-tab { padding: 8px 4px; margin-right: 16px; background: none; border: none; border-bottom: 2px solid transparent; color: var(--admin-text-muted); font-size: 0.9rem; cursor: pointer; }
.crm-tab.active { color: var(--admin-text); border-bottom-color: var(--admin-accent); font-weight: 600; }
.crm-tab-panel { display: none; }
.crm-tab-panel.active { display: block; }

.crm-row-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--admin-border-subtle); font-size: 0.88rem; }
.crm-row-item:last-child { border-bottom: none; }
.crm-row-item-main { color: var(--admin-text); }
.crm-row-item-sub { color: var(--admin-text-dim); font-size: 0.78rem; margin-top: 2px; }
.crm-row-item-value { font-weight: 600; color: var(--admin-text); white-space: nowrap; }
.crm-empty-note { color: var(--admin-text-dim); font-size: 0.88rem; padding: 12px 0; }

/* Phase 11 (§3.5): комментарии на графиках */
.dashboard-chart-annotations { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.dashboard-annotation-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--admin-border-subtle);
    border-radius: 10px;
    font-size: 0.82rem;
}
.dashboard-annotation-badge {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}
.dashboard-annotation-badge.type-note { background: rgba(59,130,246,0.14); color: #60a5fa; }
.dashboard-annotation-badge.type-spike { background: rgba(74,222,128,0.14); color: #4ade80; }
.dashboard-annotation-badge.type-drop { background: rgba(248,113,113,0.14); color: #f87171; }
.dashboard-annotation-badge.type-incident { background: rgba(251,191,36,0.14); color: #fbbf24; }
.dashboard-annotation-badge.type-promo { background: rgba(192,132,252,0.14); color: #c084fc; }
.dashboard-annotation-body { flex: 1; min-width: 0; }
.dashboard-annotation-title { color: var(--admin-text); font-weight: 600; }
.dashboard-annotation-meta { color: var(--admin-text-dim); font-size: 0.75rem; margin-top: 2px; }
.dashboard-annotation-text { color: var(--admin-text-muted); margin-top: 2px; }
.dashboard-annotation-delete { flex-shrink: 0; background: none; border: none; color: var(--admin-text-dim); cursor: pointer; font-size: 0.95rem; padding: 0 4px; }
.dashboard-annotation-delete:hover { color: #f87171; }

.crm-team-now-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.crm-team-now-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background: var(--admin-bg-card);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.15s;
}
.crm-team-now-card:hover { border-color: var(--admin-accent); transform: translateY(-1px); }
.crm-team-now-card .crm-list-dot { margin-bottom: 4px; }
.crm-team-now-name { font-size: 0.95rem; font-weight: 600; color: var(--admin-text); }
.crm-team-now-sub { font-size: 0.78rem; color: var(--admin-text-dim); }

@media (max-width: 900px) {
    .crm-split { grid-template-columns: 1fr; }
    .crm-split.detail-open .crm-list { display: none; }
    .crm-split:not(.detail-open) .crm-detail { display: none; }
    .crm-detail-back { display: inline-block; }
    .crm-list, .crm-detail { max-height: none; }
}

/* Мониторинг */
.admin-monitor { max-width: 1100px; }
.admin-monitor-kpi {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}
.admin-monitor-card {
    background: var(--admin-bg-card);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 16px;
}
.admin-monitor-card-label {
    display: block;
    font-size: 0.75rem;
    color: var(--admin-text-muted);
    margin-bottom: 4px;
}
.admin-monitor-card-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--admin-accent);
}
.admin-monitor-refresh {
    font-size: 0.85rem;
    color: var(--admin-text-dim);
    margin-right: 12px;
}
.admin-monitor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 900px) {
    .admin-monitor-grid { grid-template-columns: 1fr; }
}
.admin-monitor-section {
    background: var(--admin-bg-card);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 18px;
}
.admin-monitor-section-wide { grid-column: 1 / -1; }
.admin-monitor-section-title {
    margin: 0 0 14px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--admin-text-muted);
}
.admin-monitor-table-wrap {
    overflow-x: auto;
    max-height: 280px;
    overflow-y: auto;
}
.admin-monitor-empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--admin-text-dim);
}
.admin-monitor-pre {
    margin: 0;
    font-size: 0.85rem;
    color: var(--admin-text-muted);
    white-space: pre-wrap;
}
.admin-monitor-slow { background: rgba(239, 68, 68, 0.08); }
.admin-monitor-updated {
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--admin-text-dim);
}

/* === Bookings SaaS Module (Заявки) — Dark Theme === */
.bookings-saas-module {
    background: #0B0B0B;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #262626;
}

/* Inbox — New Orders Today */
.bookings-inbox-wrap {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #262626;
}
.bookings-inbox-header {
    margin-bottom: 12px;
}
.bookings-inbox-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.bookings-inbox-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}
.bookings-inbox-scroll::-webkit-scrollbar { height: 6px; }
.bookings-inbox-scroll::-webkit-scrollbar-track { background: #161616; border-radius: 3px; }
.bookings-inbox-scroll::-webkit-scrollbar-thumb { background: #404040; border-radius: 3px; }
.bookings-inbox-card {
    flex: 0 0 280px;
    background: rgba(22,22,22,0.95);
    border: 1px solid #262626;
    border-radius: 10px;
    padding: 14px 16px;
    position: relative;
    cursor: pointer;
}
.bookings-inbox-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #3B82F6;
    border-radius: 50%;
}
.bookings-inbox-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.bookings-inbox-service {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
}
.bookings-inbox-amount {
    font-weight: 600;
    color: #fff;
}
.bookings-inbox-meta {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 10px;
}
.bookings-inbox-hint {
    margin-top: 10px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}
.bookings-inbox-btn {
    flex: 1;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.bookings-inbox-btn--confirm {
    background: #22c55e;
    color: #fff;
}
.bookings-inbox-btn--confirm:hover { background: #16a34a; }
.bookings-inbox-btn--decline {
    background: transparent;
    color: #ef4444;
    border: 1px solid #ef4444;
}
.bookings-inbox-btn--decline:hover { background: rgba(239,68,68,0.15); }
.bookings-inbox-card.bookings-inbox-card--removing {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Navigation & Tabs */
.bookings-saas-nav {
    margin-bottom: 20px;
}
.bookings-saas-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}
.bookings-saas-tab {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    background: transparent;
    color: rgba(255,255,255,0.6);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}
.bookings-saas-tab:hover { color: #fff; background: rgba(255,255,255,0.06); }
.bookings-saas-tab.active {
    background: #161616;
    color: #fff;
    border-color: #262626;
}
.bookings-saas-count {
    margin-left: 6px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}
.bookings-saas-tab.active .bookings-saas-count { color: rgba(255,255,255,0.7); }

/* Filter chips */
.bookings-saas-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.bookings-saas-chip {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    background: #161616;
    color: rgba(255,255,255,0.7);
    border: 1px solid #262626;
    cursor: pointer;
    transition: all 0.15s ease;
}
.bookings-saas-chip:hover { color: #fff; border-color: rgba(255,255,255,0.2); }
.bookings-saas-chip.active {
    background: rgba(59,130,246,0.2);
    color: #3B82F6;
    border-color: #3B82F6;
}

.bookings-saas-infobar {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(113, 113, 122, 0.08);
    border: 1px solid rgba(113, 113, 122, 0.15);
}
.bookings-saas-infobar-icon {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--admin-text-muted);
}
.bookings-saas-infobar-text {
    font-size: 0.8rem;
    color: var(--admin-text-muted);
    line-height: 1.4;
}
.bookings-saas-show-old-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
}
.bookings-saas-checkbox {
    width: 16px;
    height: 16px;
}
/* Toolbar */
.bookings-saas-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.bookings-saas-filters-mini {
    display: flex;
    gap: 8px;
}
.bookings-saas-select,
.bookings-saas-input {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #161616;
    color: #fff;
    border: 1px solid #262626;
}
.bookings-saas-select:focus,
.bookings-saas-input:focus {
    outline: none;
    border-color: #3B82F6;
}
.bookings-saas-search {
    flex: 1;
    min-width: 160px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #161616;
    color: #fff;
    border: 1px solid #262626;
}
.bookings-saas-search:focus { outline: none; border-color: #3B82F6; }
.bookings-saas-btn-apply {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #3B82F6;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}
.bookings-saas-btn-apply:hover { background: #2563eb; }
.bookings-saas-hidden-select {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

/* Table */
.bookings-saas-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #262626;
    background: #161616;
}
.bookings-saas-table {
    width: 100%;
    min-width: 1000px;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: fixed;
}
.bookings-saas-table th {
    text-align: left;
    padding: 12px 14px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.5);
    border-bottom: 1px solid #262626;
}
.bookings-saas-table th.bookings-saas-th-price { text-align: right; }

/* Статус + Действия: td остаётся обычной ячейкой, flex — только на внутреннем div */
.bookings-saas-status-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    white-space: nowrap;
}
.bookings-saas-status-part {
    flex: 0 0 auto;
}
.bookings-saas-actions-part {
    flex: 0 0 auto;
    width: 252px;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    flex-wrap: nowrap;
}
.bookings-saas-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #262626;
    color: #fff;
}
.bookings-saas-table tbody tr {
    transition: background 0.12s ease;
}
.bookings-saas-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}
.bookings-saas-table tbody tr.bookings-saas-row--clickable {
    cursor: pointer;
}
.bookings-saas-price {
    font-weight: 600;
    text-align: right;
}
.bookings-saas-avatar {
    flex-shrink: 0;
    align-self: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
}
.bookings-saas-avatar-initials {
    flex-shrink: 0;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50%;
    background: #404040;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    margin-right: 8px;
}
.bookings-saas-engineer-cell {
    display: inline-flex;
    align-items: center;
}
.bookings-saas-health {
    display: inline-flex;
    gap: 4px;
    margin-left: 8px;
}
.bookings-saas-health-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid currentColor;
}
.bookings-saas-health-dot.filled { border: none; }
.bookings-saas-health-dot.payment { color: #22c55e; }
.bookings-saas-health-dot.payment.filled { background: #22c55e; }
.bookings-saas-health-dot.resource { color: #3B82F6; }
.bookings-saas-health-dot.resource.filled { background: #3B82F6; }
.bookings-saas-health-dot.contact { color: #eab308; }
.bookings-saas-health-dot.contact.filled { background: #eab308; }
.bookings-saas-time-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.bookings-saas-time-rel {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}
.bookings-saas-time-rel.upcoming { color: #22c55e; }
.bookings-saas-time-rel.past { color: rgba(255,255,255,0.35); }
.bookings-saas-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}
.bookings-saas-badge.pending { background: rgba(245,158,11,0.2); color: #f59e0b; }
.bookings-saas-badge.confirmed { background: rgba(34,197,94,0.2); color: #22c55e; }
.bookings-saas-badge.rejected { background: rgba(239,68,68,0.2); color: #ef4444; }
.bookings-saas-badge.awaiting { background: rgba(59,130,246,0.2); color: #3B82F6; }
/* Оплачено, но слот занят — требуется внимание админа */
.bookings-saas-badge.conflict {
    background: rgba(220, 38, 38, 0.22);
    color: #b91c1c;
    font-weight: 700;
    border: 1px solid rgba(220, 38, 38, 0.45);
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.12);
}
.bookings-saas-row--conflict {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.08) 0%, rgba(220, 38, 38, 0.02) 12px, transparent 24px);
    box-shadow: inset 3px 0 0 #dc2626;
}
.bookings-saas-row--conflict:hover {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.12) 0%, rgba(220, 38, 38, 0.04) 16px, rgba(0,0,0,0.02) 100%);
}
.bookings-saas-tab--conflict:not(.active) {
    color: #b91c1c;
}
.bookings-saas-tab--conflict.active {
    background: rgba(220, 38, 38, 0.15);
    color: #991b1b;
    border-color: rgba(220, 38, 38, 0.45);
}
.bookings-saas-chip--conflict {
    color: #b91c1c;
    font-weight: 600;
}
.bookings-saas-chip--conflict.active {
    background: rgba(220, 38, 38, 0.18);
    color: #991b1b;
}
.bookings-saas-kebab {
    padding: 4px 8px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    border-radius: 4px;
}
.bookings-saas-kebab:hover { color: #fff; background: rgba(255,255,255,0.08); }
.bookings-saas-action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.bookings-saas-action-btn.confirm { background: #22c55e; color: #fff; }
.bookings-saas-action-btn.confirm:hover { background: #16a34a; }
.bookings-saas-action-btn.decline { background: transparent; color: #ef4444; border: 1px solid #ef4444; }
.bookings-saas-action-btn.decline:hover { background: rgba(239,68,68,0.15); }
.bookings-saas-action-delete {
    padding: 6px 10px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}
.bookings-saas-action-delete:hover { color: #ef4444; background: rgba(239,68,68,0.1); }
.bookings-saas-kebab-wrap { position: relative; display: inline-block; }
.bookings-saas-kebab-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: #1f1f1f;
    border: 1px solid #262626;
    border-radius: 6px;
    padding: 4px;
    min-width: 120px;
    display: none;
    z-index: 50;
}
.bookings-saas-kebab-dropdown.show { display: block; }
.bookings-saas-kebab-dropdown button {
    display: block;
    width: 100%;
    padding: 8px 12px;
    text-align: left;
    font-size: 0.85rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}
.bookings-saas-kebab-dropdown button:hover { background: rgba(255,255,255,0.08); color: #ef4444; }

/* Skeleton */
.bookings-skeleton { padding: 16px; }
.bookings-skeleton-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}
.bookings-skeleton-cell {
    height: 20px;
    background: linear-gradient(90deg, #262626 25%, #333 50%, #262626 75%);
    background-size: 200% 100%;
    animation: bookings-skeleton-shine 1.2s ease-in-out infinite;
    border-radius: 4px;
    flex: 1;
}
@keyframes bookings-skeleton-shine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.bookings-saas-pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 8px 0;
}
.bookings-saas-pagination-info {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}
.bookings-saas-pagination-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    color: #fff;
    background: #262626;
    border: 1px solid #333;
    border-radius: 6px;
    cursor: pointer;
}
.bookings-saas-pagination-btn:hover { background: #333; }
.bookings-saas-pagination-current {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}
.bookings-saas-empty {
    text-align: center;
    padding: 40px 20px;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.5);
}

/* Mobile: виджет Заявки — scroll/grid вместо clipping */
@media (max-width: 768px) {
    .admin-bookings-page .bookings-saas-module {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* 1. Статусы со счётчиками — горизонтальный swipe */
    .admin-bookings-page .bookings-saas-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 4px;
        margin-bottom: 12px;
        padding-bottom: 4px;
    }

    .admin-bookings-page .bookings-saas-tabs::-webkit-scrollbar {
        display: none;
    }

    .admin-bookings-page .bookings-saas-tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /* Chips — тот же паттерн, если видны */
    .admin-bookings-page .bookings-saas-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .admin-bookings-page .bookings-saas-chips::-webkit-scrollbar {
        display: none;
    }

    .admin-bookings-page .bookings-saas-chip {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /* 2. Даты и фильтры — адаптивная сетка, 100% ширина */
    .admin-bookings-page .bookings-saas-toolbar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        width: 100%;
        align-items: stretch;
    }

    .admin-bookings-page .bookings-saas-filters-mini {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        width: 100%;
    }

    .admin-bookings-page .bookings-saas-select,
    .admin-bookings-page .bookings-saas-input,
    .admin-bookings-page .bookings-saas-search,
    .admin-bookings-page .bookings-saas-btn-apply {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .admin-bookings-page .bookings-saas-search {
        flex: none;
    }

    .admin-bookings-page .bookings-saas-show-old-wrap {
        width: 100%;
    }

    @media (min-width: 400px) {
        .admin-bookings-page .bookings-saas-filters-mini {
            grid-template-columns: 1fr 1fr;
        }

        .admin-bookings-page .bookings-saas-filters-mini .bookings-saas-select {
            grid-column: 1 / -1;
        }
    }

    /* 3. Таблица — горизонтальный scroll, текст не обрезается */
    .admin-bookings-page .bookings-saas-table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
    }

    .admin-bookings-page .bookings-saas-table {
        table-layout: auto;
        width: max-content;
        min-width: 100%;
    }

    .admin-bookings-page .bookings-saas-table th,
    .admin-bookings-page .bookings-saas-table td {
        white-space: nowrap;
    }

    .admin-bookings-page .bookings-saas-status-actions {
        white-space: normal;
        flex-wrap: wrap;
        gap: 8px;
    }

    .admin-bookings-page .bookings-saas-actions-part {
        width: auto;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .admin-bookings-page .bookings-saas-engineer-cell {
        display: inline-flex;
        align-items: center;
        white-space: nowrap;
    }

    /* Inbox — горизонтальный scroll карточек */
    .admin-bookings-page .bookings-inbox-scroll {
        margin-left: -4px;
        margin-right: -4px;
        padding-left: 4px;
        padding-right: 4px;
    }

    .admin-bookings-page .bookings-inbox-card {
        flex: 0 0 min(280px, calc(100vw - 48px));
    }

    /* === Расписание sub-page: формы, сетка, смены, перерывы === */
    .admin-bookings-page.admin-container,
    .admin-container.admin-bookings-page {
        max-width: 100%;
        padding-right: 0;
        box-sizing: border-box;
    }

    .admin-bookings-page .admin-schedule-section,
    .admin-bookings-page .admin-shifts-section {
        padding: 16px;
        max-width: 100%;
        box-sizing: border-box;
        overflow: visible;
    }

    /* 1. Фильтры расписания — fluid selects */
    .admin-bookings-page .admin-schedule-filters {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
    }

    .admin-bookings-page .admin-schedule-filter {
        width: 100%;
        min-width: 0;
    }

    .admin-bookings-page .admin-schedule-filters .admin-select,
    .admin-bookings-page .admin-schedule-filter .admin-select {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .admin-bookings-page .admin-schedule-checkbox {
        width: 100%;
        box-sizing: border-box;
    }

    .admin-bookings-page .admin-schedule-actions {
        width: 100%;
    }

    .admin-bookings-page .admin-schedule-actions .admin-btn {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    @media (min-width: 480px) {
        .admin-bookings-page .admin-schedule-filters {
            grid-template-columns: 1fr 1fr;
        }

        .admin-bookings-page .admin-schedule-filter.admin-schedule-checkbox-wrap {
            grid-column: 1 / -1;
        }
    }

    /* 1b. Сетка календаря — горизонтальный swipe, sticky time axis */
    .admin-bookings-page .schedule-grid-wrapper,
    .admin-bookings-page .admin-schedule-columns-wrap {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
    }

    .admin-bookings-page .admin-schedule-columns {
        min-width: 100%;
        width: max-content;
    }

    .admin-bookings-page .admin-schedule-day-header-cell,
    .admin-bookings-page .admin-schedule-day-col {
        flex: 0 0 auto;
        width: 128px;
        min-width: 128px;
    }

    .admin-bookings-page .admin-schedule-day-headers,
    .admin-bookings-page .admin-schedule-day-cols {
        width: max-content;
        min-width: max-content;
    }

    .admin-bookings-page .admin-schedule-time-header-cell,
    .admin-bookings-page .admin-schedule-time-col {
        position: sticky;
        left: 0;
        z-index: 110;
    }

    .admin-bookings-page .admin-schedule-nav {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 16px;
    }

    .admin-bookings-page .admin-schedule-nav-btn {
        min-width: 0;
        flex: 1 1 auto;
    }

    .admin-bookings-page .admin-schedule-range-label {
        min-width: 0;
        flex: 1 1 100%;
        text-align: center;
    }

    .schedule-fs-toolbar {
        padding: 10px 12px;
    }
    .schedule-fs-range {
        min-width: 0;
        font-size: 0.85rem;
    }
    .schedule-fs-body {
        padding: 8px;
    }

    .admin-bookings-page .admin-booking-legend {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .admin-bookings-page .admin-booking-legend::-webkit-scrollbar {
        display: none;
    }

    .admin-bookings-page .admin-booking-legend-item {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /* 2. Смены звукарей — кнопки отдельно от чипов городов */
    .admin-bookings-page .admin-shifts-header {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .admin-bookings-page .admin-shifts-actions {
        order: -1;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
        margin: 0;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--admin-border);
    }

    .admin-bookings-page .admin-shifts-actions .admin-btn-sm,
    .admin-bookings-page .admin-shifts-actions .admin-btn-outline {
        flex: 0 1 auto;
        max-width: 100%;
        box-sizing: border-box;
    }

    .admin-bookings-page .admin-shifts-filter {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
    }

    .admin-bookings-page .admin-shifts-studio-filters {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    .admin-bookings-page .studios-scroll-container {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .admin-bookings-page .admin-shifts-studio-chip {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .admin-bookings-page .engineer-name-selector,
    .admin-bookings-page .admin-shifts-card-name {
        font-size: 0.7rem;
    }

    .admin-bookings-page .admin-shifts-timeline-wrap {
        width: 100%;
        max-width: 100%;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-bookings-page .admin-shifts-timeline {
        --shifts-studio-w: 128px;
        --shifts-col-w: 108px;
        --shifts-row-h: 72px;
    }

    /* 3. Перерывы — scroll таблицы, полный текст */
    .admin-bookings-page .breaks-module-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .admin-bookings-page .breaks-module-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .admin-bookings-page .breaks-quick-add-btn {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }

    .admin-bookings-page .breaks-table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-bookings-page .breaks-table th,
    .admin-bookings-page .breaks-table td {
        white-space: nowrap;
    }

    .admin-bookings-page .breaks-engineer-name {
        max-width: none;
    }

    .admin-bookings-page .breaks-engineer-badge {
        max-width: none;
        white-space: nowrap;
    }
}

/* --- LABD admin --- */
.labd-admin {
    padding-top: 0;
}

.labd-admin-head {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: 0 0 20px;
    padding: 4px 0 14px;
    background: linear-gradient(180deg, var(--admin-bg) 70%, rgba(10, 10, 18, 0));
    border-bottom: 1px solid var(--admin-border);
}

.labd-admin-head__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.labd-admin-head__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--admin-text);
}

.labd-admin-head__sub {
    margin: 4px 0 0;
    font-size: 0.85rem;
    line-height: 1.35;
    color: var(--admin-text-muted);
}

.labd-admin-head__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.labd-admin-head__link {
    color: var(--admin-accent);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.labd-admin-head__link:hover {
    color: var(--admin-accent-hover);
}

.labd-admin-head__tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--admin-border);
    background: var(--admin-bg-card);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.labd-admin-head__tabs::-webkit-scrollbar {
    display: none;
}

.labd-admin-tab {
    flex: 1 0 auto;
    min-width: 0;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--admin-text-muted);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.16s ease, color 0.16s ease;
}

.labd-admin-tab:hover {
    color: var(--admin-text);
}

.labd-admin-tab.is-active {
    background: var(--admin-accent-bg);
    color: var(--admin-accent);
}

.labd-admin-status {
    margin: 0 0 12px;
}

.labd-admin-status--error {
    color: #ff8a7a;
}

.labd-admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.labd-admin-section-title {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--admin-text);
}

.labd-admin-section-title + .labd-admin-rank {
    margin-bottom: 22px;
}

.labd-admin-team-kpis {
    margin-bottom: 16px;
}

.labd-admin-panel[hidden] { display: none !important; }

.labd-admin-card {
    border: 1px solid var(--admin-border);
    background: var(--admin-bg-card);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
}
.labd-admin-card__meta {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    margin-bottom: 8px;
}
.labd-admin-card__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.labd-admin-quote {
    margin: 6px 0;
    font-size: 13px;
    line-height: 1.4;
}
.labd-admin-quote strong {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 2px;
}
.labd-admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.labd-admin-stat {
    padding: 12px;
    border-radius: 12px;
    background: var(--admin-bg-elevated);
    border: 1px solid var(--admin-border);
}
.labd-admin-stat__value { font-size: 22px; font-weight: 700; }
.labd-admin-stat__label { font-size: 12px; color: rgba(255,255,255,0.5); }
.labd-admin-rank {
    list-style: none;
    margin: 0;
    padding: 0;
}
.labd-admin-rank li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--admin-border-subtle);
    font-size: 13px;
}

.labd-contest-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.labd-contest-card {
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--admin-border);
    background: var(--admin-bg-card);
}

.labd-contest-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.labd-contest-card__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.labd-contest-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid var(--admin-border);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--admin-text-muted);
}

.labd-contest-card__badge--live {
    border-color: rgba(145, 70, 255, 0.45);
    color: #d4b8ff;
    background: rgba(145, 70, 255, 0.12);
}

.labd-contest-card .admin-stats-cards {
    margin-bottom: 14px;
}

@media (max-width: 900px) {
    .labd-admin-head__row {
        flex-direction: column;
        align-items: stretch;
    }
    .labd-admin-head__actions {
        justify-content: flex-start;
    }
    .labd-contest-grid {
        grid-template-columns: 1fr;
    }
    .labd-admin-tab {
        flex: 0 0 auto;
    }
}

/* --- dems global analytics dashboard --- */
.dems-dash__toolbar {
    margin-bottom: 16px;
}

.dems-dash__kpi {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.dems-dash__kpi-card {
    padding: 14px 14px 12px;
    border-radius: 14px;
    border: 1px solid var(--admin-border);
    background: linear-gradient(165deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
}

.dems-dash__kpi-value {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--admin-text);
    line-height: 1.1;
}

.dems-dash__kpi-label {
    margin-top: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--admin-text);
}

.dems-dash__kpi-hint {
    margin-top: 2px;
    font-size: 0.72rem;
    color: var(--admin-text-muted);
}

.dems-dash__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.dems-dash__card {
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--admin-border);
    background: rgba(255, 255, 255, 0.02);
}

.dems-dash__card--wide {
    grid-column: 1 / -1;
}

.dems-dash__card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--admin-text);
}

.dems-dash__card-sub {
    margin: 4px 0 14px;
    font-size: 0.78rem;
    color: var(--admin-text-muted);
}

.dems-dash__retention {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.dems-dash__ret-card {
    text-align: center;
    padding: 14px 10px;
    border-radius: 14px;
    border: 1px solid rgba(124, 246, 10, 0.18);
    background: linear-gradient(160deg, rgba(124, 246, 10, 0.1), rgba(124, 246, 10, 0.02));
}

.dems-dash__ret-day {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--admin-text-muted);
}

.dems-dash__ret-rate {
    margin-top: 6px;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #b6ff5c;
    line-height: 1;
}

.dems-dash__ret-meta {
    margin-top: 6px;
    font-size: 0.72rem;
    color: var(--admin-text-muted);
}

.dems-dash__bar-row {
    display: grid;
    grid-template-columns: minmax(72px, 120px) 1fr minmax(72px, 90px);
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.dems-dash__bar-label {
    font-size: 0.8rem;
    color: var(--admin-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dems-dash__bar-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.dems-dash__bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7cf60a, #3d9b00);
}

.dems-dash__bar-fill--rating {
    background: linear-gradient(90deg, #ffd56a, #ff7a59);
}

.dems-dash__bar-fill--rank {
    background: linear-gradient(90deg, #7eb6ff, #9160ff);
}

.dems-dash__bar-meta {
    font-size: 0.72rem;
    color: var(--admin-text-muted);
    text-align: right;
}

.dems-dash__funnel {
    margin-top: 4px;
}

@media (max-width: 900px) {
    .dems-dash__grid {
        grid-template-columns: 1fr;
    }
    .dems-dash__card--wide {
        grid-column: auto;
    }
    .dems-dash__retention {
        grid-template-columns: 1fr;
    }
}
