.logo h1,
body {
  color: var(--text);
}
.logo,
.tabs {
  margin-bottom: 24px;
}
.logo,
.tab {
  text-align: center;
}
.eye-btn,
.row,
.tabs,
body {
  display: flex;
}
.btn-primary,
.tab {
  font-size: 14px;
  font-weight: 700;
}
.btn-action,
.btn-primary,
.btn-secondary,
.field label,
.item-title,
.logo h1,
.modal-header,
.tab {
  font-weight: 700;
}
*,
.confirm-modal-icon {
  box-sizing: border-box;
}
@font-face {
  font-family: MyFont;
  src: url("../fonts/Vazir.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+0600-06FF;
}
:root {
  --bg: #07111f;
  --bg-2: #0b1320;
  --bg-3: #111c2e;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-2: rgba(255, 255, 255, 0.1);
  --text: #f8fafc;
  --muted: #aeb8c5;
  --border: rgba(255, 255, 255, 0.12);
  --primary: #f6b800;
  --primary-2: #ff7a1a;
  --danger-stripe: repeating-linear-gradient(
    135deg,
    rgba(246, 184, 0, 0.95) 0 12px,
    rgba(7, 17, 31, 0.95) 12px 24px
  );
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --container: 1180px;
  --header-height: 84px;
  --transition: 250ms ease;
  --error: #ef4444;
  --ok: #10b981;
}
body.light-theme {
  --bg: #f5f7fb;
  --bg-2: #ffffff;
  --bg-3: #edf2f7;
  --surface: rgba(7, 17, 31, 0.055);
  --surface-2: rgba(7, 17, 31, 0.08);
  --text: #07111f;
  --muted: #526071;
  --border: rgba(7, 17, 31, 0.13);
  --shadow: 0 24px 70px rgba(7, 17, 31, 0.13);
}
* {
  margin: 0;
  padding: 0;
}
body {
  font-family: MyFont, Tahoma, "Segoe UI", sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(
    circle at 50% 0,
    var(--bg-3) 0,
    var(--bg) 75%
  );
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition:
    background var(--transition),
    color var(--transition);
}
.card {
  background: var(--bg-2);
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px 28px;
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  transition:
    max-width var(--transition),
    background var(--transition),
    border-color var(--transition);
}
.field input,
.tabs {
  background: var(--surface);
}
.field input,
.tab {
  transition: var(--transition);
  font-family: inherit;
}
.card.wide {
  max-width: 560px;
}
.logo h1 {
  font-size: 22px;
  margin-top: 10px;
}
.logo svg circle {
  fill: var(--primary);
}
.logo svg path {
  fill: var(--bg);
}
.tabs {
  border-radius: var(--radius-md);
  padding: 5px;
  border: 1px solid var(--border);
}
.eye-btn,
.tab {
  background: 0 0;
  color: var(--muted);
}
.tab {
  flex: 1;
  padding: 10px;
  border-radius: calc(var(--radius-md) - 4px);
  cursor: pointer;
  border: none;
}
.tab.active {
  background: var(--primary);
  color: var(--bg);
  box-shadow: 0 4px 20px rgba(246, 184, 0, 0.3);
}
.row {
  gap: 12px;
}
.col {
  flex: 1;
  min-width: 0;
}
.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
  color: var(--muted);
}
.input-wrap {
  position: relative;
}
.field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text);
}
.eye-btn,
.forgot a {
  transition: color var(--transition);
  cursor: pointer;
}
.eye-btn:hover,
.forgot a {
  color: var(--primary);
}
.field input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}
.field input:focus {
  outline: 0;
  border-color: var(--primary);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(246, 184, 0, 0.15);
}
.field input.input-error {
  border-color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}
