/* UltraFlow Premium Dark Mode Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #090a0f;
    --bg-sidebar: #0f111a;
    --bg-card: #151824;
    --bg-card-hover: #1c2030;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(8, 185, 201, 0.18);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Gradients from screenshots */
    --grad-purple: linear-gradient(135deg, #087e94 0%, #13d2df 100%);
    --grad-blue: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    --grad-green: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    --grad-pink: linear-gradient(135deg, #db2777 0%, #f43f5e 100%);
    --grad-orange: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
    --grad-accent: linear-gradient(135deg, #13d2df 0%, #087e94 100%);
    
    --font-primary: 'Plus Jakarta Sans', sans-serif;
    --font-title: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-primary);
    color-scheme: dark;
    overflow-x: hidden;
    line-height: 1.5;
}

select.form-control {
    color-scheme: dark;
    background-color: #151824;
    color: var(--text-primary);
}

select.form-control option {
    background-color: #151824;
    color: #f3f4f6;
}

select.form-control option:checked {
    background: #087e94;
    color: #fff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 600;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #272c3f;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3e4663;
}

/* Layout App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 250px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 0;
    min-height: 68px;
}

.brand-image {
    width: calc(100% - 8px);
    height: 64px;
    margin-inline: auto;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    filter: drop-shadow(0 0 16px rgba(8, 185, 201, 0.18));
}

.nav-section {
    margin-bottom: 0.85rem;
    padding: 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.045);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.018);
}

.nav-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.5rem;
    padding: 0 0.2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.62rem 0.65rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
}

.nav-link svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: #fff;
}

.nav-link:hover svg {
    color: #fff;
}

.nav-link.active {
    background-color: rgba(8, 185, 201, 0.11);
    border: 1px solid rgba(8, 185, 201, 0.25);
    color: #fff;
    font-weight: 600;
}

.nav-link.active svg {
    color: #13d2df;
}

.sidebar-footer {
    margin-top: 0.65rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
}

.sidebar-footer p {
    color: var(--text-secondary);
    font-weight: 600;
}

.sidebar-footer span {
    color: var(--text-muted);
    font-size: 0.65rem;
    display: block;
}

.sidebar-support {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-top: auto;
    padding: .75rem;
    border: 1px solid rgba(37, 211, 102, .18);
    border-radius: 10px;
    background: rgba(37, 211, 102, .055);
    color: var(--text-secondary);
    text-decoration: none;
    transition: border-color .2s ease, background .2s ease;
}

.sidebar-support:hover {
    border-color: rgba(37, 211, 102, .38);
    background: rgba(37, 211, 102, .1);
}

.sidebar-support svg {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    fill: #25d366;
}

.sidebar-support span {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-support strong {
    color: #e9fff1;
    font-size: .7rem;
}

.sidebar-support small {
    color: #55d986;
    font-size: .61rem;
}

.mobile-menu-button,
.sidebar-backdrop {
    display: none;
}

/* Main Content Styling */
.main-content {
    flex-grow: 1;
    padding: 2rem;
    overflow-y: auto;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}

.panel-topbar {
    min-height: 0;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    margin: 0;
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 40;
}

.profile-menu {
    position: relative;
}

.profile-menu summary {
    list-style: none;
}

.profile-menu summary::-webkit-details-marker {
    display: none;
}

.profile-trigger {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: rgba(21, 24, 36, 0.92);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

.profile-trigger:hover,
.profile-menu[open] .profile-trigger {
    border-color: rgba(8, 185, 201, .42);
    background: rgba(8, 185, 201, .07);
}

.profile-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--grad-accent);
    color: #021013;
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 800;
    box-shadow: 0 0 16px rgba(8, 185, 201, .16);
}

.profile-summary {
    min-width: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
    text-align: left;
}

