/* Developer Portal Styles - Extends SeaLegs theme */

/* Import base variables from main site */
:root {
    --primary-blue: #0057A8;
    --primary-blue-dark: #0284c7;
    --secondary-blue: #075985;
    --accent-orange: #FF8504;
    --accent-orange-light: #fed7aa;
    --navy: #1e293b;
    --navy-light: #334155;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Developer portal specific */
    --sidebar-width: 260px;
    --header-height: 70px;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-100);
    overflow-x: hidden;
}

/* ============================================================================
   Navigation (matches main site)
   ============================================================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #595E66;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    height: var(--header-height);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.ai-accent {
    color: var(--accent-orange);
}

.portal-badge {
    background: var(--accent-orange);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-orange);
}

.nav-link.active {
    color: var(--accent-orange);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile sidebar links - hidden on desktop */
.mobile-sidebar-link {
    display: none;
}

/* Mobile Responsive Navigation */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: #595E66;
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links .nav-link {
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }

    .nav-links .nav-link:last-of-type {
        border-bottom: none;
    }

    .nav-links .btn {
        margin-top: 16px;
        text-align: center;
    }

    /* Show mobile sidebar links in dashboard */
    .dashboard-page .mobile-sidebar-link {
        display: block;
    }

    /* Hide desktop sidebar on mobile */
    .dashboard-page .sidebar {
        display: none;
    }

    /* Full width dashboard main content on mobile */
    .dashboard-page .dashboard-main {
        margin-left: 0;
        width: 100%;
    }
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    background: var(--accent-orange);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.nav-user-name {
    color: white;
    font-weight: 500;
    font-size: 14px;
}

.nav-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

/* ============================================================================
   Widget Showcase (Inside Hero Section)
   ============================================================================ */

/* Widget Showcase Container with scroll arrows */
.widget-showcase-container {
    position: relative;
    margin-bottom: 40px;
}

.widget-showcase-row {
    display: flex;
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 12px 16px 12px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    scroll-behavior: smooth;
}

.widget-showcase-row::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.widget-showcase-row > div {
    flex-shrink: 0;
    scroll-snap-align: center;
}

/* Override widget's own width:100% */
.widget-showcase-row .sl-widget,
.widget-showcase-row .sl-widget-mini {
    width: auto !important;
}

