

.d-flex.flex-column.gap-1 .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
}

/* Предотвращение мигания при загрузке тем */
html {
    visibility: hidden;
}

html.theme-loaded {
    visibility: visible;
}

/* CSS переменные для цветовых схем */
:root {
    /* Синяя тема (по умолчанию) */
    --primary-color: #1919e8;
    --primary-hover: #0f0fb8;
    --primary-shadow: rgba(25, 25, 232, 0.3);
    --primary-glow: rgba(25, 25, 232, 0.4);
    
    /* Темная тема по умолчанию */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-tertiary: #1f1f1f;
    --bg-quaternary: #404040;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border-color: #404040;
    --logo-url: url('/static/logo-kiz-blue.svg');
    --card-bg: #2a2a2a;
    --input-bg: #1a1a1a;
    --input-border: #404040;
}

/* Альтернативные темы */
[data-theme="orange"] {
    --primary-color: #ff6b35;
    --primary-hover: #e55a2b;
    --primary-shadow: rgba(255, 107, 53, 0.3);
    --logo-url: url('/static/logo-kiz-orange.svg');
    --primary-glow: rgba(255, 107, 53, 0.4);
}

[data-theme="pink"] {
    --primary-color: #f703e9;
    --primary-hover: #bf04b4;
    --primary-shadow: rgba(247, 3, 233, 0.3);
    --logo-url: url('/static/logo-kiz-pink.svg');
    --primary-glow: rgba(247, 3, 233, 0.4);
}

[data-theme="light-green"] {
    --primary-color: #eafc02;
    --primary-hover: #dff000;
    --primary-shadow: rgba(223, 240, 0, 0.3);
    --logo-url: url('/static/logo-kiz-light-green.svg');
    --primary-glow: rgba(223, 240, 0, 0.4);
}

[data-theme="light-cyan"] {
    --primary-color: #00e5ff;
    --primary-hover: #0ed0e6;
    --primary-shadow: rgba(0, 229, 255, 0.3);
    --logo-url: url('/static/logo-kiz-light-cyan.svg');
    --primary-glow: rgba(0, 229, 255, 0.4);
}

[data-theme="light-lavender"] {
    --primary-color: #9c58f7;
    --primary-hover: #8347d9;
    --primary-shadow: rgba(156, 88, 247, 0.3);
    --logo-url: url('/static/logo-kiz-light-lavender.svg');
    --primary-glow: rgba(156, 88, 247, 0.4);
}

/* Общие стили для всех светлых тем */
[data-theme="light-green"],
[data-theme="light-cyan"],
[data-theme="light-lavender"] {
    --bg-primary: #f9f3e4;
    --bg-secondary: #E6DAC8;
    --bg-tertiary: #CBB9A7;
    --bg-quaternary: #A48D78;
    --text-primary: #000000;
    --text-secondary: #311e0b;
    --text-muted: #533415;
    --border-color: #A48D78;
    --card-bg: #E6DAC8;
    --input-bg: #f9f3e4;
    --input-border: #A48D78;
}

/* ========================================
   Базовые стили
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* html уже определен выше для предотвращения мигания */

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

/* ========================================
   Контейнеры и сетки
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cols-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.scan-area {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
}

/* ========================================
   Карточки и блоки
   ======================================== */

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.card--form {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
}

.card--form .title {
    font-size: 1.4em;
    font-weight: 500;
    margin-bottom: 6px;
}

.card--form .label {
    margin-top: 12px;
    margin-bottom: 6px;
}

.card--form .input {
    height: 40px;
}

.card--form .form-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    padding: 32px;
}

/* ========================================
   Заголовки и текст
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 300;
    letter-spacing: 1px;
}

.title {
    font-size: 1.7em;
    font-weight: 300;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95em;
}

.muted {
    color: var(--text-muted);
    font-size: 0.95em;
}

/* ========================================
   Кнопки
   ======================================== */

.btn {
    border: none;
    color: var(--text-primary);
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0.5px;
    background: var(--bg-quaternary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-sizing: border-box;
    vertical-align: middle;
}


/* Размеры кнопок */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1em;
}

.btn-xl {
    padding: 20px 40px;
    font-size: 1.2em;
}

/* Специальные кнопки с полной шириной */
.btn-full {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: var(--text-primary);
}

.btn-secondary {
    background: var(--bg-quaternary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--text-secondary);
    color: var(--bg-primary);
}

/* Специальные кнопки с дополнительными стилями */

/* Кнопки в формах авторизации */
.auth-page form .btn {
    margin-top: 20px;
}

/* Кнопки в авторизации вне формы (например, ссылка-кнопка в forgot_sent) */
.auth-page .box > .btn {
    margin-top: 20px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Все остальные кнопки наследуют стили от .btn-primary или .btn-secondary */

/* ========================================
   Формы и поля ввода
   ======================================== */

label, .label {
    display: block;
    margin: 10px 0 6px;
    color: var(--text-primary);
    font-size: 0.95em;
}

input, .input {
    width: 100%;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-primary);
    box-sizing: border-box;
}

