:root {
  --primary-dark: #2c3e50;
  --primary-darker: #1a2530;
  --primary-darkest: #0d1319;
  --accent-blue: #3498db;
  --accent-blue-dk: #2980b9;
  --brand-blue: #1a73e8;
  --brand-green: #1e8c5a;
  --brand-green-soft: #e8f5e9;
  --brand-red: #d32f2f;
  --gray-dark: #34495e;
  --gray-medium: #7f8c8d;
  --gray-light: #bdc3c7;
  --gray-lighter: #ecf0f1;
  --surface: #ffffff;
  --page-bg: #f0f2f5;
  --border: #e8eaf0;
  --text: #1a1f36;
  --muted: #5f6368;
  --shadow: 0 4px 20px rgba(0, 0, 0, .08);
}

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

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

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  overflow-x: hidden;
}

.login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(44, 62, 80, .08), rgba(240, 242, 245, 0) 30%),
    var(--page-bg);
}

.login-panel {
  width: 100%;
  max-width: 430px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 2px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--primary-dark);
  color: #fff;
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}

.brand-mark i {
  font-size: 1.28rem;
}

.brand-copy {
  min-width: 0;
}

.brand-kicker {
  margin: 0 0 2px;
  color: var(--gray-medium);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .8px;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand-copy h1 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 1.14rem;
  font-weight: 700;
  line-height: 1.15;
}

.login-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 24px 20px 20px;
}

.card-accent {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-green), var(--brand-blue));
}

.login-heading {
  margin-bottom: 20px;
}

.module-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 6px 10px;
  margin-bottom: 14px;
  border-radius: 20px;
  background: var(--brand-green-soft);
  color: #1b5e20;
  font-size: .72rem;
  font-weight: 700;
}

.login-heading h2 {
  margin: 0 0 5px;
  color: var(--text);
  font-size: 1.38rem;
  font-weight: 700;
  line-height: 1.15;
}

.login-heading p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.45;
}

.field-group {
  margin-bottom: 14px;
}

.field-group label {
  display: block;
  margin: 0 0 7px;
  color: var(--gray-dark);
  font-size: .76rem;
  font-weight: 700;
}

.field-control {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--gray-medium);
  padding: 0 12px;
  transition: border-color .15s, box-shadow .15s;
}

.field-control:focus-within {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, .12);
}

.field-control > i {
  font-size: 1rem;
  flex: 0 0 auto;
}

.field-control input {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.field-control input::placeholder {
  color: #a0a7b3;
}

.field-control--password {
  padding-right: 6px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: #f8f9fc;
  color: var(--gray-medium);
  flex: 0 0 auto;
  transition: background .15s, color .15s;
}

.icon-btn:hover,
.icon-btn:focus {
  background: #e8eaf0;
  color: var(--primary-dark);
  outline: 0;
}

.ds-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border: 0;
  border-radius: 8px;
  font-family: "Public Sans", system-ui, sans-serif;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .15s, transform .1s, box-shadow .15s;
}

.ds-btn:hover {
  opacity: .9;
  transform: translateY(-1px);
}

.ds-btn:disabled {
  opacity: .68;
  transform: none;
}

.ds-btn-success {
  background: var(--brand-green);
  color: #fff;
  box-shadow: 0 8px 22px rgba(30, 140, 90, .18);
}

.ds-btn-outline {
  background: transparent;
  border: 1.5px solid var(--brand-blue);
  color: var(--brand-blue);
}

.ds-btn-block {
  width: 100%;
  margin-top: 14px;
}

.danger-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 13px 15px;
  border-left: 4px solid var(--brand-red);
  border-radius: 8px;
  background: #ffebee;
  color: #7f0000;
  font-size: .81rem;
  line-height: 1.35;
}

.danger-box i {
  margin-top: 1px;
  flex: 0 0 auto;
}

.danger-box strong,
.danger-box span {
  display: block;
}

.danger-box span {
  margin-top: 2px;
}

.login-footer {
  color: var(--gray-medium);
  text-align: center;
  font-size: .75rem;
  font-weight: 500;
}

@media (max-width: 360px) {
  .login-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .login-card {
    padding: 22px 16px 18px;
  }

  .login-heading h2 {
    font-size: 1.28rem;
  }
}

@media (min-width: 768px) {
  .login-panel {
    max-width: 420px;
  }
}
