/**
 * ============================================================================
 * SMMStore Master Design System (assets/css/style.css)
 * Modern Commercial SaaS + Digital Services Marketplace
 * ============================================================================
 */

:root {
    /* Brand Color System (Configurable Tokens) */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-active: #1e40af;
    --primary-light: #eff6ff;
    --primary-border: #bfdbfe;
    --primary-glow: rgba(37, 99, 235, 0.15);

    --accent: #0ea5e9;
    --accent-light: #f0f9ff;

    --success: #10b981;
    --success-hover: #059669;
    --success-light: #ecfdf5;
    --success-border: #a7f3d0;
    --success-text: #065f46;

    --warning: #f59e0b;
    --warning-hover: #d97706;
    --warning-light: #fffbeb;
    --warning-border: #fde68a;
    --warning-text: #92400e;

    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: #fef2f2;
    --danger-border: #fecaca;
    --danger-text: #991b1b;

    --info: #3b82f6;
    --info-light: #eff6ff;
    --info-border: #bfdbfe;
    --info-text: #1e40af;

    /* Neutral & Background Surface Palette */
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-subtle: #f1f5f9;
    --bg-muted: #e2e8f0;

    --text-main: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;
    --text-white: #ffffff;

    --border-color: #e2e8f0;
    --border-subtle: #f1f5f9;
    --border-focus: #3b82f6;

    /* Typography Scale */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    --text-xs: 0.75rem;
    /* 12px */
    --text-sm: 0.875rem;
    /* 14px */
    --text-base: 1rem;
    /* 16px */
    --text-lg: 1.125rem;
    /* 18px */
    --text-xl: 1.25rem;
    /* 20px */
    --text-2xl: 1.5rem;
    /* 24px */
    --text-3xl: 1.875rem;
    /* 30px */
    --text-4xl: 2.25rem;
    /* 36px */
    --text-5xl: 3rem;
    /* 48px */

    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;

    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;

    /* Spacing System */
    --space-1: 0.25rem;
    /* 4px */
    --space-2: 0.5rem;
    /* 8px */
    --space-3: 0.75rem;
    /* 12px */
    --space-4: 1rem;
    /* 16px */
    --space-5: 1.25rem;
    /* 20px */
    --space-6: 1.5rem;
    /* 24px */
    --space-8: 2rem;
    /* 32px */
    --space-10: 2.5rem;
    /* 40px */
    --space-12: 3rem;
    /* 48px */
    --space-16: 4rem;
    /* 64px */
    --space-20: 5rem;
    /* 80px */

    /* Elevation & Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);

    /* Border Radius */
    --radius-sm: 0.375rem;
    /* 6px */
    --radius-md: 0.5rem;
    /* 8px */
    --radius-lg: 0.75rem;
    /* 12px */
    --radius-xl: 1rem;
    /* 16px */
    --radius-2xl: 1.5rem;
    /* 24px */
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout Dimensions */
    --header-height: 72px;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --max-width: 1280px;
}

/* ==========================================================================
   Base & Reset Styles
   ========================================================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--text-body);
    background-color: var(--bg-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-x: clip;
    width: 100%;
    max-width: 100%;
    position: relative;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    -webkit-overflow-scrolling: touch;
}

/* Typography Hierarchy */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    letter-spacing: -0.02em;
}

h1 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-4);
}

h2 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-3);
}

h3 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-3);
}

h4 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

h5 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
}

h6 {
    font-size: var(--text-base);
    margin-bottom: var(--space-1);
}

p {
    margin-bottom: var(--space-4);
    color: var(--text-body);
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

img,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: var(--space-6) 0;
}

/* ==========================================================================
   Layout Containers & Grid System
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

.container-sm {
    max-width: 800px;
}

.container-lg {
    max-width: 1400px;
}

.container-fluid {
    max-width: 100%;
}

.section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
}

.section-sm {
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
}

.grid {
    display: grid;
    gap: var(--space-6);
    min-width: 0;
    max-width: 100%;
}

.grid > * {
    min-width: 0;
    max-width: 100%;
}

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

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

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

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

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

@media (max-width: 768px) {
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.justify-end {
    justify-content: flex-end;
}

.gap-1 {
    gap: var(--space-1);
}

.gap-2 {
    gap: var(--space-2);
}

.gap-3 {
    gap: var(--space-3);
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.flex-1 {
    flex: 1 1 0%;
}

/* ==========================================================================
   Buttons System
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.625rem 1.25rem;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    line-height: 1.25;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
    transition: all var(--transition-fast);
    user-select: none;
}

.btn:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--text-white);
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: var(--text-white);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

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

.btn-secondary {
    background-color: var(--bg-surface);
    color: var(--text-body);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-subtle);
    border-color: var(--text-subtle);
    color: var(--text-main);
}

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

.btn-outline:hover {
    background-color: var(--primary-light);
    color: var(--primary-hover);
}

.btn-success {
    background-color: var(--success);
    color: var(--text-white);
}

.btn-success:hover {
    background-color: var(--success-hover);
    color: var(--text-white);
}

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

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: var(--text-xs);
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: var(--text-base);
    border-radius: var(--radius-lg);
}

.btn-block {
    width: 100%;
}

.btn-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 50%;
    margin-top: -0.5rem;
    margin-left: -0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    border-top-color: currentColor;
    animation: spin 0.6s linear infinite;
}

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

/* ==========================================================================
   Form Controls & Inputs
   ========================================================================== */

