﻿/* ============================================================
   OnlygramV1 - Telegram Desktop Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
    /* === Telegram palette === */
    --bg-app:          #0e1621;
    --bg-sidebar:      #17212b;
    --bg-panel:        #182533;
    --bg-elevated:     #182533;
    --bg-hover:        rgba(255, 255, 255, 0.04);
    --bg-active:       #2b5278;

    --border-subtle:   rgba(255, 255, 255, 0.04);
    --border-soft:     rgba(255, 255, 255, 0.05);
    --border-strong:   rgba(255, 255, 255, 0.08);

    --text-primary:    #ffffff;
    --text-secondary:  #8b9bb0;
    --text-tertiary:   #6d7f93;
    --text-muted:      #6d7f93;

    --accent:          #3390ec;
    --accent-soft:     rgba(51, 144, 236, 0.15);
    --accent-glow:     rgba(51, 144, 236, 0.25);
    --accent-2:        #3390ec;

    --success:         #4ade80;
    --warning:         #f59e0b;
    --danger:          #ff5f56;

    /* === Effects (minimal) === */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.12);
    --shadow-md: none;
    --shadow-lg: none;

    /* === Geometry === */
    --radius-sm:   12px;
    --radius:      12px;
    --radius-lg:   18px;
    --radius-xl:   18px;
    --radius-search: 22px;
    --radius-input:  26px;

    --sidebar-w:     290px;
    --sidebar-w-sm:  72px;
    --chatlist-w:    290px;

    /* === Spacing === */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;

    /* === Motion === */
    --ease: ease;
    --dur-fast: 150ms;
    --dur:      150ms;
    --dur-slow: 150ms;

    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}
html:has(.og-app), html:has(.og-app) body {
    height: 100%;
    overflow: hidden;
    background: transparent;
}
html {
    font-family: var(--font-sans);
}
body {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-app);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }
kbd {
    font-family: var(--font-sans);
    font-size: 11px;
    padding: 2px 6px;
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    color: var(--text-secondary);
}

/* Scrollbars Telegram */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

/* ============================================================
   App layout
   ============================================================ */
.og-app-bg {
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(14, 17, 22, 0.3), rgba(14, 17, 22, 0.3)),
        var(--og-page-bg, url('../img/bg.png')) center center / cover no-repeat;
    pointer-events: none;
    z-index: 0;
}

.og-app {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    height: 100vh;
    background: transparent;
    transition: grid-template-columns var(--dur-fast) var(--ease);
}

.og-app.is-collapsed {
    grid-template-columns: var(--sidebar-w-sm) 1fr;
}
.og-app.is-collapsed .og-brand__text,
.og-app.is-collapsed .og-nav__text,
.og-app.is-collapsed .og-nav__label,
.og-app.is-collapsed .og-nav__badge,
.og-app.is-collapsed .og-user__info,
.og-app.is-collapsed .og-sidebar__search input {
    display: none;
}
.og-app.is-collapsed .og-sidebar__search {
    margin: var(--sp-2);
    padding: 0;
    justify-content: center;
    background: transparent;
}
.og-app.is-collapsed .og-sidebar__search svg { margin: 0; }
.og-app.is-collapsed .og-nav__item {
    justify-content: center;
    padding: 10px;
}
.og-app.is-collapsed .og-sidebar__brand {
    justify-content: center;
    padding: 0 var(--sp-2);
}
.og-app.is-collapsed .og-brand {
    display: none;
}

/* ============================================================
   Sidebar
   ============================================================ */
.og-sidebar {
    background: rgba(23, 33, 43, 1);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* --- Header --- */
.og-sidebar__brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 10px var(--sp-4);
    gap: var(--sp-3);
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-subtle);
}
.og-brand {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    min-width: 0;
}
.og-brand__mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.og-brand__mark img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.og-brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0;
}
.og-brand__name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.3;
}
.og-brand__sub {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Hamburger */
.og-sidebar__toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: background var(--dur-fast) var(--ease);
}
.og-sidebar__toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}
.og-sidebar__toggle svg {
    stroke-width: 1.8;
}

.og-sidebar__brand .og-brand {
    flex: 1;
    min-width: 0;
}

/* --- Search --- */
.og-sidebar__search {
    margin: 10px;
    height: 42px;
    padding: 0 18px;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    border-radius: var(--radius-search);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    flex-shrink: 0;
    transition: background var(--dur-fast) var(--ease);
}
.og-sidebar__search:focus-within {
    background: rgba(255, 255, 255, 0.08);
}
.og-sidebar__search svg {
    color: var(--text-secondary);
    flex-shrink: 0;
    stroke-width: 1.8;
}
.og-sidebar__search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 13px;
    min-width: 0;
}
.og-sidebar__search input::placeholder { color: var(--text-tertiary); }

/* --- Navigation --- */
.og-sidebar__nav {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.og-nav {
    padding: var(--sp-2);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.og-nav--main {
    flex: 1;
    overflow-y: auto;
}

.og-nav--footer {
    flex-shrink: 0;
    border-top: 1px solid var(--border-subtle);
    padding-top: var(--sp-2);
    margin-top: auto;
}
.og-nav__item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: 10px var(--sp-3);
    border-radius: var(--radius-sm);
    margin: 2px var(--sp-1);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 400;
    transition: all var(--dur-fast) var(--ease);
}
.og-nav__item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.og-nav__item:hover .og-nav__icon { color: var(--text-primary); }
.og-nav__item:active { transform: scale(0.98); }

.og-nav__item.is-active {
    background: var(--bg-active);
    color: var(--text-primary);
}
.og-nav__item.is-active .og-nav__icon { color: var(--text-primary); }

.og-nav__icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: color var(--dur-fast) var(--ease);
}
.og-nav__icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
}

.og-nav__text { flex: 1; min-width: 0; }

.og-nav__badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--bg-panel);
    color: var(--text-secondary);
    min-width: 20px;
    text-align: center;
}
.og-nav__badge--accent {
    background: var(--accent);
    color: white;
}
.og-nav__badge--new {
    background: var(--success);
    color: var(--bg-app);
    font-size: 10px;
    letter-spacing: 0.04em;
}

/* --- User footer --- */
.og-sidebar__user {
    border-top: 1px solid var(--border-subtle);
    padding: var(--sp-3);
    flex-shrink: 0;
}
.og-user {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-1) var(--sp-2);
    border-radius: var(--radius-sm);
    transition: background var(--dur-fast) var(--ease);
    cursor: pointer;
}
.og-user:hover { background: var(--bg-hover); }
.og-user__avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.og-user__avatar {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 12px;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}
.og-user__avatar-img,
.og-hero-profile__avatar-img,
.og-settings-telegram__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}
.og-user__status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success);
    border: 2px solid var(--bg-sidebar);
}
.og-user__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0;
}
.og-user__name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}
.og-user__role {
    font-size: 12px;
    color: var(--text-secondary);
}
.og-user__menu {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--text-secondary);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: all var(--dur-fast) var(--ease);
}
.og-user__menu:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}
.og-user__menu svg { stroke-width: 1.8; }

/* ============================================================
   Main content area
   ============================================================ */
.og-main {
    display: grid;
    grid-template-columns: var(--chatlist-w) 1fr;
    height: 100vh;
    overflow: hidden;
}

/* --- Chat list panel --- */
.og-chatlist {
    background: rgba(23, 33, 43, 1);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.og-chatlist__header {
    height: 58px;
    padding: 0 var(--sp-4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}
.og-chatlist__title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}
.og-chatlist__sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}
.og-chatlist__tabs {
    display: flex;
    gap: var(--sp-1);
    padding: var(--sp-2) var(--sp-3);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}
.og-tab {
    padding: 6px var(--sp-3);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--dur-fast) var(--ease);
}
.og-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.og-tab.is-active {
    background: var(--bg-active);
    color: var(--text-primary);
}
.og-tab:active { transform: scale(0.98); }

.og-chatlist__list {
    flex: 1;
    overflow-y: auto;
    padding: var(--sp-1) 0;
}

.og-chat-item {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-2);
    padding: 7px 10px;
    margin: 1px var(--sp-2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease);
}
.og-chat-item:hover { background: var(--bg-hover); }
.og-chat-item.is-active { background: var(--bg-active); }
.og-chat-item:active { transform: scale(0.98); }