input:focus, .input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-shadow);
}

/* Специальные стили для форм */
#integrationCard form {
    margin-top: 12px;
}

#integrationCard form .label:first-of-type {
    margin-top: 0;
}


#normalizeCardMax .cols-grid .label,
#normalizeCardPro .cols-grid .label {
    margin-top: 0;
}

/* ========================================
   Специальные элементы
   ======================================== */

.dropzone {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    background: var(--bg-primary);
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    color: var(--text-primary);
}

.dropzone:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    transform: translateY(-1px);
}

.dropzone.dragover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.drop {
    padding: 24px;
    text-align: center;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    cursor: pointer;
}

/* ========================================
   Статистика и элементы списка
   ======================================== */

.stat {
    text-align: center;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.scans {
    max-height: 320px;
    overflow: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
}

.scan-row {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 1fr 120px 120px auto;
    gap: 10px;
    align-items: center;
    cursor: pointer;
}

.scan-row:last-child {
    border-bottom: none;
}

.item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
}

.item img {
    width: 139px;
    height: 185px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--primary-color);
    background: #222;
}

/* ========================================
   Модальные окна
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: var(--bg-secondary);
    margin: 5% auto;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 80%;
    max-width: 600px;
    color: var(--text-primary);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    color: var(--text-primary);
    font-size: 1.2em;
    font-weight: 500;
}

.modal-close {
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
    padding-top: 12px;
}

/* Общие стили для модальных окон редактирования */
.modal-title {
    font-size: 1.2em;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 500;
}

.modal-field {
    margin-bottom: 15px;
}

.modal-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.modal-old-code {
    background: var(--bg-primary);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--text-secondary);
    word-break: break-all;
    min-height: 20px;
    max-height: 80px;
    overflow-y: auto;
    line-height: 1.4;
}

.modal-input {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1em;
    font-family: 'Courier New', monospace;
    box-sizing: border-box;
    min-height: 44px;
    transition: border-color 0.2s ease;
}

