:root {
  --ege-deep: #143f32;
  --ege-deep-2: #0f3027;
  --ege-gold: #d4af37;
  --ege-gold-dark: #a97a08;
  --ege-cream: #fffaf2;
  --ege-pink: #f8e1e7;
  --ege-ink: #17251f;
  --ege-muted: #6d756f;
  --ege-line: rgba(20, 63, 50, .14);
  --ege-body: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ege-heading: "Marcellus", Georgia, serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--ege-cream); }

body.ege-pwa-login {
  min-height: 100svh;
  margin: 0;
  color: var(--ege-ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(248, 225, 231, .82), transparent 34%),
    radial-gradient(circle at 88% 82%, rgba(221, 231, 208, .78), transparent 32%),
    var(--ege-cream);
  font-family: var(--ege-body);
  -webkit-font-smoothing: antialiased;
}

button, input, a { font: inherit; }

.ege-app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(420px, .97fr);
  width: min(1180px, calc(100% - 40px));
  min-height: min(760px, calc(100svh - 48px));
  margin: 24px auto;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, .34);
  border-radius: 26px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 28px 80px rgba(20, 63, 50, .16);
}

.ege-app-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  padding: clamp(36px, 6vw, 76px);
  color: #fff;
  background:
    linear-gradient(150deg, rgba(15, 48, 39, .96), rgba(20, 63, 50, .9)),
    var(--ege-deep);
}

.ege-app-mark {
  width: clamp(88px, 11vw, 132px);
  height: clamp(88px, 11vw, 132px);
  object-fit: contain;
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, .18));
}

.ege-app-kicker {
  margin: 0 0 12px;
  color: var(--ege-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
}

.ege-app-brand h1,
.ege-login-head h2 {
  margin: 0;
  font-family: var(--ege-heading);
  font-weight: 400;
  letter-spacing: 0;
}

.ege-app-brand h1 {
  max-width: 620px;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.02;
}

.ege-app-lead {
  max-width: 520px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, .76);
  font-size: 16px;
  line-height: 1.75;
}

.ege-app-benefits {
  display: grid;
  gap: 10px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, .86);
  font-size: 14px;
}

.ege-app-benefits li {
  position: relative;
  padding-left: 22px;
}

.ege-app-benefits li::before {
  content: "";
  position: absolute;
  top: .55em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ege-gold);
}

.ege-login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 6vw, 74px);
}

.ege-login-head h2 {
  color: var(--ege-deep);
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.06;
}

.ege-login-head > p:last-child {
  margin: 12px 0 0;
  color: var(--ege-muted);
}

.ege-role-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 30px 0 24px;
  padding: 4px;
  border: 1px solid var(--ege-line);
  border-radius: 12px;
  background: #f5f2eb;
}

.ege-role-switch button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: var(--ege-muted);
  background: transparent;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.ege-role-switch button.is-active {
  color: var(--ege-deep);
  background: #fff;
  box-shadow: 0 6px 18px rgba(20, 63, 50, .08);
}

.ege-role-panel { min-height: 306px; }
.ege-role-panel[hidden] { display: none !important; }

.ege-login-form {
  display: grid;
  gap: 10px;
}

.ege-login-form label:not(.ege-remember) {
  color: var(--ege-deep);
  font-size: 13px;
  font-weight: 600;
}

.ege-login-form input[type="text"],
.ege-login-form input[type="password"] {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid rgba(20, 63, 50, .2);
  border-radius: 9px;
  outline: 0;
  color: var(--ege-ink);
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.ege-login-form input:focus {
  border-color: var(--ege-gold-dark);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, .16);
}

.ege-remember {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 4px 0;
  color: var(--ege-muted);
  font-size: 13px;
}

.ege-primary-action,
.ege-install-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid var(--ege-gold);
  border-radius: 9px;
  color: #fff;
  background: var(--ege-deep);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.ege-primary-action:hover,
.ege-primary-action:focus-visible,
.ege-install-action:hover,
.ege-install-action:focus-visible {
  color: #fff;
  background: var(--ege-deep-2);
  box-shadow: 0 10px 28px rgba(20, 63, 50, .2);
  transform: translateY(-1px);
}

.ege-text-link {
  justify-self: start;
  margin-top: 2px;
  color: var(--ege-gold-dark);
  font-size: 13px;
  font-weight: 600;
}

.ege-login-error {
  margin: 2px 0;
  padding: 11px 13px;
  border-left: 3px solid #a43b35;
  color: #7d2c27;
  background: #fff0ee;
  font-size: 13px;
  line-height: 1.45;
}

.ege-customer-access {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 280px;
  padding: 28px;
  border: 1px solid var(--ege-line);
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #fbf6ee);
}

.ege-customer-access h3 {
  margin: 0;
  color: var(--ege-deep);
  font-family: var(--ege-heading);
  font-size: 28px;
  font-weight: 400;
}

.ege-customer-access p {
  margin: 10px 0 22px;
  color: var(--ege-muted);
  line-height: 1.65;
}

.ege-install-box {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--ege-line);
}

.ege-install-action {
  min-height: 42px;
  padding: 0 16px;
  color: var(--ege-deep);
  background: transparent;
  font-size: 13px;
}

.ege-install-action:hover,
.ege-install-action:focus-visible { color: #fff; }

.ege-install-action:disabled {
  opacity: .65;
  cursor: default;
  transform: none;
}

.ege-install-box p {
  margin: 0;
  color: var(--ege-muted);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 820px) {
  .ege-app-shell {
    grid-template-columns: 1fr;
    width: 100%;
    min-height: 100svh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .ege-app-brand {
    min-height: auto;
    padding: 28px 22px 30px;
  }

  .ege-app-mark { width: 72px; height: 72px; }
  .ege-app-brand h1 { max-width: 520px; font-size: clamp(34px, 10vw, 48px); }
  .ege-app-lead { margin-top: 14px; font-size: 14px; }
  .ege-app-benefits { display: none; }

  .ege-login-panel {
    justify-content: flex-start;
    padding: 30px 20px calc(34px + env(safe-area-inset-bottom));
  }

  .ege-role-panel { min-height: 290px; }
  .ege-install-box { grid-template-columns: 1fr; }
  .ege-install-action { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

