:root {
  --primary: #0055ff;
  --primary-dark: #0043ff;
  --primary-soft: #d1fae5;
  --bg: #eef2f4;
  --text: #0f172a;
  --muted: #7b8494;
  --line: #e5e7eb;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(
      circle at 90% 90%,
      rgba(255, 255, 255, 0.95),
      transparent 32%
    ),
    linear-gradient(135deg, #f8fafc 0%, #dfe7ea 100%);
  color: var(--text);
}

p {
  font-size: 12px;
}

.login-shell {
  width: 100%;
  min-height: 100vh;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-panel {
  width: 100%;
  max-width: 1180px;
  min-height: min(760px, calc(100vh - 56px));
  background: rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  padding: 14px;
}

.login-inner {
  width: 100%;
  min-height: inherit;
  background: #fff;
  border-radius: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.login-left {
  position: relative;
  padding: 44px 74px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
  justify-content: center;
}

.login-form-wrap {
  width: 100%;
  max-width: 360px;
  margin: auto;
  transform: translateY(-8px);
}

.login-form-wrap h1 {
  margin: 0 0 10px;
  text-align: center;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -1px;
  color: #0f172a;
}

.login-subtitle {
  margin: 15px 0px !important;
  text-align: left;
  font-size: 13px;
  color: var(--muted);
}

.alert {
  padding: 11px 13px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.45;
}

.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #111827;
}

.input-wrap {
  position: relative;
}

.form-group input {
  width: 100%;
  height: 42px;
  border: 1px solid #718fbc;
  border-radius: 7px;
  padding: 0 14px;
  font-size: 13px;
  color: #111827;
  background: #fff;
  outline: none;
  transition: 0.2s ease;
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 14px;
}

.form-extra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -4px 0 24px;
  font-size: 13px;
  color: var(--muted);
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
}

.remember input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
}

.forgot-link {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 700;
}

.login-btn {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 18px 34px rgba(5, 150, 105, 0.24);
  transition: 0.2s ease;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 40px rgba(5, 150, 105, 0.3);
}

.login-footer {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  font-size: 13px;
  color: #8b95a7;
}

.login-footer a {
  color: #8b95a7;
  text-decoration: none;
}

.login-right {
  position: relative;
  margin: 18px 18px 18px 0;
  border-radius: 18px;
  overflow: hidden;
  padding: 74px 64px;
  color: #fff;
  background:
    radial-gradient(
      circle at 20% 0%,
      rgba(255, 255, 255, 0.16),
      transparent 32%
    ),
    radial-gradient(
      circle at 92% 38%,
      rgba(255, 255, 255, 0.1),
      transparent 28%
    ),
    linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-right::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 88px 88px;
  opacity: 0.55;
}

.login-right::after {
  content: "";
  position: absolute;
  width: 480px;
  height: 480px;
  right: -160px;
  bottom: -180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.login-right-content {
  position: relative;
  z-index: 3;
  max-width: 470px;
}

.login-right h2 {
  margin: 0 0 20px;
  font-size: 34px;
  line-height: 1.22;
  letter-spacing: -0.8px;
}

.login-right p {
  margin: 0;
  max-width: 440px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.7;
}

.preview-card {
  position: absolute;
  left: 64px;
  right: 84px;
  bottom: 0;
  z-index: 2;
  height: 340px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-radius: 14px 14px 0 0;
  padding: 16px 18px;
  color: #172033;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.18);
}

.preview-header {
  display: flex;
  gap: 9px;
  margin-bottom: 14px;
}

.preview-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #cbd5e1;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mini-card {
  min-height: 112px;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  padding: 15px;
}

.mini-card small {
  display: block;
  margin-bottom: 8px;
  color: #8ea0b8;
  font-size: 12px;
  font-weight: 800;
}

.mini-card strong {
  display: block;
  font-size: 18px;
  color: #111827;
}

.chart-line {
  height: 38px;
  margin-top: 12px;
  border-radius: 9px;
  background:
    linear-gradient(
      135deg,
      transparent 44%,
      rgba(5, 150, 105, 0.3) 45%,
      rgba(5, 150, 105, 0.3) 52%,
      transparent 53%
    ),
    linear-gradient(
      45deg,
      transparent 44%,
      rgba(5, 150, 105, 0.25) 45%,
      rgba(5, 150, 105, 0.25) 52%,
      transparent 53%
    ),
    #f8fafc;
}

.table-preview {
  grid-column: span 2;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 10px;
}

.table-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.6fr;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid #eef2f7;
  font-size: 11px;
  color: #475569;
}

.table-row:last-child {
  border-bottom: 0;
}