/* Scroll arrows - gradient fade with chevron */
.widget-scroll-arrow {
    position: absolute;
    top: 12px;
    height: calc(100% - 24px);
    z-index: 10;
    width: 48px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.widget-scroll-arrow.visible {
    opacity: 1;
    pointer-events: auto;
}

.widget-scroll-left {
    left: 0;
    background: linear-gradient(to right, rgba(100, 116, 139, 0.95) 0%, rgba(100, 116, 139, 0.7) 50%, transparent 100%);
    padding-right: 12px;
}

.widget-scroll-right {
    right: 0;
    background: linear-gradient(to left, rgba(100, 116, 139, 0.95) 0%, rgba(100, 116, 139, 0.7) 50%, transparent 100%);
    padding-left: 12px;
}

.widget-scroll-arrow::after {
    content: '';
    width: 12px;
    height: 12px;
    border-right: 3px solid white;
    border-bottom: 3px solid white;
}

.widget-scroll-left::after {
    transform: rotate(135deg);
    margin-left: 4px;
}

.widget-scroll-right::after {
    transform: rotate(-45deg);
    margin-right: 4px;
}

.widget-scroll-arrow:hover::after {
    border-color: #f97316;
}

/* Mobile: extend row and arrows to edges */
@media (max-width: 768px) {
    .widget-showcase-container {
        margin-left: -16px;
        margin-right: -16px;
    }
    .widget-scroll-arrow {
        width: 36px;
    }
    .widget-scroll-arrow::after {
        width: 10px;
        height: 10px;
        border-width: 2px;
    }
}

/* ============================================================================
   Auth Pages (Login/Signup)
   ============================================================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 32px;
    width: 100%;
    max-width: 440px;
}

.auth-header {
    text-align: center;
    margin-bottom: 20px;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--gray-500);
    font-size: 15px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.form-input {
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 87, 168, 0.1);
}

.form-input::placeholder {
    color: var(--gray-400);
}

.form-input.error {
    border-color: var(--error);
}

.form-error {
    color: var(--error);
    font-size: 13px;
    margin-top: 4px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
}

.btn-primary:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
}

.btn-orange {
    background: var(--accent-orange);
    color: white;
}

.btn-orange:hover {
    background: #e85a00;
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Google Sign-In Button */
.btn-google {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-google:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-google:disabled {
    background: var(--gray-100);
    color: var(--gray-400);
    cursor: not-allowed;
}

.btn-google .google-icon {
    flex-shrink: 0;
}

.btn-google span {
    margin-left: 8px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-full {
    width: 100%;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 4px 0;
}

.auth-divider-line {
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.auth-divider-text {
    color: var(--gray-400);
    font-size: 13px;
}

.auth-footer {
    text-align: center;
    margin-top: 16px;
    color: var(--gray-500);
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

.auth-alert.error {
    background: #fef2f2;
    color: var(--error);
    border: 1px solid #fecaca;
}

.auth-alert.success {
    background: #f0fdf4;
    color: var(--success);
    border: 1px solid #bbf7d0;
}

/* ============================================================================
   Dashboard Layout
   ============================================================================ */

.dashboard-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--header-height);
}

.sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    bottom: 0;
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--gray-200);
    padding: 24px 0;
    overflow-y: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
}

.sidebar-link:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.sidebar-link.active {
    background: rgba(0, 87, 168, 0.1);
    color: var(--primary-blue);
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.sidebar-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 16px;
    margin-bottom: 8px;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px;
    max-width: calc(100% - var(--sidebar-width));
}

/* ============================================================================
   Dashboard Components
   ============================================================================ */

.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--gray-500);
    font-size: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-card-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card-icon.blue {
    background: rgba(0, 87, 168, 0.1);
    color: var(--primary-blue);
}

.stat-card-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-card-icon.orange {
    background: rgba(249, 115, 22, 0.1);
    color: var(--accent-orange);
}

.stat-card-icon.purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.stat-card-label {
    font-size: 14px;
    color: var(--gray-500);
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.card-body {
    padding: 24px;
}

/* ============================================================================
   API Keys
   ============================================================================ */

.api-keys-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.api-key-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: var(--gray-50);
    border-radius: 10px;
    border: 1px solid var(--gray-200);
}

.api-key-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.api-key-name {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 15px;
}

.api-key-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--gray-500);
}

.api-key-value {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 13px;
    background: var(--gray-100);
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--gray-700);
}

.api-key-value.masked {
    letter-spacing: 2px;
}

.api-key-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: white;
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.btn-icon.danger:hover {
    background: #fef2f2;
    border-color: var(--error);
    color: var(--error);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background: #f0fdf4;
    color: var(--success);
}

