/* =====================================
   Registration Form Styles
   Extracted from register.php
======================================== */

:root {
    --app-primary: var(--bluelogo, #93010b);
    --app-primary-dark: var(--red-dark, #6f0108);
    --app-accent: var(--logored, #1a76d1);
    --app-ink: var(--dark, #0A0C1B);
    --app-muted: var(--paragraph, #64748B);
    --app-line: var(--border, #E2E8F0);
    --app-bg: var(--light-bg, #F8FAFC);
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-family, 'Inter');
    background: var(--app-bg);
    color: var(--app-ink);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Top Brand Bar ── */
.app-topbar {
    background: #fff;
    border-bottom: 1px solid var(--app-line);
    padding: 14px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.app-topbar-inner {
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.app-brand img {
    height: 44px;
    width: auto;
}
.app-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.app-brand-name {
    font-family: var(--font-family, 'Inter');
    font-size: 24px;
    color: var(--app-primary);
    letter-spacing: 1px;
}
.app-brand-sub {
    font-size: 10px;
    font-weight: 700;
    color: var(--app-accent);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-family: var(--font-family, 'Inter');
}
.app-topbar-links {
    display: flex;
    align-items: center;
    gap: 12px;
}
.app-topbar-links a {
    font-size: var(--font-size-xs, 0.75rem);
    font-weight: 600;
    color: var(--app-muted);
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid var(--app-line);
    border-radius: var(--radius-sm, 6px);
    transition: var(--transition-fast, all 0.15s ease);
}
.app-topbar-links a:hover {
    border-color: var(--app-accent);
    color: var(--app-accent);
}

/* ── Main Content ── */
.app-wrap {
    max-width: 820px;
    margin: 32px auto 48px;
    padding: 0 20px;
}

/* ── Alerts ── */
.app-alert {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.app-alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-left: 3px solid #10b981;
}
.app-alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-left: 3px solid #ef4444;
}

/* ── Form Card ── */
.app-card {
    background: var(--white, #fff);
    border: 1px solid var(--app-line);
    border-radius: var(--radius-lg, 16px);
    overflow: hidden;
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06));
}
.app-card-head {
    background: var(--app-accent);
    color: var(--white, #fff);
    padding: 18px 28px;
}
.app-card-head h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.3px;
}
.app-card-body {
    padding: 28px 32px 24px;
}

.app-section-title {
    margin: 0 0 20px;
    padding-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--app-ink);
    border-bottom: 1px solid var(--app-line);
}

/* ── Form ── */
.app-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.app-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 16px;
    align-items: flex-start;
}
.app-row label {
    font-size: 13px;
    color: var(--app-ink);
    font-weight: 500;
    padding-top: 9px;
}
.app-row label em {
    color: var(--app-primary);
    font-style: normal;
}

.app-field input,
.app-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--app-line);
    border-radius: var(--radius-sm, 6px);
    font-size: var(--font-size-sm, 0.875rem);
    font-family: inherit;
    color: var(--app-ink);
    background: var(--white, #fff);
    transition: var(--transition-fast, all 0.15s ease);
    min-height: 44px;
}
.app-field input::placeholder { color: #9ca3af; }
.app-field input:focus,
.app-field select:focus {
    outline: none;
    border-color: var(--app-accent);
    box-shadow: 0 0 0 3px rgba(26, 118, 209, 0.15);
}

.app-helper {
    margin: 8px 0 0;
    padding: 8px 10px;
    font-size: 12px;
    color: #b91c1c;
    background: #fef2f2;
    border-radius: 3px;
}

/* ── Step Indicator ── */
.app-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
    padding: 8px 0 24px;
    border-bottom: 1px solid var(--app-line);
}
.app-step {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}
.app-step-circle {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full, 9999px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    background: var(--gray-200, #E5E7EB);
    color: var(--app-muted);
    transition: var(--transition, all 0.3s ease);
    flex-shrink: 0;
}
.app-step.active .app-step-circle {
    background: var(--app-accent);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(26, 118, 209, 0.15);
}
.app-step.done .app-step-circle {
    background: #10b981;
    color: #fff;
}
.app-step-label {
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    transition: color 0.3s ease;
    white-space: nowrap;
}
.app-step.active .app-step-label {
    color: var(--app-ink);
}
.app-step.done .app-step-label {
    color: #10b981;
}
.app-step-line {
    width: 40px;
    height: 2px;
    background: #e5e7eb;
    margin: 0 14px;
    transition: background 0.3s ease;
    flex-shrink: 0;
}
.app-step-line.done {
    background: #10b981;
}
.app-step-check {
    display: none;
}
.app-step.done .app-step-check {
    display: inline;
}
.app-step.done .app-step-num {
    display: none;
}

/* ── Steps Content ── */
.app-step-content {
    display: none;
    animation: fadeInStep 0.35s ease;
}
.app-step-content.active {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
@keyframes fadeInStep {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Step Nav Buttons ── */
.app-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--app-line);
}
.app-btn-prev {
    background: var(--white, #fff);
    color: var(--app-ink);
    border: 1px solid var(--app-line);
    padding: 10px 22px;
    border-radius: var(--radius-sm, 6px);
    font-size: var(--font-size-xs, 0.75rem);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast, all 0.15s ease);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
}
.app-btn-prev:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}
.app-btn-next {
    background: var(--app-accent);
    color: var(--white, #fff);
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-sm, 6px);
    font-size: var(--font-size-xs, 0.75rem);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast, all 0.15s ease);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
}
.app-btn-next:hover {
    background: #1558c0;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.app-step-nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Phone Widget ── */
.app-phone {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--app-line);
    border-radius: 5px;
    background: #fff;
    position: relative;
    transition: border-color 0.2s ease;
}
.app-phone:focus-within {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 3px rgba(26, 118, 209, 0.12);
}
.app-phone-trigger {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 9px 10px;
    background: #f3f4f6;
    border: 0;
    border-right: 1px solid var(--app-line);
    border-radius: 5px 0 0 5px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 13px;
    color: var(--app-ink);
    transition: background 0.2s ease;
    flex-shrink: 0;
    font-family: inherit;
}
.app-phone-trigger:hover { background: #e9ecef; }
.app-phone-flag { font-size: 18px; line-height: 1; }
.app-phone-code { font-size: 13px; font-weight: 500; }
.app-phone-caret { transition: transform 0.2s ease; flex-shrink: 0; }
.app-phone.open .app-phone-caret { transform: rotate(180deg); }

.app-phone input[type="tel"] {
    border: 0;
    flex: 1;
    padding: 9px 12px;
    font-size: 13.5px;
    outline: none;
    font-family: inherit;
    color: var(--app-ink);
    background: transparent;
    min-width: 0;
}

.app-phone-dropdown {
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    width: 320px;
    background: #fff;
    border: 1px solid var(--app-line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.10);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.18s ease;
    overflow: hidden;
}
.app-phone.open .app-phone-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.app-phone-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--app-line);
}
.app-phone-search-wrap input {
    border: 0;
    outline: none;
    flex: 1;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--app-ink);
    background: transparent;
    box-shadow: none !important;
    padding: 0 !important;
    width: auto !important;
}
.app-phone-search-wrap input::placeholder { color: #9ca3af; }

#countryList {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 220px;
    overflow-y: auto;
}
#countryList li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--app-ink);
    transition: background 0.15s ease;
}
#countryList li:hover {
    background: #fef2f2;
    color: var(--app-primary);
}
#countryList li .cl-flag { font-size: 18px; flex-shrink: 0; }
#countryList li .cl-name { flex: 1; }
#countryList li .cl-code { color: var(--app-muted); font-size: 12.5px; }

