:root {
  color-scheme: dark;

  --bg: #080d12;
  --bg2: #0b1118;

  --panel: #111821;
  --panel2: #151e29;
  --panel3: #192431;

  --line: rgba(255,255,255,.075);

  --text: #f4f8f6;
  --muted: #8f9eaa;
  --muted2: #64717d;

  --green: #42d68a;
  --green2: #25b96f;

  --yellow: #f2c250;
  --red: #ff6f70;
  --blue: #69a7ff;

  --sidebar: 238px;

  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);

  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}


/* LOGIN */

.login-view {
  min-height: 100vh;

  display: grid;
  place-items: center;

  padding: 28px 18px;

  background:
    radial-gradient(
      circle at 50% -10%,
      rgba(66,214,138,.17),
      transparent 35%
    ),
    radial-gradient(
      circle at 100% 100%,
      rgba(60,100,255,.11),
      transparent 38%
    ),
    var(--bg);
}

.login-card {
  width: min(100%, 420px);

  padding: 31px 25px 23px;

  border: 1px solid var(--line);
  border-radius: 26px;

  background: rgba(17,24,33,.94);

  box-shadow:
    0 34px 100px rgba(0,0,0,.42);
}

.brand-kicker {
  color: var(--green);

  font-size: 10px;
  font-weight: 850;

  letter-spacing: .19em;
}

.login-title {
  margin: 4px 0 4px;

  font-size: 34px;
  letter-spacing: -.045em;
}

.login-subtitle {
  margin: 0 0 26px;

  color: var(--muted);
  font-size: 13px;
}

.field-label {
  display: block;

  margin-top: 15px;

  color: var(--muted);

  font-size: 11px;
  font-weight: 700;
}

.field-input {
  width: 100%;

  margin-top: 6px;

  padding: 13px 14px;

  border: 1px solid var(--line);
  border-radius: 13px;

  background: rgba(255,255,255,.035);
  color: var(--text);

  outline: none;

  font-size: 16px;
}

.field-input:focus {
  border-color: rgba(66,214,138,.6);

  box-shadow:
    0 0 0 3px rgba(66,214,138,.09);
}

.otp-input {
  letter-spacing: .18em;
  font-weight: 800;
}

.primary-button {
  width: 100%;

  margin-top: 23px;

  padding: 14px 16px;

  border: 0;
  border-radius: 14px;

  background: var(--green);
  color: #07110b;

  font-weight: 850;
}

.primary-button:disabled {
  opacity: .55;
}

.login-error {
  min-height: 18px;

  margin-top: 13px;

  color: var(--red);

  font-size: 12px;
  text-align: center;
}

.secure-caption {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;

  margin-top: 18px;
  padding-top: 15px;

  border-top: 1px solid var(--line);

  color: var(--muted2);
  font-size: 10px;
}

.secure-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--green);

  box-shadow:
    0 0 10px rgba(66,214,138,.55);
}


/* SHELL */

.admin-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;

  z-index: 50;

  width: var(--sidebar);

  padding: 22px 14px 16px;

  display: flex;
  flex-direction: column;

  border-right: 1px solid var(--line);

  background:
    linear-gradient(
      180deg,
      #0b1218,
      #090e14
    );
}

.sidebar-brand {
  padding: 0 10px 20px;
}

.brand-title {
  margin-top: 3px;

  font-size: 25px;
  font-weight: 780;

  letter-spacing: -.04em;
}

.brand-version {
  margin-top: 2px;

  color: var(--muted2);

  font-size: 10px;
}

.side-nav {
  min-height: 0;

  flex: 1;

  overflow-y: auto;

  scrollbar-width: none;
}

.side-nav::-webkit-scrollbar {
  display: none;
}

.nav-section {
  margin:
    17px
    10px
    7px;

  color: var(--muted2);

  font-size: 9px;
  font-weight: 850;

  letter-spacing: .14em;
}

.side-link {
  width: 100%;

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 11px;

  border: 0;
  border-radius: 11px;

  background: transparent;
  color: var(--muted);

  text-align: left;

  font-size: 12px;
}