.status-badge.inactive {
    background: #fef2f2;
    color: var(--error);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ============================================================================
   Modal
   ============================================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.2s;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.modal-body {
    padding: 16px 24px 24px;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* ============================================================================
   Empty States
   ============================================================================ */

.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: var(--gray-300);
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.empty-state-description {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 24px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================================
   Tables
   ============================================================================ */

.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gray-50);
}

.table td {
    font-size: 14px;
    color: var(--gray-700);
}

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

.table tr:hover td {
    background: var(--gray-50);
}

/* ============================================================================
   Loading States
   ============================================================================ */

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* ============================================================================
   Responsive
   ============================================================================ */

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

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

    .main-content {
        margin-left: 0;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

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

    .api-key-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .api-key-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .auth-card {
        padding: 24px;
    }
}

/* ============================================================================
   Footer (matches main site)
   ============================================================================ */

.footer {
    background: #595E66;
    color: white;
    padding: 30px 0 15px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    margin-bottom: 16px;
}

.footer-brand {
    max-width: 280px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.footer-logo-img {
    width: 32px;
    height: 32px;
}

.footer-logo-text {
    font-size: 20px;
    font-weight: 700;
}

.footer-description {
    color: var(--gray-400);
    font-size: 13px;
    line-height: 1.5;
}

.footer-links {
    display: flex;
    gap: 48px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-column-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.footer-link {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-link:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid var(--gray-700);
}

.footer-copyright {
    color: var(--gray-400);
    font-size: 12px;
}

.footer-social-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 12px 0 8px 0;
}

.social-link {
    display: block;
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
    transition: transform 0.3s ease;
}

.social-link:hover {
    transform: translateY(-2px) scale(1.05);
}

.social-link[aria-label*="Facebook"] {
    color: #1877F2;
}

.social-link[aria-label*="Instagram"] {
    color: #E4405F;
}

.social-link[aria-label*="TikTok"] {
    color: #25F4EE;
}

.social-link svg {
    width: 100%;
    height: 100%;
    max-width: 40px;
    max-height: 40px;
    display: block;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 32px;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 32px;
    }
}

/* ============================================================================
   Landing Page - Developer Portal Home
   ============================================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Hero Section */
.dev-hero {
    background: linear-gradient(135deg, #3B5998 0%, #4A6FA5 30%, #5A7FB5 60%, #6A8FC5 100%);
    padding: 86px 0 100px;
    color: white;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.dev-hero h1 {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
    line-height: 1.1;
}

.dev-hero .gradient-text {
    background: linear-gradient(135deg, var(--accent-orange) 0%, #fbbf24 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 48px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: var(--navy);
}

.hero-code-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.hero-code {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 24px;
    text-align: left;
    overflow-x: auto;
}

.code-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-orange);
    margin-bottom: 12px;
}

.hero-code pre {
    margin: 0;
}

.hero-code code {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #e2e8f0;
}

.code-comment {
    color: #94a3b8;
}

@media (max-width: 900px) {
    .hero-code-panels {
        grid-template-columns: 1fr;
    }
}

/* Features Section */
.features-section {
    padding: 100px 0;
    background: var(--gray-100);
}

.section-header-center {
    text-align: center;
    margin-bottom: 60px;
}

.section-header-center h2 {
    font-size: 40px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
    font-family: 'Poppins', sans-serif;
}

.section-header-center p {
    font-size: 18px;
    color: var(--gray-500);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    background: white;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 10px 40px rgba(0, 87, 168, 0.1);
    transform: translateY(-4px);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(0, 87, 168, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary-blue);
}

.feature-icon svg {
    width: 28px;
    height: 28px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--gray-500);
    font-size: 15px;
    line-height: 1.6;
}

/* Pricing Section */
.pricing-section {
    padding: 100px 0;
    background: var(--gray-50);
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.pricing-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    border: 2px solid var(--gray-200);
    position: relative;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.pricing-card .btn {
    margin-top: auto;
}

.pricing-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.pricing-card.featured {
    border-color: var(--primary-blue);
    box-shadow: 0 20px 40px rgba(0, 87, 168, 0.15);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-orange);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--gray-200);
}

.pricing-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.price {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.price-amount {
    font-size: 48px;
    font-weight: 700;
    color: var(--gray-900);
}

.price-unit {
    font-size: 16px;
    color: var(--gray-500);
}

.pricing-features {
    list-style: none;
    margin-bottom: 32px;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    color: var(--gray-700);
    font-size: 15px;
}

.pricing-features svg {
    width: 20px;
    height: 20px;
    color: var(--success);
    flex-shrink: 0;
}

/* Documentation Steps */
.docs-section {
    padding: 100px 0;
    background: white;
}

.docs-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.doc-step {
    display: flex;
    gap: 20px;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.step-content p {
    color: var(--gray-500);
    font-size: 15px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.step-content pre {
    background: var(--gray-100);
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
}

.step-content code {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 13px;
    color: var(--gray-700);
}

.step-content .btn-outline {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    margin-top: 8px;
}

.step-content .btn-outline:hover {
    background: var(--primary-blue);
    color: white;
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
    font-family: 'Poppins', sans-serif;
}

.cta-content p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
}

/* Footer Grid */
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: var(--gray-400);
    font-size: 14px;
    margin-top: 16px;
}

.footer-links h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: white;
}

