/*!*************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** 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 {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shell-body {
  display: flex;
  flex: 1 1;
  min-height: 0;
}

.sidebar {
  width: 200px;
  flex-shrink: 0;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100%;
  overflow: visible;
  z-index: 25;
  border-right: 1px solid var(--line);
  background: #ffffff;
  padding: 16px 8px;
}

.brand {
  font-size: 18px;
  font-weight: 700;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-group {
  position: relative;
}

.nav-group-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  cursor: default;
  transition: background 120ms ease, color 120ms ease;
}

.nav-group-trigger:hover {
  background: #f4f6f8;
  color: var(--text);
}

.nav-flyout {
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 200px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-4px);
  transition: opacity 160ms ease, visibility 160ms ease, transform 160ms ease;
  z-index: 50;
}

.nav-group:hover .nav-flyout {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.nav-flyout-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 5px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 120ms ease;
  white-space: nowrap;
}

.nav-flyout-item:hover {
  background: #f4f6f8;
}

.nav-flyout-item.active {
  background: #e7f4ef;
  color: var(--accent-strong);
  font-weight: 600;
}

.main {
  min-width: 0;
  flex: 1 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page-content {
  flex: 1 1;
  padding: 24px;
  overflow-y: auto;
  display: grid;
  grid-gap: 16px;
  gap: 16px;
  align-content: start;
  max-width: 1440px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  font-size: 13px;
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.crumb-sep {
  color: var(--muted);
  margin: 0 2px;
}

.crumb-link {
  color: var(--muted);
  text-decoration: none;
}

.crumb-link:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.crumb-current {
  color: var(--text);
  font-weight: 500;
}

.crumb-group {
  color: var(--muted);
  font-weight: 400;
}

.topbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  padding: 12px 24px;
}

.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-menu-item:hover {
  background: #f3f4f6;
}

.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;
  overflow-y: auto;
  flex: 1 1;
}

.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;
  text-decoration: none;
}

.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;
}

.cell-primary {
  min-width: 180px;
}

.cell-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 2px 0;
  border-radius: 4px;
}

.cell-name:hover {
  background: #f8f9fa;
}

.cell-name .edit-hint {
  display: none;
  color: var(--muted);
  cursor: pointer;
}

tr:hover .cell-name .edit-hint {
  display: inline-flex;
  align-items: center;
}

.cell-owner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cell-owner .icon-button-sm {
  visibility: hidden;
}

tr:hover .cell-owner .icon-button-sm {
  visibility: visible;
}

.cell-number {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.cell-tz {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.inline-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.icon-button-sm {
  width: 26px;
  height: 26px;
}

.owner-selector {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.row-editing {
  background: #fafbfc;
}

.org-page {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
  align-content: start;
}

.device-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.device-panel-refined {
  align-content: start;
  animation: panel-enter 220ms ease both;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.device-panel-refined:hover {
  box-shadow: 0 6px 20px rgb(15 23 42 / 10%);
  transform: translateY(-1px);
}

.device-panel-refined .device-state-line {
  margin: 2px 0;
}

.device-identity-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.device-identity-body {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.device-identity-name {
  display: block;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-identity-org {
  display: block;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-meta-footer {
  display: flex;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 4px;
  color: #8895a7;
  font-size: 10px;
}

.device-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;
}

.device-meta-footer .meta-button.meta-locked {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
}

.device-meta-footer .meta-button.meta-unlocked {
  border-color: #eab308;
  background: rgba(234, 179, 8, 0.08);
}

.device-meta-footer span:not(:last-child)::after {
  content: "·";
  padding-left: 6px;
  color: var(--line);
}

.device-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;
}

.device-panel-busy {
  border-color: #f2c48d;
  box-shadow: inset 3px 0 0 #d97706;
}

.device-policy-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.device-policy-line span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.device-backup-info {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
}

.device-backup-info.online {
  color: var(--accent-strong);
}

.device-backup-info.error {
  color: var(--error);
}

.device-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.device-state-line {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 8px 10px;
}

.device-state-line > div {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
  min-width: 0;
}

.device-state-line > div span {
  font-size: 13px;
  font-weight: 800;
}

.device-state-line > div small {
  color: var(--muted);
  font-size: 12px;
}

.device-state-line.online {
  border-color: #bfe7d7;
  background: #f4fbf8;
}

.device-state-line.online > div span {
  color: var(--accent-strong);
}

.device-state-line.warning {
  border-color: #f7d5ab;
  background: #fffaf2;
}

.device-state-line.warning > div span {
  color: var(--warn);
}

.device-state-line.error {
  border-color: #f4b8b0;
  background: #fff5f4;
}

.device-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;
}

.device-card-footer {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  overflow-x: auto;
}

.device-card-footer .button {
  justify-content: center;
  min-height: 26px;
  padding: 2px 6px;
  font-size: 11px;
  text-decoration: none;
  white-space: nowrap;
}

.device-menu {
  position: relative;
  display: inline-grid;
}

.device-menu-panel {
  position: absolute;
  top: 42px;
  right: 0;
  z-index: 10000;
  display: grid;
  min-width: 170px;
  overflow-y: auto;
  max-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgb(15 23 42 / 16%);
}

.device-menu-panel-floating {
  position: fixed;
  right: auto;
  z-index: 2147483000;
}

.device-panel,
.device-grid,
.content {
  overflow: visible;
}

.menu-action {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  padding: 7px 10px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.menu-action svg {
  flex-shrink: 0;
}

.menu-action:hover {
  background: #f8fafc;
}

.device-menu-panel form:last-child .menu-action,
.device-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,
.device-grid,
.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.device-grid {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

.device-grid-item {
  position: relative;
}

.device-grid-item.drag-over {
  outline: 2px dashed var(--accent);
  outline-offset: 4px;
  border-radius: 8px;
}

.device-grid-item.dragging {
  opacity: 0.4;
}

.priority-bubble {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 5;
}

.priority-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--error);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.priority-number:hover {
  background: #c0392b;
}

.priority-input {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--error);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 0;
  outline: none;
  cursor: text;
  -moz-appearance: textfield;
}

.priority-input::-webkit-inner-spin-button,
.priority-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.priority-input:focus {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--error);
}

.priority-set-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px dashed var(--muted);
  background: var(--surface);
  color: var(--muted);
  cursor: -webkit-grab;
  cursor: grab;
  font-size: 11px;
}

.priority-set-btn:hover {
  border-color: var(--text);
  color: var(--text);
  background: var(--hover);
}

@media (min-width: 1200px) {
  .device-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .device-grid {
    grid-template-columns: 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,
.device-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;
}

.device-panel {
  padding: 12px 12px 8px;
}

.backup-run-card.is-running {
  border-color: #f2c48d;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 24px;
  font-size: 11px;
  color: #8895a7;
  border-top: 1px solid var(--line);
  background: #ffffff;
  flex-shrink: 0;
}

.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,
.device-detail-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.mini-metrics span,
.device-detail-grid span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfd;
  padding: 4px 7px;
  overflow-wrap: anywhere;
}

.archived-devices-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 8px;
  gap: 8px;
}

.panel-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.panel-actions .button-sm {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}

.panel-actions .button-sm.danger {
  color: var(--error);
  border-color: var(--error);
}

.panel-actions .button-sm:hover {
  background: var(--hover);
}

.compact-panel.selected {
  border-color: var(--accent);
  background: rgba(19, 121, 91, 0.04);
}

.archived-checkbox {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
}

.archived-checkbox.checked {
  color: var(--accent);
}

.archived-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.archived-toolbar .button-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}

.archived-toolbar .button-sm.danger {
  color: var(--error);
  border-color: var(--error);
}

.panel-line .date {
  font-size: 11px;
}

.archived-batch-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.device-detail-grid.compact {
  flex-wrap: nowrap;
  overflow: hidden;
  gap: 0;
}

.device-detail-grid.compact span {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-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-body {
    flex-direction: column;
  }

  .sidebar {
    display: none;
  }

  .shell.sidebar-mobile-open .shell-body::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: 57px;
    left: 0;
    z-index: 2147482500;
    height: calc(100vh - 57px);
    width: 248px;
    overflow-y: auto;
    padding: 16px;
    animation: sidebar-slide 180ms ease both;
  }

  .sidebar-mobile-open .nav-flyout {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0;
    min-width: 0;
  }

  .sidebar-mobile-open .nav-group-trigger {
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    padding: 8px 10px 4px;
    cursor: default;
  }

  .sidebar-mobile-open .nav-flyout-item {
    padding: 8px 10px 8px 30px;
  }

  .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;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .context-bar,
  .split-grid,
  .network-grid,
  .org-grid,
  .device-grid,
  .config-grid {
    grid-template-columns: 1fr;
  }

  .org-dashboard-page .detail-grid,
  .network-dashboard-page .detail-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;
  }
}

.device-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;
}

.device-page-header {
  display: block;
  margin-bottom: 12px;
}

.page-header-primary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-header-primary h1 {
  margin: 0;
  font-size: 22px;
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  width: 100%;
}

.page-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  flex-shrink: 0;
}

.page-header-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 2px;
}

.page-header-sep {
  color: var(--line);
  font-size: 18px;
  line-height: 1;
}

.page-header-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.page-header-stat .stat-label {
  font-size: 10px;
}

.page-header-stat strong {
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
}

.inline-form {
  display: inline;
}

.page-header-update-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: rgba(19, 121, 91, 0.08);
  color: var(--accent);
  cursor: pointer;
  transition: all 120ms;
  vertical-align: middle;
  margin-left: 4px;
  font-size: 11px;
  font-weight: 600;
}

.page-header-update-btn:hover {
  background: rgba(19, 121, 91, 0.18);
}

.update-label {
  line-height: 1;
}

.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-blue {
  background: #e3f2fd;
  color: #1565c0;
}

.badge-gray {
  background: #eff1f5;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 18px;
  gap: 18px;
}

.device-detail-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.device-detail-body {
  display: flex;
  flex-direction: column;
  gap: 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;
}

.cal-heatmap-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.controls-sidebar-inside {
  flex: 1 1;
  min-width: 200px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #eef1f5;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 16px;
}

.controls-sidebar-inside > .top-bar-field.compact {
  display: flex;
  align-items: center;
  gap: 4px;
}

.controls-sidebar-inside > .top-bar-field.compact .field-label {
  font-size: 9px;
}

.controls-sidebar-inside > .top-bar-field.compact select {
  flex: 1 1;
  min-width: 0;
  font-size: 10px;
  padding: 2px 4px;
}

.controls-sidebar-inside > .top-bar-toggles {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.controls-sidebar-inside > .top-bar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.controls-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

.top-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}



.top-bar-sep {
  width: 1px;
  height: 24px;
  background: var(--line);
  flex-shrink: 0;
}

.stat-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.top-bar-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar-field.compact {
  gap: 4px;
}

.field-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.field-control {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.field-control select {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  background: var(--bg);
  color: var(--text);
}

/* Top bar info banner */
.top-bar-info {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  background: #fff4e5;
  color: var(--warn);
}