.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-main);
    margin-bottom: var(--space-2);
}

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-control,
.form-select,
.form-textarea {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--text-main);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control:disabled,
.form-select:disabled {
    background-color: var(--bg-subtle);
    color: var(--text-muted);
    cursor: not-allowed;
}

.form-control::placeholder {
    color: var(--text-subtle);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-1);
}

.form-error {
    font-size: var(--text-xs);
    color: var(--danger);
    margin-top: var(--space-1);
    font-weight: var(--font-medium);
}

.input-group {
    position: relative;
    display: flex;
    width: 100%;
}

.input-group .form-control {
    flex: 1 1 auto;
    width: 1%;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.875rem;
    font-size: var(--text-sm);
    color: var(--text-muted);
    background-color: var(--bg-subtle);
    border: 1px solid var(--border-color);
}

.input-group .input-group-text:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 0;
}

.input-group .form-control:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group .input-group-text:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 0;
}

.input-group .form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Password Toggle Wrapper */
.password-field-wrapper {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: var(--text-xs);
    padding: 4px;
}

.password-toggle-btn:hover {
    color: var(--text-main);
}

/* Custom Checkboxes and Radios */
.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    cursor: pointer;
}

.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    accent-color: var(--primary);
}

/* ==========================================================================
   Cards & Surfaces
   ========================================================================== */

.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    max-width: 100%;
    min-width: 0;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
    max-width: 100%;
}

.card-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-main);
    margin-bottom: 0;
    word-break: break-word;
}

.card-subtitle {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 2px;
}

.card-body {
    padding: var(--space-6);
    max-width: 100%;
    min-width: 0;
}

.card-footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-subtle);
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-border);
}

/* ==========================================================================
   Badges & Status Indicators
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.25rem 0.625rem;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    line-height: 1;
    border-radius: var(--radius-full);
    text-transform: capitalize;
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.badge-warning {
    background-color: var(--warning-light);
    color: var(--warning-text);
    border: 1px solid var(--warning-border);
}

.badge-danger {
    background-color: var(--danger-light);
    color: var(--danger-text);
    border: 1px solid var(--danger-border);
}

.badge-info {
    background-color: var(--info-light);
    color: var(--info-text);
    border: 1px solid var(--info-border);
}

.badge-neutral {
    background-color: var(--bg-subtle);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

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

/* ==========================================================================
   Alerts & Notifications
   ========================================================================== */

.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-size: var(--text-sm);
    margin-bottom: var(--space-5);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
}

.alert-content {
    flex: 1;
}

.alert-success {
    background-color: var(--success-light);
    border-color: var(--success-border);
    color: var(--success-text);
}

.alert-error,
.alert-danger {
    background-color: var(--danger-light);
    border-color: var(--danger-border);
    color: var(--danger-text);
}

.alert-warning {
    background-color: var(--warning-light);
    border-color: var(--warning-border);
    color: var(--warning-text);
}

.alert-info {
    background-color: var(--info-light);
    border-color: var(--info-border);
    color: var(--info-text);
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    font-size: var(--text-base);
    line-height: 1;
}

.alert-close:hover {
    opacity: 1;
}

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

.table-wrapper,
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--bg-surface);
    box-shadow: var(--shadow-xs);
    margin-bottom: var(--space-4);
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: var(--text-sm);
}

.table th {
    padding: var(--space-3) var(--space-4);
    font-weight: var(--font-semibold);
    color: var(--text-muted);
    background-color: var(--bg-subtle);
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-size: var(--text-xs);
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.table td {
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-body);
    vertical-align: middle;
    word-break: break-word;
}

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

.table-hover tbody tr:hover {
    background-color: var(--bg-subtle);
}

