/* ===== متغیرهای اصلی ===== */
:root {
  --accent: #2d8f7b;
  --accent-hover: #237564;

  --text-main: #243746;
  --text-muted: #6b7280;

  --card-bg: rgba(255, 255, 255, 0.95);
  --field-bg: #f8fafc;

  --border: #dbe5ea;

  --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;
  margin: 0;

  display: flex;
  flex-direction: column;

  /* تصویر پس‌زمینهٔ اصلی شما */
  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%;
  flex: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
  box-sizing: border-box;
}

/* ===== کارت ورود (گلس مورفیسم) ===== */
.login-card {
  width: 100%;
  max-width: 400px;
  padding: 40px 30px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 22px;
  border: 1px solid #dfe8ec;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  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 {
    display: block;
    width: 220px;
    max-width: 200%;
    height: auto;
    margin: 0 auto 20px;
}

.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: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: #243746;
  font-size: 1rem;
  transition: var(--transition);
}

.input-ltr {
  direction: ltr;
  text-align: left;
}

.input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(45, 143, 123, 0.15);
}

.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: #fff;
  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;
  color:#7b8794;
}

.toggle-password:hover{

    color:var(--accent);
}

/* ===== دکمه ورود ===== */
.submit-btn {
  width: 100%;
  height: 55px;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  color: #fff;
}

.submit-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(45, 143, 123, 0.25);
}

.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);
  background:#fff1f1;
  color:#b42318;
  font-size: 0.9rem;
  line-height: 1.8;
  text-align: center;
  border:1px solid #ffc9c9;
}


/* =========================================
   Login Footer
   ========================================= */

.login-footer {
  width: 100%;
  box-sizing: border-box;

  flex-shrink: 0;

  padding: 16px 20px;

  text-align: center;

  font-size: 13px;
  line-height: 1.8;

  color: rgba(255, 255, 255, 0.75);

  direction: rtl;
}

.login-footer span {
  margin: 0 6px;
  color: rgba(255, 255, 255, 0.45);
}