/* BTG Infra KMA — dark shell (SpaceX / Tesla).
   Loaded after app.css (and after {% block head %}) from login.html and base.html.
   Tokens live on :root so templates that already use var(--*) inherit the shell.
   Rules are scoped to body.look-spacex so the mobile shell is left alone.

   Palette (Carl, 2026-10-03):
   - Background dark gray #1c1c1e (not pitch black)
   - Off-white text
   - ONE accent: short red line (#e10600). No color blocks, gradients, or extra accents.
   - Logo: static/img/btg-logo.png — supplied roof + hammer and nail only.
     RGB lifted to #f5f5f0; alpha shape unchanged. Sits on the dark background, no card.
*/

:root {
  --bg: #1c1c1e;
  --bg-elev: #232326;
  --surface: #252528;
  --surface-2: #2a2a2e;
  --sidebar: #161618;
  --sidebar-text: #b8b8bc;
  --sidebar-active: #f5f5f0;
  --accent: #e10600;
  --accent-hover: #ff1a0a;
  --accent-ink: #1c1c1e;
  --border: #3a3a3e;
  --text: #f5f5f0;
  --muted: #9a9a9e;
  --success: #d5e4d2;
  --success-bg: #1e261f;
  --danger: #f0c9c4;
  --danger-bg: #2a1a18;
  --warn: #e6d3a8;
  --warn-bg: #262018;
  --radius: 2px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --shadow: none;
}

body.look-spacex {
  color-scheme: dark;
  background: var(--bg);
  color: var(--text);
  letter-spacing: -0.011em;
}

