/* ============================================================
   SIDEBAR — боковая панель
   ============================================================ */

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 998;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 340px;
    height: 100vh;
    background: var(--card-bg);
    border-right: 1px solid var(--card-border);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.4);
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 24px 20px 16px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-user {
    flex: 1;
    min-width: 0;
}

.sidebar-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-sub {
    font-size: 12px;
    color: var(--hint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-section {
    padding: 16px 12px 8px;
}

.sidebar-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--hint);
    padding: 0 8px 8px;
    opacity: 0.6;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    margin-bottom: 2px;
    -webkit-tap-highlight-color: transparent;
}

.sidebar-item:active {
    background: rgba(59, 130, 246, 0.12);
}

.sidebar-item.active {
    background: rgba(59, 130, 246, 0.15);
}

.sidebar-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    color: var(--accent-solid, var(--accent));
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-item.active .sidebar-item-icon {
    background: rgba(59, 130, 246, 0.25);
}

.sidebar-item-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.1px;
}

.sidebar-divider {
    height: 1px;
    background: var(--card-border);
    margin: 8px 16px;
}

.header-menu-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    color: var(--text);
    transition: transform 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
    margin-right: 12px;
}

.header-menu-btn:active {
    transform: scale(0.92);
    background: rgba(59, 130, 246, 0.12);
}

.header {
    display: flex;
    align-items: center;
    padding: 12px 16px 12px;
    gap: 0;
}

.header-title-wrap {
    flex: 1;
    min-width: 0;
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-subtitle {
    font-size: 12px;
    color: var(--hint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.header-channel-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    color: var(--accent-light);
    transition: transform 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.header-channel-btn:active {
    transform: scale(0.92);
    background: rgba(59, 130, 246, 0.25);
}

/* ============================================================
   ТИТУЛЫ И ЗНАЧКИ
   ============================================================ */

.svg-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 4px;
    vertical-align: middle;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.svg-badge svg {
    width: 100%;
    height: 100%;
}

/* ============================================================
   КНОПКА НАЗАД
   ============================================================ */

.header-back-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    color: var(--text);
    transition: transform 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
    margin-right: 8px;
    padding-bottom: 3px;
}

.header-back-btn:active {
    transform: scale(0.92);
    background: rgba(59, 130, 246, 0.18);
}

/* В светлой теме */
body.light-theme .header-back-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

/* ============================================================
   ТАБЫ РАСПИСАНИЯ (неделя + дни)
   ============================================================ */

.schedule-tabs {
    margin-bottom: 16px;
}

.week-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
}

.week-tab {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text);
    padding: 16px 8px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.week-tab:active {
    transform: scale(0.97);
}

.week-tab.active {
    background: var(--accent);
    border-color: var(--accent-solid, var(--accent));
    color: #fff;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.day-tabs-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.day-tab-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text);
    padding: 14px 4px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.day-tab-btn:active {
    transform: scale(0.95);
}

.day-tab-btn.active {
    background: var(--accent);
    border-color: var(--accent-solid, var(--accent));
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Светлая тема */
body.light-theme .week-tab,
body.light-theme .day-tab-btn {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .week-tab.active,
body.light-theme .day-tab-btn.active {
    background: var(--accent);
    border-color: var(--accent-solid, var(--accent));
    color: #fff;
}

/* ============================================================
   КНОПКА ОБНОВЛЕНИЯ РАСПИСАНИЯ
   ============================================================ */

.header-refresh-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    color: var(--text);
    transition: transform 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
    margin-right: 6px;
}

.header-refresh-btn:active {
    transform: scale(0.92);
    background: rgba(59, 130, 246, 0.18);
}

.header-refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body.light-theme .header-refresh-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

/* ============================================================
   ПРОФИЛЬ: ФИО + ЭФФЕКТЫ
   ============================================================ */

/* ============================================================
   ПРОФИЛЬ: ФИО + эффекты в одну строку с переносом
   ============================================================ */

.profile-name-inline {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.4;
    margin-bottom: 6px;
    
    /* Ключевое — inline-элементы текут как текст */
    display: inline;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ФИО внутри — обычный span (может быть span с цветом) */
.profile-name-inline > span {
    display: inline;
    white-space: normal;
    word-break: break-word;
}

/* Плашка титула внутри — inline, чтобы переносилась вместе с текстом */
.profile-name-inline /* SVG-значок */
.profile-name-inline .svg-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 4px;
    vertical-align: middle;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.profile-name-inline .svg-badge svg {
    width: 100%;
    height: 100%;
}

/* Эмодзи-статус — обычный inline, переносится вместе с текстом */
.profile-name-inline span[style*="font-size:16px"] {
    display: inline;
    font-size: 16px;
    line-height: 1;
    margin-left: 4px;
    vertical-align: middle;
    white-space: nowrap;
}

/* ============================================================
   ПЕРИОД ДЕЙСТВИЯ ПАРЫ
   ============================================================ */

.period-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.period-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    font-size: 14px;
    font-family: inherit;
}

.period-option:active {
    background: rgba(59, 130, 246, 0.08);
}

.period-option:has(input:checked) {
    background: rgba(59, 130, 246, 0.12);
    border-color: var(--accent-solid, var(--accent));
}

.period-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-solid, var(--accent));
    cursor: pointer;
    flex-shrink: 0;
}

.period-option span {
    flex: 1;
    font-weight: 500;
    letter-spacing: -0.1px;
}

.info-box {
    padding: 12px 14px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
}

/* ============================================================
   ИКОНКИ В ШАПКЕ (SVG)
   ============================================================ */

.header-menu-btn,
.header-back-btn,
.header-channel-btn,
.header-refresh-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
}

