:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-soft: #f1f4ef;
  --ink: #1f2528;
  --muted: #687076;
  --line: #dfe4dc;
  --nav: #26302f;
  --nav-2: #32403e;
  --teal: #0f9f8f;
  --teal-dark: #0b776e;
  --amber: #b98216;
  --rose: #c6534c;
  --indigo: #5a6acf;
  --green: #24845b;
  --shadow: 0 10px 26px rgba(31, 37, 40, 0.09);
  --radius: 8px;
  --header: 68px;
  --sidebar: 284px;
  --sidebar-mini: 84px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(15, 159, 143, 0.12), rgba(185, 130, 22, 0.08)),
    var(--bg);
}

.auth-panel {
  width: min(100%, 440px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.brand-mark,
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.brand-symbol {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--teal);
  color: #fff;
  flex: 0 0 auto;
}

.brand-mark strong,
.sidebar-brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
}

.brand-mark small,
.sidebar-brand small {
  color: var(--muted);
  font-size: 12px;
}

.auth-form {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.auth-form h1 {
  margin: 0 0 4px;
  font-size: 24px;
  letter-spacing: 0;
}

.auth-form p {
  margin: 0;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 6px;
}

.field span,
.form-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.field input,
.field select,
.field textarea,
.form-control,
.form-select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: none;
  padding: 9px 11px;
  transition: border 140ms ease, box-shadow 140ms ease;
}

.field textarea,
textarea.form-control {
  min-height: 98px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.form-control:focus,
.form-select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 159, 143, 0.16);
}

.auth-message {
  min-height: 20px;
  color: var(--rose);
  font-size: 13px;
}