.side-link:hover {
  color: var(--text);

  background: rgba(255,255,255,.035);
}

.side-link.active {
  color: var(--text);

  background:
    rgba(66,214,138,.095);

  box-shadow:
    inset 2px 0 var(--green);
}

.side-icon {
  width: 18px;

  text-align: center;

  color: inherit;

  font-size: 15px;
}

.sidebar-footer {
  padding: 12px 8px 0;

  display: flex;
  align-items: center;
  justify-content: space-between;

  border-top: 1px solid var(--line);
}

.read-badge {
  padding: 5px 7px;

  border-radius: 999px;

  color: var(--blue);

  background: rgba(105,167,255,.09);

  font-size: 8px;
  font-weight: 850;

  letter-spacing: .08em;
}

.sidebar-logout {
  border: 0;
  background: transparent;

  color: var(--muted2);

  font-size: 10px;
}

.main-shell {
  margin-left: var(--sidebar);

  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;

  z-index: 30;

  min-height: 75px;

  padding:
    15px
    28px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  border-bottom: 1px solid var(--line);

  background:
    rgba(8,13,18,.89);

  backdrop-filter:
    blur(18px);
}

.page-title {
  margin: 0;

  font-size: 23px;
  font-weight: 780;

  letter-spacing: -.035em;
}

.page-subtitle {
  margin-top: 2px;

  color: var(--muted2);

  font-size: 10px;
}

.mobile-brand {
  display: none;

  margin-bottom: 2px;

  color: var(--green);

  font-size: 8px;
  font-weight: 850;

  letter-spacing: .14em;
}

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

.health-badge {
  padding: 8px 10px;

  border-radius: 999px;

  font-size: 10px;
  font-weight: 750;
}

.health-badge.ok {
  color: var(--green);
  background: rgba(66,214,138,.1);
}

.health-badge.warning {
  color: var(--yellow);
  background: rgba(242,194,80,.1);
}

.health-badge.critical {
  color: var(--red);
  background: rgba(255,111,112,.1);
}

.health-badge.neutral {
  color: var(--muted);
  background: rgba(255,255,255,.045);
}

.icon-button {
  width: 36px;
  height: 36px;

  display: grid;
  place-items: center;

  border: 1px solid var(--line);
  border-radius: 11px;

  background: var(--panel);
  color: var(--text);
}

.content {
  max-width: 1480px;

  margin: 0 auto;

  padding: 24px 28px 60px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}


/* KPI */

.kpi-grid {
  display: grid;

  grid-template-columns:
    repeat(5, minmax(0,1fr));

  gap: 11px;

  margin-bottom: 13px;
}

.kpi-grid.compact {
  grid-template-columns:
    repeat(4,minmax(0,1fr));
}

.kpi-card {
  min-width: 0;

  padding: 17px 17px 15px;

  border: 1px solid var(--line);
  border-radius: 17px;

  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,.045),
      rgba(255,255,255,.018)
    );
}

.kpi-value {
  font-size: 27px;
  font-weight: 800;

  letter-spacing: -.045em;
}

.kpi-label {
  margin-top: 4px;

  color: var(--muted);

  font-size: 10px;
}

.kpi-hint {
  margin-top: 8px;

  color: var(--muted2);

  font-size: 9px;
}


/* PANELS */

.dashboard-grid {
  display: grid;

  grid-template-columns:
    repeat(3,minmax(0,1fr));

  gap: 12px;
}

.span-2 {
  grid-column: span 2;
}

.panel,
.table-card {
  border: 1px solid var(--line);
  border-radius: 17px;

  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,.04),
      rgba(255,255,255,.018)
    );
}

.panel {
  padding: 17px;

  margin-bottom: 12px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  margin-bottom: 13px;
}

.panel-title {
  font-size: 13px;
  font-weight: 760;
}

.panel-subtitle {
  margin-top: 2px;

  color: var(--muted2);

  font-size: 9px;
}

