/* ============================================================
   Registration Module – Brand Portal
   ============================================================ */

/* ── Anchor buttons: match <button> spacing exactly ── */
.registration-layout a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1.5;
    text-decoration: none;
}

/* ── Backdrop ── */
.reg-backdrop {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 25%, rgba(0,230,118,.13) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 75%, rgba(0,180,80,.08)  0%, transparent 45%),
        linear-gradient(160deg, #0d1a11 0%, #0a1410 50%, #0b160e 100%);
    z-index: 0;
    pointer-events: none;
}

.registration-layout {
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Shared nav bar ── */
.reg-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 18px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10,20,14,.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0,230,118,.10);
}

.reg-navbar .nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    opacity: .92;
    transition: opacity .18s;
}

.reg-navbar .nav-brand:hover {
    opacity: 1;
}

.reg-navbar .nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ============================================================
   Landing Page
   ============================================================ */
.reg-landing {
    position: relative;
    z-index: 1;
    padding-top: 90px;
}

/* Hero */
.reg-hero {
    text-align: center;
    padding: 80px 20px 60px;
    max-width: 820px;
    margin: 0 auto;
}

.reg-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,230,118,.14);
    border: 1px solid rgba(0,230,118,.35);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 28px;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.reg-hero h1 {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    color: #f0f5f2;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -.5px;
}

.reg-hero h1 .accent {
    color: var(--primary-color);
}

.reg-hero .hero-sub {
    font-size: 18px;
    color: #8aaa96;
    line-height: 1.7;
    max-width: 580px;
    margin: 0 auto 36px;
}

.reg-hero .hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Features grid */
.reg-features {
    padding: 60px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.reg-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.reg-feature-card {
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(0,230,118,.12);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: border-color var(--transition), background var(--transition);
}

.reg-feature-card:hover {
    border-color: rgba(0,230,118,.35);
    background: rgba(0,230,118,.06);
}

.reg-feature-icon {
    width: 44px;
    height: 44px;
    background: rgba(0,230,118,.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--primary-color);
    font-size: 18px;
}

.reg-feature-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: #eaf5ef;
    margin-bottom: 8px;
}

.reg-feature-card p {
    font-size: 13px;
    color: #7a9e8a;
    line-height: 1.65;
    margin: 0;
}

/* How it works */
.reg-steps {
    padding: 60px 20px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.reg-steps-list {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    margin-top: 40px;
    position: relative;
}

.reg-step {
    flex: 1;
    max-width: 200px;
    position: relative;
    padding: 0 10px;
}

.reg-step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #000;
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    position: relative;
    z-index: 1;
}

.reg-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: calc(50% + 20px);
    right: calc(-50% + 20px);
    height: 2px;
    background: rgba(0,230,118,.3);
}

[dir="rtl"] .reg-step:not(:last-child)::after {
    left: calc(-50% + 20px);
    right: calc(50% + 20px);
}

.reg-step h5 {
    font-size: 14px;
    font-weight: 700;
    color: #eaf5ef;
    margin-bottom: 6px;
}

.reg-step p {
    font-size: 12px;
    color: #7a9e8a;
    margin: 0;
    line-height: 1.6;
}

/* Section headers */
.reg-section-title {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    color: #eaf5ef;
    margin-bottom: 8px;
}

.reg-section-sub {
    font-size: 15px;
    color: #7a9e8a;
}

/* CTA banner */
.reg-cta-banner {
    margin: 40px 20px 80px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(135deg, rgba(0,230,118,.14) 0%, rgba(0,90,200,.08) 100%);
    border: 1px solid rgba(0,230,118,.25);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    text-align: center;
}

.reg-cta-banner h2 {
    font-size: 26px;
    font-weight: 800;
    color: #eaf5ef;
    margin-bottom: 12px;
}

.reg-cta-banner p {
    color: #8aaa96;
    font-size: 15px;
    margin-bottom: 28px;
}

/* ============================================================
   Wizard
   ============================================================ */
.reg-wizard-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 90px 20px 60px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.reg-wizard-container {
    width: 100%;
    max-width: 640px;
}

/* ── Stepper ── */
.wizard-stepper {
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px;
}

.wizard-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 72px;
}

.wizard-step-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(0,230,118,.2);
    color: #5a8a6a;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .25s ease;
    background: rgba(0,230,118,.06);
}

.wizard-step-dot.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(0,230,118,.12);
    box-shadow: 0 0 0 4px rgba(0,230,118,.12);
}

.wizard-step-dot.done {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #000;
}

.wizard-step-line {
    flex: 1;
    height: 2px;
    background: rgba(0,230,118,.15);
    transition: background .3s ease;
    margin-top: 20px;
    align-self: flex-start;
}

.wizard-step-line.done {
    background: rgba(0,230,118,.5);
}

.wizard-step-label {
    font-size: 11.5px;
    color: #5a8a6a;
    text-align: center;
    transition: color .25s;
    font-weight: 500;
    white-space: nowrap;
}

