/*!*************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!../../node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************************/
:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #d9dee7;
  --text: #17202e;
  --muted: #647084;
  --accent: #13795b;
  --accent-strong: #0b5f46;
  --warn: #a45b13;
  --error: #b42318;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
  font: inherit;
}

select:where(:not([class*="policy-select"])) {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 6px 28px 6px 9px;
  font-size: 13px;
  cursor: pointer;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23647084' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 14px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

select:where(:not([class*="policy-select"])):hover {
  border-color: #b9d8cc;
}

select:where(:not([class*="policy-select"])):focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #dff3eb;
}

select:where(:not([class*="policy-select"])):disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

fieldset {
  display: contents;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

code {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fafc;
  color: #334155;
  padding: 3px 6px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

a {
  color: inherit;
}

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

.sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #ffffff;
  padding: 20px 16px;
}

.brand {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 28px;
}

.nav {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 6px;
  color: var(--muted);
  padding: 10px;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease;
}

.nav-item.active {
  background: #e7f4ef;
  color: var(--accent-strong);
}

.main {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  padding: 16px 24px;
}

.topbar-title {
  display: grid;
  grid-gap: 3px;
  gap: 3px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfd;
  padding: 7px 10px;
  font-size: 13px;
}

.user-chip small,
.muted {
  color: var(--muted);
  font-size: 12px;
}

.icon-button {
  position: relative;
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
}

.notification-center {
  position: relative;
}

.notification-button {
  color: var(--text);
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--error);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
}

.notification-panel {
  position: absolute;
  top: 46px;
  right: 0;
  z-index: 20;
  width: min(420px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 96px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgb(15 23 42 / 18%);
}

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

.notification-panel-header > div:first-child {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
}

.notification-panel-header span {
  color: var(--muted);
  font-size: 12px;
}

.notification-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-panel-list {
  display: grid;
  max-height: min(540px, calc(100vh - 160px));
  overflow-y: auto;
}

.notification-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  grid-gap: 10px;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.notification-item.read {
  background: #fbfcfd;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 13px;
}

.notification-item small {
  color: var(--muted);
  font-size: 12px;
}

.context-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  grid-gap: 16px;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  padding: 14px 24px;
}

.context-bar > div {
  display: grid;
  grid-gap: 5px;
  gap: 5px;
  min-width: 0;
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.content {
  padding: 24px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 14px;
  gap: 14px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
}

.metric-value {
  font-size: 26px;
  font-weight: 700;
  margin-top: 8px;
}

.metric-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.section {
  margin-top: 24px;
  min-width: 0;
  overflow: visible;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  grid-gap: 18px;
  gap: 18px;
  align-items: start;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 18px;
}

.table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
}

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

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  font-size: 14px;
}

.table th {
  color: var(--muted);
  font-weight: 600;
  background: #fbfcfd;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.status.online {
  background: #e7f4ef;
  color: var(--accent-strong);
}

.status.warning {
  background: #fff4e5;
  color: var(--warn);
}

.status.error {
  background: #fff1f0;
  color: var(--error);
}

.status.offline {
  background: #eaebec;
  color: #6b7280;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--accent-strong);
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  padding: 9px 12px;
  cursor: pointer;
}

.button.full {
  justify-content: center;
  width: 100%;
}

.button.compact {
  padding: 6px 9px;
  font-size: 13px;
}

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

