@import "gnexus-ui-kit/dist/css/kit.css";
@import "prismjs/themes/prism.css";
@import "./prism-theme.css";

:root {
  color-scheme: dark;
  font-family: "IBM Plex Mono", "Courier New", monospace;
  background: #07080b;
  color: #f4f4f5;
  --color-bg: #07080b;
  --color-panel: #11131a;
  --color-panel-strong: #171a24;
  --color-text: #f4f4f5;
  --color-muted: #9ca3af;
  --color-primary: #12b7f5;
  --color-accent: #00f5a0;
  --color-warning: #ffe500;
  --color-danger: #ff3d00;
  --border: 1px solid #f4f4f5;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Mobile native app: prevent pull-to-refresh and overscroll glow */
html,
body {
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 0%, rgba(18, 183, 245, 0.12), transparent 30%),
    var(--color-bg);
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.page {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 36px 14px;
}

.page .page-header {
  margin-bottom: 24px;
  animation: none;
}

.page .page-header::after,
.page .page-header:hover::after {
  display: none;
}

.area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.area-grid .card {
  width: 100%;
  height: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
}

.area-grid .card .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.area-grid .card .card-footer {
  margin-top: auto;
}

.area-grid .card-content p,
.area-grid .card-content .text {
  margin-bottom: 0;
}

.area-tree,
.area-tree-children {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.area-tree-children {
  margin-top: 12px;
  padding-left: 28px;
}

.area-tree-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: var(--border);
  background: var(--color-panel);
  cursor: pointer;
}

.area-tree-card:hover {
  background: var(--color-panel-strong);
}

.tree-toggle {
  width: 36px;
  height: 36px;
  border: 2px solid currentColor;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.tree-toggle:disabled {
  cursor: default;
}

.area-tree-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.area-tree-info p,
.area-tree-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}


.devices-panel {
  display: grid;
  gap: 16px;
}

.devices-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* User card inside navigation drawer footer — remove border and padding */
.nav-drawer-footer .card.user-card-compact {
  border: 0;
  width: 100%;
}

.nav-drawer-footer .card.user-card-compact .user-card-body {
  padding: 0;
}

/* Toast backgrounds — override translucent kit defaults for readability */
.toast.toast-info,
.toast.toast-success,
.toast.toast-warning,
.toast.toast-danger {
  background: var(--color-panel-strong);
}

@media (max-width: 720px) {
  .area-tree-card {
    grid-template-columns: 1fr;
  }

  .area-tree-children {
    padding-left: 14px;
  }
}
