@charset "UTF-8";

/* WiKim Scientific Operations Console — presentation overlay.
 * Loaded last. Does not change routes, APIs, or business logic.
 * Font weights stay 400/700 (KoddiUDOnGothic files). Emphasis uses 700 sparingly.
 */

:root {
  --bg: #F5F6F8;
  --app-bg: #F5F6F8;
  --content-bg: #F5F6F8;
  --surface: #ffffff;
  --panel-bg: #ffffff;
  --card-bg: #ffffff;
  --surface-2: #F1F3F6;
  --surface-3: #E2E5EA;
  --surface-muted: #F1F3F6;
  --surface-elevated: #ffffff;
  --ink: #1E2430;
  --ink-2: #34464B;
  --muted: #6B7280;
  --line: #E2E5EA;
  --line-strong: #AEBFC4;
  --border: #E2E5EA;
  --border-strong: #AEBFC4;
  --border-color: #E2E5EA;
  --border-color-light: #EEF0F3;
  --kimchi: #C0392B;
  --kimchi-dark: #A8321F;
  --kimchi-soft: rgba(192, 57, 43, 0.1);
  --action: #C0392B;
  --action-hover: #A8321F;
  --primary: #C0392B;
  --primary-foreground: #ffffff;
  --green: #066657;
  --green-soft: #E1F3EF;
  --mustard: #8A5A14;
  --mustard-soft: #FFF4DC;
  --science: #3B4B5C;
  --science-strong: #1E2430;
  --science-soft: #EEF1F4;
  --success: #066657;
  --warning: #8A5A14;
  --destructive: #B42318;
  --info: #3B5C73;
  --color-primary: #C0392B;
  --color-primary-dk: #A8321F;
  --color-primary-lt: rgba(192, 57, 43, 0.1);
  --color-success: #066657;
  --color-success-lt: rgba(6, 102, 87, 0.1);
  --color-warning: #8A5A14;
  --color-warning-lt: rgba(138, 90, 20, 0.12);
  --color-danger: #B42318;
  --color-danger-lt: rgba(180, 35, 24, 0.08);
  --color-info: #3B5C73;
  --color-info-lt: rgba(59, 92, 115, 0.1);
  --sidebar: #111827;
  --sidebar-bg: #111827;
  --sidebar-2: #1D1F24;
  --sidebar-ink: #F1F5F7;
  --sidebar-ink-2: #C5D0D6;
  --sidebar-muted: #9BADB8;
  --sidebar-line: #32404F;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(192, 57, 43, 0.18);
  --sidebar-active-bg: rgba(192, 57, 43, 0.18);
  --sidebar-status: #1D1F24;
  --header-bg: rgba(245, 246, 248, 0.85);
  --login-panel: #ffffff;
  --login-ink: #1E2430;
  --login-muted: #6B7280;
  --login-line: #E2E5EA;
  --login-input: #F7F8FA;
  --login-control: #F1F3F6;
  --login-story: rgba(245, 246, 248, 0.92);
  --login-screen-overlay: rgba(245, 246, 248, 0.55);
  --shadow-sm: none;
  --shadow-md: 0 8px 24px rgba(16, 26, 29, 0.14);
  --shadow-lg: 0 16px 40px rgba(16, 26, 29, 0.18);
  --control-focus-border: var(--kimchi);
  --control-focus-ring: 0 0 0 3px color-mix(in srgb, var(--kimchi) 16%, transparent);
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--kimchi) 22%, transparent);
  --sidebar-width: 252px;
  --sidebar-w: 252px;
  --sidebar-rail-w: 72px;
  --topbar-h: 56px;
  --radius: 10px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 13px;
  --text-body-sm: 14px;
  --text-base: 15px;
  --chart-1: #C0392B;
  --chart-2: #5B6773;
  --chart-3: #8A93A0;
  --chart-4: #066657;
  --chart-5: #8A5A14;
  --chart-6: #AEBFC4;
  --chart-neutral: #8A93A0;
  --transition-fast: 140ms ease;
  --transition-med: 160ms ease;
}