.button,
.icon-button,
.menu-action {
  transition: transform 120ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.button:hover,
.icon-button:hover {
  box-shadow: 0 4px 14px rgb(15 23 42 / 8%);
}

.button:active,
.icon-button:active,
.menu-action:active {
  transform: translateY(1px) scale(0.99);
}

form:has(fieldset:disabled) .button,
form:has(fieldset:disabled) .menu-action {
  opacity: 0.72;
  cursor: progress;
}

.button.danger {
  border-color: #d92d20;
  background: #d92d20;
  color: #ffffff;
}

.button.secondary.danger {
  border-color: #f0b8b3;
  background: #ffffff;
  color: var(--error);
}

.cell-action {
  text-align: right;
}

.agent-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-panel-refined {
  align-content: start;
  animation: panel-enter 220ms ease both;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.agent-panel-refined:hover {
  box-shadow: 0 6px 20px rgb(15 23 42 / 10%);
  transform: translateY(-1px);
}

.agent-identity-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.agent-identity-body {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.agent-identity-name {
  display: block;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-identity-org {
  display: block;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-meta-footer {
  display: flex;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 4px;
  color: #8895a7;
  font-size: 10px;
}

.agent-meta-footer .meta-button {
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 1px 4px;
  margin-left: auto;
  cursor: pointer;
  color: #8895a7;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s, border-color 0.15s;
}

.agent-meta-footer .meta-button.meta-locked {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
}

.agent-meta-footer .meta-button.meta-unlocked {
  border-color: #eab308;
  background: rgba(234, 179, 8, 0.08);
}

.agent-meta-footer span:not(:last-child)::after {
  content: "·";
  padding-left: 6px;
  color: var(--line);
}

.agent-avatar {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f4f6f8;
  color: var(--muted);
  flex-shrink: 0;
}

.agent-panel-busy {
  border-color: #f2c48d;
  box-shadow: inset 3px 0 0 #d97706;
}

.agent-policy-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.agent-policy-line span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.agent-backup-info {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
}

.agent-backup-info.online {
  color: var(--accent-strong);
}

.agent-backup-info.error {
  color: var(--error);
}

.agent-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.agent-state-line {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 8px 10px;
}

.agent-state-line > div {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
  min-width: 0;
}

.agent-state-line > div span {
  font-size: 13px;
  font-weight: 800;
}

.agent-state-line > div small {
  color: var(--muted);
  font-size: 12px;
}

.agent-state-line.online {
  border-color: #bfe7d7;
  background: #f4fbf8;
}

.agent-state-line.online > div span {
  color: var(--accent-strong);
}

.agent-state-line.warning {
  border-color: #f7d5ab;
  background: #fffaf2;
}

.agent-state-line.warning > div span {
  color: var(--warn);
}

.agent-state-line.error {
  border-color: #f4b8b0;
  background: #fff5f4;
}

.agent-state-line.error > div span {
  color: var(--error);
}

.state-icon {
  flex-shrink: 0;
  display: block;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  padding: 3px 0;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.text-button:hover {
  color: #0f766e;
}

.achievement {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: -moz-fit-content;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfd;
  color: var(--muted);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.achievement.online {
  border-color: #bfe7d7;
  background: #edf9f4;
  color: var(--accent-strong);
}

.achievement.pending {
  border-color: #f7d5ab;
  background: #fff7ed;
  color: var(--warn);
}

.achievement.neutral {
  background: #f8fafc;
  color: #334155;
}

.agent-card-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-gap: 8px;
  gap: 8px;
  align-items: center;
}

.agent-card-footer .button {
  justify-content: center;
  min-height: 34px;
  text-decoration: none;
  white-space: nowrap;
}

.agent-menu {
  position: relative;
  display: inline-grid;
}

.agent-menu-panel {
  position: absolute;
  top: 42px;
  right: 0;
  z-index: 10000;
  display: grid;
  min-width: 190px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgb(15 23 42 / 16%);
}

.agent-menu-panel-floating {
  position: fixed;
  right: auto;
  z-index: 2147483000;
}

.agent-panel,
.agent-grid,
.content {
  overflow: visible;
}

.menu-action {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.menu-action:hover {
  background: #f8fafc;
}

.agent-menu-panel form:last-child .menu-action,
.agent-menu-panel > .menu-action:last-child {
  border-bottom: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgb(15 23 42 / 35%);
  padding: 20px;
}

.modal-panel {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 24px 70px rgb(15 23 42 / 24%);
}

.modal-header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-header > div {
  display: grid;
  grid-gap: 3px;
  gap: 3px;
}

.backup-config-form {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147482500;
  display: flex;
  justify-content: flex-end;
  background: rgb(15 23 42 / 18%);
}

.activity-drawer {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  grid-gap: 12px;
  gap: 12px;
  width: min(420px, 100vw);
  height: 100%;
  border-left: 1px solid var(--line);
  background: #ffffff;
  padding: 16px;
  box-shadow: -18px 0 46px rgb(15 23 42 / 18%);
  animation: drawer-enter 180ms ease both;
}

.activity-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.activity-drawer-header > div {
  display: grid;
  grid-gap: 3px;
  gap: 3px;
  min-width: 0;
}

.drawer-state-line {
  min-height: auto;
}

.activity-list {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 10px;
  font-size: 14px;
}

.field-row {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field-row input,
.field-row textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px;
  color: var(--text);
}

.policy-assign-form {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.policy-assign-form select {
  flex: 1 1;
  min-width: 0;
}

.policy-select {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 6px 28px 6px 9px;
  font-size: 13px;
  cursor: pointer;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23647084' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 14px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.policy-select:hover {
  border-color: #b9d8cc;
}

.policy-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #dff3eb;
}

.policy-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.policy-select option {
  color: var(--text);
  background: #ffffff;
  padding: 6px;
}

.policy-select.full {
  width: 100%;
}

.action-cluster {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.org-grid,
.agent-grid,
.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

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

.stack {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mono {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.75rem;
}

.build-actions {
  margin-top: 1rem;
}

.build-bootstrap-box {
  margin-top: 0.5rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.info-panel,
.agent-panel,
.compact-panel {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  animation: panel-enter 220ms ease both;
}

.compact-panel {
  padding: 12px;
}

.agent-panel {
  padding: 12px 12px 8px;
}

.backup-run-card.is-running {
  border-color: #f2c48d;
}

.progress-line {
  position: relative;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.progress-line.compact {
  height: 3px;
}

.progress-line span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 38%;
  border-radius: inherit;
  background: linear-gradient(90deg, #13795b, #0ea5a3);
  animation: progress-slide 1.45s ease-in-out infinite;
}

.progress-line.determinate span {
  min-width: 3%;
  max-width: 100%;
  animation: none;
  transition: width 260ms ease;
}

.progress-line.completed {
  background: #dff3eb;
}

.progress-line.completed span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: none;
}

.info-panel h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 16px;
}

.info-panel p {
  margin: 0;
}

.panel-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.panel-line > div {
  min-width: 0;
}

.panel-line strong {
  overflow-wrap: anywhere;
}

.mini-metrics,
.agent-detail-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.mini-metrics span,
.agent-detail-grid span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfd;
  padding: 4px 7px;
  overflow-wrap: anywhere;
}

.agent-detail-grid.compact {
  flex-wrap: nowrap;
  overflow: hidden;
  gap: 0;
}

.agent-detail-grid.compact span {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-detail-grid.compact span:not(:last-child)::after {
  content: "·";
  padding: 0 5px 0 7px;
  color: var(--line);
}

.policy-paths {
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.timeline {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  grid-gap: 10px;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.activity-feed {
  max-height: 420px;
  overflow: auto;
  padding-right: 2px;
}

.activity-row {
  animation: panel-enter 180ms ease both;
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes progress-slide {
  0% {
    transform: translateX(-105%);
  }
  50% {
    transform: translateX(95%);
  }
  100% {
    transform: translateX(265%);
  }
}

@keyframes drawer-enter {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.network-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.network-panel {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.network-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.registration-code {
  border: 1px solid #b9d8cc;
  border-radius: 8px;
  background: #f2faf7;
  color: var(--accent-strong);
  padding: 12px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
  overflow-wrap: anywhere;
}

.network-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.network-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 12px;
}

.network-stats span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.reviewed-list {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  margin-top: 12px;
}

.reviewed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
}

.reviewed-item > div {
  display: grid;
  grid-gap: 3px;
  gap: 3px;
  min-width: 0;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-top: 5px;
  background: var(--accent);
}

.dot.online {
  background: var(--accent);
}

.dot.warning {
  background: var(--warn);
}

.dot.error {
  background: var(--error);
}

.dot.neutral {
  background: #94a3b8;
}

.empty-state {
  color: var(--muted);
  font-size: 14px;
}

.live-refresh {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.live-refresh.syncing {
  color: var(--accent-strong);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px #dff3eb;
}

.live-log-panel {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.live-log-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.live-log-panel pre {
  height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101820;
  color: #d9efe7;
  padding: 12px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

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

.login-panel {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 24px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.login-brand div {
  display: grid;
  grid-gap: 3px;
  gap: 3px;
}

.login-brand span {
  color: var(--muted);
  font-size: 13px;
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #e7f4ef;
  color: var(--accent-strong);
}

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

.login-form label {
  display: grid;
  grid-gap: 7px;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  color: var(--text);
}

.form-error {
  border: 1px solid #f0b8b3;
  border-radius: 6px;
  background: #fff1f0;
  color: var(--error);
  padding: 10px;
  font-size: 13px;
}

.inline-error {
  display: block;
  width: 100%;
  color: var(--error);
  font-size: 12px;
}

.hamburger-button {
  display: none;
}

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

  .sidebar {
    display: none;
  }

  .shell.sidebar-mobile-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 2147482000;
    background: rgb(15 23 42 / 35%);
    animation: fade-in 140ms ease both;
  }

  .sidebar-mobile-open .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2147482500;
    height: 100vh;
    width: 248px;
    animation: sidebar-slide 180ms ease both;
  }

  .hamburger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    color: var(--text);
    transition: background 140ms ease;
  }

  .hamburger-button:hover {
    background: #f8fafc;
  }

  .topbar-actions > .hamburger-button {
    order: -1;
  }

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

  .context-bar,
  .split-grid,
  .network-grid,
  .org-grid,
  .agent-grid,
  .config-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes sidebar-slide {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 560px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .content {
    padding: 16px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .notification-center {
    margin-left: auto;
  }

  .notification-panel {
    position: fixed;
    top: 72px;
    right: 16px;
    left: 16px;
    width: auto;
  }

  .context-bar {
    padding: 14px 16px;
  }

  .table {
    min-width: 620px;
  }
}

.agent-meta-footer .version-has-update {
  color: #eab308;
  cursor: default;
}

.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.badge.warning {
  background: #fff4e5;
  color: var(--warn);
}

.policy-version-form {
  margin-top: 0.5rem;
}

/* ── New pages: Storage, Policies, Agent Detail ── */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-header h1 {
  margin: 0;
  font-size: 22px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.create-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.form-row input,
.form-row select {
  flex: 1 1 180px;
  min-width: 0;
}

.form-row input[type="checkbox"] {
  flex: none;
  width: auto;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  cursor: pointer;
}

.badge-green {
  background: #e7f4ef;
  color: var(--accent-strong);
}

.badge-gray {
  background: #eff1f5;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 18px;
  gap: 18px;
  margin-bottom: 20px;
}

.detail-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.detail-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-gap: 6px 12px;
  gap: 6px 12px;
}

.detail-card dt {
  font-size: 13px;
  color: var(--muted);
}

.detail-card dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.detail-card .actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.progress-msg {
  font-size: 13px;
  color: var(--warn);
  background: #fff4e5;
  border-radius: 6px;
  padding: 8px 12px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
}

.status-badge.status-online,
.status-badge.status-claimed {
  background: #e7f4ef;
  color: var(--accent-strong);
}

.status-badge.status-running_backup,
.status-badge.status-running_restore {
  background: #fff4e5;
  color: var(--warn);
}

.status-badge.status-paused {
  background: #eff1f5;
  color: var(--muted);
}

.status-badge.status-error {
  background: #fff1f0;
  color: var(--error);
}

.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60vh;
  font-size: 18px;
  color: var(--muted);
}

td.empty {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 24px;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 480px;
  max-width: 94vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 17px;
}

.modal-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-body label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.modal-body input,
.modal-body select {
  width: 100%;
}

.keys-group {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.keys-group legend {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 0 4px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
}

/* ── Schedule ── */

.schedule-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.schedule-info > * {
  white-space: nowrap;
}

.day-checkboxes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.day-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background 120ms, border-color 120ms;
}

.day-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.day-chip input {
  display: none;
}

.range-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-left: 6px;
}

/* ── File Browser ── */

.file-browser {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.file-browser-loading,
.file-browser-error,
.file-browser-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 32px 16px;
  color: var(--muted);
  justify-content: center;
}

.file-browser-error {
  color: #dc2626;
}

.file-browser-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1;
  min-width: 0;
  overflow: hidden;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.breadcrumb-sep {
  color: var(--muted);
  flex-shrink: 0;
}

.breadcrumb-link {
  background: none;
  border: none;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  transition: background 120ms;
}

.breadcrumb-link:hover {
  background: #e2e8f0;
}

.file-browser-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.file-browser-actions .button {
  gap: 4px;
}

.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.file-browser-content {
  display: flex;
  height: 420px;
  min-height: 200px;
}

.file-browser-sidebar {
  width: 220px;
  min-width: 160px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.sidebar-tree {
  flex: 1 1;
  overflow-y: auto;
  padding: 4px 0;
}

.tree-node {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background 120ms;
}

.tree-node:hover {
  background: #f1f5f9;
}

.tree-node.active {
  background: #e0f2fe;
  color: #0369a1;
}

.tree-node.depth-0 { padding-left: 12px; }
.tree-node.depth-1 { padding-left: 28px; }
.tree-node.depth-2 { padding-left: 44px; }
.tree-node.depth-3 { padding-left: 60px; }
.tree-node.depth-4 { padding-left: 76px; }
.tree-node.depth-5 { padding-left: 92px; }

.file-browser-table {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.table-header {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.checkbox-cell {
  display: flex;
  align-items: center;
  width: 36px;
  flex-shrink: 0;
}

.name-cell {
  flex: 1 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.size-cell {
  width: 80px;
  flex-shrink: 0;
  text-align: right;
  color: var(--muted);
}

.date-cell {
  width: 150px;
  flex-shrink: 0;
  color: var(--muted);
}

.type-cell {
  width: 80px;
  flex-shrink: 0;
  color: var(--muted);
}

.table-body {
  flex: 1 1;
  overflow-y: auto;
}

.empty-folder {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 5px 12px;
  font-size: 13px;
  transition: background 120ms;
  cursor: default;
}

.file-row:hover {
  background: #f8fafc;
}

.file-row.selected {
  background: #e0f2fe;
}

.file-icon {
  flex-shrink: 0;
  color: var(--muted);
}

.file-row.selected .file-icon {
  color: #0369a1;
}

.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row .name-cell {
  cursor: default;
}

.file-row .name-cell:hover {
  color: var(--accent);
}

.table-body .file-row .checkbox-cell input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
}

/* ── View mode toggles ── */

.view-mode-group {
  display: flex;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.view-mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 120ms, color 120ms;
}

.view-mode-btn:hover {
  background: #f1f5f9;
}

.view-mode-btn.active {
  background: var(--accent);
  color: #ffffff;
}

/* ── Icons view ── */

.icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  grid-gap: 8px;
  gap: 8px;
  padding: 12px;
  overflow-y: auto;
  flex: 1 1;
}

.icon-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: default;
  transition: background 120ms, border-color 120ms;
  text-align: center;
}

.icon-item:hover {
  background: #f8fafc;
  border-color: var(--line);
}

.icon-item.selected {
  background: #e0f2fe;
  border-color: #93c5fd;
}

.icon-check {
  position: absolute;
  top: 4px;
  left: 4px;
  display: flex;
}

.icon-check input {
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
}

.icon-item-icon {
  color: var(--muted);
  flex-shrink: 0;
}

.icon-item.selected .icon-item-icon {
  color: #0369a1;
}

.icon-item-name {
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-all;
}

/* ── Pagination ── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.pagination-info {
  font-size: 13px;
  color: var(--muted);
}

/* ── Detail panel ── */

.file-browser-main {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.file-browser-main.has-detail {
  border-right: 1px solid var(--line);
}

.detail-panel {
  width: 280px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #ffffff;
  flex-shrink: 0;
}

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

.detail-panel-header h4 {
  margin: 0;
  font-size: 14px;
}

.detail-panel-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
}

.detail-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.detail-preview-icon {
  color: var(--muted);
}

.detail-fields {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-gap: 6px 10px;
  gap: 6px 10px;
  font-size: 13px;
}

.detail-fields dt {
  color: var(--muted);
  font-weight: 600;
}

.detail-fields dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.detail-path {
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  word-break: break-all;
}

.detail-restore {
  justify-content: center;
  margin-top: 4px;
}

/* ── Error message inline ── */

.file-browser-msg {
  padding: 16px;
  text-align: center;
  font-size: 14px;
}

.file-browser-msg.error {
  color: var(--error);
}

.restore-info-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border-radius: 6px;
  background: #e7f4ef;
  color: var(--accent-strong);
  font-size: 13px;
  line-height: 1.4;
}

/* ── Users page ── */

.users-page {
  padding: 24px;
}

.users-toolbar {
  margin-bottom: 16px;
}

.users-table-wrap {
  min-width: 0;
}

.user-orgs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #eef2f7;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms;
}

.role-badge:hover {
  background: #d9dee7;
}

.invite-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  align-items: center;
}

.invite-form input,
.invite-form select {
  flex: 1 1 180px;
  min-width: 0;
}

/* ── Profile page ── */

.profile-page {
  padding: 24px;
}

.profile-card {
  max-width: 560px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 24px;
}

.profile-form {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
}

.profile-field {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
}

.profile-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.profile-field input {
  width: 100%;
}

.profile-form hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 4px 0;
}

/* ── Org settings page ── */

.org-settings-page {
  padding: 24px;
}

.email-settings-form {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.email-settings-form label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.email-settings-form label.checkbox-label {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-weight: 400;
  color: var(--text);
}

.email-settings-form input,
.email-settings-form select {
  width: 100%;
}

.pw-policy-form {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.pw-policy-form form {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.pw-policy-form label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.pw-policy-form input {
  width: 100%;
}

.email-templates {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
}

.template-item {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.template-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.template-form {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.template-form label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.template-form input,
.template-form textarea {
  width: 100%;
}

.template-form textarea {
  resize: vertical;
}

.template-preview {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
}

/* ── Licenses page ── */

.licenses-page {
  padding: 24px;
}

/* ── Audit page ── */

.audit-page {
  padding: 24px;
}

.audit-page code {
  font-size: 11px;
}

/* ── Monitor page ── */

.monitor-page, .notif-page {
  padding: 24px;
}

.notif-list {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  max-height: 500px;
  overflow-y: auto;
}

.notif-item {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  transition: background 120ms;
}

.notif-item.unread {
  background: #f4fbf8;
  border-color: #bfe7d7;
}

.notif-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notif-item-title {
  font-weight: 600;
  font-size: 14px;
}

.notif-item-msg {
  font-size: 13px;
  color: var(--muted);
}

.notif-severity-info { color: var(--accent); }
.notif-severity-warning { color: var(--warn); }
.notif-severity-error { color: var(--error); }

.alert-rule-form {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.alert-rules-list {
  margin-top: 12px;
  display: grid;
  grid-gap: 6px;
  gap: 6px;
}

.alert-rule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.alert-rule-info {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
  font-size: 13px;
  min-width: 0;
}

.alert-rule-info small {
  color: var(--muted);
  font-size: 11px;
}

.monitor-page {
  padding: 24px;
}

.monitor-health-bar {
  position: relative;
  height: 32px;
  border-radius: 8px;
  background: #eef2f7;
  margin-bottom: 20px;
  overflow: hidden;
}

.monitor-health-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 400ms ease;
}

.monitor-health-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.agent-bars {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.agent-bar-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 36px;
  border-radius: 6px;
  background: #f4f6f8;
  overflow: hidden;
}

.agent-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  border-radius: 6px;
  transition: width 400ms ease;
  opacity: 0.7;
}

.agent-bar-label {
  position: relative;
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0 12px;
  font-size: 13px;
  z-index: 1;
}

.metric-hint.warn {
  color: var(--warn);
}

.metric-hint.error {
  color: var(--error);
}

/* ── Restore dialog ── */

.restore-modal {
  width: 480px;
}

.restore-modal .modal-body {
  gap: 12px;
}

.restore-modal .modal-body label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.restore-modal .modal-body input {
  width: 100%;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

.restore-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border-radius: 6px;
  background: #fff4e5;
  color: var(--warn);
  font-size: 13px;
  line-height: 1.4;
}

.restore-hint svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.restore-modal .form-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
}

.restore-modal .form-error svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.restore-warning-box {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid #f7d5ab;
  border-radius: 8px;
  background: #fffaf2;
}

.restore-warning-icon {
  flex-shrink: 0;
  color: var(--warn);
  margin-top: 1px;
}

.restore-warning-text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

.restore-warning-text strong {
  display: block;
  margin-bottom: 4px;
  color: var(--warn);
}

.restore-warning-text p {
  margin: 0;
}

.restore-warning-text code {
  font-size: 12px;
}

.restore-ack {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 8px !important;
  font-weight: 400 !important;
  font-size: 12px !important;
  color: var(--text) !important;
  cursor: pointer;
  line-height: 1.4;
}

.restore-ack input[type="checkbox"] {
  width: auto !important;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── Org timezone ── */

.org-timezone {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.org-timezone label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.org-timezone-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.org-timezone select {
  max-width: 240px;
  font-size: 12px;
  padding: 3px 24px 3px 7px;
}

.tz-message {
  font-size: 11px;
  font-weight: 600;
}

.tz-ok {
  color: var(--accent);
}

.tz-err {
  color: var(--error);
}

.spinner-sm {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ===== Landing Page (Meraki-style) ===== */
.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.landing-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  color: var(--text);
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.landing-nav a {
  text-decoration: none;
  font-size: 14px;
  color: var(--muted);
  transition: color 140ms;
}

.landing-nav a:hover {
  color: var(--text);
}

.landing-hero {
  position: relative;
  padding: 160px 24px 100px;
  overflow: hidden;
}

.landing-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #e7f4ef 0%, #f0f9f4 40%, #ffffff 100%);
  z-index: 0;
}

.landing-hero-bg::after {
  content: "";
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(19, 121, 91, 0.06) 0%, transparent 70%);
}

.landing-hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.landing-hero-content h1 {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--text);
  margin: 0 0 20px;
}

.landing-hero-sub {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 36px;
}

.landing-hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 56px;
}

.landing-hero-metrics {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.landing-hero-metrics div {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  text-align: center;
}

.landing-hero-metrics strong {
  font-size: 20px;
  color: var(--accent-strong);
}

.landing-hero-metrics span {
  font-size: 13px;
  color: var(--muted);
}

.landing-section {
  padding: 96px 24px;
}

.landing-section-alt {
  background: #f8fafc;
}

.landing-section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.landing-section-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 12px;
  color: var(--text);
}

.landing-section-sub {
  font-size: 16px;
  color: var(--muted);
  text-align: center;
  margin: 0 0 56px;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 24px;
  gap: 24px;
}

.landing-feature-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 28px;
  transition: box-shadow 200ms, transform 200ms;
}

.landing-feature-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.landing-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #e7f4ef;
  color: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.landing-feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text);
}

.landing-feature-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.landing-pricing {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: start;
}

.landing-pricing-card {
  flex: 1 1;
  max-width: 380px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 36px 28px;
  position: relative;
}

.landing-pricing-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.landing-pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.landing-pricing-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px;
  text-align: center;
}

.landing-pricing-price {
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: 28px;
}

.landing-pricing-price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--muted);
}

.landing-pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  grid-gap: 12px;
  gap: 12px;
}

.landing-pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}

.landing-pricing-features li svg {
  color: var(--accent);
  flex-shrink: 0;
}

.landing-cta {
  padding: 96px 24px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
}

.landing-cta-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.landing-cta-inner h2 {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 12px;
}

.landing-cta-inner p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 32px;
}

.landing-cta-inner .landing-btn-primary {
  background: #ffffff;
  color: var(--accent-strong);
}

.landing-cta-inner .landing-btn-primary:hover {
  background: #f0f9f4;
}

.landing-footer {
  border-top: 1px solid var(--line);
  padding: 32px 24px;
}

.landing-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.landing-footer-links {
  display: flex;
  gap: 20px;
}

.landing-footer-links a {
  text-decoration: none;
  font-size: 13px;
  color: var(--muted);
  transition: color 140ms;
}

.landing-footer-links a:hover {
  color: var(--text);
}

.landing-footer-copy {
  font-size: 13px;
  color: var(--muted);
}

.landing-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 140ms;
}

.landing-btn-primary:hover {
  background: var(--accent-strong);
}

.landing-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 140ms, background 140ms;
}

