/**
 * organizer-hub.css — стили раздела «Дела» (Deals / Organizer Hub).
 * Соответствует концепции Reimagined UI (стекломорфизм, радиальные градиенты, cool-toned гамма).
 */

#organizer-hub-view {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow-y: auto;
    background: transparent;
    padding-bottom: 96px; /* отступ под нижний навигационный бар */
}

/* Фоновые свечения */
.ohm-bg-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

.ohm-bg-glow--tl {
    top: -100px;
    left: -100px;
    background: radial-gradient(circle, var(--color-indigo, #6366f1) 0%, transparent 70%);
}

.ohm-bg-glow--br {
    bottom: -100px;
    right: -100px;
    background: radial-gradient(circle, var(--color-emerald, #10b981) 0%, transparent 70%);
}

/* Оболочка содержимого */
.ohm-wrap {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
    box-sizing: border-box;
}

/* Хлебные крошки и шапка */
.ohm-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.ohm-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ohm-back:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(-3px);
}

.ohm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted, #94a3b8);
}

.ohm-crumb-sep {
    font-size: 16px !important;
    color: rgba(255, 255, 255, 0.2);
}

.ohm-crumb-active {
    color: #fff;
}

/* Заголовок */
.ohm-title-row {
    margin-bottom: 16px;
}

.ohm-h1 {
    margin: 0 0 4px 0;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ohm-subtitle {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-indigo, #818cf8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ohm-intro {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary, #cbd5e1);
    max-width: 800px;
    margin: 0 0 36px 0;
    padding: 16px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
}

.ohm-intro strong {
    font-weight: 600;
}

.ohm-em-indigo { color: #818cf8; }
.ohm-em-emerald { color: #34d399; }
.ohm-em-sky { color: #38bdf8; }
.ohm-em-amber { color: #fbbf24; }
.ohm-em-rose { color: #f87171; }

/* Сетка карточек */
.ohm-hero-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.ohm-secondary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .ohm-hero-grid {
        grid-template-columns: 1fr;
    }
    .ohm-secondary-grid {
        grid-template-columns: 1fr;
    }
}

/* Карточки */
.ohm-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    text-align: left;
    color: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.ohm-card-radial {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

/* Эффекты ховера */
.ohm-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.ohm-card:hover .ohm-card-radial {
    opacity: 1;
}

.ohm-card:hover .ohm-card-arrow {
    transform: translate(3px, -3px);
    opacity: 1;
}

/* Градиенты карточек по цветам */
.ohm-card--indigo .ohm-card-radial {
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
}
.ohm-card--emerald .ohm-card-radial {
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.15) 0%, transparent 60%);
}
.ohm-card--sky .ohm-card-radial {
    background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.15) 0%, transparent 60%);
}
.ohm-card--amber .ohm-card-radial {
    background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.15) 0%, transparent 60%);
}
.ohm-card--rose .ohm-card-radial {
    background: radial-gradient(circle at top right, rgba(248, 113, 113, 0.15) 0%, transparent 60%);
}

/* Содержимое карточек */
.ohm-card-head, .ohm-card-secondary-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.ohm-card-secondary-head {
    align-items: center;
    margin-bottom: 8px;
}

.ohm-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ohm-card-icon--small {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.ohm-card-icon span {
    font-size: 24px;
}

.ohm-card-icon--small span {
    font-size: 18px;
}

/* Свечение иконок */
.ohm-card--indigo .ohm-card-icon span { color: #818cf8; }
.ohm-card--emerald .ohm-card-icon span { color: #34d399; }
.ohm-card--sky .ohm-card-icon span { color: #38bdf8; }
.ohm-card--amber .ohm-card-icon span { color: #fbbf24; }
.ohm-card--rose .ohm-card-icon span { color: #f87171; }

.ohm-card-title-wrap {
    flex: 1;
}

.ohm-card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 2px;
}

.ohm-card-title--small {
    font-size: 16px;
    font-weight: 600;
}

.ohm-card-sub {
    font-size: 13px;
    color: var(--text-muted, #94a3b8);
}

.ohm-card-sub--small {
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
    flex: 1;
}

.ohm-card-arrow {
    font-size: 20px !important;
    color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 2;
}

.ohm-card-arrow--small {
    font-size: 18px !important;
}

.ohm-card-stat {
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    width: fit-content;
    margin: 20px 0 12px 0;
    z-index: 2;
    position: relative;
}

.ohm-card-stat--small {
    margin: 0;
}

/* Статус-цвета */
.ohm-card-stat--indigo { color: #a5b4fc; background: rgba(99, 102, 241, 0.15); }
.ohm-card-stat--emerald { color: #a7f3d0; background: rgba(16, 185, 129, 0.15); }
.ohm-card-stat--sky { color: #bae6fd; background: rgba(56, 189, 248, 0.15); }
.ohm-card-stat--amber { color: #fde68a; background: rgba(251, 191, 36, 0.15); }
.ohm-card-stat--rose { color: #fecdd3; background: rgba(248, 113, 113, 0.15); }

.ohm-card-example {
    font-size: 13px;
    font-style: italic;
    color: var(--text-muted, #94a3b8);
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}

/* Специальные разделы */
.ohm-special-subview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    width: 100%;
}

.ohm-loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top-color: var(--color-indigo, #6366f1);
    border-radius: 50%;
    animation: ohm-spin 1s linear infinite;
}

@keyframes ohm-spin {
    to { transform: rotate(360deg); }
}

.ohm-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 60px 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    max-width: 500px;
    margin: 40px auto;
}

.ohm-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.ohm-empty-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.ohm-empty-text {
    font-size: 14px;
    color: var(--text-muted, #94a3b8);
    margin: 0;
    line-height: 1.5;
}

/* Списки покупок и календаря */
.ohm-special-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 600px;
    margin: 20px auto;
}

.ohm-special-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.ohm-special-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

.ohm-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ohm-checkbox:hover {
    border-color: var(--color-indigo, #818cf8);
    background: rgba(99, 102, 241, 0.15);
}

.ohm-special-item-title {
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    flex: 1;
}

.ohm-delete-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.ohm-delete-btn:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

/* Календарь */
.ohm-calendar-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 600px;
    margin: 20px auto;
}

.ohm-calendar-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ohm-calendar-group-header {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-sky, #38bdf8);
    border-left: 3px solid var(--color-sky, #38bdf8);
    padding-left: 10px;
}

.ohm-calendar-group-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ohm-special-item-time {
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
    margin-top: 4px;
}

/* Страница ошибки */
.ohm-error-message {
    padding: 24px;
    border-radius: 16px;
    background: rgba(248, 113, 113, 0.05);
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: #f87171;
    text-align: center;
    max-width: 500px;
    margin: 40px auto;
}

/* Auth Prompt */
.ohm-auth-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 400px;
    padding: 40px 24px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.ohm-auth-icon {
    font-size: 64px !important;
    color: var(--color-indigo, #818cf8);
    margin-bottom: 24px;
    background: rgba(99, 102, 241, 0.08);
    padding: 20px;
    border-radius: 50%;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.ohm-auth-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.ohm-auth-text {
    font-size: 15px;
    color: var(--text-muted, #94a3b8);
    max-width: 400px;
    line-height: 1.5;
}

/* Переопределяем фиксированное позиционирование для легаси видов при монтировании внутрь Органайзера */
#organizer-hub-view .tm-view,
#organizer-hub-view .np-view,
#organizer-hub-view .rm-view {
    position: static !important;
    z-index: auto !important;
    inset: auto !important;
    display: block !important;
    background: transparent !important;
}

#organizer-hub-view .tm-view::before,
#organizer-hub-view .np-view::before,
#organizer-hub-view .rm-view::before {
    display: none !important;
}

#organizer-hub-view .tm-glow,
#organizer-hub-view .np-glow,
#organizer-hub-view .rm-glow {
    display: none !important;
}

#organizer-hub-view .tm-wrap,
#organizer-hub-view .np-wrap,
#organizer-hub-view .rm-wrap {
    padding-top: 20px !important;
    padding-bottom: 40px !important;
}

/* Скрываем дублирующиеся заголовки заметок в хабе */
#organizer-hub-view .np-title,
#organizer-hub-view .np-subtitle {
    display: none !important;
}

/* Оформление заметок в стиле glassmorphism Органайзера */
#organizer-hub-view .np-note,
#organizer-hub-view .np-ki-card {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 18px !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 18px 20px !important;
}

#organizer-hub-view .np-note:hover,
#organizer-hub-view .np-ki-card:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Цветные границы акцентов для заметок */
#organizer-hub-view .np-note[data-color="rose"] { border-left: 3px solid #f43f5e !important; }
#organizer-hub-view .np-note[data-color="amber"] { border-left: 3px solid #f59e0b !important; }
#organizer-hub-view .np-note[data-color="emerald"] { border-left: 3px solid #10b981 !important; }
#organizer-hub-view .np-note[data-color="sky"] { border-left: 3px solid #0ea5e9 !important; }
#organizer-hub-view .np-note[data-color="violet"] { border-left: 3px solid #8b5cf6 !important; }

/* Форма создания заметок */
#organizer-hub-view .np-create-form {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 18px !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    padding: 20px !important;
    margin-bottom: 24px !important;
}

#organizer-hub-view .np-create-textarea {
    background: rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    color: #fff !important;
}

#organizer-hub-view .np-create-textarea:focus {
    border-color: rgba(99, 102, 241, 0.4) !important;
}

/* Табы заметок */
#organizer-hub-view .np-tab {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    color: var(--text-muted, #94a3b8) !important;
}

#organizer-hub-view .np-tab:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
}

#organizer-hub-view .np-tab.active {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
    color: #818cf8 !important;
}

/* Поиск и кнопка создания */
#organizer-hub-view .np-search {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 14px !important;
    color: #fff !important;
}

#organizer-hub-view .np-search:focus {
    border-color: rgba(99, 102, 241, 0.4) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

#organizer-hub-view .np-create-btn {
    background: var(--accent-gradient, linear-gradient(135deg, #6366f1 0%, #a855f7 100%)) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
}

#organizer-hub-view .np-create-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4) !important;
}

/* ═══════════════════════════════════════════════════════════════
   СВЕТЛАЯ ТЕМА — единый рецепт (белые карточки + тёмный текст).
   Текст на var(--text-*) уже тёмный (themed). Здесь — контейнеры
   и захардкоженные #fff. Акцентные цвета иконок/статов не трогаем.
   ═══════════════════════════════════════════════════════════════ */

/* — Заголовок (градиентный текст → невидим над светлым небом) — */
html[data-mode="light"] #organizer-hub-view .ohm-h1 {
    background: none;
    -webkit-text-fill-color: #1e293b;
    color: #1e293b;
    text-shadow: 0 1px 14px rgba(255, 255, 255, 0.5);
}
html[data-mode="light"] #organizer-hub-view .ohm-subtitle {
    color: #4f46e5;
    text-shadow: 0 1px 8px rgba(255, 255, 255, 0.5);
}
html[data-mode="light"] #organizer-hub-view .ohm-intro {
    background: rgba(255, 255, 255, 0.55);
    text-shadow: none;
}
html[data-mode="light"] #organizer-hub-view .ohm-crumb-active {
    color: rgba(15, 23, 42, 0.85);
}
html[data-mode="light"] #organizer-hub-view .ohm-crumb-sep {
    color: rgba(15, 23, 42, 0.3);
}

/* — Карточки → белые, базовый текст → тёмный — */
html[data-mode="light"] #organizer-hub-view .ohm-card,
html[data-mode="light"] #organizer-hub-view .ohm-special-item,
html[data-mode="light"] #organizer-hub-view .ohm-empty-state {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(0, 0, 0, 0.08);
    color: rgba(15, 23, 42, 0.88);
}
html[data-mode="light"] #organizer-hub-view .ohm-card:hover {
    border-color: rgba(0, 0, 0, 0.16);
}
html[data-mode="light"] #organizer-hub-view .ohm-card-icon {
    background: rgba(15, 23, 42, 0.05);
}
html[data-mode="light"] #organizer-hub-view .ohm-card-arrow {
    color: rgba(15, 23, 42, 0.3);
}
html[data-mode="light"] #organizer-hub-view .ohm-special-item-title,
html[data-mode="light"] #organizer-hub-view .ohm-auth-title {
    color: rgba(15, 23, 42, 0.9);
}

/* — «Назад» pill — */
html[data-mode="light"] #organizer-hub-view .ohm-back {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(15, 23, 42, 0.8);
}

