:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17221b;
  background: #f3f1eb;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { min-height: 100vh; }
button, input { font: inherit; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 10%, rgba(152, 42, 46, .11), transparent 34%),
    radial-gradient(circle at 90% 90%, rgba(38, 92, 60, .12), transparent 38%),
    #f3f1eb;
}

.login-card {
  width: min(440px, 100%);
  padding: 38px;
  border: 1px solid #ded9ce;
  border-radius: 20px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 22px 60px rgba(41, 35, 26, .12);
}

.brand { color: #8c2028; font-weight: 900; letter-spacing: .18em; }
.eyebrow { margin: 24px 0 7px; color: #647068; font-size: .78rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.8rem, 5vw, 2.45rem); line-height: 1.05; }
.intro { margin: 18px 0 28px; color: #59645d; line-height: 1.55; }
#loginForm, #passwordSetup { display: grid; gap: 10px; }
.setup-copy { margin: 0 0 8px; color: #59645d; line-height: 1.5; }
label { margin-top: 7px; font-size: .9rem; font-weight: 700; }
input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cfc9bd;
  border-radius: 10px;
  background: #fff;
}
input:focus { outline: 3px solid rgba(140, 32, 40, .16); border-color: #8c2028; }
button {
  margin-top: 12px;
  padding: 12px 18px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #8c2028;
  font-weight: 800;
  cursor: pointer;
}
button:disabled { cursor: wait; opacity: .65; }
.text-button {
  margin-top: 2px;
  padding: 7px;
  color: #8c2028;
  background: transparent;
  font-weight: 750;
}
.text-button:hover { text-decoration: underline; }
.message { min-height: 1.25em; margin: 4px 0 0; color: #a0212c; font-size: .9rem; }

.app-shell { height: 100vh; background: #fff; }
.app-bar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 18px;
  color: #fff;
  background: #17221b;
}
.app-bar div { min-width: 0; display: flex; flex-direction: column; }
.app-bar span { color: #c8d2cb; font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.secondary { margin: 0; padding: 8px 12px; border: 1px solid #87938b; background: transparent; font-size: .85rem; }
iframe { width: 100%; height: calc(100vh - 58px); border: 0; background: #fff; }
.loading, .fatal { display: grid; place-items: center; min-height: calc(100vh - 58px); padding: 30px; text-align: center; }
.fatal { color: #8c2028; }

@media (max-width: 620px) {
  .login-card { padding: 28px 22px; border-radius: 15px; }
  .app-bar { height: 66px; padding: 8px 10px; }
  .app-bar strong { font-size: .91rem; }
  .secondary { padding: 7px 9px; font-size: .76rem; }
  iframe { height: calc(100vh - 66px); }
}
