:root {
    --c-brand-alt: #850606;
}

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

body {
    font-family: 'Tajawal', sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.auth-page-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px 12px;
    width: 100%;
}



.login-box {
    background: #fff;
    border-radius: 14px;
    padding: 32px 22px 26px;
    width: 100%;
    max-width: 520px;
    position: relative;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    text-align: center;
}

@media (min-width: 768px) {
    .login-box {
        padding: 40px 40px 32px;
    }
}

.close-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    text-decoration: none;
    font-size: 20px;
    transition: color 0.15s, transform 0.1s;
}

.close-btn:hover {
    color: #850606;
    transform: rotate(4deg);
}

.logo {
    max-width: 190px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 26px;
    border-radius: 50%;
    filter: drop-shadow(0 4px 18px rgba(133, 6, 6, 0.4));
    transition: transform 0.2s, filter 0.2s;
}

.logo:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 6px 24px rgba(133, 6, 6, 0.5));
}

.login-title {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
    color: #850606;
    margin-bottom: 20px;
}

.auth-input {
    border-radius: 999px;
    padding: 12px 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    direction: ltr;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
    position: relative;
}

.auth-input:focus-within {
    background: #fff;
    border-color: rgba(40, 203, 105, 0.7);
    box-shadow: 0 0 0 3px rgba(40, 203, 105, 0.18);
}

.auth-input input {
    flex: 1;
    border: none;
    font-size: 15px;
    direction: rtl;
    text-align: right;
    font-family: 'Tajawal', sans-serif;
    outline: none;
    background: transparent;
    color: #333;
}

.auth-input input::placeholder {
    color: #9ca3af;
}

.name-row {
    padding-bottom: 0;
    margin-bottom: 10px;
}

.name-row .auth-input {
    margin-bottom: 0;
}

.name-row .auth-input input {
    width: 100%;
    box-sizing: border-box;
    font-size: 0.9rem;
    padding-inline: 12px;
}

.country-input {
    width: 100%;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: #333;
}

.country-placeholder {
    color: #9ca3af;
}

.country-readonly {
    position: relative;
}

.country-readonly::after {
    content: "\F282";
    font-family: 'bootstrap-icons';
    font-size: 0.9rem;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    max-height: 260px;
    overflow: hidden;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    z-index: 100;
    margin-top: 4px;
}

.country-search-wrapper {
    padding: 6px 10px 4px;
    border-bottom: 1px solid #e5e7eb;
}

.country-search-input {
    border-radius: 20px !important;
    font-family: 'Tajawal', sans-serif !important;
    font-size: 0.9rem !important;
    padding-inline: 12px !important;
}

.country-options-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
    max-height: 200px;
}

.country-option {
    padding: 8px 14px;
    text-align: right;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background-color 0.15s, transform 0.05s;
    white-space: nowrap;
}

.country-option:hover {
    background: #faf0f0;
    color: #850606;
    font-weight: 600;
    transform: translateY(-1px);
}

.country-option.active {
    background: #850606;
    color: #fff;
    font-weight: 600;
}

.btn-login-main {
    width: 100%;
    border-radius: 999px;
    padding: 12px 0;
    background-color: #850606;
    border: none;
    font-weight: 700;
    color: #fff;
    font-size: 15px;
    margin-top: 4px;
    margin-bottom: 18px;
    box-shadow: 0 10px 28px rgba(133, 6, 6, 0.35);
    transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
}

.btn-login-main:hover {
    opacity: 0.95;
    background-color: #850606;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(133, 6, 6, 0.45);
}

.btn-login-main:active {
    background-color: #850606 !important;
    color: #fff !important;
    border-color: #fff !important;
    box-shadow: none !important;
    outline: 0 !important;
    transform: scale(0.98);
}

.auth-divider {
    position: relative;
    margin: 24px 0 18px;
}

.auth-divider::before {
    content: "";
    display: block;
    height: 1px;
    background-color: #e5e7eb;
    width: 100%;
}

.auth-divider span {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    top: 50%;
    background-color: #fff;
    color: #6b7280;
    border-radius: 999px;
    padding: 3px 14px;
    font-size: 12px;
}

.auth-links {
    text-align: center;
    font-size: 14px;
    color: #777;
}

.register-link {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    margin-top: 10px;
}

.register-link span {
    color: #0c305b;
    font-weight: 700;
}

.register-link:hover {
    color: #0c305b;
    text-decoration: underline;
}

.d-none {
    display: none !important;
}

@media (max-width: 576px) {
    .login-box {
        max-width: 100%;
        padding-inline: 18px;
    }

    .login-title {
        font-size: 1.2rem;
    }

    .name-row .auth-input input {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    body {
        background: #f0f2f5;
    }

    body.theme-dark {
        background: #000;
    }

    .login-box {
        padding: 28px 18px 22px;
        border-radius: 22px;
        border: 1px solid #e5e7eb;
        background: #fff;
        box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
        margin-top: 12px;
    }

    body.theme-dark .login-box {
        background: #121212;
        border: 1px solid #2a2a2a;
        box-shadow: none;
    }

    .logo {
        width: 88px;
        height: 88px;
        max-width: 88px;
        max-height: 88px;
        border-radius: 50%;
        object-fit: cover;
        margin-bottom: 14px;
        filter: drop-shadow(0 4px 14px rgba(133, 6, 6, 0.4));
    }

    .login-title {
        font-size: 20px;
        color: #850606;
        margin-bottom: 16px;
    }

    body.theme-dark .login-title {
        color: #fff;
    }

    .auth-input {
        background: #f3f4f6;
        border: 1px solid #e5e7eb;
    }

    body.theme-dark .auth-input {
        background: #1e1e1e;
        border: 1px solid #333;
    }

    .auth-input input {
        color: #333;
    }

    body.theme-dark .auth-input input {
        color: #e5e7eb;
    }

    .auth-input:focus-within {
        border-color: #850606;
        box-shadow: 0 0 0 3px rgba(133, 6, 6, 0.18);
    }

    .country-input,
    .country-placeholder {
        color: #9ca3af;
    }

    .btn-login-main {
        padding: 13px 0;
        box-shadow: 0 8px 20px rgba(133, 6, 6, 0.35);
    }

    .auth-divider span {
        background-color: #fff;
        color: #6b7280;
    }

    body.theme-dark .auth-divider span {
        background-color: #121212;
        color: #9ca3af;
    }

    .auth-divider::before {
        background-color: #e5e7eb;
    }

    body.theme-dark .auth-divider::before {
        background-color: #333;
    }

    .register-link {
        color: #111827;
    }

    body.theme-dark .register-link {
        color: #e5e7eb;
    }

    .register-link span {
        color: #2563eb;
    }

    body.theme-dark .register-link span {
        color: #93c5fd;
    }

    .close-btn {
        color: #9ca3af;
    }

    body.theme-dark .close-btn {
        color: #fff;
    }

    .country-dropdown {
        background: #fff;
    }

    body.theme-dark .country-dropdown {
        background: #1a1a1a;
    }

    .country-option {
        color: #333;
    }

    body.theme-dark .country-option {
        color: #e5e7eb;
    }
}