.header-menu-btn svg,
.header-back-btn svg,
.header-channel-btn svg,
.header-refresh-btn svg {
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}

.header-channel-btn {
    color: var(--accent-light);
}

.header-refresh-btn {
    color: var(--accent-light);
}

/* ============================================================
   ФОН С КРУГАМИ
   ============================================================ */

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 100px;
    overscroll-behavior: none;
    -webkit-font-smoothing: antialiased;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
}

/* ============================================================
   SVG-ИКОНКИ В ТАББАРЕ
   ============================================================ */

.tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    opacity: 0.7;
    background: transparent;
    border-radius: 0;
    color: var(--hint);
    transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity .25s, color .2s;
}

.tab-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.tab:active .tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    opacity: 0.7;
    background: transparent;
    border-radius: 0;
    color: var(--hint);
    transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity .25s, color .2s;
}

.tab.active .tab-icon {
    transform: translateY(-1px);
    opacity: 1;
    background: transparent;
    color: var(--accent-solid, var(--accent));
    box-shadow: none;
}

.tab.active .tab-icon svg {
    stroke: var(--accent-light);
}

/* ============================================================
   SVG-ИКОНКИ В ШАПКЕ
   ============================================================ */

.header-menu-btn svg,
.header-back-btn svg,
.header-channel-btn svg,
.header-refresh-btn svg {
    stroke: currentColor;
    display: block;
}

.header-menu-btn { color: var(--text); }
.header-back-btn { color: var(--text); }
.header-channel-btn { color: var(--accent-light); }
.header-refresh-btn { color: var(--accent-light); }

/* ============================================================
   SVG-ИКОНКИ В КАРТОЧКАХ (для будущего)
   ============================================================ */

.bento-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-bottom: 6px;
    color: var(--accent-light);
}

.bento-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

/* ============================================================
   BENTO-ИКОНКИ (SVG)
   ============================================================ */

.bento-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
    border-radius: 10px;
    background: rgba(0, 196, 255, 0.12);
    color: var(--accent-light);
    flex-shrink: 0;
}

.bento-icon svg {
    display: block;
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* На цветных карточках (акцентных) — белая иконка на светлом фоне */
.bento-card.accent .bento-icon,
.bento-card.green .bento-icon,
.bento-card.orange .bento-icon,
.bento-card.purple .bento-icon,
.bento-card.pink .bento-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* На широких карточках — иконка чуть больше */
.bento-card.wide .bento-icon {
    width: 32px;
    height: 32px;
}

.bento-card.wide .bento-icon svg {
    width: 20px;
    height: 20px;
}

/* ============================================================
   SVG-ИКОНКИ В SIDEBAR
   ============================================================ */

.sidebar-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(0, 196, 255, 0.1);
    color: var(--accent-light);
    flex-shrink: 0;
}