.mini-status {
  color: var(--green);

  font-size: 10px;
  font-weight: 700;
}

.two-column {
  display: grid;

  grid-template-columns:
    repeat(2,minmax(0,1fr));

  gap: 12px;
}


/* STATUS / DETAILS */

.status-grid {
  display: grid;

  grid-template-columns:
    repeat(3,minmax(0,1fr));

  gap: 8px;
}

.status-box {
  padding: 12px;

  border-radius: 12px;

  background: rgba(255,255,255,.025);
}

.status-box-title {
  color: var(--muted);

  font-size: 9px;
}

.status-box-value {
  margin-top: 4px;

  font-size: 12px;
  font-weight: 730;
}

.good {
  color: var(--green);
}

.warn {
  color: var(--yellow);
}

.bad {
  color: var(--red);
}

.muted {
  color: var(--muted);
}

.metric-stack,
.detail-list {
  display: grid;

  gap: 1px;
}

.metric-row,
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 14px;

  padding: 9px 0;

  border-bottom: 1px solid var(--line);

  font-size: 11px;
}

.metric-row:last-child,
.detail-row:last-child {
  border-bottom: 0;
}

.metric-row span:first-child,
.detail-row span:first-child {
  color: var(--muted);
}

.metric-row b,
.detail-row b {
  text-align: right;
}


/* TOOLBAR */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  margin-bottom: 12px;
}

.search-wrap {
  min-width: 260px;

  flex: 1;
}

.search-input {
  width: 100%;

  padding: 11px 13px;

  border: 1px solid var(--line);
  border-radius: 12px;

  background: var(--panel);
  color: var(--text);

  outline: none;

  font-size: 12px;
}

.search-input:focus {
  border-color:
    rgba(66,214,138,.45);
}

.toolbar-chips {
  display: flex;

  gap: 6px;
}

.toolbar-chips.scrollable {
  overflow-x: auto;

  scrollbar-width: none;
}

.toolbar-chips.scrollable::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;

  padding: 8px 11px;

  border: 1px solid var(--line);
  border-radius: 999px;

  background: var(--panel);
  color: var(--muted);

  font-size: 10px;
}

.filter-chip.active {
  background: var(--text);
  color: #101317;
}


/* SUMMARY */

.summary-strip {
  display: flex;
  flex-wrap: wrap;

  gap: 8px;

  margin-bottom: 12px;
}

.summary-item {
  padding: 9px 11px;

  border: 1px solid var(--line);
  border-radius: 11px;

  background: var(--panel);

  color: var(--muted);

  font-size: 10px;
}

.summary-item b {
  margin-left: 5px;

  color: var(--text);
}


/* TABLE */

.table-card {
  overflow: hidden;
}

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

.data-table {
  width: 100%;

  border-collapse: collapse;

  font-size: 11px;
}

.data-table th {
  padding: 11px 12px;

  border-bottom: 1px solid var(--line);

  color: var(--muted2);

  text-align: left;

  font-size: 9px;
  font-weight: 700;

  letter-spacing: .04em;
}

.data-table td {
  padding: 12px;

  border-bottom: 1px solid var(--line);

  vertical-align: middle;
}

.data-table tbody tr {
  transition: background .15s ease;
}

