:root {
  --bg: #f3f7f5;
  --panel: #ffffff;
  --ink: #0b0f13;
  --graphite: #151b21;
  --graphite-2: #1f2933;
  --muted: #66737d;
  --line: #dbe3e8;
  --soft: #eef5f2;
  --green: #00c26f;
  --green-soft: #c9ffdf;
  --green-2: #b8ffd9;
  --danger: #c0342b;
  --warn: #946100;
  --radius: 8px;
  --shadow: 0 22px 60px rgb(15 23 30 / 10%);
  --shadow-soft: 0 10px 26px rgb(15 23 30 / 7%);
  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;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f8fbfa 0, var(--bg) 360px, #eef4f8 100%);
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgb(0 194 111 / 34%);
  outline-offset: 2px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 20px 14px;
  color: #fff;
  background:
    linear-gradient(180deg, #0b0f13 0, var(--graphite) 62%, #101820 100%);
  border-right: 1px solid rgb(255 255 255 / 7%);
  box-shadow: 16px 0 40px rgb(15 23 30 / 12%);
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #06100b;
  background: linear-gradient(135deg, var(--green), #75f7a4);
  border-radius: 7px;
  box-shadow: 0 12px 26px rgb(0 194 111 / 24%);
  flex: 0 0 auto;
}

.account-nav {
  display: grid;
  gap: 5px;
  margin-top: 26px;
}

.account-nav a {
  min-height: 34px;
  padding: 8px 10px 8px 12px;
  color: #c5d1d8;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 760;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.account-nav a:hover {
  color: #fff;
  background: rgb(255 255 255 / 8%);
  border-color: rgb(255 255 255 / 12%);
  transform: translateX(2px);
}

.account-nav a.is-active {
  color: #06100b;
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 12px 26px rgb(0 194 111 / 20%);
}

.workspace {
  min-width: 0;
  padding: 22px clamp(18px, 3vw, 32px) 34px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  min-height: 66px;
  min-width: 0;
  margin: -22px calc(clamp(18px, 3vw, 32px) * -1) 18px;
  padding: 16px clamp(18px, 3vw, 32px);
  background: rgb(243 247 245 / 88%);
  border-bottom: 1px solid rgb(217 224 230 / 72%);
  backdrop-filter: blur(18px);
}

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

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

h2 {
  font-size: 16px;
  line-height: 1.2;
}

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

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

.identity {
  max-width: 320px;
  color: #40505c;
  font-size: 14px;
  font-weight: 720;
  overflow-wrap: anywhere;
}

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

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

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

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

.account-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  min-width: 0;
  padding: 18px;
  color: #fff;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, #0b0f13 0, #18232c 72%, #0e1915 100%);
  box-shadow: var(--shadow);
}

.hero-copy {
  min-width: 0;
}

.hero-label {
  display: block;
  margin-bottom: 7px;
  color: var(--green-2);
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

.account-hero h2 {
  margin-bottom: 7px;
  font-size: 22px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.account-hero p {
  max-width: 670px;
  margin-bottom: 0;
  color: #cad5dc;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 220px;
}

.account-hero .secondary-button {
  color: #fff;
  background: rgb(255 255 255 / 9%);
  border-color: rgb(255 255 255 / 16%);
}

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

.focus-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 13px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.focus-card:hover {
  transform: translateY(-1px);
  border-color: rgb(0 194 111 / 42%);
  box-shadow: 0 12px 28px rgb(0 194 111 / 12%);
}

.focus-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

.focus-card strong {
  font-size: 26px;
  line-height: 1;
}

.focus-card p {
  min-height: 34px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.metric {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 84px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #fff 0, #fbfdfc 100%);
  box-shadow: var(--shadow-soft);
}

.metric::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  content: "";
  background: var(--green);
}

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

.metric strong {
  font-size: 25px;
  line-height: 1;
}

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

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fbfdfc);
}

.panel-header h2 {
  margin-bottom: 0;
}

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

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

.summary-list > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  min-height: 40px;
  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: 10px;
  padding: 15px;
}

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

.quick-actions a {
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #fff 0, #fbfdfc 100%);
  box-shadow: inset 0 1px 0 rgb(15 23 30 / 2%);
}

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

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

.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;
}

.empty-cell {
  padding: 0;
}

.empty-state {
  margin: 0;
  padding: 14px;
  color: var(--muted);
  background: #fbfdfc;
  font-size: 13px;
  font-weight: 700;
}

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

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

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

.form-grid {
  display: grid;
  gap: 10px;
  padding: 15px;
}

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

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: inset 0 1px 0 rgb(15 23 30 / 2%);
}

input:hover,
select:hover,
textarea:hover {
  border-color: #b8c5cc;
}

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

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
}

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

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

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

td {
  overflow-wrap: anywhere;
}

tbody tr:hover td {
  background: #fbfdfc;
}

.status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: 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: 34px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.primary-button {
  color: #06100b;
  background: var(--green);
  box-shadow: 0 10px 22px rgb(0 194 111 / 18%);
}

.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: rgb(255 255 255 / 72%);
  border-color: var(--line);
}

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

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover,
.ghost-button:hover,
.link-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

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

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

.form-grid .security-note {
  margin: 0;
}

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

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

.ticket-message {
  padding: 10px;
  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;
  z-index: 100;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 24px;
  overflow: auto;
  background:
    linear-gradient(180deg, #f8fbfa 0, #eef5f2 100%);
}

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

.login-card {
  width: min(100%, 420px);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.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: 27px;
}

.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;
    max-height: none;
  }

  .account-nav {
    grid-template-columns: repeat(4, 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));
  }

  .account-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-actions {
    justify-content: flex-start;
    min-width: 0;
  }

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

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

  .topbar {
    margin: -16px -16px 16px;
    padding: 14px 16px;
  }

  .topbar-actions {
    justify-content: flex-start;
    width: 100%;
  }

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

  .focus-grid {
    grid-template-columns: 1fr;
  }

  .account-nav {
    grid-template-columns: repeat(2, minmax(0, 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;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
