/* ==========================================
   Register Company — Premium Mobile-First
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

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

body.register-body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    background: #0a0a1a;
}

.register-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.6;
}

.register-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px);
    transform: scale(1.05);
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ─── Main Card (Desktop) ─── */
.register-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1100px;
    height: 85vh;
    background: #fff;
    border-radius: 40px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    display: flex;
    flex-direction: row-reverse;
    border: 4px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-banner {
    width: 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    color: #fff;
    overflow: hidden;
}

.card-banner-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.card-banner-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.3));
}

.banner-top {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
}

.banner-top span {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    font-weight: 700;
    text-transform: uppercase;
    color: #FBBF24;
}

.banner-top-line {
    height: 1px;
    width: 3rem;
    background: rgba(251, 191, 36, 0.5);
}

.banner-bottom {
    position: relative;
    z-index: 10;
    padding-bottom: 2rem;
}

.banner-bottom h1 {
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.banner-bottom h1 .highlight {
    font-weight: 300;
    color: #FBBF24;
}

.banner-bottom p {
    font-family: 'Cairo', sans-serif;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.8;
    max-width: 22rem;
}

.card-form {
    width: 50%;
    background: #fff;
    display: flex;
    flex-direction: column;
    padding: 2rem 3rem;
    justify-content: center;
    height: 100%;
    overflow-y: auto;
}

.register-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    margin-top: 1rem;
}

.register-logo-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.register-logo-inner svg {
    color: #CA8A04;
}

.register-logo-inner span {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #111827;
}

.form-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.form-header p {
    color: #6B7280;
    font-size: 0.75rem;
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #374151;
}

.form-label .optional-label {
    font-weight: 400;
    color: #9CA3AF;
    font-size: 0.7rem;
}

.form-input {
    width: 100%;
    padding: 0.625rem 1rem;
    background: #F9FAFB;
    border: 1px solid transparent;
    color: #111827;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    outline: none;
    font-family: 'Cairo', sans-serif;
}

.form-input::placeholder {
    color: #9CA3AF;
}

.form-input:focus {
    box-shadow: 0 0 0 2px rgba(202, 138, 4, 0.2);
    background: #fff;
    border-color: #CA8A04;
}

.form-input.is-invalid {
    border-color: #EF4444;
    background: #FEF2F2;
}

.form-input-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    left: 0.75rem;
    right: auto;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: #4B5563;
}

.toggle-password .eye-icon,
.toggle-password .eye-off-icon {
    width: 18px;
    height: 18px;
}

.toggle-password .eye-off-icon {
    display: none;
}

.toggle-password.active .eye-icon {
    display: none;
}

.toggle-password.active .eye-off-icon {
    display: block;
}

.form-error {
    font-size: 0.7rem;
    color: #EF4444;
    margin-top: 0.15rem;
}

.alert-danger {
    padding: 0.6rem 0.85rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-align: center;
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    font-weight: 700;
    padding: 0.8rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(15, 52, 96, 0.35);
    font-size: 0.95rem;
    font-family: 'Cairo', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transition: left 0.5s ease;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #0f3460 0%, #1a1a2e 50%, #16213e 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(15, 52, 96, 0.45);
}

.btn-submit:active {
    transform: translateY(0);
}

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

.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-submit.loading .spinner {
    display: block;
}

.btn-submit.loading .btn-text {
    display: none;
}

.register-footer {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.875rem;
    color: #6B7280;
}

.register-footer a {
    font-weight: 700;
    color: #000;
    text-decoration: none;
}

.register-footer a:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════
   MOBILE — Full-Screen Clean App Design
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    body.register-body {
        padding: 0;
        background: #fff;
        align-items: flex-start;
        overflow-y: auto;
    }

    .register-bg {
        display: none;
    }

    .register-card {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 100vh;
        border-radius: 0;
        border: none;
        box-shadow: none;
        background: #fff;
        animation: none;
    }

    .card-banner {
        display: none;
    }

    .card-form {
        width: 100%;
        height: auto;
        min-height: 100vh;
        padding: 0;
        background: #fff;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
    }

    /* ── Decorative Top Banner ── */
    .register-logo {
        position: relative;
        width: 100%;
        margin: 0;
        padding: 50px 24px 30px;
        background: linear-gradient(135deg, #0f3460, #16213e, #1a1a2e);
        border-radius: 0 0 40px 40px;
        overflow: hidden;
    }

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

    .register-logo-inner {
        position: relative;
        z-index: 2;
        flex-direction: column;
        gap: 6px;
    }

    .register-logo-inner svg {
        color: #FBBF24;
        width: 32px;
        height: 32px;
    }

    .register-logo-inner span {
        color: #fff;
        font-size: 1.1rem;
    }

    /* ── Header ── */
    .form-header {
        padding: 24px 28px 0;
        margin-bottom: 0;
        text-align: right;
    }

    .form-header h1 {
        font-size: 1.4rem;
        color: #111827;
    }

    .form-header p {
        color: #9CA3AF;
        font-size: 0.78rem;
    }

    /* ── Form ── */
    .register-form {
        padding: 20px 28px;
        gap: 14px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .form-label {
        font-size: 0.78rem;
        font-weight: 600;
        color: #555;
    }

    .form-input {
        padding: 13px 16px;
        font-size: 0.88rem;
        border: 1.5px solid #E8EDF2;
        border-radius: 14px;
        background: #F8FAFC;
    }

    .form-input:focus {
        border-color: #0f3460;
        background: #fff;
        box-shadow: 0 0 0 4px rgba(15, 52, 96, 0.08);
    }

    .btn-submit {
        padding: 13px;
        border-radius: 14px;
        font-size: 0.92rem;
        font-weight: 800;
    }

    .alert-danger {
        margin: 0 28px;
        border-radius: 12px;
    }

    .register-footer {
        margin-top: auto;
        padding: 20px 28px;
        border-top: 1px solid #F3F4F6;
    }

    .register-footer p {
        color: #9CA3AF;
        font-size: 0.82rem;
    }

    .register-footer a {
        color: #0f3460;
        font-weight: 700;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .card-form {
        padding: 1.5rem 2rem;
    }

    .banner-bottom h1 {
        font-size: 2.5rem;
    }
}