:root {
  --bg: #f5f8f7;
  --panel: #ffffff;
  --ink: #0b0f13;
  --muted: #66737d;
  --line: #dbe3e8;
  --green: #00c26f;
  --green-soft: #c9ffdf;
  --danger: #c0342b;
  --warn: #946100;
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  color: #fff;
  background: #0b0f13;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 820;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #06100b;
  background: var(--green);
  border-radius: 7px;
}

.account-nav {
  display: grid;
  gap: 6px;
  margin-top: 24px;
}

.account-nav a {
  min-height: 36px;
  padding: 9px 10px;
  color: #b8c4cd;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 760;
}

.account-nav a:hover {
  color: #fff;
  background: #18222b;
  border-color: #2a3945;
}

.account-nav a.is-active {
  color: #06100b;
  background: var(--green);
  border-color: var(--green);
}

.workspace {
  min-width: 0;
  padding: 18px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  min-height: 58px;
  min-width: 0;
}

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

h1 {
  margin-bottom: 4px;
  font-size: 23px;
  line-height: 1.1;
}

h2 {
  font-size: 17px;
}

.topbar p,
.muted,
.login-card p {
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.identity {
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.content-area {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.overview-page {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.overview-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.metric {
  min-width: 0;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.metric span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
}

.metric strong {
  font-size: 23px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.panel-header p {
  margin: 4px 0 0;
}

.summary-list {
  display: grid;
  gap: 1px;
  padding: 8px 14px 14px;
}

.summary-list > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  min-height: 42px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.summary-list > div:last-child {
  border-bottom: 0;
}

.summary-list span,
.compact-list small,
.quick-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.summary-list strong {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
}

.quick-actions a,
.compact-list a {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.quick-actions a {
  min-height: 82px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfc;
}

.quick-actions a:hover,
.compact-list a:hover {
  border-color: #9fb3be;
  background: #f4faf7;
}

.compact-list {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.compact-list a {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.compact-list a:last-child {
  border-bottom: 0;
}

.empty-panel {
  padding: 14px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.split > *,
.stack > * {
  min-width: 0;
}

.form-grid {
  display: grid;
  gap: 9px;
  padding: 14px;
}

label {
  display: grid;
  gap: 5px;
  color: #28333c;
  font-size: 13px;
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

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

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

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

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

th {
  color: var(--muted);
  background: #f8fbfa;
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #094228;
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 820;
}

.status.bad {
  color: #7b140f;
  background: #ffe2df;
}

.status.warn {
  color: #674400;
  background: #fff0bf;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.primary-button,
.secondary-button,
.danger-button,
.ghost-button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
}

.primary-button {
  color: #06100b;
  background: var(--green);
}

.secondary-button {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.danger-button {
  color: #7b140f;
  background: #fff4f3;
  border-color: #f0b9b4;
}

.ghost-button {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}

.link-button {
  color: #075437;
  background: transparent;
  border-color: transparent;
}

.notice {
  padding: 10px 12px;
  margin: 6px 0 14px;
  border: 1px solid #8edfb8;
  border-radius: var(--radius);
  background: #eafff3;
  color: #063d24;
  font-weight: 740;
}

.security-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.activation-panel {
  margin: 0 14px 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfc;
}

.ticket-thread {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.ticket-message {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfc;
}

.ticket-message span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.ticket-message p {
  margin: 0;
  font-size: 13px;
}

.login-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 24px;
  background: var(--bg);
}

.login-screen[hidden] {
  display: none;
}

.login-card {
  width: min(100%, 420px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 24px 70px rgb(15 23 30 / 12%);
}

.auth-notice {
  width: min(100%, 420px);
  margin: 0;
}

.login-card .brand {
  color: var(--ink);
  margin-bottom: 26px;
}

.login-card h2 {
  margin-bottom: 8px;
  font-size: 28px;
}

.login-card label {
  margin-top: 14px;
}

.login-card button {
  width: 100%;
  margin-top: 18px;
}

.login-card .link-button {
  margin-top: 10px;
}

@media (max-width: 980px) {
  .account-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .account-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar,
  .split,
  .overview-layout {
    flex-direction: column;
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .workspace {
    padding: 16px;
  }

  .grid,
  .account-nav,
  .quick-actions {
    grid-template-columns: 1fr;
  }

  .summary-list > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .summary-list strong {
    text-align: left;
  }

  .compact-list a {
    grid-template-columns: 1fr;
  }
}