.footer-links a {
    display: block;
    color: var(--gray-400);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.footer-logo .logo-text {
    font-size: 24px;
    color: white;
}

/* ============================================================================
   Dashboard Page Additional Styles
   ============================================================================ */

.dashboard-page {
    background: var(--gray-100);
}

.dashboard-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px;
}

.dashboard-section {
    display: none;
}

.dashboard-section.active {
    display: block;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.section-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
}

.section-header p {
    color: var(--gray-500);
    margin-top: 4px;
}

/* Stat Cards with Icons */
.stat-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon.balance {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-icon.requests {
    background: rgba(0, 87, 168, 0.1);
    color: var(--primary-blue);
}

.stat-icon.keys {
    background: rgba(249, 115, 22, 0.1);
    color: var(--accent-orange);
}

.stat-icon.widgets {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    min-height: 34px;
    display: flex;
    align-items: center;
}

.stat-value .stat-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top-color: #f97316;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Quick Actions */
.quick-actions h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.action-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(0, 87, 168, 0.1);
}

.action-card svg {
    width: 32px;
    height: 32px;
    color: var(--primary-blue);
}

.action-card span {
    font-weight: 500;
    color: var(--gray-700);
}

/* API Keys List */
.api-key-item.revoked {
    opacity: 0.6;
}

.key-info h4 {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.key-prefix {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 13px;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 4px 8px;
    border-radius: 4px;
}

.key-created {
    font-size: 13px;
    color: var(--gray-400);
    margin-left: 12px;
}

.key-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.key-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.key-status.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.key-status.revoked {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.btn-icon.btn-danger-icon:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border-color: var(--error);
}

/* Usage & Billing */
.usage-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.balance-display {
    text-align: center;
    padding: 24px;
}

.balance-amount {
    font-size: 48px;
    font-weight: 700;
    color: var(--success);
    display: block;
}

.balance-note {
    font-size: 14px;
    color: var(--gray-500);
}

.usage-stats {
    display: flex;
    justify-content: space-around;
    padding: 24px;
}

.usage-stat {
    text-align: center;
}

.usage-label {
    display: block;
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.usage-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

/* Documentation Grid */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.doc-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.doc-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(0, 87, 168, 0.1);
}

.doc-card svg {
    width: 32px;
    height: 32px;
    color: var(--primary-blue);
    margin-bottom: 16px;
}

.doc-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.doc-card p {
    font-size: 14px;
    color: var(--gray-500);
}

/* Modal Adjustments for Dashboard */
/* Prevent body scroll when modal is open */
html.modal-open,
body.modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    max-width: none;
    transform: none;
    overflow: hidden;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 2;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #595E66;
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.modal-spotcast {
    display: inline;
}

.modal-spot {
    color: #ffffff;
    text-shadow: 0 0 8px #f97316;
}

.modal-cast {
    color: #f97316;
}

.modal-close {
    font-size: 24px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    border-radius: 0 0 16px 16px;
    flex-shrink: 0;
}

/* Form elements in dashboard */
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 2px;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: var(--gray-50);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 87, 168, 0.1);
    background: white;
}

.form-group input::placeholder {
    color: var(--gray-400);
}

.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background-color: var(--gray-50);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 87, 168, 0.1);
    background-color: white;
}

.field-hint {
    display: block;
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 2px;
}

.optional {
    font-weight: 400;
    color: var(--gray-400);
}

/* Form options row */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gray-600);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label a {
    color: var(--primary-blue);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.forgot-link {
    font-size: 14px;
    color: var(--primary-blue);
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Form row for side by side fields */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Auth header styles */
.auth-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.auth-header p {
    color: var(--gray-500);
    font-size: 14px;
}

/* Error message */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--error);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
}

/* Button loading state */
.btn-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-loading .spinner {
    width: 20px;
    height: 20px;
    animation: spin 0.8s linear infinite;
}

/* Key display for new API key modal */
.key-display {
    text-align: center;
}