:root[data-theme="dark"] {
  --bg: #101820;
  --app-bg: #101820;
  --content-bg: #101820;
  --surface: #18242E;
  --panel-bg: #18242E;
  --card-bg: #18242E;
  --surface-2: #1C2A35;
  --surface-3: #243441;
  --surface-muted: #1C2A35;
  --ink: #EDF3F4;
  --ink-2: #C5D0D6;
  --muted: #9BADB8;
  --line: #34454E;
  --line-strong: #4A5C66;
  --border: #34454E;
  --border-strong: #4A5C66;
  --border-color: #34454E;
  --border-color-light: #2A3A44;
  --kimchi: #E05A4A;
  --kimchi-dark: #C0392B;
  --kimchi-soft: rgba(224, 90, 74, 0.16);
  --action: #C0392B;
  --action-hover: #A8321F;
  --green: #4EC9A8;
  --green-soft: #173931;
  --mustard: #E0B762;
  --mustard-soft: #3B311E;
  --science: #C5D0D6;
  --science-strong: #EDF3F4;
  --science-soft: rgba(197, 208, 214, 0.12);
  --color-primary: #E05A4A;
  --color-primary-dk: #FF8D78;
  --color-primary-lt: rgba(224, 90, 74, 0.16);
  --sidebar: #111827;
  --sidebar-bg: #111827;
  --sidebar-2: #18242E;
  --header-bg: rgba(16, 24, 32, 0.88);
  --login-panel: #18242E;
  --login-ink: #EDF3F4;
  --login-muted: #9BADB8;
  --login-line: #34454E;
  --login-input: #101820;
  --login-control: #1C2A35;
  --login-screen-overlay: rgba(16, 24, 32, 0.72);
  --shadow-sm: none;
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
}

html,
body {
  background: var(--bg);
  color: var(--ink);
}

button:focus-visible,
a:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--kimchi) 78%, transparent);
  outline-offset: 2px;
}

.skip-link {
  background: var(--kimchi);
  border-radius: 8px;
}

.eyebrow {
  color: var(--muted);
  letter-spacing: 0;
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: none;
}

.button {
  min-height: 40px;
  border-radius: 8px;
  font-weight: 700;
  box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
  .button:hover:not(:disabled):not([aria-busy="true"]) {
    transform: none;
  }

  .button:active:not(:disabled):not([aria-busy="true"]) {
    transform: scale(0.98);
  }
}

.button.primary,
.button.login-submit {
  background: var(--kimchi);
  border-color: var(--kimchi);
  color: #fff;
  box-shadow: none;
}

.button.primary:hover:not(:disabled),
.button.login-submit:hover:not(:disabled) {
  background: var(--kimchi-dark);
  border-color: var(--kimchi-dark);
}

.button.secondary {
  background: var(--surface);
  color: var(--ink-2);
  border: 1px solid var(--line);
  box-shadow: none;
}

.workspace {
  background: var(--bg);
}

.page {
  padding: 24px 28px 40px;
  gap: 20px;
}