.sidebar-item-icon svg {
    display: block;
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.sidebar-item.active .sidebar-item-icon {
    background: rgba(0, 196, 255, 0.2);
    color: var(--accent-light);
}

.sidebar-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-section-title svg {
    stroke: currentColor;
    opacity: 0.7;
}

/* ============================================================
   MENU-ИКОНКИ
   ============================================================ */

.menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0, 196, 255, 0.1);
    color: var(--accent-light);
    flex-shrink: 0;
}

.menu-icon svg {
    display: block;
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* ============================================================
   КНОПКИ СТАТУСОВ ПОСЕЩАЕМОСТИ
   ============================================================ */

.status-btn {
    flex: 1;
    background: var(--card-bg);
    border: 1.5px solid var(--card-border);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 12px 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.2px;
    transition: all 0.15s ease;
    position: relative;
}

.status-btn:active {
    transform: scale(0.95);
}

/* Активные состояния — яркие заливки */
.status-btn.active-will {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.status-btn.active-absent {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.status-btn.active-sick {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.status-btn.active-late {
    background: var(--accent);
    border-color: var(--accent-solid, var(--accent));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* ============================================================
   ТИТУЛЫ И ЗНАЧКИ
   ============================================================ */

/* SVG-значки */
.svg-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 4px;
    vertical-align: middle;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.svg-badge svg {
    width: 100%;
    height: 100%;
}

/* Премиум-ник с эффектом */
.nick-glow {
    text-shadow: 0 0 12px currentColor;
    font-weight: 700;
}

/* Карточка с эффектами в профиле */
.effects-showcase {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(191, 90, 242, 0.08));
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    margin-top: 8px;
}

.effects-showcase-label {
    font-size: 11px;
    color: var(--hint);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

/* ============================================================
   ТИТУЛЫ И ЗНАЧКИ
   ============================================================ */

.svg-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 4px;
    vertical-align: middle;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.svg-badge svg {
    width: 100%;
    height: 100%;
}

/* ============================================================
   КНОПКА НАЗАД
   ============================================================ */

.header-back-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    color: var(--text);
    transition: transform 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
    margin-right: 8px;
    padding-bottom: 3px;
}

.header-back-btn:active {
    transform: scale(0.92);
    background: rgba(59, 130, 246, 0.18);
}

/* В светлой теме */
body.light-theme .header-back-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

/* ============================================================
   ПРОФИЛЬ: ФИО + ЭФФЕКТЫ
   ============================================================ */

/* ============================================================
   ПРОФИЛЬ: ФИО + эффекты в одну строку с переносом
   ============================================================ */

.profile-name-inline {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.4;
    margin-bottom: 6px;
    
    /* Ключевое — inline-элементы текут как текст */
    display: inline;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ФИО внутри — обычный span (может быть span с цветом) */
.profile-name-inline > span {
    display: inline;
    white-space: normal;
    word-break: break-word;
}

/* Плашка титула внутри — inline, чтобы переносилась вместе с текстом */
.profile-name-inline /* SVG-значок */
.profile-name-inline .svg-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 4px;
    vertical-align: middle;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.profile-name-inline .svg-badge svg {
    width: 100%;
    height: 100%;
}

/* Эмодзи-статус — обычный inline, переносится вместе с текстом */
.profile-name-inline span[style*="font-size:16px"] {
    display: inline;
    font-size: 16px;
    line-height: 1;
    margin-left: 4px;
    vertical-align: middle;
    white-space: nowrap;
}

/* ============================================================
   ИНВЕНТАРЬ
   ============================================================ */

.bento-card.inventory {
    background: linear-gradient(135deg, rgba(0,196,255,0.13), rgba(59,130,246,0.13)) !important;
    border: 1px solid rgba(0,196,255,0.3) !important;
}

/* ============================================================
   ИНВЕНТАРЬ — новый стиль
   ============================================================ */

.inventory-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(0,196,255,0.08), rgba(59,130,246,0.04));
    border: 1px solid rgba(0,196,255,0.15);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.inv-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,196,255,0.25);
}

.inv-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.inv-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.3;
    margin-bottom: 6px;
    word-break: break-word;
}

.inv-sub {
    font-size: 12px;
    color: var(--hint);
    margin-bottom: 2px;
}

.inv-role {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 8px;
    background: rgba(0,196,255,0.15);
    color: var(--accent-light);
    font-size: 11px;
    font-weight: 600;
}

/* ===== Карточки товаров ===== */
.inv-card {
    border: 1.5px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 10px;
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.inv-card:active {
    transform: scale(0.99);
}

.inv-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.inv-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(0,196,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.inv-card-body {
    flex: 1;
    min-width: 0;
}

.inv-card-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.2px;
    margin-bottom: 4px;
}

.inv-card-desc {
    font-size: 12px;
    color: var(--hint);
    line-height: 1.4;
}

.inv-card-badge {
    font-size: 18px;
    flex-shrink: 0;
}

.inv-card-actions {
    display: flex;
    gap: 8px;
}

.inv-btn {
    flex: 1;
    padding: 10px 16px !important;
    margin-top: 0 !important;
    font-size: 13px !important;
}

/* ============================================================
   ТИТУЛЫ — красивый стиль
   ============================================================ */

.title-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    margin-left: 6px;
    vertical-align: middle;
    white-space: nowrap;
    position: relative;
    background: linear-gradient(135deg, #ffd60a, #ff9f0a);
    color: #000;
    box-shadow: 0 2px 10px rgba(255, 214, 10, 0.45);
    animation: titlePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.title-badge svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
    flex-shrink: 0;
}

/* ГЕНИЙ — фиолетовый */
.title-badge.genius {
    background: linear-gradient(135deg, #bf5af2, #8e2de2);
    color: #fff;
    box-shadow: 0 2px 12px rgba(191, 90, 242, 0.55);
}

/* ЧЕМПИОН — зелёный */
.title-badge.champion {
    background: linear-gradient(135deg, #30d158, #26a848);
    color: #fff;
    box-shadow: 0 2px 12px rgba(48, 209, 88, 0.55);
}

/* ПРОФЕССОР — синий */
.title-badge.professor {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.55);
}

/* ЛЕГЕНДА — золотой */
.title-badge.legend {
    background: linear-gradient(135deg, #ffd60a, #ff9f0a);
    color: #000;
    box-shadow: 0 2px 12px rgba(255, 214, 10, 0.6);
}

/* Прочие титулы — серо-голубой */
.title-badge.default {
    background: linear-gradient(135deg, #64748b, #475569);
    color: #fff;
    box-shadow: 0 2px 10px rgba(100, 116, 139, 0.4);
}

/* Анимация появления */
@keyframes titlePop {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* ============================================================
   SVG-ИКОНКИ В КАТЕГОРИЯХ МАГАЗИНА
   ============================================================ */

.day-tab svg {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 4px;
    vertical-align: -2px;
    stroke: currentColor;
}

.day-tab.active svg {
    stroke: #fff;
}

/* ============================================================
   КАРТОЧКИ ТОВАРОВ В МАГАЗИНЕ — С ЭМОДЗИ В КРУГЕ
   ============================================================ */

.shop-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    transition: border-color 0.15s ease;
}

.shop-item-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(0,196,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.shop-item-body {
    flex: 1;
    min-width: 0;
}

.shop-item-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.2px;
    margin-bottom: 4px;
}

.shop-item-desc {
    font-size: 12px;
    color: var(--hint);
    line-height: 1.4;
    margin-bottom: 8px;
}

.shop-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shop-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-light);
}

.shop-item-btn {
    padding: 8px 16px !important;
    margin: 0 !important;
    width: auto !important;
    font-size: 13px !important;
}

/* ============================================================
   АНИМАЦИЯ "КУПЛЕНО" В МАГАЗИНЕ
   ============================================================ */

.shop-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.shop-item-bought {
    animation: buyPulse 0.7s ease;
    border-color: var(--green) !important;
    background: linear-gradient(135deg, rgba(34,197,94,0.12), rgba(34,197,94,0.04)) !important;
}

@keyframes buyPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 8px rgba(34,197,94,0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34,197,94,0);
    }
}

.shop-item-btn-bought {
    background: var(--green) !important;
    color: #fff !important;
    border-color: var(--green) !important;
    cursor: default !important;
}

/* Иконка "категории" в товаре */
.shop-cat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(0,196,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.shop-cat-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--accent-light);
    fill: none;
}

