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

/* ==========================================================================
   Windows 11 Fluent Design Tokens
   ========================================================================== */
:root {
  --win-bg: #0f172a;
  --win-wallpaper-from: #0f172a;
  --win-wallpaper-via: #1e1b4b;
  --win-wallpaper-to: #030712;

  --accent-primary: #0078d4;
  --accent-hover: #1084d8;
  --accent-active: #006cc1;
  --accent-glow: rgba(0, 120, 212, 0.4);

  --mica-bg: rgba(30, 41, 59, 0.75);
  --mica-border: rgba(255, 255, 255, 0.12);
  --mica-border-hover: rgba(255, 255, 255, 0.2);
  --acrylic-panel: rgba(15, 23, 42, 0.85);

  --taskbar-bg: rgba(15, 23, 42, 0.8);
  --taskbar-border: rgba(255, 255, 255, 0.1);
  --taskbar-item-hover: rgba(255, 255, 255, 0.08);
  --taskbar-item-active: rgba(255, 255, 255, 0.15);

  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --text-dim: #64748b;

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #38bdf8;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-window: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.12);
  --shadow-taskbar: 0 -4px 20px rgba(0, 0, 0, 0.4);
  --shadow-start: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   Base Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Inter', Roboto, sans-serif;
  color: var(--text-main);
  background-color: var(--win-bg);
  user-select: none;
  font-size: 14px;
  line-height: 1.5;
}

/* Wallpaper Layer */
.desktop-wallpaper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 20%, rgba(99, 102, 241, 0.25), transparent 45%),
              radial-gradient(circle at 80% 80%, rgba(56, 189, 248, 0.2), transparent 40%),
              radial-gradient(circle at 20% 70%, rgba(168, 85, 247, 0.2), transparent 40%),
              linear-gradient(135deg, var(--win-wallpaper-from), var(--win-wallpaper-via), var(--win-wallpaper-to));
  z-index: 0;
  pointer-events: none;
}

/* Desktop Workspace Area */
.desktop-workspace {
  position: relative;
  width: 100vw;
  height: calc(100vh - 48px);
  z-index: 1;
  overflow: hidden;
  padding: 16px;
}

/* ==========================================================================
   Windows 11 Desktop Icons Grid
   ========================================================================== */
.desktop-icons-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, 96px);
  grid-auto-rows: 96px;
  grid-auto-flow: column;
  gap: 12px;
  max-height: calc(100vh - 80px);
  width: max-content;
  z-index: 2;
  position: relative;
}

.win-icon {
  width: 88px;
  height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  text-align: center;
}

.win-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.win-icon.selected {
  background: rgba(0, 120, 212, 0.25);
  border-color: rgba(0, 120, 212, 0.5);
  backdrop-filter: blur(12px);
}

.win-icon-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}

.win-icon:hover .win-icon-img {
  transform: scale(1.08);
}

.win-icon-img svg {
  width: 24px;
  height: 24px;
  stroke: #ffffff;
}

