:root {
  --bg: #eceff1;
  --surface: #f3f5f6;
  --surface-soft: #eef1f3;
  --surface-raised: #f8f9f9;
  --text: #171717;
  --muted: #6b6f72;
  --faint: #9aa0a4;
  --border: rgba(17, 17, 17, .07);
  --border-strong: rgba(17, 17, 17, .14);
  --shadow: 10px 10px 24px rgba(155, 163, 169, .34), -10px -10px 24px rgba(255, 255, 255, .92);
  --shadow-soft: 6px 6px 16px rgba(155, 163, 169, .24), -6px -6px 16px rgba(255, 255, 255, .9);
  --shadow-inset: inset 4px 4px 10px rgba(155, 163, 169, .18), inset -4px -4px 10px rgba(255, 255, 255, .9);
  --accent: #202824;
  --danger: #6f1d1b;
  --radius: 8px;
  --sidebar: 238px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
code, .mono { font-family: "SFMono-Regular", Consolas, monospace; }

.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(180deg, #f5f6f7 0%, #eceff1 100%);
  border-right: 1px solid rgba(255, 255, 255, .55);
  box-shadow: 12px 0 30px rgba(135, 143, 149, .16);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(17, 17, 17, .08);
  background: var(--surface-raised);
  border-radius: 7px;
  box-shadow: var(--shadow-soft);
  font-weight: 800;
  font-size: 12px;
}
.brand strong, .login-brand strong { display: block; font-size: 14px; letter-spacing: .01em; }
.brand small, .login-brand small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  padding: 9px 10px;
  border-radius: 8px;
  color: #404447;
  font-size: 13px;
  font-weight: 520;
}
.nav a:hover {
  background: rgba(255, 255, 255, .58);
  box-shadow: var(--shadow-inset);
  color: #111;
}
.nav a.active {
  background: #171717;
  color: #fff;
  box-shadow: 5px 5px 14px rgba(130, 137, 142, .24), -4px -4px 12px rgba(255, 255, 255, .72);
}
.context-switch { margin-top: auto; border-top: 1px solid var(--border); padding-top: 14px; }
.context-switch a { font-size: 13px; color: var(--muted); }

