/* VIP COMMAND - unified theme based on futuristic_cyber_ui_preview.pdf */
html.cyber-theme {
  --mc-canvas: #2864e8;
  --mc-canvas-deep: #1d4ed8;
  --mc-sidebar: #0b1324;
  --mc-panel: #13203a;
  --mc-panel-soft: #1d438b;
  --mc-panel-hover: #244d9d;
  --mc-line: rgba(148, 163, 184, .18);
  --mc-text: #f8fafc;
  --mc-muted: #9aa9c0;
  --mc-dim: #64748b;
  --mc-cyan: #39c8ff;
  --mc-purple: #d37aff;
  --mc-green: #4bf17a;
  --mc-red: #ff6b70;
  --mc-yellow: #ffc928;
  background: var(--mc-canvas) !important;
  color-scheme: dark;
}

html.cyber-theme body,
html.cyber-theme .app-shell,
html.cyber-theme .app-shell main,
html.cyber-theme #content,
html.cyber-theme .content,
html.cyber-theme .app-content,
html.cyber-theme .view-container {
  color: var(--mc-text) !important;
  background: var(--mc-canvas) !important;
  background-image: radial-gradient(circle at 68% 12%, rgba(96, 165, 250, .18), transparent 28%), linear-gradient(135deg, var(--mc-canvas), var(--mc-canvas-deep)) !important;
}