.og-chat-item__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-panel);
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    flex-shrink: 0;
    overflow: hidden;
    object-fit: cover;
}
.og-chat-item__avatar--g1 { background: #e17076; }
.og-chat-item__avatar--g2 { background: #7bc862; }
.og-chat-item__avatar--g3 { background: #e5ca77; }
.og-chat-item__avatar--g4 { background: #65aadd; }
.og-chat-item__avatar--g5 { background: #a695e7; }
.og-chat-item__avatar--g6 { background: #ee7aae; }
.og-chat-item__avatar--g7 { background: #6ec9cb; }
.og-chat-item__avatar--g8 { background: #faa774; }
.og-chat-item__avatar--g9 { background: #98c379; }

.og-chat-item__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 2px;
}
.og-chat-item__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
}
.og-chat-item__name {
    font-weight: 600;
    font-size: 13px;
    line-height: 1.25;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.og-chat-item__time {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-tertiary);
    opacity: 0.55;
    flex-shrink: 0;
}
.og-chat-item__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
}
.og-chat-item__preview {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.og-chat-item__preview b { color: var(--text-primary); font-weight: 600; opacity: 1; }
.og-chat-item__unread {
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
    flex-shrink: 0;
}
.og-chat-item__unread--muted {
    background: var(--bg-panel);
    color: var(--text-secondary);
}

/* ============================================================
   Right content (dashboard, etc.)
   ============================================================ */
.og-content {
    background: rgba(14, 22, 33, 0.30);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.og-topbar {
    height: 60px;
    padding: 0 var(--sp-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-soft);
    background: #18212b;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}
.og-topbar__title {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}
.og-topbar__title h1 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}
.og-topbar__title span {
    font-size: 12px;
    color: var(--text-secondary);
}
.og-topbar__actions {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

/* Buttons */
.og-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-panel);
    border: none;
    transition: all var(--dur-fast) var(--ease);
}
.og-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.og-btn:active { transform: scale(0.98); }
.og-btn svg { stroke-width: 1.8; }

.og-btn--primary {
    background: var(--accent);
    color: white;
}
.og-btn--primary:hover {
    background: #4da3f0;
    color: white;
}

.og-btn--icon {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    background: transparent;
}
.og-btn--icon:hover {
    background: rgba(255, 255, 255, 0.05);
}

.og-btn--sm {
    font-size: 12px;
}

.og-page {
    flex: 1;
    padding: var(--sp-4) var(--sp-5);
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}
.og-page--flex {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    max-width: none;
    margin: 0;
    padding: 0;
}

.og-content:has(.og-page--flex) {
    overflow: hidden;
}

.og-hero {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px var(--sp-5);
    margin-bottom: var(--sp-4);
}
.og-hero__eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: var(--sp-2);
    opacity: 0.75;
}
.og-hero h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}
.og-hero p {
    margin: var(--sp-2) 0 0;
    color: var(--text-secondary);
    font-size: 13px;
    opacity: 0.75;
    max-width: 60ch;
}

/* Cards */
.og-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--sp-3);
    margin-bottom: var(--sp-6);
}
.og-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 14px;
    transition: background var(--dur-fast) var(--ease);
}
.og-card:hover {
    background: rgba(24, 37, 51, 0.9);
}
.og-card__icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    margin-bottom: var(--sp-3);
}
.og-card__icon svg { stroke-width: 1.8; }
.og-card__label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: var(--sp-1);
    opacity: 0.75;
}
.og-card__value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: var(--sp-1);
}
.og-card__trend {
    font-size: 12px;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: var(--sp-1);
    opacity: 0.85;
}
.og-card__trend--down { color: var(--danger); }

.og-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.og-panel__header {
    padding: 14px var(--sp-4);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.og-panel__title {
    font-weight: 600;
    font-size: 14px;
    margin: 0;
}
.og-panel__body { padding: var(--sp-1); }

.og-activity-item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: 10px var(--sp-3);
    margin: 2px var(--sp-1);
    border-radius: var(--radius-sm);
    transition: background var(--dur-fast) var(--ease);
}
.og-activity-item:hover { background: var(--bg-hover); }
.og-activity-item__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}
.og-activity-item__dot--success { background: var(--success); }
.og-activity-item__dot--warning { background: var(--warning); }
.og-activity-item__body { flex: 1; min-width: 0; }
.og-activity-item__title {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-primary);
}
.og-activity-item__meta {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
    opacity: 0.55;
}

/* Solo layout (sans chatlist) */
.og-main--solo {
    grid-template-columns: 1fr;
}

/* Messages thread */
.og-thread {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    padding-bottom: var(--sp-4);
    min-height: 400px;
}
.og-page--flex .og-thread {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: var(--sp-4) var(--sp-5);
}
.og-msg {
    display: flex;
    flex-direction: column;
    max-width: 680px;
    gap: 4px;
}
.og-msg--them { align-self: flex-start; }
.og-msg--me { align-self: flex-end; align-items: flex-end; }
.og-msg__bubble {
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.4;
}
.og-msg--them .og-msg__bubble {
    background: var(--bg-panel);
}
.og-msg--me .og-msg__bubble {
    background: var(--bg-active);
}
.og-msg__time {
    font-size: 11px;
    color: var(--text-tertiary);
    opacity: 0.55;
    padding: 0 4px;
}
.og-chat-footer {
    flex-shrink: 0;
    padding: 0;
    border-top: 1px solid var(--border-subtle);
}
.og-message-input {
    display: block;
    width: 100%;
    height: 56px;
    border-radius: 0;
    background: #18212b;
    border: none;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0 var(--sp-5);
    font-size: 14px;
    outline: none;
}
.og-message-input:focus {
    background: #1e2c3a;
}
.og-message-input::placeholder { color: var(--text-tertiary); }

/* Tables */
.og-table-wrap { overflow-x: auto; }
.og-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.og-table th {
    text-align: left;
    padding: 10px var(--sp-4);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0.75;
    border-bottom: 1px solid var(--border-subtle);
}
.og-table td {
    padding: 12px var(--sp-4);
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
}
.og-table tbody tr:hover { background: var(--bg-hover); }
.og-table__muted { color: var(--text-secondary); opacity: 0.75; }
.og-table__user {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}
.og-table__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}
.og-code {
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--accent);
}

/* Status badges */
.og-status {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    text-transform: capitalize;
}
.og-status--online, .og-status--running {
    background: rgba(74, 222, 128, 0.12);
    color: var(--success);
}
.og-status--offline, .og-status--paused {
    background: rgba(139, 155, 176, 0.12);
    color: var(--text-secondary);
}
.og-status--error {
    background: rgba(255, 95, 86, 0.12);
    color: var(--danger);
}
.og-status--away {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

/* Settings */
.og-panel--spaced { margin-bottom: var(--sp-4); }
.og-settings-list { padding: var(--sp-1) 0; }
.og-settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px var(--sp-4);
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--dur-fast) var(--ease);
}
.og-settings-item:last-child { border-bottom: none; }
.og-settings-item:hover { background: var(--bg-hover); }
.og-settings-item__label {
    font-size: 13px;
    color: var(--text-primary);
}
.og-settings-item__value {
    font-size: 13px;
    color: var(--text-secondary);
}
.og-settings-item__value--mono {
    font-family: var(--font-sans);
    font-size: 12px;
    letter-spacing: 0.02em;
}

