/* ==========================================
   ZAYN ERP — Premium Login Page CSS
   ========================================== */

:root {
    --login-bg-from: #0d1117;
    --login-bg-to: #0f172a;
    --login-card-bg: rgba(255, 255, 255, 0.04);
    --login-card-border: rgba(255, 255, 255, 0.1);
    --login-input-bg: rgba(255, 255, 255, 0.06);
    --login-input-border: rgba(255, 255, 255, 0.14);
    --login-input-focus: rgba(56, 189, 248, 0.4);
    --login-text-main: #f1f5f9;
    --login-text-muted: #94a3b8;
    --login-primary: #0ea5e9;
    --login-primary-hover: #38bdf8;
    --login-success: #10b981;
    --font-family: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body.auth-body-daftra {
    font-family: var(--font-family);
    background: linear-gradient(145deg, var(--login-bg-from) 0%, var(--login-bg-to) 100%);
    color: var(--login-text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    padding: 20px 15px;
    position: relative;
    overflow: hidden;
}

/* Ambient glow blobs */
body.auth-body-daftra::before {
    content: '';
    position: fixed;
    top: -200px;
    right: -150px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

body.auth-body-daftra::after {
    content: '';
    position: fixed;
    bottom: -200px;
    left: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.app-login-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.container.w-xxl {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

@media (max-width: 480px) {
    .container.w-auto-xs {
        width: 100%;
        max-width: 100%;
    }
}

/* Logo area */
.site-thumb {
    text-align: center;
    margin-bottom: 20px;
}

.site-thumb img {
    max-width: 100%;
    max-height: 80px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(14, 165, 233, 0.3));
}

.site-thumb .login-icon-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, #0ea5e9, #10b981);
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.4);
    font-size: 2rem;
    color: #ffffff;
    margin: 0 auto;
}

/* Main login card */
.login-box-inner {
    background: var(--login-card-bg);
    border: 1px solid var(--login-card-border);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.08);
    padding: 32px 28px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.site-title {
    text-align: center;
    margin-bottom: 28px;
}

.site-title h1 {
    font-size: 20px;
    font-weight: 800;
    color: var(--login-text-main);
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.site-title .login-subtitle {
    font-size: 13px;
    color: var(--login-text-muted);
    margin-top: 5px;
}

/* Input group */
.list-group-sm {
    border: 1px solid var(--login-input-border);
    border-radius: 12px;
    margin-bottom: 20px;
    background-color: var(--login-input-bg);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.list-group-sm:focus-within {
    border-color: var(--login-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.list-group-item {
    position: relative;
    display: block;
    padding: 0;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid var(--login-input-border);
}

.list-group-item:last-child {
    border-bottom: none;
}

.form-control.no-border {
    width: 100%;
    height: 50px;
    padding: 12px 16px;
    font-size: 14px;
    font-family: var(--font-family);
    color: var(--login-text-main);
    background-color: transparent;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.form-control.no-border::placeholder {
    color: var(--login-text-muted);
    font-size: 14px;
}

/* Submit button */
.btn-success.btn-block {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border: none;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-family);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-success.btn-block:hover {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    box-shadow: 0 8px 30px rgba(14, 165, 233, 0.55);
    transform: translateY(-2px);
}

.btn-success.btn-block:active {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(14, 165, 233, 0.3);
}

.btn-success.btn-block.loading .btn-text { display: none; }
.btn-success.btn-block.loading .btn-spinner { display: flex !important; }

.btn-spinner {
    display: none;
    align-items: center;
    gap: 8px;
}

.btn-spinner .spinner-border {
    width: 18px;
    height: 18px;
    border-width: 2.5px;
    color: #ffffff;
}

/* Footer links */
.m-t {
    margin-top: 20px;
}

.box-text {
    color: var(--login-text-muted);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.box-text:hover {
    color: var(--login-primary-hover);
}

/* Flash alerts */
.daftra-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.daftra-alert-danger {
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.daftra-alert-success {
    background-color: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

/* Forgot password modal */
.forgot-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.forgot-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.forgot-modal-box {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 28px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.forgot-modal-overlay.active .forgot-modal-box {
    transform: scale(1);
}

.forgot-modal-icon {
    width: 56px;
    height: 56px;
    background: rgba(14, 165, 233, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
    color: #38bdf8;
}

.forgot-modal-box h4 {
    font-size: 16px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 10px;
}

.forgot-modal-box p {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 20px;
    line-height: 1.7;
}

.forgot-modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    padding: 10px 24px;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.forgot-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Password Toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-control {
    padding-left: 44px;
}

.password-toggle-btn {
    position: absolute;
    left: 12px;
    background: none;
    border: none;
    color: var(--login-text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.password-toggle-btn:hover {
    color: var(--login-primary-hover);
}
