/* ===== متغیرهای اصلی ===== */
:root {
    --accent: #fffb00;
    --accent-hover: #ffe600;
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --card-bg: rgba(255, 255, 255, 0.07);
    --field-bg: rgba(255, 255, 255, 0.08);
    --transition: all 0.3s ease;
}

@font-face {
    font-family: "Vazir";
    src: url("../fonts/vazir/Vazir.woff2") format("woff2"),
        url("../fonts/vazir/Vazir.woff") format("woff");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazir";
    src: url("../fonts/vazir/Vazir-Bold.woff2") format("woff2"),
        url("../fonts/vazir/Vazir-Bold.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ===== ریست ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Vazir, Tahoma, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;

    /* تصویر پس‌زمینهٔ اصلی شما */
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.9)),
        url("../images/bg.webp") no-repeat center center/cover;
    color: var(--text-main);
}

.login-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px;
}

/* ===== کارت ورود (گلس مورفیسم) ===== */
.login-card {
    width: 100%;
    max-width: 400px;
    padding: 40px 30px;
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);

    opacity: 0;
    transform: translateY(25px);
    transition: 0.9s ease;
}

.login-card.show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== لوگو ===== */
.logo-box {
    text-align: center;
    margin-bottom: 25px;
}

.logo {
    width: 95px;
    margin-bottom: 18px;
}

.site-title {
    font-size: 1.4rem;
    margin-bottom: 6px;
}

.desc-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===== فیلدهای ورودی ===== */
.field {
    position: relative;
    margin-bottom: 25px;
}

.input {
    width: 100%;
    height: 55px;
    padding: 0 15px;
    background: var(--field-bg);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: var(--transition);
}

.input-ltr {
    direction: ltr;
    text-align: left;
}

.input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 4px rgba(255, 251, 0, 0.1);
}

.label {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    font-size: 0.95rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition);
}

.label-ltr {
    right: auto;
    left: 15px;
}

/* لیبل شناور */
.input:focus+.label,
.input:not(:placeholder-shown)+.label {
    top: -10px;
    font-size: 0.78rem;
    background: rgba(0, 0, 0, 0.55);
    padding: 0 7px;
    border-radius: 4px;
    color: var(--accent);
}

/* ===== دکمه نمایش رمز ===== */
.field-password { position: relative; }


.toggle-password {
    position: absolute;
    right: 12px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.15rem;
    color: var(--text-muted);
    z-index: 3;
}



/* ===== دکمه ورود ===== */
.submit-btn {
    width: 100%;
    height: 55px;
    background: var(--accent);
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    color: #000;
}

.submit-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(255, 251, 0, 0.3);
}

.submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ===== لینک پایین ===== */
.card-footer {
    margin-top: 25px;
    text-align: center;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--accent);
}


/* یوزرنیم: متن تایپی چپ، placeholder راست */
#username {
    direction: ltr;
    text-align: left;
    padding-left: 12px;
    padding-right: 12px;
}

/* پسورد: متن تایپی چپ، ولی از راست جا برای آیکن */
#password {
    direction: ltr;
    text-align: left;
    padding-left: 12px;
    padding-right: 44px;
}

.messages-container {
    margin-bottom: 18px;
}

.error {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 18px;
    border-radius: 10px;
    background: rgba(255, 60, 60, 0.15);
    border: 1px solid rgba(255, 80, 80, 0.4);
    color: #ffd6d6;
    font-size: 0.9rem;
    line-height: 1.8;
    text-align: center;
}