/* Empty states */
.og-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--sp-8) var(--sp-5);
    min-height: 200px;
}
.og-empty--compact {
    min-height: 160px;
    padding: var(--sp-6) var(--sp-4);
}
.og-empty--thread {
    flex: 1;
    min-height: 280px;
}
.og-empty__title {
    margin: 0 0 var(--sp-2);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.og-empty__text {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 320px;
    line-height: 1.5;
}

.og-message-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Media grid */
.og-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--sp-3);
}
.og-media-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: background var(--dur-fast) var(--ease);
    cursor: pointer;
}
.og-media-card:hover { background: rgba(24, 37, 51, 0.9); }
.og-media-card__thumb {
    height: 100px;
    display: grid;
    place-items: center;
    color: white;
    opacity: 0.85;
}
.og-media-card__thumb svg {
    width: 28px;
    height: 28px;
    stroke-width: 1.8;
}
.og-media-card__body {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.og-media-card__name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.og-media-card__meta {
    font-size: 11px;
    color: var(--text-tertiary);
    opacity: 0.75;
}

/* Teams */
.og-team-item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: 10px var(--sp-3);
    margin: 2px var(--sp-1);
    border-radius: var(--radius-sm);
    transition: background var(--dur-fast) var(--ease);
}
.og-team-item:hover { background: var(--bg-hover); }
.og-team-item__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}
.og-team-item__body { flex: 1; min-width: 0; }
.og-team-item__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
}
.og-team-item__name {
    font-size: 15px;
    font-weight: 600;
}
.og-team-item__meta {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.75;
    margin-top: 2px;
}

.og-creator-slots {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(139, 155, 176, 0.12);
    border: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.og-creator-slots__full {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
}

.og-creator-list {
    padding: var(--sp-2) var(--sp-3) var(--sp-4);
}
.og-creator-item {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-2);
    padding: var(--sp-3);
}
.og-creator-item__row {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    width: 100%;
}
.og-creator-item__avatar {
    background: linear-gradient(145deg, var(--accent-soft), rgba(42, 171, 238, 0.08));
    color: var(--accent);
    overflow: hidden;
}
.og-creator-item__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}
.og-creator-item__actions {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    flex-shrink: 0;
    margin-left: auto;
    align-self: center;
}
.og-creator-item__actions .og-status {
    flex-shrink: 0;
    white-space: nowrap;
}
.og-creator-item__actions .og-btn {
    min-width: 52px;
}

/* Creator subscription expiry strip (30-day bar) */
.og-creator-expiry {
    --lc-accent: var(--success);
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--sp-3);
    width: 100%;
    padding: 8px var(--sp-3);
    margin-top: 2px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--lc-accent);
    border-radius: var(--radius-sm);
}

.og-creator-expiry--ok       { --lc-accent: var(--success); }
.og-creator-expiry--warn     { --lc-accent: var(--warning); }
.og-creator-expiry--danger   { --lc-accent: var(--danger); }
.og-creator-expiry--expired  { --lc-accent: var(--danger); }
.og-creator-expiry--lifetime { --lc-accent: var(--accent); }

.og-creator-expiry__label {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.og-creator-expiry__value {
    font-size: 13px;
    font-weight: 600;
    color: var(--lc-accent);
    white-space: nowrap;
}

.og-creator-expiry__bar {
    flex: 1 1 auto;
    min-width: 60px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.og-creator-expiry__bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--lc-accent);
    transition: width var(--dur-slow) var(--ease);
}

.og-creator-expiry__renew {
    flex-shrink: 0;
    margin-left: auto;
}

@media (max-width: 640px) {
    .og-creator-expiry {
        flex-wrap: wrap;
    }

    .og-creator-expiry__bar {
        flex: 1 1 100%;
        order: 3;
    }

    .og-creator-expiry__renew {
        margin-left: 0;
    }
}

.og-settings--single {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    max-width: 640px;
}
.og-tg-modal__head .og-tg-modal__sub {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
    text-align: center;
}
.og-tg-modal__panel--edit {
    border-radius: 8px;
    width: min(560px, 100%);
}
.og-tg-modal__panel--edit .og-tg-modal__head {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.og-bot-info {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: var(--sp-3) var(--sp-4);
    background: rgba(0, 0, 0, 0.18);
}
.og-bot-info[hidden] {
    display: none;
}
.og-bot-info__label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: var(--sp-3);
}
.og-bot-info__rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: var(--sp-3);
}
.og-bot-info__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    font-size: 13px;
}
.og-bot-info__key {
    color: var(--text-secondary);
}
.og-bot-info__val {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}
.og-bot-info__caps {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.og-bot-info__cap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
}
.og-bot-info__cap-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.og-bot-info__cap.is-on {
    color: var(--success);
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.25);
}
.og-bot-info__cap.is-on .og-bot-info__cap-dot {
    background: var(--success);
}
.og-bot-info__cap.is-off {
    color: var(--text-tertiary);
    background: rgba(139, 155, 176, 0.08);
}
.og-bot-info__cap.is-off .og-bot-info__cap-dot {
    background: var(--text-tertiary);
    opacity: 0.5;
}

.og-creator-edit-danger {
    margin: var(--sp-4) var(--sp-5) var(--sp-5);
    padding: var(--sp-4) var(--sp-4) var(--sp-3);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}
.og-creator-edit-danger__text {
    margin: 0 0 var(--sp-4);
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.5;
}
.og-tg-modal__foot.og-tg-modal__foot--single {
    display: flex;
    justify-content: center;
    align-items: center;
    grid-template-columns: none;
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}
.og-tg-modal__foot.og-tg-modal__foot--single .og-tg-modal__btn {
    flex: 0 0 auto;
    min-width: 160px;
    border-radius: 8px;
}
.og-readonly .og-creator-item__actions {
    display: none;
}
.og-readonly .og-creator-edit-danger {
    display: none;
}
.og-panel__count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 2px 8px;
    margin-left: 6px;
    border-radius: 999px;
    background: rgba(139, 155, 176, 0.12);
    vertical-align: middle;
}

/* Responsive */
@media (max-width: 1100px) {
    .og-main { grid-template-columns: 0 1fr; }
    .og-chatlist { display: none; }
}
@media (max-width: 768px) {
    .og-app { grid-template-columns: var(--sidebar-w-sm) 1fr; }
    .og-nav__text, .og-nav__label, .og-brand__text, .og-user__info, .og-user__menu,
    .og-sidebar__search input { display: none; }
    .og-sidebar__search {
        margin: var(--sp-2);
        padding: 0;
        justify-content: center;
        background: transparent;
    }
}

@keyframes og-fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   OnlygramV1 - Login page
   ============================================================ */

.og-auth-body {
    overflow: auto;
    min-height: 100vh;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    position: relative;
    background: #0e111600;
}

/* ===== Fond plein écran ===== */
.og-auth-bg {
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(14, 17, 22, 0.55), rgba(14, 17, 22, 0.55)),
        url("../img/bg.png") center center / cover no-repeat;
    pointer-events: none;
    z-index: 0;
}

/* ===== Layout shell ===== */
.og-auth-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 980px;
    background: rgba(20, 24, 31, 0.7);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    box-shadow:
        0 24px 80px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255,255,255,0.04),
        inset 0 1px 0 rgba(255,255,255,0.06);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 540px;
}

/* ===== Carte login (gauche) ===== */
.og-auth-card {
    padding: 44px 48px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.og-auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
    width: fit-content;
    transition: opacity var(--dur) var(--ease);
}
.og-auth-brand:hover { opacity: 0.85; }
.og-auth-brand .og-brand__mark {
    width: 42px; height: 42px;
    filter: drop-shadow(0 6px 20px rgba(123,97,255,0.4));
}
.og-auth-brand .og-brand__name { font-size: 18px; }