.table-row strong {
  color: #53657d;
  font-size: 11px;
}

.floating-widget {
  position: absolute;
  z-index: 4;
  right: 52px;
  top: 300px;
  width: 190px;
  height: 205px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  padding: 18px;
  color: #111827;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.18);
}

.floating-widget small {
  display: block;
  margin-bottom: 12px;
  color: #8ea0b8;
  font-size: 13px;
  font-weight: 800;
}

.circle-chart {
  width: 96px;
  height: 96px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: conic-gradient(
    var(--primary) 0 72%,
    var(--primary-soft) 72% 100%
  );
  position: relative;
}

.circle-chart::after {
  content: "";
  position: absolute;
  inset: 18px;
  background: #fff;
  border-radius: 50%;
}

.floating-widget strong {
  display: block;
  text-align: center;
  font-size: 20px;
}

.floating-widget span {
  display: block;
  text-align: center;
  color: #475569;
  font-size: 11px;
}

@media (max-height: 760px) {
  .login-shell {
    padding: 16px;
  }

  .login-panel {
    height: calc(100vh - 32px);
  }

  .login-left {
    padding: 32px 64px;
  }

  .login-form-wrap {
    transform: translateY(-2px);
  }

  .login-form-wrap h1 {
    font-size: 29px;
  }

  .login-subtitle {
    margin-bottom: 24px;
  }

  .form-group {
    margin-bottom: 15px;
  }

  .form-extra {
    margin-bottom: 18px;
  }

  .login-footer {
    bottom: 24px;
  }

  .login-right {
    padding: 58px 64px;
  }

  .login-right h2 {
    font-size: 31px;
  }

  .preview-card {
    height: 300px;
  }

  .floating-widget {
    top: 270px;
  }
}

@media (max-width: 1000px) {
  body {
    overflow: auto;
  }

  .login-shell {
    height: auto;
    min-height: 100vh;
    padding: 20px;
  }

  .login-panel {
    height: auto;
  }

  .login-inner {
    grid-template-columns: 1fr;
    height: auto;
  }

  .login-right {
    display: none;
  }

  .login-left {
    min-height: 720px;
    padding: 42px 36px;
  }

  .login-footer {
    left: 36px;
    right: 36px;
  }
}

@media (max-width: 560px) {
  .login-shell {
    padding: 10px;
  }

  .login-panel {
    padding: 8px;
    border-radius: 18px;
  }

  .login-inner {
    border-radius: 14px;
  }

  .login-left {
    min-height: 680px;
    padding: 30px 22px;
  }

  .login-form-wrap {
    max-width: 100%;
  }

  .login-footer {
    left: 22px;
    right: 22px;
    bottom: 24px;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* Password recovery pages */
.auth-page-title {
  margin: 12px 0 8px;
  color: #0f172a;
  font-size: 30px;
  line-height: 1.2;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 10px;
  margin-top: 10px;
}

.auth-back-link:hover {
  color: #0055ff;
}
.auth-security-icon {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 34px;
}

.password-strength {
  margin-top: 12px;
}
.strength-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}
.strength-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition:
    width 0.25s ease,
    background-color 0.25s ease;
}
.strength-track span.very-weak {
  background: #dc2626;
}
.strength-track span.weak {
  background: #f97316;
}
.strength-track span.medium {
  background: #eab308;
}
.strength-track span.strong {
  background: #16a34a;
}
.strength-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-size: 13px;
  color: #64748b;
}
.strength-meta strong.very-weak {
  color: #dc2626;
}
.strength-meta strong.weak {
  color: #f97316;
}
.strength-meta strong.medium {
  color: #ca8a04;
}
.strength-meta strong.strong {
  color: #16a34a;
}
.password-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 12px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: #64748b;
  font-size: 12px;
}
.password-rules li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.password-rules li.passed {
  color: #15803d;
}
.password-match {
  min-height: 20px;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 600;
}
.password-match.match {
  color: #15803d;
}
.password-match.no-match {
  color: #dc2626;
}
.login-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 640px) {
  .password-rules {
    grid-template-columns: 1fr;
  }
  .auth-page-title {
    font-size: 25px;
  }
}

.demo-login-btn {
  width: 100%;
  height: 42px;
  margin-bottom: 10px;
  border: 1px solid green;
  border-radius: 7px;
  background: #ffffff;
  color: darkgreen;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.demo-login-btn i {
  margin-right: 6px;
  font-size: 15px;
  vertical-align: middle;
}

.demo-login-btn:hover {
  background: rgba(0, 255, 21, 0.06);
  transform: translateY(-1px);
}