.modal-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-shadow);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 400;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.modal-btn-cancel {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-btn-save {
    background: var(--primary-color);
    color: var(--text-primary);
}

.modal-btn:hover {
    transform: translateY(-1px);
}

/* ========================================
   Переключатель тем
   ======================================== */

.theme-switcher {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.theme-toggle {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.theme-toggle:hover {
    background: var(--bg-quaternary);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.theme-toggle svg {
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.theme-toggle:hover svg {
    color: var(--primary-color);
    transform: rotate(180deg);
}

.theme-options {
    position: absolute;
    bottom: 60px;
    left: 0;
    background: var(--bg-quaternary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    min-width: 140px;
}

.theme-options.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.theme-option:last-child {
    margin-bottom: 0;
}

.theme-option:hover {
    background: #404040;
}

.theme-option.active {
    background: var(--primary-color);
    color: #ffffff;
}

.theme-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    flex-shrink: 0;
}

.theme-option span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ========================================
   Стили планов и тарифов
   ======================================== */

.plan {
    font-size: 1.1em;
    color: #fff;
    margin: 8px 0;
}

.plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.plan-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    height: 100%;
    transition: all 0.2s ease;
    cursor: pointer;
    gap: 8px;
}

.plan-card > div:first-child {
    flex: 1;
}

.plan-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.plan-card h3 {
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.2em;
    letter-spacing: 0.5px;
}

.price {
    color: var(--primary-color);
    font-size: 1.4em;
    font-weight: 700;
    margin: 4px 0 8px;
    letter-spacing: -0.5px;
}

.features {
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.35;
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.features li {
    margin: 4px 0;
    padding-left: 14px;
    position: relative;
}

.features li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

.plan-buy-form {
    margin-top: 8px;
}

.plan-buy-form .btn {
    width: 100%;
    justify-content: center;
    font-weight: 500;
    padding: 10px;
    font-size: 0.9em;
    min-height: 38px;
}

.plan-card [data-quote-for] {
    margin-bottom: 1px;
    min-height: 32px;
}

.plans.plans--new {
    grid-template-columns: 1fr 1fr;
}

/* Карточка текущего плана */
.current-plan-card {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 20px;
}

.current-plan-card .left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.current-plan-card .right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    align-self: stretch;
}

.current-plan-card .right [data-quote-for] {
    display: none;
}

.current-plan-card .right .plan-buy-form {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.current-plan-card .right .muted {
    text-align: center;
    margin: 0;
}

.current-plan-card:not(.none) {
    background: var(--primary-color);
    border-color: var(--primary-hover);
    border-left: 4px solid var(--primary-hover);
}

.current-plan-card:not(.none) .plan {
    color: var(--text-primary);
}

.current-plan-card:not(.none) .muted {
    color: var(--text-primary);
}

.current-plan-card:not(.none) .btn-secondary {
    background: var(--bg-quaternary);
    color: var(--text-primary);
}

.current-plan-card:not(.none) .btn-secondary:hover {
    background: var(--text-secondary);
    color: var(--bg-primary);
}


/* ========================================
   Специальные стили для страниц
   ======================================== */

/* Dashboard специфичные стили */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: block;
}

.header h1 {
    color: #ffffff;
    font-size: 2.2em;
    margin-bottom: 8px;
    font-weight: 300;
    letter-spacing: 2px;
}

.radio-row {
    display: flex;
    gap: 12px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.radio-row label {
    background: #1f1f1f;
    border: 1px solid #404040;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}



.devices {
    margin-top: 14px;
}

.device-row {
    display: grid;
    grid-template-columns: 1fr 100px 80px 140px 140px auto;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
}

.device-row + .device-row {
    margin-top: 8px;
}


#integrationCard > .muted {
    margin: 0 0 12px;
}

#integrationCard form {
    margin-top: 12px;
}

#integrationCard form .label:first-of-type {
    margin-top: 0;
}


.collapse-row {
    grid-column: 1 / -1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    margin: 8px 0;
}

.collapse-row:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.collapse-row .collapse-title {
    color: var(--text-primary);
    font-weight: 500;
    letter-spacing: 0.2px;
}

.collapse-arrow {
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.collapse-content {
    grid-column: 1 / -1;
    display: none;
    margin: 8px 0;
}

.collapse-row + .collapse-row {
    margin-top: 8px;
}

.collapse-row + .collapse-content {
    margin-top: 8px;
}

.collapse-content + .collapse-row {
    margin-top: 8px;
}

#plansSection {
    margin-top: 32px;
}

#normalizeCardMax .cols-grid .label,
#normalizeCardPro .cols-grid .label {
    margin-top: 0;
}

/* Главная страница */
.features {
    padding: 4rem 0;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    opacity: 0.05;
    pointer-events: none;
}

.features-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.features-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    display: flex;
    align-items: flex-start;
    gap: 2.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary-color);
    transform: translateX(10px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border: 1px solid var(--text-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon-img {
    width: 50px;
    height: 50px;
    background-color: var(--text-primary);
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}

.icon-qr-scan {
    -webkit-mask-image: url('/static/qr-scan.svg');
    mask-image: url('/static/qr-scan.svg');
}

.icon-file-reload2 {
    -webkit-mask-image: url('/static/file-reload2.svg');
    mask-image: url('/static/file-reload2.svg');
}

.icon-open-box-done {
    -webkit-mask-image: url('/static/open-box-done.svg');
    mask-image: url('/static/open-box-done.svg');
}

.icon-location-pin {
    -webkit-mask-image: url('/static/Location_Pin.svg?v=8');
    mask-image: url('/static/Location_Pin.svg?v=8');
}

.feature-content {
    flex: 1;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.feature-card p {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.feature-card p:last-child {
    margin-bottom: 0;
}

.feature-card p strong {
    color: var(--text-primary);
    font-weight: 600;
}

.feature-card ul {
    margin: 0.5rem 0 0 0;
    padding-left: 0;
    list-style: none;
}

.feature-card li {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    padding-left: 1.1rem;
    position: relative;
    font-size: 0.95rem;
}

.feature-card li::before {
    content: "✓";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.pricing {
    padding: 4rem 0;
    background: var(--bg-primary);
}

.pricing-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.pricing-card {
    background: var(--bg-quaternary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    position: relative;
    width: 100%;
    transition: all 0.2s ease;
    /* Flexbox для выравнивания кнопки */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pricing-card .pricing-features {
    margin-bottom: 2rem;
    flex-grow: 1; /* Список занимает всё свободное место */
}

/* Единая высота кнопок в карточках тарифов */
.pricing-card .btn {
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto; /* Прижимаем кнопку к низу */
    width: 100%;
}

.pricing-card:hover {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.pricing-card.featured {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.pricing-card.featured::before {
    content: "Популярный";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.pricing-price span {
    font-size: 1rem;
    color: var(--text-secondary);
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
}

.pricing-features li {
    padding: 0.5rem 0;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li::before {
    content: "✓";
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

.cta {
    padding: 6rem 0;
    background: var(--bg-primary);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    animation: float 25s ease-in-out infinite reverse;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

/* Единая высота кнопки в CTA */
.cta .btn {
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 285px;
    margin: 0 auto;
}

.cta h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    line-height: 1.1;
}

.cta p {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 300;
}


.hero {
    background: var(--bg-primary);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
    line-height: 1.1;
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 300;
    white-space: nowrap;
}

.hero-actions {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Хедер */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    margin-bottom: 40px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img,
.kiz-logo-img,
.hero-logo-img {
    width: 80px;
    height: 80px;
    background-image: var(--logo-url);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
}

.logo h1 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 1px;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.header-container {
    position: relative;
    width: 100%;
    min-height: 156.31px;
}

.header-title {
    text-align: center;
}



/* ========================================
   Адаптивность
   ======================================== */

@media (max-width: 768px) {
    .hero {
        padding: 4rem 0;
    }
    
    .hero h1 { 
        font-size: 2.5rem; 
        margin-bottom: 1.5rem;
    }
    
    .hero p { 
        font-size: 1.2rem; 
        margin-bottom: 2rem;
        white-space: normal;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn-hero, .btn-hero-secondary {
        width: 100%;
        max-width: 300px;
        padding: 1rem 2rem;
    }
    
    .section-title { 
        font-size: 2rem; 
    }
    
    .header-content { 
        flex-direction: column; 
        gap: 1rem; 
    }
    
    .grid { 
        grid-template-columns: 1fr; 
    }
    
    .cols-grid { 
        grid-template-columns: 1fr; 
    }
    
    .theme-switcher {
        bottom: 15px;
        left: 15px;
    }
    
    .theme-toggle {
        width: 45px;
        height: 45px;
    }
    
    .theme-options {
        bottom: 55px;
        min-width: 120px;
    }
    
    .picker-toggle {
        width: 45px;
        height: 45px;
        right: 15px;
        bottom: 15px;
    }
    
    /* Адаптивные стили для кнопок в хедере - в столбик над логотипом */
    .kiz-header-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    .kiz-header-container .btn[style*="position: absolute"] {
        position: static !important;
        height: 40px !important;
        font-size: 0.85em !important;
        padding: 8px 16px !important;
        min-width: 140px !important;
        max-width: 200px !important;
        width: auto !important;
        margin: 0 !important;
        order: -1 !important;
    }
    
    .kiz-header-container .kiz-logo-img {
        order: 0 !important;
        margin: 10px 0 !important;
    }
    
    .kiz-header-container h1 {
        order: 1 !important;
        margin: 10px 0 !important;
    }
}

@media (max-width: 480px) {
    .btn { 
        width: 100%; 
    }
    
    .card { 
        padding: 14px; 
    }
    
    .input { 
        padding: 10px 8px; 
        font-size: 0.9em; 
    }
    
    /* Дополнительные стили для кнопок в хедере на очень маленьких экранах */
    .kiz-header-container .btn[style*="position: absolute"] {
        height: 36px !important;
        font-size: 0.8em !important;
        padding: 6px 12px !important;
        min-width: 390px !important;
        max-width: 390px !important;
    }
    
    .kiz-header-container {
        gap: 6px !important;
    }
    
    .kiz-header-container .kiz-logo-img {
        margin: 8px 0 !important;
    }
    
    .kiz-header-container h1 {
        margin: 8px 0 !important;
        font-size: 1.8em !important;
    }
}

/* ========================================
   Страницы аутентификации
   ======================================== */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

/* ========================================
   Утилиты
   ======================================== */

.hidden {
    display: none;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 16px 0;
}

.error {
    position: relative;
    background: var(--bg-quaternary);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    color: var(--text-primary);
    font-size: 0.95em;
    font-weight: 400;
    max-width: 400px;
    min-width: 300px;
    text-align: center;
    margin-bottom: 12px;
}

.success {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--primary-color);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 12px;
    text-align: center;
}

.links {
    text-align: center;
    margin-top: 16px;
    color: var(--text-primary);
    font-size: 0.9em;
}

.links a {
    color: var(--primary-color);
    text-decoration: none;
}

/* ========================================
   Светлые темы - переопределение цветов
   ======================================== */

[data-theme="light-green"],
[data-theme="light-cyan"],
[data-theme="light-lavender"] {
    /* Основные элементы */
    body,
    .progress-section,
    .main-container,
    .header,
    .file-upload-section,
    .scanned-list,
    .current-item-info {
        background: var(--bg-primary);
        color: var(--text-primary);
    }

    .logs,
    .box,
    .kiz-scanner,
    .card {
        background: var(--bg-secondary);
        color: var(--text-primary);
    }

    .modal {
        background: var(--bg-primary);
        color: var(--text-primary);
    }

    .status-card,
    .integration-card {
        background: var(--bg-tertiary);
        color: var(--text-primary);
    }
    
    /* Заголовки и текст */
    h1, h2, h3, h4, h5, h6,
    .title,
    .upload-title,
    .scanner-title,
    .progress-title,
    .integration-card .title {
        color: var(--text-primary);
    }
    
    .subtitle,
    .upload-description,
    .progress-text,
    .status-label,
    .log-time,
    .muted,
    .header p {
        color: var(--text-secondary);
    }
    
    .log-message,
    .file-size {
        color: var(--text-muted);
    }
    
    /* Поля ввода */
    input,
    .input,
    .scanner-input,
    .form-input {
        background: var(--input-bg);
        border-color: var(--input-border);
        color: var(--text-primary);
    }
    
    input:focus,
    .input:focus,
    .scanner-input:focus,
    .form-input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 2px var(--primary-shadow);
    }
    
    /* Кнопки - унифицированные стили */
    .btn-primary {
        background: var(--primary-color);
        color: var(--text-primary);
    }
    
    .btn-primary:hover {
        background: var(--primary-hover);
        color: var(--text-primary);
    }

    .btn-secondary {
        background: var(--bg-quaternary);
        color: var(--text-primary);
    }
    
    .btn-secondary:hover {
        background: var(--text-secondary);
        color: var(--bg-primary);
    }

    /* Карточка текущего плана */
    .current-plan-card {
        background: var(--bg-secondary);
        border-color: var(--border-color);
    }
    
    .current-plan-card:not(.none) {
        background: var(--primary-color);
        border-color: var(--primary-hover);
    }
    
    .current-plan-card:not(.none) .plan {
        color: var(--text-primary);
    }
    
    .current-plan-card:not(.none) .muted {
        color: var(--text-secondary);
    }

    /* Ссылки */
    a {
        color: var(--primary-color);
    }
    
    /* Элементы списка */
    .scanned-item {
        background: var(--bg-tertiary);
        color: var(--text-primary);
        border-left-color: var(--primary-color);
    }
    
    .scanned-item:hover {
        background: var(--bg-quaternary);
    }
    
    .scanned-item[data-invalid="true"] {
        background: var(--bg-quaternary);
        color: var(--text-primary);
    }
    
    .scanned-item[data-invalid="true"]:hover {
        background: var(--text-secondary);
        color: var(--bg-primary);
    }
    
    /* Границы и рамки */
    .card,
    .progress-section,
    .main-container,
    .header,
    .file-upload-section,
    .scanned-list,
    .current-item-info,
    .logs,
    .box,
    .kiz-scanner,
    .modal-content,
    .modal,
    .upload-area,
    .status-card,
    .plan-card,
    .integration-card {
        border-color: var(--border-color);
    }
    
    .upload-area:hover,
    .dropzone:hover {
        border-color: var(--primary-color);
    }
    
    /* Специальные элементы */
    .status-number {
        color: var(--primary-color);
    }
    
    .progress-bar {
        background: var(--bg-tertiary);
    }
    
    .log-item {
        border-bottom-color: var(--border-color);
        color: var(--text-primary);
    }
    
    .file-info {
        background: var(--bg-tertiary);
        border-left-color: var(--primary-color);
    }
    
    .file-name {
        color: var(--text-primary);
    }

    .edit-btn {
        background: var(--primary-color);
        color: var(--text-primary);
    }
    
    .edit-btn:hover {
        background: var(--primary-hover);
    }
    
    .error {
        background: var(--bg-quaternary);
        border: 2px solid var(--primary-color);
        border-radius: 12px;
        padding: 16px 20px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
        color: var(--text-primary);
        font-size: 0.95em;
        font-weight: 400;
        max-width: 400px;
        min-width: 300px;
        text-align: center;
    }
    
    
}

/* ========================================
   Уведомления (Toast Notifications)
   ======================================== */

/* Контейнер для уведомлений */
.toast-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Фон для затемнения */
.toast-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: color-mix(in srgb, var(--bg-secondary) 50%, transparent);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.toast-backdrop.show {
    opacity: 1;
}

/* Само уведомление */
.toast {
    position: relative;
    background: var(--bg-quaternary);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    color: var(--text-primary);
    font-size: 0.95em;
    font-weight: 400;
    max-width: 400px;
    min-width: 300px;
    text-align: center;
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    z-index: 10001;
}

.toast.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Иконки для разных типов уведомлений */
.toast::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: var(--text-primary);
    background: var(--primary-color);
}

.toast.success::before {
    content: '✓';
}

.toast.error::before {
    content: '✕';
}

.toast.warning::before {
    content: '⚠';
}

.toast.info::before {
    content: 'ℹ';
}

/* Отступ для текста с учетом иконки */
.toast .toast-message {
    margin-left: 32px;
    line-height: 1.4;
}

/* Цвета для разных типов - используем только цвета темы */
.toast.success {
    border-left: 4px solid var(--primary-color);
}

.toast.error {
    border-left: 4px solid var(--primary-color);
}

.toast.warning {
    border-left: 4px solid var(--primary-color);
}

.toast.info {
    border-left: 4px solid var(--primary-color);
}


/* Анимация появления */
@keyframes toastSlideIn {
    from {
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }
}

/* Мобильные стили для карточек (только мобильные устройства) */
@media (max-width: 480px) {
    /* Стили для feature-card на мобильных */
    .feature-card {
        margin-bottom: 1.5rem;
        padding: 1.2rem;
        border-radius: 10px;
        background: var(--bg-secondary) !important;
        border: 1px solid var(--border-color) !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .feature-card .feature-icon {
        margin-bottom: 0.8rem;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    
    .feature-card .feature-content h3 {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
        color: var(--text-primary);
        line-height: 1.3;
    }
    
    .feature-card .feature-content p {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 0.6rem;
        color: var(--text-secondary);
    }
    
    .feature-card .feature-content ul {
        margin: 0;
        padding-left: 0;
    }
    
    .feature-card .feature-content li {
        font-size: 0.75rem;
        margin-bottom: 0.3rem;
        color: var(--text-secondary);
        line-height: 1.3;
    }
    
    /* Стили для pricing-card на мобильных */
    .pricing-card {
        width: 100% !important;
        max-width: 280px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: 0 !important;
        margin-bottom: 1.2rem !important;
        padding: 1.2rem !important;
        border-radius: 10px !important;
        background: var(--bg-secondary) !important;
        border: 2px solid var(--border-color) !important;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1) !important;
        text-align: center !important;
        position: relative !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    .pricing-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
        color: var(--text-primary);
        font-weight: 600;
        line-height: 1.2;
    }
    
    .pricing-card .pricing-price {
        font-size: 1.8rem;
        font-weight: 700;
        color: var(--primary-color);
        margin-bottom: 1.2rem;
        line-height: 1;
    }
    
    .pricing-card .pricing-price span {
        font-size: 0.9rem;
        color: var(--text-secondary);
        font-weight: 400;
    }
    
    .pricing-card .pricing-features {
        list-style: none;
        padding: 0;
        margin: 0 0 1.2rem 0;
    }
    
    .pricing-card .pricing-features li {
        padding: 0.4rem 0;
        font-size: 0.85rem;
        color: var(--text-secondary);
        border-bottom: 1px solid var(--border-color);
        line-height: 1.3;
    }
    
    .pricing-card .pricing-features li:last-child {
        border-bottom: none;
    }
    
    .pricing-card .btn {
        width: 100%;
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
        font-weight: 600;
    }
    
    /* Стили для pricing-card featured на мобильных */
    .pricing-card.featured {
        border-color: var(--primary-color) !important;
        background: var(--bg-tertiary) !important;
        transform: none !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: 0 !important;
        margin-bottom: 1.2rem !important;
        width: 100% !important;
        max-width: 280px !important;
    }
    
    /* Максимальная специфичность для принудительного центрирования */
    body .pricing .pricing-grid .pricing-card.featured {
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: 0 !important;
        margin-bottom: 1.5rem !important;
        transform: none !important;
        width: 100% !important;
        max-width: 280px !important;
    }
    
    .pricing-card.featured::before {
        content: "Популярный";
        position: absolute;
        top: -8px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--primary-color);
        color: var(--text-primary);
        padding: 0.25rem 0.8rem;
        border-radius: 15px;
        font-size: 0.75rem;
        font-weight: 600;
    }
    
    .pricing-card.featured h3 {
        color: var(--primary-color);
    }
    
    .pricing-card.featured .pricing-price {
        color: var(--primary-color);
    }
    
    /* Контейнеры для карточек на мобильных */
    .features-grid {
        display: block !important;
        gap: 0 !important;
        text-align: center !important;
    }
    
    .pricing-grid {
        display: block !important;
        gap: 0 !important;
        grid-template-columns: none !important;
        text-align: center !important;
    }
    
    .pricing-grid .pricing-card {
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: 0 !important;
        margin-bottom: 1.5rem !important;
        display: block !important;
    }
    
    /* Дополнительные селекторы для принудительного центрирования */
    .pricing .pricing-grid .pricing-card {
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: 0 !important;
        margin-bottom: 1.5rem !important;
    }
    
    .pricing-content .pricing-grid .pricing-card {
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: 0 !important;
        margin-bottom: 1.5rem !important;
    }
    
    .pricing-grid .pricing-card:last-child {
        margin-bottom: 0 !important;
    }
    
    .features-grid .feature-card {
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: 0 !important;
        margin-bottom: 1.5rem !important;
        display: block !important;
    }
    
    .features-grid .feature-card:last-child {
        margin-bottom: 0 !important;
    }
    
    /* Стили для devicesCard на мобильных */
    #devicesCard {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto 1.5rem auto !important;
        padding: 1.2rem !important;
        border-radius: 10px !important;
        background: var(--bg-secondary) !important;
        border: 1px solid var(--border-color) !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    #devicesCard .muted {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1rem !important;
    }
    
    #devicesCard .device-row {
        display: block !important;
        padding: 0.8rem !important;
        margin-bottom: 0.8rem !important;
        background: var(--bg-tertiary) !important;
        border-radius: 8px !important;
        border: 1px solid var(--border-color) !important;
    }
    
    #devicesCard .device-row > div {
        display: block !important;
        margin-bottom: 0.4rem !important;
        font-size: 0.85rem !important;
    }
    
    #devicesCard .device-row > div:last-child {
        margin-bottom: 0 !important;
        text-align: left !important;
    }
    
    #devicesCard .device-row .btn {
        width: 100% !important;
        margin-top: 0.5rem !important;
    }
    
    /* Стили для plan-card на мобильных */
    .plan-card {
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 auto 1.5rem auto !important;
        padding: 1.2rem !important;
        border-radius: 10px !important;
        background: var(--bg-secondary) !important;
        border: 2px solid var(--border-color) !important;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1) !important;
        text-align: center !important;
        position: relative !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    .plan-card h3 {
        font-size: 1.2rem !important;
        margin-bottom: 0.8rem !important;
        color: var(--text-primary) !important;
    }
    
    .plan-card .price {
        font-size: 1.4rem !important;
        font-weight: 600 !important;
        color: var(--primary-color) !important;
        margin-bottom: 1rem !important;
    }
    
    .plan-card .features {
        text-align: left !important;
        margin-bottom: 1.2rem !important;
        padding-left: 1rem !important;
    }
    
    .plan-card .features li {
        font-size: 0.9rem !important;
        margin-bottom: 0.4rem !important;
        line-height: 1.3 !important;
    }
    
    .plan-card .plan-buy-form {
        margin-bottom: 0.8rem !important;
    }
    
    .plan-card .plan-buy-form .btn {
        width: 100% !important;
        padding: 0.8rem 1rem !important;
        font-size: 0.9rem !important;
    }
    
    .plan-card .muted {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
        color: var(--text-secondary) !important;
    }
    
    /* Стили для контейнеров планов и устройств на мобильных */
    .plans {
        display: block !important;
        gap: 0 !important;
        text-align: center !important;
    }
    
    .plans .plan-card {
        margin: 0 auto 1.5rem auto !important;
        display: block !important;
    }
    
    .plans .plan-card:last-child {
        margin-bottom: 0 !important;
    }
    
    .collapse-content {
        padding: 1rem !important;
    }
    
    .collapse-content .card {
        margin-bottom: 1rem !important;
    }
    
    .collapse-content .card:last-child {
        margin-bottom: 0 !important;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .toast {
        max-width: 90vw;
        min-width: 280px;
        padding: 14px 18px;
        font-size: 0.9em;
    }
    
    .toast::before {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
    
    .toast .toast-message {
        margin-left: 28px;
    }
}

/* ========================================
   СТИЛИ ДЛЯ KIZ_MANAGER.HTML
   ======================================== */

/* Основные стили для страницы КИЗ Менеджер */
.kiz-manager-page {
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

/* Заголовок и навигация */
.kiz-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.kiz-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: block;
}

.kiz-header h1 {
    color: var(--text-primary);
    font-size: 2.2em;
    margin-bottom: 8px;
    font-weight: 300;
    letter-spacing: 2px;
}

.kiz-header p {
    color: var(--text-secondary);
    font-size: 1em;
    font-weight: 300;
}

/* Контейнер навигационных кнопок */
.kiz-header-container {
    position: relative;
    width: 100%;
}


/* История: элементы списка */
.history-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid #404040;
    border-radius: 8px;
    margin-bottom: 10px;
}

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

.history-title {
    color: var(--text-primary);
    font-weight: 500;
}

.history-meta {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.history-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    min-width: 220px;
}

.history-actions .modal-btn {
    padding: 8px 12px;
    font-size: 0.9em;
    line-height: 1.3;
    white-space: nowrap;
    width: 100%;
}

@media (max-width: 680px) {
    .history-row {
        flex-direction: column;
    }
    .history-actions {
        min-width: 0;
    }
    .history-actions .modal-btn {
        width: 100%;
    }
}

@media (min-width: 1024px) {
    .history-row {
        flex-direction: column;
    }
}

/* Стили для информации о товаре */
.current-item-info {
    background: var(--bg-primary);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 1em;
    text-align: center;
    display: none;
    min-height: 80px;
}

.item-scan-title {
    margin-bottom: 10px;
    font-weight: 600;
}

.item-details {
    color: var(--text-muted);
}

.item-progress {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.1em;
    color: var(--text-secondary);
    font-weight: 500;
}

.item-content {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 25px;
    max-width: 100%;
}

.item-image-container {
    flex-shrink: 0;
    text-align: center;
}

.item-image {
    width: 139px;
    height: 185px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--bg-secondary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin-bottom: 8px;
}

.item-text-container {
    flex: 1;
    text-align: left;
    min-width: 0;
    padding: 10px 0;
}

.item-article {
    margin-bottom: 15px;
    font-size: 1.4em;
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.2;
}

.item-attributes {
    margin-bottom: 15px;
}

.item-attribute {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-left: 3px solid var(--primary-color);
    color: var(--text-primary);
    font-weight: 500;
}

.item-codes {
    margin-top: 10px;
}

.item-code {
    background: var(--bg-secondary);
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 5px;
    border-left: 3px solid var(--border-color);
    color: var(--text-primary);
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.item-code strong {
    font-weight: 600;
}

/* Стили для выбранного scanned-item */
.scanned-item {
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-quaternary);
    color: var(--text-primary);
}

.scanned-item:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.scanned-item.selected {
    background: var(--primary-color);
    color: var(--text-inverse);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.scanned-item.selected:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.scanned-item.selected .btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--bg-secondary);
}

.scanned-item.selected .btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--bg-tertiary);
}

.item-return-btn {
    text-align: center;
    margin-top: 20px;
}

/* Стили для логов */
.logs {
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
}

.log-item {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 0.9em;
    line-height: 1.4;
}

.log-time {
    color: var(--text-secondary);
    font-family: monospace;
    white-space: nowrap;
    min-width: 80px;
}

.log-message {
    flex: 1;
    word-break: break-word;
}

.log-info {
    color: var(--text-primary);
}




/* Стили для списка КИЗ */
.kiz-item-grid {
    display: grid;
    grid-template-columns: 1fr 200px 200px auto;
    gap: 15px;
    align-items: center;
}

.kiz-text {
    color: var(--text-primary);
}

.kiz-info-center {
    text-align: center;
}

.kiz-info-text {
    color: var(--text-primary);
    font-weight: bold;
}


/* Стили для модальных окон KIZ Manager */
.kiz-manager-page .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.kiz-manager-page .modal-content {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 12px;
    width: 500px;
    max-width: 90vw;
    max-height: 80vh;
    overflow: auto;
    color: var(--text-primary);
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
}


/* Стили для модального окна информации о товаре */
.modal-item-info {
    padding: 10px;
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--primary-color);
}

.modal-item-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 1.1em;
}

.modal-item-content {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.modal-item-image {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--primary-color);
    background: var(--bg-secondary);
}

.modal-item-details {
    flex: 1;
    min-width: 0;
}

.modal-item-field {
    margin-bottom: 8px;
}

.modal-item-label {
    color: var(--text-secondary);
}

.modal-item-value {
    color: var(--text-primary);
    font-weight: 500;
    margin-left: 8px;
}

.modal-item-code {
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    margin-left: 8px;
}

.modal-item-empty {
    color: var(--text-secondary);
    font-style: italic;
}

/* Основной контейнер */
.kiz-main-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Секция загрузки файлов */
.file-upload-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.upload-area {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    background: var(--bg-secondary);
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
}

.upload-icon {
    display: none;
}

.upload-title {
    font-size: 1.2em;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 400;
    letter-spacing: 1px;
}

.upload-description {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 0.9em;
    font-weight: 300;
}

.file-input {
    display: none;
}

.file-info {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
    border-left: 3px solid var(--primary-color);
}

.file-name {
    color: var(--text-primary);
    font-weight: 400;
}

.file-size {
    color: var(--text-secondary);
    font-size: 0.85em;
}

/* Кнопки действий */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 30px 0;
}

.kiz-btn {
    border: none;
    color: var(--text-primary);
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0.5px;
    background: var(--bg-quaternary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.kiz-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.kiz-btn:disabled {
    background: #2a2a2a;
    color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Секция прогресса */
.progress-section {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #404040;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.progress-title {
    color: #ffffff;
    font-size: 1.1em;
    margin-bottom: 15px;
    font-weight: 400;
}

.progress-bar {
    background: #404040;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: #a0a0a0;
    text-align: center;
    font-size: 0.9em;
}

/* Сканер КИЗ */
.kiz-scanner {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid #404040;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.scanner-title {
    color: #ffffff;
    font-size: 1.3em;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 300;
    letter-spacing: 1px;
}

.scanner-input {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #404040;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 1em;
    font-family: 'Courier New', monospace;
    margin-bottom: 15px;
    transition: border-color 0.2s ease;
}

.scanner-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(16, 22, 73, 0.2);
}

.scanned-list {
    max-height: 300px;
    overflow-y: auto;
    background: #1a1a1a;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #404040;
}



@keyframes invalidKizPulse {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

/* Статистика */
.status-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.status-card {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #404040;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.2s ease;
}

.status-card:hover {
    transform: translateY(-2px);
}

.status-number {
    font-size: 1.8em;
    color: var(--primary-color);
    font-weight: 300;
}

.status-label {
    color: #a0a0a0;
    margin-top: 5px;
    font-size: 0.9em;
    font-weight: 300;
}

/* Логи */
.logs {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #404040;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.log-item {
    color: #e5e5e5;
    padding: 5px 0;
    border-bottom: 1px solid #404040;
    font-size: 0.9em;
}

.log-item:last-child {
    border-bottom: none;
}

.log-time {
    color: #a0a0a0;
}

.log-message {
    color: #e5e5e5;
}

/* Лист подбора */
.picker-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.picker-toggle:hover {
    background: var(--bg-quaternary);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.picker-toggle svg {
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.picker-toggle:hover svg {
    color: var(--primary-color);
    transform: rotate(180deg);
}
.picker-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 420px;
    max-width: 90vw;
    background: var(--bg-primary);
    border-left: 1px solid var(--border-color);
    box-shadow: -8px 0 24px rgba(0,0,0,0.35);
    z-index: 999;
    transform: translateX(100%);
    transition: transform .25s ease;
    display: flex;
    flex-direction: column;
}
