/* AdCreativePanel — brand + limits */

.panel-sidebar-brand {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.35rem 1rem 1rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo--centered {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.55rem;
    width: 100%;
}

.brand-logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.15));
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.brand-logo--centered .brand-logo-img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.brand-logo--centered .brand-logo-text {
    color: #fff;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.25;
    max-width: 180px;
    word-break: break-word;
}

.panel-sidebar-brand .sidebar-tagline {
    text-align: center;
    max-width: 200px;
    margin: 0.35rem auto 0.75rem;
}

.panel-sidebar-brand .sidebar-lang-bar {
    display: flex;
    justify-content: center;
    width: 100%;
}

.mobile-topbar-logo.brand-logo--centered {
    flex-direction: row;
    gap: 0.45rem;
    text-decoration: none;
}
.mobile-topbar-logo .brand-logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}
.mobile-topbar-logo .brand-logo-img {
    width: 26px;
    height: 26px;
}
.mobile-topbar-logo .brand-logo-text {
    font-size: 0.82rem;
    color: #fff;
    max-width: 140px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: inherit;
}

.brand-logo-img { flex-shrink: 0; display: block; }

.brand-logo-text {
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -0.02em;
    color: inherit;
}

.public-logo.brand-logo .brand-logo-text { color: var(--text); }

