/* Installer AI — design tokens & app shell */
@import url('./ghl-tokens.css');
@import url('./ghl-components.css');
@import url('./ghl-ui-v2.css');
@import url('./nexus-crm.css');
@import url('./ghl-layout-fluid.css');
@import url('./ghl-dashboard-grid.css');

:root {
  --ghl-accent: #ff6b35;
  --ghl-accent-hover: #e85f2f;
  --ghl-menu-active: #ff6b35;
  --ghl-accent-rgb: 255, 107, 53;
  --ghl-accent-soft: rgba(var(--ghl-accent-rgb), 0.1);
  --ghl-surface: #ffffff;
  --ghl-surface-muted: #f8fafc;
  --ghl-surface-warm: #faf9f7;
  --ghl-border: rgba(15, 23, 42, 0.08);
  --ghl-border-strong: rgba(15, 23, 42, 0.12);
  --ghl-text: #1e293b;
  --ghl-text-muted: #64748b;
  --ghl-text-subtle: #94a3b8;
  --ghl-radius-sm: 6px;
  --ghl-radius-md: 10px;
  --ghl-radius-lg: 14px;
  --ghl-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --ghl-shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --ghl-font: 'DM Sans', 'Public Sans', system-ui, -apple-system, sans-serif;
  --ghl-sidebar-width: 16.25rem;
}

body {
  font-family: var(--ghl-font);
  color: var(--ghl-text);
  -webkit-font-smoothing: antialiased;
}

.layout-menu {
  width: var(--ghl-sidebar-width) !important;
  background: var(--ghl-surface-warm) !important;
  border-right: 1px solid var(--ghl-border);
}

.ghl-menu-toolbar {
  padding: 0.5rem 0.85rem 0.35rem;
}

.ghl-menu-search-wrap {
  position: relative;
}

.ghl-menu-search-wrap .bx-search {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--ghl-text-subtle);
  pointer-events: none;
}

.ghl-menu-search {
  padding-left: 2rem !important;
  font-size: 0.8125rem;
  border-radius: var(--ghl-radius-md);
  border: 1px solid var(--ghl-border);
  background: var(--ghl-surface);
}

.ghl-menu-search:focus {
  border-color: rgba(var(--ghl-accent-rgb), 0.45);
  box-shadow: 0 0 0 3px var(--ghl-accent-soft);
}

.ghl-menu-favorites-header .menu-header-text {
  color: var(--ghl-accent);
}

.ghl-menu-item-wrap {
  position: relative;
}

.ghl-menu-fav-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  padding: 0.15rem;
  line-height: 1;
  color: var(--ghl-text-subtle);
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
  cursor: pointer;
  z-index: 2;
}

.ghl-menu-item-wrap:hover .ghl-menu-fav-btn,
.ghl-menu-fav-btn.is-pinned {
  opacity: 1;
}

.ghl-menu-fav-btn.is-pinned {
  color: #f59e0b;
}

.ghl-menu-fav-btn:hover {
  color: #f59e0b;
}

.ghl-menu-section-header {
  margin-top: 0.15rem;
}

.ghl-menu-section-toggle {
  font-size: 0.6875rem;
  padding: 0.4rem 1rem;
  color: var(--ghl-text-muted);
}

.layout-menu .menu-item .menu-link {
  font-size: 0.875rem;
  padding: 0.45rem 1rem;
  border-radius: var(--ghl-radius-sm);
  margin: 0 0.5rem;
  width: calc(100% - 1rem);
}

.layout-menu .menu-item.active > .menu-link {
  font-weight: 600;
}

.layout-menu .menu-item .menu-link:hover {
  background: rgba(var(--ghl-accent-rgb), 0.06);
}

.ghl-topbar {
  min-height: 3.5rem;
  border-bottom: 1px solid var(--ghl-border);
  background: var(--ghl-surface) !important;
  box-shadow: var(--ghl-shadow-sm);
}

.ghl-topbar-search-wrap {
  max-width: 320px;
  flex: 1 1 200px;
}

.ghl-topbar-search {
  min-width: 160px;
  max-width: 280px;
  font-size: 0.875rem;
  border: 1px solid var(--ghl-border) !important;
  border-radius: var(--ghl-radius-md);
  background: var(--ghl-surface-muted);
  box-shadow: none !important;
}