/* Icon Gradients */
.win-icon-blue   { background: linear-gradient(135deg, #0078d4, #005a9e); }
.win-icon-indigo { background: linear-gradient(135deg, #6366f1, #4338ca); }
.win-icon-amber  { background: linear-gradient(135deg, #f59e0b, #d97706); }
.win-icon-emerald{ background: linear-gradient(135deg, #10b981, #059669); }
.win-icon-purple { background: linear-gradient(135deg, #a855f7, #7e22ce); }
.win-icon-cyan   { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.win-icon-rose   { background: linear-gradient(135deg, #f43f5e, #be123c); }
.win-icon-slate  { background: linear-gradient(135deg, #64748b, #334155); }
.win-icon-yellow { background: linear-gradient(135deg, #eab308, #ca8a04); }
.win-icon-teal   { background: linear-gradient(135deg, #14b8a6, #0f766e); }

.win-icon-label {
  font-size: 11.5px;
  font-weight: 500;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 2px 6px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 82px;
}

/* ==========================================================================
   Live Desktop Widget Card (Windows 11 Live Summary)
   ========================================================================== */
.desktop-widgets-panel {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 340px;
  z-index: 2;
  pointer-events: auto;
}

.widget-glass-card {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: 18px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

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

.widget-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.widget-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
}

.widget-badge {
  font-size: 11px;
  color: var(--text-sub);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 12px;
}

.widget-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.widget-stat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.widget-stat-box:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.stat-number {
  font-size: 20px;
  font-weight: 700;
  color: #38bdf8;
  line-height: 1.2;
}

.stat-name {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 2px;
}

.widget-quick-actions {
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   Windows 11 Windowing System (Draggable, Resizable, Modal)
   ========================================================================== */
.windows-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.win11-window {
  position: absolute;
  min-width: 480px;
  min-height: 320px;
  background: var(--acrylic-panel);
  backdrop-filter: blur(25px) saturate(180%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-window);
  border: 1px solid var(--mica-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
  opacity: 1;
  transform: scale(1);
  transition: transform 0.2s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.2s ease;
}

.win11-window.opening {
  opacity: 0;
  transform: scale(0.92);
}

.win11-window.minimized {
  opacity: 0;
  transform: scale(0.85) translateY(100px);
  pointer-events: none !important;
}

.win11-window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
}

.win11-window.focused {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Window Titlebar */
.win-titlebar {
  height: 40px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: grab;
  user-select: none;
}

.win11-window.focused .win-titlebar {
  background: rgba(255, 255, 255, 0.06);
}

.win-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-main);
  pointer-events: none;
}

.win-title-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.win-title-icon svg {
  width: 16px;
  height: 16px;
  stroke: #38bdf8;
}

/* Windows 11 Native Style Window Controls */
.win-controls {
  display: flex;
  height: 100%;
  cursor: default;
}

.win-ctrl-btn {
  width: 46px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.1s ease;
}

.win-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.win-ctrl-btn.close:hover {
  background: #e81123;
  color: #ffffff;
}

.win-ctrl-btn svg {
  width: 10px;
  height: 10px;
}

/* Window Content Body */
.win-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.6);
  position: relative;
}

.win-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
}

.win-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   Windows 11 Centered Taskbar
   ========================================================================== */
.win11-taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 48px;
  background: var(--taskbar-bg);
  backdrop-filter: blur(25px) saturate(180%);
  border-top: 1px solid var(--taskbar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 1000;
  box-shadow: var(--shadow-taskbar);
}

.taskbar-left {
  display: flex;
  align-items: center;
  min-width: 140px;
}

.taskbar-widget-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.15s ease;
}

.taskbar-widget-btn:hover {
  background: var(--taskbar-item-hover);
  color: var(--text-main);
}

.taskbar-center {
  display: flex;
  align-items: center;
  gap: 4px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.taskbar-item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.taskbar-item:hover {
  background: var(--taskbar-item-hover);
}

.win-start-btn {
  color: #38bdf8;
}

.win-start-btn:hover {
  background: rgba(56, 189, 248, 0.15);
}

.taskbar-apps-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.taskbar-app-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.taskbar-app-btn:hover {
  background: var(--taskbar-item-hover);
}

.taskbar-app-btn.active {
  background: var(--taskbar-item-active);
}

.taskbar-app-btn::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 3px;
  border-radius: 3px;
  background: var(--text-dim);
  transition: all 0.15s ease;
}

.taskbar-app-btn.running::after {
  background: #38bdf8;
}

.taskbar-app-btn.active::after {
  width: 16px;
  background: #38bdf8;
}

.taskbar-app-icon svg {
  width: 20px;
  height: 20px;
}

.taskbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 140px;
  justify-content: flex-end;
}

.taskbar-tray-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.taskbar-tray-icons:hover {
  background: var(--taskbar-item-hover);
}

.user-avatar-small {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #0078d4, #6366f1);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.taskbar-clock-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
}

.taskbar-clock-panel:hover {
  background: var(--taskbar-item-hover);
}

.clock-time {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.2;
}

.clock-date {
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.2;
}

/* ==========================================================================
   Windows 11 Start Menu (Floating Modal)
   ========================================================================== */
.win11-start-menu {
  position: fixed;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%) translateY(20px) scale(0.95);
  width: 580px;
  max-height: 620px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-start);
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
  overflow: hidden;
}

.win11-start-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.start-menu-inner {
  padding: 24px 28px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.start-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 8px 16px;
}

.start-search-box svg {
  color: var(--text-dim);
}

.start-search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 13px;
}

.start-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.start-apps-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.start-app-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.start-app-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.start-app-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.start-app-icon svg {
  width: 20px;
  height: 20px;
  stroke: #ffffff;
}

.start-app-name {
  font-size: 11px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 68px;
}

.start-recent-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s ease;
}

.recent-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.recent-icon {
  font-size: 18px;
}

.recent-info {
  flex: 1;
}

.recent-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-main);
}

.recent-desc {
  font-size: 11px;
  color: var(--text-dim);
}

.start-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.start-user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.start-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0078d4, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #fff;
}

.start-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.start-user-role {
  font-size: 11px;
  color: var(--text-dim);
}

.win-power-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.win-power-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* ==========================================================================
   Command Palette (Spotlight / Ctrl + K)
   ========================================================================== */
.win-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.win-palette-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.win-palette-modal {
  width: 560px;
  background: var(--acrylic-panel);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.palette-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.palette-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--text-main);
}

.palette-esc-hint {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-dim);
}

.palette-results {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-main);
  transition: background 0.1s ease;
}

.palette-item:hover, .palette-item.active {
  background: rgba(0, 120, 212, 0.3);
}

/* ==========================================================================
   UI Components & Modules Inside Window Body
   ========================================================================== */
.page-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.stat-title {
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #38bdf8;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.table th {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-sub);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Buttons */
.win-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.win-btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
}

.win-btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 12px var(--accent-glow);
}

.win-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.win-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.win-btn-danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.win-btn-danger:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Windows 11 Modern Cards & Panels */
.card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  margin-bottom: 16px;
  overflow: hidden;
}

.card-header {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 600;
  font-size: 13.5px;
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body {
  padding: 18px;
}

/* Windows 11 Inputs, Selects & Textareas */
input[type="text"], input[type="email"], input[type="password"], 
input[type="date"], input[type="time"], input[type="datetime-local"], 
input[type="number"], select, textarea, .form-control {
  width: 100%;
  padding: 9px 13px;
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: var(--radius-md) !important;
  color: #f8fafc !important;
  font-size: 13px !important;
  font-family: inherit;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
  transition: all 0.15s ease;
  box-sizing: border-box;
}

select option {
  background: #1e293b;
  color: #f8fafc;
}

input:focus, select:focus, textarea:focus, .form-control:focus {
  border-color: #0078d4 !important;
  box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.35), inset 0 1px 2px rgba(0,0,0,0.3) !important;
  background: rgba(15, 23, 42, 0.85) !important;
}

.inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-form > * {
  flex: 1;
  min-width: 140px;
}

.inline-form > button {
  flex: 0 0 auto;
}

.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.form-row .col, .form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.btn, .btn-primary, .btn-secondary, .btn-danger, .btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  color: #ffffff;
}

.btn-primary {
  background: linear-gradient(135deg, #0078d4, #1084d8);
  box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1084d8, #0078d4);
  box-shadow: 0 6px 16px rgba(0, 120, 212, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}
.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 11.5px;
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 70px rgba(0,0,0,0.8);
  width: 520px;
  max-width: 95vw;
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

/* Toast Notifications */
.win-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.win-toast {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  color: var(--text-main);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  animation: slideIn 0.25s ease;
  pointer-events: auto;
}

.win-toast.success { border-left: 4px solid var(--success); }
.win-toast.error { border-left: 4px solid var(--danger); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 540px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  color: var(--text-main);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-header .close {
  font-size: 22px;
  cursor: pointer;
  color: var(--text-sub);
}

.modal-header .close:hover {
  color: #ef4444;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-success { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.badge-danger  { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-info    { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }

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

.page-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-primary { background: #0078d4; color: #fff; }
.btn-primary:hover { background: #1084d8; }
.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.4); color: #f87171; }
.btn-danger:hover { background: #ef4444; color: #fff; }
.btn-secondary { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.12); color: #fff; }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.15); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Grid & Cards */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.card { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--radius-lg); overflow: hidden; }
.card-header { padding: 12px 16px; background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid rgba(255, 255, 255, 0.08); font-weight: 600; display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; }
.card-body { padding: 16px; }

.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline-form select, .inline-form input { flex: 1; min-width: 130px; padding: 8px 12px; background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; color: #fff; font-size: 13px; outline: none; }
.form-row { display: flex; gap: 12px; margin-bottom: 12px; }
.col { flex: 1; }
.form-control { width: 100%; padding: 8px 12px; background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 6px; color: #fff; font-size: 13px; outline: none; }
.form-control:focus { border-color: #0078d4; box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.4); }

.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; border: 1px solid transparent; }
.alert-info { background: rgba(56, 189, 248, 0.15); border-color: rgba(56, 189, 248, 0.3); color: #38bdf8; }
.alert-warning { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.3); color: #fbbf24; }
.alert-success { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.3); color: #34d399; }
.alert-danger { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.3); color: #f87171; }

.text-right { text-align: right; }
.float-right { margin-left: auto; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }


