@font-face {
    font-family: peyda;
    src: url('../fonts/PeydaWebVF.woff') format('woff2');
    font-display: swap;
}

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

:root {
    --primary:      #2563eb;
    --primary-dark: #1d4ed8;
    --card-bg:      #1a3a6e;
    --card-border:  rgba(96, 165, 250, 0.25);
    --secondary:    #f59e0b;
    --white:        #ffffff;
    --white-90:     rgba(255,255,255,0.90);
    --white-70:     rgba(255,255,255,0.70);
    --white-40:     rgba(255,255,255,0.40);
    --white-15:     rgba(255,255,255,0.15);
    --white-08:     rgba(255,255,255,0.08);
    --border:       rgba(255,255,255,0.20);
    --input-bg:     rgba(255,255,255,0.10);
    --input-focus:  rgba(255,255,255,0.18);
    --red:          #fca5a5;
    --red-bg:       rgba(239,68,68,0.18);
    --red-border:   rgba(239,68,68,0.35);
}

html, body { height: 100%; }

body.borbone-staff-login-body {
    font-family: peyda, Tahoma, Arial, sans-serif;
    direction: rtl;
    min-height: 100vh;
    background: #060c1a;
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.borbone-staff-login-body .site-header,
body.borbone-staff-login-body .site-footer,
body.borbone-staff-login-body header,
body.borbone-staff-login-body footer,
body.borbone-staff-login-body nav,
body.borbone-staff-login-body #colophon,
body.borbone-staff-login-body #masthead { display: none !important; }

a { text-decoration: none; color: inherit; }

/* ─── Canvas پس‌زمینه ─── */
#staff-bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
}

/* ─── Wrapper ─── */
.staff-login-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

/* ─── کارت ─── */
.staff-login-card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(145deg, #1e4080 0%, #162f62 60%, #0f2148 100%);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 44px 40px 38px;
    box-shadow:
        0 40px 100px rgba(0,0,0,0.55),
        0 0 0 1px rgba(96,165,250,0.10),
        inset 0 1px 0 rgba(255,255,255,0.08);
    animation: cardIn 0.65s cubic-bezier(0.22,1,0.36,1) both;
    position: relative;
    overflow: hidden;
}

/* نوار درخشش بالای کارت */
.staff-login-card::before {
    content: "";
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(147,197,253,0.6), transparent);
}

/* هاله روشن زیر کارت */
.staff-login-card::after {
    content: "";
    position: absolute;
    bottom: -60px; left: 50%;
    transform: translateX(-50%);
    width: 200px; height: 120px;
    background: rgba(37,99,235,0.2);
    filter: blur(40px);
    border-radius: 50%;
    pointer-events: none;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(32px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── لوگو / آیکون خانه ─── */
.staff-login-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.staff-login-logo img {
    max-height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.staff-login-logo-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
}

.staff-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--white-08);
    border: 1px solid var(--border);
    color: var(--white-70);
    transition: all 0.22s;
    cursor: pointer;
    flex-shrink: 0;
}

.staff-home-btn:hover {
    background: var(--white-15);
    border-color: rgba(255,255,255,0.35);
    color: var(--white);
    transform: scale(1.06);
}

/* ─── هدر ─── */
.staff-login-header { margin-bottom: 28px; }

/* Badge نقش */
.staff-login-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(37,99,235,0.3);
    border: 1px solid rgba(96,165,250,0.35);
    color: #93c5fd;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
    letter-spacing: 0.3px;
}

.staff-login-badge::before {
    content: "";
    display: block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #60a5fa;
    box-shadow: 0 0 6px #60a5fa;
}

.staff-login-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--white);
    margin: 0 0 8px;
    font-family: peyda, Tahoma, Arial, sans-serif;
    line-height: 1.2;
}

.staff-login-subtitle {
    font-size: 13.5px;
    color: var(--white-70);
    margin: 0;
    line-height: 1.6;
}

/* ─── خطا ─── */
.staff-login-error {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--red-bg);
    border: 1px solid var(--red-border);
    color: var(--red);
    font-size: 13px;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 22px;
    animation: shake 0.4s ease both;
}

@keyframes shake {
    0%,100%{transform:translateX(0)}
    20%{transform:translateX(-5px)}
    40%{transform:translateX(5px)}
    60%{transform:translateX(-3px)}
    80%{transform:translateX(3px)}
}

/* ─── فیلد ─── */
.staff-login-field { margin-bottom: 18px; }

.staff-login-field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--white-90);
    margin-bottom: 8px;
    font-family: peyda, Tahoma, Arial, sans-serif;
}

.staff-login-input {
    width: 100%;
    height: 52px;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 0 16px;
    font-size: 14px;
    font-family: peyda, Tahoma, Arial, sans-serif;
    color: var(--white);
    background: var(--input-bg);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
    direction: rtl;
    outline: none;
    -webkit-appearance: none;
}

.staff-login-input:focus {
    border-color: rgba(96,165,250,0.6);
    background: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.22);
}

.staff-login-input::placeholder { color: var(--white-40); }

/* autocomplete fix */
.staff-login-input:-webkit-autofill,
.staff-login-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 100px #1e4080 inset;
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
}

/* ─── رمز عبور ─── */
.staff-login-password-wrap { position: relative; }
.staff-login-password-wrap .staff-login-input { padding-left: 48px; }

.staff-pwd-toggle {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--white-40);
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.staff-pwd-toggle:hover { color: var(--white-90); }

/* ─── ردیف پایین فرم ─── */
.staff-login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
    margin-top: 6px;
}

.staff-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--white-70);
    font-size: 13px;
    user-select: none;
    font-family: peyda, Tahoma, Arial, sans-serif;
}

.staff-remember-check { display: none; }

.staff-remember-custom {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    background: var(--white-08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.staff-remember-check:checked + .staff-remember-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.staff-remember-check:checked + .staff-remember-custom::after {
    content: "";
    display: block;
    width: 9px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translate(1px,-1px);
}

.staff-forgot {
    color: #93c5fd;
    font-size: 12.5px;
    font-weight: 600;
    transition: color 0.2s;
    font-family: peyda, Tahoma, Arial, sans-serif;
}
.staff-forgot:hover { color: #bfdbfe; }

/* ─── دکمه ─── */
.staff-login-btn {
    width: 100%;
    height: 54px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: var(--white);
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    font-family: peyda, Tahoma, Arial, sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.25s, transform 0.15s, box-shadow 0.25s;
    box-shadow: 0 4px 24px rgba(37,99,235,0.45), inset 0 1px 0 rgba(255,255,255,0.15);
    position: relative;
    overflow: hidden;
}

.staff-login-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.staff-login-btn:hover::after { opacity: 1; }
.staff-login-btn:hover {
    color: #1a2a00;
    box-shadow: 0 8px 32px rgba(245,158,11,0.45), inset 0 1px 0 rgba(255,255,255,0.2);
}
.staff-login-btn:active { transform: scale(0.98); }
.staff-login-btn > * { position: relative; z-index: 1; }

.staff-btn-spinner { display: none; align-items: center; }

@keyframes spin { to { transform: rotate(360deg); } }
.spin-icon { animation: spin 0.8s linear infinite; }

/* ─── divider ─── */
.staff-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 0;
}
.staff-divider::before,
.staff-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}
.staff-divider span {
    font-size: 12px;
    color: var(--white-40);
    white-space: nowrap;
}

/* ─── موبایل ─── */
@media (max-width: 480px) {
    .staff-login-card { padding: 36px 24px 28px; border-radius: 22px; }
    .staff-login-title { font-size: 22px; }
}