/* ==========================================================================
   Modals & Dialogs
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.modal-backdrop.active,
#numberConfirmModal.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.modal {
    background-color: var(--bg-surface);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 540px;
    max-height: calc(100vh - 2rem);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform var(--transition-normal);
    border: 1px solid var(--border-color);
    position: relative;
}

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

/* Any form inside modal must be a flex container taking available height */
.modal > form,
.modal form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    margin: 0;
}

.modal-header {
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: var(--bg-surface);
}

.modal-title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--text-main);
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.modal-close-btn:hover {
    color: var(--text-main);
    background-color: var(--bg-subtle);
}

.modal-body {
    padding: var(--space-5) var(--space-6);
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.modal-footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-subtle);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

/* ==========================================================================
   Dropdowns
   ========================================================================== */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 200px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2) 0;
    z-index: 100;
    display: none;
    list-style: none;
}

.dropdown-menu.active {
    display: block;
    animation: dropdownFadeIn 0.15s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.5rem 1rem;
    font-size: var(--text-sm);
    color: var(--text-body);
    text-decoration: none;
    transition: background-color var(--transition-fast);
}

.dropdown-item:hover {
    background-color: var(--bg-subtle);
    color: var(--text-main);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: var(--space-1) 0;
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */

.toast-container {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    max-width: 380px;
    pointer-events: none;
}

@media (max-width: 640px) {
    .toast-container {
        left: var(--space-4);
        right: var(--space-4);
        bottom: var(--space-4);
        max-width: none;
    }
}

.toast {
    background-color: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-4);
    font-size: var(--text-sm);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    pointer-events: auto;
    animation: toastSlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transition: all var(--transition-fast);
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}

.toast-warning {
    border-left-color: var(--warning);
}

.toast-info {
    border-left-color: var(--info);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================================================
   Skeleton Loaders & Empty States
   ========================================================================== */

.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeletonLoading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: var(--space-2);
}

.skeleton-card {
    height: 120px;
}

.empty-state {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    opacity: 0.6;
}

.empty-state-title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--text-main);
    margin-bottom: var(--space-2);
}

.empty-state-text {
    font-size: var(--text-sm);
    max-width: 420px;
    margin: 0 auto var(--space-6);
}

/* ==========================================================================
   Public Header & Footer Navigation
   ========================================================================== */

.site-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
    gap: var(--space-3);
}

.brand-logo {
    font-size: var(--text-xl);
    font-weight: var(--font-extrabold);
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    letter-spacing: -0.03em;
    min-width: 0;
    flex-shrink: 1;
}

.brand-logo span:nth-child(2) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-logo .brand-badge {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: var(--text-xs);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: var(--font-bold);
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    list-style: none;
}

.nav-link {
    color: var(--text-body);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

@media (max-width: 768px) {
    .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-links,
    .nav-actions .btn-login {
        display: none;
    }

    .nav-links.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--bg-surface);
        border-bottom: 1px solid var(--border-color);
        padding: var(--space-4);
        box-shadow: var(--shadow-lg);
        gap: var(--space-4);
        z-index: 999;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .brand-logo {
        font-size: 15px;
        gap: 6px;
    }

    .brand-logo .brand-badge {
        display: none;
    }

    .nav-actions {
        gap: 6px;
    }

    .nav-actions .btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}

.site-footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding-top: var(--space-16);
    padding-bottom: var(--space-8);
    margin-top: auto;
    font-size: var(--text-sm);
}

.site-footer h5 {
    color: #ffffff;
    font-size: var(--text-base);
    margin-bottom: var(--space-4);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.footer-links a {
    color: #94a3b8;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    margin-top: var(--space-12);
    padding-top: var(--space-6);
    border-top: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
}

/* ==========================================================================
   Marketplace Rows & Category Navigation (Social Xtra-Inspired Density)
   ========================================================================== */

.marketplace-categories-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 8px 2px 14px;
    margin-bottom: 20px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.marketplace-categories-bar::-webkit-scrollbar {
    height: 4px;
}

.marketplace-categories-bar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.marketplace-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 13px;
    font-weight: var(--font-medium);
    color: var(--text-body);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.marketplace-cat-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.marketplace-cat-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    font-weight: var(--font-bold);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.marketplace-cat-pill .cat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: var(--font-bold);
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    color: inherit;
}

.marketplace-cat-pill.active .cat-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Marketplace Horizontal Item Row */
.marketplace-row {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-default, 14px);
    padding: 14px 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.marketplace-row:hover {
    border-color: var(--primary-border);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.marketplace-row-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.product-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px var(--primary-glow);
}