.top-bar-info.error {
  background: #fff1f0;
  color: var(--error);
}

/* Version control (inline in top-bar) */
.version-control {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.version-control-current {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.version-label {
  display: none;
}

.version-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
}

.version-pending-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--warn);
  font-weight: 600;
  white-space: nowrap;
}

.version-current-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.version-control-action {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Top-bar toggles (icon-only buttons) */
.top-bar-toggles {
  display: flex;
  align-items: center;
  gap: 4px;
}

.motor-dropdown,
.bandwidth-dropdown {
  position: relative;
  display: inline-flex;
}

.motor-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 100;
  margin-top: 4px;
  min-width: 180px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  overflow: hidden;
}

.motor-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.12s;
  text-align: left;
}

.motor-menu-item:hover {
  background: var(--hover-bg, #e5e7eb);
}

.motor-menu-item.active {
  background: rgba(19, 121, 91, 0.08);
  color: var(--accent);
}

.motor-menu-item svg {
  flex-shrink: 0;
  color: var(--muted);
}

.bandwidth-menu {
  left: 0;
  right: auto;
  min-width: 160px;
}

.toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  transition: all 120ms;
}

.toggle-btn:hover {
  border-color: var(--accent);
  background: var(--bg-secondary);
  color: var(--text);
}

.toggle-btn.active {
  border-color: var(--accent);
  background: rgba(19, 121, 91, 0.1);
  color: var(--accent);
}

