﻿:root {
  color-scheme: light;
  --ink: #1d252c;
  --muted: #66717d;
  --line: #d9e0e6;
  --panel: #ffffff;
  --page: #f4f7f9;
  --nav: #17212b;
  --nav-hover: #22313f;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --danger: #b42318;
  --ok: #136f3f;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--page); font-family: Arial, Helvetica, sans-serif; }
button, input, select { font: inherit; }
.app-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 28px; color: white; background: #101820; border-bottom: 4px solid var(--accent); }
h1, h2, h3, p { letter-spacing: 0; }
.app-header h1, .module-title h2, .panel-heading h3, .upload-panel h3, .control-panel h3 { margin: 0; }
.eyebrow { margin: 0 0 4px; color: #8fcac4; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.auth-status, .button-row { display: flex; align-items: center; gap: 12px; }
.auth-status { color: #dce7ec; font-size: 14px; flex-wrap: wrap; justify-content: flex-end; }
.role-switch { display: flex; align-items: center; gap: 8px; }
.role-switch select { min-height: 34px; border-radius: 7px; border: 1px solid #5d717e; color: white; background: #17212b; }
.app-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - 80px); }
.sidebar { padding: 20px 14px; background: var(--nav); }
.nav-item { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 9px 10px; color: #e8eef2; background: transparent; border: 1px solid transparent; border-radius: 8px; cursor: pointer; text-align: left; }
.nav-item.active, .nav-item:hover { background: var(--nav-hover); border-color: #344657; }
.nav-item.locked { display: none; }
.nav-icon { width: 32px; height: 28px; display: inline-grid; place-items: center; flex: 0 0 32px; border-radius: 6px; background: var(--accent); color: white; font-size: 11px; font-weight: 700; }
.workspace { display: grid; gap: 18px; align-content: start; padding: 24px; }
.view { display: none; gap: 18px; align-content: start; }
.view.active { display: grid; }
.module-title, .control-panel, .upload-panel, .results-panel, .metric-grid article, .table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.module-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; }
.module-title .eyebrow { color: var(--accent); }
.domain-pill { padding: 8px 10px; color: var(--accent-dark); background: #e9f5f3; border-radius: 7px; font-size: 14px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 14px; }
.metric-grid article { padding: 18px; }
.metric-grid span { display: block; font-size: 26px; font-weight: 800; }
.metric-grid p { margin: 4px 0 0; color: var(--muted); }
.control-panel, .results-panel { padding: 18px; }
.upload-panel { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.helper-text, .plain-list { color: var(--muted); font-size: 14px; }
.plain-list { margin: 12px 0 0; padding-left: 20px; }
.primary-button, .secondary-button, .secondary-action { min-height: 36px; border: 1px solid transparent; border-radius: 7px; cursor: pointer; font-weight: 700; }
.primary-button { padding: 0 14px; color: white; background: var(--accent); }
.primary-button:hover { background: var(--accent-dark); }
.secondary-button { padding: 0 12px; color: white; background: transparent; border-color: #5d717e; }
.secondary-action { padding: 0 12px; color: var(--accent-dark); background: #e9f5f3; border-color: #b9ded9; }
.file-drop { min-width: 210px; min-height: 48px; display: grid; place-items: center; padding: 10px 16px; color: var(--accent-dark); background: #f0faf8; border: 1px dashed #6bbab1; border-radius: 8px; font-weight: 700; cursor: pointer; }
.file-drop input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 900px; }
.wide table { min-width: 2100px; }
th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; font-size: 14px; }
th { color: #34404a; background: #eef3f6; font-size: 12px; text-transform: uppercase; }
td input, td select { width: 100%; min-height: 34px; padding: 6px 8px; border: 1px solid #cbd5dc; border-radius: 6px; background: white; }
.remove-button, .small-button { min-height: 32px; color: var(--danger); background: #fff4f2; border: 1px solid #f4b7b0; border-radius: 7px; cursor: pointer; font-weight: 700; }
.small-button { padding: 0 9px; }
.summary { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.summary strong { color: var(--ink); font-size: 18px; }
.empty-state { min-height: 96px; display: grid; place-items: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; }
.message { padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); background: white; color: var(--muted); }
.message.error { color: var(--danger); border-color: #f4b7b0; background: #fff7f5; }
.message.ok { color: var(--ok); border-color: #a4d9b9; background: #f0fbf4; }
.hidden { display: none; }
.status-error { color: var(--danger); font-weight: 700; }
.status-ok { color: var(--ok); font-weight: 700; }
@media (max-width: 900px) {
  .app-header, .upload-panel, .module-title, .panel-heading { align-items: stretch; flex-direction: column; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: flex; gap: 10px; overflow-x: auto; padding: 12px; }
  .nav-item { width: auto; min-width: 170px; margin-bottom: 0; }
  .workspace { padding: 14px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
}