/* SVG-значок в инвентаре */
.inv-card-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent-light);
    fill: none;
}

/* Значок в профиле */
.svg-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 6px;
    vertical-align: middle;
}

.svg-badge svg {
    width: 100%;
    height: 100%;
    stroke: var(--accent-light);
    fill: none;
    filter: drop-shadow(0 2px 4px rgba(0,196,255,0.4));
}

/* ============================================================
   ТИТУЛ ADMIN — красно-золотой, с иконкой щита
   ============================================================ */

.title-badge.admin {
    background: linear-gradient(135deg, #ff375f, #d70040);
    color: #fff;
    box-shadow: 0 2px 12px rgba(255, 55, 95, 0.6);
    border: 1px solid rgba(255, 214, 10, 0.4);
    animation: adminGlow 2s ease-in-out infinite;
}

.title-badge.admin svg {
    filter: drop-shadow(0 0 4px rgba(255, 214, 10, 0.8));
}

@keyframes adminGlow {
    0%, 100% {
        box-shadow: 0 2px 12px rgba(255, 55, 95, 0.6);
    }
    50% {
        box-shadow: 0 2px 18px rgba(255, 55, 95, 0.9), 0 0 24px rgba(255, 214, 10, 0.3);
    }
}

/* ============================================================
   КНОПКА НАЗАД В ШАПКЕ
   ============================================================ */

.header-back-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    color: var(--text);
    transition: transform 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
    margin-right: 8px;
    padding-bottom: 3px;
}