/* ── Passport Upload ── */
.app-upload-box {
    border: 2px dashed var(--gray-300, #D1D5DB);
    border-radius: var(--radius-lg, 16px);
    background: var(--gray-50, #F9FAFB);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast, all 0.15s ease);
    position: relative;
    overflow: hidden;
}
.app-upload-box:hover {
    border-color: var(--app-primary);
    background: #fff5f5;
}
.app-upload-box.dragover {
    border-color: var(--app-primary);
    background: #fef2f2;
}
.app-upload-content svg {
    color: var(--app-primary);
    margin-bottom: 10px;
}
.app-upload-content h4 {
    margin: 0 0 8px;
    font-size: 15px;
    color: var(--app-ink);
}
.app-upload-content p {
    margin: 0;
    font-size: 13px;
    color: var(--app-muted);
}
.app-upload-content p span {
    color: var(--app-primary);
    font-weight: 600;
}
.app-upload-content small {
    display: block;
    margin-top: 10px;
    color: #9ca3af;
    font-size: 11px;
}
.app-preview-image {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 8px;
}

/* ── Captcha ── */
.app-captcha { margin-top: 10px; }
.app-captcha-img {
    height: 60px;
    width: 200px;
    background:
        repeating-linear-gradient(45deg, #e5e7eb 0 2px, transparent 2px 8px),
        repeating-linear-gradient(-45deg, #fde68a 0 1px, transparent 1px 6px),
        #fef3c7;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
}
.app-captcha-img span {
    font-family: 'Courier New', monospace;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 6px;
    color: #0f172a;
    text-shadow: 1px 1px 0 #f59e0b, -1px 2px 0 #ef4444;
    transform: skewX(-8deg);
}

/* ── Disclaimer ── */
.app-disclaimer {
    margin: 18px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--app-line);
    font-size: 12px;
    color: var(--app-muted);
    text-align: center;
    line-height: 1.6;
}

/* ── Actions ── */
.app-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--app-line);
    display: flex;
    justify-content: flex-end;
}
.app-submit {
    background: var(--app-primary);
    color: var(--white, #fff);
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-sm, 6px);
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast, all 0.15s ease);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
}
.app-submit:hover {
    background: var(--app-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ── Footer ── */
.app-footer {
    text-align: center;
    padding: 24px 20px 32px;
    font-size: 13px;
    color: var(--app-muted);
}
.app-footer a {
    color: #0655a0;
    text-decoration: underline;
}
.app-footer a:hover {
    color: #1a76d1;
}

/* ── Responsive ── */
@media (max-width: 700px) {
    .app-wrap { margin: 20px auto 32px; padding: 0 16px; }
    .app-card-body { padding: 20px 18px; }
    .app-row { grid-template-columns: 1fr; gap: 6px; }
    .app-row label { padding-top: 0; }
    .app-captcha-img { width: 100%; }
    .app-phone-dropdown { width: 100%; }
    .app-topbar-inner { flex-wrap: wrap; }
    .app-brand-name { font-size: 20px; }
    .app-step-label { font-size: 10px; }
    .app-step-circle { width: 30px; height: 30px; font-size: 12px; }
    .app-step-line { width: 20px; margin: 0 8px; }
}

@media (max-width: 480px) {
    .app-steps { gap: 0; padding: 4px 0 16px; flex-wrap: nowrap; }
    .app-step { gap: 4px; }
    .app-step-label { display: none; }
    .app-step-circle { width: 28px; height: 28px; font-size: 11px; }
    .app-step-line { width: 14px; margin: 0 4px; }
}
