@font-face {
  font-family: "IRANSansX";
  src: url("./IRANSansX-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSansX";
  src: url("./IRANSansX-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSansX";
  src: url("./IRANSansX-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy-900: #0F172A;
  --navy-950: #020617;
  --bg: #F4F6FB;
  --surface: #FFFFFF;
  --text-muted: #6B7280;
  --border: #E2E8F0;
  --accent: #2563EB;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --accent-strong: #1E3A8A;
  --radius: 12px;
  --shadow: 0 16px 48px rgba(15, 23, 42, 0.08);
}

html {
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  font-family: "IRANSansX", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.06), transparent 35%), var(--bg);
  color: var(--navy-900);
  min-height: 100vh;
}

.login-shell {
  width: 100%;
  max-width: 480px;
  padding: 24px 16px;
  margin: 24px auto 32px;
}

.login-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.app-shell {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 0;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 8px 0 4px;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-brand-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--navy-900);
}

.login-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.login-title {
  font-size: 20px;
  font-weight: 600;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.login-form {
  margin-top: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field-label {
  font-size: 14px;
  color: var(--text-muted);
}

.input {
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.primary-btn {
  width: 100%;
  height: 48px;
  background: var(--navy-900);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.primary-btn:hover {
  background: var(--navy-950);
}

.primary-btn:active {
  transform: translateY(1px);
}

.subtle-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy-900);
  font-weight: 500;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.1s ease;
  position: relative;
  overflow: hidden;
}

.subtle-btn::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at var(--hover-x, 50%) var(--hover-y, 50%), rgba(37, 99, 235, 0.35), transparent 55%);
  opacity: 0;
  transition: opacity 0.15s ease-out;
  pointer-events: none;
}

.subtle-btn.subtle-hovering::after {
  opacity: 1;
}

.subtle-btn:hover {
  background: #F9FAFB;
  border-color: var(--accent-strong);
  box-shadow:
    0 0 0 1px rgba(30, 58, 138, 0.5),
    0 6px 16px rgba(15, 23, 42, 0.14);
  color: var(--accent-strong);
}

.subtle-btn:active {
  transform: translateY(1px);
}

.link-btn {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
}

.login-feedback {
  margin-top: 10px;
  font-size: 13px;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(248, 250, 252, 0.96);
  border-top: 1px solid var(--border);
  display: none;
  justify-content: space-between;
  padding: 12px 18px 20px;
  z-index: 60;
  backdrop-filter: blur(18px);
  box-shadow: 0 -12px 34px rgba(15, 23, 42, 0.16);
}

.bottom-nav-btn {
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 18px;
  transition: color 0.18s ease, background-color 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease;
  min-width: 82px;
}

.bottom-nav-btn span {
  font-size: 12px;
}

.bottom-nav-btn.active {
  color: var(--accent);
  font-weight: 500;
  background: rgba(239, 246, 255, 0.95);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

.bottom-nav-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav-icon svg {
  width: 26px;
  height: 26px;
}

.bottom-nav-btn.active .bottom-nav-icon {
  background: rgba(37, 99, 235, 0.08);
  border-radius: 999px;
  color: #1E3A8A;
}

.bottom-nav-btn:active {
  transform: translateY(1px);
}

@media (max-width: 768px) {
  body {
    padding-bottom: 96px;
  }

  .bottom-nav {
    display: flex;
  }
}

.login-hint {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.login-hint code {
  font-family: monospace;
}

.login-results {
  margin-top: 16px;
}

.list-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
  margin-top: 8px;
}

.badge.success {
  background: #DCFCE7;
  color: #166534;
}

.badge.warning {
  background: #FFF7ED;
  color: #9A3412;
}

.button-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}

.button-loading::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-left-color: transparent;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 480px) {
  .login-card {
    padding: 24px;
  }
}
