/* =====================================================
   APP SHELL - Dark RTL Persian layout for Nexus (Phase 1)
   Fixed sidebar + top header, matching the React reference UI
===================================================== */

/* ---------- 1. Design tokens (dark theme override) ---------- */
:root {
    --app-bg: #0b0f19;
    --app-sidebar-bg: #0b0f19;
    --app-panel-bg: #131722;
    --app-panel-bg-alt: #161b26;
    --app-border: #1e293b;
    --app-border-lifted: #334155;
    --app-text: #e1e3e8;
    --app-text-muted: #94a3b8;
    --app-accent: #2563eb;
    --app-accent-hover: #3b82f6;
    --app-accent-soft: rgba(37, 99, 235, 0.15);
    --app-radius-sm: 0.5rem;
    --app-radius-md: 0.75rem;
    --app-radius-lg: 1rem;
    --app-sidebar-width: 264px;
    --app-sidebar-width-collapsed: 84px;
    --app-header-height: 64px;
}

/* Override Nexus design tokens to the dark palette so native components
   (cards, tables, buttons, alerts, form controls) inherit it automatically */
body.app-shell-body {
    --bg: var(--app-panel-bg);
    --bg-muted: var(--app-panel-bg-alt);
    --bg-lifted: #1a2030;
    --bg-accented: #212838;
    --bg-inverted: #f4f5f7;

    --text: var(--app-text);
    --text-muted: var(--app-text-muted);
    --text-lifted: #cbd5e1;
    --text-accented: #f1f5f9;
    --text-inverted: #0b0f19;

    --border: var(--app-border);
    --border-muted: #17202f;
    --border-lifted: var(--app-border-lifted);
    --border-accented: #475569;

    --primary: var(--app-accent);
    --primary-lifted: var(--app-accent-hover);
    --primary-accented: #1d4ed8;

    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--app-bg);
    color: var(--app-text);
    overflow-x: hidden;
}

body.app-shell-body,
body.app-shell-body *:not(i[class*="fa-"]) {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

body.app-shell-body code,
body.app-shell-body pre,
body.app-shell-body .font-mono {
    font-family: 'JetBrains Mono', 'Vazirmatn', monospace !important;
}

/* ---------- 2. RTL base ---------- */
body.app-shell-body {
    direction: rtl;
    text-align: right;
}

/* ---------- 3. App shell layout ---------- */
.app-shell {
    display: flex;
    min-height: 100vh;
    background-color: var(--app-bg);
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    margin-right: var(--app-sidebar-width);
    transition: margin-right 0.25s ease;
    background-color: var(--app-bg);
}

.app-shell.is-collapsed .app-main {
    margin-right: var(--app-sidebar-width-collapsed);
}

/* ---------- 4. Sidebar ---------- */
.app-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: var(--app-sidebar-width);
    background-color: var(--app-sidebar-bg);
    border-left: 1px solid var(--app-border);
    display: flex;
    flex-direction: column;
    z-index: 40;
    transition: width 0.25s ease, transform 0.25s ease;
    overflow: hidden;
}

.app-shell.is-collapsed .app-sidebar {
    width: var(--app-sidebar-width-collapsed);
}

.app-sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 1rem;
    border-bottom: 1px solid var(--app-border);
    flex-shrink: 0;
}

.app-sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    min-width: 0;
}

.app-sidebar-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: var(--app-radius-md);
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    overflow: hidden;
}

.app-sidebar-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-sidebar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.app-sidebar-brand-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: #fff;
}

.app-sidebar-brand-sub {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--app-accent-hover);
    letter-spacing: 0.05em;
}

.app-sidebar-toggle {
    width: 32px;
    height: 32px;
    border-radius: var(--app-radius-sm);
    background-color: var(--app-panel-bg-alt);
    border: 1px solid var(--app-border-lifted);
    color: var(--app-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.15s ease;
}

.app-sidebar-toggle:hover {
    background-color: var(--app-border-lifted);
    color: #fff;
}

.app-shell.is-collapsed .app-sidebar-toggle i {
    transform: rotate(180deg);
}

.app-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.app-nav-item,
.app-nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: var(--app-radius-md);
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.app-nav-item:hover,
.app-nav-group-toggle:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    text-decoration: none;
}

