/* public/css/login.css — Login page specific styles */
/* (Tokens inherited from app.css) */

body {
  display: block;
  overflow: auto;
}

.login-wrap {
  display: grid;
  grid-template-columns: 1fr 420px;
  min-height: 100dvh;
}

.login-left {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.login-left::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 65%);
  pointer-events: none;
}

.left-top {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.logo-mark {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-mark svg {
  width: 17px;
  height: 17px;
  fill: #0c0c0e;
}

[data-theme="light"] .logo-mark svg {
  fill: #fff;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.logo-version {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.left-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  border: 1px solid rgba(200, 251, 96, 0.2);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 99px;
  margin-bottom: 20px;
  width: fit-content;
}

[data-theme="light"] .hero-tag {
  border-color: rgba(78, 107, 18, 0.2);
}

.hero-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: heroPulse 2s ease infinite;
}

@keyframes heroPulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0.3
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-title span {
  color: var(--accent);
}

.hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 380px;
  margin-bottom: 40px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeUp 0.5s ease both;
}

.feature-item:nth-child(1) {
  animation-delay: .1s
}

.feature-item:nth-child(2) {
  animation-delay: .2s
}

.feature-item:nth-child(3) {
  animation-delay: .3s
}

.feature-item:nth-child(4) {
  animation-delay: .4s
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.feature-icon svg {
  width: 15px;
  height: 15px;
}

.feature-text {
  font-size: 13.5px;
  color: var(--text-secondary);
}

.feature-text strong {
  color: var(--text-primary);
  font-weight: 500;
}

.left-stats {
  display: flex;
  gap: 24px;
  position: relative;
  z-index: 1;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  margin-top: 32px;
}

.left-stat-num {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.left-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.login-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  background: var(--bg);
  position: relative;
}

.theme-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.theme-btn:hover {
  background: var(--surface2);
  color: var(--text-primary);
  border-color: var(--border2);
}

.theme-btn svg {
  width: 16px;
  height: 16px;
}

[data-theme="dark"] .icon-moon-btn {
  display: none;
}

[data-theme="light"] .icon-sun-btn {
  display: none;
}

.login-card {
  width: 100%;
  max-width: 340px;
}

.login-card-header {
  margin-bottom: 28px;
  text-align: center;
}

.login-card-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.login-card-sub {
  font-size: 13px;
  color: var(--text-muted);
}

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

.form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: .2px;
}

.input-wrap {
  position: relative;
}

.input-wrap svg.input-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.form-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px 10px 36px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: var(--accent);
  background: var(--surface2);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input.error {
  border-color: var(--red);
}

.form-input.error:focus {
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

.pass-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

.pass-toggle:hover {
  color: var(--text-secondary);
  background: var(--surface2);
}

.pass-toggle svg {
  width: 14px;
  height: 14px;
}

.pass-toggle .eye-off {
  display: none;
}

.pass-toggle.revealed .eye-on {
  display: none;
}

.pass-toggle.revealed .eye-off {
  display: block;
}

.form-error {
  font-size: 11.5px;
  color: var(--red);
  display: none;
  gap: 4px;
  align-items: center;
}

.form-error.show {
  display: flex;
}

.form-error svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-secondary);
  user-select: none;
}

.remember-check {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.forgot-link {
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
}

.forgot-link:hover {
  color: var(--accent);
}

.btn-login {
  width: 100%;
  background: var(--green);
  color: #0c0c0e;
  border: none;
  border-radius: var(--radius);
  padding: 12px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .3px;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn-login:hover {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200, 251, 96, 0.2);
}

.btn-login:active {
  transform: translateY(0);
}

[data-theme="light"] .btn-login {
  color: #fff;
}

.btn-login .spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #0c0c0e;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

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

.btn-login.loading .btn-text {
  opacity: 0;
}

.btn-login.loading .spinner {
  display: block;
  position: absolute;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider-text {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: .5px;
}

.demo-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  transition: all var(--transition);
}

.demo-box:hover {
  border-color: var(--border2);
  background: var(--surface2);
}

.demo-box-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.demo-creds {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.demo-cred {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.demo-cred span {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.alert-box {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--red);
  display: none;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.alert-box.show {
  display: flex;
}

.alert-box svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.login-footer {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: .3px;
}

@media(max-width:860px) {
  .login-wrap {
    grid-template-columns: 1fr;
    min-height: 100dvh;
  }

  .login-left {
    display: none;
  }

  .login-right {
    min-height: 100dvh;
    padding: 80px 24px 60px;
    justify-content: flex-start;
    padding-top: 60px;
  }

  .login-card {
    max-width: 100%;
  }

  .login-card-header {
    text-align: left;
  }

  .mobile-logo {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
  }
}

@media(min-width:861px) {
  .mobile-logo {
    display: none;
  }
}

@media(max-width:400px) {
  .login-right {
    padding: 56px 20px 40px;
  }
}