html, body { height: 100%; }
body { font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.login-page {
  background: radial-gradient(circle at top right, #183b70, transparent 35%), linear-gradient(135deg, #0b1220, #101828 55%, #121d36);
}
.login-card {
  width: 100%; max-width: 480px; background: rgba(16,24,40,.88); border: 1px solid rgba(255,255,255,.08); border-radius: 24px; padding: 2rem;
}
.portal-badge {
  width: 64px; height: 64px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#4f46e5,#06b6d4); color: #fff; font-weight: 700; font-size: 1.2rem;
}
.app-body { background: #0b1220; color: #d0d5dd; }
.glass-nav { background: rgba(11,18,32,.88); backdrop-filter: blur(12px); }
.sidebar-card, .content-card, .panel-box {
  background: linear-gradient(180deg, rgba(20,29,48,.95), rgba(15,23,42,.95));
  border: 1px solid rgba(255,255,255,.08); border-radius: 22px;
}
.sticky-sidebar { position: sticky; top: 90px; }
.btn-section {
  background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.06); color: #d0d5dd; border-radius: 14px;
}
.btn-section:hover, .btn-section.active { background: linear-gradient(135deg, rgba(79,70,229,.35), rgba(6,182,212,.25)); color: #fff; border-color: rgba(99,102,241,.55); }
.search-wrap { position: relative; min-width: 290px; }
.search-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #98a2b3; }
.search-wrap input { background: #101828; border-color: rgba(255,255,255,.08); color: #fff; padding-left: 40px; border-radius: 14px; }
.json-card {
  background: linear-gradient(180deg, rgba(17,24,39,.96), rgba(13,18,28,.96));
  border: 1px solid rgba(255,255,255,.07); border-radius: 18px; margin-bottom: 16px; overflow: hidden;
}
.json-card .card-header {
  background: rgba(255,255,255,.02); border-bottom: 1px solid rgba(255,255,255,.06);
}
.json-key { color: #fff; font-weight: 600; }
.json-meta { color: #98a2b3; font-size: .82rem; }
.json-value-scalar {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; padding: 12px 14px; color: #d0d5dd; word-break: break-word;
}
.node-actions .btn { border-radius: 12px; }
.app-modal { background: #101828; border: 1px solid rgba(255,255,255,.08); border-radius: 22px; }
.form-control, .form-select, textarea {
  background: #0b1220; border-color: rgba(255,255,255,.08); color: #fff;
}
.form-control:focus, .form-select:focus, textarea:focus { background: #0b1220; color: #fff; border-color: #4f46e5; box-shadow: 0 0 0 .25rem rgba(79,70,229,.2); }
.code-area { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.flash-wrap { border-radius: 16px; }
.report-body { background: #0b1220; }
.report-toolbar { background: rgba(11,18,32,.95); border-bottom: 1px solid rgba(255,255,255,.08); position: sticky; top: 0; z-index: 1000; }
.report-page { background: #111827; }
.report-sheet {
  max-width: 1080px; background: #fff; color: #111827; border-radius: 18px; padding: 2rem 2.25rem; box-shadow: 0 24px 70px rgba(0,0,0,.35);
}
.report-heading.depth-0 { font-size: 1.65rem; margin-top: 1.75rem; margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 2px solid #e5e7eb; }
.report-heading.depth-1 { font-size: 1.25rem; margin-top: 1.35rem; margin-bottom: .8rem; }
.report-heading.depth-2 { font-size: 1.06rem; margin-top: 1rem; margin-bottom: .5rem; }
.report-field { margin-bottom: .75rem; }
.report-label { font-weight: 700; color: #111827; margin-bottom: .2rem; }
.report-value { color: #374151; line-height: 1.6; white-space: pre-wrap; }
.report-list { margin-bottom: 1rem; }
.report-list li { margin-bottom: .4rem; color: #374151; }
@media print {
  .no-print { display: none !important; }
  .report-body, .report-page { background: #fff !important; }
  .report-sheet { box-shadow: none; border-radius: 0; padding: 0; max-width: none; }
}
.hidden-search { display: none !important; }


.data-manager-section .section-title { text-transform: none; }
.data-table { --bs-table-bg: transparent; --bs-table-color: #e5e7eb; margin-bottom: 0; }
.data-table thead th { background: rgba(255,255,255,.04); color: #cbd5e1; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid rgba(255,255,255,.08); padding: 14px 16px; }
.data-table td { background: transparent; border-color: rgba(255,255,255,.06); padding: 14px 16px; vertical-align: top; }
.data-table > tbody > tr:hover > td { background: rgba(255,255,255,.02); }
.label-col { width: 22%; min-width: 220px; }
.value-col { width: 53%; }
.action-col { width: 25%; min-width: 240px; }
.label-main { color: #fff; font-weight: 600; line-height: 1.4; word-break: break-word; }
.value-summary { color: #98a2b3; font-size: .82rem; margin-bottom: .65rem; }
.scalar-block { white-space: pre-wrap; line-height: 1.6; }
.value-null, .value-bool { color: #d0d5dd; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.empty-note, .empty-note-cell { color: #98a2b3; font-style: italic; }
.empty-note-cell { padding: 24px 16px !important; }
.nested-table-wrap { margin-top: .4rem; border: 1px solid rgba(255,255,255,.06); border-radius: 16px; overflow: hidden; }
.nested-data-table thead th { background: rgba(255,255,255,.025); font-size: .72rem; padding: 10px 12px; }
.nested-data-table td { padding: 12px; }
.section-actions .node-actions { justify-content: flex-end; }
.node-actions .btn { white-space: nowrap; }
@media (max-width: 1199.98px) { .sticky-sidebar { position: static; top: auto; } }
@media (max-width: 991.98px) { .label-col, .value-col, .action-col { width: auto; min-width: 0; } .action-col { min-width: 180px; } }


.portal-layout { align-items: flex-start; }
.sidebar-toggle-btn { border-radius: 14px; }
.sidebar-column, .content-column { transition: width .25s ease, opacity .25s ease; }
.section-nav { min-width: 0; }
.btn-section {
  display: block;
  width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}
.section-title-wrap { min-width: 0; flex: 1 1 auto; }
.section-title {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.data-manager-section .content-card { overflow: hidden; }
.data-table {
  --bs-table-bg: transparent;
  --bs-table-color: #e5e7eb;
  margin-bottom: 0;
  width: 100%;
  table-layout: fixed;
}
.data-table thead { display: none; }
.data-table td {
  background: transparent;
  border-color: rgba(255,255,255,.06);
  padding: 14px 12px;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.data-table > tbody > tr:hover > td { background: rgba(255,255,255,.02); }
.data-table tbody tr:first-child td { border-top: 0; }
.label-col { width: 22%; min-width: 0; }
.value-col { width: 58%; min-width: 0; }
.action-col { width: 20%; min-width: 0; }
.scalar-block, .value-col, .value-col * {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.nested-table-wrap {
  margin-top: .4rem;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  overflow: hidden;
}
.nested-data-table td { padding: 12px; }
.node-actions { justify-content: flex-start !important; }
.node-actions .btn {
  white-space: normal;
  line-height: 1.2;
}
@media (min-width: 1200px) {
  body.sidebar-collapsed .sidebar-column {
    width: 92px;
    flex: 0 0 auto;
  }
  body.sidebar-collapsed .content-column {
    width: calc(100% - 92px);
    flex: 0 0 auto;
  }
  body.sidebar-collapsed .sidebar-card {
    padding-left: .85rem !important;
    padding-right: .85rem !important;
  }
  body.sidebar-collapsed .sidebar-card .small,
  body.sidebar-collapsed .sidebar-card hr,
  body.sidebar-collapsed .sidebar-card .btn-outline-light.text-start,
  body.sidebar-collapsed .sidebar-card .btn-outline-warning.text-start {
    display: none !important;
  }
  body.sidebar-collapsed .btn-section {
    padding-left: .55rem;
    padding-right: .55rem;
    text-align: center !important;
    font-size: .72rem;
  }
  body.sidebar-collapsed .btn-section.active {
    box-shadow: 0 0 0 1px rgba(99,102,241,.4) inset;
  }
}
@media (max-width: 1199.98px) {
  .sidebar-column, .content-column { width: 100%; }
}
@media (max-width: 991.98px) {
  .data-table, .data-table tbody, .data-table tr, .data-table td,
  .nested-data-table, .nested-data-table tbody, .nested-data-table tr, .nested-data-table td {
    display: block;
    width: 100%;
  }
  .data-table tr, .nested-data-table tr {
    border-top: 1px solid rgba(255,255,255,.06);
  }
  .action-col { padding-top: 0; }
}