.app-nav-item.active {
    background-color: var(--app-accent);
    color: #fff;
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.app-nav-item-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.app-nav-icon {
    width: 1.1rem;
    text-align: center;
    flex-shrink: 0;
    color: inherit;
    opacity: 0.85;
}

.app-nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-shell.is-collapsed .app-nav-label,
.app-shell.is-collapsed .app-sidebar-brand-text,
.app-shell.is-collapsed .app-nav-caret,
.app-shell.is-collapsed .app-nav-badge,
.app-shell.is-collapsed .app-sidebar-user-info,
.app-shell.is-collapsed .app-sidebar-secondary-links span,
.app-shell.is-collapsed .app-sidebar-auth-buttons span {
    display: none;
}

.app-shell.is-collapsed .app-nav-item,
.app-shell.is-collapsed .app-nav-group-toggle {
    justify-content: center;
    padding: 0.75rem;
}

.app-nav-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background-color: var(--app-border-lifted);
    color: #e2e8f0;
    flex-shrink: 0;
}

.app-nav-item.active .app-nav-badge {
    background-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.app-nav-caret {
    font-size: 0.65rem;
    color: var(--app-text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.app-nav-group.is-open .app-nav-caret {
    transform: rotate(180deg);
}

.app-nav-collapse {
    display: none;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.3rem 0 0.3rem 0.5rem;
    margin-top: 0.2rem;
    border-right: 2px solid var(--app-border);
    margin-right: 1.1rem;
}

.app-nav-group.is-open .app-nav-collapse {
    display: flex;
}

.app-nav-subitem {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--app-radius-sm);
    color: var(--app-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.app-nav-subitem:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    text-decoration: none;
}

.app-nav-subitem.active {
    color: var(--app-accent-hover);
    font-weight: 800;
}

.app-sidebar-footer {
    border-top: 1px solid var(--app-border);
    padding: 0.75rem;
    flex-shrink: 0;
}

.app-sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem;
    border-radius: var(--app-radius-md);
    text-decoration: none;
    transition: background-color 0.15s ease;
    margin-bottom: 0.4rem;
}

.app-sidebar-user:hover {
    background-color: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}

.app-sidebar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--app-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.app-sidebar-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
}

.app-sidebar-user-name {
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-sidebar-user-sub {
    font-size: 0.65rem;
    color: var(--app-text-muted);
}

.app-sidebar-secondary-links {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.app-sidebar-secondary-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.5rem;
    border-radius: var(--app-radius-sm);
    color: var(--app-text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
}

.app-sidebar-secondary-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    text-decoration: none;
}

.app-sidebar-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-app-primary,
.btn-app-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem;
    border-radius: var(--app-radius-md);
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
}

.btn-app-primary {
    background-color: var(--app-accent);
    color: #fff;
}

.btn-app-primary:hover {
    background-color: var(--app-accent-hover);
    color: #fff;
    text-decoration: none;
}

.btn-app-outline {
    background-color: var(--app-panel-bg-alt);
    border: 1px solid var(--app-border-lifted);
    color: #e2e8f0;
}

.btn-app-outline:hover {
    background-color: var(--app-border-lifted);
    color: #fff;
    text-decoration: none;
}

/* ---------- 5. Top header bar (matches reference Header.tsx) ---------- */
.app-topbar {
    height: var(--app-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.25rem;
    background-color: var(--app-panel-bg);
    border-bottom: 1px solid var(--app-border);
    position: sticky;
    top: 0;
    z-index: 30;
    flex-shrink: 0;
}

.app-mobile-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: var(--app-radius-sm);
    background-color: var(--app-panel-bg-alt);
    border: 1px solid var(--app-border-lifted);
    color: var(--app-text);
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-width: 0;
}

.app-topbar-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
    margin: 0;
}

.app-topbar-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 16rem;
    background-color: var(--app-bg);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    padding: 0.4rem 0.75rem;
    color: var(--app-text-muted);
}

.app-topbar-search:focus-within {
    border-color: var(--app-accent);
}

.app-topbar-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--app-text);
    font-size: 0.75rem;
}

.app-topbar-search-input::placeholder {
    color: var(--app-text-muted);
}

.app-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.app-topbar-icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: var(--app-radius-md);
    background-color: var(--app-panel-bg-alt);
    border: 1px solid var(--app-border-lifted);
    color: var(--app-text);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.app-topbar-icon-btn:hover {
    background-color: var(--app-border-lifted);
    color: #fff;
    text-decoration: none;
}