.key-warning {
    background: rgba(249, 115, 22, 0.1);
    color: var(--accent-orange);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

.key-value {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--gray-100);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.key-value code {
    flex: 1;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 14px;
    color: var(--gray-700);
    word-break: break-all;
}

.copy-feedback {
    font-size: 13px;
    color: var(--success);
    opacity: 0;
    transition: opacity 0.2s;
}

.copy-feedback.show {
    opacity: 1;
}

/* Warning text */
.warning-text {
    color: var(--error);
    font-size: 14px;
}

/* Data table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.data-table th {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gray-50);
}

.data-table td {
    font-size: 14px;
    color: var(--gray-700);
}

/* Card header */
.card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
}

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

.card .empty-state {
    padding: 48px 24px;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state h3 {
    border: none;
    padding: 0;
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 20px;
}

/* Sample Widget in Empty State */
.sample-widget-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.sample-widget-container .widget-size-selector {
    margin-bottom: 12px;
}

.sample-widget-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 12px;
    overflow: hidden;
}

.sample-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-size: 48px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 8px;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
    user-select: none;
}

/* Responsive adjustments for landing page */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .dev-hero h1 {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }

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

    .pricing-cards {
        grid-template-columns: 1fr;
    }

    .docs-steps {
        grid-template-columns: 1fr;
    }

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

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

    .usage-cards {
        grid-template-columns: 1fr;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

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

/* Profile Section */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.profile-form {
    padding: 24px;
}

.profile-form .form-group {
    margin-bottom: 20px;
}

.profile-form .btn {
    margin-top: 8px;
}

.success-message {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

/* Nav Profile Button */
.nav-profile-btn {
    width: 36px;
    height: 36px;
    padding: 6px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nav-profile-btn:hover {
    background: var(--gray-100);
    border-color: var(--primary);
}

.nav-profile-btn svg {
    width: 20px;
    height: 20px;
    color: #ffffff;
}

.nav-profile-btn:hover svg {
    color: var(--primary);
}

/* ============================================================================
   Billing Section Styles
   ============================================================================ */

/* Billing Balance Card */
.billing-balance-card {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.billing-balance-card .balance-info {
    text-align: left;
}

.billing-balance-card .balance-label {
    font-size: 14px;
    opacity: 0.9;
    display: block;
    margin-bottom: 4px;
}

.billing-balance-card .balance-amount {
    font-size: 56px;
    font-weight: 700;
    color: white;
    line-height: 1.1;
}

.billing-balance-card .balance-unit {
    font-size: 18px;
    opacity: 0.9;
    margin-left: 8px;
}

.billing-balance-card .balance-stats {
    display: flex;
    gap: 48px;
}

.billing-balance-card .balance-stat {
    text-align: center;
}

.billing-balance-card .balance-stat .stat-value {
    font-size: 28px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    color: white;
}

.billing-balance-card .stat-spinner,
.billing-balance-card .balance-spinner {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: white;
}

.balance-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
}

.balance-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: #f97316;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.billing-balance-card .balance-stat .stat-label {
    font-size: 13px;
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.8);
}

/* Credit Packages Grid */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.package-card {
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    position: relative;
    transition: all 0.2s ease;
}

.package-card:hover {
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 87, 168, 0.1);
}

.package-card.popular {
    border-color: var(--primary-blue);
    background: white;
}

.package-card .popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-blue);
    color: white;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.package-card .package-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.package-card .package-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 4px;
}

.package-card .package-credits {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 20px;
}