.profile-summary strong,
.profile-dropdown-head strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: .8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-summary small,
.profile-dropdown-head small {
    overflow: hidden;
    color: var(--text-muted);
    font-size: .66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-chevron {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform .2s ease;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    width: 260px;
    padding: .55rem;
    border: 1px solid rgba(8, 185, 201, .2);
    border-radius: 14px;
    background: #111620;
    box-shadow: 0 22px 55px rgba(0, 0, 0, .5);
}

.profile-dropdown-head {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .65rem;
    margin-bottom: .4rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-dropdown-head > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.profile-avatar-lg {
    width: 39px;
    height: 39px;
}

.profile-dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.profile-dropdown-item:hover {
    background: rgba(8, 185, 201, .08);
    color: #fff;
}

.profile-dropdown-item svg {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    color: #13d2df;
}

.profile-dropdown-item span {
    display: flex;
    flex-direction: column;
}

.profile-dropdown-item strong {
    font-size: .8rem;
}

.profile-dropdown-item small {
    color: var(--text-muted);
    font-size: .65rem;
}

.profile-dropdown form {
    margin: 0;
    padding-top: .4rem;
    border-top: 1px solid var(--border-color);
}

.profile-logout svg,
.profile-logout strong {
    color: #fb7185;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-right: 58px;
}

.header-title h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
}

.header-title p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Alert styles */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

/* Grid layout for Dashboard */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.metric-card {
    border-radius: 12px;
    padding: 1.5rem;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 120px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    transition: transform 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
}

.metric-card.purple { background: var(--grad-purple); }
.metric-card.blue { background: var(--grad-blue); }
.metric-card.green { background: var(--grad-green); }
.metric-card.pink { background: var(--grad-pink); }
.metric-card.brand-blue { background: linear-gradient(135deg, #087e94 0%, #0ea5e9 58%, #2563eb 100%); }
.metric-card.orange { background: var(--grad-orange); }

.metric-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    opacity: 0.9;
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: var(--font-title);
    line-height: 1;
    margin: 0.25rem 0;
}

.metric-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
}

.metric-icon-bg {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.15;
}

.metric-icon-bg svg {
    width: 60px;
    height: 60px;
}

/* Custom panels */
.dashboard-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.map-content-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.5rem;
    align-items: center;
}

@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Glow Borders */
.glow-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--grad-accent);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--grad-accent);
    color: #fff;
    box-shadow: 0 4px 10px rgba(8, 185, 201, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(8, 185, 201, 0.38);
    opacity: 0.95;
}

.btn-orange {
    background: var(--grad-orange);
    color: #fff;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.2);
}