.app-topbar-badge {
    position: absolute;
    top: -6px;
    left: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background-color: var(--app-accent);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-topbar-badge-alert {
    background-color: var(--app-accent);
}

/* Wallet card */
.app-topbar-wallet {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--app-bg);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    padding: 0.4rem 0.9rem;
    text-decoration: none;
}

.app-topbar-wallet:hover {
    border-color: var(--app-border-lifted);
    text-decoration: none;
}

.app-topbar-wallet-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.app-topbar-wallet-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--app-text-muted);
    text-transform: uppercase;
}

.app-topbar-wallet-amount {
    font-size: 0.75rem;
    font-weight: 800;
    color: #34d399;
}

.app-topbar-wallet-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background-color: var(--app-panel-bg-alt);
    border: 1px solid var(--app-border-lifted);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.3rem 0.55rem;
    border-radius: var(--app-radius-sm);
}

.app-topbar-wallet-btn .app-icon {
    color: #34d399;
}

/* Create server button */
.app-topbar-createbtn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background-color: var(--app-accent);
    color: #fff;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 0.55rem 0.9rem;
    border-radius: var(--app-radius-md);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
    text-decoration: none;
    flex-shrink: 0;
}

.app-topbar-createbtn:hover {
    background-color: var(--app-accent-hover);
    color: #fff;
    text-decoration: none;
}

/* ---------- 6. Content area ---------- */
.app-breadcrumb {
    background-color: transparent;
    padding: 0.5rem 0;
}

.app-content {
    flex: 1;
    padding: 1.25rem;
}

.app-footer {
    border-top: 1px solid var(--app-border);
    padding: 1.25rem 0;
    color: var(--app-text-muted);
    font-size: 0.8rem;
}

.app-footer a {
    color: var(--app-text-muted);
}

/* ---------- 7. Cards / panels adapt to dark tokens automatically ---------- */
.card,
.panel,
.card-sidebar {
    background-color: var(--app-panel-bg-alt);
    border-color: var(--app-border);
}

/* ---------- 8. Responsive: collapse to off-canvas sidebar ---------- */
@media (max-width: 991px) {
    .app-sidebar {
        transform: translateX(100%);
        box-shadow: -10px 0 30px rgba(0,0,0,0.4);
    }

    .app-shell.is-mobile-open .app-sidebar {
        transform: translateX(0);
    }

    .app-main {
        margin-right: 0 !important;
    }

    .app-sidebar-toggle {
        display: none;
    }

    .app-mobile-toggle {
        display: flex;
    }

    .app-topbar-search {
        max-width: none;
    }
}

@media (max-width: 1100px) {
    .app-topbar-search {
        display: none;
    }
}

@media (max-width: 640px) {
    .app-topbar-wallet-info { display: none; }
    .app-topbar-createbtn-label { display: none; }
    .app-topbar-title { max-width: 140px; }
}

