/* ===========================================
   GATEWAY PAGES STYLES
   L402 Gateway: landing, register, dashboard, catalog
   =========================================== */

/* ===== PAGE LOAD ANIMATIONS ===== */
/* fadeInUp provided by bundle.css (modals component) */

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== GATEWAY COLOR TOKENS ===== */
.gateway-page {
    --gw-primary: #9945ff;
    --gw-light: #b36dff;
    --gw-dark: #7c2ff0;
    --gw-glow: rgba(153, 69, 255, 0.18);
    --gw-glow-subtle: rgba(153, 69, 255, 0.06);
    --gw-border: rgba(153, 69, 255, 0.2);
    --gw-border-hover: rgba(153, 69, 255, 0.25);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== BUILD SECTION BUTTON OVERRIDE ===== */
.gateway-page .btn-build {
    background: linear-gradient(135deg, var(--gw-primary), var(--gw-dark)) !important;
}

.gateway-page .btn-build:hover {
    background: linear-gradient(135deg, var(--gw-light), var(--gw-primary)) !important;
}

/* ===== HERO SECTION ===== */
.gateway-hero {
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(153, 69, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 15% 70%, rgba(153, 69, 255, 0.05) 0%, transparent 35%),
        radial-gradient(circle at 85% 30%, rgba(153, 69, 255, 0.06) 0%, transparent 30%),
        linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 3.5rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Noise texture overlay */
.gateway-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
}

.gateway-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 10%, var(--color-lightning), transparent 90%);
}

.gateway-hero-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.gateway-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(153, 69, 255, 0.12);
    color: var(--gw-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    margin-bottom: 1.25rem;
    border: 1px solid var(--gw-border);
    animation: fadeInUp 0.5s ease-out both;
}

.gateway-hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.875rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    animation: fadeInUp 0.5s ease-out 0.1s both;
}

