@font-face {
    font-family: iransans;
    font-style: normal;
    font-weight: 400;
    src: url(../fonts/Sukar-Bold.ttf) format("woff2"), url(../fonts/Sukar-Bold.ttf) format("woff")
}

/* ══ Tokens — mirrors admin.css ══ */
:root {
    --bg: #f1f3f7;
    --card-bg: #ffffff;
    --border: #e4e7ef;
    --text: #111827;
    --text-muted: #9399a6;
    --text-sub: #6b7280;
    --accent: #3b6ef8;
    --accent-hover: #2d5de0;
    --accent-light: #eff3ff;
    --clr-err-bg: #fef2f2;
    --clr-err-bd: #fca5a5;
    --clr-err-tx: #dc2626;
    --font: monospace, 'iransans', sans-serif;
}

[data-theme="dark"] {
    --bg: #3a4550;
    --card-bg: #313d48;
    --border: #404e5a;
    --text: #e8ecf0;
    --text-muted: #7d8e9b;
    --text-sub: #9aaab6;
    --accent: #5b9bd5;
    --accent-hover: #4a8bc5;
    --accent-light: #384d61;
    --clr-err-bg: rgba(252, 129, 129, .12);
    --clr-err-bd: rgba(252, 129, 129, .28);
    --clr-err-tx: #fc8181;
    --panel-bg: #0f1520;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background: var(--card-bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* ══ Form wrapper ══ */
.lg-right {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
    position: relative;
}

.theme-btn {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1.5px solid var(--border);
    background: var(--card-bg);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.theme-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.lg-box {
    width: 100%;
    max-width: 420px;
}
.logo{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    justify-content: center;
}
.logo .icon{
    width: 120px;
    height: 45px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
/*
.lg-box {
  width: 100%; max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 36px 30px;
  animation: fadeUp .42s cubic-bezier(.22,1,.36,1) both;
}
*/
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.lg-box-head {
    margin-bottom: 30px;
    text-align: center;
}

.lg-title {
    font-size: 23px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.45px;
    margin-bottom: 4px;
}

.lg-title span {
    color: var(--accent);
}

.lg-sub {
    font-size: 12.5px;
    color: var(--text-muted);
}

/* error box — login.js targets #error */
#error {
    display: none;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 13px;
    border-radius: 8px;
    font-size: 12.5px;
    background: var(--clr-err-bg);
    border: 1px solid var(--clr-err-bd);
    color: var(--clr-err-tx);
    margin-bottom: 18px;
    animation: fadeUp .22s ease both;
}

.lg-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

.lg-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-sub);
    letter-spacing: .01em;
}

.lg-wrap {
    position: relative;
}

.lg-ico {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.lg-wrap:focus-within .lg-ico {
    color: var(--accent);
}

.lg-input {
    width: 100%;
    height: 42px;
    border-radius: 9px;
    border: 1.5px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 13.5px;
    font-family: var(--font);
    padding: 0 40px 0 38px;
    outline: none;
}

.lg-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 110, 248, .13);
    background: var(--card-bg);
}

.lg-input::placeholder {
    color: var(--text-muted);
    font-size: 13px;
}

.lg-input.mono {
    font-family: var(--font);
    font-size: 13px;
    letter-spacing: .04em;
}

.lg-eye {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 2px;
}

.lg-eye:hover {
    color: var(--accent);
}

.lg-row {
    display: flex;
    align-items: center;
    margin-bottom: 22px;
    margin-top: 6px;
}

.lg-chk {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.lg-chk input {
    display: none;
}

.lg-chk-box {
    width: 17px;
    height: 17px;
    border-radius: 5px;
    border: 1.5px solid var(--border);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lg-chk input:checked + .lg-chk-box {
    background: var(--accent);
    border-color: var(--accent);
}

.lg-chk input:checked + .lg-chk-box::after {
    content: '';
    display: block;
    width: 4px;
    height: 7px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(42deg) translateY(-1px);
}

.lg-chk-lbl {
    font-size: 12.5px;
    color: var(--text-sub);
    font-weight: 500;
}

.lg-btn {
    width: 100%;
    height: 44px;
    border-radius: 10px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.lg-btn img{
    width: 26px;
}
.lg-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.lg-btn:active {
    transform: none;
}

.lg-btn.loading {
    pointer-events: none;
    opacity: .82;
}

.spin {
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255, 255, 255, .3);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    animation: spin .7s linear infinite;
}
.btn-txt{
    display: flex;
    align-items: center;
}
.lg-btn.loading .spin {
    display: block;
}

.lg-btn.loading .btn-txt {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.lg-foot {
    margin-top: 28px;
    text-align: center;
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.65;
}

@media (max-width: 480px) {
    .lg-box {
        padding: 26px 20px 22px;
        border-radius: 12px;
    }
}