.app {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
}

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

.login-card,
.controls,
.kpis article,
.panel-card,
.board {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-card {
  display: grid;
  gap: 16px;
  width: min(460px, 100%);
  border-color: rgba(22, 113, 93, 0.16);
  padding: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 253, 252, 0.94));
  box-shadow: 0 22px 60px rgba(22, 32, 29, 0.12);
}

.main-view {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  border-right: 1px solid rgba(22, 113, 93, 0.14);
  background:
    linear-gradient(180deg, rgba(250, 253, 252, 0.94), rgba(239, 246, 243, 0.92));
  padding: 18px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-bottom: 24px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.brand span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--blue));
  box-shadow: 0 10px 22px rgba(22, 113, 93, 0.22);
  font-size: 18px;
  font-weight: 950;
}

.brand em,
.version-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border: 1px solid rgba(40, 95, 199, 0.18);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.login-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.content-shell {
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0 auto;
  padding: 0 24px 36px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  min-height: 64px;
  margin: 0 0 24px;
  padding: max(12px, var(--safe-top)) 0 12px;
  border-bottom: 1px solid rgba(22, 113, 93, 0.12);
  background: var(--chrome-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.page-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
  letter-spacing: 0;
}

label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

label span {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
}

.checkbox-row span {
  color: var(--ink);
}

.checkbox-row small {
  grid-column: 2;
}

.field-help {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

label.is-disabled {
  opacity: 0.62;
}

label.is-disabled input {
  background: #f3f6f5;
  cursor: not-allowed;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  outline: none;
}

textarea {
  padding: 10px 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 125, 105, 0.14);
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
.tab:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.26);
  outline-offset: 2px;
}

.primary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 42px;
  border-radius: 8px;
  border: 0;
  padding: 0 16px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--green), #1f5da8);
  box-shadow: 0 10px 18px rgba(22, 113, 93, 0.16);
}

.ghost-button {
  color: var(--ink);
  background: #eef4f2;
}

.danger-button {
  color: var(--red);
  background: #fff1f1;
}

.muted-cell {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.file-mode-card input,
.file-mode-card button[type="submit"] {
  opacity: 0.55;
}