.main { min-width: 0; padding: 22px 32px 42px; }
.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.topbar h1 { margin: 0; font-size: 22px; font-weight: 650; line-height: 1.15; }
.breadcrumb { margin: 0 0 4px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.account { display: flex; align-items: center; gap: 11px; }
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.account-text { display: flex; flex-direction: column; text-align: right; }
.account-text strong { font-size: 12px; }
.account-text small { color: var(--muted); font-size: 11px; }
.menu-toggle { display: none; }

.button, button.button, .icon-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .58);
  background: linear-gradient(145deg, #f8f9fa, #e5e9eb);
  color: var(--text);
  border-radius: 8px;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.button:hover, button.button:hover, .icon-button:hover { transform: translateY(-1px); }
.button:active, button.button:active, .icon-button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-inset);
}
.button.primary {
  background: linear-gradient(145deg, #222, #101010);
  border-color: rgba(17, 17, 17, .1);
  color: #fff;
}
.button.danger { color: var(--danger); border-color: #d9c7c5; }
.button.small { min-height: 28px; padding: 0 9px; font-size: 11px; box-shadow: none; }
.icon-button { min-height: 30px; font-size: 11px; }

.notice { border: 1px solid rgba(255, 255, 255, .65); background: var(--surface-raised); border-radius: var(--radius); padding: 11px 13px; margin-bottom: 16px; box-shadow: var(--shadow-soft); font-size: 13px; }
.notice.success { border-left: 3px solid var(--accent); }
.notice.error { border-left: 3px solid var(--danger); }
.muted { color: var(--muted); }

.sync-strip, .action-line, .panel, .form-panel, .table-wrap, .empty-state {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.sync-strip, .action-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px;
  margin-bottom: 18px;
  gap: 18px;
}
.sync-strip span, .metric-grid span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 6px; font-weight: 650; }
.sync-strip strong { font-size: 17px; font-weight: 650; }
.action-line h2, .panel h2, .form-section h2 { margin: 0; font-size: 14px; font-weight: 680; }
.action-line p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.metric-grid.compact { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.metric-grid article {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: var(--radius);
  padding: 15px;
  min-height: 82px;
  box-shadow: var(--shadow-soft);
}
.metric-grid strong { font-size: 23px; font-weight: 680; }
.two-columns, .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.panel { padding: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-head a { color: var(--muted); font-size: 13px; }

.bars { display: grid; gap: 8px; }
.bars div, .resource-row, .activity-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(17, 17, 17, .06);
  padding: 10px 0;
}
.bars div:first-child, .resource-row:first-of-type, .activity-row:first-of-type { border-top: 0; }
.resource-row { grid-template-columns: auto 1fr auto; }
.resource-row strong, td strong { display: block; font-size: 13px; }
.resource-row small, td small, .activity-row small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.activity-row { grid-template-columns: auto 1fr; }
.activity-row small { grid-column: 1 / -1; }

.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #777; }
.status-dot.active, .chip.active { background: #111; color: #fff; }
.status-dot.inactive, .chip.inactive { background: #ddd; color: #333; }
.status-dot.maintenance, .chip.maintenance { background: #f0eee8; color: #5b513f; }
.status-dot.pending, .chip.pending { background: #eceff1; color: #374047; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 650;
}

.filters {
  display: grid;
  grid-template-columns: 1.5fr repeat(5, minmax(130px, .6fr)) auto;
  gap: 8px;
  margin-bottom: 14px;
}
input, select, textarea {
  width: 100%;
  border: 1px solid rgba(17, 17, 17, .06);
  border-radius: 7px;
  background: var(--surface-soft);
  padding: 9px 10px;
  color: var(--text);
  box-shadow: var(--shadow-inset);
  font-size: 13px;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(17, 17, 17, .18);
  background: #f8f9fa;
}
textarea { min-height: 96px; resize: vertical; }

.table-wrap { overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: rgba(255, 255, 255, .36);
}
.data-table th, .data-table td { padding: 12px 13px; border-bottom: 1px solid rgba(17, 17, 17, .06); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.actions { text-align: right; }

.pagination { display: flex; gap: 6px; margin-top: 14px; }
.pagination a { width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.58); border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-raised); box-shadow: var(--shadow-soft); font-size: 12px; }
.pagination a.active { background: #111; color: #fff; border-color: #111; }

.detail-hero {
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.detail-hero p { margin: 0 0 8px; color: var(--muted); }
.detail-hero h2 { margin: 0 0 7px; font-size: 24px; line-height: 1.15; }
.detail-hero span { color: var(--muted); }
.detail-actions { display: flex; gap: 8px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 11px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 11px; font-weight: 650; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv textarea, .credential-output { min-height: 150px; font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; }
.secret { display: inline-flex; padding: 5px 8px; background: #f1f1ef; border-radius: 6px; color: #333; }
.metadata { background: var(--surface-soft); border: 1px solid rgba(17, 17, 17, .05); border-radius: 7px; padding: 12px; overflow: auto; box-shadow: var(--shadow-inset); font-size: 12px; }
.copyable { cursor: pointer; }
.copyable.copied { background: #e8eee9; }
.serial-primary {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #111;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.hash-primary {
  color: #121314;
  font-size: 12px;
  font-weight: 720;
  letter-spacing: .01em;
}
.detail-hash {
  display: block;
  max-width: min(860px, 100%);
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 19px;
  line-height: 1.35;
}
.type-muted {
  color: #4d5358;
  font-weight: 680;
}

.form-panel { padding: 0; overflow: hidden; }
.form-section { padding: 17px; border-bottom: 1px solid rgba(17, 17, 17, .06); }
.form-section h2 { margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 620; }
.span-2 { grid-column: 1 / -1; }
.required-field { color: var(--text); }
.required-field::after { content: "Obrigatório pelo tipo"; color: var(--muted); font-size: 11px; }
.generated-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.form-actions { padding: 16px 18px; display: flex; justify-content: flex-end; gap: 8px; }
.form-actions .danger { margin-right: auto; }
.toggle-grid, .checkbox-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.checkbox-list.dense { grid-template-columns: 1fr; max-height: 320px; overflow: auto; border: 1px solid rgba(17, 17, 17, .06); border-radius: 7px; padding: 10px; box-shadow: var(--shadow-inset); }
.checkbox-list label, .toggle-grid label { display: flex; align-items: center; gap: 8px; color: var(--text); }
.checkbox-list input, .toggle-grid input { width: auto; }

.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.project-card { background: var(--surface); border: 1px solid rgba(255, 255, 255, .62); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-soft); }
.project-card h2 { margin: 12px 0 8px; font-size: 16px; }
.project-card p { min-height: 40px; color: var(--muted); }
.mini-kv { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 8px; color: var(--muted); }
.mini-kv dd { margin: 0; color: var(--text); font-weight: 650; }

.guest { background: var(--bg); }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-panel { width: min(400px, 100%); background: var(--surface); border: 1px solid rgba(255,255,255,.62); border-radius: 8px; padding: 22px; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.form-stack { display: grid; gap: 14px; }
.login-demo { margin-bottom: 0; font-size: 12px; }

@media (max-width: 1100px) {
  .metric-grid, .metric-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar {
    position: fixed;
    z-index: 20;
    transform: translateX(-100%);
    transition: transform .2s ease;
    width: min(82vw, var(--sidebar));
  }
  .sidebar.open { transform: translateX(0); }
  .main { padding: 16px; }
  .menu-toggle { display: inline-flex; width: 38px; height: 38px; border: 1px solid var(--border); background: #fff; border-radius: 7px; align-items: center; justify-content: center; }
  .topbar { align-items: flex-start; }
  .account-text { display: none; }
  .sync-strip, .action-line, .detail-hero { align-items: stretch; flex-direction: column; }
  .metric-grid, .metric-grid.compact, .two-columns, .detail-grid, .form-grid, .toggle-grid, .checkbox-list, .cards-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { border-bottom: 1px solid var(--border); padding: 10px 12px; }
  .data-table td { border: 0; padding: 7px 0; display: flex; justify-content: space-between; gap: 16px; text-align: right; }
  .data-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; }
  .data-table td.actions { justify-content: flex-end; }
  .data-table td.actions::before { display: none; }
  .resource-row { grid-template-columns: auto 1fr; }
  .resource-row code { grid-column: 2; }
  .kv { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
}

/* Visual refresh: rounded, modern monochrome, subtle depth */
:root {
  --bg: #f4f5f6;
  --surface: rgba(255, 255, 255, .74);
  --surface-soft: rgba(255, 255, 255, .58);
  --surface-raised: rgba(255, 255, 255, .86);
  --text: #121314;
  --muted: #687077;
  --faint: #a0a7ad;
  --border: rgba(18, 19, 20, .08);
  --border-strong: rgba(18, 19, 20, .13);
  --shadow: 0 18px 48px rgba(30, 36, 42, .065);
  --shadow-soft: 0 10px 28px rgba(30, 36, 42, .052);
  --shadow-inset: inset 0 1px 2px rgba(18, 19, 20, .06);
  --radius: 22px;
  --radius-sm: 14px;
  --sidebar: 252px;
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, .96) 0, rgba(255, 255, 255, 0) 36%),
    linear-gradient(135deg, #f7f8f8 0%, #eef1f2 100%);
}

.sidebar {
  height: calc(100vh - 28px);
  top: 14px;
  margin: 14px 0 14px 14px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 26px;
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 22px 60px rgba(35, 43, 50, .08);
  backdrop-filter: blur(18px);
  padding: 18px;
  gap: 24px;
}

.main {
  padding: 28px 36px 44px;
}

.brand {
  gap: 11px;
  min-height: 42px;
  padding: 4px 2px 14px;
  border-bottom: 1px solid rgba(18, 19, 20, .06);
}

.brand-symbol {
  width: 34px;
  height: 34px;
  border-radius: 13px;
  background: #111;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0 9px;
  flex: 0 0 auto;
  box-shadow: 0 10px 24px rgba(17, 17, 17, .14);
}

.brand-symbol span {
  height: 2px;
  border-radius: 999px;
  background: #fff;
  display: block;
}

.brand-symbol span:nth-child(2) { width: 78%; }
.brand-symbol span:nth-child(3) { width: 54%; }
.brand-mark { display: none; }

.brand strong,
.login-brand strong {
  font-size: 14px;
  font-weight: 720;
}

.brand small,
.login-brand small {
  font-size: 11px;
  color: #7b838a;
}

.nav {
  gap: 7px;
}

.nav a {
  min-height: 38px;
  border-radius: 16px;
  padding: 10px 12px;
  color: #4d555c;
  font-size: 13px;
  font-weight: 620;
  display: flex;
  align-items: center;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.nav a:hover {
  background: rgba(255, 255, 255, .74);
  box-shadow: none;
  color: #111;
  transform: translateX(2px);
}

.nav a.active {
  background: #111;
  color: #fff;
  box-shadow: 0 12px 28px rgba(17, 17, 17, .16);
}

.context-switch {
  border-top: 1px solid rgba(18, 19, 20, .06);
}

.context-switch a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .46);
  font-size: 12px;
  font-weight: 650;
}

.topbar {
  min-height: 58px;
  margin-bottom: 24px;
}

.topbar h1 {
  font-size: 24px;
  letter-spacing: 0;
}

.account {
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 18px;
  padding: 7px;
  background: rgba(255, 255, 255, .58);
  box-shadow: var(--shadow-soft);
}

.avatar {
  border-radius: 13px;
}

.button,
button.button,
.icon-button {
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(18, 19, 20, .08);
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 8px 20px rgba(30, 36, 42, .055);
  font-size: 12px;
  letter-spacing: 0;
}

.button.primary {
  background: #111;
  border-color: #111;
  color: #fff;
  box-shadow: 0 12px 26px rgba(17, 17, 17, .16);
}

.button.small {
  min-height: 28px;
  border-radius: 999px;
}

.button:hover,
button.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(30, 36, 42, .08);
}

.button:active,
button.button:active,
.icon-button:active {
  box-shadow: var(--shadow-inset);
}

.sync-strip,
.action-line,
.panel,
.form-panel,
.table-wrap,
.empty-state,
.metric-grid article,
.project-card,
.login-panel,
.detail-hero {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .72);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.metric-grid article,
.project-card {
  box-shadow: var(--shadow-soft);
}

.sync-strip,
.action-line {
  padding: 18px 20px;
}

.action-line h2,
.panel h2,
.form-section h2 {
  font-size: 14px;
}

.metric-grid strong {
  font-size: 22px;
}

input,
select,
textarea {
  border-radius: 15px;
  background: rgba(255, 255, 255, .64);
  border: 1px solid rgba(18, 19, 20, .08);
  box-shadow: none;
  min-height: 38px;
  padding: 9px 12px;
}

textarea {
  border-radius: 17px;
}

input:focus,
select:focus,
textarea:focus {
  background: #fff;
  border-color: rgba(18, 19, 20, .22);
  box-shadow: 0 0 0 4px rgba(18, 19, 20, .045);
}

.data-table th {
  background: rgba(255, 255, 255, .34);
}

.data-table th:first-child { border-top-left-radius: 18px; }
.data-table th:last-child { border-top-right-radius: 18px; }

.chip {
  border-radius: 999px;
}

.detail-hero h2 {
  font-size: 25px;
}

.form-panel {
  overflow: hidden;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(460px, 100%);
  padding: 30px;
}

.login-brand {
  margin-bottom: 26px;
}

.login-copy {
  margin-bottom: 22px;
}

.login-copy h1 {
  margin: 0 0 8px;
  font-size: 25px;
  line-height: 1.08;
  letter-spacing: 0;
}

.login-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.login-footnote {
  margin: 16px 0 0;
  font-size: 12px;
}

@media (max-width: 760px) {
  .sidebar {
    top: 0;
    margin: 0;
    height: 100vh;
    border-radius: 0 24px 24px 0;
  }

  .main {
    padding: 18px;
  }

  .menu-toggle {
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
  }
}
