/* CobWeb CRM — public registration wizard (/register) */
.register-wizard-page {
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 500;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: regFadeInUp 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reg-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.reg-logo {
    display: block;
    max-width: min(320px, 88vw);
    width: 100%;
    height: auto;
    margin: 0 auto 1.5rem;
    object-fit: contain;
}

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

.register-wizard-page h1 {
    font-weight: 800;
    font-size: 2.125rem;
    line-height: 1.3;
    text-align: center;
    color: #1a202c;
    margin: 0 0 0.65rem;
}

.register-wizard-page .reg-header .reg-subtitle {
    margin-bottom: 0;
}

.register-wizard-page .reg-subtitle {
    text-align: center;
    color: #475569;
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.5;
    margin-bottom: 1.75rem;
}

.reg-agreement-box {
    max-height: 280px;
    overflow-y: auto;
    padding: 1rem 1.15rem;
    margin-bottom: 1.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-align: right;
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.65;
}

.reg-agreement-box p {
    margin: 0 0 0.75rem;
}

.reg-agreement-box p:last-child {
    margin-bottom: 0;
}

.reg-agreement-intro {
    font-size: 1rem !important;
    margin-bottom: 1rem !important;
}

.reg-agreement-accept {
    margin-top: 0.5rem;
}

.reg-agreement-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    cursor: pointer;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.45;
}

.reg-agreement-check input {
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: #2d3748;
}

.reg-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 0;
}

.reg-progress-track {
    position: absolute;
    top: 14px;
    right: 12%;
    left: 12%;
    height: 3px;
    background: #e2e8f0;
    border-radius: 2px;
    z-index: 0;
}

.reg-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2d3748, #4a5568);
    border-radius: 2px;
    width: 0%;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.reg-progress-wrap {
    position: relative;
    margin-bottom: 2rem;
}

.reg-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #cbd5e1;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: all 0.35s ease;
}

.reg-step-dot.active {
    border-color: #2d3748;
    background: #2d3748;
    color: #fff;
    transform: scale(1.08);
}

.reg-step-dot.done {
    border-color: #2d3748;
    background: #2d3748;
    color: #fff;
}

.reg-steps-row {
    display: flex;
    justify-content: space-between;
    padding: 0 4%;
    position: relative;
    z-index: 1;
}

.reg-panel {
    display: none;
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.reg-panel.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
    animation: regPanelIn 0.4s ease forwards;
}

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

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

.reg-form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 0.5rem;
}

.reg-form-group input {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.reg-form-group input:focus {
    outline: none;
    border-color: #4a5568;
    box-shadow: 0 0 0 3px rgba(45, 55, 72, 0.12);
}

.reg-step-label {
    font-weight: 800;
    font-size: 1rem;
    color: #1a202c;
    margin: 0 0 0.35rem;
}

.reg-step-hint {
    margin-bottom: 1rem !important;
    font-size: 0.95rem !important;
}

.reg-step-hint a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: underline;
}

.reg-mt {
    margin-top: 1.5rem !important;
}

.reg-plan-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 520px) {
    .reg-plan-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.reg-plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 0.85rem;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    text-align: right;
}

.reg-plan-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.reg-plan-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.reg-plan-card.is-selected,
.reg-plan-card:has(input:checked) {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
}

.reg-plan-card--featured {
    border-color: #c7d2fe;
}

.reg-plan-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
}

.reg-plan-name {
    font-weight: 800;
    font-size: 1.05rem;
    color: #0f172a;
}

.reg-plan-desc {
    font-size: 0.78rem;
    line-height: 1.45;
    color: #64748b;
    font-weight: 500;
    min-height: 2.5em;
}

.reg-plan-price {
    font-weight: 800;
    font-size: 1rem;
    color: #2563eb;
    margin-top: 0.25rem;
}

.reg-plan-price small {
    font-weight: 600;
    font-size: 0.75rem;
    color: #64748b;
}

.reg-btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}

.reg-user-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.reg-counter-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
}

.reg-counter-btn:hover:not(:disabled) {
    background: #f1f5f9;
}

.reg-counter-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.reg-counter-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a202c;
    min-width: 3rem;
    text-align: center;
}

.reg-price-summary {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
    color: #475569;
}

.reg-price-summary strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a202c;
    margin-top: 0.25rem;
}

.reg-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.reg-btn {
    flex: 1;
    min-height: 48px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
}

.reg-btn:active {
    transform: scale(0.98);
}

.reg-btn-primary {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(45, 55, 72, 0.25);
}

.reg-btn-primary:disabled {
    opacity: 0.6;
    cursor: wait;
}

.reg-btn-secondary {
    background: #fff;
    color: #475569;
    border: 1.5px solid #e2e8f0;
}

.reg-payment-frame-wrap {
    width: 100%;
    min-height: 420px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    margin-top: 1rem;
}

.reg-payment-frame-wrap iframe {
    width: 100%;
    min-height: 420px;
    border: 0;
}

.reg-alert {
    padding: 0.875rem 1.125rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.5;
}

.reg-alert.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.reg-alert.success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.reg-auth-links {
    text-align: center;
    margin-top: 2rem;
    font-weight: 600;
    font-size: 1.15rem;
    line-height: 1.6;
    color: #475569;
}

.reg-auth-links a {
    color: #1e3a5f;
    font-weight: 800;
    font-size: 1.2rem;
    text-decoration: none;
}

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

.reg-not-configured {
    text-align: center;
    padding: 1.25rem 1rem;
    color: #475569;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.55;
}

.reg-payment-pending-banner {
    margin-bottom: 1.25rem;
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    font-size: 1.05rem;
}

@media (min-width: 769px) {
    .register-wizard-page {
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    .register-wizard-page h1 {
        font-size: 1.75rem;
    }

    .register-wizard-page .reg-subtitle {
        font-size: 1.05rem;
    }

    .reg-auth-links {
        font-size: 1.05rem;
    }

    .reg-auth-links a {
        font-size: 1.1rem;
    }

    .reg-logo {
        max-width: 260px;
        margin-bottom: 1.25rem;
    }
    .reg-actions {
        flex-direction: column-reverse;
    }
    .reg-btn {
        width: 100%;
    }
}