.btn,
.icon-btn,
.user-chip {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.btn {
  padding: 8px 13px;
  font-weight: 700;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.btn-primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.btn-ghost,
.icon-btn,
.user-chip {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover,
.icon-btn:hover,
.user-chip:hover {
  background: var(--surface-soft);
}

.btn-danger {
  background: var(--rose);
  border-color: var(--rose);
  color: #fff;
}

.icon-btn {
  width: 38px;
  padding: 0;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  background: var(--nav);
  color: #eef3ef;
  z-index: 40;
}

.sidebar-brand {
  height: var(--header);
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.sidebar-brand .brand-symbol {
  width: 38px;
  height: 38px;
}

.sidebar-brand small {
  color: rgba(255, 255, 255, 0.58);
}

.sidebar-nav {
  padding: 14px 12px;
  overflow: auto;
  flex: 1;
}

.nav-group {
  margin-bottom: 14px;
}

.nav-group-title {
  padding: 8px 10px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.nav-link {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  padding: 9px 10px;
  text-align: left;
}

.nav-link i {
  width: 20px;
  text-align: center;
}

.nav-link:hover,
.nav-link.active {
  background: var(--nav-2);
  color: #fff;
}

.nav-link.active {
  box-shadow: inset 3px 0 0 var(--teal);
}

.sidebar-foot {
  padding: 13px 18px;
  color: rgba(255, 255, 255, 0.46);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar);
  height: var(--header);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

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

.topbar h2,
.dialog-head h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: 0;
}

.topbar-search {
  width: min(36vw, 390px);
  position: relative;
  flex: 0 1 390px;
}

.topbar-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.topbar-search input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px 0 36px;
  outline: none;
}

.workspace {
  margin-left: var(--sidebar);
  padding: calc(var(--header) + 22px) 22px 28px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-head h1 {
  margin: 0 0 4px;
  font-size: 24px;
  letter-spacing: 0;
}

.page-head p {
  margin: 0;
  color: var(--muted);
}

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

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-card,
.panel,
.table-panel,
.empty-state {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(31, 37, 40, 0.02);
}

.metric-card {
  padding: 16px;
  display: grid;
  gap: 10px;
  min-height: 128px;
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: #fff;
  background: var(--teal);
}

.metric-icon.amber {
  background: var(--amber);
}

.metric-icon.rose {
  background: var(--rose);
}

.metric-icon.indigo {
  background: var(--indigo);
}

.metric-value {
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.metric-label {
  color: var(--muted);
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
  gap: 14px;
}

.panel {
  padding: 16px;
}

.panel-head,
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-head h3,
.table-toolbar h3 {
  margin: 0;
  font-size: 16px;
}

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

.quick-link {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  color: var(--ink);
  text-align: left;
}

.quick-link i {
  color: var(--teal);
}

.quick-link strong,
.quick-link small {
  display: block;
  min-width: 0;
}

.quick-link small {
  color: var(--muted);
}

.table-panel {
  overflow: visible;
}

.table-toolbar {
  padding: 16px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.filters.filters-two-rows {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  align-items: start;
}

.filters.filters-two-rows .filter-control {
  min-width: 0;
  width: 100%;
}

.filter-control {
  min-width: 180px;
  flex: 1 1 180px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

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

.data-table th {
  color: var(--muted);
  background: #fbfcfa;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: nowrap;
}

.data-table td {
  color: #303639;
}

.data-table tr:hover td {
  background: #fbfcfa;
}

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

.cell-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 132px;
}

.status,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status.ok {
  background: #e8f5ef;
  color: var(--green);
}

.status.off {
  background: #f1f2f0;
  color: #6c7378;
}

.status.warn {
  background: #fff4db;
  color: var(--amber);
}

.status.danger {
  background: #ffe8e5;
  color: var(--rose);
}

.status.info,
.tag {
  background: #e9ecff;
  color: var(--indigo);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
}

.pager-actions {
  display: flex;
  gap: 6px;
}

.empty-state {
  padding: 42px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-state i {
  display: block;
  color: var(--teal);
  font-size: 28px;
  margin-bottom: 10px;
}

.record-dialog {
  width: min(940px, calc(100vw - 28px));
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow);
}

.detail-dialog {
  width: min(1160px, calc(100vw - 28px));
}

.record-dialog::backdrop {
  background: rgba(31, 37, 40, 0.42);
}

.dialog-shell {
  position: relative;
  background: var(--surface);
  max-height: min(84vh, 840px);
  display: flex;
  flex-direction: column;
}

.dialog-head,
.dialog-actions {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.dialog-actions {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
}

.dialog-body {
  padding: 16px;
  overflow: auto;
}

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

.record-form .field,
.record-form .lookup-field,
.record-form .check-field,
.record-form .phone-list-field {
  grid-column: span 3;
}

.record-form .wide {
  grid-column: 1 / -1;
}

.form-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.form-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.required-mark {
  color: var(--rose);
  font-weight: 900;
}

.form-error-summary {
  border: 1px solid rgba(239, 68, 68, 0.32);
  border-radius: var(--radius-sm);
  background: #fff5f5;
  color: #991b1b;
  padding: 12px 14px;
  font-size: 13px;
}

.form-error-summary strong {
  display: block;
  margin-bottom: 6px;
}

.form-error-summary ul {
  margin: 0;
  padding-left: 18px;
}

.form-error-summary li + li {
  margin-top: 3px;
}

.field-error {
  min-height: 16px;
  color: var(--rose);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.field.has-error .field-label,
.check-field.has-error .field-label {
  color: var(--rose);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea,
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.lookup-field {
  position: relative;
}

.lookup-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
}

.lookup-clear {
  min-height: 40px;
  width: 42px;
}

.lookup-results {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(17, 24, 39, 0.16);
}

.lookup-results.is-hidden {
  display: none;
}

.lookup-option,
.lookup-empty {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  text-align: left;
}

.lookup-option {
  cursor: pointer;
  font-weight: 700;
}

.lookup-option:hover,
.lookup-option.active {
  background: var(--surface-soft);
}

.lookup-option:last-child {
  border-bottom: 0;
}

.lookup-empty {
  color: var(--muted);
  font-weight: 700;
}

.check-field {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 20px;
}

.check-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

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

.detail-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface-soft);
}

.detail-item strong {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 3px;
}

.related-stack {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.related-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.related-head h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.related-head small {
  color: var(--muted);
  font-weight: 700;
}

.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.related-table {
  min-width: 680px;
}

.related-table th,
.related-table td {
  padding: 11px 14px;
}

.toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 8px;
  z-index: 90;
  pointer-events: none;
}

.toast-stack-dialog {
  position: absolute;
  right: 28px;
  bottom: 84px;
  z-index: 30;
}

.detail-dialog .toast-stack-dialog {
  bottom: 18px;
}

.toast {
  width: min(360px, calc(100vw - 32px));
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.loading-row {
  height: 52px;
  background: linear-gradient(90deg, #f4f6f3, #e9eee8, #f4f6f3);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.mobile-only {
  display: none;
}

@media (max-width: 1180px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .mobile-only {
    display: inline-flex;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop.show {
    display: block;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(31, 37, 40, 0.45);
    z-index: 35;
  }

  .topbar {
    left: 0;
  }

  .workspace {
    margin-left: 0;
  }

  .topbar-search {
    display: none;
  }
}

@media (max-width: 680px) {
  .topbar {
    padding: 0 12px;
  }

  .workspace {
    padding: calc(var(--header) + 14px) 12px 18px;
  }

  .page-head,
  .table-toolbar,
  .panel-head,
  .pager {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics-grid,
  .quick-grid,
  .module-help-panel,
  .record-form,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .record-form .field,
  .record-form .lookup-field,
  .record-form .check-field,
  .record-form .phone-list-field,
  .record-form .field.third,
  .record-form .lookup-field.third,
  .record-form .check-field.third {
    grid-column: 1 / -1;
  }

  .topbar-actions .user-chip span:not(.avatar) {
    display: none;
  }
}

/* Dedalo UI Kit refresh */
:root {
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Space Grotesk", "Inter", system-ui, sans-serif;
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-deep: #111111;
  --ink: #141414;
  --text: #141414;
  --muted: #667085;
  --line: #e4e7ec;
  --border: #e4e7ec;
  --nav: #111111;
  --nav-2: rgba(255, 255, 255, 0.1);
  --primary: #f4bd22;
  --primary-dark: #111111;
  --primary-soft: #fff4d2;
  --teal: #f4bd22;
  --teal-dark: #d6a118;
  --amber: #f59e0b;
  --rose: #ef4444;
  --indigo: #0284c7;
  --green: #16a34a;
  --shadow: 0 18px 45px rgba(16, 24, 40, 0.08);
  --shadow-sm: 0 8px 24px rgba(16, 24, 40, 0.06);
  --radius: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --header: 76px;
  --sidebar: 292px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.auth-screen {
  background: var(--bg);
}

.auth-panel,
.metric-card,
.panel,
.table-panel,
.record-dialog,
.empty-state {
  border-color: rgba(228, 231, 236, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.auth-panel {
  width: min(100%, 460px);
  overflow: hidden;
}

.brand-mark {
  padding: 24px;
  background: #fff;
}

.brand-symbol {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), #ffdc72);
  color: #111111;
  box-shadow: 0 10px 30px rgba(244, 189, 34, 0.26);
}

.brand-mark strong,
.sidebar-brand strong,
.auth-form h1,
.page-head h1,
.metric-value,
.panel-head h3,
.table-toolbar h3,
.dialog-head h3 {
  font-family: var(--font-heading);
  letter-spacing: 0;
}

.auth-form h1 {
  font-size: 28px;
}

.auth-form p,
.page-head p,
.quick-link small,
.metric-label,
.cell-muted {
  color: var(--muted);
}

.field span,
.form-label,
.eyebrow,
.nav-group-title {
  letter-spacing: 0;
}

.field input,
.field select,
.field textarea,
.form-control,
.form-select,
.topbar-search input {
  border-color: var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.form-control:focus,
.form-select:focus,
.topbar-search input:focus {
  border-color: rgba(244, 189, 34, 0.86);
  box-shadow: 0 0 0 4px rgba(244, 189, 34, 0.14);
}

.code-input {
  min-height: 180px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
}

.json-preview {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.5;
}

.btn,
.icon-btn,
.user-chip {
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.icon-btn:hover,
.user-chip:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #111111;
  background: linear-gradient(135deg, var(--primary), #ffd86a);
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(244, 189, 34, 0.28);
}

.btn-primary:hover {
  color: #111111;
  background: linear-gradient(135deg, #f7c944, #ffe08a);
  border-color: transparent;
}

.btn-ghost,
.icon-btn,
.user-chip {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover,
.icon-btn:hover,
.user-chip:hover {
  background: var(--surface-soft);
}

.btn-danger {
  background: var(--rose);
  border-color: var(--rose);
}

.icon-btn {
  width: 42px;
  min-height: 42px;
  border-radius: 14px;
}

.sidebar {
  width: var(--sidebar);
  padding: 24px 18px;
  gap: 22px;
  background: rgba(17, 17, 17, 0.97);
}

.sidebar-brand {
  height: auto;
  padding: 10px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.sidebar-brand .brand-symbol {
  width: 46px;
  height: 46px;
}

.sidebar-brand small {
  color: rgba(255, 255, 255, 0.62);
}

.sidebar-nav {
  padding: 0;
  display: grid;
  gap: 6px;
  align-content: start;
  grid-auto-rows: max-content;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 6px;
  margin-right: -8px;
  scrollbar-color: rgba(244, 189, 34, 0.76) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
}

.sidebar-nav::-webkit-scrollbar {
  width: 8px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(244, 189, 34, 0.95), rgba(255, 220, 114, 0.72));
  border: 2px solid rgba(17, 17, 17, 0.96);
  border-radius: 999px;
}

.sidebar-nav::-webkit-scrollbar-button {
  width: 0;
  height: 0;
  display: none;
}

.nav-group {
  margin-bottom: 8px;
  min-height: 0;
}

.nav-group:not(.nav-group-static) {
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 16px;
}

.nav-group:not(.nav-group-static):hover,
.nav-group.has-active {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.nav-group-title {
  padding: 8px 14px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 800;
}

.nav-group-toggle {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.82);
  padding: 9px 12px 9px 14px;
  font-size: 11px;
  font-weight: 850;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.nav-group-toggle:hover,
.nav-group.has-active .nav-group-toggle {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.085);
}

.nav-group-toggle span {
  flex: 1;
}

.nav-group-toggle small {
  min-width: 24px;
  min-height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
}

.nav-group.has-active .nav-group-toggle small {
  background: var(--primary);
  color: #111111;
}

.nav-group-toggle i {
  width: 18px;
  text-align: center;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.58);
  transition: transform 0.18s ease;
}

.nav-group-items {
  position: relative;
  display: grid;
  gap: 4px;
  max-height: 720px;
  margin-top: 7px;
  margin-left: 8px;
  padding-left: 12px;
  overflow: hidden;
  opacity: 1;
  transition: max-height 0.22s ease, opacity 0.18s ease, margin 0.18s ease;
}

.nav-group-items::before {
  content: "";
  position: absolute;
  inset: 5px auto 8px 0;
  width: 1px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
}

.nav-group.collapsed .nav-group-items {
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  pointer-events: none;
}

.nav-group.collapsed .nav-group-toggle i {
  transform: rotate(-90deg);
}

.nav-link {
  min-height: 40px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 650;
  padding: 9px 12px;
}

.nav-group:not(.nav-group-static) .nav-link {
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
}

.nav-group:not(.nav-group-static) .nav-link i {
  color: rgba(255, 255, 255, 0.46);
  font-size: 13px;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
  box-shadow: inset 3px 0 0 var(--primary);
}

.nav-group:not(.nav-group-static) .nav-link.active {
  background: rgba(244, 189, 34, 0.14);
}

.nav-group:not(.nav-group-static) .nav-link.active i {
  color: var(--primary);
}

/* Softer inline lookup buttons */
.lookup-control,
.record-form .lookup-control {
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 7px;
}

.lookup-clear,
.record-form .lookup-clear {
  width: 38px;
  min-height: 38px;
  height: 38px;
  border: 1px solid #d8dee6;
  border-radius: 999px;
  background: #fbfcfe;
  color: #344054;
  box-shadow: 0 3px 10px rgba(17, 24, 39, 0.06);
}

.lookup-clear i,
.record-form .lookup-clear i {
  font-size: 12px;
}

.lookup-clear:hover,
.record-form .lookup-clear:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #111827;
  box-shadow: 0 8px 18px rgba(244, 189, 34, 0.26);
  transform: translateY(-1px);
}

.lookup-clear:focus-visible,
.record-form .lookup-clear:focus-visible {
  outline: none;
  border-color: rgba(244, 189, 34, 0.9);
  box-shadow: 0 0 0 4px rgba(244, 189, 34, 0.14);
}

.record-form .lookup-field .form-control,
.record-form .lookup-field .lookup-search {
  min-height: 46px;
}

.sidebar-foot {
  margin-top: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.055));
  color: rgba(255, 255, 255, 0.66);
}

.topbar {
  top: 16px;
  right: 24px;
  left: calc(var(--sidebar) + 24px);
  height: auto;
  min-height: 72px;
  padding: 14px 18px;
  border: 1px solid rgba(228, 231, 236, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.topbar-left,
.topbar-actions {
  gap: 12px;
}

.topbar h2 {
  font-size: 20px;
}

.topbar-search {
  height: 44px;
  width: min(36vw, 390px);
}

.topbar-search input {
  height: 44px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: #9a6f00;
  font-weight: 800;
}

.workspace {
  margin-left: var(--sidebar);
  padding: 116px 24px 32px;
}

.page-head {
  align-items: flex-end;
  margin-bottom: 20px;
}

.page-head h1 {
  font-size: clamp(26px, 3vw, 34px);
}

.module-help-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: -4px 0 18px;
}

.module-help-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 15px;
  border: 1px solid rgba(222, 226, 218, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.05);
}

.module-help-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: #fff4d2;
  color: #9a6b00;
}

.module-help-card strong {
  display: block;
  margin-bottom: 4px;
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

.module-help-card p {
  margin: 0;
  color: #5f6875;
  font-size: 13px;
  line-height: 1.45;
}

.dashboard-hero {
  align-items: center;
  padding: 34px;
  border-radius: 32px;
  background: linear-gradient(135deg, #111111, #2c2c2c);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.dashboard-hero p {
  color: rgba(255, 255, 255, 0.72);
}

.dashboard-hero .btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.metrics-grid {
  gap: 18px;
}

.metric-card {
  min-height: 144px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.94);
}

.metric-icon {
  width: 52px;
  height: 52px;
  border-radius: 17px;
  color: #9a6f00;
  background: var(--primary-soft);
}

.metric-icon.amber {
  color: #b45309;
  background: #fff7e6;
}

.metric-icon.rose {
  color: var(--rose);
  background: #fff1f2;
}

.metric-icon.indigo {
  color: var(--indigo);
  background: #eef8ff;
}

.metric-value {
  color: var(--text);
}

.dashboard-grid {
  gap: 18px;
}

.panel,
.table-panel {
  background: rgba(255, 255, 255, 0.94);
}

.panel {
  padding: 22px;
}

.quick-grid {
  gap: 12px;
}

.quick-link {
  min-height: 82px;
  border-radius: 18px;
  background: var(--surface-soft);
}

.quick-link i {
  color: #9a6f00;
  background: var(--primary-soft);
  border-radius: 14px;
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.table-panel {
  overflow: visible;
}

.table-toolbar {
  padding: 18px;
}

.filters {
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface-soft);
}

.data-table th,
.data-table td {
  padding: 15px 18px;
  border-color: var(--border);
}

.data-table th {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  letter-spacing: 0;
}

.data-table tr:hover td {
  background: #fbfcff;
}

.stacked-cell {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.stacked-cell strong,
.stacked-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stacked-cell strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.stacked-cell small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.asset-thumb {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
  vertical-align: middle;
}

.asset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-thumb-empty {
  color: var(--muted);
  background: var(--surface-soft);
  box-shadow: none;
}

.asset-thumb-large {
  width: 132px;
  height: 132px;
  border-radius: 18px;
}

.status,
.tag {
  border-radius: 999px;
}

.status.ok {
  color: var(--green);
  background: #ecfdf3;
}

.status.off {
  background: #f2f2f2;
  color: #667085;
}

.status.warn {
  color: #b45309;
  background: #fff7e6;
}

.status.danger {
  color: var(--rose);
  background: #fff1f2;
}

.status.info,
.tag {
  color: var(--indigo);
  background: #eef8ff;
}

.pager {
  padding: 14px 18px;
}

.record-dialog::backdrop {
  background: rgba(17, 17, 17, 0.42);
}

.dialog-shell {
  border-radius: var(--radius);
}

.dialog-head,
.dialog-actions {
  padding: 18px;
  border-color: var(--border);
}

.dialog-body {
  padding: 18px;
}

.record-form {
  gap: 16px;
}

.check-field input {
  accent-color: var(--primary);
}

.record-dialog {
  width: min(1080px, calc(100vw - 32px));
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 26px 80px rgba(17, 24, 39, 0.22);
}

.record-dialog::backdrop {
  background: rgba(17, 24, 39, 0.46);
  backdrop-filter: blur(3px);
}

.record-dialog .dialog-shell {
  max-height: min(88vh, 900px);
  background: #f8faf7;
  border-radius: 22px;
}

.record-dialog .dialog-head {
  position: relative;
  align-items: flex-start;
  padding: 22px 24px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.9)),
    #fff;
  border-bottom: 1px solid rgba(214, 219, 210, 0.82);
}

.record-dialog .dialog-head::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #14a38f, #5a6acf);
}

.record-dialog .dialog-head h3 {
  margin-top: 2px;
  font-size: 24px;
  line-height: 1.15;
}

.record-dialog .dialog-head .eyebrow {
  color: #6b7280;
  font-size: 11px;
  font-weight: 850;
}

.record-dialog .dialog-body {
  padding: 22px 24px 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(248, 250, 247, 0)),
    #f8faf7;
}

.record-dialog .dialog-actions {
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid rgba(214, 219, 210, 0.9);
}

.record-form {
  gap: 12px 18px;
  align-items: start;
}

.record-form .form-note {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 14px;
  border-color: rgba(244, 189, 34, 0.34);
  border-radius: 14px;
  background: #fffaf0;
  color: #725318;
}

.record-form .form-section-title {
  display: grid;
  grid-template-columns: auto minmax(60px, 1fr);
  gap: 4px 10px;
  align-items: center;
  margin: 12px 0 2px;
  padding: 0;
  border: 0;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
}

.record-form .form-section-title::before {
  content: "";
  width: 5px;
  height: 22px;
  border-radius: 999px;
  background: var(--primary);
}

.record-form .form-section-title::after {
  background: rgba(214, 219, 210, 0.86);
}

.record-form .form-section-title span {
  line-height: 1.2;
}

.record-form .form-section-title p {
  grid-column: 1 / -1;
  margin: 4px 0 0 15px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.record-form .field,
.record-form .lookup-field {
  gap: 7px;
}

.record-form .field.compact,
.record-form .check-field.compact {
  width: min(100%, 190px);
  justify-self: start;
}

.record-form .field.third,
.record-form .lookup-field.third,
.record-form .check-field.third {
  grid-column: span 2;
}

.record-form .field.compact input,
.record-form .field.compact select,
.record-form .field.compact textarea {
  text-align: center;
}

.record-form .field-label,
.record-form .field span,
.record-form .form-label {
  color: #374151;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: none;
}

.record-form .field input,
.record-form .field select,
.record-form .field textarea,
.record-form .form-control,
.record-form .form-select {
  min-height: 46px;
  border-color: rgba(196, 204, 194, 0.92);
  border-radius: 13px;
  background: #fff;
  padding: 11px 13px;
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.02);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease, transform 150ms ease;
}

.record-form .field textarea,
.record-form textarea.form-control {
  min-height: 118px;
  line-height: 1.55;
}

.record-form .field input:hover,
.record-form .field select:hover,
.record-form .field textarea:hover,
.record-form .form-control:hover,
.record-form .form-select:hover {
  border-color: rgba(148, 163, 184, 0.9);
}

.record-form .field input:focus,
.record-form .field select:focus,
.record-form .field textarea:focus,
.record-form .form-control:focus,
.record-form .form-select:focus {
  border-color: rgba(244, 189, 34, 0.98);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(244, 189, 34, 0.16), 0 10px 26px rgba(17, 24, 39, 0.05);
}

.record-form .field input::placeholder,
.record-form .field textarea::placeholder,
.record-form .form-control::placeholder {
  color: #9aa3ad;
}

.record-form .check-field {
  display: grid;
  gap: 7px;
  align-items: stretch;
  padding: 0;
  border: 0;
  background: transparent;
  color: #374151;
}

.record-form .check-field-control {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(196, 204, 194, 0.92);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.86);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.record-form .check-label-spacer {
  visibility: hidden;
}

.record-form .check-field:hover .check-field-control {
  border-color: rgba(244, 189, 34, 0.6);
  background: #fff;
}

.record-form .check-field input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}

.record-form .check-field .field-label {
  color: #263238;
}

.record-form .field-error {
  min-height: 15px;
  font-size: 12px;
}

.record-form .field-hint {
  color: #6b7280;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.record-form .file-control {
  padding: 9px 12px;
}

.record-form .file-control::file-selector-button {
  min-height: 30px;
  margin-right: 12px;
  border: 0;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 6px 12px;
}

.record-form .phone-list-field {
  display: grid;
  gap: 10px;
}

.record-form .phone-list-rows {
  display: grid;
  gap: 10px;
}

.record-form .phone-list-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(160px, 1.2fr) 90px 88px 88px minmax(150px, 1fr) 42px;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(196, 204, 194, 0.82);
  border-radius: 15px;
  background: rgba(248, 250, 252, 0.72);
}

.record-form .phone-list-row label {
  display: grid;
  gap: 7px;
}

.record-form .phone-switch {
  justify-items: center;
}

.record-form .switch-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 54px;
  height: 30px;
  cursor: pointer;
}

.record-form .switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.record-form .switch-control span {
  width: 54px;
  height: 30px;
  border: 1px solid rgba(196, 204, 194, 0.92);
  border-radius: 999px;
  background: #e5e7eb;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.record-form .switch-control span::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.22);
  transition: transform 150ms ease;
}

.record-form .switch-control input:checked + span {
  border-color: rgba(244, 189, 34, 0.92);
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(244, 189, 34, 0.14);
}

.record-form .switch-control input:checked + span::before {
  transform: translateX(24px);
}

.record-form .phone-list-row .phone-remove {
  width: 42px;
  min-height: 42px;
  align-self: end;
  border-radius: 13px;
}

.record-form .phone-list-add {
  justify-self: start;
}

.phone-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 2px 4px 2px 0;
  padding: 5px 8px;
  border: 1px solid rgba(196, 204, 194, 0.86);
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.phone-chip.primary {
  border-color: rgba(244, 189, 34, 0.72);
  background: #fff8df;
  color: #5f4307;
}

.phone-chip small {
  color: #6b7280;
  font-weight: 750;
}

.phone-chip .fa-whatsapp {
  color: #16a34a;
}

.contact-detail {
  display: grid;
  gap: 16px;
}

.contact-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.4fr);
  gap: 14px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid rgba(196, 204, 194, 0.78);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #fffaf0 100%);
}

.contact-detail-hero h2 {
  margin: 4px 0;
  font-size: 24px;
  line-height: 1.1;
}

.contact-detail-hero p {
  margin: 0;
  color: #6b7280;
  font-weight: 700;
}

.contact-detail-owner {
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 12px;
  border: 1px solid rgba(244, 189, 34, 0.42);
  border-radius: 15px;
  background: #fff;
}

.contact-detail-owner small {
  color: #6b7280;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.contact-detail-owner strong {
  color: #111827;
  font-size: 15px;
}

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

.permission-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(196, 204, 194, 0.86);
  border-radius: 14px;
  background: #fff;
}

.permission-card i {
  color: #9ca3af;
  font-size: 18px;
}

.permission-card span {
  color: #374151;
  font-size: 13px;
  font-weight: 850;
}

.permission-card.is-on {
  border-color: rgba(34, 197, 94, 0.32);
  background: #f0fdf4;
}

.permission-card.is-on i {
  color: #16a34a;
}

.parque-detail {
  display: grid;
  gap: 16px;
}

.parque-detail-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 0.45fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(217, 224, 216, 0.92);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.parque-detail-title h2 {
  margin: 4px 0 4px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.15;
}

.parque-detail-title h3 {
  margin: 0 0 6px;
  color: #0f766e;
  font-size: 20px;
  line-height: 1.2;
}

.parque-detail-title p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.parque-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.highlight-value {
  color: #111827;
  font-size: 15px;
  font-weight: 900;
}

.parque-detail-section .detail-grid {
  padding: 14px;
}

.detail-person {
  display: grid;
  gap: 3px;
}

.detail-person b {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.detail-person small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.parque-detail-owner {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(217, 224, 216, 0.92);
  border-radius: 16px;
  background: #fff;
}

.parque-detail-owner small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.parque-detail-owner strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
}

.parque-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.parque-gallery-item {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

.parque-gallery-media {
  position: relative;
  overflow: hidden;
  background: var(--surface-soft);
}

.parque-gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface-soft);
}

.gallery-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.92);
  color: var(--rose);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.2);
}