.wizard-step-label.active { color: var(--primary-color); font-weight: 600; }
.wizard-step-label.done   { color: rgba(0,200,100,.85); }

/* Wizard panel */
.wizard-panel {
    display: none;
    animation: fadeSlideIn .25s ease;
}

.wizard-panel.active { display: block; }

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wizard-panel-title {
    font-size: 20px;
    font-weight: 700;
    color: #eaf5ef;
    margin-bottom: 4px;
}

.wizard-panel-sub {
    font-size: 13px;
    color: #7a9e8a;
    margin-bottom: 28px;
}

/* Form card */
.wizard-card {
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(0,230,118,.13);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.password-strength {
    margin-top: 8px;
}

.password-strength-bar {
    height: 4px;
    background: rgba(255,255,255,.08);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.password-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width .3s ease, background .3s ease;
}

.password-strength-text {
    font-size: 11px;
    color: #7a9e8a;
}

/* Inline document viewer */
.doc-inline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.doc-inline-label {
    font-size: 13px;
    font-weight: 600;
    color: #c8e0d2;
}

.doc-scroll-hint {
    font-size: 11px;
    color: #6a9a7a;
    transition: opacity .3s;
}

.doc-scroll-hint.hidden {
    opacity: 0;
    pointer-events: none;
}

.doc-scroll-box {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid rgba(0,230,118,.12);
    border-radius: var(--radius-md, 8px);
    padding: 20px 22px;
    background: rgba(0,0,0,.25);
    font-size: 13px;
    color: #8aaa96;
    line-height: 1.75;
    transition: border-color .25s;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,230,118,.25) transparent;
}

.doc-scroll-box::-webkit-scrollbar       { width: 5px; }
.doc-scroll-box::-webkit-scrollbar-track { background: transparent; }
.doc-scroll-box::-webkit-scrollbar-thumb { background: rgba(0,230,118,.25); border-radius: 3px; }

.doc-scroll-box.doc-scroll-done {
    border-color: rgba(0,230,118,.4);
}

.doc-scroll-box h1, .doc-scroll-box h2, .doc-scroll-box h3 {
    color: #c8e0d2;
    font-size: 14px;
    font-weight: 700;
    margin: 16px 0 6px;
}

.doc-scroll-box h1:first-child, .doc-scroll-box h2:first-child { margin-top: 0; }

.doc-scroll-box p  { margin: 0 0 10px; }
.doc-scroll-box ul { padding-left: 18px; margin-bottom: 10px; }

.doc-accept-row {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(0,230,118,.04);
    border: 1px solid rgba(0,230,118,.10);
    border-radius: var(--radius-md, 8px);
}

.doc-accept-row .form-check-input:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.doc-accept-row .form-check-label {
    cursor: pointer;
}

/* Summary step */
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,230,118,.08);
    font-size: 13px;
}

.summary-row:last-child { border-bottom: none; }