.data-table tbody tr:hover {
  background: rgba(255,255,255,.025);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.table-primary {
  font-weight: 720;
}

.table-secondary {
  margin-top: 2px;

  color: var(--muted2);

  font-size: 9px;
}

.row-action {
  padding: 6px 8px;

  border: 1px solid var(--line);
  border-radius: 9px;

  background: rgba(255,255,255,.025);
  color: var(--text);

  font-size: 9px;
}


/* BADGES */

.badge {
  display: inline-flex;

  align-items: center;

  padding: 5px 7px;

  border-radius: 999px;

  font-size: 9px;
  font-weight: 720;
}

.badge.ok {
  color: var(--green);
  background: rgba(66,214,138,.09);
}

.badge.warning {
  color: var(--yellow);
  background: rgba(242,194,80,.1);
}

.badge.critical {
  color: var(--red);
  background: rgba(255,111,112,.1);
}

.badge.info {
  color: var(--blue);
  background: rgba(105,167,255,.09);
}

.badge.neutral {
  color: var(--muted);
  background: rgba(255,255,255,.045);
}


/* LISTS */

.list-stack,
.activity-list {
  display: grid;

  gap: 0;
}

.list-item,
.activity-item {
  padding: 10px 0;

  border-bottom: 1px solid var(--line);
}

.list-item:last-child,
.activity-item:last-child {
  border-bottom: 0;
}

.list-item-head,
.activity-head {
  display: flex;
  justify-content: space-between;

  gap: 12px;
}

.list-item-title,
.activity-title {
  font-size: 11px;
  font-weight: 700;
}

.list-item-meta,
.activity-meta {
  margin-top: 3px;

  color: var(--muted2);

  font-size: 9px;

  line-height: 1.45;
}

.activity-time {
  flex: 0 0 auto;

  color: var(--muted2);

  font-size: 9px;
}


/* DEVICES */

.device-grid {
  display: grid;

  grid-template-columns:
    repeat(3,minmax(0,1fr));

  gap: 10px;
}

.device-card {
  padding: 15px;

  border: 1px solid var(--line);
  border-radius: 16px;

  background: var(--panel);
}

.device-card-head {
  display: flex;
  justify-content: space-between;

  gap: 10px;
}

.device-card-title {
  font-size: 12px;
  font-weight: 740;
}

.device-card-sub {
  margin-top: 2px;

  color: var(--muted2);

  font-size: 9px;
}

.device-card-metrics {
  display: grid;

  grid-template-columns:
    repeat(3,1fr);

  gap: 6px;

  margin-top: 12px;
}

.device-card-metric {
  padding: 8px;

  border-radius: 10px;

  background: rgba(255,255,255,.025);
}

.device-card-metric b {
  display: block;

  font-size: 11px;
}

.device-card-metric span {
  display: block;

  margin-top: 2px;

  color: var(--muted2);

  font-size: 8px;
}


/* EVENTS */

.event-timeline {
  display: grid;

  grid-template-columns:
    repeat(2,minmax(0,1fr));

  gap: 9px;
}

.event-card {
  padding: 13px;

  border: 1px solid var(--line);
  border-radius: 14px;

  background: var(--panel);
}

.event-top {
  display: flex;
  justify-content: space-between;

  gap: 8px;
}

.event-area {
  color: var(--blue);

  font-size: 8px;
  font-weight: 850;

  letter-spacing: .06em;

  text-transform: uppercase;
}

.event-time {
  color: var(--muted2);

  font-size: 8px;
}

.event-name {
  margin-top: 5px;

  font-size: 11px;
  font-weight: 700;
}

.event-change {
  margin-top: 5px;

  color: var(--muted);

  font-size: 10px;
}

.event-device {
  margin-top: 7px;

  color: var(--muted2);

  font-size: 8px;
}


/* MOBILE */

.mobile-nav,
.mobile-more {
  display: none;
}


/* DRAWER */

.drawer-backdrop {
  position: fixed;
  inset: 0;

  z-index: 89;

  background: rgba(0,0,0,.55);

  backdrop-filter: blur(2px);
}

.detail-drawer {
  position: fixed;

  z-index: 90;

  inset: 0 0 0 auto;

  width: min(680px, 100%);

  border-left: 1px solid var(--line);

  background: #0b1118;

  box-shadow:
    -30px 0 100px rgba(0,0,0,.45);

  overflow-y: auto;
}

.drawer-header {
  position: sticky;
  top: 0;

  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  padding: 19px 20px;

  border-bottom: 1px solid var(--line);

  background:
    rgba(11,17,24,.94);

  backdrop-filter: blur(16px);
}

.drawer-kicker {
  color: var(--green);

  font-size: 8px;
  font-weight: 850;

  letter-spacing: .1em;
}

.drawer-title {
  margin: 2px 0 0;

  font-size: 20px;
  letter-spacing: -.03em;
}

.drawer-content {
  padding: 17px 20px 40px;
}

.drawer-section {
  margin-bottom: 12px;

  padding: 14px;

  border: 1px solid var(--line);
  border-radius: 14px;

  background: var(--panel);
}

.drawer-section-title {
  margin-bottom: 10px;

  color: var(--muted);

  font-size: 9px;
  font-weight: 800;

  letter-spacing: .05em;

  text-transform: uppercase;
}


/* EMPTY / LOAD */

.empty {
  padding: 16px 0;

  color: var(--muted2);

  font-size: 10px;
}

.loading {
  color: var(--muted2);
}

.danger-soft {
  color: var(--red) !important;
}


/* TABLET */

@media (max-width: 1120px) {

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

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

  .span-2 {
    grid-column: span 2;
  }

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

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


/* PHONE */

@media (max-width: 760px) {

  :root {
    --sidebar: 0px;
  }

  .sidebar {
    display: none;
  }

  .main-shell {
    margin-left: 0;
  }

  .topbar {
    min-height: 71px;

    padding:
      calc(12px + var(--safe-top))
      14px
      11px;
  }

  .mobile-brand {
    display: block;
  }

  .page-title {
    font-size: 19px;
  }

  .page-subtitle {
    display: none;
  }

  .content {
    padding:
      14px
      12px
      calc(90px + var(--safe-bottom));
  }

  .health-badge {
    font-size: 9px;
  }

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

    gap: 8px;
  }

  .kpi-card {
    padding: 14px 12px;
  }

  .kpi-value {
    font-size: 23px;
  }

  .dashboard-grid,
  .two-column {
    grid-template-columns:
      1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .panel {
    padding: 14px;
  }

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

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-wrap {
    min-width: 0;
  }

  .toolbar-chips {
    overflow-x: auto;

    scrollbar-width: none;
  }

  .toolbar-chips::-webkit-scrollbar {
    display: none;
  }

  .data-table th,
  .data-table td {
    white-space: nowrap;
  }

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

  .event-timeline {
    grid-template-columns: 1fr;
  }


  .mobile-nav {
    position: fixed;

    z-index: 70;

    left: 0;
    right: 0;
    bottom: 0;

    display: grid;

    grid-template-columns:
      repeat(4,1fr);

    padding:
      7px
      5px
      calc(6px + var(--safe-bottom));

    border-top: 1px solid var(--line);

    background:
      rgba(8,13,18,.95);

    backdrop-filter:
      blur(20px);
  }

  .mobile-nav-button {
    border: 0;

    background: transparent;
    color: var(--muted2);

    display: grid;
    justify-items: center;

    gap: 2px;

    font-size: 8px;
  }

  .mobile-nav-button span:first-child {
    font-size: 17px;
  }

  .mobile-nav-button.active {
    color: var(--text);
  }


  .mobile-more {
    position: fixed;
    inset: 0;

    z-index: 80;

    display: flex;
    align-items: flex-end;

    background:
      rgba(0,0,0,.58);
  }

  .mobile-more-sheet {
    width: 100%;

    padding:
      18px
      14px
      calc(20px + var(--safe-bottom));

    border-top:
      1px solid var(--line);

    border-radius:
      20px
      20px
      0
      0;

    background: #101720;
  }

  .mobile-more-title {
    margin-bottom: 13px;

    font-size: 13px;
    font-weight: 760;
  }

  .mobile-more-grid {
    display: grid;

    grid-template-columns:
      repeat(3,1fr);

    gap: 8px;
  }

  .mobile-more-grid button {
    min-height: 67px;

    display: grid;
    place-items: center;

    gap: 3px;

    border: 1px solid var(--line);
    border-radius: 12px;

    background: var(--panel2);
    color: var(--text);

    font-size: 16px;
  }

  .mobile-more-grid button span {
    color: var(--muted);

    font-size: 8px;
  }

  .detail-drawer {
    width: 100%;
  }
}

/* =========================================================
   ADMIN 1.1B – WRITE ACTIONS
   ========================================================= */

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.action-button {
  padding: 8px 10px;

  border: 1px solid var(--line);
  border-radius: 10px;

  background: rgba(255,255,255,.025);
  color: var(--text);

  font-size: 9px;
  font-weight: 700;
}

.action-button:hover {
  background: rgba(255,255,255,.055);
}

.action-button.primary-soft {
  color: var(--green);
  border-color: rgba(66,214,138,.22);
}

.action-button.warning-soft {
  color: var(--yellow);
  border-color: rgba(242,194,80,.22);
}

.action-button.danger {
  color: var(--red);
  border-color: rgba(255,111,112,.25);
  background: rgba(255,111,112,.035);
}

.action-divider {
  margin: 14px 0 10px;

  border-top: 1px solid var(--line);
}

.action-modal-backdrop {
  position: fixed;
  inset: 0;

  z-index: 200;

  display: grid;
  place-items: center;

  padding: 18px;

  background: rgba(0,0,0,.68);

  backdrop-filter: blur(4px);
}

.action-modal {
  width: min(100%, 520px);

  max-height: calc(100vh - 36px);

  overflow-y: auto;

  padding: 19px;

  border: 1px solid var(--line);
  border-radius: 19px;

  background: #101720;

  box-shadow:
    0 30px 100px rgba(0,0,0,.5);
}

.action-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 12px;
}

.action-modal-title {
  margin: 2px 0 0;

  font-size: 19px;
  letter-spacing: -.03em;
}

.action-modal-description {
  margin-top: 14px;

  color: var(--muted);

  font-size: 11px;
  line-height: 1.55;
}

.action-modal-fields {
  margin-top: 14px;
}

.action-stepup {
  margin-top: 17px;

  padding: 14px;

  border: 1px solid rgba(242,194,80,.18);
  border-radius: 13px;

  background: rgba(242,194,80,.035);
}

.stepup-title {
  color: var(--yellow);

  font-size: 11px;
  font-weight: 800;
}

.stepup-info {
  margin-top: 4px;

  color: var(--muted);

  font-size: 10px;
  line-height: 1.45;
}

.action-modal-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 8px;

  margin-top: 18px;
}

