:root {
    --c-brand-alt: #850606;
    --c-body-bg: #ffffff;
    --c-surface: #ffffff;
    --c-border: #e5e7eb;
    --c-text-main: #0f172a;
    --c-text-muted: #64748b;
    --radius-md: 14px;
}

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

body, html {
    height: 100%;
    font-family: 'Tajawal', sans-serif;
}

body {
    background-color: #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 {
    width: 100%;
    max-width: 520px;
    position: relative;
    background: var(--c-surface);
    border-radius: var(--radius-md);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    padding: 32px 22px 26px;
    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;
    font-size: 20px;
    color: #9ca3af;
    text-decoration: none;
    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;
    filter: drop-shadow(0 4px 18px rgba(53, 8, 118, 0.55));
    transition: transform 0.2s, filter 0.2s;
}

.logo:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 6px 24px rgba(53, 8, 118, 0.6));
}

.login-title {
    margin-bottom: 20px;
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--c-text-main);
}

.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;
}

.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-icon {
    font-size: 18px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
}

.auth-input input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    direction: rtl;
    text-align: right;
    color: var(--c-text-main);
    outline: 0;
    font-family: 'Tajawal', sans-serif;
}

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

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

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

.btn-login-main:active {
    background-color: var(--c-brand-alt) !important;
    color: #fff !important;
    box-shadow: none !important;
    outline: 0 !important;
}

.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;
}

.auth-links a {
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-links .register-link {
    display: block;
    margin-top: 10px;
    color: #111827;
    font-size: 14px;
}

.auth-links .register-link span {
    color: var(--c-brand-alt);
}
