:root {
  --bg: #f4f7fb;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-strong: #ffffff;
  --text: #162640;
  --muted: #5a6d86;
  --line: rgba(22, 38, 64, 0.12);
  --brand: #162640;
  --brand-dark: #0d1730;
  --accent: #f5910f;
  --accent-soft: rgba(245, 145, 15, 0.16);
  --highlight: #1cb3ea;
  --highlight-soft: rgba(28, 179, 234, 0.16);
  --success: #7bd900;
  --success-soft: rgba(123, 217, 0, 0.16);
  --shadow: 0 18px 44px rgba(22, 38, 64, 0.1);
  --radius: 4px;
  --radius-soft: 6px;
  --radius-panel: 8px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(28, 179, 234, 0.16), transparent 24%),
    radial-gradient(circle at 85% 15%, rgba(245, 145, 15, 0.12), transparent 18%),
    linear-gradient(180deg, #f9fbfe 0%, #eef4fa 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92em;
}

img {
  max-width: 100%;
  display: block;
}

.eyebrow,
.section-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
}

.lead {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 3px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--brand);
  color: #fff;
}

.button-primary:hover {
  background: var(--brand-dark);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(22, 38, 64, 0.12);
  color: var(--text);
}

.button-secondary:hover {
  border-color: rgba(28, 179, 234, 0.28);
  background: rgba(255, 255, 255, 0.94);
}

.button-block {
  width: 100%;
}

.public-home,
.login-layout,
.dashboard-grid {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.public-home {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.login-card,
.dashboard-panel,
.login-brand-panel,
.brand-mark,
.modal-surface {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.login-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
  min-height: 100vh;
  padding: 40px 0;
}

.login-layout-brand {
  align-items: stretch;
}

.login-brand {
  padding: 20px 6px;
}

.login-brand-panel {
  border-radius: var(--radius-panel);
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.login-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  pointer-events: none;
}

.login-logo-wrap {
  width: min(320px, 100%);
  margin-bottom: 20px;
}

.login-logo {
  width: 100%;
  height: auto;
}

.feature-list,
.panel-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.feature-list li,
.panel-list li {
  padding: 12px 14px;
  border-radius: var(--radius-soft);
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(22, 38, 64, 0.06);
  font-size: 0.92rem;
}

.login-card-wrap {
  display: flex;
  justify-content: center;
}

.login-card {
  width: min(460px, 100%);
  padding: 28px;
  border-radius: var(--radius-panel);
}

.login-card-head h2,
.dashboard-panel h2 {
  margin: 8px 0 0;
  font-size: 1.45rem;
  line-height: 1.1;
}

.login-card-head-compact h2 {
  margin: 0;
}

.modal-title-small {
  margin: 0;
  font-size: 0.66rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.field {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.field span {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.field input {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  font: inherit;
  color: var(--text);
}

.field input:focus {
  outline: 2px solid rgba(28, 179, 234, 0.18);
  border-color: rgba(28, 179, 234, 0.34);
}

.form-alert {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 3px;
  background: rgba(245, 145, 15, 0.08);
  border: 1px solid rgba(245, 145, 15, 0.24);
  color: #8f4e00;
  font-size: 0.9rem;
}

.form-note {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.88rem;
}

.dashboard-topbar {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.dashboard-topbar h1,
.brand-stage h1 {
  margin: 8px 0 0;
  line-height: 1.02;
}

.dashboard-topbar h1 {
  font-size: 2.2rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 36px;
}

.dashboard-panel {
  min-height: 220px;
  padding: 24px;
  border-radius: var(--radius-panel);
}

.dashboard-panel-accent {
  background:
    linear-gradient(135deg, rgba(22, 38, 64, 0.96), rgba(13, 23, 48, 0.98)),
    var(--panel);
  color: #f6fbff;
}

.dashboard-panel-accent .section-label,
.dashboard-panel-accent p {
  color: rgba(246, 251, 255, 0.82);
}

.public-topbar {
  position: relative;
  z-index: 2;
  padding: 20px 0 0;
}

.public-topbar-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.public-brand-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.public-brand-name {
  color: var(--brand);
}

.public-brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--success) 58%, var(--highlight));
  box-shadow: 0 0 0 6px rgba(28, 179, 234, 0.08);
}

.public-home-centered {
  min-height: calc(100vh - 84px);
}

.brand-stage {
  width: min(860px, 100%);
  margin: 0 auto;
  text-align: center;
  padding: 32px 0 48px;
}

.brand-stage-minimal {
  padding-top: 12px;
}

.brand-mark {
  width: min(520px, 88vw);
  margin: 0 auto 20px;
  border-radius: 8px;
  padding: 28px;
}

.brand-mark img {
  width: 100%;
  height: auto;
}

.brand-stage h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.brand-stage-lead {
  max-width: 760px;
  margin: 0 auto;
}

.hero-actions-centered {
  justify-content: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(22, 38, 64, 0.46);
  backdrop-filter: blur(8px);
  z-index: 50;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-dialog {
  position: relative;
  width: min(420px, 100%);
}

.modal-surface,
.login-card-modal {
  width: 100%;
  border-radius: 6px;
  padding: 20px;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.modal-actions .button {
  min-width: 120px;
}

@media (max-width: 900px) {
  .login-layout,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-topbar {
    align-items: start;
    flex-direction: column;
  }

  .login-card,
  .dashboard-panel,
  .login-brand-panel,
  .brand-mark,
  .modal-surface,
  .login-card-modal {
    padding: 20px;
  }

  .public-topbar-inner {
    width: min(100%, calc(100% - 24px));
  }
}
