@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

/* ===================================================================
 * Photon Console Enterprise Design System & Modern UI Tokens
 * =================================================================== */

:root {
  --pc-font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --pc-primary: #5c55f2;
  --pc-primary-hover: #4840e4;
  --pc-primary-subtle: #eef2ff;
  --pc-primary-border: #c7d2fe;
  --pc-primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  --pc-accent-gradient: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
  --pc-success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --pc-warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --pc-danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  
  --pc-secondary: #64748b;
  --pc-success: #10b981;
  --pc-warning: #f59e0b;
  --pc-danger: #ef4444;
  --pc-info: #06b6d4;
  
  --pc-body-bg: #f8fafc;
  --pc-card-bg: #ffffff;
  --pc-sidebar-bg: #ffffff;
  --pc-border-color: #e2e8f0;
  --pc-border-subtle: #f1f5f9;
  
  --pc-text-main: #1e293b;
  --pc-text-muted: #64748b;
  --pc-text-light: #94a3b8;
  
  --pc-radius-sm: 8px;
  --pc-radius: 14px;
  --pc-radius-lg: 20px;
  --pc-radius-pill: 9999px;
  
  --pc-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --pc-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --pc-shadow-md: 0 10px 20px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --pc-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --pc-shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);
}

/* Base Typography Overrides */
body {
  font-family: var(--pc-font-family) !important;
  background-color: var(--pc-body-bg) !important;
  color: var(--pc-text-main) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--pc-font-family) !important;
  font-weight: 700;
  color: var(--pc-text-main);
  letter-spacing: -0.02em;
}

/* ===================================================================
 * Modern Card Styling
 * =================================================================== */
.card {
  border-radius: var(--pc-radius) !important;
  border: 1px solid var(--pc-border-color) !important;
  box-shadow: var(--pc-shadow) !important;
  background: var(--pc-card-bg) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  margin-bottom: 1.5rem;
}

.card:hover {
  box-shadow: var(--pc-shadow-md) !important;
}

.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--pc-border-subtle) !important;
  padding: 1.25rem 1.5rem !important;
  font-weight: 600;
}

.card-body {
  padding: 1.5rem !important;
}

.card-footer {
  background: transparent !important;
  border-top: 1px solid var(--pc-border-subtle) !important;
  padding: 1rem 1.5rem !important;
}

/* ===================================================================
 * KPI Metric Cards
 * =================================================================== */
.kpi-widget {
  position: relative;
  overflow: hidden;
  border-radius: var(--pc-radius);
  background: var(--pc-card-bg);
  border: 1px solid var(--pc-border-color);
  padding: 1.5rem;
  box-shadow: var(--pc-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-widget:hover {
  transform: translateY(-3px);
  box-shadow: var(--pc-shadow-lg);
}

.kpi-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.kpi-icon-primary {
  background: var(--pc-primary-subtle);
  color: var(--pc-primary);
}

.kpi-icon-success {
  background: #ecfdf5;
  color: var(--pc-success);
}

.kpi-icon-warning {
  background: #fffbeb;
  color: var(--pc-warning);
}

.kpi-icon-danger {
  background: #fef2f2;
  color: var(--pc-danger);
}

.kpi-icon-info {
  background: #ecfeff;
  color: var(--pc-info);
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--pc-text-main);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.kpi-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--pc-text-muted);
}

.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--pc-radius-pill);
}

.kpi-trend-up {
  background: #ecfdf5;
  color: #059669;
}

.kpi-trend-down {
  background: #fef2f2;
  color: #dc2626;
}

/* ===================================================================
 * Modern Soft Badges
 * =================================================================== */
.badge {
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  padding: 0.4em 0.75em !important;
  border-radius: 6px !important;
}

.badge-soft-primary, .badge.bg-label-primary {
  background: #eef2ff !important;
  color: #4f46e5 !important;
  border: 1px solid #c7d2fe !important;
}

.badge-soft-success, .badge.bg-label-success {
  background: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
}