.package-card .package-buy-btn {
    width: 100%;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge.completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-badge.failed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

/* Responsive Billing */
@media (max-width: 768px) {
    .billing-balance-card {
        flex-direction: column;
        text-align: center;
    }

    .billing-balance-card .balance-info {
        text-align: center;
    }

    .billing-balance-card .balance-amount {
        font-size: 42px;
    }

    .billing-balance-card .balance-stats {
        gap: 32px;
    }

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

/* =========================================================================
   Widget Section Styles
   ========================================================================= */

/* Widget intro card */
.widget-intro {
    margin-bottom: 24px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.widget-intro::before {
    content: '';
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpolyline points='10 18 4 12 10 6'%3E%3C/polyline%3E%3Cline x1='12' y1='6' x2='12' y2='18'%3E%3C/line%3E%3Cpolyline points='14 18 20 12 14 6'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 22px;
}

.widget-intro p {
    margin: 0;
    color: #0c4a6e;
    line-height: 1.6;
    font-size: 14px;
}

/* Widgets list */
.widgets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Widget item */
.widget-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.widget-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 87, 168, 0.1);
}

.widget-item.widget-inactive {
    opacity: 0.7;
    background: rgba(245, 158, 11, 0.05);
    border-color: var(--warning);
}

/* Widget info */
.widget-info {
    flex: 1;
    min-width: 0;
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.widget-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.widget-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.widget-status.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.widget-status.status-suspended_no_credits {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.widget-status.status-deleted {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.widget-details {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 12px;
    color: var(--text-secondary);
    padding-left: 8px;
    margin-bottom: 8px;
}

.widget-detail-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.widget-detail-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
}

.widget-detail-value {
    font-size: 12px;
    color: var(--text-secondary);
}

.widget-coords {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'SF Mono', Monaco, Inconsolata, monospace;
    font-size: 12px;
}

.widget-coords svg {
    opacity: 0.5;
}

.widget-meta {
    color: var(--text-tertiary);
}

.widget-domains {
    padding: 2px 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-tertiary);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.widget-updated {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Widget actions */
.widget-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Override btn-outline for widget actions (light background context) */
.widget-actions .btn-outline {
    background: #e2e8f0 !important;
    border: 1px solid #94a3b8 !important;
    color: var(--text-secondary);
}

.widget-actions .btn-outline:hover {
    background: var(--accent-orange) !important;
    border-color: var(--accent-orange) !important;
    color: white !important;
}

/* Small buttons */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-sm svg {
    width: 14px;
    height: 14px;
}

/* Modal large variant */
.modal-large .modal-content {
    max-width: 600px;
}

/* Modal preview variant (for widget preview) */
.modal-preview {
    max-width: 800px;
    width: 95%;
}

.preview-note {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0 0 16px 0;
}

.widget-preview-container {
    background: #f5f7fa;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    min-height: 400px;
}

.widget-preview-container iframe {
    width: 100%;
    height: 450px;
    border: none;
    display: block;
}

/* Form row layout */
.form-row {
    margin-bottom: 20px;
}

.form-row:last-of-type {
    margin-bottom: 0;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Modal large body */
.modal-large .modal-body {
    padding: 24px 28px;
}

/* Modal footer button styles */
.modal-footer .btn-outline {
    background: white;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}

.modal-footer .btn-outline:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--gray-700);
}

/* Widget cost info */
.widget-cost-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--primary);
}

.widget-cost-info svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

/* Form sections for widget dialog */
.form-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.form-section:last-of-type {
    margin-bottom: 12px;
    padding-bottom: 0;
    border-bottom: none;
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.form-section-header svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    opacity: 0.7;
}

/* Compact form styling for widget dialogs */
.modal-body .form-row {
    margin-bottom: 12px;
}

.modal-body .form-row:last-child {
    margin-bottom: 0;
}

.modal-body .form-row {
    display: block;
}

.modal-body .form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.modal-body .form-group {
    gap: 0;
}

.modal-body .form-group label {
    font-size: 13px;
}

.modal-body .form-group input,
.modal-body .form-group select {
    padding: 10px 12px;
    font-size: 14px;
}

.modal-body .field-hint {
    font-size: 11px;
    margin-top: 4px;
}

/* Compact checkbox styling */
.form-group-checkbox {
    padding: 8px 12px;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.form-group-checkbox .checkbox-label {
    font-size: 14px;
    font-weight: 500;
}

.form-group-checkbox .field-hint {
    margin-left: 26px;
    margin-top: 2px;
}

/* Compact widget cost info */
.widget-cost-info {
    margin-top: 12px;
    padding: 10px 14px;
    font-size: 12px;
}

/* Mobile responsive for widget dialog */
@media (max-width: 540px) {
    .modal-large .modal-body {
        padding: 16px;
    }

    .form-section {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .form-section-header {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .modal-body .form-row {
        margin-bottom: 10px;
    }

    .modal-body .form-row-2 {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .modal-body .form-group input,
    .modal-body .form-group select {
        padding: 10px 12px;
    }

    .form-group-checkbox {
        padding: 10px;
    }

    .widget-cost-info {
        flex-direction: column;
        text-align: center;
        gap: 6px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .widget-cost-info span {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .widget-cost-info svg {
        margin: 0 auto;
        flex-shrink: 0;
    }

    .modal-footer {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* Embed code display */
.embed-instructions {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.embed-code-container {
    position: relative;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.embed-code-container pre {
    margin: 0;
    padding: 16px;
    padding-right: 50px;
    font-family: 'SF Mono', Monaco, Inconsolata, monospace;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-all;
    overflow-x: auto;
    max-height: 200px;
}

.copy-embed-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.copy-embed-btn:hover {
    background: var(--bg-primary);
    border-color: var(--primary);
}

/* Disabled input styling */
.disabled-input {
    background: var(--bg-secondary) !important;
    color: var(--text-tertiary) !important;
    cursor: not-allowed;
}

/* Responsive widgets */
@media (max-width: 768px) {
    .widget-item {
        flex-direction: column;
        gap: 16px;
    }

    .widget-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .widget-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .widget-domains {
        max-width: 100%;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
    }

    /* Full-screen modals on mobile */
    .modal-large .modal-content {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
        margin: 0;
        overflow: hidden;
    }

    .modal-large .modal-header {
        border-radius: 0;
        flex-shrink: 0;
    }

    .modal-large .modal-body {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 16px;
        -webkit-overflow-scrolling: touch;
    }

    .modal-large .modal-body > * {
        max-width: 100%;
    }

    .modal-large .modal-footer {
        border-radius: 0;
        flex-shrink: 0;
    }

    /* Preview modal specifics */
    .modal-content.modal-preview .widget-preview-container {
        min-height: auto;
    }

    .modal-content.modal-preview .widget-preview-container iframe {
        height: auto;
        min-height: 300px;
    }
}

/* ============================================================================
   Getting Started - Two Path Options
   ============================================================================ */

.getting-started-paths {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 80px;
}

.path-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    border: 2px solid var(--gray-200);
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.path-card .btn {
    margin-top: auto;
}

.path-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 12px 40px rgba(0, 87, 168, 0.12);
    transform: translateY(-4px);
}

.path-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(0, 87, 168, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-blue);
}

.path-icon svg {
    width: 32px;
    height: 32px;
}

.path-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    align-self: center;
}

.path-badge.no-code {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.path-badge.api {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
}

.path-card h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.path-card > p {
    color: var(--gray-500);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.path-widget-preview {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--gray-100);
    border-radius: 12px;
}

.path-code-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 24px;
    text-align: left;
}

.path-code {
    background: var(--gray-800);
    border-radius: 8px;
    padding: 12px;
    overflow: hidden;
}

.path-code .code-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-orange);
    margin-bottom: 8px;
}

.path-code pre {
    margin: 0;
}

.path-code code {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.4;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-word;
}

.path-features {
    list-style: none;
    text-align: left;
    margin-bottom: 28px;
    padding: 0;
}

.path-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--gray-600);
    font-size: 14px;
}

.path-features li::before {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

/* Setup Sections */
.setup-section {
    margin-top: 60px;
    padding-top: 60px;
    border-top: 1px solid var(--gray-200);
}

.setup-title {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 40px;
}

.setup-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.setup-badge.no-code {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.setup-badge.api {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
}

/* Responsive Getting Started */
@media (max-width: 900px) {
    .getting-started-paths {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .path-card {
        padding: 32px;
    }

    .path-code-preview {
        grid-template-columns: 1fr;
    }

    .setup-title {
        font-size: 24px;
        flex-wrap: wrap;
    }
}