.btn-orange:hover {
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
    opacity: 0.95;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background-color: rgba(239, 68, 68, 0.2);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* Tables */
.table-container {
    overflow-x: auto;
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}

.table th {
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background-color: rgba(255, 255, 255, 0.01);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    color: #fff;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

/* Copy Credentials Box from Screenshot */
.credentials-box {
    background-color: rgba(139, 92, 246, 0.03);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.credentials-box h4 {
    color: #c084fc;
    margin-bottom: 0.75rem;
}

.credentials-box ul {
    list-style: none;
}

.credentials-box li {
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.credentials-box code {
    background: rgba(0,0,0,0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.75rem;
    color: #f472b6;
}

/* Upload zone */
.upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.upload-zone:hover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.02);
}

.upload-icon {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* Grid of items (videos, stories) */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}

.media-item-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.media-thumbnail-container {
    aspect-ratio: 16/10;
    position: relative;
    background-color: #000;
    overflow: hidden;
}

.media-thumbnail-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.65rem;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    text-transform: uppercase;
}

.media-details {
    padding: 0.75rem;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-grow: 1;
}

.media-title {
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-size {
    color: var(--text-muted);
}

.media-actions {
    display: flex;
    gap: 0.25rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

/* Radio selector for media in postings */
.media-selector-card {
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.media-selector-card:hover {
    border-color: rgba(255,255,255,0.2);
}

.media-selector-card.selected {
    border-color: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

/* Sidebar lists / Checklist of accounts */
.account-checklist {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    background-color: rgba(0,0,0,0.1);
}

.account-checklist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.account-checklist-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.account-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.account-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #3e4663;
}

.account-checklist-item input[type="checkbox"] {
    accent-color: #8b5cf6;
}

.account-checklist-item input[type="radio"] {
    accent-color: #f59e0b;
}

/* Globe and map visualizer mock */
.map-visualizer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    text-align: center;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
}

.map-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    opacity: 0.8;
}

.map-visualizer p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    max-width: 320px;
    margin-bottom: 1.5rem;
}

/* Performance lists */
.performance-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.perf-item {
    font-size: 0.8rem;
}

.perf-header {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.perf-bar-bg {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.perf-bar-fill {
    height: 100%;
    background: var(--grad-accent);
    border-radius: 4px;
}

/* Slider styling */
.slider-container {
    margin: 1rem 0;
}
.range-slider {
    width: 100%;
    accent-color: #f59e0b;
    background: rgba(255, 255, 255, 0.1);
    height: 6px;
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
}

/* Card tabs / Manual vs Preset */
.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    gap: 1.5rem;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #fff;
}

.tab-btn.active {
    color: #f59e0b;
    border-bottom-color: #f59e0b;
}

/* Calendar widget simulated */
.calendar-widget {
    background-color: rgba(0,0,0,0.15);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.8rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    text-align: center;
}

.calendar-day-header {
    font-weight: 600;
    color: var(--text-muted);
    padding-bottom: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.calendar-day:hover {
    background-color: rgba(255,255,255,0.05);
}

.calendar-day.has-post {
    background-color: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    font-weight: bold;
}

/* Brazil Map & Audience Distribution Styling */
.map-card-container {
    background: radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.08) 0%, rgba(21, 24, 36, 0.95) 100%);
    border: 1px solid rgba(168, 85, 247, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(139, 92, 246, 0.05);
}

.map-viewport {
    position: relative;
    width: 100%;
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(9, 10, 15, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    background-image: 
        radial-gradient(rgba(139, 92, 246, 0.15) 1px, transparent 1px),
        radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px, 10px 10px;
    background-position: 0 0, 5px 5px;
}

.map-viewport::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, transparent 40%, rgba(15, 17, 26, 0.8) 100%);
    pointer-events: none;
}

.map-beacon {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.map-beacon:hover {
    transform: scale(1.3);
}

.beacon-pulse {
    animation: beacon-ripple 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes beacon-ripple {
    0% {
        r: 3px;
        opacity: 0.9;
        stroke-width: 1.5px;
    }
    100% {
        r: 18px;
        opacity: 0;
        stroke-width: 0.5px;
    }
}

.radar-sweep {
    transform-origin: 250px 250px;
    animation: radar-spin 8s linear infinite;
}

@keyframes radar-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* State Distribution Progress Bars */
.state-distribution-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.state-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    transition: all 0.2s ease;
}

.state-item:hover {
    background: rgba(168, 85, 247, 0.06);
    border-color: rgba(168, 85, 247, 0.25);
    transform: translateX(3px);
}

.state-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
}

.state-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.state-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.state-name {
    color: var(--text-primary);
    font-weight: 600;
}

.state-metrics {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.state-views {
    color: #fff;
    font-weight: 700;
}

.state-badge-pct {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.state-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
}

.state-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

/* Side Card Improvements */
.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.stat-trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
}

.stat-trend-up {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.stat-trend-blue {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

/* State Paths Styling for Real Brazil Map */
.brazil-svg-map {
    width: 100%;
    height: 100%;
    max-height: 250px;
    filter: drop-shadow(0 0 16px rgba(139, 92, 246, 0.25));
}

.state-path {
    fill: rgba(255, 255, 255, 0.04);
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 1.2px;
    stroke-linejoin: round;
    stroke-linecap: round;
    transition: all 0.25s ease;
    cursor: pointer;
}

.state-path:hover {
    fill: rgba(168, 85, 247, 0.35);
    stroke: #a855f7;
    stroke-width: 2px;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.7));
}

.state-path.state-active-sp {
    animation: stateGlowPulseSP 2.8s infinite alternate ease-in-out;
}

.state-path.state-active-rj {
    animation: stateGlowPulseRJ 3s infinite alternate ease-in-out;
}

.state-path.state-active-mg {
    animation: stateGlowPulseMG 3.2s infinite alternate ease-in-out;
}

.state-path.state-active-ba {
    animation: stateGlowPulseBA 3.5s infinite alternate ease-in-out;
}

@keyframes stateGlowPulseSP {
    0% { fill-opacity: 0.65; stroke: #a855f7; stroke-width: 1.8px; }
    100% { fill-opacity: 0.95; stroke: #d946ef; stroke-width: 2.5px; filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.8)); }
}

@keyframes stateGlowPulseRJ {
    0% { fill-opacity: 0.65; stroke: #ec4899; stroke-width: 1.8px; }
    100% { fill-opacity: 0.95; stroke: #f43f5e; stroke-width: 2.5px; filter: drop-shadow(0 0 12px rgba(236, 72, 153, 0.8)); }
}

@keyframes stateGlowPulseMG {
    0% { fill-opacity: 0.65; stroke: #3b82f6; stroke-width: 1.8px; }
    100% { fill-opacity: 0.95; stroke: #06b6d4; stroke-width: 2.5px; filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.8)); }
}

@keyframes stateGlowPulseBA {
    0% { fill-opacity: 0.65; stroke: #10b981; stroke-width: 1.8px; }
    100% { fill-opacity: 0.95; stroke: #34d399; stroke-width: 2.5px; filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.8)); }
}

@media (max-width: 760px) {
    body.menu-open {
        overflow: hidden;
    }

    .mobile-menu-button {
        position: fixed;
        top: .85rem;
        left: .85rem;
        z-index: 75;
        width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        border: 1px solid rgba(8, 185, 201, .3);
        border-radius: 50%;
        background: #111620;
        color: #13d2df;
        box-shadow: 0 8px 22px rgba(0,0,0,.35);
    }

    .mobile-menu-button svg {
        width: 21px;
        height: 21px;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 65;
        display: block;
        border: 0;
        background: rgba(2, 5, 9, .72);
        opacity: 0;
        pointer-events: none;
        transition: opacity .22s ease;
        backdrop-filter: blur(3px);
    }

    .sidebar-backdrop.visible {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 70;
        width: min(290px, 86vw);
        height: 100dvh;
        padding: 1rem;
        transform: translateX(-105%);
        transition: transform .24s ease;
        box-shadow: 22px 0 55px rgba(0,0,0,.45);
    }

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

    .brand {
        min-height: 64px;
        margin-bottom: 1.25rem;
    }

    .brand-image {
        width: 100%;
        height: 64px;
        margin-inline: auto;
    }

    .nav-title {
        display: block;
    }

    .nav-section {
        margin-bottom: .7rem;
    }

    .nav-link {
        min-height: 43px;
        justify-content: flex-start;
        padding: .65rem;
        font-size: .86rem;
    }

    .nav-link svg {
        width: 20px;
        height: 20px;
    }

    .main-content {
        max-width: 100vw;
        padding: 4.75rem 1rem 1rem;
        overflow-x: hidden;
    }

    .panel-topbar {
        min-height: 0;
        top: 1rem;
        right: 1rem;
    }

    .profile-trigger {
        min-width: 0;
        width: 46px;
        height: 44px;
        justify-content: center;
        padding: 0;
    }

    .profile-summary,
    .profile-chevron {
        display: none;
    }

    .profile-dropdown {
        width: min(260px, calc(100vw - 2rem));
    }

    .header-container {
        align-items: flex-start;
        gap: 1rem;
        padding-right: 50px;
    }

    .header-title h1 {
        font-size: 1.45rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .map-content-grid {
        grid-template-columns: 1fr;
    }

    .map-card-container {
        padding: 1rem !important;
    }

    .map-card-container > div:first-child {
        align-items: flex-start !important;
        gap: .75rem;
    }

    .map-card-container > div:first-child p {
        line-height: 1.45;
    }

    .sidebar-support,
    .sidebar-footer {
        display: flex;
    }

    .sidebar-footer {
        display: block;
    }
}

/* UltraFlow Admin */
.admin-nav-section {
    border-color: rgba(8, 185, 201, .16);
    background: linear-gradient(145deg, rgba(8, 185, 201, .06), rgba(255, 255, 255, .015));
}

.admin-eyebrow {
    display: block;
    margin-bottom: .3rem;
    color: #13d2df;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.admin-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.admin-kpi {
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(21, 24, 36, .92), rgba(11, 15, 22, .92));
}

.admin-kpi > span {
    display: block;
    color: var(--text-muted);
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.admin-kpi > strong {
    display: block;
    margin-top: .45rem;
    color: #fff;
    font-family: var(--font-title);
    font-size: 1.65rem;
}

.admin-kpi > small {
    display: block;
    margin-top: .25rem;
    color: #13c8d6;
    font-size: .67rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, .8fr);
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.admin-grid-equal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.admin-card-head h3 {
    font-size: 1rem;
}

.admin-card-head p {
    margin-top: .2rem;
    color: var(--text-muted);
    font-size: .7rem;
}

.admin-card-head > a {
    color: #13d2df;
    font-size: .72rem;
    font-weight: 700;
    text-decoration: none;
}

.revenue-bars {
    height: 215px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    align-items: end;
    gap: .8rem;
    padding-top: 1rem;
}

.revenue-column {
    height: 100%;
    display: grid;
    grid-template-rows: 20px 1fr 20px;
    align-items: end;
    text-align: center;
}

.revenue-column > span,
.revenue-column > small {
    color: var(--text-muted);
    font-size: .6rem;
}

.revenue-column > div {
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 100% 25%;
}

.revenue-column i {
    width: min(36px, 70%);
    display: block;
    border-radius: 7px 7px 2px 2px;
    background: var(--grad-accent);
    box-shadow: 0 0 18px rgba(8, 185, 201, .14);
}

.admin-summary-list > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 0;
    border-bottom: 1px solid var(--border-color);
}

.admin-summary-list dt {
    color: var(--text-secondary);
    font-size: .75rem;
}

.admin-summary-list dd {
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
}

.admin-list {
    display: flex;
    flex-direction: column;
}

.admin-list-row {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .72rem 0;
    border-bottom: 1px solid var(--border-color);
}

.admin-list-main {
    min-width: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.admin-list-main strong,
.admin-list-meta strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: .76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-list-main small,
.admin-list-meta small {
    overflow: hidden;
    color: var(--text-muted);
    font-size: .63rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-list-meta {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.transaction-status-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #64748b;
}

.status-approved,
.status-active {
    color: #34d399 !important;
}

.transaction-status-dot.status-approved {
    background: #34d399;
    box-shadow: 0 0 8px rgba(52, 211, 153, .45);
}

.status-pending,
.status-past_due {
    color: #fbbf24 !important;
}

.transaction-status-dot.status-pending {
    background: #fbbf24;
}

.status-failed,
.status-cancelled,
.status-suspended {
    color: #fb7185 !important;
}

.admin-empty {
    padding: 2rem !important;
    color: var(--text-muted);
    font-size: .75rem;
    text-align: center;
}

.admin-toolbar,
.admin-create-card,
.admin-inline-form {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.admin-toolbar {
    max-width: 560px;
    margin-bottom: 1rem;
}

.admin-toolbar .form-control {
    flex: 1;
}

.admin-create-card {
    justify-content: space-between;
    margin-bottom: 1rem;
}

.admin-create-card h3 {
    font-size: .95rem;
}

.admin-create-card p {
    max-width: 520px;
    margin-top: .2rem;
    color: var(--text-muted);
    font-size: .68rem;
}

.admin-table-card {
    padding: 0;
}

.admin-table th,
.admin-table td {
    padding: .85rem 1rem;
    white-space: nowrap;
}

.admin-table td > strong,
.admin-table td > small {
    display: block;
}

.admin-table td > small {
    margin-top: .15rem;
    color: var(--text-muted);
    font-size: .64rem;
}

.admin-inline-form .form-control {
    min-width: 100px;
    padding: .38rem .55rem;
    font-size: .7rem;
}

.admin-badge {
    display: inline-flex;
    padding: .24rem .5rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: rgba(255,255,255,.025);
    color: var(--text-secondary);
    font-size: .62rem;
    font-weight: 700;
}

.admin-alert-error {
    border: 1px solid rgba(251, 113, 133, .25);
    background: rgba(251, 113, 133, .08);
    color: #fb7185;
}

.admin-pagination {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: .72rem;
}

@media (max-width: 1050px) {
    .admin-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-grid,
    .admin-grid-equal {
        grid-template-columns: 1fr;
    }

    .admin-create-card {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 650px) {
    .admin-metrics {
        grid-template-columns: 1fr;
    }

    .admin-inline-form {
        align-items: stretch;
        flex-direction: column;
    }
}

/* User subscription */
.subscription-user-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, .65fr);
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.subscription-main-card {
    min-height: 300px;
}

.subscription-plan-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.subscription-plan-head span,
.subscription-side-card > span {
    color: var(--text-muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.subscription-plan-head h2 {
    margin-top: .25rem;
    color: #fff;
    font-size: 1.7rem;
}

.subscription-price {
    display: flex;
    align-items: baseline;
    margin-top: 1.8rem;
}

.subscription-price small {
    color: var(--text-secondary);
}

.subscription-price strong {
    margin-left: .35rem;
    color: #13d2df;
    font-family: var(--font-title);
    font-size: 2.7rem;
}

.subscription-price > span {
    margin-left: .4rem;
    color: var(--text-muted);
    font-size: .75rem;
}

.subscription-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
    margin-top: 1.8rem;
}

.subscription-details > div {
    padding: .8rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(255,255,255,.018);
}

.subscription-details dt {
    color: var(--text-muted);
    font-size: .62rem;
    text-transform: uppercase;
}

.subscription-details dd {
    margin-top: .3rem;
    color: var(--text-primary);
    font-size: .74rem;
    font-weight: 700;
}

.subscription-side-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.subscription-side-card > strong {
    margin-top: .55rem;
    color: #fff;
    font-family: var(--font-title);
    font-size: 2rem;
}

.subscription-side-card > small {
    margin-top: .25rem;
    color: var(--text-muted);
    font-size: .68rem;
}

.subscription-side-card > a {
    margin-top: 2rem;
    color: #13d2df;
    font-size: .75rem;
    font-weight: 700;
    text-decoration: none;
}

.subscription-empty-state {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.subscription-empty-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(8, 185, 201, .1);
    color: #13d2df;
    font-size: 1.5rem;
}

.subscription-empty-state h2 {
    margin-top: 1rem;
}

.subscription-empty-state p {
    max-width: 460px;
    margin: .55rem auto 1.2rem;
    color: var(--text-muted);
    font-size: .75rem;
    line-height: 1.6;
}

.billing-history-head {
    padding: 1.25rem 1.25rem 0;
}

@media (max-width: 900px) {
    .subscription-user-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .subscription-details {
        grid-template-columns: 1fr;
    }
}

/* Gateway and mandatory plans */
.gateway-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, .7fr);
    gap: 1.25rem;
}

.gateway-side {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.gateway-status {
    padding: .28rem .6rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: .65rem;
    font-weight: 800;
}

.gateway-status.online { color: #34d399; }
.gateway-status.offline { color: #94a3b8; }

.gateway-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.field-help,
.gateway-last-test {
    display: block;
    margin-top: .35rem;
    color: var(--text-muted);
    font-size: .65rem;
}

.gateway-toggle {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
}

.gateway-toggle > input {
    position: absolute;
    opacity: 0;
}

.gateway-toggle > span {
    width: 42px;
    height: 23px;
    position: relative;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #303746;
    transition: background .2s;
}

.gateway-toggle > span::after {
    content: "";
    position: absolute;
    width: 17px;
    height: 17px;
    top: 3px;
    left: 3px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s;
}

.gateway-toggle > input:checked + span {
    background: #08b9c9;
}

.gateway-toggle > input:checked + span::after {
    transform: translateX(19px);
}

.gateway-toggle > div {
    display: flex;
    flex-direction: column;
}

.gateway-toggle strong { font-size: .76rem; }
.gateway-toggle small { color: var(--text-muted); font-size: .64rem; }
.gateway-actions { margin-top: 1rem; }
.gateway-description { margin: .4rem 0 1rem; color: var(--text-muted); font-size: .7rem; line-height: 1.55; }
.gateway-error { margin-top: .7rem; color: #fb7185; font-size: .65rem; }

.copy-field {
    display: flex;
    align-items: stretch;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: rgba(0,0,0,.2);
}

.copy-field code {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    padding: .65rem;
    color: #b9eaf0;
    font-size: .65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-field button {
    padding: 0 .7rem;
    border: 0;
    border-left: 1px solid var(--border-color);
    background: rgba(8,185,201,.1);
    color: #13d2df;
    cursor: pointer;
    font-size: .66rem;
    font-weight: 700;
}

.plans-gate-header {
    max-width: 700px;
    margin: 1.5rem auto 2rem;
    text-align: center;
}

.plans-gate-header h1 {
    color: #fff;
    font-family: var(--font-title);
    font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.plans-gate-header p {
    margin-top: .65rem;
    color: var(--text-secondary);
    font-size: .83rem;
}

.gateway-warning {
    max-width: 780px;
    margin-inline: auto;
    border: 1px solid rgba(251,191,36,.24);
    background: rgba(251,191,36,.07);
    color: #fbbf24;
}

.plans-gate-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 1rem;
    max-width: 1000px;
    margin-inline: auto;
}

.gate-plan {
    overflow: visible;
}

.gate-plan.featured {
    padding-block: 2.3rem;
    border-color: rgba(8,185,201,.58);
    box-shadow: 0 18px 55px rgba(8,185,201,.08);
}

.gate-recommended {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: .3rem .65rem;
    border-radius: 999px;
    background: #13d2df;
    color: #021013;
    font-size: .58rem;
    font-weight: 900;
    white-space: nowrap;
}

.gate-plan h2 { color: #fff; font-size: 1.25rem; }
.gate-plan > p { margin-top: .3rem; color: var(--text-muted); font-size: .72rem; }
.gate-price { display: flex; align-items: baseline; margin-top: 1.2rem; }
.gate-price small { color: var(--text-muted); }
.gate-price strong { margin-left: .3rem; color: #13d2df; font-size: 2.4rem; font-family: var(--font-title); }
.gate-price span { margin-left: .3rem; color: var(--text-muted); font-size: .68rem; }
.gate-plan ul { min-height: 135px; margin: 1.3rem 0; padding: 0; list-style: none; }
.gate-plan li { position: relative; margin: .65rem 0; padding-left: 1.3rem; color: var(--text-secondary); font-size: .7rem; }
.gate-plan li::before { content: "✓"; position: absolute; left: 0; color: #13d2df; }
.gate-plan .btn { width: 100%; justify-content: center; }

.checkout-dialog {
    position: fixed;
    inset: 50% auto auto 50%;
    width: min(500px, calc(100% - 2rem));
    max-height: calc(100dvh - 2rem);
    margin: 0;
    padding: 2rem;
    overflow-y: auto;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(8,185,201,.3);
    border-radius: 20px;
    background:
        radial-gradient(circle at 50% -20%, rgba(8,185,201,.12), transparent 42%),
        #111620;
    color: var(--text-primary);
    box-shadow: 0 30px 100px rgba(0,0,0,.72), 0 0 45px rgba(8,185,201,.08);
}

.checkout-dialog::backdrop {
    background: rgba(2,5,9,.78);
    backdrop-filter: blur(5px);
}

.checkout-modal-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
    border: 1px solid rgba(8,185,201,.25);
    border-radius: 14px;
    background: rgba(8,185,201,.1);
    color: #13d2df;
}

.checkout-modal-icon svg {
    width: 27px;
    height: 27px;
}

.checkout-dialog h2 { margin-top: .25rem; color: #fff; font-size: 1.65rem; }
.checkout-dialog .checkout-modal-lead { margin: .45rem 0 1.2rem; color: var(--text-muted); font-size: .75rem; }

.dialog-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: rgba(255,255,255,.025);
    color: var(--text-secondary);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color .2s, color .2s, background .2s;
}

.dialog-close:hover {
    border-color: rgba(8,185,201,.35);
    background: rgba(8,185,201,.08);
    color: #fff;
}

.checkout-plan-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
    padding: .85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 11px;
    background: rgba(255,255,255,.02);
}

.checkout-plan-summary > div {
    display: flex;
    flex-direction: column;
}

.checkout-plan-summary span {
    color: var(--text-muted);
    font-size: .61rem;
    text-transform: uppercase;
}

.checkout-plan-summary strong {
    margin-top: .2rem;
    color: #fff;
    font-size: .78rem;
}

.checkout-summary-price {
    text-align: right;
}

.checkout-summary-price strong {
    color: #13d2df;
    font-size: .9rem;
}

.checkout-field-help {
    display: block;
    margin-top: .4rem;
    color: var(--text-muted);
    font-size: .62rem;
    line-height: 1.45;
}

.checkout-submit {
    width: 100%;
    min-height: 46px;
    justify-content: center;
    box-shadow: 0 10px 28px rgba(8,185,201,.17);
}

.checkout-security {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: .45rem;
    margin-top: .9rem;
    color: var(--text-muted);
    font-size: .59rem;
    line-height: 1.45;
    text-align: left;
}

.checkout-security svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    color: #34d399;
}

.payment-page {
    min-height: calc(100vh - 8rem);
    display: grid;
    place-items: center;
}

.pix-payment-card {
    width: min(520px, 100%);
    text-align: center;
}

.pix-payment-card h1 { margin-top: .3rem; font-size: 1.7rem; }
.pix-payment-card > p { margin: .45rem 0 1.2rem; color: var(--text-muted); font-size: .75rem; }
.pix-qr { width: 220px; height: 220px; display: block; margin: 1rem auto; padding: .6rem; border-radius: 12px; background: #fff; object-fit: contain; }
.pix-copy { margin: .4rem 0 1rem; text-align: left; }
.payment-value { color: #13d2df; font-family: var(--font-title); font-size: 1.8rem; font-weight: 800; }
.pix-payment-card > small { display: block; margin-top: .3rem; color: var(--text-muted); }
.payment-waiting { display: inline-flex; align-items: center; gap: .55rem; margin-top: 1.4rem; color: #fbbf24; font-size: .72rem; }
.payment-waiting i { width: 9px; height: 9px; border-radius: 50%; background: #fbbf24; animation: pulse 1.5s infinite; }
.payment-success { padding: 2rem 1rem; }
.payment-success > span { width: 54px; height: 54px; display: grid; place-items: center; margin: auto; border-radius: 50%; background: rgba(52,211,153,.12); color: #34d399; font-size: 1.7rem; }
.payment-success p { margin: .5rem 0 1.2rem; color: var(--text-muted); }

@media (max-width: 900px) {
    .gateway-layout,
    .plans-gate-grid {
        grid-template-columns: 1fr;
    }

    .gate-plan.featured {
        padding-block: 1.5rem;
    }
}

@media (max-width: 600px) {
    .gateway-fields-grid {
        grid-template-columns: 1fr;
    }

    .checkout-dialog {
        width: calc(100% - 1.2rem);
        padding: 1.35rem;
        border-radius: 16px;
    }

    .checkout-modal-icon {
        width: 42px;
        height: 42px;
    }
}

/* Page-level mobile fixes. Some legacy views define their desktop grids inline,
   so these declarations intentionally use !important at narrow widths. */
@media (max-width: 760px) {
    .stories-content-grid,
    .comments-content-grid,
    .engagement-charts-grid,
    .feed-fields-grid,
    .scheduler-datetime-grid,
    .viral-highlight-grid,
    .download-result-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .comments-content-grid {
        min-height: 0 !important;
    }

    .comments-content-grid > *,
    .stories-content-grid > *,
    .engagement-charts-grid > *,
    .dashboard-layout > * {
        min-width: 0;
    }

    .comments-card-header,
    .comments-reply-header,
    .comments-reply-actions {
        align-items: stretch !important;
        flex-direction: column;
    }

    .comments-reply-actions .btn,
    .comments-reply-actions .form-control {
        width: 100%;
    }

    .engagement-kpis-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 1rem;
    }

    .card {
        padding: 1rem;
    }

    .media-item-card {
        max-width: 100%;
    }

    .table-container {
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 380px) {
    .main-content {
        padding-inline: .75rem;
    }

    .card {
        padding: .85rem;
        border-radius: 11px;
    }

    .pix-qr {
        width: min(220px, 100%);
        height: auto;
        aspect-ratio: 1;
    }
}