.header-back-btn:active {
    transform: scale(0.92);
    background: rgba(59, 130, 246, 0.18);
}

body.light-theme .header-back-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

/* ============================================================
   КНОПКА ОБНОВЛЕНИЯ РАСПИСАНИЯ
   ============================================================ */

.header-refresh-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(0, 196, 255, 0.15);
    border: 1px solid rgba(0, 196, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    color: var(--accent-light);
    transition: transform 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
    margin-right: 6px;
}

.header-refresh-btn:active {
    transform: scale(0.92);
    background: rgba(0, 196, 255, 0.25);
}

.header-refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body.light-theme .header-refresh-btn {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

/* ============================================================
   ТАБЫ РАСПИСАНИЯ (неделя + дни)
   ============================================================ */

.schedule-tabs {
    margin-bottom: 16px;
}

.week-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
}

.week-tab {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text);
    padding: 16px 8px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.week-tab:active {
    transform: scale(0.97);
}

.week-tab.active {
    background: var(--accent);
    border-color: var(--accent-solid, var(--accent));
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 196, 255, 0.4);
}

.day-tabs-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.day-tab-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text);
    padding: 14px 4px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.day-tab-btn:active {
    transform: scale(0.95);
}

.day-tab-btn.active {
    background: var(--accent);
    border-color: var(--accent-solid, var(--accent));
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 196, 255, 0.4);
}

body.light-theme .week-tab,
body.light-theme .day-tab-btn {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
}

/* ============================================================
   ПЕРИОД ДЕЙСТВИЯ ПАРЫ
   ============================================================ */

.period-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.period-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    font-size: 14px;
}

.period-option:active {
    background: rgba(0, 196, 255, 0.08);
}

.period-option:has(input:checked) {
    background: rgba(0, 196, 255, 0.12);
    border-color: var(--accent-solid, var(--accent));
}

.period-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-solid, var(--accent));
    cursor: pointer;
    flex-shrink: 0;
}

.period-option span {
    flex: 1;
    font-weight: 500;
    letter-spacing: -0.1px;
}

.info-box {
    padding: 12px 14px;
    background: rgba(0, 196, 255, 0.08);
    border: 1px solid rgba(0, 196, 255, 0.15);
    border-radius: 12px;
}

/* ============================================================
   ВЫБОР АКЦЕНТНОГО ЦВЕТА
   ============================================================ */