/* Links stay off-white — red is reserved for the short accent line only */
body.look-spacex a { color: var(--text); }
body.look-spacex a:hover { color: #ffffff; }

body.look-spacex ::selection {
  background: #f5f5f0;
  color: #1c1c1e;
}

body.look-spacex code {
  background: #2a2a2e;
  color: var(--text);
  border-radius: 2px;
}

body.look-spacex .muted,
body.look-spacex .lede { color: var(--muted); }

/* ——— chrome ——— */
body.look-spacex .sidebar {
  width: 248px;
  background: var(--sidebar);
  color: var(--sidebar-text);
  border-right: 1px solid var(--border);
  padding: 1.75rem 1.1rem 1.25rem;
}

body.look-spacex .brand {
  gap: 0.85rem;
  margin-bottom: 1.75rem;
  padding: 0 0.35rem;
}

/* Supplied BTG mark only (roof + hammer and nail). No lettermark, no card. */
body.look-spacex .brand-logo {
  display: block;
  width: 4.25rem;
  height: auto;
  flex: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}

body.look-spacex .login-brand .brand-logo {
  width: 6.5rem;
}

body.look-spacex .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 2px;
  background: transparent;
  border: 1px solid var(--text);
  color: var(--text);
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

body.look-spacex .brand-text strong {
  color: #f5f5f0;
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

body.look-spacex .brand-text span {
  color: #8e8e93;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.62rem;
  margin-top: 0.2rem;
}

body.look-spacex .nav { gap: 0.05rem; }

body.look-spacex .nav a {
  color: var(--sidebar-text);
  padding: 0.62rem 0.75rem;
  border-radius: 0;
  font-weight: 400;
  letter-spacing: 0.01em;
}

body.look-spacex .nav a:hover {
  background: transparent;
  color: #f5f5f0;
}

/* THE short red accent line — only decorative red in the shell */
body.look-spacex .nav a.active {
  background: transparent;
  color: var(--sidebar-active);
  box-shadow: inset 2px 0 0 var(--accent);
}

body.look-spacex .nav-sub {
  margin: 0 0 0.2rem 0.7rem;
  padding-left: 0.55rem;
  border-left: 1px solid #3a3a3e;
  gap: 0;
}
body.look-spacex .nav-sub a {
  padding: 0.42rem 0.65rem;
  font-size: 0.92rem;
}

body.look-spacex .search-box { margin-top: 1.5rem; gap: 0.4rem; }

body.look-spacex .search-box input {
  border: 1px solid #3a3a3e;
  background: var(--bg);
  color: var(--text);
  border-radius: 2px;
  padding: 0.55rem 0.6rem;
}

body.look-spacex .search-box input:focus {
  outline: none;
  border-color: #8e8e93;
}

body.look-spacex .search-box button {
  background: transparent;
  color: var(--text);
  border: 1px solid #3a3a3e;
  border-radius: 2px;
  letter-spacing: 0.04em;
}

body.look-spacex .search-box button:hover {
  border-color: #8e8e93;
  color: #fff;
}

body.look-spacex .sidebar-foot { color: #8e8e93; }

body.look-spacex .user-chip,
body.look-spacex .user-chip strong { color: #f5f5f0; }

body.look-spacex .logout-link { color: var(--text); }

body.look-spacex .sidebar-close { color: #c8c8cc; }

body.look-spacex .main-wrap { background: var(--bg); }

body.look-spacex .topbar {
  padding: 1.05rem 2rem;
  background: rgba(28, 28, 30, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

body.look-spacex .page-heading {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text);
}

body.look-spacex .menu-toggle {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 2px;
}

body.look-spacex .content {
  padding: 2rem 2rem 3rem;
  max-width: 1040px;
}

/* lang chips — outline only, no filled accent blocks */
body.look-spacex .lang-switcher a,
body.look-spacex .lang-switcher span {
  border-radius: 2px !important;
  border: 1px solid #3a3a3e !important;
  background: transparent !important;
  color: #c8c8cc !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem !important;
}

body.look-spacex .lang-switcher a:hover {
  border-color: #8e8e93 !important;
  color: #fff !important;
}

body.look-spacex .lang-switcher .is-active {
  background: transparent !important;
  color: #f5f5f0 !important;
  border-color: #f5f5f0 !important;
  opacity: 1;
}

/* ——— shared surfaces so inner pages are not white cards on dark ——— */
body.look-spacex .hero,
body.look-spacex .card,
body.look-spacex .panel,
body.look-spacex .doc-body,
body.look-spacex .form-grid,
body.look-spacex .stat,
body.look-spacex .wheel-month,
body.look-spacex .deadline-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
  color: var(--text);
}

body.look-spacex .card-featured {
  background: var(--surface);
  border-color: #4a4a4e;
  box-shadow: none;
}

body.look-spacex .card h3,
body.look-spacex .hero h2 {
  color: var(--text);
  letter-spacing: -0.03em;
  font-weight: 500;
}

body.look-spacex .card p,
body.look-spacex .stat span { color: var(--muted); }

body.look-spacex .card:hover {
  border-color: #8e8e93;
  text-decoration: none;
  color: inherit;
}

body.look-spacex .doc-body h1,
body.look-spacex .doc-body h2,
body.look-spacex .doc-body h3 { color: var(--text); }

body.look-spacex .doc-body tr:nth-child(even) td,
body.look-spacex .data-table tr.row-forfallen,
body.look-spacex .data-table tr.row-denna_manad {
  background: #222225;
  color: var(--text);
}

body.look-spacex .notes-cell { color: var(--muted); }

/* Same look as Personalplanering (.ph-plan-btn): outline on #1c1c1e,
   off-white #f5f5f0, accent #e10600 stays a line elsewhere.
   No cream/white fill, no filled chips. Does not target .ph-plan. */
body.look-spacex .btn,
body.look-spacex .btn:hover,
body.look-spacex .btn:focus,
body.look-spacex .btn-primary,
body.look-spacex .btn-primary:hover,
body.look-spacex .btn-primary:focus,
body.look-spacex .btn-secondary,
body.look-spacex .btn-secondary:hover,
body.look-spacex .btn-ghost,
body.look-spacex .btn-ghost:hover,
body.look-spacex .btn-danger,
body.look-spacex .btn-danger:hover,
body.look-spacex .btn-danger:focus,
body.look-spacex .ph-btn,
body.look-spacex .ph-btn:hover,
body.look-spacex .ph-btn:focus,
body.look-spacex .ph-btn-primary,
body.look-spacex .ph-btn-primary:hover,
body.look-spacex .ph-btn-primary:focus,
body.look-spacex .ph-btn-ghost,
body.look-spacex .ph-btn-ghost:hover,
body.look-spacex .ph-embed .ph-btn,
body.look-spacex .ph-embed .ph-btn:hover,
body.look-spacex .ph-embed .ph-btn-primary,
body.look-spacex .ph-embed .ph-btn-primary:hover,
body.look-spacex .ph-chart-view-btn,
body.look-spacex .ph-chart-view-btn.is-active,
body.look-spacex .ph-oblig button,
body.look-spacex .search-box button,
body.look-spacex .search-box button:hover,
body.look-spacex .badge,
body.look-spacex .badge-forfallen,
body.look-spacex .badge-denna_manad,
body.look-spacex .badge-ok,
body.look-spacex .ph-badge,
body.look-spacex .ph-total-chip {
  background: transparent;
  color: #f5f5f0;
  border: 1px solid rgba(128, 128, 128, 0.45);
  border-radius: 0;
  box-shadow: none;
}

body.look-spacex .flash { border-radius: 2px; }
body.look-spacex .flash-success { background: var(--success-bg); color: var(--success); }
body.look-spacex .flash-error { background: var(--danger-bg); color: var(--danger); }
body.look-spacex .flash a { color: inherit; text-decoration: underline; }

body.look-spacex input,
body.look-spacex select,
body.look-spacex textarea,
body.look-spacex .edit-form textarea,
body.look-spacex .settings-form input,
body.look-spacex .settings-form textarea,
body.look-spacex .mall-form input,
body.look-spacex .mall-form textarea,
body.look-spacex .mall-form select,
body.look-spacex .search-form input,
body.look-spacex .input-sm,
body.look-spacex .deadline-form input,
body.look-spacex .login-form input {
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid #3a3a3e;
  border-radius: 2px;
}

body.look-spacex input:focus,
body.look-spacex select:focus,
body.look-spacex textarea:focus {
  outline: none;
  border-color: #8e8e93;
}

body.look-spacex .data-table th,
body.look-spacex .data-table td { border-bottom-color: var(--border); }

body.look-spacex .stat-danger { background: var(--danger-bg); border-color: #5a3030; color: var(--danger); }
body.look-spacex .stat-danger strong { color: var(--danger); }
body.look-spacex .stat-warn { background: var(--warn-bg); border-color: #5a4a28; }
body.look-spacex .stat-warn strong { color: var(--warn); }
body.look-spacex .stat-info { background: #222225; border-color: #3a3a3e; }
body.look-spacex .stat-info strong { color: var(--text); }


body.look-spacex .wheel-month.current-month {
  border-color: var(--border);
  background: #222225;
  box-shadow: inset 0 -2px 0 0 var(--accent);
}

body.look-spacex .wheel-month h4 { color: var(--text); }

/* Short red line accent (left border), not a color block */
body.look-spacex .lan-hint,
body.look-spacex .lan-banner { border-left-color: var(--accent); }

/* ——— login ——— */
body.look-spacex.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 10vh 1.5rem 8vh;
  background: #1c1c1e;
  background-image: none;
}

body.look-spacex .login-card {
  width: min(100%, 26rem);
  max-width: 26rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

body.look-spacex .login-brand { margin-bottom: 2.5rem; }

body.look-spacex .login-brand .brand-text strong {
  color: #f5f5f0;
  font-size: 1rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
}

body.look-spacex .login-brand .brand-text span { color: #8e8e93; }

body.look-spacex .login-card h1 {
  margin: 0 0 0.45rem;
  font-size: 2.6rem;
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.02;
  color: #f5f5f0;
}

body.look-spacex .login-card .muted {
  font-size: 0.95rem;
  max-width: 22rem;
}

body.look-spacex .login-form { gap: 1.05rem; margin-top: 1.75rem; }

body.look-spacex .login-form label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9a9a9e;
  gap: 0.45rem;
}

body.look-spacex .login-form input {
  padding: 0.85rem 0.8rem;
  min-height: 48px;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
}

body.look-spacex .login-form .btn-primary {
  margin-top: 0.6rem;
  min-height: 48px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
}

@media (max-width: 800px) {
  body.look-spacex .topbar { padding: 0.75rem 0.9rem; }
  body.look-spacex .content { padding: 1.15rem 0.9rem 2rem; }
  body.look-spacex .login-card h1 { font-size: 2.1rem; }
  body.look-spacex.login-page { padding: 12vh 1.25rem 3rem; place-items: start center; }
}

@media print {
  body.look-spacex {
    background: #fff !important;
    color: #111 !important;
  }
  body.look-spacex .hero,
  body.look-spacex .card,
  body.look-spacex .panel,
  body.look-spacex .doc-body {
    background: #fff !important;
    color: #111 !important;
    border-color: #ccc !important;
  }
}


/* ——— desktop function panels: kill cream/white slabs ———
   Scoped to body.look-spacex so the mobile shell is untouched.
   Inline cream/pink rows and PH light fills were leaving #f5f5f0
   text on near-white. One accent (#e10600) is status text only.
*/
body.look-spacex table.ph-table {
  background: #1c1c1e;
  color: #f5f5f0;
}
body.look-spacex table.ph-table th,
body.look-spacex table.ph-table td,
body.look-spacex table.ph-table td strong,
body.look-spacex table.ph-table td a {
  background: transparent;
  color: #f5f5f0;
}
body.look-spacex table.ph-table tr[style*="fff8e1"],
body.look-spacex table.ph-table tr[style*="ffebee"] {
  background: #1c1c1e !important;
  color: #f5f5f0 !important;
}
body.look-spacex table.ph-table tr[style*="fff8e1"] td,
body.look-spacex table.ph-table tr[style*="ffebee"] td,
body.look-spacex table.ph-table tr[style*="fff8e1"] strong,
body.look-spacex table.ph-table tr[style*="ffebee"] strong {
  background: transparent !important;
  color: #f5f5f0 !important;
}
body.look-spacex table.ph-table td span[style*="f57f17"],
body.look-spacex table.ph-table td span[style*="c62828"] {
  color: #e10600 !important;
  background: transparent !important;
  border: 0;
  padding: 0;
  font-weight: 600;
}

body.look-spacex .explorer-panel,
body.look-spacex .explorer-table,
body.look-spacex .explorer-table tbody,
body.look-spacex .explorer-row td,
body.look-spacex .explorer-row-folder td,
body.look-spacex .explorer-row:hover td,
body.look-spacex .explorer-row.ek-row-utford td,
body.look-spacex .explorer-row.ek-row-utford:hover td,
body.look-spacex .explorer-row-folder.is-drop-target td {
  background: #1c1c1e !important;
  color: #f5f5f0;
}
body.look-spacex .explorer-row:hover td,
body.look-spacex .explorer-row.ek-row-utford:hover td,
body.look-spacex .explorer-row-folder.is-drop-target td {
  background: #2a2a2e !important;
}
body.look-spacex .explorer-item-link,
body.look-spacex .explorer-item-link strong,
body.look-spacex .explorer-item-link:hover strong,
body.look-spacex .explorer-row-folder.is-drop-target .explorer-item-link strong {
  color: #f5f5f0 !important;
}
body.look-spacex .explorer-table .actions-cell .btn,
body.look-spacex .explorer-table .actions-cell .btn-danger,
body.look-spacex .explorer-table .actions-cell .row-action > summary,
body.look-spacex .explorer-table .btn-compact {
  background: transparent !important;
  color: #f5f5f0 !important;
  border-color: #8e8e93 !important;
}
body.look-spacex .explorer-table .badge,
body.look-spacex .explorer-table .badge-folder,
body.look-spacex .explorer-table .badge-info,
body.look-spacex .explorer-table .ek-status-badge,
body.look-spacex .explorer-table .ek-status-utford,
body.look-spacex .explorer-table .ek-status-atgard {
  background: transparent !important;
  border-color: #3a3a3e !important;
  color: #f5f5f0 !important;
}
body.look-spacex .explorer-table .ek-status-atgard {
  color: #e10600 !important;
}

body.look-spacex .ph-member-add-box,
body.look-spacex .ph-member-list-box,
body.look-spacex .ph-member-candidates,
body.look-spacex .ph-member-row {
  background: #1c1c1e !important;
  border-color: #3a3a3e !important;
  color: #f5f5f0;
  box-shadow: none;
}
body.look-spacex .ph-member-list-title,
body.look-spacex .ph-member-candidate,
body.look-spacex .ph-member-candidate strong,
body.look-spacex .ph-member-candidate .ph-muted,
body.look-spacex .ph-member-name-btn,
body.look-spacex .ph-member-name-btn strong,
body.look-spacex .ph-member-name-btn:hover,
body.look-spacex .ph-member-name-btn:focus {
  color: #f5f5f0 !important;
}
body.look-spacex .ph-member-search {
  background: #232326 !important;
  color: #f5f5f0 !important;
  border: 1px solid #3a3a3e !important;
}
body.look-spacex .ph-member-candidate:hover,
body.look-spacex .ph-member-candidate:focus,
body.look-spacex .ph-member-row.is-open {
  background: #2a2a2e !important;
  color: #f5f5f0 !important;
  border-color: #8e8e93 !important;
  box-shadow: none;
}

body.look-spacex .ph-tree,
body.look-spacex .ph-tree-root,
body.look-spacex .ph-tree-editable .ph-tree-root,
body.look-spacex .ph-tree-editable .ph-tree-row,
body.look-spacex .ph-tree-editable .ph-tree-root:hover,
body.look-spacex .ph-tree-editable .ph-tree-row:hover,
body.look-spacex .ph-tree-group,
body.look-spacex .ph-tree-editable .ph-tree-group-label,
body.look-spacex .ph-tree-editable .ph-tree-group-label:hover,
body.look-spacex .ph-tree-editable .ph-tree-moment .ph-tree-row,
body.look-spacex .ph-tree-editable .ph-tree-moment .ph-tree-row:hover,
body.look-spacex .ph-tree-row-editing {
  background: #1c1c1e !important;
  color: #f5f5f0 !important;
  border-color: #3a3a3e !important;
}
body.look-spacex .ph-tree-editable .ph-tree-root:hover,
body.look-spacex .ph-tree-editable .ph-tree-row:hover,
body.look-spacex .ph-tree-editable .ph-tree-group-label:hover,
body.look-spacex .ph-tree-editable .ph-tree-moment .ph-tree-row:hover {
  background: #2a2a2e !important;
}
body.look-spacex .ph-tree-name,
body.look-spacex .ph-tree-label,
body.look-spacex .ph-tree-moment .ph-tree-label,
body.look-spacex .ph-tree-group-label,
body.look-spacex .ph-tree-icon,
body.look-spacex .ph-tree-icon-dp,
body.look-spacex .ph-tree-icon-moment,
body.look-spacex .ph-tree-icon-group {
  color: #f5f5f0 !important;
}
body.look-spacex .ph-level,
body.look-spacex .ph-level-moment,
body.look-spacex .ph-level-group {
  background: transparent !important;
  color: #f5f5f0 !important;
  border: 1px solid #3a3a3e;
}

/* Filter tabs (Personal, projekt, tid, arkiv, utbildning): same outline as .btn.
   No filled chip, no pill radius. Active is a thin accent line, not a fill. */
body.look-spacex .filter-tab,
body.look-spacex .filter-tab:hover,
body.look-spacex .filter-tab:focus,
body.look-spacex .filter-tab:visited,
body.look-spacex .filter-tab.active {
  background: transparent;
  color: #f5f5f0;
  border: 1px solid rgba(128, 128, 128, 0.45);
  border-radius: 0;
  box-shadow: none;
  text-decoration: none;
}

body.look-spacex .filter-tab.active,
body.look-spacex .filter-tab.active:hover,
body.look-spacex .filter-tab.active:focus,
body.look-spacex .filter-tab.active:visited {
  background: transparent;
  color: #f5f5f0;
  border-color: #e10600;
}

body.look-spacex .filter-count,
body.look-spacex .filter-tab.active .filter-count {
  background: transparent;
  color: inherit;
  border-radius: 0;
}

/* Project hub (/projekt/<slug>) and ledning project tabs.
   White/cream slabs on Tid, Kalkyl, Struktur, Verktyg, Egenkontroll
   and the members block sit on #1c1c1e with #f5f5f0 text.
   Current hub tab is a red line, not a filled chip. */
body.look-spacex .projekt-hub-tabs {
  border-bottom-color: #3a3a3e;
}
body.look-spacex .projekt-hub-tabs .btn,
body.look-spacex .projekt-hub-tabs .btn:hover,
body.look-spacex .projekt-hub-tabs .btn:focus,
body.look-spacex .projekt-hub-tabs .btn-primary,
body.look-spacex .projekt-hub-tabs .btn-primary:hover,
body.look-spacex .projekt-hub-tabs .btn-primary:focus,
body.look-spacex .projekt-hub-tabs .btn-ghost,
body.look-spacex .projekt-hub-tabs .btn-ghost:hover {
  background: transparent;
  color: #f5f5f0;
  border: 1px solid rgba(128, 128, 128, 0.45);
  border-radius: 0;
  box-shadow: none;
}
body.look-spacex .projekt-hub-tabs .btn-primary,
body.look-spacex .projekt-hub-tabs .btn-primary:hover,
body.look-spacex .projekt-hub-tabs .btn-primary:focus {
  border-color: #e10600;
}

body.look-spacex .ph-hours-totals,
body.look-spacex .ph-chart-wrap,
body.look-spacex .ph-ctx-menu,
body.look-spacex .ph-perm-box,
body.look-spacex .ph-fieldset,
body.look-spacex .kma-todo-item,
body.look-spacex .kma-todo-item.is-done,
body.look-spacex .explorer-popover,
body.look-spacex .row-popover,
body.look-spacex .check-card,
body.look-spacex .check-card:has(input:checked) {
  background: #1c1c1e;
  color: #f5f5f0;
  border-color: #3a3a3e;
  box-shadow: none;
}
body.look-spacex .ph-hours-table,
body.look-spacex .ph-hours-table th,
body.look-spacex .ph-hours-table td,
body.look-spacex .ph-hours-row.ph-hours-moment td,
body.look-spacex .ph-hours-table td strong,
body.look-spacex .ph-chart-legend,
body.look-spacex .ph-ctx-item,
body.look-spacex .ph-ctx-danger,
body.look-spacex .kma-todo-item,
body.look-spacex .kma-todo-item.is-done,
body.look-spacex .kma-todo-main,
body.look-spacex .kma-todo-main strong,
body.look-spacex .projekt-meta-dl dd,
body.look-spacex .projekt-meta-dl dt,
body.look-spacex .breadcrumb,
body.look-spacex .breadcrumb a,
body.look-spacex .breadcrumb a:hover,
body.look-spacex .breadcrumb-current,
body.look-spacex .ph-embed .ph-breadcrumb,
body.look-spacex .ph-embed .ph-breadcrumb a,
body.look-spacex .ph-embed .ph-breadcrumb a:hover,
body.look-spacex .arkiv-edit-meta summary,
body.look-spacex .ph-summary-grid dd,
body.look-spacex .check-card,
body.look-spacex .check-card small,
body.look-spacex .explorer-popover,
body.look-spacex .explorer-popover label,
body.look-spacex .row-popover,
body.look-spacex .row-popover label {
  color: #f5f5f0;
}
body.look-spacex .ph-ctx-item:hover:not(:disabled),
body.look-spacex .ph-ctx-danger:hover:not(:disabled) {
  background: #2a2a2e;
  color: #f5f5f0;
}
body.look-spacex .ph-tree-moments {
  border-left-color: #3a3a3e;
}
body.look-spacex .ph-inline-rename,
body.look-spacex .ph-inline-mall,
body.look-spacex .ph-budget-input,
body.look-spacex .ph-budget-input.is-saved,
body.look-spacex .ph-budget-input.is-err {
  background: #232326;
  color: #f5f5f0;
  border-color: #3a3a3e;
  box-shadow: none;
}
body.look-spacex .ph-badge-perm,
body.look-spacex .ph-perm-tid,
body.look-spacex .ph-perm-tillagg,
body.look-spacex .ph-badge-access,
body.look-spacex .ph-access-full_kma,
body.look-spacex .ph-access-mobil_only,
body.look-spacex .ph-embed .ph-badge-type,
body.look-spacex .ph-embed .ph-status-pågående,
body.look-spacex .ph-embed .ph-status-pausat,
body.look-spacex .ph-embed .ph-status-avslutat,
body.look-spacex .ph-badge-inactive,
body.look-spacex .badge-kma-todo,
body.look-spacex .badge-kma-done,
body.look-spacex .badge-status-aktiv,
body.look-spacex .badge-status-avslutad,
body.look-spacex .badge-status-arkiverad,
body.look-spacex .badge-projekttyp,
body.look-spacex .badge-projekttyp-bemanning,
body.look-spacex .badge-projekttyp-entreprenad,
body.look-spacex .badge-projekttyp-okand {
  background: transparent;
  color: #f5f5f0;
  border: 1px solid rgba(128, 128, 128, 0.45);
  border-radius: 0;
  box-shadow: none;
}
body.look-spacex .ph-hours-remain.is-over {
  color: #e10600;
}

@media print {
  body.look-spacex .ph-hours-totals,
  body.look-spacex .ph-chart-wrap,
  body.look-spacex .kma-todo-item,
  body.look-spacex .explorer-popover,
  body.look-spacex .row-popover,
  body.look-spacex .check-card {
    background: #fff !important;
    color: #111 !important;
    border-color: #ccc !important;
  }
}


/* ——— Revision checklist (revision_check.html) ———
   app.css paints checklist rows #f8fafc / progress #f0f9ff with
   color: var(--text) which is #f5f5f0 under look-spacex → invisible.
   Dark panels + off-white text; accent border when checked.
*/
body.look-spacex .checklist-progress {
  background: #232325;
  border: 1px solid #3a3a3c;
  color: #f5f5f0;
  border-radius: 2px;
}
body.look-spacex .checklist-progress strong {
  color: #f5f5f0;
}

body.look-spacex .checklist-label {
  background: #232325;
  border: 1px solid #3a3a3c;
  color: #f5f5f0;
  border-radius: 2px;
}
body.look-spacex .checklist-label:hover {
  background: #2a2a2c;
  border-color: #8e8e93;
}
body.look-spacex .checklist-label:has(.checklist-box:checked) {
  background: #2a2a2c;
  border-color: #e10600;
}
body.look-spacex .checklist-text {
  color: #f5f5f0;
}
body.look-spacex .checklist-box {
  accent-color: #e10600;
}

body.look-spacex .checklist-info-link,
body.look-spacex .checklist-how-link {
  color: #f5f5f0;
  text-decoration: underline;
  background: transparent;
}
body.look-spacex .checklist-info-link:hover,
body.look-spacex .checklist-how-link:hover {
  color: #ffffff;
}

body.look-spacex .checklist-notes {
  background: #232326;
  color: #f5f5f0;
  border: 1px solid #3a3a3e;
  border-radius: 2px;
}

/* Help / how-know dialogs: color-scheme:dark can make native <dialog>
   dark while app.css hardcodes slate text → unreadable. */
body.look-spacex .help-dialog {
  background: #232325;
  color: #f5f5f0;
  border: 1px solid #3a3a3c;
  border-radius: 2px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}
body.look-spacex .help-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
}
body.look-spacex .help-dialog-header h2,
body.look-spacex .help-dialog-body,
body.look-spacex .help-dialog-explanation,
body.look-spacex .how-to-know-list,
body.look-spacex .how-to-know-list li {
  color: #f5f5f0;
}
body.look-spacex .help-dialog-subtitle,
body.look-spacex .help-dialog-intro,
body.look-spacex .help-dialog-close,
body.look-spacex .help-dialog-doc-label {
  color: #b8b8b0;
}
body.look-spacex .help-dialog-doc-scroll {
  background: #1c1c1e;
  border: 1px solid #3a3a3c;
  color: #f5f5f0;
}
body.look-spacex .help-dialog-doc-body,
body.look-spacex .help-dialog-doc-body h1,
body.look-spacex .help-dialog-doc-body h2,
body.look-spacex .help-dialog-doc-body h3,
body.look-spacex .help-dialog-doc-body p,
body.look-spacex .help-dialog-doc-body li {
  color: #f5f5f0;
}

@media print {
  body.look-spacex .checklist-progress,
  body.look-spacex .checklist-label,
  body.look-spacex .checklist-label:has(.checklist-box:checked),
  body.look-spacex .help-dialog,
  body.look-spacex .help-dialog-doc-scroll {
    background: #fff !important;
    color: #111 !important;
    border-color: #ccc !important;
  }
  body.look-spacex .checklist-text,
  body.look-spacex .checklist-info-link,
  body.look-spacex .checklist-how-link,
  body.look-spacex .help-dialog-header h2,
  body.look-spacex .help-dialog-body {
    color: #111 !important;
  }
}

/* ——— other desktop light slabs with light text under look-spacex ——— */
body.look-spacex .tid-entry,
body.look-spacex .tid-entry-list.compact .tid-entry {
  background: #232325;
  border: 1px solid #3a3a3c;
  color: #f5f5f0;
  border-radius: 2px;
}
body.look-spacex .tid-entry-note,
body.look-spacex .tid-entry-main {
  color: #f5f5f0;
}

body.look-spacex .wizard-progress {
  background: #232325;
  border: 1px solid #3a3a3c;
  color: #f5f5f0;
  border-radius: 2px;
}
body.look-spacex .wizard-progress-label,
body.look-spacex .wizard-step-title {
  color: #f5f5f0;
}
body.look-spacex .wizard-steps li {
  background: #2a2a2c;
  color: #f5f5f0;
  border: 1px solid #3a3a3c;
}
body.look-spacex .wizard-steps li.is-active {
  background: transparent;
  color: #f5f5f0;
  border-color: #e10600;
}
body.look-spacex .wizard-steps li.is-done {
  background: #2a2a2c;
  color: #f5f5f0;
  border-color: #8e8e93;
}


/* ——— Egenkontroll (skapa / utför / visa / klona) — dark sheet (egk 2026-10-06) ———
   app.css paints .ek-sheet, phases, rows, header labels and inputs #fff / light blue.
   Under look-spacex the text is #f5f5f0, so the sheet must be dark too.
   Palette: bg #1c1c1e, text #f5f5f0, one red accent line (#e10600).
   Print keeps the white paper look (see @media print below).
*/
body.look-spacex .ek-sheet,
body.look-spacex .ek-sheet.mall-saved {
  background: #1c1c1e;
  color: #f5f5f0;
  border: 1px solid #3a3a3e;
  border-radius: 2px;
  box-shadow: none;
}
body.look-spacex .ek-sheet-title {
  border-bottom: 2px solid #e10600;
}
body.look-spacex .ek-sheet-title h2 { color: #f5f5f0; }
body.look-spacex .ek-sheet-subtitle,
body.look-spacex .ek-sheet-title .ek-sheet-subtitle,
body.look-spacex .ek-sheet-note { color: #b8b8bc; }

body.look-spacex .ek-header-grid { border-color: #3a3a3e; border-radius: 2px; }
body.look-spacex .ek-header-row { border-bottom-color: #3a3a3e; }
body.look-spacex .ek-header-label {
  background: #232326;
  color: #f5f5f0;
  border-right-color: #3a3a3e;
  border-bottom-color: #3a3a3e;
}
body.look-spacex .ek-header-value { background: #1c1c1e; }
body.look-spacex .ek-header-value input,
body.look-spacex .ek-header-value select,
body.look-spacex .mall-form .ek-header-value input,
body.look-spacex .mall-form .ek-header-value select {
  background: #1c1c1e;
  color: #f5f5f0;
  border: 0;
  border-radius: 0;
}
body.look-spacex .ek-header-value input:focus,
body.look-spacex .ek-header-value select:focus {
  outline: 1px solid #8e8e93;
  outline-offset: -1px;
}

body.look-spacex .ek-col-heads {
  background: #232326;
  color: #b8b8bc;
  border-color: #3a3a3e;
  border-radius: 2px 2px 0 0;
}

body.look-spacex .ek-phase,
body.look-spacex .ek-preview-panel .ek-phase {
  background: #1c1c1e;
  border-color: #3a3a3e;
  border-radius: 2px;
  box-shadow: none;
}
body.look-spacex .ek-phase-banner {
  background: #2a2a2e;
  color: #f5f5f0;
  box-shadow: inset 2px 0 0 #e10600;
}
body.look-spacex .ek-sub,
body.look-spacex .ek-sub-preview {
  background: transparent;
  border-top-color: #3a3a3e;
}
body.look-spacex .ek-sub + .ek-sub { border-top-color: #3a3a3e; }
body.look-spacex .ek-sub-header,
body.look-spacex .ek-sub-preview .ek-sub-header,
body.look-spacex .ek-sub-preview .ek-sub-label,
body.look-spacex .ek-preview-panel .ek-sub-label {
  background: #232326;
  color: #f5f5f0;
  border-bottom-color: #3a3a3e;
  border-left-color: #8e8e93;
}
body.look-spacex .ek-sub-header .ek-sub-label { background: transparent; }

body.look-spacex .ek-row {
  background: #1c1c1e;
  border-bottom-color: #3a3a3e;
}
body.look-spacex .ek-row + .ek-row { border-top-color: #2e2e32; }
body.look-spacex .ek-cp-text,
body.look-spacex .ek-inline-label,
body.look-spacex .ek-preview-list li { color: #f5f5f0; }
body.look-spacex .ek-preview-list li { border-bottom-color: #3a3a3e; }
body.look-spacex .ek-anm-label,
body.look-spacex .ek-field-label,
body.look-spacex .ek-anm-print-label { color: #b8b8bc; }

body.look-spacex .ek-anm-label .cp-note-label,
body.look-spacex select.cp-note-label,
body.look-spacex .ek-cp-anmarkning .cp-note,
body.look-spacex .ek-row-text input.cp-note,
body.look-spacex .ek-row-kontroll input[type="date"],
body.look-spacex .ek-row-anm textarea,
body.look-spacex .ek-inline-input,
body.look-spacex .checkpoint-table .cp-note,
body.look-spacex .checkpoint-table .cp-init,
body.look-spacex .checkpoint-table input[type="text"],
body.look-spacex .checkpoint-table input[type="date"],
body.look-spacex .checkpoint-table textarea {
  background: #232326;
  color: #f5f5f0;
  border: 1px solid #3a3a3e;
  border-radius: 2px;
}
body.look-spacex .ek-sheet input::placeholder,
body.look-spacex .ek-sheet textarea::placeholder,
body.look-spacex .mall-form input::placeholder,
body.look-spacex .mall-form textarea::placeholder { color: #8e8e93; opacity: 1; }
body.look-spacex .ek-sheet input[type="date"],
body.look-spacex .mall-form input[type="date"] { color-scheme: dark; }
body.look-spacex .ek-sheet option,
body.look-spacex .mall-form option { background: #232326; color: #f5f5f0; }

/* OK / Ej aktuell boxes: dark, readable when checked (no light green/yellow fill) */
body.look-spacex .ek-platsgjutning .cp-result-box,
body.look-spacex .ek-row .cp-result-box,
body.look-spacex .checkpoint-table .cp-result-box {
  background: #232326;
  color: #f5f5f0;
  border-color: #3a3a3e;
  border-radius: 2px;
}
body.look-spacex .ek-platsgjutning .cp-result-box input[type="checkbox"],
body.look-spacex .ek-row .cp-result-box input[type="checkbox"],
body.look-spacex .ek-platsgjutning .cp-result-ej input[type="checkbox"],
body.look-spacex .ek-row .cp-result-ej input[type="checkbox"],
body.look-spacex .checkpoint-table input[type="checkbox"],
body.look-spacex .ek-sheet input[type="checkbox"] {
  accent-color: #e10600;
}
body.look-spacex .ek-platsgjutning .cp-result-ok:has(input:checked),
body.look-spacex .ek-row .cp-result-ok:has(input:checked),
body.look-spacex .ek-platsgjutning .cp-result-ej:has(input:checked),
body.look-spacex .ek-row .cp-result-ej:has(input:checked),
body.look-spacex .checkpoint-table .cp-result-box:has(input:checked) {
  background: #2a2a2e;
  color: #f5f5f0;
  border-color: #f5f5f0;
  box-shadow: inset 0 -2px 0 #e10600;
}

/* Bilagor (attachments) + drop target */
body.look-spacex .ek-attach-details > summary { color: #b8b8bc; }
body.look-spacex .ek-attach-details > summary::before { color: #8e8e93; }
body.look-spacex .ek-attach-details[open] { border-top-color: #3a3a3e; }
body.look-spacex .ek-attach-has { color: #f5f5f0; }
body.look-spacex .ek-attach-empty-hint { color: #9a9a9e; }
body.look-spacex .cp-attach-label { color: #9a9a9e; }
body.look-spacex .cp-attach-item {
  background: #232326;
  border-color: #3a3a3e;
  color: #f5f5f0;
}
body.look-spacex .cp-attach-thumb { background: #2a2a2e; }
body.look-spacex .btn-attach-del { color: #f0c9c4; }
body.look-spacex .cp-attachments.cp-drop-active,
body.look-spacex .ek-row.cp-drop-active,
body.look-spacex tr.cp-drop-active {
  outline-color: #e10600;
  background: #2a2a2e;
}
body.look-spacex .cp-attachments.cp-drop-active::after {
  background: #1c1c1e;
  color: #f5f5f0;
  border-color: #e10600;
}

/* Status lines, locked banner */
body.look-spacex .ek-autosave-status.is-saving,
body.look-spacex .ek-sig-status.is-saving { color: #9a9a9e; }
body.look-spacex .ek-autosave-status.is-saved,
body.look-spacex .ek-sig-status.is-saved { color: #d5e4d2; }
body.look-spacex .ek-autosave-status.is-error,
body.look-spacex .ek-sig-status.is-error { color: #f0c9c4; }
body.look-spacex .ek-locked-banner {
  background: #1e261f;
  color: #d5e4d2;
  border: 1px solid #3a4a3c;
  border-radius: 2px;
}
body.look-spacex .ek-locked-banner-hint { color: #b8c4b5; }

/* Signature: pad canvas is already dark in app.js (light ink). Saved PNG is
   dark ink on white, so the read-only preview is shown inverted on dark. */
body.look-spacex .ek-sig-label { color: #f5f5f0; }
body.look-spacex .ek-sig-canvas-wrap {
  background: #2c2c2e;
  border: 1px dashed #8e8e93;
  border-radius: 2px;
}
body.look-spacex .ek-sig-preview {
  background: #ffffff;
  border-color: #d6d6d4;
  border-radius: 2px;
  filter: invert(0.89);
}

/* Saved EC2 / plain mall views in the same flow */
body.look-spacex .mall-saved .data-table th,
body.look-spacex .checkpoint-table th { color: #b8b8bc; }
body.look-spacex .mall-saved .data-table td,
body.look-spacex .checkpoint-table td { color: #f5f5f0; }
body.look-spacex .meta-dl dt { color: #9a9a9e; }
body.look-spacex .meta-dl dd { color: #f5f5f0; }
body.look-spacex .check-inline { color: #f5f5f0; }

@media print {
  body.look-spacex .ek-sheet,
  body.look-spacex .ek-phase,
  body.look-spacex .ek-sub,
  body.look-spacex .ek-row,
  body.look-spacex .ek-header-value,
  body.look-spacex .ek-header-value input,
  body.look-spacex .ek-preview-panel .ek-phase {
    background: #fff !important;
    color: #111 !important;
    border-color: #a0aec0 !important;
    box-shadow: none !important;
  }
  body.look-spacex .ek-sheet-title h2,
  body.look-spacex .ek-cp-text,
  body.look-spacex .ek-inline-label,
  body.look-spacex .ek-header-label,
  body.look-spacex .ek-anm-print-label,
  body.look-spacex .ek-sheet-subtitle,
  body.look-spacex .ek-sheet-note { color: #111 !important; }
  body.look-spacex .ek-header-label,
  body.look-spacex .ek-col-heads,
  body.look-spacex .ek-sub-header { background: #f0f4f8 !important; color: #1a365d !important; }
  body.look-spacex .ek-phase-banner {
    background: #fff !important;
    color: #1a365d !important;
    box-shadow: none !important;
  }
  body.look-spacex .ek-sheet input,
  body.look-spacex .ek-sheet textarea,
  body.look-spacex .ek-sheet select,
  body.look-spacex .ek-inline-input {
    background: transparent !important;
    color: #111 !important;
  }
  body.look-spacex .ek-sig-preview { filter: none !important; }
}

/* projektform-farg-20261020 (Carl 14.46): .ph-form-fält (projekthantering.css) hade vit bakgrund
   (".ph-form input[type=text]" vann över "body.look-spacex input"). Samma mörka stil som resten av appen. */
body.look-spacex .ph-form input:not([type]),
body.look-spacex .ph-form input[type="text"],
body.look-spacex .ph-form input[type="number"],
body.look-spacex .ph-form input[type="date"],
body.look-spacex .ph-form input[type="time"],
body.look-spacex .ph-form input[type="datetime-local"],
body.look-spacex .ph-form input[type="month"],
body.look-spacex .ph-form input[type="week"],
body.look-spacex .ph-form input[type="email"],
body.look-spacex .ph-form input[type="tel"],
body.look-spacex .ph-form input[type="url"],
body.look-spacex .ph-form input[type="search"],
body.look-spacex .ph-form input[type="password"],
body.look-spacex .ph-form textarea,
body.look-spacex .ph-form select {
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid #3a3a3e;
  border-radius: 2px;
  color-scheme: dark;
}
body.look-spacex .ph-form input:focus,
body.look-spacex .ph-form textarea:focus,
body.look-spacex .ph-form select:focus { outline: none; border-color: #8e8e93; }
/* Platshållare, datumväljare och autofyll – gäller alla fält i mörkt läge */
body.look-spacex input::placeholder,
body.look-spacex textarea::placeholder { color: #8e8e93; opacity: 1; }
body.look-spacex input[type="date"],
body.look-spacex input[type="time"],
body.look-spacex input[type="datetime-local"],
body.look-spacex input[type="month"],
body.look-spacex input[type="week"] { color-scheme: dark; }
body.look-spacex input:-webkit-autofill,
body.look-spacex input:-webkit-autofill:hover,
body.look-spacex input:-webkit-autofill:focus,
body.look-spacex textarea:-webkit-autofill,
body.look-spacex select:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-elev) inset;
  box-shadow: 0 0 0 1000px var(--bg-elev) inset;
  transition: background-color 9999s ease-out 0s;
}

/* Timöversikt diagram tooltip (diagram-snygg-20261109) */
body.look-spacex .ph-chart-tooltip {
  background: #2c2c2e;
  color: #f5f5f0;
  border-color: #4a4a4e;
}
body.look-spacex .ph-chart-legend.is-budget-hidden .ph-chart-legend-budget {
  display: none !important;
}

/* Mallar / sparade egenkontroller – samma mörka kortstil för Utförd och Kräver åtgärd
   (app.css .doc-list li.ek-row-utford har ljus mint-bakgrund → vit text/knappar osynliga) */
body.look-spacex .doc-list.ek-saved-list,
body.look-spacex .doc-list.ek-saved-list li {
  border-color: #3a3a3e;
}
body.look-spacex .doc-list.ek-saved-list li.ek-list-row,
body.look-spacex .doc-list.ek-saved-list li.ek-row-utford {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  background: #1c1c1e !important;
  color: #f5f5f0 !important;
  border: 1px solid #3a3a3e;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  margin: 0.35rem 0;
  list-style: none;
  min-height: 0;
}
body.look-spacex .doc-list.ek-saved-list li.ek-list-row:hover,
body.look-spacex .doc-list.ek-saved-list li.ek-row-utford:hover {
  background: #2a2a2e !important;
}
body.look-spacex .doc-list.ek-saved-list li.ek-list-group-label {
  background: transparent !important;
  border: 0;
  padding: 0.65rem 0.15rem 0.2rem;
  margin: 0.35rem 0 0;
  color: #8e8e93;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
body.look-spacex .doc-list.ek-saved-list .ek-list-main {
  flex: 1 1 14rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
body.look-spacex .doc-list.ek-saved-list .ek-list-title,
body.look-spacex .doc-list.ek-saved-list .ek-list-title strong {
  color: #f5f5f0 !important;
  text-decoration: none;
}
body.look-spacex .doc-list.ek-saved-list .ek-list-title:hover strong {
  color: #ffffff !important;
}
body.look-spacex .doc-list.ek-saved-list .ek-list-file {
  display: block;
  font-size: 0.72rem;
  line-height: 1.2;
  color: #8e8e93 !important;
  opacity: 0.7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
body.look-spacex .doc-list.ek-saved-list .ek-list-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}
body.look-spacex .doc-list.ek-saved-list .ek-list-actions .btn,
body.look-spacex .doc-list.ek-saved-list .ek-list-actions .btn-primary,
body.look-spacex .doc-list.ek-saved-list .ek-list-actions .btn-compact {
  background: transparent !important;
  color: #f5f5f0 !important;
  border: 1px solid #8e8e93 !important;
  min-height: 1.7rem;
  padding: 0.2rem 0.55rem;
}
body.look-spacex .doc-list.ek-saved-list .ek-list-actions .btn-primary {
  border-color: #f5f5f0 !important;
}
body.look-spacex .doc-list.ek-saved-list .ek-status-badge,
body.look-spacex .doc-list.ek-saved-list .ek-status-utford,
body.look-spacex .doc-list.ek-saved-list .ek-status-atgard {
  background: transparent !important;
  border: 1px solid #3a3a3e !important;
  color: #f5f5f0 !important;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
}
body.look-spacex .doc-list.ek-saved-list .ek-status-atgard {
  color: #e10600 !important;
  border-color: #e10600 !important;
}
body.look-spacex .doc-list.ek-saved-list .ek-status-utford {
  color: #34c759 !important;
  border-color: #34c759 !important;
}
body.look-spacex .doc-list.ek-saved-list .atgard-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid #3a3a3e;
}
body.look-spacex .doc-list.ek-saved-list .atgard-status-done {
  color: #34c759;
  border-color: #34c759;
  background: transparent;
}
body.look-spacex .doc-list.ek-saved-list .atgard-status-pending {
  color: #e10600;
  border-color: #e10600;
  background: transparent;
}
body.look-spacex .doc-list.ek-saved-list .pdf-paket-check {
  flex: 0 0 auto;
  accent-color: #f5f5f0;
}