.og-auth-head { margin-bottom: 32px; }
.og-auth-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    padding: 5px 10px;
    background: var(--accent-soft);
    border-radius: 999px;
    margin-bottom: 16px;
}
.og-auth-title {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
    background: linear-gradient(180deg, #fff 0%, #b8bdca 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.og-auth-sub {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== Alerte ===== */
.og-auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 20px;
    animation: og-fade-up 0.35s var(--ease);
}
.og-auth-alert--error {
    background: rgba(244, 63, 94, 0.08);
    border: 1px solid rgba(244, 63, 94, 0.25);
    color: #fda4b4;
}
.og-auth-alert--error svg { color: var(--danger); flex-shrink: 0; margin-top: 1px; }

/* ===== Form ===== */
.og-auth-form { display: flex; flex-direction: column; gap: 18px; }

.og-field { display: flex; flex-direction: column; gap: 8px; }
.og-field__label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.og-field__label svg { color: var(--text-tertiary); }

.og-field__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.og-field__input {
    width: 100%;
    padding: 14px 50px 14px 16px;
    background: rgba(14, 17, 22, 0.6);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: all var(--dur) var(--ease);
}
.og-field__input::placeholder {
    color: var(--text-muted);
    letter-spacing: 0.05em;
}
.og-field__input:hover { border-color: var(--border-strong); }
.og-field__input:focus {
    border-color: var(--accent);
    background: rgba(14, 17, 22, 0.85);
    box-shadow:
        0 0 0 4px var(--accent-soft),
        0 8px 24px rgba(123,97,255,0.15);
}
.og-field__input--mono {
    font-family: var(--font-sans);
    font-size: 14px;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.og-field__action {
    position: absolute;
    right: 8px;
    width: 32px; height: 32px;
    display: grid; place-items: center;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    transition: all var(--dur-fast) var(--ease);
}
.og-field__action:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.og-field__hint {
    font-size: 11.5px;
    color: var(--text-tertiary);
    padding-left: 2px;
}

/* ===== Row (remember + lien) ===== */
.og-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: -4px;
}

.og-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    position: relative;
}
.og-checkbox input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}
.og-checkbox__box {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.18);
    background: rgba(14, 22, 33, 0.85);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: transparent;
    transition:
        background var(--dur-fast) var(--ease),
        border-color var(--dur-fast) var(--ease),
        box-shadow var(--dur-fast) var(--ease),
        transform var(--dur-fast) var(--ease);
}
.og-checkbox__box::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    margin-top: -2px;
    transition: transform var(--dur-fast) var(--ease);
}
.og-checkbox:hover .og-checkbox__box {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(24, 37, 51, 0.95);
}
.og-checkbox input:focus-visible + .og-checkbox__box {
    box-shadow: 0 0 0 3px var(--accent-soft);
    border-color: var(--accent);
}
.og-checkbox input:checked + .og-checkbox__box {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 2px 10px var(--accent-glow);
}
.og-checkbox input:checked + .og-checkbox__box::after {
    transform: rotate(45deg) scale(1);
}
.og-checkbox:active .og-checkbox__box {
    transform: scale(0.92);
}
.og-checkbox__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.35;
    transition: color var(--dur-fast) var(--ease);
}
.og-checkbox:hover .og-checkbox__label,
.og-checkbox:has(input:checked) .og-checkbox__label {
    color: var(--text-primary);
}

/* Tuile (grille permissions Teams) */
.og-checkbox--tile {
    position: relative;
    width: 100%;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
    transition:
        background var(--dur-fast) var(--ease),
        border-color var(--dur-fast) var(--ease);
}
.og-checkbox--tile-rec {
    padding-top: 16px;
}
.og-checkbox--tile:hover {
    background: var(--bg-hover);
    border-color: var(--border-soft);
}
.og-checkbox--tile:has(input:checked) {
    background: var(--accent-soft);
    border-color: rgba(51, 144, 236, 0.42);
}
.og-checkbox--tile:has(input:checked):hover {
    background: rgba(51, 144, 236, 0.18);
}
.og-checkbox--tile .og-checkbox__label {
    flex: 1;
    min-width: 0;
}

.og-perm-badge {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 999px;
    background: #243447;
    color: #6eb6ff;
    border: 1px solid rgba(51, 144, 236, 0.45);
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}
.og-checkbox--tile:has(input:checked) .og-perm-badge {
    background: var(--accent);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 10px var(--accent-glow);
}

/* Bannière (option pleine largeur) */
.og-checkbox--banner {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
    transition:
        background var(--dur-fast) var(--ease),
        border-color var(--dur-fast) var(--ease);
}
.og-checkbox--banner:hover {
    background: var(--bg-hover);
}
.og-checkbox--banner:has(input:checked) {
    background: var(--accent-soft);
    border-color: rgba(51, 144, 236, 0.42);
}
.og-checkbox--banner .og-checkbox__label {
    flex: 1;
}

.og-auth-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-2);
    transition: color var(--dur-fast) var(--ease);
}
.og-auth-link:hover { color: #74c3ff; text-decoration: underline; text-underline-offset: 3px; }

/* ===== Submit ===== */
.og-auth-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    margin-top: 4px;
    background: linear-gradient(135deg, var(--accent) 0%, #6650e8 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    overflow: hidden;
    transition: all var(--dur) var(--ease);
    box-shadow:
        0 8px 24px var(--accent-glow),
        inset 0 1px 0 rgba(255,255,255,0.2);
}
.og-auth-submit::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.7s var(--ease);
}
.og-auth-submit:hover {
    transform: translateY(-1px);
    box-shadow:
        0 12px 32px var(--accent-glow),
        inset 0 1px 0 rgba(255,255,255,0.25);
}
.og-auth-submit:hover::before { transform: translateX(100%); }
.og-auth-submit:active { transform: translateY(0); }
.og-auth-submit__icon { transition: transform var(--dur) var(--ease); }
.og-auth-submit:hover .og-auth-submit__icon { transform: translateX(3px); }

.og-auth-submit__spinner {
    display: none;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: og-spin 0.7s linear infinite;
}
@keyframes og-spin { to { transform: rotate(360deg); } }

.og-auth-submit.is-loading .og-auth-submit__label,
.og-auth-submit.is-loading .og-auth-submit__icon { display: none; }
.og-auth-submit.is-loading .og-auth-submit__spinner { display: block; }
.og-auth-submit.is-loading { cursor: wait; }

/* ===== Divider ===== */
.og-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 16px;
    color: var(--text-tertiary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.og-auth-divider::before,
.og-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-soft), transparent);
}

.og-btn--ghost {
    background: transparent;
    border: 1px solid var(--border-soft);
    color: var(--text-secondary);
}
.og-btn--ghost:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
    color: var(--text-primary);
}
.og-btn--block { width: 100%; justify-content: center; padding: 12px; }

/* ===== Footer auth ===== */
.og-auth-foot {
    margin-top: auto;
    padding-top: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 11.5px;
    color: var(--text-tertiary);
    flex-wrap: wrap;
}
.og-auth-foot__links {
    display: flex;
    align-items: center;
    gap: 8px;
}
.og-auth-foot__links a {
    color: var(--text-tertiary);
    transition: color var(--dur-fast) var(--ease);
}
.og-auth-foot__links a:hover { color: var(--text-primary); }
.og-dot { opacity: 0.5; }

/* ===== Panel droite (marketing) ===== */
.og-auth-aside {
    position: relative;
    padding: 44px 48px;
    background:
        radial-gradient(ellipse 80% 60% at 100% 0%, rgba(63,169,245,0.12), transparent 60%),
        radial-gradient(ellipse 80% 60% at 0% 100%, rgba(123,97,255,0.15), transparent 60%),
        linear-gradient(180deg, rgba(24,29,38,0.6), rgba(14,17,22,0.85));
    border-left: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    overflow: hidden;
}
.og-auth-aside::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
    background-size: 20px 20px;
    opacity: 0.6;
    pointer-events: none;
}
.og-auth-aside__inner {
    position: relative;
    z-index: 1;
    width: 100%;
}

.og-auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(45, 212, 191, 0.1);
    border: 1px solid rgba(45, 212, 191, 0.25);
    color: var(--success);
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 999px;
    margin-bottom: 28px;
}
.og-auth-badge__dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.5);
    animation: og-pulse 2s infinite;
}
@keyframes og-pulse {
    0% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(45, 212, 191, 0); }
    100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); }
}