.product-title-area {
    min-width: 0;
}

.product-clean-title {
    font-size: 15px;
    font-weight: var(--font-bold);
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.product-feature-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.product-feature-tag {
    font-size: 11px;
    font-weight: var(--font-medium);
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--bg-subtle);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.product-feature-tag.highlight {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary-border);
    font-weight: var(--font-semibold);
}

.marketplace-row-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.product-price-box {
    text-align: right;
    min-width: 100px;
}

.product-price-amount {
    font-size: 16px;
    font-weight: var(--font-extrabold);
    color: var(--primary);
    line-height: 1.1;
}

.product-stock-status {
    font-size: 11px;
    font-weight: var(--font-semibold);
    color: var(--text-muted);
    margin-top: 2px;
}

.product-stock-status.in-stock {
    color: var(--success);
}

.product-stock-status.low-stock {
    color: var(--warning);
}

.product-stock-status.out-of-stock {
    color: var(--danger);
}

/* Touch-Friendly Quantity Stepper */
.marketplace-qty-stepper {
    display: inline-flex;
    align-items: center;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2px;
}

.stepper-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 14px;
    font-weight: var(--font-bold);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s ease;
    user-select: none;
}

.stepper-btn:hover {
    background: var(--bg-surface);
    color: var(--primary);
}

.stepper-input {
    width: 36px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 13px;
    font-weight: var(--font-bold);
    color: var(--text-main);
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.btn-buy-instant {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: var(--font-bold);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px var(--primary-glow);
    white-space: nowrap;
}

.btn-buy-instant:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-preview-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 12px;
    font-weight: var(--font-semibold);
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-preview-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* Product Share Button */
.btn-share-product {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #7c3aed;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.btn-share-product:hover {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.7);
    color: #6d28d9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}

/* Country Priority Chips */
.country-chips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.country-chip {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.country-chip:hover,
.country-chip.active {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.country-chip-flag {
    font-size: 24px;
    line-height: 1;
}

.country-chip-name {
    font-size: 13px;
    font-weight: var(--font-bold);
    color: var(--text-main);
}

.country-chip-rate {
    font-size: 11px;
    color: var(--text-muted);
}

/* Mobile Responsive Rules for Marketplace Rows */
@media (max-width: 768px) {
    .marketplace-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px;
        max-width: 100%;
        min-width: 0;
    }

    .marketplace-row-left {
        width: 100%;
        min-width: 0;
    }

    .marketplace-row-right {
        width: 100%;
        min-width: 0;
        justify-content: space-between;
        padding-top: 10px;
        border-top: 1px solid var(--border-subtle);
        flex-wrap: wrap;
        gap: 8px;
    }

    .product-price-box {
        text-align: left;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .marketplace-row {
        padding: 12px;
    }

    .product-clean-title {
        font-size: 14px;
    }

    .btn-buy-instant {
        padding: 6px 12px;
        font-size: 12px;
    }

    .country-chips-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 8px;
    }
}

@media (max-width: 360px) {
    .country-chips-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   PUBLIC MARKETING & STOREFRONT DESIGN SYSTEM
   ========================================================================== */

/* Public Hero Section */
.public-hero-section {
    padding: var(--space-16) 0 var(--space-12);
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-body) 100%);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.hero-grid {
    gap: var(--space-12);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    max-width: 100%;
    word-break: break-word;
}

.hero-heading {
    font-size: clamp(1.75rem, 5.5vw, 3.25rem);
    font-weight: var(--font-extrabold);
    line-height: 1.18;
    letter-spacing: -0.03em;
    color: var(--text-main);
    margin-bottom: var(--space-4);
    word-break: break-word;
    overflow-wrap: break-word;
}

.hero-heading span.gradient-text {
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: var(--text-lg);
    color: var(--text-muted);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-8);
    max-width: 540px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.hero-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
    width: 100%;
}

.hero-trust-bullets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-color);
    font-size: var(--text-sm);
    color: var(--text-body);
}

.hero-trust-bullets div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-trust-bullets svg,
.hero-trust-bullets span.check {
    color: var(--primary);
    font-weight: var(--font-bold);
}

.tab-navigation {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.tab-navigation::-webkit-scrollbar {
    display: none;
}

.tab-navigation .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .public-hero-section {
        padding: var(--space-10) 0 var(--space-8);
    }

    .hero-grid {
        gap: var(--space-8) !important;
    }
}