.eye-btn {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  padding: 4px;
  align-items: center;
}
.field-error,
.file-input-wrapper input,
.form {
  display: none;
}
.btn-primary {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary) 0, var(--primary-2) 100%);
  color: #07111f;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  margin-top: 6px;
  box-shadow: 0 8px 24px rgba(246, 184, 0, 0.2);
}
.confirm-modal-box,
.modal-content,
.toast {
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(246, 184, 0, 0.35);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.forgot {
  text-align: right;
  margin-top: 12px;
}
.forgot a {
  font-size: 12px;
  text-decoration: none;
}
.forgot a:hover {
  color: var(--primary-2);
  text-decoration: underline;
}
.form.active {
  display: block;
  animation: 0.4s cubic-bezier(0.22, 1, 0.36, 1) formIn;
}
@keyframes formIn {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.field-error {
  color: var(--error);
  font-size: 11px;
  margin-top: 4px;
  line-height: 1.4;
}
.toast {
  position: fixed;
  top: 20px;
  right: 50%;
  transform: translateX(50%) translateY(-120px);
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-right: 4px solid var(--primary);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  max-width: 360px;
  width: calc(100% - 40px);
  transition: transform 0.35s;
  z-index: 999;
}
.confirm-modal-overlay,
.modal {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
}
.file-input-wrapper,
.hint,
.manage-item {
  background: var(--surface);
}
.btn-action,
.confirm-modal-overlay,
.file-input-wrapper {
  transition: var(--transition);
}
.toast.show {
  transform: translateX(50%) translateY(0);
}
.toast.error {
  border-right-color: var(--error);
}
.toast.success {
  border-right-color: var(--ok);
}
.toast b {
  display: block;
  margin-bottom: 2px;
}
.hint {
  color: var(--primary);
  border: 1px solid var(--border);
  font-size: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  line-height: 1.6;
}
.card.wide-admin {
  max-width: 600px;
}
.file-input-wrapper {
  border: 1.5px dashed var(--border);
  padding: 20px;
  text-align: center;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.file-input-wrapper:hover {
  border-color: var(--primary);
  background: var(--surface-2);
}
.file-input-wrapper p {
  font-size: 13px;
  color: var(--muted);
}
.filename-preview {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ok);
  font-weight: 700;
}
.file-manage-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding-left: 6px;
  padding-right: 2px;
}
.file-manage-list::-webkit-scrollbar {
  width: 5px;
}
.file-manage-list::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 8px;
}
.file-manage-list::-webkit-scrollbar-thumb {
  background: var(--surface-2);
  border-radius: 8px;
}
.manage-item,
.modal-content {
  border: 1px solid var(--border);
}
.file-manage-list::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}
.manage-item {
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.item-info {
  overflow: hidden;
  flex: 1;
}
.item-title {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.item-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.confirm-modal-overlay,
.modal {
  align-items: center;
  backdrop-filter: blur(8px);
}
.btn-action {
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
}
.btn-edit {
  background: var(--surface-2);
  color: var(--primary);
}
.btn-edit:hover {
  background: var(--primary);
  color: var(--bg);
}
.btn-delete {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
}
.btn-delete:hover {
  background: var(--error);
  color: #fff;
}
.modal {
  display: none;
  width: 100%;
  background: rgba(7, 17, 31, 0.8);
  z-index: 1000;
  justify-content: center;
  padding: 20px;
}
.modal.active {
  display: flex;
}
.modal-content {
  background: var(--bg-2);
  padding: 24px;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  animation: 0.3s formIn;
}
.modal-header {
  font-size: 15px;
  margin-bottom: 14px;
  color: var(--text);
}
.modal-footer {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
}
.btn-secondary:hover {
  background: var(--surface);
}
.confirm-modal-overlay {
  display: flex;
  justify-content: center;
}
.confirm-modal-box {
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: transform var(--transition);
}
.confirm-modal-icon {
  background: var(--surface-2);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}
.btn-confirm-accept {
  flex: 1;
  background: linear-gradient(135deg, var(--primary) 0, var(--primary-2) 100%);
  color: #07111f;
  border: none;
  padding: 10px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.btn-confirm-cancel,
.more-items-btn {
  background: var(--surface);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  font-weight: 700;
}
.btn-confirm-accept:hover {
  opacity: 0.9;
}
.btn-confirm-cancel {
  flex: 1;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.confirm-modal-overlay,
.more-items-btn {
  align-items: center;
  transition: var(--transition);
  width: 100%;
  display: flex;
}
.btn-confirm-cancel:hover {
  background: var(--surface-2);
  color: var(--text);
}
.more-items-btn {
  padding: 12px;
  margin-top: 10px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--primary);
  justify-content: center;
  gap: 8px;
}
.more-items-btn:hover {
  background: var(--surface-2);
  border-color: var(--primary);
}
.modal-scrollable-body {
  max-height: 60vh;
  overflow-y: auto;
  padding-left: 6px;
  margin-top: 15px;
}
@media (max-width: 520px) {
  .card.wide,
  .modal-content {
    max-width: 100%;
  }
  .card {
    padding: 24px 18px;
    border-radius: var(--radius-md);
  }
  .row {
    flex-direction: column;
    gap: 0;
  }
  .logo h1 {
    font-size: 19px;
  }
  .tab {
    font-size: 13px;
    padding: 8px;
  }
  .modal-content {
    padding: 20px 16px;
  }
}
.confirm-modal-overlay {
  background: rgba(7, 17, 31, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
}
.confirm-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.confirm-modal-box {
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  max-width: 360px;
  width: 100%;
  padding: 24px;
  border: 1px solid var(--border);
  text-align: center;
  transform: scale(0.95);
  transition: transform var(--transition);
  overflow: hidden;
}
.confirm-modal-overlay.active .confirm-modal-box {
  transform: scale(1);
}
.confirm-modal-icon {
  width: 56px !important;
  height: 56px !important;
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 10px;
}
.confirm-modal-icon img,
.confirm-modal-icon svg {
  width: 100% !important;
  height: 100% !important;
  max-width: 32px !important;
  max-height: 32px !important;
  object-fit: contain;
}
.confirm-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.confirm-modal-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}
.confirm-modal-actions {
  display: flex;
  gap: 10px;
}
input:-webkit-autofill,
input:-webkit-autofill:active,
input:-webkit-autofill:focus,
input:-webkit-autofill:hover {
  -webkit-box-shadow: 0 0 0 1000px #0e1a2b inset !important;
  box-shadow: 0 0 0 1000px #0e1a2b inset !important;
  -webkit-text-fill-color: var(--text) !important;
  font-family: Vazirmatn, sans-serif !important;
  caret-color: var(--text) !important;
  transition: background-color 5000s ease-in-out;
}
body.light-theme input:-webkit-autofill,
body.light-theme input:-webkit-autofill:active,
body.light-theme input:-webkit-autofill:focus,
body.light-theme input:-webkit-autofill:hover {
  -webkit-box-shadow: 0 0 0 1000px #edf2f7 inset !important;
  box-shadow: 0 0 0 1000px #edf2f7 inset !important;
  -webkit-text-fill-color: var(--text) !important;
}
.home-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 11px 18px;
  border-radius: var(--radius-md);

  background: linear-gradient(
    135deg,
    var(--primary),
    var(--primary-2)
  );

  color: #07111f;
  text-decoration: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;

  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 24px rgba(246, 184, 0, 0.2);

  transition: var(--transition);
}

.home-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(246, 184, 0, 0.4);
}

.home-btn:active {
  transform: translateY(-1px);
}

@media (max-width: 520px) {
  .home-btn {
    right: 16px;
    bottom: 16px;
    padding: 10px 15px;
    font-size: 12px;
  }
}


/* ==================== reCAPTCHA ==================== */
.captcha-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px 0 8px;
  overflow: hidden;
}

/* هماهنگ با عرض کارت */
.captcha-wrap .g-recaptcha {
  transform: scale(0.98);
  transform-origin: center;
}

/* موبایل */
@media (max-width: 520px) {
  .captcha-wrap {
    margin: 14px 0 8px;
  }

  .captcha-wrap .g-recaptcha {
    transform: scale(0.88);
  }
}




/* ==================== استایل‌های OTP و تایمر ==================== */
.otp-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}
.otp-wrap input {
  flex: 1;
}
.btn-send-otp {
  padding: 11px 16px;
  background: var(--primary);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}
.btn-send-otp:hover { opacity: 0.9; }
.btn-send-otp:disabled { opacity: 0.5; cursor: not-allowed; }

.otp-timer {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
  margin-right: 8px;
  direction: ltr;
  display: inline-block;
}

.btn-resend {
  font-size: 12px;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  margin-top: 8px;
  text-decoration: underline;
}