.gallery-delete:hover {
  border-color: rgba(239, 68, 68, 0.35);
  background: #fff1f2;
}

.parque-gallery-item figcaption {
  display: grid;
  gap: 3px;
  padding: 11px 12px 12px;
}

.parque-gallery-item strong,
.parque-gallery-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parque-gallery-item strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.parque-gallery-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.parque-qr-content {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.parque-qr-content img {
  width: 118px;
  height: 118px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 8px;
}

.parque-qr-content strong,
.parque-qr-content p {
  display: block;
  margin: 0;
}

.parque-qr-content strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.parque-qr-content p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.parque-qr-content a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-top: 8px;
  color: var(--indigo);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.parque-qr-content a:hover {
  text-decoration: underline;
}

.parque-photo-manager,
.parque-accessory-manager,
.parque-credential-manager {
  grid-column: 1 / -1;
}

.photo-manager-upload,
.accessory-manager-form,
.credential-manager-form {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(217, 224, 216, 0.92);
  border-radius: 16px;
  background: #f8fafc;
}

.accessory-manager-form,
.credential-manager-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.record-form .accessory-manager-form .field,
.record-form .accessory-manager-form .lookup-field,
.record-form .accessory-manager-form .check-field,
.record-form .credential-manager-form .field,
.record-form .credential-manager-form .lookup-field,
.record-form .credential-manager-form .check-field {
  grid-column: auto;
  min-width: 0;
}

.accessory-manager-form .accessory-wide,
.credential-manager-form .credential-wide {
  grid-column: span 2;
}

.accessory-manager-form .btn,
.credential-manager-form .btn {
  min-height: 46px;
}

.accessory-edit-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(245, 158, 11, 0.36);
  border-radius: 14px;
  background: #fffbeb;
  color: #7c2d12;
  font-size: 13px;
  font-weight: 800;
}

