html { font-size: 14px; }

body {
  background: #f4f6f8;
  color: #17202a;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  margin: 0;
}

.container { max-width: none; padding: 0; }
.navbar, footer { display: none; }

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #0f2537;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 22px;
}

.brand-block {
  align-items: center;
  display: flex;
  gap: 12px;
}

.brand-mark {
  align-items: center;
  background: #42b883;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.brand-block small {
  color: #b8c7d3;
  display: block;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar a,
.ghost {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #dce8f1;
  display: block;
  padding: 10px 12px;
  text-align: left;
  text-decoration: none;
}

.sidebar a:hover,
.sidebar a.active,
.ghost:hover {
  background: rgba(255,255,255,.08);
}

.inline-link {
  color: #175a84;
  font-weight: 700;
  text-decoration: none;
}

.main-pane {
  padding: 24px;
}

.topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.eyebrow {
  color: #537188;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1, h2, h3 { letter-spacing: 0; margin-top: 0; }
h1 { font-size: 30px; }
h2 { font-size: 21px; }
h3 { font-size: 15px; color: #334155; }

.user-chip,
.notice,
.metric-grid article,
.panel,
.table-section {
  background: #fff;
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.user-chip {
  padding: 10px 14px;
  text-align: right;
}

.user-chip span,
.user-chip strong {
  display: block;
}

.user-chip span {
  color: #64748b;
  font-size: 12px;
}

.metric-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
}

.metric-grid article {
  padding: 16px;
}

.metric-grid span {
  color: #637083;
  display: block;
  font-size: 13px;
}

.metric-grid strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
  margin-top: 6px;
}

.notice {
  margin-bottom: 16px;
  padding: 12px 14px;
}

.panel,
.table-section {
  margin-bottom: 18px;
  padding: 18px;
}

.section-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.pill,
.status {
  background: #e8f5ee;
  border: 1px solid #bfe6cf;
  border-radius: 999px;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
}

.issue-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
}

.field-group,
.reseller-form,
.update-form,
.settings-form {
  display: grid;
  gap: 10px;
}

.workspace-two {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}

.reseller-form {
  grid-template-columns: 1.4fr 1.4fr 1fr .7fr auto;
  margin-bottom: 16px;
}

.update-form {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
}

.settings-form {
  max-width: 760px;
}

.update-form textarea,
.update-form input[name=packageUrl],
.update-form input[name=sha256] {
  grid-column: span 2;
}

.two-cols,
.module-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.module-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

input,
select,
textarea {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
  padding: 10px 11px;
  width: 100%;
}

textarea { min-height: 82px; }

button {
  background: #175a84;
  border: 0;
  border-radius: 6px;
  color: #fff;
  font-weight: 800;
  padding: 10px 14px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #e5e7eb;
  font-size: 13px;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #475569;
  font-weight: 800;
}

code {
  color: #0f172a;
  white-space: nowrap;
}

.login-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 80vh;
  padding: 24px;
}

.login-panel {
  background: #fff;
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  max-width: 420px;
  padding: 24px;
  width: 100%;
}

.alert {
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #991b1b;
  padding: 10px;
}

.muted {
  color: #64748b;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .metric-grid, .issue-grid { grid-template-columns: 1fr 1fr; }
  .reseller-form, .update-form, .workspace-two { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .metric-grid, .issue-grid, .two-cols, .module-grid, .reseller-form, .update-form, .workspace-two {
    grid-template-columns: 1fr;
  }
}