.gateway-hero-title .highlight {
    background: linear-gradient(135deg, var(--gw-primary), var(--gw-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.gateway-hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    animation: fadeInUp 0.5s ease-out 0.2s both;
}

.gateway-hero-actions {
    display: flex;
    justify-content: center;
    gap: 0.875rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.5s ease-out 0.35s both;
}

/* Compact hero for sub-pages */
.gateway-hero--compact {
    padding-bottom: 2rem;
}

/* ===== HOW-IT-WORKS STEPS ===== */
.gateway-steps-section {
    padding: 3.5rem 2rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.gateway-steps-section .section-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.gateway-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.gateway-step {
    text-align: center;
    padding: 1.5rem 1rem;
}

.gateway-step .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #9945ff, var(--color-lightning));
    color: var(--color-black);
    font-weight: 800;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.gateway-step h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.gateway-step p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== PRICING SECTION ===== */
.gateway-pricing {
    padding: 3.5rem 2rem;
    background: var(--bg-primary);
    text-align: center;
}

.gateway-pricing .section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.gateway-pricing .section-subtitle {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.gateway-pricing-card {
    max-width: 480px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(42, 42, 42, 0.4) 0%, rgba(26, 26, 26, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    padding: 2rem;
    animation: scaleIn 0.5s ease-out both;
}

.pricing-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.9375rem;
}

.pricing-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pricing-item:first-child {
    padding-top: 0;
}

.pricing-label {
    color: var(--text-secondary);
    font-weight: var(--font-medium);
}

.pricing-value {
    color: var(--text-primary);
    font-weight: var(--font-semibold);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.pricing-highlight {
    background: rgba(153, 69, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    margin: 0.5rem -1rem;
}

.pricing-highlight .pricing-label {
    color: var(--gw-light);
    font-weight: var(--font-semibold);
}

.pricing-highlight .pricing-value {
    color: var(--gw-primary);
    font-size: 1.125rem;
    font-weight: var(--font-bold);
}

/* ===== REGISTRATION FORM ===== */
.gateway-form-section {
    padding: 3rem 2rem;
    background: var(--bg-secondary);
}

.gateway-form-section .section-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.625rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.gateway-form-section .section-subtitle {
    text-align: center;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.gateway-form {
    max-width: 600px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(42, 42, 42, 0.4) 0%, rgba(26, 26, 26, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    padding: 2rem;
    animation: scaleIn 0.4s ease-out both;
}

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

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

.form-hint {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 0.3rem;
    font-weight: 400;
}

.form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.form-group--wide {
    flex: 2;
}

.form-group--narrow {
    flex: 1;
}

.gateway-form input,
.gateway-form select,
.gateway-form textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

.gateway-form input::placeholder,
.gateway-form textarea::placeholder {
    color: var(--text-muted);
}

.gateway-form input:focus,
.gateway-form select:focus,
.gateway-form textarea:focus {
    outline: none;
    border-color: var(--gw-primary);
    box-shadow: 0 0 0 3px rgba(153, 69, 255, 0.15);
}

.gateway-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

.test-result {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.test-result.success {
    color: #4ade80;
}

.test-result.error {
    color: #f87171;
}

.btn-submit {
    width: 100%;
    margin-top: 1rem;
    justify-content: center;
}

/* ===== SUCCESS STATE ===== */
.gateway-success {
    padding: 4rem 2rem;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-card {
    max-width: 560px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(42, 42, 42, 0.4) 0%, rgba(26, 26, 26, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    animation: scaleIn 0.5s ease-out both;
}

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #4ade80;
    margin-bottom: 1.25rem;
}

.success-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.success-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.gateway-url-display {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.gateway-url-display label {
    display: block;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
}

.gateway-url-display code {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--gw-light);
    word-break: break-all;
}

.success-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== AUTH REQUIRED ===== */
.gateway-auth-required {
    padding: 4rem 2rem;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-required-card {
    max-width: 460px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(42, 42, 42, 0.4) 0%, rgba(26, 26, 26, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    animation: scaleIn 0.5s ease-out both;
}

.auth-required-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: rgba(153, 69, 255, 0.12);
    border: 1px solid var(--gw-border);
    color: var(--gw-primary);
    margin-bottom: 1.25rem;
}

.auth-required-card h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-required-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* ===== DASHBOARD ===== */
.gateway-dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

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

.dashboard-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

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

/* ===== ENDPOINT CARDS (DASHBOARD) ===== */
.gateway-endpoint-card {
    background: linear-gradient(180deg, rgba(42, 42, 42, 0.4) 0%, rgba(26, 26, 26, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: scaleIn 0.4s ease-out both;
}

.gateway-endpoint-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gw-primary), var(--color-lightning));
    opacity: 0;
    transition: opacity 0.3s;
}

.gateway-endpoint-card:hover {
    transform: translateY(-4px);
    border-color: var(--gw-border);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.gateway-endpoint-card:hover::before {
    opacity: 1;
}

.gateway-endpoint-card:nth-child(1) { animation-delay: 0.05s; }
.gateway-endpoint-card:nth-child(2) { animation-delay: 0.1s; }
.gateway-endpoint-card:nth-child(3) { animation-delay: 0.15s; }
.gateway-endpoint-card:nth-child(4) { animation-delay: 0.2s; }
.gateway-endpoint-card:nth-child(5) { animation-delay: 0.25s; }

.endpoint-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
    flex-wrap: wrap;
}

.endpoint-card-name-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.endpoint-card-name {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary);
}

.endpoint-card-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ===== GATEWAY URL COPY ROW ===== */
.gateway-url-copy {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0.75rem 0;
}

.gateway-url-copy code {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--gw-light);
    background: rgba(153, 69, 255, 0.08);
    border: 1px solid rgba(153, 69, 255, 0.15);
    padding: 0.3125rem 0.625rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.gateway-url-copy .btn-copy {
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-xs);
    padding: 0.3125rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.gateway-url-copy .btn-copy:hover {
    border-color: var(--gw-primary);
    color: var(--gw-primary);
}

/* ===== ENDPOINT STATS ===== */
.endpoint-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1.5rem;
    margin: 1rem 0;
}

.endpoint-stat {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.endpoint-stat .stat-value {
    font-size: 1.5rem;
    font-weight: var(--font-bold);
    color: var(--gw-primary);
    line-height: 1.2;
}

.endpoint-stat .stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: var(--font-medium);
}

/* ===== ENDPOINT ACTIONS ===== */
.endpoint-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

/* ===== STATUS BADGES ===== */
.status-badge {
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.status-badge--active {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.status-badge--paused {
    background: rgba(255, 193, 7, 0.12);
    color: rgba(255, 193, 7, 0.85);
    border: 1px solid rgba(255, 193, 7, 0.25);
}

/* ===== PUBLIC CATALOG SECTION ===== */
.gateway-catalog-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

.gateway-catalog-section .section-header {
    margin-bottom: 1.5rem;
}

.gateway-catalog-section .section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin-bottom: 0.375rem;
}

.gateway-catalog-section .section-header p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.gateway-catalog-filters {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.gateway-catalog-filters label {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    white-space: nowrap;
}

.gateway-catalog-filters select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 0.5rem 2.25rem 0.5rem 0.875rem;
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.gateway-catalog-filters select:focus {
    outline: none;
    border-color: var(--gw-primary);
    box-shadow: 0 0 0 3px rgba(153, 69, 255, 0.15);
}

.gateway-catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

/* ===== CATALOG CARDS ===== */
.gateway-catalog-card {
    background: linear-gradient(180deg, rgba(42, 42, 42, 0.4) 0%, rgba(26, 26, 26, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.4s ease-out both;
}

.gateway-catalog-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gw-primary), var(--color-lightning));
    opacity: 0;
    transition: opacity 0.3s;
}

.gateway-catalog-card:hover {
    transform: translateY(-4px);
    border-color: var(--gw-border);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.gateway-catalog-card:hover::before {
    opacity: 1;
}

.gateway-catalog-card:nth-child(1) { animation-delay: 0.05s; }
.gateway-catalog-card:nth-child(2) { animation-delay: 0.1s; }
.gateway-catalog-card:nth-child(3) { animation-delay: 0.15s; }
.gateway-catalog-card:nth-child(4) { animation-delay: 0.2s; }
.gateway-catalog-card:nth-child(5) { animation-delay: 0.25s; }
.gateway-catalog-card:nth-child(6) { animation-delay: 0.3s; }

.catalog-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.catalog-card-name {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary);
}

.catalog-card-description {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    flex: 1;
}

.catalog-card-meta {
    margin: 0.75rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    background: rgba(153, 69, 255, 0.1);
    color: var(--gw-light);
    border: 1px solid rgba(153, 69, 255, 0.18);
    border-radius: var(--radius-full);
    padding: 0.1875rem 0.625rem;
    letter-spacing: 0.01em;
}

.catalog-card-owner {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ===== PRICE BADGES (gateway variant) ===== */
.gateway-page .price-badge {
    font-size: 0.75rem;
    font-weight: var(--font-bold);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
    flex-shrink: 0;
}

.gateway-page .price-badge--low {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.gateway-page .price-badge--mid {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.gateway-page .price-badge--high {
    background: rgba(153, 69, 255, 0.12);
    color: #b794f6;
    border: 1px solid rgba(153, 69, 255, 0.2);
}

/* ===== PAGINATION ===== */
.gateway-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.gateway-pagination .page-btn {
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.gateway-pagination .page-btn:hover {
    border-color: var(--gw-primary);
    color: var(--gw-primary);
}

.gateway-pagination .page-btn.active {
    background: rgba(153, 69, 255, 0.12);
    border-color: var(--gw-border);
    color: var(--gw-primary);
    font-weight: var(--font-bold);
}

.gateway-pagination .page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.gateway-pagination .page-btn:disabled:hover {
    border-color: var(--border-default);
    color: var(--text-secondary);
}

.pagination-info {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* ===== EMPTY STATE ===== */
.gateway-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.gateway-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.gateway-empty h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.gateway-empty p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 380px;
    margin: 0 auto 1.5rem;
}

/* ===== CTA SECTION ===== */
.gateway-cta {
    padding: 4rem 2rem;
    text-align: center;
    background: var(--bg-secondary);
}

.gateway-cta h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.gateway-cta p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.0625rem;
}

.gateway-cta .cta-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== DANGER BUTTON ===== */
.btn-danger {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
}

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

/* ===== RESPONSIVE: 768px ===== */
@media (max-width: 768px) {
    .gateway-hero {
        padding: 2.5rem 1.5rem 3rem;
    }

    .gateway-hero-title {
        font-size: 2.25rem;
    }

    .gateway-hero-subtitle {
        font-size: 1rem;
    }

    .gateway-steps-section {
        padding: 2.5rem 1.5rem;
    }

    .gateway-steps-section .section-title {
        font-size: 1.5rem;
    }

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

    .gateway-step {
        padding: 1rem;
    }

    .gateway-pricing {
        padding: 2.5rem 1.5rem;
    }

    .gateway-form-section {
        padding: 2.5rem 1.5rem;
    }

    .gateway-form {
        padding: 1.5rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-group--wide,
    .form-group--narrow {
        flex: unset;
        width: 100%;
    }

    .gateway-dashboard {
        padding: 2rem 1.5rem;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .gateway-catalog-section {
        padding: 2rem 1.5rem;
    }

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

    .gateway-catalog-filters {
        flex-direction: column;
        align-items: flex-start;
    }

    .gateway-cta {
        padding: 3rem 1.5rem;
    }

    .gateway-cta h2 {
        font-size: 1.5rem;
    }
}

/* ===== RESPONSIVE: 480px ===== */
@media (max-width: 480px) {
    .gateway-hero {
        padding: 2rem 1rem 2.5rem;
    }

    .gateway-hero-title {
        font-size: 1.875rem;
    }

    .gateway-hero-subtitle {
        font-size: 0.9375rem;
    }

    .gateway-hero-actions {
        flex-direction: column;
    }

    .gateway-page .btn-lg {
        width: 100%;
        justify-content: center;
    }

    .gateway-steps-section {
        padding: 2rem 1rem;
    }

    .gateway-pricing {
        padding: 2rem 1rem;
    }

    .gateway-pricing-card {
        padding: 1.5rem 1.25rem;
    }

    .gateway-form-section {
        padding: 2rem 1rem;
    }

    .gateway-form {
        padding: 1.25rem 1rem;
    }

    .gateway-dashboard {
        padding: 1.5rem 1rem;
    }

    .gateway-endpoint-card {
        padding: 1.25rem;
    }

    .endpoint-actions {
        flex-direction: column;
    }

    .endpoint-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .gateway-catalog-section {
        padding: 1.5rem 1rem;
    }

    .gateway-catalog-card {
        padding: 1.25rem;
    }

    .success-card,
    .auth-required-card {
        padding: 2rem 1.25rem;
    }

    .success-actions {
        flex-direction: column;
    }

    .success-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .gateway-cta {
        padding: 2.5rem 1rem;
    }

    .gateway-cta .cta-actions {
        flex-direction: column;
    }

    .gateway-cta .cta-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