.og-auth-headline {
    margin: 0 0 16px;
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text-primary);
}
.og-auth-headline em {
    font-style: normal;
    background: linear-gradient(135deg, #7B61FF 0%, #3FA9F5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}
.og-auth-lede {
    margin: 0 0 32px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    max-width: 42ch;
}

.og-auth-feats {
    list-style: none;
    margin: 0 0 36px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.og-auth-feats li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.og-auth-feats__icon {
    width: 24px; height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid; place-items: center;
    margin-top: 1px;
}
.og-auth-feats li strong {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.og-auth-feats li span {
    font-size: 12.5px;
    color: var(--text-tertiary);
    line-height: 1.5;
}

.og-auth-quote {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(14, 17, 22, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}
.og-auth-quote__avatars {
    display: flex;
}
.og-auth-quote__avatars span {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
    border: 2px solid var(--bg-panel);
}
.og-auth-quote__avatars span + span { margin-left: -10px; }
.og-auth-quote__avatars span:last-child {
    background: var(--bg-active) !important;
    color: var(--text-secondary);
}
.og-auth-quote__text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}
.og-auth-quote__text strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.og-auth-quote__text span {
    font-size: 11.5px;
    color: var(--text-tertiary);
}

/* ===== Anim d'entrée ===== */
.og-auth-card > *,
.og-auth-aside__inner > * {
    opacity: 0;
    animation: og-fade-up 0.55s var(--ease) forwards;
}
.og-auth-card > *:nth-child(1) { animation-delay: 0ms; }
.og-auth-card > *:nth-child(2) { animation-delay: 60ms; }
.og-auth-card > *:nth-child(3) { animation-delay: 120ms; }
.og-auth-card > *:nth-child(4) { animation-delay: 180ms; }
.og-auth-card > *:nth-child(5) { animation-delay: 240ms; }
.og-auth-card > *:nth-child(6) { animation-delay: 300ms; }
.og-auth-card > *:nth-child(7) { animation-delay: 360ms; }
.og-auth-card > *:nth-child(8) { animation-delay: 420ms; }
.og-auth-aside__inner > *:nth-child(1) { animation-delay: 200ms; }
.og-auth-aside__inner > *:nth-child(2) { animation-delay: 280ms; }
.og-auth-aside__inner > *:nth-child(3) { animation-delay: 340ms; }
.og-auth-aside__inner > *:nth-child(4) { animation-delay: 400ms; }
.og-auth-aside__inner > *:nth-child(5) { animation-delay: 460ms; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .og-auth-shell {
        grid-template-columns: 1fr;
        max-width: 480px;
    }
    .og-auth-aside { display: none; }
    .og-auth-card { padding: 36px 28px; }
}
@media (max-width: 480px) {
    .og-auth-body { padding: 16px; }
    .og-auth-card { padding: 28px 22px; }
    .og-auth-title { font-size: 26px; }
    .og-auth-row { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ============================================================
   Skeleton loading
   ============================================================ */

@keyframes og-skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.og-skel {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}
.og-skel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.07) 45%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.07) 55%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: og-skeleton-shimmer 1.4s ease-in-out infinite;
}

.og-skel--line { height: 14px; border-radius: 6px; }
.og-skel--line.og-skel--lg { height: 22px; }
.og-skel--line.og-skel--sm { height: 11px; }
.og-skel--line.og-skel--xs { height: 9px; }
.og-skel--circle { border-radius: 50%; flex-shrink: 0; }
.og-skel--square { border-radius: 6px; flex-shrink: 0; }
.og-skel--pill { border-radius: 999px; }
.og-skel--block { width: 100%; border-radius: 10px; }

.og-skel--20 { width: 20px; height: 20px; }
.og-skel--28 { width: 28px; height: 28px; }
.og-skel--36 { width: 36px; height: 36px; }
.og-skel--42 { width: 42px; height: 42px; }

.og-skel--w15 { width: 15%; }
.og-skel--w20 { width: 20%; }
.og-skel--w25 { width: 25%; }
.og-skel--w30 { width: 30%; }
.og-skel--w35 { width: 35%; }
.og-skel--w40 { width: 40%; }
.og-skel--w45 { width: 45%; }
.og-skel--w50 { width: 50%; }
.og-skel--w55 { width: 55%; }
.og-skel--w60 { width: 60%; }
.og-skel--w70 { width: 70%; }
.og-skel--w75 { width: 75%; }
.og-skel--w80 { width: 80%; }
.og-skel--w90 { width: 90%; }

.og-skel--search { height: 42px; margin: 10px; border-radius: 22px; }
.og-skel--tab { width: 52px; height: 28px; }
.og-skel--btn { width: 72px; height: 34px; }
.og-skel--btn-lg { width: 120px; }
.og-skel--badge { width: 64px; height: 24px; }
.og-skel--table-head { height: 36px; margin-bottom: 4px; }
.og-skel--media-thumb { height: 100px; margin-bottom: 10px; border-radius: 12px; }
.og-skel--field { height: 52px; margin-top: 16px; border-radius: 12px; }
.og-skel--submit { height: 48px; margin-top: 20px; border-radius: 12px; }
.og-skel--btn-block { height: 44px; margin-top: 12px; border-radius: 12px; }
.og-skel--input-bar { height: 56px; border-radius: 0; margin-top: auto; }
.og-skel--bubble { height: 44px; max-width: 280px; border-radius: 18px; }

/* Skeleton layers */
.og-sidebar,
.og-chatlist,
.og-content {
    position: relative;
}

.og-skeleton-layer {
    position: absolute;
    inset: 0;
    z-index: 20;
    overflow: hidden;
    pointer-events: none;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.28s ease, visibility 0s;
}

.og-skeleton-layer--auth {
    position: fixed;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.og-loaded-layer {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    flex: 1;
    opacity: 1;
    transition: opacity 0.28s ease;
}

.og-sidebar > .og-loaded-layer,
.og-chatlist > .og-loaded-layer {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.og-loaded-layer--content {
    height: 100%;
    min-height: 0;
}

.og-loaded-layer--auth {
    position: relative;
    z-index: 3;
}

.og-auth-shell.og-loaded-layer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: none;
    min-height: 540px;
    width: 100%;
    max-width: 980px;
}

html.og-is-loading .og-loaded-layer {
    opacity: 0;
}

html.og-is-loaded .og-skeleton-layer {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0s 0.28s;
}

/* Sidebar skeleton */
.og-skeleton-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}
.og-skeleton-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.og-skeleton-sidebar__brand-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.og-skeleton-sidebar__nav {
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}
.og-skeleton-sidebar__nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
}
.og-skeleton-sidebar__footer {
    border-top: 1px solid var(--border-subtle);
    padding: 8px 8px 0;
}
.og-skeleton-sidebar__user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}

/* Chatlist skeleton */
.og-skeleton-chatlist {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.og-skeleton-chatlist__head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.og-skeleton-chatlist__tabs {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle);
}
.og-skeleton-chatlist__list {
    flex: 1;
    padding: 4px 0;
    overflow: hidden;
}
.og-skeleton-chatlist__item {
    display: flex;
    gap: 10px;
    padding: 7px 12px;
    margin: 1px 8px;
}
.og-skeleton-chatlist__item-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
    min-width: 0;
}
.og-skeleton-chatlist__row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

/* Content skeleton */
.og-skeleton-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}
.og-skeleton-page__body {
    flex: 1;
    padding: 16px 20px;
    overflow: hidden;
}