.sidebar-brand .brand-logo {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.sidebar-brand .brand-logo-text {
    color: #fff;
    font-size: 1.05rem;
}

.sidebar-tagline {
    display: block;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.35;
    max-width: 200px;
}

.admin-brand-link .brand-logo-text { color: #fff; font-size: 0.95rem; }

.footer-brand-logo { margin-bottom: 0.5rem; }
.footer-brand-logo .brand-logo-text { color: #fff; }

.limits-grid { display: flex; flex-direction: column; gap: 0.85rem; }

.limit-row .limit-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.limit-bar {
    height: 6px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.limit-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #6366f1);
    border-radius: 999px;
    transition: width 0.3s;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #f0f4fa;
    --surface: #ffffff;
    --sidebar: #0c1222;
    --sidebar-2: #151d32;
    --sidebar-hover: rgba(255,255,255,0.06);
    --sidebar-active: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    --admin-sidebar: #1a1033;
    --admin-accent: #8b5cf6;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --radius: 14px;
    --radius-lg: 18px;
    --shadow: 0 1px 2px rgba(15,23,42,0.04), 0 8px 24px rgba(15,23,42,0.06);
    --shadow-lg: 0 4px 24px rgba(15,23,42,0.08), 0 16px 48px rgba(15,23,42,0.06);
    --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --topbar-h: 60px;
}

body {
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

/* ——— Panel sidebar ——— */
.sidebar {
    width: 268px;
    background: var(--sidebar);
    border-right: 1px solid rgba(255,255,255,0.04);
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.sidebar-brand {
    padding: 1.35rem 1.25rem 1.1rem;
}

.sidebar-brand h2 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.sidebar-brand span {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 500;
}

.nav-item {
    padding: 0.72rem 1rem;
    border-radius: 10px;
    margin: 0 0.65rem 3px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.18s ease;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: #e2e8f0;
    transform: translateX(2px);
}

.nav-item.active {
    background: var(--sidebar-active);
    color: #fff;
    box-shadow: 0 4px 14px rgba(59,130,246,0.35);
}

.sidebar-footer {
    padding: 1rem 1.25rem 1.25rem;
    background: rgba(0,0,0,0.2);
    margin: 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
}

.sidebar-footer a {
    color: #94a3b8;
    font-weight: 500;
}

.sidebar-footer a:hover { color: #fff; }

.panel-topbar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--topbar-h);
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    align-items: center;
    justify-content: space-between;
}

.panel-topbar-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

.panel-topbar-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

@media (min-width: 769px) {
    .panel-topbar.desktop-only { display: flex !important; }
    .panel-wrap { margin-left: 268px; width: calc(100% - 268px); }
    .main-content { padding: 1.5rem 2rem 2.5rem; max-width: 1280px; }
}

.main-content {
    animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* ——— Admin ——— */
.admin-body { background: #eef1f8; }

.admin-sidebar {
    width: 252px;
    background: var(--admin-sidebar);
    background-image: linear-gradient(180deg, #1a1033 0%, #0f172a 100%);
    border-right: 1px solid rgba(139,92,246,0.15);
    box-shadow: 4px 0 32px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    padding: 0;
}

.admin-brand {
    padding: 1.25rem 1.25rem 1rem;
    flex-shrink: 0;
}

.admin-sidebar-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0.35rem 0 1rem;
}

.admin-brand a.admin-brand-link {
    font-size: 1.05rem;
    font-weight: 800;
}

.admin-sidebar nav a {
    margin: 0 0.6rem;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.15s;
}

.admin-sidebar nav a:hover {
    background: rgba(139,92,246,0.12);
    color: #e9d5ff;
}

.admin-sidebar nav a.active {
    background: linear-gradient(135deg, rgba(139,92,246,0.35), rgba(99,102,241,0.25));
    color: #fff;
    border: 1px solid rgba(139,92,246,0.3);
}

.admin-content { padding: 1.5rem 2rem 2.5rem; max-width: 1200px; }

.admin-topbar {
    background: var(--admin-sidebar);
    border-bottom: 1px solid rgba(139,92,246,0.2);
}

.admin-bottom-nav {
    background: var(--admin-sidebar);
    border-top: 1px solid rgba(139,92,246,0.2);
}

.admin-mob-item.active { color: #c4b5fd; }

/* ——— Cards & stats ——— */
.card {
    border-radius: var(--radius-lg);
    border: 1px solid rgba(226,232,240,0.8);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.card:hover { box-shadow: var(--shadow-lg); }

.card-header {
    padding: 1.1rem 1.35rem;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.stat-card {
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    border-radius: 14px;
    width: 52px;
    height: 52px;
}

.page-header h1 {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

/* ——— Buttons ——— */
.btn {
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    box-shadow: 0 2px 10px rgba(59,130,246,0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(59,130,246,0.4);
}

/* ——— Tables ——— */
th {
    background: #f8fafc;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

td { font-size: 0.875rem; }

/* ——— Mobile nav ——— */
.mobile-bottom-nav {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 32px rgba(15,23,42,0.08);
}

.mob-nav-item {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.mob-nav-item.active {
    color: var(--primary);
}

.mobile-topbar {
    background: var(--sidebar);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ——— Public ——— */
.public-header {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226,232,240,0.9);
}

.public-logo {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero {
    background: linear-gradient(165deg, #0c1222 0%, #1e293b 40%, #1d4ed8 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59,130,246,0.25), transparent);
    pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; }

.feature-card, .pricing-card, .step-card {
    border-radius: var(--radius-lg);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover, .pricing-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), var(--shadow-lg);
}

.cta-box {
    border-radius: 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #7c3aed 50%, #6366f1 100%);
}

/* ——— Auth ——— */
.auth-split {
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
}

.auth-split-left {
    background: linear-gradient(165deg, #0c1222 0%, #1e3a5f 50%, #2563eb 100%);
}

/* ——— External links icon ——— */
a.link-external::after {
    content: ' ↗';
    font-size: 0.75em;
    opacity: 0.6;
}

/* ——— 2FA setup ——— */
.twofa-setup {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.twofa-qr {
    padding: 0.75rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.twofa-secret code {
    display: block;
    padding: 0.65rem 0.85rem;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 0.85rem;
    word-break: break-all;
    margin-top: 0.35rem;
}

/* ——— Gateway / checkout ——— */
.gateway-option {
    border-radius: 12px;
    transition: all 0.15s;
}

.gateway-option:hover {
    border-color: var(--primary);
    background: #f0f7ff;
}

@media (max-width: 768px) {
    .panel-topbar.desktop-only { display: none !important; }
    .admin-main-wrap { margin-left: 0; }
    .page-header h1 { font-size: 1.45rem; }
    .stat-card { padding: 1rem; }
}

/* ——— Nav dropdowns (public header) ——— */
.public-header-utilities-wrap {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 0.75rem;
}
.header-utilities {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}
.nav-dropdown-trigger:hover,
.nav-dropdown.is-open .nav-dropdown-trigger {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 2px 8px rgba(37,99,235,0.12);
}
.nav-dropdown-chevron { font-size: 0.65rem; opacity: 0.6; transition: transform 0.15s; }
.nav-dropdown.is-open .nav-dropdown-chevron { transform: rotate(180deg); }
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15,23,42,0.12);
    padding: 0.35rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
    z-index: 200;
}
.nav-dropdown.is-open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown-item {
    display: block;
    padding: 0.55rem 0.75rem;
    font-size: 0.84rem;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.12s;
}
.nav-dropdown-item:hover { background: #f1f5f9; color: var(--primary, #2563eb); }
.nav-dropdown-item.is-active { background: #eff6ff; color: var(--primary, #2563eb); font-weight: 600; }
.header-utilities--mobile {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0 0.25rem;
}
.header-utilities--mobile .nav-dropdown-trigger {
    width: 100%;
    justify-content: space-between;
}
.header-utilities--mobile .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0.25rem 0 0 0.5rem;
    display: none;
}
.header-utilities--mobile .nav-dropdown.is-open .nav-dropdown-menu { display: block; }

/* ——— Panel shortcuts ——— */
.sidebar-shortcuts-wrap {
    flex-shrink: 0;
    padding: 0 0.65rem 0.55rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.panel-shortcuts {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.5rem 0.5rem;
    margin: 0;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
}
.panel-shortcuts--admin { margin: 0; }
.panel-shortcuts-label {
    margin: 0 0 0.45rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}
.panel-shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    width: 100%;
}
.panel-shortcut {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.2rem;
    min-width: 0;
    min-height: 3.1rem;
    padding: 0.4rem 0.2rem;
    border-radius: 8px;
    text-decoration: none;
    color: #cbd5e1;
    font-size: 0.58rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.15;
    position: relative;
    transition: background 0.12s, color 0.12s;
    overflow: hidden;
}
.panel-shortcut:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.panel-shortcut-icon {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}
.panel-shortcut-text {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.panel-shortcut .nav-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.55rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.2rem;
}
.sidebar-section-label {
    margin: 0.85rem 0 0.35rem;
    padding: 0 1rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}
.sidebar-section-label--admin { color: #a78bfa; }
.panel-topbar-shortcuts {
    display: flex;
    gap: 0.35rem;
    margin-right: 0.75rem;
}
.topbar-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: #f1f5f9;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.12s, transform 0.12s;
}
.topbar-pill:hover { background: #e0e7ff; transform: translateY(-1px); }