.accessory-edit-notice i {
  color: var(--primary);
}

.parque-accessory-manager.is-editing-accessory .accessory-manager-form {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.photo-manager-upload .btn {
  min-height: 46px;
  white-space: nowrap;
}

.photo-manager-upload .field.wide {
  grid-column: 1 / -1;
}

.file-dropzone-field {
  display: grid;
  gap: 9px;
}

.file-dropzone-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-dropzone {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 82px;
  padding: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.9);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.file-dropzone:hover,
.file-dropzone:focus-visible,
.file-dropzone.is-dragover {
  border-color: rgba(245, 158, 11, 0.9);
  background: #fffbeb;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
  outline: none;
}

.file-dropzone.is-invalid {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.file-dropzone i {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #fff4c2;
  color: #9a6500;
  font-size: 18px;
}

.file-dropzone strong,
.file-dropzone small {
  display: block;
}

.file-dropzone strong {
  font-size: 14px;
  font-weight: 900;
}

.file-dropzone small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.file-dropzone-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.file-dropzone-list.is-empty {
  align-items: center;
}

.file-dropzone-file {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 6px 7px 6px 9px;
  border: 1px solid rgba(217, 224, 216, 0.9);
  border-radius: 999px;
  background: #f8fafc;
  color: #374151;
  font-weight: 800;
}

.file-dropzone-file span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-dropzone-file img,
.file-dropzone-file > i {
  flex: 0 0 auto;
}

.file-dropzone-file img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
}

.file-dropzone-file small {
  color: var(--muted);
  font-weight: 750;
}

.file-dropzone-file button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.08);
  color: #111111;
  cursor: pointer;
}

