/* =============================================================================
   MEDORA SPT LOGIN STYLES
   MedoraSPT Design System - Exact Implementation
   ============================================================================= */

:root {
    /* SPT Color Palette - EXACT */
    --spt-bg-dark: #0c1624;
    --spt-surface: #f6f7fb;
    --spt-card: #ffffff;
    --spt-card-border: #e1e5f0;
    --spt-primary: #3b82f6;
    --spt-primary-hover: #2563eb;
    --spt-accent: #0ea5e9;
    --spt-text-dark: #0f172a;
    --spt-text-muted: #64748b;
    --spt-text-light: #94a3b8;
    --spt-header-gradient: radial-gradient(circle at top left, #2fa0ff, #05101f);

    /* SPT Semantic Colors */
    --spt-success: #10b981;
    --spt-warning: #f59e0b;
    --spt-danger: #ef4444;

    /* SPT Shadows */
    --spt-shadow-card: 0 4px 14px rgba(15, 23, 42, 0.08);
    --spt-shadow-elevated: 0 8px 24px rgba(15, 23, 42, 0.12);
    --spt-shadow-focus: 0 0 0 3px rgba(59, 130, 246, 0.25);

    /* SPT Spacing */
    --spt-radius: 14px;
    --spt-radius-sm: 10px;
    --spt-radius-lg: 18px;
}

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

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, sans-serif;
    background: var(--spt-bg-dark);
    color: var(--spt-text-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle Background Gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 20% 30%, rgba(47, 160, 255, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 70%, rgba(14, 165, 233, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* =============================================================================
   MAIN CONTAINER - SPT Card Style
   ============================================================================= */

.enterprise-container {
    background: var(--spt-card);
    border: 1px solid var(--spt-card-border);
    border-radius: var(--spt-radius-lg);
    box-shadow: var(--spt-shadow-elevated);
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 2;
    overflow: hidden;
    margin: 1.5rem;
}

/* =============================================================================
   HEADER SECTION - SPT 72px Header with Radial Gradient
   ============================================================================= */

.enterprise-header {
    background: var(--spt-header-gradient);
    padding: 0;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Remove grid pattern - SPT uses clean gradients */
.enterprise-header::before {
    display: none;
}

.logo-section {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-container {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.logo-container:hover {
    transform: scale(1.02);
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px;
}

.logo-text {
    font-size: 1.375rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.01em;
}

.brand-tagline {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.125rem;
    letter-spacing: 0.01em;
}

/* =============================================================================
   TRIAL BANNER - SPT Style
   ============================================================================= */

.trial-status-banner {
    background: linear-gradient(90deg, var(--spt-success) 0%, #059669 100%);
    color: white;
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.8125rem;
    display: none;
    animation: slideDown 0.3s ease;
}

.trial-status-banner.active {
    display: block;
}

.trial-countdown {
    font-size: 0.8125rem;
    font-weight: 600;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================================================
   CONTENT SECTION - SPT Surface Background
   ============================================================================= */

.enterprise-content {
    padding: 1.75rem 2rem 2rem;
    background: var(--spt-surface);
}

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

.section-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--spt-text-dark);
    letter-spacing: -0.01em;
}

.section-subtitle {
    color: var(--spt-text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* =============================================================================
   FORM ELEMENTS - SPT Input Style
   ============================================================================= */

.form-group {
    margin-bottom: 1.125rem;
    position: relative;
}

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

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--spt-card);
    border: 1px solid var(--spt-card-border);
    border-radius: var(--spt-radius-sm);
    color: var(--spt-text-dark);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-input:hover {
    border-color: #cbd5e1;
}

.form-input:focus {
    border-color: var(--spt-primary);
    box-shadow: var(--spt-shadow-focus);
    outline: none;
}

.form-input::placeholder {
    color: var(--spt-text-light);
}

/* =============================================================================
   SPECIALTY GRID - SPT Card Style
   ============================================================================= */

.specialty-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.625rem;
    margin-top: 0.5rem;
}

.specialty-option {
    padding: 0.875rem 0.5rem;
    background: var(--spt-card);
    border: 1px solid var(--spt-card-border);
    border-radius: var(--spt-radius-sm);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    color: var(--spt-text-muted);
    font-weight: 500;
}

.specialty-option:hover:not(.disabled) {
    border-color: var(--spt-primary);
    background: rgba(59, 130, 246, 0.04);
    color: var(--spt-text-dark);
    transform: translateY(-1px);
}

.specialty-option.selected {
    border-color: var(--spt-primary);
    background: var(--spt-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.specialty-option.disabled {
    pointer-events: none;
    opacity: 0.4;
    background: var(--spt-surface);
}

.specialty-option i {
    display: block;
    font-size: 1.125rem;
    margin-bottom: 0.375rem;
}

/* =============================================================================
   BUTTONS - SPT Primary Button Style
   ============================================================================= */

.enterprise-btn {
    width: 100%;
    padding: 0.8125rem 1.5rem;
    background: var(--spt-primary);
    color: white;
    border: none;
    border-radius: var(--spt-radius-sm);
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.enterprise-btn:hover:not(:disabled) {
    background: var(--spt-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.enterprise-btn:active:not(:disabled) {
    transform: translateY(0);
}

.enterprise-btn:disabled {
    background: var(--spt-text-light);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.enterprise-btn .loading-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Secondary / Navigation Button - SPT Style */
.nav-btn {
    background: var(--spt-card);
    border: 1px solid var(--spt-card-border);
    color: var(--spt-text-muted);
    padding: 0.625rem 1rem;
    border-radius: var(--spt-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.nav-btn:hover {
    border-color: var(--spt-primary);
    color: var(--spt-primary);
    background: rgba(59, 130, 246, 0.04);
}

.form-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem;
}

/* =============================================================================
   VERIFICATION CODE INPUT - SPT Style
   ============================================================================= */

.verification-code {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.code-digit {
    width: 48px;
    height: 54px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--spt-card);
    border: 1px solid var(--spt-card-border);
    border-radius: var(--spt-radius-sm);
    color: var(--spt-text-dark);
    transition: all 0.2s ease;
}

.code-digit:focus {
    border-color: var(--spt-primary);
    box-shadow: var(--spt-shadow-focus);
    outline: none;
}

/* =============================================================================
   MESSAGES / ALERTS - SPT Style
   ============================================================================= */

.message {
    padding: 0.75rem 1rem;
    border-radius: var(--spt-radius-sm);
    margin: 1rem 0;
    font-size: 0.8125rem;
    display: none;
    animation: fadeIn 0.3s ease;
    line-height: 1.4;
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--spt-success);
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--spt-danger);
}

.message.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--spt-primary);
}

/* =============================================================================
   ENTERPRISE FEATURES BOX - SPT Card Style
   ============================================================================= */

.enterprise-features {
    background: var(--spt-card);
    border-radius: var(--spt-radius);
    padding: 1.125rem 1.25rem;
    margin: 1.25rem 0;
    border: 1px solid var(--spt-card-border);
    box-shadow: var(--spt-shadow-card);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    color: var(--spt-text-muted);
    font-weight: 500;
    transition: all 0.2s ease;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-item:hover {
    color: var(--spt-text-dark);
    transform: translateX(3px);
}

.feature-icon {
    width: 28px;
    height: 28px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--spt-primary);
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* =============================================================================
   TRUST INDICATORS - SPT Footer Style
   ============================================================================= */

.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--spt-card-border);
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.6875rem;
    color: var(--spt-text-light);
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
}

.trust-item:hover {
    color: var(--spt-primary);
}

.trust-item i {
    font-size: 1.125rem;
    color: var(--spt-primary);
    margin-bottom: 0.375rem;
    opacity: 0.7;
}

.trust-item:hover i {
    opacity: 1;
}

/* =============================================================================
   FORM STEP TRANSITIONS
   ============================================================================= */

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: stepFadeIn 0.3s ease;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =============================================================================
   LEGACY LINKS - SPT Style
   ============================================================================= */

.legacy-fallback {
    margin-top: 1.125rem;
    padding-top: 1rem;
    border-top: 1px solid var(--spt-card-border);
    text-align: center;
}

.legacy-link {
    color: var(--spt-text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.legacy-link:hover {
    color: var(--spt-primary);
}

/* =============================================================================
   CHECKBOX STYLING - SPT Style
   ============================================================================= */

.form-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    accent-color: var(--spt-primary);
    cursor: pointer;
    vertical-align: middle;
}

.form-group input[type="checkbox"] + label {
    font-size: 0.8125rem;
    color: var(--spt-text-muted);
    cursor: pointer;
    vertical-align: middle;
}

/* =============================================================================
   STRIPE CARD ELEMENT - SPT Style
   ============================================================================= */

#card-element {
    padding: 0.875rem 1rem;
    background: var(--spt-card);
    border: 1px solid var(--spt-card-border);
    border-radius: var(--spt-radius-sm);
    transition: all 0.2s ease;
}

#card-element.StripeElement--focus {
    border-color: var(--spt-primary);
    box-shadow: var(--spt-shadow-focus);
}

#card-errors {
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 540px) {
    .enterprise-container {
        margin: 1rem;
        border-radius: var(--spt-radius);
        max-width: none;
    }

    .enterprise-header {
        height: 64px;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .brand-tagline {
        font-size: 0.6875rem;
    }

    .enterprise-content {
        padding: 1.5rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

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

    .verification-code {
        gap: 0.375rem;
    }

    .code-digit {
        width: 42px;
        height: 48px;
        font-size: 1.1rem;
    }

    .trust-indicators {
        gap: 1.25rem;
    }

    .trust-item {
        font-size: 0.625rem;
    }

    .trust-item i {
        font-size: 1rem;
    }
}

@media (max-width: 380px) {
    .specialty-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .specialty-option {
        padding: 0.75rem 0.25rem;
        font-size: 0.6875rem;
    }

    .specialty-option i {
        font-size: 1rem;
    }
}

/* =============================================================================
   ACCESSIBILITY
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--spt-primary);
    outline-offset: 2px;
}

/* =============================================================================
   DEPRECATED - Legacy Logo Styles (keep for backward compat)
   ============================================================================= */

.medora-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
}

.medora-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.medora-logo img {
    width: 44px;
    height: 44px;
    filter: brightness(0) invert(1);
}

.medora-logo .fallback-icon {
    font-size: 1.75rem;
    color: white;
    display: none;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}