.badge-soft-warning, .badge.bg-label-warning {
  background: #fffbeb !important;
  color: #d97706 !important;
  border: 1px solid #fde68a !important;
}

.badge-soft-danger, .badge.bg-label-danger {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
}

.badge-soft-info, .badge.bg-label-info {
  background: #ecfeff !important;
  color: #0891b2 !important;
  border: 1px solid #a5f3fc !important;
}

.badge-soft-secondary, .badge.bg-label-secondary {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
}

/* ===================================================================
 * Buttons & Interactions
 * =================================================================== */
.btn {
  font-weight: 600 !important;
  border-radius: 10px !important;
  padding: 0.55rem 1.25rem !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-primary {
  background: var(--pc-primary-gradient) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
  color: #ffffff !important;
}

.btn-primary:hover, .btn-primary:focus {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4) !important;
}

.btn-success {
  background: var(--pc-success-gradient) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

.btn-danger {
  background: var(--pc-danger-gradient) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

.btn-outline-primary {
  border: 1.5px solid var(--pc-primary) !important;
  color: var(--pc-primary) !important;
  background: transparent !important;
}

.btn-outline-primary:hover {
  background: var(--pc-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25) !important;
}

/* ===================================================================
 * Form Controls & Input Styling
 * =================================================================== */
.form-control, .form-select {
  border-radius: 10px !important;
  border: 1.5px solid var(--pc-border-color) !important;
  padding: 0.65rem 1rem !important;
  font-size: 0.925rem !important;
  color: var(--pc-text-main) !important;
  background-color: #ffffff !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.form-control:focus, .form-select:focus {
  border-color: var(--pc-primary) !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12) !important;
  outline: none !important;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pc-text-main);
  margin-bottom: 0.4rem;
}

/* ===================================================================
 * Modern Clean Light Sidebar Navigation (Zero Dots / No Patchiness)
 * =================================================================== */
.layout-navbar {
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  border-bottom: 1px solid var(--pc-border-subtle) !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.03) !important;
}

/* ===================================================================
 * 100% Comprehensive Light Sidebar Overrides
 * Neutralizes theme-semi-dark dark backgrounds, dark open states, & bullet dots
 * =================================================================== */
html body .layout-menu,
html body .bg-menu-theme,
html body .layout-menu-fixed .layout-menu,
html body aside#layout-menu {
  background-color: #ffffff !important;
  background: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02) !important;
}

html body .menu-inner-shadow {
  display: none !important;
}

html body .menu .app-brand {
  height: 70px !important;
  background-color: #ffffff !important;
  background: #ffffff !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.bg-menu-theme .menu-header {
  margin: 1.25rem 0 0.5rem 0 !important;
  padding: 0 1.25rem !important;
}

.bg-menu-theme .menu-header::before,
.bg-menu-theme .menu-header::after {
  display: none !important;
}

.bg-menu-theme .menu-header-text {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  color: #94a3b8 !important;
  text-transform: uppercase !important;
}

.bg-menu-theme .menu-item .menu-link {
  border-radius: 10px !important;
  margin: 0.2rem 0.75rem !important;
  padding: 0.625rem 0.95rem !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  color: #475569 !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  position: relative !important;
  border-left: 3px solid transparent !important;
}

.bg-menu-theme .menu-item .menu-link i {
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease !important;
}

/* Sleek Modern Hover State */
.bg-menu-theme .menu-item .menu-link:hover:not(.active) {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, rgba(241, 245, 249, 0.8) 100%) !important;
  color: #4f46e5 !important;
  border-left: 3px solid #6366f1 !important;
  transform: translateX(4px) !important;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08) !important;
}

.bg-menu-theme .menu-item .menu-link:hover i {
  color: #4f46e5 !important;
  transform: scale(1.15) rotate(-4deg) !important;
}

/* Active State (Only for leaf menu-links or non-open items) */
.bg-menu-theme .menu-item.active:not(.open) > .menu-link,
.bg-menu-theme .menu-sub > .menu-item.active > .menu-link {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35) !important;
  border-left: 3px solid transparent !important;
  transform: none !important;
}