.icon-btn.is-disabled,
.icon-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.accessory-manager-list {
  display: grid;
  gap: 10px;
}

.accessory-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(217, 224, 216, 0.92);
  border-radius: 15px;
  background: #fff;
}

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

.accessory-item strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.accessory-detail-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.accessory-detail-grid em {
  display: inline-flex;
  gap: 4px;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  font-style: normal;
}

.accessory-detail-grid b {
  color: #374151;
}

.accessory-actions {
  display: inline-flex;
  gap: 8px;
  flex: 0 0 auto;
}

.accessory-empty {
  padding: 13px 14px;
  border: 1px dashed rgba(156, 163, 175, 0.55);
  border-radius: 15px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  background: #fff;
}

.credential-security-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.record-form .lookup-control {
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 8px;
}

.record-form .lookup-clear {
  width: 46px;
  min-height: 46px;
  border-color: rgba(196, 204, 194, 0.9);
  border-radius: 13px;
  background: #fff;
}

.record-form .lookup-results {
  top: calc(100% + 2px);
  margin-top: 0;
  border-color: rgba(196, 204, 194, 0.9);
  border-radius: 15px;
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.13);
}

.record-form .lookup-option,
.record-form .lookup-empty {
  min-height: 44px;
  padding: 11px 13px;
}