.topbar {
  min-height: var(--topbar-h);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

.topbar-title h2 {
  font-size: 16px;
  font-weight: 700;
}

.breadcrumb {
  color: var(--muted);
  font-size: var(--text-xs);
}

.sidebar {
  background: var(--sidebar);
  width: var(--sidebar-width);
}

.nav-section {
  margin: 16px 12px 6px;
  padding: 0 8px;
  color: var(--sidebar-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

html.sidebar-collapsed .nav-section {
  display: none;
}

.nav-item.active,
.nav-item[aria-current="page"] {
  background: var(--sidebar-active);
  color: var(--sidebar-ink);
  box-shadow: inset 3px 0 0 var(--kimchi);
  border-left-color: transparent;
}

.nav-toggle[aria-expanded="true"] {
  color: var(--sidebar-ink);
}

.metric-card,
.panel,
.project-command,
.gka-dash-metric,
.gka-dash-panel,
.source-ribbon,
.queue-toolbar,
.quality-strip,
.workflow-summary-grid > *,
.dashboard-metric-card,
.compact-hero,
.page-heading {
  box-shadow: none !important;
}

.metric-card,
.panel,
.dashboard-metric-card,
.gka-dash-metric,
.gka-dash-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.metric-card:hover,
.panel:hover,
.dashboard-metric-card:hover {
  transform: none;
  box-shadow: none;
}

.metric-card > strong,
.dashboard-metric-card strong,
.gka-dash-metric strong {
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
}

.dashboard-filter-bar,
.filter-bar,
.list-toolbar,
.plans-toolbar,
.workflow-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: none;
}

table thead th,
.data-table thead th,
.table thead th {
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}

table tbody tr,
.data-table tbody tr {
  background: transparent;
}

table tbody tr:hover,
.data-table tbody tr:hover {
  background: color-mix(in srgb, var(--surface-2) 80%, transparent);
}

.status-badge,
.data-badge,
.health-pill,
.nav-badge,
.badge {
  border-radius: 9999px;
  font-weight: 700;
  box-shadow: none;
}

.login-screen {
  background: var(--bg);
}

.login-bg-overlay {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
}

.login-card {
  background: var(--login-panel);
  border: 1px solid var(--login-line);
  border-radius: 16px;
  box-shadow: none;
}

.login-system-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
}

.login-slogan {
  color: var(--login-muted);
  font-size: var(--text-base);
  font-weight: 400;
}

.popup-menu,
.command-palette,
.modal,
.drawer,
.dialog,
[role="dialog"] {
  box-shadow: var(--shadow-lg);
}

.empty-state,
.dashboard-inline-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink-2);
}

@media (max-width: 1024px) {
  .page {
    padding: 20px 20px 32px;
  }
}

@media (max-width: 768px) {
  .page {
    padding: 16px 16px 28px;
  }

  .metric-grid,
  .integrated-metrics,
  .apex-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 660px) {
  .metric-grid,
  .integrated-metrics,
  .apex-kpi-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Unified card density — ops console spacing */
.page {
  gap: 16px;
}

.compact-hero,
.page-heading,
.dashboard-section-heading {
  margin-bottom: 0;
}

.compact-hero {
  padding: 14px 16px;
}

.metric-grid,
.integrated-metrics,
.kscia-overview-metrics,
.pims-metrics {
  gap: 12px;
}

.metric-card,
.dashboard-metric-card,
.gka-dash-metric {
  padding: 12px 14px;
}

.panel,
.project-command,
.source-ribbon,
.workflow-summary-grid > *,
.gka-dash-panel {
  padding: 14px 16px;
}

.panel-header,
.dashboard-section-heading.apex-section-head {
  margin-bottom: 10px;
  gap: 10px;
}

.panel .panel {
  padding: 12px 14px;
  background: var(--surface-2);
  border-color: var(--border-color-light);
  box-shadow: none !important;
}

#homePage .panel {
  padding: 14px 16px;
  box-shadow: none !important;
}

.dashboard-work-queue-section,
.dashboard-program-section {
  gap: 12px;
}

.apex-home-ops,
.apex-home-mid,
.apex-home-bottom,
.dash-grid-ops,
.dash-grid-charts {
  gap: 12px;
}

.settings-block {
  padding: 14px 16px;
}

/* Admin dashboard layout (reference: next-shadcn-admin-dashboard-baseui) */
.app-shell {
  background: var(--bg);
}

.workspace {
  max-width: 1600px;
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-title h2 {
  font-size: 18px;
  line-height: 1.35;
}

.page {
  max-width: 1600px;
  margin-inline: auto;
  width: 100%;
}

.compact-hero h1,
.page-heading h1 {
  font-size: 26px;
  line-height: 1.35;
}

.dashboard-section-heading h2,
.panel-header h2,
.panel-header h3 {
  font-size: 16px;
}

html.sidebar-collapsed .sidebar-brand .ci-light,
html.sidebar-collapsed .sidebar-brand .ci-dark,
html.sidebar-collapsed .nav-toggle-label,
html.sidebar-collapsed .nav-item span,
html.sidebar-collapsed .nav-section,
html.sidebar-collapsed .sidebar-admin-copy,
html.sidebar-collapsed .sidebar-admin-actions span {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

html.sidebar-collapsed .sidebar {
  width: var(--sidebar-rail-w);
}

html.sidebar-collapsed .nav-item,
html.sidebar-collapsed .nav-toggle {
  justify-content: center;
  padding-inline: 10px;
}
