/* ============================================================
   Enterprise Registration Page Styles
   Matches speedaai.com brand + language switcher style
   ============================================================ */

:root {
    --primary-color: #0068B7;
    --secondary-color: #2EC4B6;
    --accent-color: #00B4A6;
    --dark-bg: #0D1B2A;
    --text-dark: #1A2E4A;
    --text-light: #5A6B7D;
    --border-color: #D4E0E8;
    --bg-light: #F8FAFB;
    --white: #ffffff;
    --error: #E74C3C;
    --success: #27AE60;
    --shadow: 0 4px 20px rgba(13, 27, 42, 0.08);
    --shadow-lg: 0 10px 40px rgba(13, 27, 42, 0.12);
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Header (matches speedaai.com navbar style) ── */
.header {
    background: linear-gradient(135deg, var(--dark-bg), #1a2d4a);
    padding: 0.9rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 960px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.6rem;
}
.logo-img { height: 36px; width: auto; }
.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

/* ── Language Switcher (matches speedaai.com) ── */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 4px 10px;
}

.lang-option {
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    transition: all 0.2s ease;
    user-select: none;
}

.lang-option:hover {
    color: rgba(255, 255, 255, 0.9);
}

.lang-option.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.2);
}

.lang-divider {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
}

/* ── Main ── */
.main {
    flex: 1;
    padding: 2.5rem 0 3rem;
}

/* ── Form Card ── */
.form-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
}

.form-header { text-align: center; margin-bottom: 2rem; }
.form-header h1 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}
.form-subtitle { color: var(--text-light); font-size: 0.95rem; }

/* ── Form Sections ── */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.form-section:last-of-type { border-bottom: none; }

.section-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.2rem;
}

.step-badge {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Form Groups ── */
.form-group {
    margin-bottom: 1rem;
}
.form-group.half { flex: 1; }

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.required { color: var(--error); }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: var(--white);
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 104, 183, 0.1);
}

.form-group input:read-only {
    background: var(--bg-light);
    color: var(--text-light);
}

.field-hint {
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ── Enterprise ID row ── */
.eid-row {
    display: flex;
    gap: 0.8rem;
}

.eid-input {
    flex: 1;
    font-family: 'Courier New', monospace !important;
    font-weight: 700 !important;
    letter-spacing: 1px;
    font-size: 1.05rem !important;
    color: var(--primary-color) !important;
}

/* ── Buttons ── */
.btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: var(--white);
    box-shadow: 0 4px 12px rgba(46, 196, 182, 0.25);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(46, 196, 182, 0.35);
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: var(--white);
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
}
.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-lg {
    padding: 0.9rem 2.5rem;
    font-size: 1.05rem;
    border-radius: 50px;
    width: 100%;
}

/* ── Plan Grid ── */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.plan-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--white);
}
.plan-card:hover {
    border-color: var(--secondary-color);
    box-shadow: var(--shadow);
}
.plan-card.active {
    border-color: var(--primary-color);
    background: linear-gradient(180deg, rgba(0, 104, 183, 0.04), var(--white));
    box-shadow: 0 0 0 3px rgba(0, 104, 183, 0.1);
}

.plan-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.plan-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.4rem;
}
.plan-price .currency { font-size: 0.85rem; }
.plan-price .period { font-size: 0.75rem; color: var(--text-light); font-weight: 400; }

.plan-features {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.4rem;
}

.plan-feat {
    font-size: 0.75rem;
    color: var(--text-light);
}

.plan-desc {
    font-size: 0.78rem;
    color: var(--text-light);
    line-height: 1.4;
    padding-top: 0.3rem;
    border-top: 1px solid var(--border-color);
}

/* ── Prepaid Section ── */
.prepaid-section {
    margin-top: 1rem;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}

.toggle-label input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--primary-color);
}

.toggle-hint {
    font-size: 0.8rem;
    color: var(--text-light);
}

.date-row {
    display: flex;
    gap: 1rem;
}

/* ── Submit ── */
.form-actions {
    margin-top: 1.5rem;
    text-align: center;
}

.spinner {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Success Panel ── */
.success-panel {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    width: 72px; height: 72px;
    background: var(--success);
    color: var(--white);
    border-radius: 50%;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

.success-panel h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.success-eid {
    background: var(--bg-light);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    display: inline-block;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border: 1px dashed var(--primary-color);
}

.success-eid strong {
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.success-msg {
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.success-hint {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 2rem;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ── Footer ── */
.footer {
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    text-align: center;
}

.footer p {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* ── Toast / Alert ── */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.toast.success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.toast.info {
    background: #DBEAFE;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .form-card { padding: 1.5rem; }
    .plan-grid { grid-template-columns: 1fr; }
    .date-row { flex-direction: column; gap: 0; }
    .eid-row { flex-direction: column; }
    .success-actions { flex-direction: column; align-items: center; }
    .header-text { display: none; }
    .header-right { gap: 0.5rem; }
}
