:root {
  --ink: #161722;
  --muted: #74747f;
  --line: #e6e4ee;
  --paper: #f6f3fb;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-soft: #fbfaff;
  --lavender: #d8d0f4;
  --lavender-strong: #aeb8e5;
  --rail: #d9dfef;
  --active: #d8cdf4;
  --green: #83bf8f;
  --amber: #c9935b;
  --red: #b83b5e;
  --blue: #8d9fd7;
  --shadow: 0 18px 45px rgba(63, 65, 92, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, Avenir Next, Avenir, Segoe UI, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
input,
select,
textarea {
  font: inherit;
}

.hidden {
  display: none !important;
}

.app-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(215, 221, 236, 0.92) 0 72px, rgba(245, 242, 251, 0.86) 72px 100%),
    radial-gradient(circle at 14% 0%, rgba(216, 208, 244, 0.38), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(174, 184, 229, 0.24), transparent 30%),
    #f6f3fb;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel,
.panel,
.hero-panel,
.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

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

.brand-lockup,
.brand-stack {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--blue), var(--lavender-strong));
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  border-radius: 7px;
  box-shadow: 0 10px 20px rgba(169, 155, 230, 0.24);
}

.eyebrow {
  margin: 0 0 5px;
  color: #6f64aa;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 5vw, 2.35rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.05rem, 2.4vw, 1.55rem);
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 14px;
  font-size: 0.88rem;
  line-height: 1.25;
  font-weight: 600;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
  text-transform: none;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--lavender-strong);
  box-shadow: 0 0 0 4px rgba(169, 155, 230, 0.18);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.primary-action,
.ghost-action,
.small-button,
.account-card button,
.icon-button {
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
}

.primary-action {
  padding: 11px 15px;
  color: #171827;
  background: linear-gradient(135deg, #e4dcff, #cfc7f3);
  box-shadow: 0 12px 25px rgba(169, 155, 230, 0.24);
  font-size: 0.84rem;
}

.ghost-action,
.small-button,
.account-card button,
.icon-button {
  padding: 10px 12px;
  color: var(--ink);
  background: #f0eef9;
}

.ghost-action {
  width: 100%;
  margin-top: 12px;
}

.small-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 214px 1fr;
  padding: 10px 18px;
  gap: 14px;
}

.sidebar {
  position: sticky;
  top: 10px;
  height: calc(100vh - 20px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 251, 255, 0.94)),
    rgba(255, 255, 255, 0.9);
  border-right: 1px solid var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  backdrop-filter: blur(20px);
}

.brand-stack strong,
.account-card span {
  display: block;
}

.brand-stack strong {
  font-size: 1rem;
  font-weight: 800;
}

.brand-stack span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.side-nav,
.bottom-nav {
  display: grid;
  gap: 6px;
}

.side-nav button,
.bottom-nav button {
  border: 0;
  border-radius: 7px;
  padding: 10px 10px;
  color: #5f6069;
  background: transparent;
  text-align: left;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 11px;
  letter-spacing: 0;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.nav-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  display: inline-grid;
  place-items: center;
  color: currentColor;
}

.nav-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-icon svg path:first-child:last-child,
.nav-icon svg path:nth-child(1):nth-last-child(4),
.nav-icon svg path:nth-child(1):nth-last-child(3) {
  fill: none;
}

.side-nav button.active,
.bottom-nav button.active {
  color: #272036;
  background: var(--active);
  box-shadow: inset 0 0 0 1px rgba(169, 155, 230, 0.2);
  font-weight: 600;
}

.account-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}

.main {
  min-width: 0;
  padding: 0 0 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(63, 65, 92, 0.08);
}

.icon-button {
  display: none;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.content-grid {
  display: grid;
  gap: 12px;
}

.hero-panel {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  min-height: 148px;
  padding: 18px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 244, 255, 0.94)),
    var(--panel);
}

.hero-panel p {
  max-width: 640px;
  color: var(--muted);
  margin-bottom: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  padding: 15px;
  border-radius: 10px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: none;
}

.metric strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.1;
  font-weight: 800;
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.panel {
  min-width: 0;
  padding: 16px;
  border-radius: 10px;
}

.panel.wide {
  grid-column: 1 / -1;
}

.timeline {
  display: grid;
  gap: 8px;
}

.timeline-item {
  position: relative;
  padding: 11px 12px 11px 14px;
  border-left: 3px solid var(--lavender-strong);
  border-radius: 8px;
  background: var(--panel-soft);
}

.timeline-item span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: none;
}

.timeline-item strong {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
}

.timeline-item p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.badge.good {
  color: var(--green);
  background: #eaf6ef;
}

.badge.watch {
  color: var(--amber);
  background: #fff3df;
}

.badge.danger {
  color: var(--red);
  background: #fde8ef;
}

.badge.neutral {
  color: var(--blue);
  background: #eef2ff;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
}

td {
  font-size: 0.78rem;
}

.request-form.compact {
  margin-top: 0;
}

.bottom-nav {
  display: none;
}

@media (max-width: 980px) {
  .app-shell {
    display: block;
    padding: 0;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(320px, 88vw);
    height: 100vh;
    z-index: 20;
    border-radius: 0 16px 16px 0;
    transform: translateX(-104%);
    transition: transform 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .icon-button {
    display: inline-grid;
  }

  .main {
    padding: 18px 14px 92px;
  }

  .metric-row,
  .split-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    gap: 12px;
  }

  .bottom-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 10;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
  }

  .bottom-nav button {
    white-space: nowrap;
    text-align: center;
  }
}

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

  .main {
    padding: 18px 14px 92px;
  }

  .hero-panel,
  .panel,
  .metric {
    padding: 18px;
  }
}