.bg-menu-theme .menu-item.active:not(.open) > .menu-link i,
.bg-menu-theme .menu-item.active:not(.open) > .menu-link div,
.bg-menu-theme .menu-item.active:not(.open) > .menu-link span,
.bg-menu-theme .menu-sub > .menu-item.active > .menu-link i,
.bg-menu-theme .menu-sub > .menu-item.active > .menu-link div,
.bg-menu-theme .menu-sub > .menu-item.active > .menu-link span {
  color: #ffffff !important;
}

.bg-menu-theme .menu-item.active:not(.open) > .menu-link:hover,
.bg-menu-theme .menu-sub > .menu-item.active > .menu-link:hover {
  background: linear-gradient(135deg, #5a5de8 0%, #4338ca 100%) !important;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45) !important;
  transform: translateY(-1px) !important;
}

/* Neutralize ALL open state dark backgrounds from theme-semi-dark */
.bg-menu-theme .menu-inner > .menu-item.open,
.bg-menu-theme .menu-inner > .menu-item.open > .menu-link,
.bg-menu-theme .menu-inner > .menu-item.open > .menu-sub,
.bg-menu-theme .menu-item.open {
  background-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Menu toggle header when opened */
.bg-menu-theme .menu-inner > .menu-item.open > .menu-link.menu-toggle,
.bg-menu-theme .menu-item.open > .menu-link.menu-toggle {
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
}

.bg-menu-theme .menu-inner > .menu-item.open > .menu-link.menu-toggle i,
.bg-menu-theme .menu-inner > .menu-item.open > .menu-link.menu-toggle div,
.bg-menu-theme .menu-inner > .menu-item.open > .menu-link.menu-toggle span,
.bg-menu-theme .menu-item.open > .menu-link.menu-toggle div,
.bg-menu-theme .menu-item.open > .menu-link.menu-toggle span {
  color: #1e293b !important;
}

.bg-menu-theme .menu-inner > .menu-item.open > .menu-link.menu-toggle i,
.bg-menu-theme .menu-item.open > .menu-link.menu-toggle i {
  color: #4f46e5 !important;
}

/* Eliminate ALL pseudo-element dots across all sub-menus and open items */
.bg-menu-theme .menu-sub > .menu-item > .menu-link:before,
.bg-menu-theme .menu-sub > .menu-item > .menu-link:after,
.bg-menu-theme .menu-sub > .menu-item > .menu-link::before,
.bg-menu-theme .menu-sub > .menu-item > .menu-link::after,
[dir=rtl] .bg-menu-theme .menu-sub > .menu-item > .menu-link:before,
[dir=rtl] .bg-menu-theme .menu-sub > .menu-item > .menu-link::before,
.bg-menu-theme .menu-inner > .menu-item.open > .menu-sub::before,
.bg-menu-theme .menu-inner > .menu-item.open > .menu-sub:before,
.bg-menu-theme .menu-inner > .menu-item.open .menu-item.open > .menu-toggle::before,
.bg-menu-theme .menu-inner > .menu-item.open .menu-item.active > .menu-link::before,
.bg-menu-theme .menu-sub > .menu-item.active > .menu-link:not(.menu-toggle):before,
.bg-menu-theme .menu-sub > .menu-item.active > .menu-link:not(.menu-toggle)::before {
  display: none !important;
  content: none !important;
  width: 0 !important;
  height: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

/* Sub-menu box and link styling */
.bg-menu-theme .menu-sub {
  background-color: transparent !important;
  background: transparent !important;
  padding: 0.25rem 0 0.25rem 1rem !important;
  margin: 0 !important;
  box-shadow: none !important;
}

.bg-menu-theme .menu-sub > .menu-item > .menu-link {
  margin: 0.15rem 0.5rem !important;
  padding: 0.55rem 1rem !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  color: #475569 !important;
  border-radius: 8px !important;
  background: transparent !important;
  transition: all 0.15s ease !important;
}

.bg-menu-theme .menu-sub > .menu-item > .menu-link:hover {
  background-color: #f1f5f9 !important;
  color: #4f46e5 !important;
}

.bg-menu-theme .menu-sub > .menu-item > .menu-link div,
.bg-menu-theme .menu-sub > .menu-item > .menu-link span {
  color: #475569 !important;
}

.bg-menu-theme .menu-sub > .menu-item > .menu-link:hover div,
.bg-menu-theme .menu-sub > .menu-item > .menu-link:hover span {
  color: #4f46e5 !important;
}

.bg-menu-theme .menu-sub > .menu-item.active > .menu-link {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25) !important;
}

.bg-menu-theme .menu-sub > .menu-item.active > .menu-link div,
.bg-menu-theme .menu-sub > .menu-item.active > .menu-link span {
  color: #ffffff !important;
}

/* ===================================================================
 * Enterprise High-Density Table & DataTables Styling (Max Data on Screen)
 * =================================================================== */
.table,
table.dataTable {
  color: #1e293b !important;
  margin-bottom: 0 !important;
  font-size: 0.82rem !important;
  border-collapse: collapse !important;
}

.table th,
table.dataTable th,
.table thead th {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #64748b !important;
  background-color: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  border-top: 0 !important;
  padding: 0.55rem 0.75rem !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
}

.table td,
table.dataTable td,
.table tbody td {
  padding: 0.5rem 0.75rem !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #f1f5f9 !important;
  font-size: 0.82rem !important;
  line-height: 1.35 !important;
  color: #334155 !important;
}

.table-hover tbody tr:hover,
table.dataTable.table-hover tbody tr:hover {
  background-color: rgba(99, 102, 241, 0.04) !important;
}

/* Compact badges inside tables */
.table .badge,
table.dataTable .badge {
  padding: 0.22rem 0.45rem !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
  line-height: 1.1 !important;
  border-radius: 6px !important;
}

/* Compact buttons inside tables */
.table .btn,
table.dataTable .btn {
  padding: 0.22rem 0.5rem !important;
  font-size: 0.75rem !important;
  line-height: 1.2 !important;
  border-radius: 6px !important;
}

.table .btn-icon,
table.dataTable .btn-icon {
  width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* DataTables pagination & filter density */
.dataTables_wrapper {
  font-size: 0.8rem !important;
}

.dataTables_wrapper .row {
  margin: 0 !important;
  padding: 0.5rem 0.75rem !important;
  align-items: center !important;
}

.dataTables_wrapper .dataTables_length select {
  font-size: 0.78rem !important;
  padding: 0.25rem 1.75rem 0.25rem 0.5rem !important;
  border-radius: 6px !important;
}

.dataTables_wrapper .dataTables_filter input {
  font-size: 0.78rem !important;
  padding: 0.3rem 0.65rem !important;
  border-radius: 6px !important;
  margin-left: 0.5rem !important;
}

.dataTables_wrapper .dataTables_info {
  font-size: 0.78rem !important;
  color: #64748b !important;
  padding-top: 0.4rem !important;
}

.dataTables_wrapper .dataTables_paginate {
  font-size: 0.78rem !important;
}

.dataTables_wrapper .dataTables_paginate .pagination {
  margin-bottom: 0 !important;
}

.dataTables_wrapper .dataTables_paginate .page-link {
  font-size: 0.78rem !important;
  padding: 0.25rem 0.55rem !important;
  border-radius: 6px !important;
  margin: 0 2px !important;
}

.card-header {
  padding: 0.75rem 1.25rem !important;
}

.card-body {
  padding: 1rem 1.25rem !important;
}

/* ===================================================================
 * Copyable DNS Badges & Utility Chips
 * =================================================================== */
.copy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  font-family: monospace;
  font-size: 0.85rem;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-pill:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.copy-pill:active {
  transform: scale(0.97);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}