* { box-sizing: border-box; }
:root {
  color: #182a23;
  background: #f5f7f6;
  font: 15px/1.5 'Inter', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  --green: #226b48;
  --line: #dce6df;
  --muted: #52665c;
}
[hidden] { display: none !important; }
body { margin: 0; display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: progress; opacity: .55; }
a { color: var(--green); }
:focus-visible { outline: 2px solid #438963; outline-offset: 3px; }
.sidebar { display: flex; flex-direction: column; background: #192d25; color: #edf7f0; padding: 30px 18px 18px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 12px; font-size: 18px; font-weight: 700; }
.brand-icon { position: relative; width: 40px; height: 40px; border-radius: 11px; background: #bbedcd; color: #193f2a; }
.brand-icon::before, .brand-icon::after { content: ''; position: absolute; width: 12px; height: 12px; top: 12px; border: 2px solid; border-radius: 50%; }
.brand-icon::before { left: 8px; }
.brand-icon::after { left: 16px; }
.brand small { display: block; color: #a8c5b4; font-size: 12px; font-weight: 400; letter-spacing: .08em; }
.navigation { margin-top: 44px; }
.navigation a { display: flex; align-items: center; gap: 12px; min-height: 44px; width: 100%; text-align: left; background: #304c3e; color: white; border-radius: 8px; padding-inline: 14px; text-decoration: none; }
.grid-icon { height: 14px; width: 14px; border: 1px solid currentColor; border-radius: 2px; background: linear-gradient(90deg, transparent 47%, currentColor 47% 53%, transparent 53%), linear-gradient(transparent 47%, currentColor 47% 53%, transparent 53%); }
.sidebar-footer { color: #a8c5b4; font-size: 13px; margin: auto 12px 0; padding-top: 24px; }
.workspace { min-width: 0; }
.topbar { background: #fff; min-height: 66px; border-bottom: 1px solid var(--line); padding: 10px clamp(16px, 4vw, 50px); display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); }
.crumb { padding-inline: 8px; color: #81978b; }
.session { display: flex; flex-wrap: wrap; justify-content: end; align-items: center; gap: 6px 14px; }
#current-account { color: #203d2e; font-weight: 650; }
.content { margin: 0 auto; max-width: 1360px; padding: 39px clamp(16px, 4vw, 50px) 60px; }
h1 { margin: 0; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.02em; line-height: 1.2; }
h2 { margin: 0; font-size: 18px; }
.muted { color: var(--muted); margin: 8px 0 0; }
.primary, .secondary, .plain { min-height: 40px; border-radius: 8px; padding: 7px 15px; font-weight: 650; white-space: nowrap; }
.primary { background: var(--green); border: 1px solid var(--green); color: #fff; }
.primary:hover { background: #195638; }
.secondary { border: 1px solid var(--line); background: white; color: #283d32; }
.secondary:hover { background: #eff6f1; }
.plain { border: 0; background: transparent; color: var(--green); padding-inline: 4px; }
.plain:hover { text-decoration: underline; }
.section-head, .panel-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.counts div { background: #eaf3ed; border: 1px solid var(--line); border-radius: 12px; padding: 17px 19px; }
.counts dt { color: var(--muted); font-size: 13px; }
.counts dd { margin: 2px 0 0; color: #184831; font-size: 28px; font-weight: 720; font-variant-numeric: tabular-nums; }
.panel, .login-card { border: 1px solid var(--line); background: #fff; border-radius: 13px; }
.panel-toolbar { padding: 17px 19px; }
.filters { display: flex; gap: 10px; }
input, select { display: block; min-height: 41px; width: 100%; min-width: 0; border: 1px solid #bdcdc3; border-radius: 8px; padding: 7px 10px; background: white; color: #182a23; }
.filters select { width: 104px; flex-shrink: 0; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
thead { background: #f4f8f5; color: var(--muted); font-size: 13px; }
th, td { padding: 11px 17px; border-top: 1px solid var(--line); }
td { font-size: 14px; }
td:first-child { min-width: 124px; overflow-wrap: anywhere; font-weight: 650; }
td:nth-child(2) { overflow-wrap: anywhere; }
td:nth-child(5) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; min-width: 155px; }
.row-actions a { padding-block: 9px; white-space: nowrap; }
.row-actions .primary { white-space: nowrap; }
.credential-target { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.pill { display: inline-block; white-space: nowrap; padding: 3px 8px; border-radius: 30px; background: #ecefed; color: #3f5347; font-size: 12px; font-weight: 650; }
.pill.active { color: #1f653f; background: #e3f3e8; }
.pill.pending { color: #7e4b19; background: #fff2db; }
.pill.rejected { color: #902d31; background: #fae9e8; }
.empty { text-align: center; color: var(--muted); padding: 42px 12px; margin: 0; }
.sign-in { display: grid; place-content: center; min-height: 65vh; }
.login-card { width: 100%; max-width: 420px; padding: 32px; box-shadow: 0 15px 50px #224b3020; }
form { display: grid; gap: 14px; }
.login-card form { margin-top: 25px; }
label { display: grid; gap: 5px; font-weight: 600; }
dialog { width: calc(100% - 24px); max-width: 470px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; }
dialog::backdrop { background: #14291e72; }
.dialog-actions { display: flex; justify-content: end; gap: 8px; }
.form-error, .notice { margin: 0; color: #992f30; }
.notice { padding: 10px 0; }
.success { color: var(--green); margin-top: 10px; }
@media (max-width: 820px) {
  body { grid-template-columns: minmax(0, 1fr); }
  .sidebar { padding: 12px 16px; }
  .brand { padding: 0; }
  .navigation, .sidebar-footer { display: none; }
  .content { padding-top: 24px; }
}
@media (max-width: 520px) {
  .panel-toolbar { align-items: stretch; flex-direction: column; }
  .counts { gap: 8px; }
  .counts div { padding: 11px; }
  .topbar { font-size: 13px; }
  .session { gap: 5px; }
  th, td { padding-inline: 11px; }
}
.billing-panel { margin-top: 16px; }