.ghl-topbar-search:focus {
  background: var(--ghl-surface);
  border-color: rgba(var(--ghl-accent-rgb), 0.4) !important;
}

.ghl-topbar-status {
  padding: 0.2rem 0.5rem;
  border-radius: var(--ghl-radius-sm);
  background: var(--ghl-surface-muted);
}

.ghl-status-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ghl-page-header {
  margin-bottom: 1.25rem;
}

.ghl-page-header-breadcrumb {
  font-size: 0.8125rem;
  margin-bottom: 0.35rem;
}

.ghl-page-header-breadcrumb a {
  color: var(--ghl-text-muted);
  text-decoration: none;
}

.ghl-page-header-breadcrumb a:hover {
  color: var(--ghl-accent);
}

.ghl-page-header-breadcrumb .separator {
  margin: 0 0.35rem;
  color: var(--ghl-text-subtle);
}

.ghl-page-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.ghl-page-header-title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ghl-text);
}

.ghl-page-header-subtitle {
  font-size: 0.875rem;
  color: var(--ghl-text-muted);
  margin: 0.25rem 0 0;
  max-width: 42rem;
}

.ghl-page-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.ghl-page-header-actions:empty {
  display: none;
}

.card {
  border: 1px solid var(--ghl-border);
  border-radius: var(--ghl-radius-lg);
  box-shadow: var(--ghl-shadow-sm);
}

.card-header {
  background: var(--ghl-surface-muted);
  border-bottom: 1px solid var(--ghl-border);
  font-weight: 600;
}

.table > thead {
  background: var(--ghl-surface-muted);
}

.table > thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ghl-text-muted);
  font-weight: 600;
  border-bottom-color: var(--ghl-border);
}

.form-control,
.form-select {
  border-radius: var(--ghl-radius-sm);
  border-color: var(--ghl-border-strong);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(var(--ghl-accent-rgb), 0.5);
  box-shadow: 0 0 0 3px var(--ghl-accent-soft);
}

.content-footer.footer {
  border-top: 1px solid var(--ghl-border);
  background: var(--ghl-surface-muted) !important;
}

.ghl-menu-filter-hidden {
  display: none !important;
}

.ghl-menu-match mark {
  background: rgba(var(--ghl-accent-rgb), 0.2);
  color: inherit;
  padding: 0;
}

@media (max-width: 1199.98px) {
  .ghl-topbar-search-wrap {
    max-width: 100%;
  }
}

.ghl-contact-content-wrapper .ghl-page-header,
.ghl-contact-content-wrapper .ghl-page-header--contact {
  padding: 0.35rem 0.75rem 0;
  margin-bottom: 0;
}

.ghl-contact-content-wrapper .ghl-page-header-breadcrumb {
  margin-bottom: 0.15rem;
  font-size: 0.75rem;
}

.ghl-contact-content-wrapper .ghl-page-header-row {
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.ghl-contact-content-wrapper .ghl-page-header-title {
  font-size: 1.125rem;
  line-height: 1.25;
}

.ghl-contact-content-wrapper .ghl-page-header-subtitle {
  margin: 0.1rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.ghl-contact-content-wrapper .ghl-page-header-actions {
  flex-shrink: 0;
  gap: 0.5rem;
}

.ghl-contact-content-wrapper .ghl-page-header-actions .btn {
  white-space: nowrap;
}

.ghl-enterprise-shell .content-wrapper {
  background: var(--ghl-surface-muted);
}

.ghl-enterprise-shell .btn-primary {
  background-color: var(--ghl-accent);
  border-color: var(--ghl-accent);
}

.ghl-enterprise-shell .btn-primary:hover {
  background-color: var(--ghl-accent-hover);
  border-color: var(--ghl-accent-hover);
}

.ghl-account-menu-mount .dropdown-toggle::after {
  display: none;
}

.ghl-account-dropdown .avatar {
  width: 2.5rem;
  height: 2.5rem;
}

.ghl-account-dropdown .avatar img,
.ghl-account-dropdown .avatar-initial {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: cover;
}