.accent-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.accent-swatch {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.1s;
    position: relative;
}

.accent-swatch:active {
    transform: scale(0.99);
}

.accent-swatch.active {
    border-color: var(--accent-solid, var(--accent));
    background: rgba(255, 106, 0, 0.06);
}

.accent-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}

.accent-name {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.accent-check {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-solid, var(--accent));
}

/* ============================================================ */
/* ACCENT OVERRIDE — sidebar icons                             */
/* ============================================================ */

.sidebar-item-icon {
    color: var(--accent-solid, var(--accent)) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}
.sidebar-item-icon svg {
    stroke: var(--accent-solid, var(--accent)) !important;
    color: var(--accent-solid, var(--accent)) !important;
}
.sidebar-item.active .sidebar-item-icon {
    background: var(--accent-glow) !important;
}

/* Титул в sidebar */
.sidebar-title {
    font-size: 11px;
    color: var(--hint);
    font-weight: 600;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Рамка в sidebar */
/* inv-avatar в sidebar (1-в-1 как в профиле) */
.sidebar-avatar .inv-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}
.sidebar-avatar .inv-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sidebar-avatar .frame-box {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 0;
}
.sidebar-avatar .frame-box > .inv-avatar {
    width: 100%;
    height: 100%;
}








/* SIDEBAR_VERSION_V1 */
.sidebar-version-tag {
    display: block;
    text-align: right;
    margin: 16px 18px 14px auto;
    padding: 0;
    background: transparent;
    border: none;
    font-size: 11px;
    font-weight: 400;
    font-style: normal;
    color: #8a8a8e;
    opacity: 0.55;
    letter-spacing: 0.4px;
    user-select: text;
    line-height: 1.2;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
}

/* === v8.1: iOS-only — sidebar без backdrop-filter === */
@supports (-webkit-touch-callout: none) {
    /* Sidebar — solid фон, без blur */
    .sidebar {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        background: #1c1c1e !important;
        transform: translate3d(-100%, 0, 0) !important;
        -webkit-transform: translate3d(-100%, 0, 0) !important;
        will-change: transform !important;
    }
    .sidebar.open {
        transform: translate3d(0, 0, 0) !important;
        -webkit-transform: translate3d(0, 0, 0) !important;
    }
    body.light-theme .sidebar {
        background: #ffffff !important;
    }

    /* Overlay — solid фон */
    .sidebar-overlay {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        background: rgba(0, 0, 0, 0.8) !important;
        will-change: opacity !important;
    }
    .sidebar-overlay.active {
        background: rgba(0, 0, 0, 0.8) !important;
    }
    body.light-theme .sidebar-overlay.active {
        background: rgba(0, 0, 0, 0.5) !important;
    }
}


/* ===== UI_SIDEBAR_GLASS_V1 — стекло для сайдбара ===== */
.sidebar {
    background: rgba(9, 11, 16, 0.72) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.sidebar-overlay {
    background: rgba(0, 0, 0, 0.45) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

.sidebar-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    background: rgba(18, 21, 28, 0.35) !important;
}

.sidebar-section-title {
    color: var(--hint) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.7px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    opacity: 0.7 !important;
}

.sidebar-item {
    background: rgba(18, 21, 28, 0.42) !important;
    backdrop-filter: blur(12px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(160%) !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    margin: 3px 8px !important;
}
.sidebar-item:active,
.sidebar-item.active {
    background: rgba(22, 131, 255, 0.16) !important;
    border-color: rgba(74, 163, 255, 0.32) !important;
}

.sidebar-item-icon,
.sidebar-item-icon svg {
    color: var(--accent) !important;
    filter: drop-shadow(0 0 5px rgba(22, 131, 255, 0.45)) !important;
}

.sidebar-item.active .sidebar-item-icon,
.sidebar-item.active .sidebar-item-icon svg {
    color: var(--accent-soft, #27A8FF) !important;
    filter: drop-shadow(0 0 8px rgba(22, 131, 255, 0.7)) !important;
}

.sidebar-divider {
    background: rgba(255, 255, 255, 0.06) !important;
}
/* ===== /UI_SIDEBAR_GLASS_V1 ===== */