.toggle-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.toggle-btn.action-btn {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--accent);
  opacity: 0.7;
}

.toggle-btn.action-btn:hover {
  border-color: var(--accent);
  background: rgba(19, 121, 91, 0.08);
  color: var(--accent);
  opacity: 1;
}

.toggle-btn.action-btn.danger {
  color: var(--error);
}

.toggle-btn.action-btn.danger:hover {
  border-color: var(--error);
  background: rgba(180, 35, 24, 0.08);
  color: var(--error);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.system-info-card .section-header {
  padding-bottom: 0;
}

.additional-folders-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.additional-folder-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-family: var(--mono);
  color: var(--text);
  padding: 4px 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
}

.progress-msg {
  font-size: 13px;
  color: var(--warn);
  background: #fff4e5;
  border-radius: 6px;
  padding: 8px 12px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  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);
}

.status-badge.status-deleted {
  background: #fef2f2;
  color: #dc2626;
}

.status-badge.status-archived {
  background: #f5f5f5;
  color: var(--muted);
}

.status-badge.status-inactive {
  background: #f5f5f5;
  color: var(--muted);
}

.status-badge.status-suspended {
  background: #fff4e5;
  color: var(--warn);
}

.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;
}

/* File history modal */
.file-history-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.file-history-item:hover {
  background: var(--hover-bg, #f3f4f6);
}

.file-history-item.selected {
  background: var(--primary-light, #dbeafe);
  outline: 1px solid var(--primary);
}

.file-history-footer {
  display: flex;
  justify-content: flex-end;
  padding: 10px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.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;
  flex: 1 1;
  min-height: 0;
  margin-top: 10px;
  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;
  flex: 1 1;
  min-height: 200px;
}

.file-browser-sidebar {
  width: 220px;
  min-width: 160px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.file-browser-sidebar .sidebar-tree {
  flex: 1 1;
  overflow-y: auto;
}

.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: row;
  overflow: hidden;
  min-width: 0;
}

.file-browser-body {
  flex: 1 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.detail-panel-overlay {
  width: 0;
  overflow: hidden;
  flex-shrink: 0;
  border-left: 1px solid var(--line);
  transition: width 200ms ease;
}

.detail-panel-overlay.open {
  width: 320px;
  overflow: visible;
}

.detail-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.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-top-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.detail-actions {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-actions .button.compact {
  width: 100%;
  justify-content: center;
}

/* ── 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 {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-strong);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-name {
  font-size: 16px;
  font-weight: 600;
}

.profile-email {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.profile-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: #e8f4fd;
  color: var(--accent-strong);
}

.profile-section {
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.profile-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.profile-hint {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--muted);
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 14px;
  gap: 14px;
}

@media (max-width: 600px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.profile-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.profile-field input {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  transition: border-color 150ms, box-shadow 150ms;
}

.profile-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #dff3eb;
}

.profile-field input:disabled {
  background: #f3f4f6;
  color: var(--muted);
}

.profile-success {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  background: #e7f4ef;
  color: var(--accent-strong);
}

.profile-error {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  background: #fef2f2;
  color: #dc2626;
}

.profile-save {
  align-self: flex-start;
}

/* ── Org settings page ── */

.org-settings-page {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
  align-content: start;
}

.editable-name {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.editable-name:hover {
  color: var(--accent-strong);
}

.edit-hint-inline {
  display: none;
  color: var(--muted);
}

.editable-name:hover .edit-hint-inline {
  display: inline-flex;
  align-items: center;
}

.error-msg {
  color: var(--error);
  margin-top: 6px;
}

/* Agent activity chart */
.device-activity-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 10px;
  gap: 10px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-card-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

.stat-card-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chart-card {
  padding: 16px;
}

.chart-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.activity-chart {
  margin-bottom: 12px;
}

.activity-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 120px;
}

.activity-bar-group {
  flex: 1 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 4px;
}

.activity-bar-stack {
  width: 100%;
  max-width: 24px;
  border-radius: 3px 3px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--bg-tertiary);
}

.activity-bar {
  width: 100%;
  transition: height 0.3s ease;
}

.activity-bar-ok {
  background: var(--success);
}

.activity-bar-fail {
  background: var(--error);
}

/* end activity chart */

/* System info layout with disk pie */
.system-info-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.system-info-details {
  flex: 1 1;
  min-width: 0;
}

.disk-pie-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.disk-pie {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.disk-pie-hole {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.disk-pie-pct {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.disk-pie-label {
  font-size: 9px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.disk-pie-legend {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  align-items: center;
}

.disk-legend-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 3px;
}

.disk-legend-used {
  background: var(--primary);
}

.disk-legend-free {
  background: var(--bg-tertiary);
}
/* end system info layout */

/* Bitácora */
.bitacora-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 400px;
  overflow-y: auto;
  font-size: 12px;
}

.bitacora-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 4px;
  background: var(--bg-secondary);
}

.bitacora-item.log-err {
  background: rgba(220, 38, 38, 0.08);
}

.bitacora-icon {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.bitacora-cmd {
  font-family: var(--font-mono, monospace);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 100px;
}

.bitacora-status {
  font-size: 10px;
  flex-shrink: 0;
}

.bitacora-time {
  color: var(--muted);
  font-size: 10px;
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

.bitacora-err {
  color: var(--error);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}
/* end bitácora */

/* Calendar heatmap (GitHub-style) */
.cal-heatmap {
  font-size: 10px;
  overflow-x: auto;
}

.cal-months {
  display: flex;
  gap: 3px;
  margin-bottom: 2px;
  height: 14px;
  align-items: center;
  width: 100%;
}

.cal-month {
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
  text-align: center;
}

.cal-grid {
  display: flex;
  gap: 3px;
  width: 100%;
  align-items: stretch;
}

.cal-grid-row {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

.cal-days {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-right: 4px;
  font-size: 8px;
  color: var(--muted);
  line-height: 1;
  min-width: 10px;
}

.cal-days span {
  flex: 1 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.cal-week {
  flex: 1 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cal-month-odd.cal-lv-0 { background: #dce0e5; }

.cal-year-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cal-year-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  padding: 0;
  color: var(--text);
  transition: background 0.15s;
}

.cal-year-btn:hover {
  background: var(--hover-bg, #e5e7eb);
}

.cal-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--muted);
}

.cal-per-page {
  font-size: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 4px;
  color: var(--text);
  cursor: pointer;
}

.cal-page-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  padding: 0;
  color: var(--text);
  transition: background 0.15s;
}

.cal-page-btn:hover:not(:disabled) {
  background: var(--hover-bg, #e5e7eb);
}

.cal-page-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.cal-page-info {
  font-size: 10px;
  color: var(--muted);
  min-width: 30px;
  text-align: center;
}

.cal-year-label {
  font-size: 11px;
  font-weight: 600;
  min-width: 36px;
  text-align: center;
}



.cal-cell {
  flex: 1 1;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  min-height: 0;
}

.cal-cell:hover {
  transform: scale(1.3);
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.5);
  outline: 1px solid var(--primary);
  z-index: 3;
  position: relative;
}

.cal-lv-0 { background: #ebedf0; }
.cal-lv-1 { background: #bbf7d0; }
.cal-lv-2 { background: #86efac; }
.cal-lv-3 { background: #22c55e; }
.cal-lv-4 { background: #15803d; }

.cal-err {
  background: #fca5a5 !important;
}

.cal-alert {
  background: #fdba74 !important;
}

/* Legend cells: fixed size, not flexible like grid cells */
.cal-legend .cal-cell {
  flex: none;
  width: 11px;
  height: 11px;
}

.cal-today {
  outline: 2px solid #dc2626;
  outline-offset: -1px;
  position: relative;
  z-index: 1;
}

.cal-today.cal-lv-0 {
  background: #fef2f2;
}

.cal-selected {
  outline: 2px solid var(--primary);
  outline-offset: -1px;
  position: relative;
  z-index: 2;
}

/* Responsive calendar scroll wrap */
.cal-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding-bottom: 4px;
}

.cal-vp-lg .cal-scroll-wrap {
  overflow: visible;
}

.cal-heatmap-row.cal-vp-sm,
.cal-heatmap-row.cal-vp-md {
  flex-direction: column;
}

.controls-sidebar-inside.cal-vp-sm,
.controls-sidebar-inside.cal-vp-md {
  width: 100%;
  max-width: none;
}

.cal-heatmap-body {
  flex: 3 1;
  min-width: 0;
}

@media (max-width: 767px) {
  .cal-heatmap-row {
    flex-direction: column;
  }
  .controls-sidebar-inside {
    width: 100%;
    max-width: none;
  }
  .cal-legend {
    flex-wrap: wrap;
  }
  .cal-legend-left {
    flex: auto;
    width: 100%;
    margin-bottom: 4px;
  }
  .cal-legend-right {
    flex: none;
  }
  .time-run-select {
    max-width: 200px;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .cal-legend {
    flex-wrap: wrap;
  }
  .cal-legend-left {
    flex: auto;
    width: 100%;
    margin-bottom: 4px;
  }
}

.time-run-select {
  font-size: 11px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--text);
  max-width: 420px;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s;
}

@keyframes pulse-green {
  0%   { border-color: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  50%  { border-color: #16a34a; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2); transform: scale(1.02); }
  100% { border-color: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
}

.time-run-select.pulse {
  animation: pulse-green 0.6s ease-in-out 3;
}

.cal-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 9px;
  color: var(--muted);
}

.cal-legend-left {
  flex: 1 1;
  display: flex;
  justify-content: flex-start;
}

.cal-legend-right {
  flex: 1 1;
  display: flex;
  justify-content: flex-end;
}

.cal-legend-groups {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cal-legend-group {
  display: flex;
  align-items: center;
  gap: 3px;
}

.time-backup-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.time-backup-sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted, #6b7280);
}

.time-run-legend {
  margin-left: 8px;
  font-size: 10px;
  color: var(--foreground);
  font-weight: 500;
  white-space: nowrap;
}
/* end calendar */

/* Time Backup */
.time-backup-hr {
  border: none;
  border-top: 1px solid var(--border, #d0d7de);
  margin: 10px 0;
}

.time-backup-runs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 120px;
  overflow-y: auto;
  margin-bottom: 4px;
}

.time-run-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.1s;
}

.time-run-row:hover {
  background: var(--bg-secondary, #f3f4f6);
}

.time-run-row.selected {
  background: var(--accent-bg, #eef2ff);
}

.time-run-date {
  font-weight: 500;
}

.time-run-meta {
  color: var(--muted, #6b7280);
  font-size: 11px;
}

.time-search-input {
  flex: 1 1;
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid var(--border, #d0d7de);
  border-radius: 4px;
  background: transparent;
  color: inherit;
}

.time-search-input:focus {
  outline: none;
  border-color: var(--primary, #3b82f6);
}
/* Search results dropdown */
.search-results-dropdown {
  max-height: 350px;
  overflow-y: auto;
  font-size: 12px;
  border: 1px solid var(--border, #d0d7de);
  border-radius: 6px;
}

.search-result-group {
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.search-result-group:last-child {
  border-bottom: none;
}

.search-result-dir {
  padding: 4px 8px;
  font-size: 10px;
  color: var(--muted, #6b7280);
  font-family: monospace;
  background: var(--bg-secondary, #f3f4f6);
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  cursor: pointer;
  transition: background 0.1s;
}

.search-result-item:hover {
  background: var(--accent-bg, #eef2ff);
}

.search-result-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* end search results */

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: var(--bg-color, #fff);
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-body {
  flex: 1 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
}

.modal-close:hover:not(:disabled) {
  color: var(--text);
  background: var(--hover);
}

.modal-close:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.modal-list {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  font-size: 13px;
  max-height: 200px;
  overflow-y: auto;
}

.modal-list li {
  padding: 3px 0;
}

.modal-confirm-input {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.modal-confirm-input label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.modal-confirm-input input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}

.modal-confirm-input input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(19, 121, 91, 0.15);
}

/* Folder tree */
.folder-tree {
  font-size: 13px;
}

.folder-tree .tree-node {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  grid-gap: 4px;
  gap: 4px;
  padding: 3px 4px;
  border-radius: 4px;
  cursor: default;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.folder-tree .tree-node > input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
}

.folder-tree .tree-node:hover {
  background: var(--bg-secondary);
}

.folder-tree .tree-node.tree-selected {
  background: rgba(59, 130, 246, 0.1);
}

.tree-drive {
  font-weight: 600;
  margin-bottom: 2px;
}

.tree-arrow {
  width: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

.tree-label {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-meta {
  color: var(--muted);
  font-size: 11px;
  margin-left: 4px;
}

.tree-label-row {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.tree-children {
  margin-left: 0;
}

.tree-folder-icon {
  flex-shrink: 0;
  color: var(--muted);
}
/* end modal */

.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,
.pw-policy-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
}

.pw-policy-form input:focus,
.pw-policy-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #dff3eb;
}

.pw-policy-form .button {
  justify-self: start;
}

.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;
}

/* ── Org notification settings ── */

.org-notif-settings .notif-rules-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.org-notif-settings .notif-rule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  transition: background 120ms ease;
}

.org-notif-settings .notif-rule-row:hover {
  background: #f8f9fa;
}

.org-notif-settings .notif-rule-info {
  flex: 1 1;
  min-width: 0;
}

.org-notif-settings .notif-rule-info strong {
  font-size: 13px;
}

.org-notif-settings .notif-rule-toggles {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.org-notif-settings .toggle-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease;
  background: #ffffff;
  color: var(--muted);
}

.org-notif-settings .toggle-chip.active {
  background: #e7f4ef;
  color: var(--accent-strong);
  border-color: var(--accent-strong);
}

.org-notif-settings .toggle-chip:hover:not(.active) {
  border-color: var(--accent);
}

.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);
}

.device-bars {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.device-bar-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 36px;
  border-radius: 6px;
  background: #f4f6f8;
  overflow: hidden;
}

.device-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  border-radius: 6px;
  transition: width 400ms ease;
  opacity: 0.7;
}

.device-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;
}

.restore-location-option {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.radio-label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  font-weight: 400 !important;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.radio-label input[type="radio"] {
  width: auto !important;
  accent-color: var(--accent);
  cursor: pointer;
}

.readonly-input {
  background: var(--surface);
  color: var(--muted);
  cursor: default;
}

.checkbox-label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  font-weight: 400 !important;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto !important;
  accent-color: var(--accent);
  cursor: pointer;
}

.subfolder-check {
  margin-top: 4px;
}

/* ── 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:not(.landing-btn-primary):not(.landing-btn-secondary) {
  text-decoration: none;
  font-size: 14px;
  color: var(--muted);
  transition: color 140ms;
}

.landing-nav a:not(.landing-btn-primary):not(.landing-btn-secondary):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: flex-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;
}

.audit-page .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.audit-page .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;
}

/* ── Org dashboard page ── */

.org-dashboard-page .page-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.org-dashboard-page .mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 4px;
}

.org-dashboard-page .mini-table th {
  text-align: left;
  padding: 6px 8px;
  font-weight: 600;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}

.org-dashboard-page .mini-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.org-dashboard-page .mini-table tr:last-child td {
  border-bottom: none;
}

.org-dashboard-page .link {
  color: var(--accent-strong);
  text-decoration: none;
}

.org-dashboard-page .link:hover {
  text-decoration: underline;
}

.org-dashboard-page .alert-equipo-list {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.org-dashboard-page .alert-equipo-list .info-panel {
  padding: 12px 16px;
  position: relative;
}

.org-dashboard-page .info-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.org-dashboard-page .badge-red {
  display: inline-block;
  background: #fde8e8;
  color: #c53030;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
}

.org-dashboard-page .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.org-dashboard-page .stat-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.org-dashboard-page .stat-value {
  font-size: 20px;
  font-weight: 700;
}

.org-dashboard-page .stat-label {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 700px) {
  .org-dashboard-page .detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Networks pages ── */

.networks-page .cell-name,
.network-dashboard-page .cell-name,
.network-devices-page .cell-name,
.network-enrollments-page .cell-name {
  display: inline-block;
}

.link-card {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.link-card:hover {
  border-color: var(--accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.link-card h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-strong);
}

.registration-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

.registration-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px;
}

.registration-code-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.registration-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.registration-code-row .mono {
  font-size: 16px;
  font-weight: 700;
  background: #f4f6f8;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
}

.registration-status {
  display: flex;
  align-items: center;
}

.registration-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.action-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.network-dashboard-page .detail-grid {
  margin-top: 20px;
}

.create-form-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.create-form-inline .input {
  width: 200px;
}

@media (max-width: 560px) {
  .create-form-inline {
    flex-direction: column;
    width: 100%;
  }

  .create-form-inline .input {
    width: 100%;
  }
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f4f6f8;
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.4;
}

.mini-tag code {
  font-size: 12px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-tag-remove {
  font-weight: 700;
  opacity: 0.5;
}

.mini-tag-remove:hover {
  opacity: 1;
}

/* ── Policy Wizard ── */

.policy-wizard-page {
  max-width: 1200px;
}

.policy-wizard .page-header {
  margin-bottom: 28px;
}

.wizard-section {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.wizard-section:last-of-type {
  border-bottom: none;
}

.wizard-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.wizard-section-title h2 {
  margin: 0;
  font-size: 18px;
}

.wizard-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-right: -4px;
}

.step-badge.step-ok {
  background: #e7f4ef;
  color: var(--accent-strong);
}

.step-badge.step-warn {
  background: #fff4e5;
  color: #b76e00;
}

.step-badge.step-empty {
  background: #f4f6f8;
  color: var(--muted);
}

/* Path cards */
.preset-path-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 8px;
  gap: 8px;
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .preset-path-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.path-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 140ms ease;
  position: relative;
  background: #ffffff;
}

.path-card:hover {
  border-color: var(--accent);
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.path-card.selected {
  border-color: var(--accent-strong);
  background: var(--accent-bg, #e7f4ef);
  box-shadow: 0 0 0 1px var(--accent-strong);
}

.path-card-icon {
  font-size: 24px;
  line-height: 1;
}

.path-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.path-card-body strong {
  font-size: 14px;
}

.path-card-body small {
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
}

.path-card-check {
  position: absolute;
  top: 6px;
  right: 8px;
  color: var(--accent-strong);
  font-size: 16px;
  font-weight: 700;
}

.path-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.custom-path-input {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.custom-path-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.custom-path-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #f8f9fa;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
}

.custom-path-item code {
  flex: 1 1;
  font-size: 12px;
}

/* Multi-user */
.multi-user-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 140ms ease;
  background: #ffffff;
  max-width: 480px;
}

.multi-user-toggle:hover {
  border-color: var(--accent);
}

.multi-user-toggle.selected {
  border-color: var(--accent-strong);
  background: var(--accent-bg, #e7f4ef);
}

.multi-user-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  color: transparent;
}

.multi-user-toggle.selected .multi-user-check {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #ffffff;
}

.multi-user-config {
  margin-top: 16px;
  padding: 16px;
  background: #f8f9fa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.multi-user-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.multi-user-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.multi-user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.multi-user-icon {
  font-size: 20px;
  line-height: 1;
}

.multi-user-info {
  flex: 1 1;
}

.multi-user-info strong {
  font-size: 13px;
}

/* Multi-user mode selector */
.multi-user-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 8px;
  gap: 8px;
}

.multi-user-mode-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 140ms ease;
  background: #ffffff;
  position: relative;
}

.multi-user-mode-card:hover {
  border-color: var(--accent);
}

.multi-user-mode-card.selected {
  border-color: var(--accent-strong);
  background: var(--accent-bg, #e7f4ef);
}

.multi-user-mode-icon {
  font-size: 22px;
  line-height: 1;
}

.mode-check {
  position: absolute;
  top: 6px;
  right: 8px;
  color: var(--accent-strong);
  font-size: 16px;
  font-weight: 700;
}

/* Storage cards */
.storage-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  grid-gap: 8px;
  gap: 8px;
  margin-bottom: 12px;
}

.storage-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
  transition: all 140ms ease;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.storage-card:hover {
  border-color: var(--accent);
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.storage-card.selected {
  border-color: var(--accent-strong);
  background: var(--accent-bg, #e7f4ef);
  box-shadow: 0 0 0 1px var(--accent-strong);
}

.storage-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.storage-card-check {
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 16px;
}

.storage-card-type {
  font-size: 12px;
  color: var(--muted);
}

.storage-card-detail {
  font-size: 12px;
  word-break: break-all;
}

.storage-card-footer {
  display: flex;
  align-items: center;
  margin-top: auto;
  padding-top: 6px;
}

.storage-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.storage-status.online {
  background: #e7f4ef;
  color: var(--accent-strong);
}

.storage-status.warning {
  background: #fff4e5;
  color: #b76e00;
}

/* Selected summary */
.selected-summary {
  margin-top: 12px;
  padding: 10px 14px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.summary-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.summary-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
}

/* Execution mode cards */
.exec-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 14px;
  gap: 14px;
  margin-bottom: 16px;
}

.exec-mode-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  cursor: pointer;
  transition: all 140ms ease;
  background: #ffffff;
}

.exec-mode-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.exec-mode-card.selected {
  border-color: var(--accent-strong);
  background: var(--accent-bg, #e7f4ef);
  box-shadow: 0 0 0 1px var(--accent-strong);
}

.exec-mode-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.exec-mode-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.exec-mode-card p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
}

.exec-mode-diagram {
  font-size: 12px;
  color: var(--text);
  background: #f4f6f8;
  border-radius: 6px;
  padding: 8px 12px;
  font-family: monospace;
  line-height: 1.6;
}

.exec-mode-diagram.parallel {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.parallel-branches {
  display: flex;
  flex-direction: column;
  padding-left: 12px;
}

.parallel-branch {
  color: var(--muted);
}

.exec-arrow {
  font-family: monospace;
}

/* Sequential order */
.sequential-order {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.order-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f8f9fa;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.order-num {
  font-weight: 700;
  font-size: 14px;
  min-width: 24px;
}

.order-name {
  flex: 1 1;
  font-size: 14px;
}

.order-type {
  font-size: 12px;
}

.order-actions {
  display: flex;
  gap: 4px;
}

.parallel-config {
  margin-top: 12px;
}

/* Failure options */
.failure-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.failure-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: all 120ms ease;
  background: #ffffff;
}

.failure-option:hover {
  border-color: var(--accent);
}

.failure-option.selected {
  border-color: var(--accent-strong);
  background: var(--accent-bg, #e7f4ef);
}

.failure-radio {
  font-size: 18px;
  color: var(--muted);
  min-width: 20px;
}

.failure-option.selected .failure-radio {
  color: var(--accent-strong);
}

.retry-config {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 8px;
  padding: 12px 14px;
  background: #f8f9fa;
  border-radius: 8px;
}

/* Scheduling */
.schedule-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 8px;
  gap: 8px;
  margin-bottom: 16px;
}

.schedule-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: all 120ms ease;
  background: #ffffff;
}

.schedule-option:hover {
  border-color: var(--accent);
}

.schedule-option.selected {
  border-color: var(--accent-strong);
  background: var(--accent-bg, #e7f4ef);
}

.schedule-radio {
  font-size: 18px;
  color: var(--muted);
  min-width: 18px;
  margin-top: 1px;
}

.schedule-option.selected .schedule-radio {
  color: var(--accent-strong);
}

.schedule-config-form {
  padding: 16px;
  background: #f8f9fa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* Day picker */
.day-picker {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.day-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease;
}

.day-chip.selected {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.day-chip:hover:not(.selected) {
  border-color: var(--accent);
}

/* Policy summary */
.policy-summary {
  margin-top: 8px;
}

.summary-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}

.summary-card h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.summary-detail {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
}

/* Wizard actions */
.wizard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.wizard-actions .button {
  min-width: 140px;
  justify-content: center;
}

.wizard-validation {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.validation-ok {
  padding: 8px 14px;
  background: #e7f4ef;
  color: var(--accent-strong);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.validation-warn {
  padding: 8px 14px;
  background: #fff4e5;
  color: #b76e00;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

/* Icon button small */
.icon-button-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: all 120ms ease;
}

.icon-button-sm:hover:not(:disabled) {
  background: #f4f6f8;
  border-color: var(--accent);
}

.icon-button-sm:disabled {
  opacity: 0.3;
  cursor: default;
}

/* Mobile responsive */
@media (max-width: 700px) {
  .preset-path-grid,
  .storage-card-grid {
    grid-template-columns: 1fr;
  }

  .exec-mode-grid {
    grid-template-columns: 1fr;
  }

  .schedule-options {
    grid-template-columns: 1fr;
  }

  .retry-config {
    flex-direction: column;
    align-items: flex-start;
  }

  .policy-wizard-page {
    max-width: 100%;
  }

  .trigger-grid {
    grid-template-columns: 1fr;
  }

  .bandwidth-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Trigger cards (multi-select) ── */

.trigger-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 8px;
  gap: 8px;
  margin-bottom: 12px;
}

.trigger-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: all 120ms ease;
  background: #ffffff;
}

.trigger-card:hover {
  border-color: var(--accent);
}

.trigger-card.selected {
  border-color: var(--accent-strong);
  background: var(--accent-bg, #e7f4ef);
}

.trigger-card.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.trigger-icon {
  font-size: 22px;
  line-height: 1;
}

.trigger-body {
  flex: 1 1;
}

.trigger-body strong {
  font-size: 14px;
}

.trigger-check {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-strong);
  min-width: 20px;
  text-align: center;
}

/* ── Bandwidth slider ── */

.bandwidth-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 500px;
}

.bandwidth-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bandwidth-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bandwidth-slider {
  flex: 1 1;
  -webkit-appearance: none;
  -moz-appearance: none;
       appearance: none;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  outline: none;
  cursor: pointer;
}

.bandwidth-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  cursor: pointer;
}

.bandwidth-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  cursor: pointer;
}

.bandwidth-label {
  font-size: 14px;
  font-weight: 600;
  min-width: 80px;
  text-align: right;
}

.bandwidth-ticks {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.tick {
  flex: 1 1;
  min-width: 0;
  padding: 4px 2px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
  font-size: 11px;
  text-align: center;
  cursor: pointer;
  transition: all 120ms ease;
}

.tick:hover {
  border-color: var(--accent);
}

.tick.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* ── Priority / Dynamic execution ── */

.priority-config {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 500px;
}

.priority-config label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stagger-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stagger-slider {
  flex: 1 1;
  -webkit-appearance: none;
  -moz-appearance: none;
       appearance: none;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  outline: none;
  cursor: pointer;
}

.stagger-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  cursor: pointer;
}

.stagger-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  cursor: pointer;
}

.stagger-value {
  font-size: 14px;
  font-weight: 600;
  min-width: 50px;
}

/* ── Policy name input ── */

.policy-name-input {
  font-weight: 600;
  max-width: 400px;
}

/* ── Exclusions ── */

.exclude-input-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.exclude-hints {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.hint-chip {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8f9fa;
  font-size: 11px;
  cursor: pointer;
  transition: all 120ms ease;
  color: var(--text);
}

.hint-chip:hover {
  border-color: var(--accent);
  background: #e7f4ef;
}

.exclude-icon {
  font-size: 14px;
  opacity: 0.6;
}

/* ── Settings pages ── */

.settings-page {
  max-width: 720px;
}

.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.settings-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-decoration: none;
  color: var(--text);
  transition: all 140ms ease;
}

.settings-card:hover {
  border-color: var(--accent);
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.settings-card div {
  flex: 1 1;
}

.settings-card strong {
  font-size: 15px;
}

.settings-arrow {
  color: var(--muted);
  flex-shrink: 0;
}

.system-section {
  margin-bottom: 28px;
}

.system-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

/* ── SMTP form ── */

.smtp-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.smtp-form .checkbox-label {
  margin: 0;
  font-size: 14px;
}

.smtp-form .button {
  align-self: flex-start;
}

/* ── Template section ── */

.template-section .template-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.template-section .template-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 6px;
  transition: background 120ms ease;
}

.template-section .template-item:hover {
  background: #f8f9fa;
}

.template-section .template-editor {
  margin-top: 16px;
  padding: 16px;
  background: #f8f9fa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* ── Quick links ── */

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 10px;
  gap: 10px;
  margin: 20px 0;
}

.quick-link-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-decoration: none;
  color: var(--text);
  transition: all 140ms ease;
}

.quick-link-card:hover {
  border-color: var(--accent);
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.quick-link-label {
  flex: 1 1;
  font-size: 14px;
  font-weight: 500;
}

.quick-link-count {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-strong);
}

.quick-link-arrow {
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 18px;
  gap: 18px;
  margin-top: 8px;
}

@media (max-width: 700px) {
  .quick-links {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .quick-links {
    grid-template-columns: 1fr;
  }
}

/* ── System resources ── */

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.resource-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.resource-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f0f4ff;
  color: var(--accent-strong);
  flex-shrink: 0;
}

.resource-info {
  flex: 1 1;
  min-width: 0;
}

.resource-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 2px;
}

.resource-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.resource-detail {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}

.resource-bar {
  height: 4px;
  background: #e5e7eb;
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}

.resource-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease, background 0.3s ease;
}

.system-card a:hover {
  border-color: var(--accent-strong);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