.action-modal-buttons .primary-button {
  margin-top: 0;
}

.secondary-button {
  padding: 13px 14px;

  border: 1px solid var(--line);
  border-radius: 13px;

  background: var(--panel);
  color: var(--text);

  font-weight: 750;
}

.action-confirm.danger {
  background: var(--red);
  color: #180606;
}

.form-help {
  margin-top: 4px;

  color: var(--muted2);

  font-size: 9px;
  line-height: 1.4;
}

.action-success {
  margin-top: 10px;

  padding: 10px 11px;

  border-radius: 11px;

  background: rgba(66,214,138,.07);
  color: var(--green);

  font-size: 10px;
}

.action-warning-box {
  padding: 10px;

  border-radius: 11px;

  background: rgba(242,194,80,.055);

  color: var(--yellow);

  font-size: 10px;
  line-height: 1.45;
}

@media (max-width: 760px) {

  .action-modal-backdrop {
    align-items: flex-end;

    padding:
      12px
      10px
      calc(10px + var(--safe-bottom));
  }

  .action-modal {
    width: 100%;

    max-height: 88vh;

    border-radius:
      19px
      19px
      12px
      12px;
  }
}

/* =========================================================
   ADMIN 1.1C
   ========================================================= */

.compact-actions {
  margin-top: 0;
  justify-content: flex-end;
}