.landing-btn-secondary:hover {
  border-color: var(--accent);
  background: #f0f9f4;
}

.landing-btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

.landing-btn-full {
  width: 100%;
  justify-content: center;
}

/* ===== Register Page ===== */
.register-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.register-panel {
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 28px;
}

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

.register-form label {
  display: grid;
  grid-gap: 7px;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.register-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  color: var(--text);
}

.register-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #dff3eb;
}

.register-divider {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0;
}

/* ===== Responsive landing ===== */
@media (max-width: 768px) {
  .landing-hero-content h1 {
    font-size: 32px;
  }

  .landing-features {
    grid-template-columns: 1fr;
  }

  .landing-pricing {
    flex-direction: column;
    align-items: center;
  }

  .landing-hero-metrics {
    gap: 24px;
  }

  .landing-nav a:not(.landing-btn-primary):not(.landing-btn-secondary) {
    display: none;
  }
}

/* ===== Audit page ===== */
.audit-page {
  padding: 24px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.page-header h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.page-actions {
  display: flex;
  gap: 8px;
}

.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-search {
  flex: 1 1;
  min-width: 200px;
}

.filter-select {
  min-width: 180px;
}

.filter-date {
  min-width: 140px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: var(--text);
  transition: background 0.15s;
}

.btn:hover {
  background: #f5f6f7;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: var(--text);
  transition: background 0.15s;
}

.btn-secondary:hover {
  background: #f5f6f7;
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.input {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #dff3eb;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.page-info {
  font-size: 13px;
  color: var(--muted);
}

.detail-row {
  background: #f8f9fa;
  padding: 0 !important;
}

.detail-json {
  margin: 0;
  padding: 12px;
  font-size: 12px;
  line-height: 1.5;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.row-expanded {
  background: #f0f7f4;
}

td.empty {
  text-align: center;
  padding: 40px 12px !important;
  color: var(--muted);
  font-style: italic;
}