.og-skeleton-topbar {
    height: 60px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-soft);
    flex-shrink: 0;
}
.og-skeleton-topbar__title {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.og-skeleton-topbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.og-skeleton-hero {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px var(--sp-5);
    margin-bottom: var(--sp-4);
}

.og-skeleton-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.og-skeleton-kpi {
    background: rgba(24, 37, 51, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.og-skeleton-panel {
    background: rgba(24, 37, 51, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
}
.og-skeleton-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.og-skeleton-panel__body { padding: 4px 0; }
.og-skeleton-panel__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.og-skeleton-panel__row:last-child { border-bottom: none; }

.og-skeleton-table { padding: 8px 0 12px; }
.og-skeleton-table__row {
    display: grid;
    grid-template-columns: 28px 1fr 80px 60px 80px;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.og-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.og-skeleton-grid__item {
    background: rgba(24, 37, 51, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.og-skeleton-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 48px 20px;
}

.og-skeleton-thread {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
    min-height: 280px;
}
.og-skeleton-thread__msg {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 60%;
}
.og-skeleton-thread__msg--left { align-self: flex-start; }
.og-skeleton-thread__msg--right { align-self: flex-end; align-items: flex-end; }

.og-skeleton-page__body:has(.og-skeleton-thread) {
    display: flex;
    flex-direction: column;
    padding: 0;
    min-height: calc(100vh - 60px);
}

/* Login skeleton */
.og-skeleton-auth {
    width: 100%;
    max-width: 980px;
    min-height: 540px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(20, 24, 31, 0.7);
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    overflow: hidden;
}
.og-skeleton-auth__card {
    padding: 44px 48px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.og-skeleton-auth__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.og-skeleton-auth__aside {
    padding: 44px 48px;
    border-left: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.og-skeleton-auth__feat {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.og-skeleton-auth__feat-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

html.og-is-loading .og-auth-card > *,
html.og-is-loading .og-auth-aside__inner > * {
    animation: none !important;
    opacity: 0;
}

@media (max-width: 1100px) {
    .og-skeleton-kpis { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .og-skeleton-auth {
        grid-template-columns: 1fr;
        max-width: 480px;
    }
    .og-skeleton-auth__aside { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .og-skel::after { animation: none; }
    .og-skeleton-layer,
    .og-loaded-layer { transition: none; }
}

/* ============================================================
   Virtual Assistant (Teams) + flash + read-only
   ============================================================ */

.og-flash {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: var(--sp-4);
    font-size: 13px;
    border: 1px solid var(--border-subtle);
}
.og-flash--success {
    background: rgba(74, 222, 128, 0.1);
    color: var(--success);
    border-color: rgba(74, 222, 128, 0.25);
}
.og-flash--error {
    background: rgba(255, 95, 86, 0.1);
    color: var(--danger);
    border-color: rgba(255, 95, 86, 0.25);
}

/* VA team board (Teams) */
.og-va-team {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--sp-5);
    margin-bottom: var(--sp-5);
}
.og-va-team__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    margin-bottom: var(--sp-4);
    padding-bottom: var(--sp-3);
    border-bottom: 1px solid var(--border-subtle);
}
.og-va-team__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.og-va-team__meta {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(139, 155, 176, 0.1);
    border: 1px solid var(--border-subtle);
}
.og-va-team__grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
}
.og-va-tile {
    position: relative;
    width: 148px;
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.18);
    color: inherit;
    cursor: pointer;
    overflow: hidden;
    text-align: center;
    transition:
        border-color var(--dur-fast) var(--ease),
        transform var(--dur-fast) var(--ease),
        box-shadow var(--dur-fast) var(--ease);
}
.og-va-tile:hover,
.og-va-tile:focus-visible {
    border-color: rgba(42, 171, 238, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    outline: none;
}
.og-va-tile--member {
    border-color: rgba(74, 222, 128, 0.25);
}
.og-va-tile--add {
    border-style: dashed;
    background: rgba(139, 155, 176, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.og-va-tile--add:hover,
.og-va-tile--add:focus-visible {
    border-color: var(--accent);
    background: rgba(42, 171, 238, 0.06);
}
.og-va-tile__face,
.og-va-tile__add-icon,
.og-va-tile__add-label {
    transition: opacity var(--dur-fast) var(--ease);
}
.og-va-tile__face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: var(--sp-3);
}
.og-va-tile__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 17px;
    background: linear-gradient(145deg, var(--accent-soft), rgba(42, 171, 238, 0.08));
    color: var(--accent);
    border: 1px solid rgba(42, 171, 238, 0.2);
}
.og-va-tile__name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.og-va-tile__status {
    font-size: 10px;
    padding: 2px 7px;
}
.og-va-tile__add-icon {
    display: grid;
    place-items: center;
    color: var(--text-secondary);
    margin-top: var(--sp-2);
}
.og-va-tile__add-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}
.og-va-tile__peek {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: var(--sp-3);
    background: rgba(12, 20, 30, 0.92);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-fast) var(--ease);
}
.og-va-tile:hover .og-va-tile__peek,
.og-va-tile:focus-visible .og-va-tile__peek {
    opacity: 1;
}
.og-va-tile:hover .og-va-tile__face,
.og-va-tile:focus-visible .og-va-tile__face,
.og-va-tile:hover .og-va-tile__add-icon,
.og-va-tile:focus-visible .og-va-tile__add-icon,
.og-va-tile:hover .og-va-tile__add-label,
.og-va-tile:focus-visible .og-va-tile__add-label {
    opacity: 0;
}
.og-va-tile__peek-title {
    font-size: 13px;
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.og-va-tile__peek-line {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.35;
}
.og-va-tile__peek-hint {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
}

/* VA modals */
.og-va-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: var(--sp-4);
}
.og-va-modal[hidden] {
    display: none;
}
.og-va-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}
.og-va-modal__panel {
    position: relative;
    width: min(520px, 100%);
    max-height: min(90vh, 720px);
    overflow: auto;
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    animation: og-va-modal-in 0.2s var(--ease);
}
@keyframes og-va-modal-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.og-va-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp-3);
    padding: var(--sp-5);
    border-bottom: 1px solid var(--border-subtle);
}
.og-va-modal__profile {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    min-width: 0;
}
.og-va-modal__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    background: linear-gradient(145deg, var(--accent-soft), rgba(42, 171, 238, 0.08));
    color: var(--accent);
    border: 1px solid rgba(42, 171, 238, 0.2);
}
.og-va-modal__title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 600;
}
.og-va-modal__sub {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.45;
}
.og-va-modal__close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.og-va-modal__close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.og-va-modal__body {
    padding: var(--sp-5);
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}
.og-va-modal__key-row {
    display: flex;
    align-items: flex-end;
    gap: var(--sp-2);
}
.og-va-modal__key-block {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: var(--sp-3);
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}
.og-va-modal__key-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
}
.og-va-modal__key {
    font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', monospace;
    font-size: 13px;
    color: var(--accent);
    word-break: break-all;
    line-height: 1.45;
}
.og-va-modal__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.og-va-modal__tag {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(42, 171, 238, 0.1);
    color: var(--accent);
    border: 1px solid rgba(42, 171, 238, 0.15);
}
.og-va-modal__foot {
    padding: var(--sp-4) var(--sp-5) var(--sp-5);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
}

.og-va-form {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}
.og-va-form__field { margin: 0; }
.og-va-form__actions {
    display: flex;
    justify-content: flex-end;
    padding-top: var(--sp-2);
}

.og-va-perms {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: var(--sp-4);
    margin: 0;
}
.og-va-perms__title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--sp-3);
    padding: 0;
}
.og-va-perms__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: var(--sp-2);
}

@media (max-width: 768px) {
    .og-va-tile {
        width: calc(50% - var(--sp-2));
        min-width: 132px;
    }
    .og-va-modal__key-row {
        flex-direction: column;
        align-items: stretch;
    }
}

.og-btn--danger {
    background: rgba(255, 95, 86, 0.15);
    color: var(--danger);
}
.og-btn--danger:hover {
    background: rgba(255, 95, 86, 0.25);
    color: #ff7b74;
}

.og-readonly .og-btn--primary,
.og-readonly .og-topbar__actions .og-btn--primary {
    opacity: 0.45;
    pointer-events: none;
}

/* Telegram-like modal */
.og-tg-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: var(--sp-4);
}
.og-tg-modal[hidden] {
    display: none;
}
.og-tg-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
}
.og-tg-modal__panel {
    position: relative;
    width: min(400px, 100%);
    background: var(--bg-elevated, var(--bg-panel));
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    animation: og-tg-modal-in 0.22s var(--ease);
}
@keyframes og-tg-modal-in {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}
.og-tg-modal__head {
    padding: 18px 20px 14px;
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
}
.og-tg-modal__title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.og-tg-modal__form {
    display: flex;
    flex-direction: column;
}
.og-tg-modal__body {
    padding: 16px 20px 4px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.og-tg-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.og-tg-field__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}