.panel-heading > .compact-actions {
  flex: 0 0 auto;
}

#system-maintenance-panel {
  border-color:
    rgba(242,194,80,.13);
}

#system-maintenance-panel
.panel-subtitle {
  color:
    rgba(242,194,80,.72);
}

#test-admin-panel {
  margin-bottom: 12px;
}

@media (max-width: 760px) {

  .panel-heading {
    align-items: flex-start;
  }

  .panel-heading
  > .compact-actions {
    max-width: 58%;

    justify-content:
      flex-end;
  }

  .compact-actions
  .action-button {
    padding:
      7px 8px;

    font-size: 8px;
  }
}

/* =========================================================
   ADMIN 1.2 – FILE TRANSFER
   ========================================================= */

.ota-publish-panel {
  border-color:
    rgba(255,111,112,.14);
}

.ota-publish-grid {
  display: grid;

  grid-template-columns:
    repeat(2,minmax(0,1fr));

  gap: 12px;

  margin-top: 5px;
}

.ota-file-box {
  display: grid;

  gap: 5px;

  padding: 14px;

  border: 1px dashed rgba(255,255,255,.13);
  border-radius: 13px;

  background:
    rgba(255,255,255,.018);
}

.ota-file-box:hover {
  border-color:
    rgba(66,214,138,.34);
}

