@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Base palette - clean, light, professional */
  --bg-primary: #f8f9fb;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f3f7;
  --bg-hover: #edf0f5;

  /* Text */
  --text-primary: #1a1d26;
  --text-secondary: #5a6178;
  --text-tertiary: #8b92a5;
  --text-inverse: #ffffff;

  /* Accent - professional blue */
  --accent: #2563eb;
  --accent-light: #e8f0fe;
  --accent-hover: #1d4ed8;

  /* Status colors */
  --success: #059669;
  --success-light: #ecfdf5;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --info: #0284c7;
  --info-light: #f0f9ff;
  --neutral: #6b7280;
  --neutral-light: #f3f4f6;

  /* Borders & shadows */
  --border: #e5e7ee;
  --border-light: #f0f1f5;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);

  /* Spacing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

/* ===================== LAYOUT ===================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.25s ease;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
}

.sidebar-logo h1 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.sidebar-logo span {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 400;
}

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

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-tertiary);
  padding: 16px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-light);
  color: var(--accent);
}

.nav-item .nav-icon {
  font-size: 17px;
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-item .badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Main content area */
.main-content {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
}

.page-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.page-subtitle {
  font-size: 12.5px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

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

.page-body {
  padding: 24px 32px;
}

/* ===================== CARDS ===================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: box-shadow 0.2s ease;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-card .stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.stat-card .stat-detail {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 6px;
}

.stat-card.accent .stat-value {
  color: var(--accent);
}

.stat-card.success .stat-value {
  color: var(--success);
}

.stat-card.warning .stat-value {
  color: var(--warning);
}

.stat-card.danger .stat-value {
  color: var(--danger);
}

/* Panel / Table container */
.panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  overflow: hidden;
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title {
  font-size: 14px;
  font-weight: 600;
}

.panel-body {
  padding: 0;
}

/* ===================== TABLE ===================== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead {
  background: var(--bg-tertiary);
}

.data-table th {
  padding: 10px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.data-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.data-table th.sortable:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.data-table th .sort-icon {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  opacity: 0.5;
  transition: opacity 0.15s ease;
  vertical-align: middle;
}

.data-table th.sort-asc .sort-icon,
.data-table th.sort-desc .sort-icon {
  opacity: 1;
  color: var(--accent);
}

.data-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
}

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

.data-table tbody tr:hover {
  background: var(--bg-hover);
}

.data-table tbody tr:first-child td {
  border-top: none;
}

.data-table .hostname {
  font-weight: 600;
  color: var(--text-primary);
}

.data-table .os-info {
  font-size: 11.5px;
  color: var(--text-tertiary);
}

/* ===================== STATUS BADGES ===================== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge.compliant {
  background: var(--success-light);
  color: var(--success);
}

.status-badge.updates_available {
  background: var(--warning-light);
  color: var(--warning);
}

.status-badge.critical {
  background: var(--danger-light);
  color: var(--danger);
}

.status-badge.unknown,
.status-badge.offline {
  background: var(--neutral-light);
  color: var(--neutral);
}

.status-badge.ok,
.status-badge.healthy {
  background: var(--info-light);
  color: var(--info);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ===================== COMPLIANCE BAR ===================== */
.compliance-bar-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compliance-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

.compliance-bar .fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.compliance-bar .fill.good {
  background: var(--success);
}

.compliance-bar .fill.warn {
  background: var(--warning);
}

.compliance-bar .fill.bad {
  background: var(--danger);
}

.compliance-value {
  font-size: 14px;
  font-weight: 700;
  min-width: 48px;
  text-align: right;
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn:hover {
  background: var(--bg-hover);
  border-color: var(--text-tertiary);
}

.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

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

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

.btn-outline-danger:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

/* ===================== FILTER BAR ===================== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-tertiary);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  border: 1px solid var(--border);
}

.filter-input,
.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-secondary);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-input:focus,
.filter-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light);
}

.filter-icon {
  font-size: 14px;
  color: var(--text-tertiary);
}

/* ===================== BREADCRUMB ===================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  font-size: 13px;
}

.breadcrumb a {
  color: var(--text-tertiary);
  text-decoration: none;
}

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

.breadcrumb .sep {
  color: var(--text-tertiary);
  font-size: 11px;
}

.breadcrumb .current {
  color: var(--text-primary);
  font-weight: 500;
}

/* ===================== DETAIL CARDS ===================== */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.detail-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.detail-card .label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.detail-card .value {
  font-size: 14px;
  font-weight: 600;
}

/* ===================== SEVERITY TAGS ===================== */
.severity-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.severity-tag.Critical {
  background: var(--danger-light);
  color: var(--danger);
}

.severity-tag.Important {
  background: var(--warning-light);
  color: var(--warning);
}

.severity-tag.Moderate {
  background: var(--info-light);
  color: var(--info);
}

.severity-tag.Low,
.severity-tag.Unspecified {
  background: var(--neutral-light);
  color: var(--neutral);
}

/* ===================== REPORT SEARCH ===================== */
.report-search-bar {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-secondary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.report-search-bar .search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-tertiary);
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.report-search-bar .search-box:focus-within {
  border-color: var(--accent);
  background: var(--bg-secondary);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.report-search-bar .search-icon {
  font-size: 14px;
  color: var(--text-tertiary);
}

.report-search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
}

.report-search-bar .search-stats {
  font-size: 12.5px;
  color: var(--text-tertiary);
  font-weight: 500;
  white-space: nowrap;
}

/* ===================== CUSTOMER LIST ===================== */
.customer-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.customer-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.customer-card .customer-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.customer-card .customer-number {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.customer-card .customer-stats {
  display: flex;
  gap: 16px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.customer-card .customer-stats strong {
  color: var(--text-primary);
}

/* ===================== LOADING & EMPTY ===================== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
  font-size: 14px;
}

.loading .spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

.empty-state .empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-state .empty-text {
  font-size: 14px;
}

/* ===================== REFRESH INDICATOR ===================== */
.last-refresh {
  font-size: 11.5px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ===================== TIME AGO ===================== */
.time-ago {
  font-size: 11.5px;
  color: var(--text-tertiary);
}

/* ===================== ANIMATIONS ===================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

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

  .page-body {
    padding: 20px;
  }

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

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    padding: 16px 20px;
  }
}

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ===================== CLICKABLE ROW ===================== */
.clickable-row {
  cursor: pointer;
}

/* ===================== ADMIN TABS ===================== */
.admin-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 24px;
}

.admin-tab {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-tertiary);
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.admin-tab:hover {
  color: var(--text-primary);
}

.admin-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ===================== M365 SETUP UI ===================== */
.m365-setup-card {
  background: var(--text-primary);
  color: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 20px;
  box-shadow: var(--shadow-lg);
}

.m365-setup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.m365-setup-title {
  font-size: 12px;
  font-weight: 700;
  color: #60a5fa;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.m365-code-container {
  text-align: center;
  margin: 24px 0;
}

.m365-code {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 4px;
  color: #60a5fa;
}

.m365-code-hint {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 8px;
  font-style: italic;
}

.btn-m365 {
  width: 100%;
  background: #3b82f6;
  color: white;
  border: none;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-m365:hover {
  background: #2563eb;
}
/* ===================== ACCORDION / COLLAPSIBLE ===================== */
.accordion-panel {
  margin-bottom: 16px;
}

.accordion-header {
  padding: 14px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.accordion-header:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.accordion-header .panel-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

.accordion-header .caret {
  font-size: 12px;
  transition: transform 0.3s ease;
  color: var(--text-tertiary);
}

.accordion-panel.active .accordion-header {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: var(--border-light);
}

.accordion-panel.active .caret {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-top: none;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  overflow: hidden;
}

.accordion-panel.active .accordion-content {
  display: block;
}

.accordion-content .panel-body {
  padding: 0;
}
/* ===================== DASHBOARD & CHARTS ===================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.chart-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.chart-header {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chart-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.chart-container {
  position: relative;
  height: 250px;
  width: 100%;
}

.top-updates-list {
  list-style: none;
  padding: 0;
}

.top-update-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  transition: background 0.15s ease;
  border-radius: var(--radius-sm);
}

.top-update-item:last-child {
  border-bottom: none;
}

.top-update-item:hover {
  background: var(--bg-hover);
}

.top-update-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.top-update-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.top-update-meta {
  font-size: 11.5px;
  color: var(--text-tertiary);
}

.top-update-count {
  background: var(--accent-light);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 12px;
}

.top-update-count.failed {
  background: var(--danger-light);
  color: var(--danger);
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================== CUSTOM SELECT FILTER ===================== */
.custom-select-wrapper {
  position: relative;
  user-select: none;
  min-width: 200px;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.custom-select-trigger:hover {
  background: var(--bg-hover);
  border-color: var(--text-tertiary);
}

.custom-select-wrapper.open .custom-select-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light);
}

.custom-select-trigger .arrow {
  margin-left: 10px;
  font-size: 10px;
  color: var(--text-tertiary);
  transition: transform 0.2s ease;
}

.custom-select-wrapper.open .arrow {
  transform: rotate(180deg);
}

.custom-options {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  max-width: 300px;
  min-width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: all 0.2s ease;
  z-index: 200;
  display: flex;
  flex-direction: column;
}

.custom-select-wrapper.open .custom-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-select-search {
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  outline: none;
  width: 100%;
  background: transparent;
  color: var(--text-primary);
}

.custom-select-search::placeholder {
  color: var(--text-tertiary);
}

.custom-options-list {
  max-height: 250px;
  overflow-y: auto;
  padding: 5px 0;
}

.custom-option {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s ease;
}

.custom-option:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.custom-option.selected {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}

.custom-option.hidden {
  display: none;
}

/* Print Styles for PDF Export */
@media print {
  /* Hide UI elements not meant for printing */
  .sidebar,
  .header-actions,
  #customer-filter-wrapper,
  .custom-options,
  .mobile-nav-toggle,
  #btn-refresh,
  #btn-print,
  #btn-export-csv {
    display: none !important;
  }

  /* Reset layout for printing */
  .app-layout {
    display: block !important;
  }
  
  .main-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Ensure background colors are printed */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    background-color: white !important;
    color: black !important;
  }

  /* Prevent page breaks inside cards */
  .stat-card, .chart-panel, .top-update-item {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Adjust charts for print */
  .chart-container {
    height: 300px !important; /* Fixed height for consistent print layout */
  }
}

/* CVSS Badges */
.cvss-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    min-width: 24px;
    text-align: center;
}
.cvss-critical { background-color: #dc2626; }
.cvss-high     { background-color: #ea580c; }
.cvss-medium   { background-color: #d97706; }
.cvss-low      { background-color: #16a34a; }

/* AI Recommendation Styles */
.ai-content {
    font-size: 14px;
    color: var(--text-primary);
}
.ai-content strong { color: var(--text-primary); }
.ai-content h3 { color: var(--accent); }
.ai-content li { margin-bottom: 8px; }

.btn-ai-analyze {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent) 0%, #1d4ed8 100%);
    border: none;
    transition: transform 0.2s;
    color: white;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
}
.btn-ai-analyze:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-ai-analyze:disabled {
    opacity: 0.7;
    cursor: wait;
}

.loading-inline {
    display: inline-block;
    animation: pulse 1.5s infinite;
    color: var(--text-tertiary);
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

/* Heatmap Styles */
.heatmap-wrapper {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    overflow-x: auto;
}
.heatmap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.heatmap-title {
    font-size: 14px;
    font-weight: 600;
}
.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-tertiary);
}
.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(53, 11px);
    gap: 4px;
    width: fit-content;
}
.heatmap-column {
    display: grid;
    grid-template-rows: repeat(7, 11px);
    gap: 4px;
}
.heatmap-day {
    width: 11px;
    height: 11px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    transition: transform 0.1s ease;
    border: 1px solid rgba(0,0,0,0.03);
}
.heatmap-day:hover {
    transform: scale(1.25);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 2;
}

.heatmap-day.L0 { background: #f0f1f4; }
.heatmap-day.L1 { background: #d1fae5; }
.heatmap-day.L2 { background: #6ee7b7; }
.heatmap-day.L3 { background: #10b981; }
.heatmap-day.L4 { background: #059669; }

.heatmap-labels-y {
    display: grid;
    grid-template-rows: repeat(7, 11px);
    gap: 4px;
    margin-right: 8px;
    font-size: 9px;
    color: var(--text-tertiary);
    text-align: right;
    line-height: 11px;
}