.summary-label { color: #7a9e8a; }
.summary-value { color: #eaf5ef; font-weight: 500; }

/* Wizard actions */
.wizard-actions {
    margin-top: 28px;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

/* ============================================================
   Status pages (LinkExpired, AlreadyVerified)
   ============================================================ */
.reg-status-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.reg-status-card {
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(0,230,118,.13);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    text-align: center;
    max-width: 480px;
    width: 100%;
}

.reg-status-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 24px;
}

.reg-status-icon.expired  { background: rgba(255,85,85,.14);  color: #ff7070; border: 1px solid rgba(255,85,85,.25); }
.reg-status-icon.verified { background: rgba(0,230,118,.14); color: var(--primary-color); border: 1px solid rgba(0,230,118,.3); }

.reg-status-card h2 { font-size: 22px; font-weight: 700; color: #eaf5ef; margin-bottom: 10px; }
.reg-status-card p  { font-size: 14px; color: #7a9e8a; margin-bottom: 28px; line-height: 1.7; }

/* ============================================================
   Document viewer (Terms/Privacy)
   ============================================================ */
.reg-doc-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 90px 20px 60px;
}

.reg-doc-container {
    max-width: 780px;
    margin: 0 auto;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(0,230,118,.13);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.reg-doc-container h1, .reg-doc-container h2, .reg-doc-container h3 { color: #eaf5ef; }
.reg-doc-container p, .reg-doc-container li { color: #8aaa96; line-height: 1.8; font-size: 14px; }

/* ============================================================
   File upload areas (logo / trade license)
   ============================================================ */
.reg-upload-area {
    position: relative;
    border: 1.5px dashed rgba(0,230,118,.22);
    border-radius: var(--radius-md, 8px);
    background: rgba(0,230,118,.03);
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    overflow: hidden;
}

.reg-upload-area:hover {
    border-color: rgba(0,230,118,.5);
    background: rgba(0,230,118,.06);
}

.reg-upload-area.has-file {
    border-color: rgba(0,230,118,.45);
    border-style: solid;
    background: rgba(0,230,118,.05);
}

.reg-upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.reg-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    color: #5a8a6a;
    padding: 16px;
    text-align: center;
}

.reg-upload-placeholder i    { font-size: 22px; color: rgba(0,230,118,.6); }
.reg-upload-placeholder span { font-size: 13px; }
.reg-upload-placeholder small { font-size: 11px; color: #4a7a5a; }

.reg-upload-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    pointer-events: none;
    width: 100%;
}

.reg-upload-preview img {
    max-height: 64px;
    max-width: 100%;
    border-radius: 6px;
    object-fit: contain;
}

.reg-upload-filename {
    font-size: 12px;
    color: #8aaa96;
    word-break: break-all;
    text-align: center;
    max-width: 100%;
}

.reg-upload-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 3;
    background: rgba(0,0,0,.5);
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 11px;
    cursor: pointer;
    pointer-events: all;
    transition: background .15s;
}

.reg-upload-remove:hover { background: rgba(220,53,69,.7); color: #fff; }

.reg-upload-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7a9e8a;
    font-size: 13px;
    pointer-events: none;
}

/* ============================================================
   Success confirmation step
   ============================================================ */
.wizard-success-card {
    padding: 48px 40px !important;
    text-align: center;
}

.wizard-success {
    text-align: center;
}

.wizard-success-icon {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: rgba(0,230,118,.12);
    border: 2px solid rgba(0,230,118,.3);
    color: var(--primary-color);
    font-size: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
}

.wizard-success h2 { font-size: 24px; font-weight: 700; color: #eaf5ef; margin-bottom: 12px; }
.wizard-success p  { font-size: 14px; color: #8aaa96; line-height: 1.75; max-width: 380px; margin: 0 auto; }

/* ============================================================
   Form overrides for green-dark theme
   ============================================================ */
.registration-layout .form-label {
    color: #c8e0d2;
    font-weight: 500;
}

.registration-layout .form-label .text-muted {
    color: #5a8a6a !important;
}

.registration-layout .form-control,
.registration-layout .form-select {
    background-color: rgba(0,0,0,.35);
    border-color: rgba(0,230,118,.18);
    color: #e8f5ee;
}

.registration-layout .form-control:focus,
.registration-layout .form-select:focus {
    background-color: rgba(0,0,0,.40);
    border-color: var(--primary-color);
    color: #f0fff8;
    box-shadow: 0 0 0 3px rgba(0,230,118,.14);
}

.registration-layout .form-control::placeholder {
    color: #3d6b4d;
    opacity: 1;
}

.registration-layout .form-select option {
    background: #0f1e14;
    color: #e8f5ee;
}

/* Input group – eye-toggle button */
.registration-layout .input-group .btn-outline-secondary {
    border-color: rgba(0,230,118,.18);
    color: #5a8a6a;
    background: rgba(0,0,0,.25);
}

.registration-layout .input-group .btn-outline-secondary:hover {
    background: rgba(0,230,118,.08);
    color: #c8e0d2;
    border-color: rgba(0,230,118,.4);
}

.registration-layout .input-group:focus-within .form-control {
    border-color: var(--primary-color);
}

.registration-layout .input-group:focus-within .btn-outline-secondary {
    border-color: var(--primary-color);
}

/* is-invalid state */
.registration-layout .form-control.is-invalid,
.registration-layout .form-select.is-invalid {
    border-color: #dc3545;
    background-color: rgba(220,53,69,.06);
}

.registration-layout .invalid-feedback {
    color: #f87171;
    font-size: 11.5px;
    margin-top: 4px;
    display: block;
    min-height: 16px;
}

/* Checkboxes */
.registration-layout .form-check-input {
    background-color: rgba(0,0,0,.4);
    border-color: rgba(0,230,118,.3);
}

.registration-layout .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.registration-layout .form-check-label {
    color: #a8c8b8;
    font-size: 13px;
}

/* General text helpers */
.registration-layout .text-muted {
    color: #5a8a6a !important;
}

.registration-layout .text-danger {
    color: #f87171 !important;
}

/* Nav outline-light button on dark bg */
.registration-layout .btn-outline-light {
    border-color: rgba(255,255,255,.25);
    color: #c8e0d2;
}

.registration-layout .btn-outline-light:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.45);
    color: #eaf5ef;
}

/* Back / secondary buttons */
.registration-layout .btn-outline-secondary {
    border-color: rgba(0,230,118,.22);
    color: #7a9e8a;
}

.registration-layout .btn-outline-secondary:hover {
    background: rgba(0,230,118,.08);
    border-color: rgba(0,230,118,.4);
    color: #c8e0d2;
}

.registration-layout .btn-outline-secondary:disabled {
    border-color: rgba(0,230,118,.1);
    color: #3d6b4d;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 576px) {
    .reg-navbar      { padding: 14px 20px; }
    .reg-hero        { padding: 60px 16px 40px; }
    .reg-cta-banner  { padding: 32px 24px; }
    .wizard-card     { padding: 20px; }
    .reg-status-card { padding: 32px 24px; }
}
