@import url('tokens.css');

:root {
    --reg-primary: #001E62;
    --reg-primary-light: #0036b0;
    --reg-accent: #00c9a7;
    --reg-bg: #f8f9fa;
    --reg-surface: #ffffff;
    --reg-text: #2d3748;
    --reg-text-secondary: #718096;
    --reg-text-muted: #a0aec0;
    --reg-border: #e2e8f0;
    --reg-radius: 12px;
    --reg-radius-lg: 16px;
    --reg-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --reg-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --reg-shadow-xl: 0 12px 40px rgba(0, 30, 98, 0.15);
    --reg-success: #2e7d32;
    --reg-danger: #c62828;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: var(--font-sans);
    background: var(--reg-bg);
    color: #212529;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================
   Header
   ============================ */
.reg-header {
    background: var(--reg-surface);
    box-shadow: var(--reg-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.reg-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reg-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--reg-primary);
}

.reg-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--reg-primary);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.reg-logo-text {
    font-size: 20px;
    font-weight: 700;
}

.reg-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reg-login-prompt {
    color: var(--reg-text-secondary);
    font-size: 14px;
}

.reg-login-link {
    color: var(--reg-primary);
    font-weight: 600;
    text-decoration: none;
    padding: 8px 20px;
    border: 2px solid var(--reg-primary);
    border-radius: 8px;
    transition: all 0.2s;
}

.reg-login-link:hover {
    background: var(--reg-primary);
    color: #fff;
}

/* ============================
   Page Layout
   ============================ */
.reg-page {
    display: flex;
    min-height: calc(100vh - 64px);
}

/* ============================
   Brand Panel (Left)
   ============================ */
.reg-brand-panel {
    flex: 1;
    background: linear-gradient(135deg, var(--reg-primary) 0%, #003399 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}

.reg-brand-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.reg-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.brand-content {
    position: relative;
    z-index: 1;
    max-width: 460px;
}

.brand-badge {
    display: inline-block;
    background: rgba(0, 201, 167, 0.2);
    color: var(--reg-accent);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 201, 167, 0.3);
}

.brand-headline {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

.brand-sub {
    font-size: 17px;
    opacity: 0.85;
    line-height: 1.6;
    margin-bottom: 36px;
}

.brand-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.brand-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    opacity: 0.9;
}

.brand-features li i {
    color: var(--reg-accent);
    font-size: 18px;
    flex-shrink: 0;
}

/* ============================
   Form Panel (Right)
   ============================ */
.reg-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    max-width: 560px;
}

.reg-card {
    width: 100%;
    max-width: 480px;
}

.reg-card-header {
    margin-bottom: 28px;
}

.reg-card-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--reg-primary);
    margin-bottom: 6px;
}

.reg-card-header p {
    color: var(--reg-text-secondary);
    font-size: 15px;
}

/* ============================
   Alerts
   ============================ */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-error {
    background: #fef2f2;
    color: var(--reg-danger);
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: var(--reg-success);
    border: 1px solid #bbf7d0;
}

.hidden {
    display: none !important;
}

/* ============================
   Form Steps
   ============================ */
.form-step {
    display: none;
}

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

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

.step-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--reg-accent);
    font-weight: 600;
    margin-bottom: 20px;
}

/* ============================
   Form Elements
   ============================ */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--reg-text);
    margin-bottom: 6px;
}

.required {
    color: var(--reg-danger);
}

.optional {
    color: var(--reg-text-muted);
    font-weight: 400;
    font-size: 12px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--reg-border);
    border-radius: 10px;
    font-size: 15px;
    color: var(--reg-text);
    background: var(--reg-surface);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--reg-primary);
    box-shadow: 0 0 0 3px rgba(0, 30, 98, 0.1);
}

.form-group input.invalid {
    border-color: var(--reg-danger);
}

.form-row {
    display: flex;
    gap: 14px;
}

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

/* Password */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--reg-text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}

.password-strength {
    height: 3px;
    margin-top: 6px;
    border-radius: 2px;
    background: var(--reg-border);
    overflow: hidden;
    transition: all 0.3s;
}

.password-strength.weak { background: linear-gradient(90deg, #ef4444 0%, #ef4444 33%, var(--reg-border) 33%); }
.password-strength.medium { background: linear-gradient(90deg, #f59e0b 0%, #f59e0b 66%, var(--reg-border) 66%); }
.password-strength.strong { background: #22c55e; }

/* Slug preview */
.slug-preview {
    font-size: 12px;
    color: var(--reg-accent);
    margin-top: 4px;
    min-height: 18px;
}

/* ============================
   Buttons
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--reg-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--reg-primary-light);
    transform: translateY(-1px);
    box-shadow: var(--reg-shadow-lg);
}

.btn-secondary {
    background: var(--reg-bg);
    color: var(--reg-text);
    border: 2px solid var(--reg-border);
}

.btn-secondary:hover {
    background: var(--reg-border);
}

.btn-block {
    width: 100%;
}

.btn-grow {
    flex: 1;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.form-actions-row {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

/* ============================
   Terms
   ============================ */
.reg-terms {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: var(--reg-text-muted);
    line-height: 1.6;
}

.reg-terms a {
    color: var(--reg-primary);
    text-decoration: none;
    font-weight: 500;
}

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

/* ============================
   Success Modal
   ============================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-card {
    background: var(--reg-surface);
    border-radius: var(--reg-radius-lg);
    padding: 40px 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: var(--reg-shadow-xl);
}

.modal-icon {
    font-size: 56px;
    color: var(--reg-success);
    margin-bottom: 16px;
}

.modal-card h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--reg-primary);
    margin-bottom: 8px;
}

.modal-store-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--reg-text);
}

.modal-slug {
    font-size: 13px;
    color: var(--reg-accent);
    margin-bottom: 24px;
    word-break: break-all;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 900px) {
    .reg-page {
        flex-direction: column;
    }

    .reg-brand-panel {
        padding: 40px 24px;
    }

    .brand-headline {
        font-size: 26px;
    }

    .brand-features {
        display: none;
    }

    .reg-form-panel {
        max-width: none;
        padding: 24px 20px 40px;
    }
}

@media (max-width: 600px) {
    .reg-header-inner {
        padding: 10px 16px;
    }

    .reg-login-prompt {
        display: none;
    }

    .brand-headline {
        font-size: 22px;
    }

    .brand-sub {
        font-size: 14px;
    }

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

    .form-actions-row {
        flex-direction: column-reverse;
    }

    .btn-grow {
        width: 100%;
    }
}