@media (max-width: 480px) {
    .public-hero-section {
        padding: var(--space-8) 0 var(--space-6);
    }

    .hero-heading {
        font-size: 1.55rem;
        line-height: 1.25;
        letter-spacing: -0.02em;
    }

    .hero-heading span.gradient-text {
        display: inline-block;
        max-width: 100%;
    }

    .hero-description {
        font-size: 14px;
        line-height: 1.55;
        margin-bottom: var(--space-5);
    }

    .hero-actions-row {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
        margin-bottom: var(--space-5);
    }

    .hero-actions-row .btn {
        width: 100%;
        padding: 12px 16px !important;
        font-size: 14px;
        justify-content: center;
        text-align: center;
    }

    .hero-trust-bullets {
        gap: 10px;
        padding-top: var(--space-4);
        font-size: 12px;
    }

    .hero-trust-bullets div {
        flex: 1 1 calc(50% - 10px);
        min-width: 130px;
    }
}

/* Trust Stats Ribbon */
.stats-ribbon {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-6) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
    text-align: center;
}

.stat-item-number {
    font-size: var(--text-3xl);
    font-weight: var(--font-extrabold);
    color: var(--primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.stat-item-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* 3 Core Category Showcase Cards */
.category-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.category-showcase-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-default, 16px);
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text-main);
    position: relative;
    overflow: hidden;
}

.category-showcase-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.category-showcase-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border-color);
    transition: background 0.2s ease;
}

.category-showcase-card:hover::before {
    background: var(--primary);
}

.category-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: var(--space-4);
}

.category-card-title {
    font-size: var(--text-xl);
    font-weight: var(--font-extrabold);
    color: var(--text-main);
    margin-bottom: var(--space-2);
}

.category-card-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: var(--leading-normal);
    margin-bottom: var(--space-6);
    flex: 1;
}

.category-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-subtle);
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: var(--font-semibold);
}

.category-card-cta {
    font-weight: var(--font-bold);
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* FAQ Accordions */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.faq-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-default, 14px);
    padding: var(--space-5);
    transition: border-color 0.2s ease;
}

.faq-card:hover {
    border-color: var(--primary);
}

.faq-q {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--text-main);
    margin-bottom: var(--space-2);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.faq-q span {
    color: var(--primary);
    font-weight: var(--font-extrabold);
}

.faq-a {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: var(--leading-relaxed);
    padding-left: 22px;
}

/* API Docs Layout */
.api-docs-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: var(--space-8);
    align-items: start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.api-docs-grid > main,
.api-endpoint-card {
    min-width: 0;
    max-width: 100%;
}

.api-sidebar-nav {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-default, 14px);
    padding: var(--space-4);
    position: sticky;
    top: 80px;
    max-width: 100%;
    min-width: 0;
}

.api-nav-item {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.api-nav-item:hover,
.api-nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

.api-endpoint-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-default, 14px);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}

.api-method-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.api-method-badge.post {
    background: #e0f2fe;
    color: #0369a1;
}

.api-method-badge.get {
    background: #dcfce7;
    color: #15803d;
}

.api-code-block {
    background: #0f172a;
    color: #e2e8f0;
    font-family: var(--font-mono);
    font-size: 12px;
    padding: var(--space-4);
    border-radius: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    line-height: 1.5;
    margin: var(--space-3) 0;
    max-width: 100%;
    min-width: 0;
    word-break: break-all;
    white-space: pre-wrap;
}

/* Call To Action Banner */
.public-cta-banner {
    background: linear-gradient(135deg, var(--bg-sidebar, #0f172a) 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: var(--radius-default, 20px);
    padding: var(--space-12) var(--space-8);
    text-align: center;
    margin: var(--space-12) 0;
    position: relative;
    overflow: hidden;
    max-width: 100%;
    min-width: 0;
}

.public-cta-banner h2 {
    color: #ffffff;
    font-size: var(--text-3xl);
    font-weight: var(--font-extrabold);
    margin-bottom: var(--space-3);
    word-break: break-word;
}

.public-cta-banner p {
    color: #94a3b8;
    font-size: var(--text-base);
    max-width: 580px;
    margin: 0 auto var(--space-6);
}

/* Mobile Breakpoints */
@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-showcase-grid {
        grid-template-columns: 1fr;
    }

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

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

    .api-sidebar-nav {
        position: static;
        margin-bottom: var(--space-6);
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-4);
    }

    .stat-item-number {
        font-size: var(--text-2xl);
    }

    .public-cta-banner {
        padding: var(--space-8) var(--space-4);
        border-radius: 14px;
    }

    .grid-4, .grid-3, .grid-2 {
        grid-template-columns: minmax(0, 1fr) !important;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}