.lookup-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
  padding-top: 2px;
}

.lookup-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 32px;
  padding: 6px 8px 6px 11px;
  border: 1px solid rgba(196, 204, 194, 0.95);
  border-radius: 999px;
  background: #fff8df;
  color: #2b2411;
  font-size: 12px;
  font-weight: 800;
}

.lookup-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lookup-chip button {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.08);
  color: #111111;
  cursor: pointer;
}

.lookup-chip-empty {
  color: #7b8491;
  font-size: 12px;
  font-weight: 700;
}

.detail-item {
  border-color: var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
}

.toast {
  border-radius: 16px;
  background: #111111;
}

.dedalo-swal {
  border-radius: 18px;
  color: var(--text);
  font-family: var(--font);
}

.dedalo-swal .swal2-title {
  color: var(--text);
  font-size: 22px;
  letter-spacing: 0;
}

.dedalo-swal .swal2-html-container {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.credential-password-viewer {
  display: grid;
  gap: 12px;
  text-align: left;
}

.credential-password-viewer label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 850;
}

.credential-password-viewer input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.swal-action-btn {
  margin: 0 5px;
}

.loading-row {
  border-radius: 14px;
  background: linear-gradient(90deg, #f8fafc, #edf0f4, #f8fafc);
  background-size: 200% 100%;
}

@media (max-width: 1180px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .parque-detail-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .parque-detail-owner {
    grid-column: 1 / -1;
  }

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

@media (max-width: 920px) {
  .topbar {
    left: 18px;
    right: 18px;
  }

  .workspace {
    margin-left: 0;
    padding: 112px 18px 28px;
  }

  .mobile-only {
    display: inline-flex;
  }

  .topbar-search {
    display: none;
  }
}

@media (max-width: 680px) {
  .topbar {
    top: 10px;
    left: 10px;
    right: 10px;
    border-radius: 18px;
  }

  .workspace {
    padding: 104px 12px 22px;
  }

  .dashboard-hero {
    padding: 24px;
    border-radius: 24px;
  }

  .page-head,
  .dashboard-hero,
  .table-toolbar,
  .panel-head,
  .pager {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics-grid,
  .quick-grid,
  .module-help-panel,
  .record-form,
  .detail-grid,
  .filters.filters-two-rows,
  .parque-detail-hero {
    grid-template-columns: 1fr;
  }

  .asset-thumb-large {
    width: 100%;
    max-width: 180px;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .parque-qr-content {
    align-items: flex-start;
    flex-direction: column;
  }

  .photo-manager-upload {
    grid-template-columns: 1fr;
  }

  .accessory-manager-form,
  .credential-manager-form {
    grid-template-columns: 1fr;
  }

  .accessory-manager-form .accessory-wide,
  .credential-manager-form .credential-wide {
    grid-column: auto;
  }

  .record-form .field,
  .record-form .lookup-field,
  .record-form .check-field,
  .record-form .phone-list-field,
  .record-form .field.third,
  .record-form .lookup-field.third,
  .record-form .check-field.third {
    grid-column: 1 / -1;
  }
}

/* Client profile */
.client-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 0.34fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #111111;
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.client-avatar {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--primary);
  color: #111111;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 900;
}

.client-hero-main {
  min-width: 0;
}

.client-hero-main h2 {
  margin: 4px 0 10px;
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
  letter-spacing: 0;
}

.client-hero-main p {
  max-width: 880px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.client-hero .eyebrow {
  color: rgba(255, 255, 255, 0.68);
}

.client-hero-meta,
.company-service-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.client-facts {
  display: grid;
  gap: 10px;
}

.client-facts div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.client-facts strong,
.client-facts span {
  display: block;
}

.client-facts strong {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.client-facts span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.client-metric {
  min-height: 124px;
}

.client-profile-group {
  margin-top: 22px;
}

.client-profile-group-head {
  margin-bottom: 10px;
}

.client-profile-group-head h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 20px;
  letter-spacing: 0;
}

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

.client-profile-section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}

.client-profile-section-wide {
  grid-column: 1 / -1;
}

.client-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.client-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.client-section-title strong,
.client-section-title small {
  display: block;
}

.client-section-title strong {
  font-size: 15px;
}

.client-section-title small {
  color: var(--muted);
  font-weight: 800;
}

.client-section-icon {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: var(--primary-soft);
  color: #9a6f00;
}

.client-section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.profile-section-note {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-weight: 700;
}

.profile-table {
  min-width: 640px;
}

.company-profile-table {
  min-width: 780px;
}

.client-company-name {
  display: grid;
  gap: 3px;
}

.client-company-name strong,
.client-company-name span {
  overflow-wrap: anywhere;
}

.client-company-name span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef8ff;
  color: var(--indigo);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .client-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .client-facts {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .client-hero,
  .client-facts,
  .client-metrics-grid,
  .client-profile-grid {
    grid-template-columns: 1fr;
  }

  .client-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .client-section-actions {
    justify-content: flex-start;
  }
}

/* Refined app chrome and list surfaces */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  background:
    radial-gradient(circle at 74% 0%, rgba(244, 189, 34, 0.08), transparent 30%),
    #f7f7f4;
}

.sidebar {
  background:
    radial-gradient(circle at 20% 0%, rgba(244, 189, 34, 0.12), transparent 28%),
    linear-gradient(180deg, #111315 0%, #151616 58%, #101112 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 18px 0 50px rgba(17, 24, 39, 0.12);
}

.sidebar-brand {
  padding: 6px 6px 18px;
}

.sidebar-brand .brand-symbol {
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(244, 189, 34, 0.28);
}

.nav-group:not(.nav-group-static) {
  padding: 3px;
  border-radius: 14px;
  margin-bottom: 7px;
}

.nav-group:not(.nav-group-static):hover,
.nav-group.has-active {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-group-toggle {
  min-height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.82);
}

.nav-group.has-active .nav-group-toggle {
  background: rgba(255, 255, 255, 0.09);
}

.nav-group-items {
  gap: 2px;
  margin-top: 6px;
  margin-left: 5px;
  padding-left: 12px;
}

.nav-link {
  min-height: 37px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 720;
}

.nav-link.active {
  background: rgba(244, 189, 34, 0.15);
  box-shadow: inset 3px 0 0 var(--primary);
}

.topbar {
  min-height: 70px;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(228, 231, 236, 0.82);
  box-shadow: 0 16px 45px rgba(16, 24, 40, 0.07);
}

.topbar-search {
  width: min(36vw, 440px);
}

.topbar-search input {
  background: #f8fafc;
  border-color: #dfe4ea;
}

.workspace {
  padding-top: 118px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.page-head h1 {
  margin-bottom: 6px;
  color: #111827;
  font-size: 32px;
  line-height: 1.05;
}

.page-head p {
  max-width: 880px;
  color: #667085;
  line-height: 1.45;
}

.toolbar-actions {
  gap: 10px;
}

.module-help-panel {
  gap: 14px;
  margin: 0 0 18px;
}

.module-help-card {
  min-height: 124px;
  padding: 20px;
  border-color: #e5e7eb;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 42px rgba(17, 24, 39, 0.06);
}

.module-help-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff1bc;
  color: #a66f00;
}

.module-help-card strong {
  font-size: 15px;
}

.module-help-card p {
  color: #667085;
}

.filter-panel,
.table-panel {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 42px rgba(17, 24, 39, 0.055);
}

.filter-panel {
  margin-bottom: 18px;
  overflow: visible;
}

.filter-panel.is-hidden {
  display: none;
}

.filter-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 4px;
}

.filter-panel-head h3 {
  margin: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 900;
}

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

.btn-link {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #667085;
  box-shadow: none;
}

.btn-link:hover:not(:disabled) {
  background: #f8fafc;
  color: #111827;
}

.btn-link:disabled {
  opacity: 0.46;
  cursor: default;
}

.filter-collapse {
  width: 36px;
  min-height: 36px;
  border-radius: 12px;
}

.filter-collapse i {
  transition: transform 0.2s ease;
}

.filter-panel.collapsed .filter-collapse i {
  transform: rotate(180deg);
}

.filter-panel.collapsed .filters {
  display: none;
}

.filter-panel .filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 16px;
  padding: 16px 18px 20px;
  background: transparent;
  border: 0;
}

.filter-panel .filters.filters-two-rows {
  grid-template-columns: repeat(5, minmax(160px, 1fr));
}

.filter-panel .field span {
  margin-bottom: 7px;
  color: #667085;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.filter-panel .form-control,
.filter-panel .form-select,
.filter-panel .lookup-search {
  min-height: 42px;
  border-radius: 10px;
  background: #fff;
}

.filter-panel .lookup-control {
  grid-template-columns: 1fr;
}

.filter-panel .lookup-clear {
  display: none;
}

.filter-panel .lookup-results {
  margin-top: 2px;
  border-radius: 12px;
}

.table-panel {
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 17px 18px;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid #e5e7eb;
}

.table-toolbar h3 {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 900;
}

.table-toolbar h3 small {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}

.data-table {
  min-width: 980px;
}

.data-table th {
  height: 48px;
  background: #f8fafc;
  color: #667085;
  font-size: 11px;
  font-weight: 900;
}

.data-table td {
  height: 62px;
  color: #344054;
}

.data-table tr:hover td {
  background: #fcfcfd;
}

.cell-actions .icon-btn {
  width: 38px;
  min-height: 38px;
  border-radius: 12px;
  color: #111827;
}

.asset-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: none;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 900;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status.ok {
  color: #12813c;
  background: #dcfce7;
}

.status.info {
  color: #075985;
  background: #e0f2fe;
}

.status.off {
  color: #667085;
  background: #f2f4f7;
}

.status.warn {
  color: #a16207;
  background: #fef3c7;
}

.status.danger {
  color: #b42318;
  background: #fee4e2;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  padding: 14px 18px;
  background: #fff;
  color: #667085;
  font-size: 13px;
}

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

.pager-actions .icon-btn {
  width: 38px;
  min-height: 38px;
  border-radius: 10px;
}

.pager-page-current {
  min-width: 42px;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #ffd86a);
  color: #111827;
  font-weight: 900;
}

.pager-size select {
  min-height: 38px;
  padding: 0 38px 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  font-weight: 750;
}

@media (max-width: 1200px) {
  .filter-panel .filters,
  .filter-panel .filters.filters-two-rows {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }
}

@media (max-width: 760px) {
  .page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-panel .filters,
  .filter-panel .filters.filters-two-rows {
    grid-template-columns: 1fr;
  }

  .filter-panel-head,
  .pager {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-panel-actions,
  .pager-actions {
    justify-content: space-between;
  }
}

/* Cleaner sidebar groups */
.sidebar-nav {
  gap: 9px;
  padding-right: 0;
  margin-right: 0;
  scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.nav-group {
  margin-bottom: 6px;
}

.nav-group:not(.nav-group-static) {
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
}

.nav-group:not(.nav-group-static):hover,
.nav-group.has-active {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.nav-group-title {
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.58);
}

.nav-group-toggle {
  min-height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: none;
  padding: 9px 10px 9px 12px;
}

.nav-group-toggle:hover,
.nav-group.has-active .nav-group-toggle {
  background: rgba(255, 255, 255, 0.12);
}

.nav-group-toggle small {
  min-width: 24px;
  min-height: 22px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
}

.nav-group.has-active .nav-group-toggle small {
  background: var(--primary);
  color: #111111;
}

.nav-group-items {
  margin: 8px 0 0;
  padding-left: 0;
  gap: 4px;
}

.nav-group-items::before {
  display: none;
}

.nav-group:not(.nav-group-static) .nav-link {
  min-height: 39px;
  padding: 9px 12px;
  background: transparent;
}

.nav-group:not(.nav-group-static) .nav-link.active {
  background: rgba(244, 189, 34, 0.16);
  box-shadow: inset 3px 0 0 var(--primary);
}

.nav-group:not(.nav-group-static) .nav-link.active i {
  color: var(--primary);
}

/* Softer inline lookup buttons */
.lookup-control,
.record-form .lookup-control {
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 7px;
}

.lookup-clear,
.record-form .lookup-clear {
  width: 38px;
  min-height: 38px;
  height: 38px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f8fafc;
  color: #475467;
  box-shadow: none;
}

.lookup-clear i,
.record-form .lookup-clear i {
  font-size: 12px;
}

.lookup-clear:hover,
.record-form .lookup-clear:hover {
  background: #fff7df;
  border-color: rgba(244, 189, 34, 0.72);
  color: #8a6100;
  transform: none;
}

.lookup-clear:focus-visible,
.record-form .lookup-clear:focus-visible {
  outline: none;
  border-color: rgba(244, 189, 34, 0.9);
  box-shadow: 0 0 0 4px rgba(244, 189, 34, 0.14);
}

.record-form .lookup-field .form-control,
.record-form .lookup-field .lookup-search {
  min-height: 46px;
}