.og-tg-field__input {
    width: 100%;
    padding: 11px 13px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.og-tg-field__input::placeholder {
    color: var(--text-tertiary);
}
.og-tg-field__input:hover {
    border-color: var(--border-strong);
}
.og-tg-field__input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(42, 171, 238, 0.15);
}
.og-tg-field__input--mono {
    font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', monospace;
    font-size: 13px;
}
.og-tg-modal__foot {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: 16px;
    border-top: 1px solid var(--border-subtle);
}
.og-tg-modal__btn {
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease);
}
.og-tg-modal__btn--cancel {
    color: var(--text-secondary);
    border-right: 1px solid var(--border-subtle);
}
.og-tg-modal__btn--cancel:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.og-tg-modal__btn--primary {
    color: var(--accent);
    font-weight: 600;
}
.og-tg-modal__btn--primary:hover {
    background: rgba(42, 171, 238, 0.08);
}
.og-tg-modal__btn--danger {
    color: var(--danger);
    font-weight: 600;
    background: transparent;
}
.og-tg-modal__btn--danger:hover {
    background: rgba(255, 95, 86, 0.1);
    color: #ff7b74;
}
.og-tg-modal__btn--primary:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Telegram bot connecting loader */
.og-tg-loading {
    padding: 28px 24px 26px;
    text-align: center;
}
.og-tg-loading__icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--accent);
    background: rgba(42, 171, 238, 0.1);
    border: 1px solid rgba(42, 171, 238, 0.18);
    transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.og-tg-loading__icon[data-state="loading"] {
    color: var(--accent);
    background: rgba(42, 171, 238, 0.1);
    border-color: rgba(42, 171, 238, 0.18);
}
.og-tg-loading__icon[data-state="success"] {
    color: var(--success);
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.28);
    animation: none;
}
.og-tg-loading__icon[data-state="error"] {
    color: var(--danger);
    background: rgba(255, 95, 86, 0.12);
    border-color: rgba(255, 95, 86, 0.28);
    animation: none;
}
.og-tg-loading__icon-graphic {
    display: grid;
    place-items: center;
    grid-area: 1 / 1;
}
.og-tg-loading__icon-graphic[hidden] {
    display: none;
}
.og-tg-loading__icon-graphic--spin svg {
    transform-origin: center;
}
.og-tg-loading__icon[data-state="loading"] .og-tg-loading__icon-graphic--spin svg {
    animation: og-tg-loading-spin 1.1s linear infinite;
}
@keyframes og-tg-loading-spin {
    to { transform: rotate(360deg); }
}
.og-tg-loading__title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 600;
}
.og-tg-loading__status {
    margin: 0 0 18px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.45;
}
.og-tg-loading__track {
    height: 6px;
    border-radius: 999px;
    background: rgba(139, 155, 176, 0.15);
    overflow: hidden;
    margin-bottom: 12px;
}
.og-tg-loading__bar {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #5bc4ff);
    transition: width 0.35s var(--ease);
}
.og-tg-loading__bar.is-complete {
    background: linear-gradient(90deg, var(--success), #6ee7a0);
}
.og-tg-loading__bar.is-error {
    background: linear-gradient(90deg, var(--danger), #ff8a84);
}
.og-tg-loading__error {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--danger);
    line-height: 1.45;
}
.og-tg-loading__error.is-success {
    color: var(--success);
}
.og-tg-loading__error.is-error {
    color: var(--danger);
}
.og-tg-loading__track.is-hidden {
    display: none;
}
.og-tg-loading__ok {
    width: 100%;
    padding: 13px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.og-tg-loading__ok:hover {
    opacity: 0.92;
}
.og-tg-loading__ok[hidden] {
    display: none;
}

/* ============================================================
   Overview dashboard — bento layout
   ============================================================ */
.og-page--overview {
    padding-bottom: var(--sp-8);
}

.og-hero--compact {
    margin-bottom: var(--sp-4);
}

.og-hero--with-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
}

.og-hero--with-profile .og-hero__content {
    flex: 1;
    min-width: 0;
}

.og-hero-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.og-hero-profile__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--accent-soft), rgba(42, 171, 238, 0.08));
    color: var(--accent);
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 22px;
    overflow: hidden;
    border: 2px solid rgba(42, 171, 238, 0.25);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.og-hero-profile__meta {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.og-settings-telegram {
    padding: var(--sp-4);
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.og-settings-telegram__preview {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.og-settings-telegram__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 18px;
    overflow: hidden;
    flex-shrink: 0;
}

.og-settings-telegram__identity {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    color: var(--text-secondary);
}

.og-settings-telegram__identity strong {
    font-size: 15px;
    color: var(--text-primary);
}

.og-settings-telegram__hint {
    opacity: 0.75;
}

.og-settings-telegram__form {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    max-width: 360px;
}

.og-settings-telegram__help {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.8;
    line-height: 1.45;
}

@media (max-width: 640px) {
    .og-hero--with-profile {
        flex-direction: column;
        align-items: flex-start;
    }

    .og-hero-profile {
        flex-direction: row;
        align-items: center;
    }
}

.og-overview {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--sp-4);
    align-items: stretch;
}

.og-ov-daterange { grid-column: span 12; }
.og-ov-earnings  { grid-column: span 12; }
.og-ov-metrics   { grid-column: span 12; }
.og-ov-chart     { grid-column: span 8; }
.og-ov-sales     { grid-column: span 4; }

@media (max-width: 1040px) {
    .og-ov-chart,
    .og-ov-sales { grid-column: span 12; }
}

/* --- Date range filter bar --- */
.og-ov-daterange {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.og-ov-daterange__info {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.og-ov-daterange__icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.og-ov-daterange__label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    opacity: 0.75;
}

.og-ov-daterange__value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.og-ov-daterange__controls {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    flex-wrap: wrap;
}

.og-ov-daterange__chip {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid var(--border-subtle);
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.og-ov-daterange__chip:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.og-ov-daterange__chip.is-active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.og-ov-daterange__fields {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 4px 6px 4px 8px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid var(--border-subtle);
}

.og-ov-daterange__fields.is-active {
    border-color: var(--accent);
}

.og-ov-daterange__date {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 12px;
    font-family: var(--font-sans);
    padding: 4px 6px;
    border-radius: 6px;
    color-scheme: dark;
}

.og-ov-daterange__date:focus {
    outline: none;
    background: var(--bg-hover);
}

.og-ov-daterange__sep {
    color: var(--text-tertiary);
    font-size: 12px;
}

@media (max-width: 720px) {
    .og-ov-daterange {
        align-items: stretch;
    }

    .og-ov-daterange__controls {
        width: 100%;
    }

    .og-ov-daterange__fields {
        flex: 1;
        flex-wrap: wrap;
    }
}

/* --- Metrics row --- */
.og-ov-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-4);
}

@media (max-width: 900px) {
    .og-ov-metrics {
        grid-template-columns: 1fr;
    }
}

.og-overview-section__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.og-overview-section__sub {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.75;
}

/* --- Earnings hero --- */
.og-overview-earnings {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) 2fr;
    gap: var(--sp-5);
    background: linear-gradient(135deg, #1b2a3a 0%, var(--bg-panel) 55%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: var(--sp-5) var(--sp-5);
}

.og-ov-earnings__glow {
    position: absolute;
    top: -60px;
    left: -40px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0.5;
    pointer-events: none;
}

.og-ov-earnings__main {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.og-ov-earnings__eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    opacity: 0.8;
    margin-bottom: var(--sp-3);
}

.og-ov-earnings__display {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.og-ov-earnings__usd-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-3);
}

/* --- Trend badge --- */
.og-trend {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    line-height: 1;
}

.og-trend--up {
    color: var(--success);
    background: rgba(74, 222, 128, 0.12);
}

.og-trend--down {
    color: var(--danger);
    background: rgba(255, 95, 86, 0.12);
}

.og-trend--flat {
    color: var(--text-tertiary);
    background: rgb(255 255 255 / 0%)
}

.og-trend__arrow {
    display: inline-flex;
}

.og-trend__abs {
    font-weight: 500;
    opacity: 0.8;
    padding-left: 4px;
    border-left: 1px solid currentColor;
}

.og-trend__label {
    font-weight: 500;
    opacity: 0.7;
    font-size: 11px;
}

.og-overview-earnings__stars {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.05;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.og-overview-earnings__usd {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.1;
    color: var(--success);
}

.og-ov-earnings__period {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: var(--sp-3);
    font-size: 12px;
    color: var(--text-secondary);
}

.og-ov-earnings__period-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* --- Period selector cards --- */
.og-ov-periods {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: var(--sp-2);
}

.og-ov-period {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--sp-3);
    text-align: left;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-subtle);
    transition: border-color var(--dur-fast) var(--ease),
                background var(--dur-fast) var(--ease),
                transform var(--dur-fast) var(--ease);
}

.og-ov-period:hover {
    background: var(--bg-hover);
    transform: translateY(-1px);
}

