html, body, #root {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f8fafc; /* slate-50 */
  color: #1e293b; /* slate-800 */
}

/* Ant Layout Overrides for Modern Desktop App */
.ant-layout {
  min-height: 100vh;
  width: 100vw;
  background-color: transparent !important;
}

/* The primary working canvas */
.system-panel {
  padding: 24px 32px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05); /* Tailwind shadow-md */
  min-height: calc(100vh - 120px);
  border: 1px solid #f1f5f9;
  overflow: hidden;
}

@media (max-width: 991px) {
  .system-panel {
    padding: 16px;
    min-height: calc(100vh - 108px);
    border-radius: 10px;
  }
}

/* Glassmorphism Header */
.ant-layout-header.glass-header {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Sider Dark Theme Overrides */
.ant-layout-sider.premium-sider {
  background: #0f172a !important; /* slate-900 */
  border-right: 1px solid #1e293b;
}

.premium-sider .ant-menu {
  background: transparent !important;
}

.premium-sider .ant-menu-item-selected {
  background-color: #4f46e5 !important; /* indigo-600 */
  border-radius: 8px;
  color: white !important;
}

.premium-sider .ant-menu-submenu-selected > .ant-menu-submenu-title {
  color: #4f46e5 !important;
}

.premium-sider .ant-menu-item:hover, .premium-sider .ant-menu-submenu-title:hover {
  color: white !important;
}

@media (max-width: 991px) {
  .ant-layout {
    width: 100%;
    overflow-x: hidden;
  }
}

/* Breathing Animation for Premium Cards */
@keyframes breathing {
  0% { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05); }
  50% { box-shadow: 0 10px 20px -5px rgb(79 70 229 / 0.1); }
  100% { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05); }
}

.breathing-shadow {
  animation: breathing 4s ease-in-out infinite;
}

/* Modern Card Hover Effects */
.hover-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  background: white;
}
.hover-card .ant-card-head {
  border-bottom: 1px solid #f1f5f9;
  padding: 0 24px;
}
.hover-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1) !important;
  border-color: #4f46e5 !important;
}

/* Ant Table Modernization */
.ant-table {
  background: transparent !important;
}
.ant-table-wrapper .ant-table-thead > tr > th {
  background: #f8fafc !important;
  color: #475569 !important;
  font-weight: 700 !important;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  border-bottom: 2px solid #e2e8f0 !important;
}
.ant-table-wrapper .ant-table-tbody > tr > td {
  padding: 16px 24px !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

/* Scrollbar Refinement */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1;
}