.ota-file-title {
  font-size: 11px;
  font-weight: 780;
}

.ota-file-help {
  color: var(--muted2);

  font-size: 9px;
}

.ota-file-box input[type="file"] {
  max-width: 100%;

  color: var(--muted);

  font-size: 10px;
}

.ota-file-meta {
  min-height: 18px;

  margin-top: 3px;

  color: var(--muted2);

  font-size: 9px;

  line-height: 1.45;

  word-break: break-all;
}

.ota-publish-progress {
  margin-top: 13px;

  min-height: 18px;

  color: var(--muted);

  font-size: 10px;

  line-height: 1.5;
}

.ota-publish-progress.ok {
  color: var(--green);
}

.ota-publish-progress.warning {
  color: var(--yellow);
}

.ota-publish-progress.error {
  color: var(--red);
}

.db-download-button {
  margin-left: 10px;
}


@media (max-width:760px) {

  .ota-publish-grid {
    grid-template-columns: 1fr;
  }

  .ota-file-box {
    padding: 12px;
  }
}


/* SMARTANDRELAX ADMIN 1.5 */

.system-logs-panel {
  margin-top: 18px;
}

.system-log-card {
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 16px;
}

.system-log-tools {
  display: grid;
  grid-template-columns:
    minmax(150px, 1fr)
    minmax(110px, .55fr)
    auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.system-log-button-wrap {
  display: flex;
  align-items: end;
  min-height: 42px;
}

.system-log-meta {
  margin-top: 14px;
  font-size: .86rem;
  opacity: .72;
}

.system-log-output {
  box-sizing: border-box;
  width: 100%;
  max-height: 480px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 15px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .22);
  background: #0b1220;
  color: #dbeafe;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: .78rem;
  line-height: 1.48;
}

.test-monitor-manual {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}

.owner-preview-card {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 14px;
}

.owner-preview-title {
  margin-bottom: 12px;
  font-size: .9rem;
  font-weight: 750;
}

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

.owner-preview-item {
  min-width: 0;
  padding: 11px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, .18);
}

.owner-preview-item span,
.owner-preview-item small {
  display: block;
  opacity: .7;
}

.owner-preview-item span {
  margin-bottom: 4px;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.owner-preview-item b {
  display: block;
  overflow-wrap: anywhere;
}

.owner-preview-item small {
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.owner-preview-warning,
.owner-preview-ok {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: .86rem;
  line-height: 1.45;
}

.owner-preview-warning {
  background: rgba(245, 158, 11, .12);
  border: 1px solid rgba(245, 158, 11, .28);
}

.owner-preview-ok {
  background: rgba(34, 197, 94, .10);
  border: 1px solid rgba(34, 197, 94, .24);
}


@media (max-width: 720px) {

  .system-log-tools {
    grid-template-columns: 1fr 1fr;
  }

  .system-log-button-wrap {
    grid-column: 1 / -1;
  }

  .system-log-button-wrap .action-button {
    width: 100%;
  }

  .system-log-output {
    max-height: 58vh;
    font-size: .72rem;
  }

  .owner-preview-grid {
    grid-template-columns: 1fr;
  }
}