/* ---------- 9. Inline SVG icons (font-independent) & rebuilt sidebar bits ---------- */
.app-icon {
    width: 1.1rem !important;
    height: 1.1rem !important;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.app-icon-xs {
    width: 0.7rem !important;
    height: 0.7rem !important;
}

.app-sidebar-brand-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.app-sidebar-quick-add {
    width: 32px;
    height: 32px;
    border-radius: var(--app-radius-sm);
    background-color: var(--app-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.app-sidebar-quick-add:hover {
    background-color: var(--app-accent-hover);
    color: #fff;
    text-decoration: none;
}

.app-nav-badge.badge-amber {
    background-color: #f59e0b;
    color: #1a1206;
}

.app-sidebar-user-avatar i {
    font-style: normal;
}

.app-sidebar-user-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-top: 0.5rem;
    margin-top: 0.3rem;
    border-top: 1px solid var(--app-border);
    font-size: 0.65rem;
}

.app-sidebar-user-id-label {
    color: var(--app-text-muted);
}

.app-sidebar-user-id {
    font-family: 'JetBrains Mono', monospace;
    color: #e2e8f0;
    font-weight: 700;
}

.app-sidebar-logout {
    margin-right: auto;
    color: var(--app-text-muted);
    padding: 0.2rem;
    border-radius: var(--app-radius-sm);
}

.app-sidebar-logout:hover {
    color: #fb7185;
    background-color: rgba(255,255,255,0.05);
}

.btn-app-primary .app-icon,
.btn-app-outline .app-icon {
    width: 0.9rem;
    height: 0.9rem;
}

/* ---------- 10. Auth pages: no sidebar, full-width centered layout ---------- */
.app-shell.is-auth-page .app-main {
    margin-right: 0 !important;
}

.app-shell.is-auth-page .app-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* ---------- 11. مودال شناور برای صفحه سفارش (بدون خروج از پنل) ---------- */
.ob-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1.5rem;
}

.ob-modal-overlay.open {
    display: flex;
}

.ob-modal-box {
    position: relative;
    width: 100%;
    max-width: 1100px;
    height: 90vh;
    background: var(--app-bg, #0b0f19);
    border: 1px solid var(--app-border-lifted, #334155);
    border-radius: 1.25rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.ob-modal-close {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 34px;
    height: 34px;
    border-radius: 0.6rem;
    background: var(--app-panel-bg-alt, #161b26);
    border: 1px solid var(--app-border-lifted, #334155);
    color: #e2e8f0;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
}

.ob-modal-close:hover {
    background: var(--app-border-lifted, #334155);
    color: #fff;
}

.ob-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

@media (max-width: 768px) {
    .ob-modal-overlay { padding: 0; }
    .ob-modal-box { max-width: 100%; height: 100vh; border-radius: 0; }
}

/* ---------- پاپ‌آپ اطلاعیه/تخفیف (از ماژول Order Builder مدیریت می‌شه) ---------- */
.ob-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 15, 0.75);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 2rem 1.25rem;
}
.ob-popup-overlay.open {
    display: flex;
    animation: obPopupFadeIn .25s ease;
}
@keyframes obPopupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes obPopupScaleIn {
    from { opacity: 0; transform: translateY(12px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.ob-popup-box {
    width: min(92vw, 34rem);
    max-height: min(88vh, 640px);
    overflow-y: auto;
    background: linear-gradient(180deg, var(--app-panel-bg-alt) 0%, var(--app-panel-bg) 100%);
    border: 1px solid var(--app-border-lifted);
    border-radius: 1.4rem;
    padding: 0;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255,255,255,.03) inset;
    text-align: center;
    animation: obPopupScaleIn .3s cubic-bezier(.2,.8,.2,1);
}
.ob-popup-box::before {
    content: '';
    display: block;
    height: 5px;
    width: 100%;
    background: linear-gradient(90deg, var(--ob-accent, var(--app-accent)), transparent 140%);
    border-radius: 1.4rem 1.4rem 0 0;
}
.ob-popup-box-inner {
    padding: 2.25rem 2rem 2rem;
}
.ob-popup-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, .16);
    background: color-mix(in srgb, var(--ob-accent, var(--app-accent)) 16%, transparent);
    color: var(--ob-accent, var(--app-accent));
    font-size: 1.5rem;
    font-weight: 800;
}
.ob-popup-box h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 .75rem;
    line-height: 1.5;
}
.ob-popup-box p,
.ob-popup-message {
    font-size: .88rem;
    line-height: 1.9;
    color: var(--app-text);
    margin: 0 0 1.5rem;
}
.ob-popup-message img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: .9rem 0;
    box-shadow: 0 20px 45px rgba(0,0,0,.4);
    border: 1px solid var(--app-border-lifted);
}
.ob-popup-message a {
    color: #60a5fa;
    text-decoration: underline;
}
.ob-popup-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--app-border-lifted);
    color: var(--app-text-muted);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    transition: .15s ease;
}
.ob-popup-close:hover {
    color: #fff;
    background: rgba(255,255,255,.12);
    transform: rotate(90deg);
}
.ob-popup-box .ob-announce-btn {
    display: inline-block;
    padding: .8rem 2.2rem;
    font-size: .85rem;
    font-weight: 800;
    border-radius: .85rem;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .3);
    box-shadow: 0 12px 28px color-mix(in srgb, var(--ob-accent, var(--app-accent)) 40%, transparent);
}

.ob-popup-box.ob-announce-info { --ob-accent: #2563eb; }
.ob-popup-box.ob-announce-success { --ob-accent: #059669; }
.ob-popup-box.ob-announce-warning { --ob-accent: #d97706; }
.ob-popup-box.ob-announce-danger { --ob-accent: #e11d48; }

@media (max-width: 480px) {
    .ob-popup-box-inner { padding: 1.75rem 1.25rem 1.5rem; }
    .ob-popup-box h3 { font-size: 1.05rem; }
}