.og-ov-period.is-active {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.og-ov-period__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.og-ov-period.is-active .og-ov-period__label {
    color: var(--accent);
}

.og-ov-period__value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.og-ov-period__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.og-ov-period__stars {
    font-size: 11px;
    color: var(--text-tertiary);
}

.og-ov-period__delta {
    font-size: 11px;
    font-weight: 600;
}

.og-ov-period__delta.og-trend--up { color: var(--success); }
.og-ov-period__delta.og-trend--down { color: var(--danger); }
.og-ov-period__delta.og-trend--flat { color: var(--text-tertiary); }

.og-ov-stat__sub {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-2);
}

@media (max-width: 720px) {
    .og-overview-earnings {
        grid-template-columns: 1fr;
        gap: var(--sp-4);
    }

    .og-overview-earnings__stars { font-size: 32px; }
    .og-overview-earnings__usd { font-size: 20px; }

    .og-ov-periods {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* --- Stat cards --- */
.og-ov-stat {
    padding: var(--sp-4) var(--sp-5);
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    min-height: 150px;
}

.og-ov-stat__top {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-bottom: var(--sp-1);
}

.og-ov-stat__icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.og-ov-stat__icon--revenue {
    background: rgba(74, 222, 128, 0.14);
    color: var(--success);
}

.og-ov-stat__title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.og-ov-stat__value {
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
    margin-top: auto;
}

.og-ov-stat__value--usd {
    color: var(--success);
}

.og-ov-stat__stars {
    margin: 4px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    opacity: 0.85;
}

.og-ov-stat__hint {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.8;
}

.og-ov-stat--unlock .og-ov-unlock {
    margin-top: auto;
}

/* --- Unlock ring (inline) --- */
.og-ov-unlock {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
}

.og-overview-unlock__ring {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    display: block;
}

.og-overview-unlock__track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 6;
}

.og-overview-unlock__progress {
    fill: none;
    stroke: var(--accent);
    stroke-width: 6;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 40px 40px;
    transition: stroke-dasharray var(--dur-slow) var(--ease);
}

.og-ov-unlock__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.og-overview-unlock__pct {
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
}

.og-ov-unlock__caption {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.8;
}

.og-overview-chart-panel__head {
    align-items: flex-start;
}

.og-overview-chart-panel__badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.og-overview-chart {
    padding: var(--sp-4) var(--sp-4) var(--sp-3);
    min-height: 260px;
}

.og-ov-chart {
    display: flex;
    flex-direction: column;
}

.og-ov-chart .og-overview-chart {
    flex: 1;
    display: flex;
    align-items: stretch;
}

.og-overview-chart__svg {
    width: 100%;
    height: 240px;
    display: block;
    overflow: visible;
}

.og-overview-chart__grid line {
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 1;
}

.og-overview-chart__area {
    fill: url(#ogChartGradient);
    opacity: 0.85;
}

.og-overview-chart__line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.og-overview-chart__dot {
    fill: var(--accent);
    stroke: var(--bg-panel);
    stroke-width: 2;
}

.og-overview-chart__label {
    fill: var(--text-tertiary);
    font-size: 10px;
    font-family: var(--font-sans);
    opacity: 0.75;
}

.og-overview-chart__axis {
    fill: var(--text-tertiary);
    font-size: 10px;
    font-family: var(--font-sans);
    opacity: 0.55;
}

.og-overview-sales-panel {
    margin-bottom: var(--sp-2);
}

.og-ov-sales {
    display: flex;
    flex-direction: column;
}

.og-ov-sales .og-empty {
    flex: 1;
    min-height: 0;
}

.og-ov-sales .og-panel__body {
    flex: 1;
    overflow-y: auto;
}

.og-overview-sales-empty__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    margin-bottom: var(--sp-3);
    opacity: 0.9;
}

.og-overview-sale__amount {
    float: right;
    font-weight: 600;
    color: var(--success);
}

.og-overview-sale .og-activity-item__title {
    font-weight: 500;
}

/* ============================================================
   Subscription / license card (overview head + settings)
   ============================================================ */
.og-ov-head {
    margin-bottom: var(--sp-4);
}

.og-ov-sub {
    --lc-accent: var(--success);
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--sp-4);
    width: 100%;
    margin-bottom: var(--sp-4);
    padding: 10px var(--sp-4);
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--lc-accent);
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

.og-ov-sub::before {
    display: none;
}

.og-ov-sub.og-license-card--ok       { --lc-accent: var(--success); }
.og-ov-sub.og-license-card--warn     { --lc-accent: var(--warning); }
.og-ov-sub.og-license-card--danger   { --lc-accent: var(--danger); }
.og-ov-sub.og-license-card--expired  { --lc-accent: var(--danger); }
.og-ov-sub.og-license-card--lifetime { --lc-accent: var(--accent); }

.og-ov-sub .og-license-card__head {
    flex: 0 0 auto;
    gap: var(--sp-2);
    padding-right: var(--sp-4);
    border-right: 1px solid var(--border-subtle);
}

.og-ov-sub .og-license-card__avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.og-ov-sub .og-license-card__name {
    font-size: 13px;
}

.og-ov-sub .og-license-card__plan {
    font-size: 11px;
}

.og-ov-sub .og-license-card__expiry {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: baseline;
    gap: var(--sp-2);
    white-space: nowrap;
}

.og-ov-sub .og-license-card__expiry-label {
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0;
}

.og-ov-sub .og-license-card__expiry-value {
    font-size: 14px;
    font-weight: 600;
}

.og-ov-sub .og-license-card__bar {
    flex: 1 1 auto;
    min-width: 80px;
    max-width: none;
    height: 6px;
}

.og-ov-sub .og-license-card__renew {
    flex: 0 0 auto;
    align-self: center;
    margin-top: 0;
    white-space: nowrap;
}

@media (max-width: 860px) {
    .og-ov-sub {
        flex-wrap: wrap;
        row-gap: var(--sp-3);
    }

    .og-ov-sub .og-license-card__head {
        border-right: none;
        padding-right: 0;
    }

    .og-ov-sub .og-license-card__bar {
        flex: 1 1 100%;
        order: 3;
    }

    .og-ov-sub .og-license-card__renew {
        margin-left: auto;
    }
}

@media (max-width: 520px) {
    .og-ov-sub {
        flex-direction: column;
        align-items: stretch;
    }

    .og-ov-sub .og-license-card__renew {
        width: 100%;
        margin-left: 0;
    }
}

.og-license-card {
    --lc-accent: var(--success);
    flex: 0 0 320px;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-5);
    background: var(--bg-panel);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.og-license-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--lc-accent);
    opacity: 0.9;
}

.og-license-card--ok       { --lc-accent: var(--success); }
.og-license-card--warn     { --lc-accent: var(--warning); }
.og-license-card--danger   { --lc-accent: var(--danger); }
.og-license-card--expired  { --lc-accent: var(--danger); }
.og-license-card--lifetime { --lc-accent: var(--accent); }

.og-license-card__head {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.og-license-card__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.og-license-card__id {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.og-license-card__name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.og-license-card__plan {
    font-size: 12px;
    color: var(--text-secondary);
}

.og-license-card__plan strong {
    color: var(--text-primary);
    font-weight: 600;
}

.og-license-card__expiry {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--sp-2);
}

.og-license-card__expiry-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.8;
}

.og-license-card__expiry-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--lc-accent);
}

.og-license-card__bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.og-license-card__bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--lc-accent);
    transition: width var(--dur-slow) var(--ease);
}

.og-license-card__renew {
    align-self: stretch;
    justify-content: center;
    margin-top: auto;
}

@media (max-width: 860px) {
    .og-license-card {
        flex: 1 1 auto;
        max-width: none;
    }
}

/* --- Settings layout --- */
.og-settings {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: var(--sp-4);
    align-items: start;
}

.og-settings__sub {
    flex: none;
    max-width: none;
}

.og-settings__panels {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.og-settings-item__value--status {
    font-weight: 600;
    color: var(--lc-accent, var(--text-secondary));
}

@media (max-width: 860px) {
    .og-settings {
        grid-template-columns: 1fr;
    }
}