html.cyber-theme .sidebar,
html.cyber-theme body[data-layout="professional"] .sidebar {
  width: 248px !important;
  padding: 24px 20px !important;
  background: var(--mc-sidebar) !important;
  border: 0 !important;
  border-right: 1px solid rgba(148, 163, 184, .12) !important;
  box-shadow: 18px 0 48px rgba(3, 7, 18, .2) !important;
}
html.cyber-theme .sidebar::after { display: none !important; }
html.cyber-theme .app-shell main,
html.cyber-theme body[data-layout="professional"] .app-shell main { margin-left: 248px !important; }
html.cyber-theme .brand { padding: 8px 2px 28px !important; border: 0 !important; color: #fff !important; }
html.cyber-theme .brand-mark { width: 38px; height: 38px; border-radius: 11px !important; background: linear-gradient(145deg, #3dd6ff, #3b82f6 55%, #8b5cf6) !important; color: #fff !important; box-shadow: 0 0 26px rgba(56, 189, 248, .28) !important; }
html.cyber-theme .brand b { color: #fff !important; font-size: 18px; letter-spacing: .02em; }
html.cyber-theme .brand em { color: var(--mc-cyan); font-style: normal; }
html.cyber-theme .brand small { color: #607087 !important; text-transform: uppercase; letter-spacing: .14em; }
html.cyber-theme .sidebar-install { background: rgba(37, 99, 235, .16) !important; color: #9fdcff !important; border: 1px solid rgba(56, 189, 248, .18) !important; border-radius: 10px !important; }
html.cyber-theme .nav { gap: 7px !important; }
html.cyber-theme .nav button,
html.cyber-theme .nav-group summary,
html.cyber-theme body[data-layout="professional"] .nav button {
  min-height: 44px !important;
  padding: 0 12px !important;
  border: 1px solid transparent !important;
  border-radius: 11px !important;
  color: #aab7ca !important;
  background: transparent !important;
  font-weight: 650;
}
html.cyber-theme .nav button:hover,
html.cyber-theme .nav button.active,
html.cyber-theme .nav-group summary:hover,
html.cyber-theme body[data-layout="professional"] .nav button.active {
  color: #75d9ff !important;
  background: linear-gradient(100deg, #1f78f0, #5557ee 62%, #8456ea) !important;
  border-color: rgba(125, 211, 252, .45) !important;
  box-shadow: 0 8px 28px rgba(37, 99, 235, .28), inset 0 0 0 1px rgba(255, 255, 255, .06) !important;
}
html.cyber-theme .nav button .icon,
html.cyber-theme .nav-group summary .icon {
  width: 28px !important;
  height: 28px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 9px !important;
  background: rgba(148, 163, 184, .10) !important;
  color: #93c5fd !important;
  font-size: 17px !important;
  transition: transform .2s ease, box-shadow .2s ease, color .2s ease, background .2s ease;
}
html.cyber-theme .nav button:nth-child(4n+1) .icon { color: #54e9ff !important; background: rgba(6, 182, 212, .15) !important; }
html.cyber-theme .nav button:nth-child(4n+2) .icon { color: #ca90ff !important; background: rgba(168, 85, 247, .15) !important; }
html.cyber-theme .nav button:nth-child(4n+3) .icon { color: #5df58c !important; background: rgba(34, 197, 94, .14) !important; }
html.cyber-theme .nav button:nth-child(4n) .icon { color: #ffd35e !important; background: rgba(245, 158, 11, .14) !important; }
html.cyber-theme .nav button:hover .icon,
html.cyber-theme .nav button.active .icon {
  color: #fff !important;
  background: linear-gradient(145deg, #20c8ff, #4f46e5 56%, #a855f7) !important;
  box-shadow: 0 0 18px rgba(56, 189, 248, .66) !important;
  transform: translateY(-1px) scale(1.08) rotate(-4deg);
  animation: mc-icon-pulse 1.8s ease-in-out infinite;
}
html.cyber-theme .nav-group[open] summary .icon { color: #fff !important; background: rgba(56, 189, 248, .25) !important; box-shadow: 0 0 14px rgba(56, 189, 248, .32); }
@keyframes mc-icon-pulse { 50% { box-shadow: 0 0 28px rgba(168, 85, 247, .72); } }
@media (prefers-reduced-motion: reduce) { html.cyber-theme .nav button.active .icon { animation: none; } }
html.cyber-theme .nav-group { border-color: rgba(148, 163, 184, .12) !important; }
html.cyber-theme .user-card { border-color: rgba(148, 163, 184, .14) !important; color: #cbd5e1 !important; }

html.cyber-theme .topbar,
html.cyber-theme body[data-layout="professional"] .topbar {
  min-height: 76px !important;
  background: rgba(11, 19, 36, .84) !important;
  border-bottom: 1px solid rgba(148, 163, 184, .14) !important;
  box-shadow: none !important;
  backdrop-filter: blur(18px) !important;
}
html.cyber-theme .topbar h1,
html.cyber-theme .topbar p { color: var(--mc-text) !important; }
html.cyber-theme .topbar p { color: var(--mc-cyan) !important; }
html.cyber-theme .search { background: rgba(19, 32, 58, .9) !important; border: 1px solid var(--mc-line) !important; color: var(--mc-text) !important; }
html.cyber-theme .search input { color: var(--mc-text) !important; }

html.cyber-theme #content,
html.cyber-theme .content,
html.cyber-theme body[data-layout="professional"] .content { max-width: 1680px !important; padding: 28px 34px 56px !important; }
html.cyber-theme .page-heading { align-items: center !important; margin-bottom: 20px !important; }
html.cyber-theme .page-heading h2 { margin: 0 !important; color: #fff !important; font-size: clamp(24px, 3vw, 38px) !important; line-height: 1.08; letter-spacing: .01em; }
html.cyber-theme .page-heading p { color: #dbeafe !important; font-size: 14px !important; }
html.cyber-theme .section-kicker { color: var(--mc-cyan) !important; letter-spacing: .13em !important; }

html.cyber-theme .panel,
html.cyber-theme .widget,
html.cyber-theme .glass-card,
html.cyber-theme .glass-kpi,
html.cyber-theme .metric,
html.cyber-theme .project-card,
html.cyber-theme .finance-card,
html.cyber-theme .health-card,
html.cyber-theme .report-card,
html.cyber-theme .summary-strip,
html.cyber-theme .budget-hero,
html.cyber-theme .workspace-section,
html.cyber-theme .module-card,
html.cyber-theme .record360-card,
html.cyber-theme .client360-card,
html.cyber-theme .table-container {
  color: var(--mc-text) !important;
  background: rgba(19, 32, 58, .94) !important;
  border: 1px solid var(--mc-line) !important;
  border-radius: 16px !important;
  box-shadow: 0 16px 44px rgba(8, 15, 35, .2) !important;
  backdrop-filter: blur(14px) !important;
}
html.cyber-theme .panel-header,
html.cyber-theme body[data-layout="professional"] .panel-header {
  color: var(--mc-text) !important;
  background: transparent !important;
  border-color: var(--mc-line) !important;
}
html.cyber-theme .panel-header h2,
html.cyber-theme .panel h2,
html.cyber-theme .panel h3,
html.cyber-theme .card-title,
html.cyber-theme h1,
html.cyber-theme h2,
html.cyber-theme h3 { color: #fff !important; }
html.cyber-theme p,
html.cyber-theme small,
html.cyber-theme .text-muted,
html.cyber-theme .stat-desc,
html.cyber-theme .sub-text { color: var(--mc-muted) !important; }

html.cyber-theme .mc-portfolio { padding: 26px 28px !important; margin-bottom: 24px; background: var(--mc-panel) !important; border-radius: 22px !important; }
html.cyber-theme .mc-portfolio-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
html.cyber-theme .mc-portfolio-head strong { color: #fff; font-size: clamp(30px, 4vw, 46px); letter-spacing: .01em; }
html.cyber-theme .mc-portfolio-label { display: flex; align-items: center; gap: 14px; color: var(--mc-muted); font-weight: 800; letter-spacing: .09em; }
html.cyber-theme .mc-portfolio-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; font-weight: 800; font-size: 13px; }
html.cyber-theme .mc-paid { color: var(--mc-cyan); }
html.cyber-theme .mc-left { color: var(--mc-purple); }
html.cyber-theme .glass-progress { width: 100%; height: 10px; margin-top: 22px; border: 0; border-radius: 999px; overflow: hidden; appearance: none; background: rgba(148, 163, 184, .14) !important; }
html.cyber-theme .glass-progress::-webkit-progress-bar { background: rgba(148, 163, 184, .14); }
html.cyber-theme .glass-progress::-webkit-progress-value { background: linear-gradient(90deg, #06b6d4, #3b82f6, #8b5cf6); border-radius: 999px; }
html.cyber-theme .glass-progress::-moz-progress-bar { background: linear-gradient(90deg, #06b6d4, #3b82f6, #8b5cf6); border-radius: 999px; }
html.cyber-theme .mc-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0 0 30px; }
html.cyber-theme .mc-kpi { min-height: 146px; padding: 24px 22px !important; background: var(--mc-panel-soft) !important; }
html.cyber-theme .mc-kpi span:first-child { display: block; color: var(--mc-muted); font-weight: 800; font-size: 12px; text-transform: uppercase; }
html.cyber-theme .mc-kpi strong { display: block; margin: 14px 0 12px; color: #fff; font-size: 30px; }
html.cyber-theme .mc-kpi.good strong { color: var(--mc-green); }
html.cyber-theme .mc-kpi.warn strong { color: var(--mc-yellow); }
html.cyber-theme .mc-kpi.bad strong { color: var(--mc-red); }
html.cyber-theme .mc-kpi.info strong { color: var(--mc-cyan); }
html.cyber-theme .mc-pipeline-title { margin: 0 0 16px; color: #fff; font-size: 16px; letter-spacing: .04em; text-transform: uppercase; }
html.cyber-theme .mc-pipeline { display: grid; grid-template-columns: repeat(6, minmax(190px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 10px; }
html.cyber-theme .mc-stage { min-height: 340px; padding: 16px !important; background: rgba(29, 67, 139, .9) !important; }
html.cyber-theme .mc-stage-head { display: flex; align-items: center; justify-content: space-between; min-height: 36px; padding-bottom: 10px; border-bottom: 1px solid rgba(148, 163, 184, .16); color: var(--mc-muted); font-size: 12px; font-weight: 850; text-transform: uppercase; }
html.cyber-theme .mc-stage-list { display: grid; gap: 12px; padding-top: 14px; }
html.cyber-theme .mc-project { padding: 14px; background: rgba(19, 32, 58, .88); border: 1px solid rgba(148, 163, 184, .14); border-radius: 12px; color: #fff; cursor: pointer; }
html.cyber-theme .mc-project:hover { transform: translateY(-1px); border-color: rgba(56, 189, 248, .42); box-shadow: 0 10px 24px rgba(8, 15, 35, .22); }
html.cyber-theme .mc-project b { display: block; line-height: 1.35; }
html.cyber-theme .mc-project strong { display: block; margin: 9px 0; color: var(--mc-cyan); }

html.cyber-theme .badge-purple,
html.cyber-theme .badge-cyan,
html.cyber-theme .badge-blue,
html.cyber-theme .badge-green,
html.cyber-theme .badge-red,
html.cyber-theme .status { display: inline-flex; align-items: center; width: fit-content; padding: 5px 10px !important; border-radius: 7px !important; font-size: 10px !important; font-weight: 850 !important; letter-spacing: .04em; text-transform: uppercase; }
html.cyber-theme .badge-purple { color: var(--mc-purple); background: rgba(168, 85, 247, .16); border: 1px solid rgba(192, 132, 252, .42); }
html.cyber-theme .badge-cyan,
html.cyber-theme .badge-blue { color: var(--mc-cyan); background: rgba(6, 182, 212, .14); border: 1px solid rgba(34, 211, 238, .35); }
html.cyber-theme .badge-green,
html.cyber-theme .status.green { color: var(--mc-green); background: rgba(34, 197, 94, .13); border: 1px solid rgba(74, 222, 128, .34); }
html.cyber-theme .badge-red,
html.cyber-theme .status.red { color: var(--mc-red); background: rgba(239, 68, 68, .13); border: 1px solid rgba(248, 113, 113, .4); }
html.cyber-theme .status.gold { color: var(--mc-yellow); background: rgba(245, 158, 11, .13); border: 1px solid rgba(251, 191, 36, .38); }

html.cyber-theme table,
html.cyber-theme .glass-table { width: 100% !important; color: var(--mc-text) !important; background: transparent !important; border-collapse: collapse !important; }
html.cyber-theme th,
html.cyber-theme .glass-table th,
html.cyber-theme body[data-layout="professional"] th { padding: 12px 14px !important; background: rgba(11, 19, 36, .48) !important; color: var(--mc-muted) !important; border-color: var(--mc-line) !important; font-size: 10px !important; text-transform: uppercase; }
html.cyber-theme td,
html.cyber-theme .glass-table td,
html.cyber-theme body[data-layout="professional"] td { padding: 14px !important; color: var(--mc-text) !important; background: transparent !important; border-color: var(--mc-line) !important; }
html.cyber-theme .interactive-table tbody tr:hover { background: rgba(59, 130, 246, .12) !important; }
html.cyber-theme .table-wrap { border: 1px solid var(--mc-line) !important; border-radius: 12px; background: rgba(11, 19, 36, .18) !important; }

html.cyber-theme input,
html.cyber-theme select,
html.cyber-theme textarea,
html.cyber-theme .field input,
html.cyber-theme .field select,
html.cyber-theme .field textarea,
html.cyber-theme .filter {
  color: var(--mc-text) !important;
  background: rgba(11, 19, 36, .74) !important;
  border: 1px solid rgba(148, 163, 184, .24) !important;
  border-radius: 9px !important;
  outline: none !important;
}
html.cyber-theme input::placeholder,
html.cyber-theme textarea::placeholder { color: #718096 !important; }
html.cyber-theme input:focus,
html.cyber-theme select:focus,
html.cyber-theme textarea:focus { border-color: var(--mc-cyan) !important; box-shadow: 0 0 0 3px rgba(34, 211, 238, .12) !important; }
html.cyber-theme option { color: var(--mc-text); background: var(--mc-panel); }
html.cyber-theme label,
html.cyber-theme .field label { color: var(--mc-muted) !important; }
html.cyber-theme .filters { padding: 14px !important; background: rgba(11, 19, 36, .28) !important; border: 1px solid var(--mc-line) !important; border-radius: 12px !important; }
html.cyber-theme .dropzone { color: var(--mc-muted) !important; background: rgba(11, 19, 36, .38) !important; border-color: rgba(56, 189, 248, .32) !important; }
html.cyber-theme .btn { color: var(--mc-text) !important; background: rgba(30, 65, 130, .72) !important; border: 1px solid rgba(125, 211, 252, .22) !important; border-radius: 9px !important; }
html.cyber-theme .btn.primary,
html.cyber-theme .btn-primary { background: linear-gradient(135deg, #2563eb, #4f46e5 58%, #7c3aed) !important; border-color: rgba(56, 189, 248, .42) !important; box-shadow: 0 0 18px rgba(37, 99, 235, .35) !important; }
html.cyber-theme .btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
html.cyber-theme .text-btn { color: var(--mc-cyan) !important; }

html.cyber-theme .modal .backdrop { background: rgba(3, 7, 18, .78) !important; backdrop-filter: blur(6px); }
html.cyber-theme .dialog,
html.cyber-theme body[data-layout="professional"] .dialog { color: var(--mc-text) !important; background: #101c34 !important; border-left: 1px solid rgba(56, 189, 248, .18) !important; box-shadow: -20px 0 64px rgba(3, 7, 18, .6) !important; }
html.cyber-theme .dialog header,
html.cyber-theme body[data-layout="professional"] .dialog header { background: #101c34 !important; border-color: var(--mc-line) !important; }
html.cyber-theme .dialog .icon-btn { color: var(--mc-muted) !important; }
html.cyber-theme .type-tabs button { color: var(--mc-muted) !important; background: rgba(11, 19, 36, .66) !important; border-color: var(--mc-line) !important; }
html.cyber-theme .type-tabs button.active { color: var(--mc-cyan) !important; background: rgba(37, 99, 235, .2) !important; border-color: rgba(56, 189, 248, .45) !important; }
html.cyber-theme .empty { color: var(--mc-muted) !important; }
html.cyber-theme .login-screen { background: radial-gradient(circle at 50% 20%, rgba(37, 99, 235, .34), transparent 42%), var(--mc-sidebar) !important; }
html.cyber-theme .login-panel { color: var(--mc-text) !important; background: rgba(19, 32, 58, .96) !important; border: 1px solid var(--mc-line); border-radius: 18px !important; box-shadow: 0 28px 90px rgba(3, 7, 18, .58) !important; }

html.cyber-theme div[style*="background-color: white"],
html.cyber-theme div[style*="background: white"],
html.cyber-theme div[style*="background: #fff"],
html.cyber-theme div[style*="background:#fff"],
html.cyber-theme section[style*="background: #fff"] { background: rgba(19, 32, 58, .94) !important; color: var(--mc-text) !important; }

@media (max-width: 1180px) {
  html.cyber-theme .mc-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.cyber-theme .mc-pipeline { grid-template-columns: repeat(6, 220px); }
}
@media (max-width: 900px) {
  html.cyber-theme .sidebar { width: 256px !important; }
  html.cyber-theme .app-shell main,
  html.cyber-theme body[data-layout="professional"] .app-shell main { margin-left: 0 !important; }
  html.cyber-theme #content,
  html.cyber-theme .content { padding: 20px 16px 96px !important; }
}
@media (max-width: 640px) {
  html.cyber-theme .mc-kpi-grid { grid-template-columns: 1fr; }
  html.cyber-theme .mc-portfolio-head,
  html.cyber-theme .mc-portfolio-foot { align-items: flex-start; flex-direction: column; }
  html.cyber-theme .topbar { background: rgba(11, 19, 36, .94) !important; }
  html.cyber-theme .bottom-nav { background: var(--mc-sidebar) !important; border-color: var(--mc-line) !important; }
  html.cyber-theme .bottom-nav button { color: var(--mc-muted) !important; background: transparent !important; }
}

/* Wspólne okna akcji: centralny panel Mission Control zamiast prawego drawer'a. */
html.cyber-theme .modal,
html.cyber-theme .modal.open {
  position: fixed !important;
  inset: 0 !important;
  z-index: 50 !important;
}
html.cyber-theme .modal.open {
  display: grid !important;
  place-items: center !important;
  padding: 28px !important;
}
html.cyber-theme .modal .backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(3, 7, 18, .76) !important;
  backdrop-filter: blur(7px) saturate(.85) !important;
}
html.cyber-theme .dialog,
html.cyber-theme .dialog.project-dialog,
html.cyber-theme .dialog.estimate-dialog,
html.cyber-theme body[data-layout="professional"] .dialog {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  z-index: 1 !important;
  width: min(820px, calc(100vw - 56px)) !important;
  height: auto !important;
  max-height: calc(100vh - 56px) !important;
  padding: 28px !important;
  overflow: auto !important;
  color: var(--mc-text) !important;
  border: 1px solid rgba(125, 211, 252, .24) !important;
  border-radius: 20px !important;
  background:
    radial-gradient(circle at 90% 0%, rgba(139, 92, 246, .22), transparent 34%),
    linear-gradient(145deg, rgba(23, 39, 72, .98), #101a30 64%) !important;
  box-shadow: 0 28px 90px rgba(3, 7, 18, .72), 0 0 0 1px rgba(255, 255, 255, .04) inset !important;
  animation: mc-dialog-in .2s ease-out both;
}
html.cyber-theme .dialog.project-dialog,
html.cyber-theme .dialog.estimate-dialog {
  width: min(1180px, calc(100vw - 56px)) !important;
}
html.cyber-theme .dialog header,
html.cyber-theme body[data-layout="professional"] .dialog header {
  position: sticky !important;
  top: 0 !important;
  z-index: 2 !important;
  margin: 0 0 20px !important;
  padding: 0 0 18px !important;
  background: rgba(16, 26, 48, .96) !important;
  border-bottom: 1px solid var(--mc-line) !important;
}
@keyframes mc-dialog-in {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 640px) {
  html.cyber-theme .modal.open {
    place-items: end center !important;
    padding: 0 !important;
  }
  html.cyber-theme .dialog,
  html.cyber-theme .dialog.project-dialog,
  html.cyber-theme .dialog.estimate-dialog,
  html.cyber-theme body[data-layout="professional"] .dialog {
    width: 100% !important;
    max-height: 92vh !important;
    padding: 20px !important;
    border-radius: 22px 22px 0 0 !important;
  }
}
