/* LC8.3: static blue surfaces. Functional page geometry stays in styles.css. */
:root {
  --accent: #2367e8;
  --accent-dark: #1852bc;
  --bg: #f4f5f8;
  --panel-soft: #f8faff;
  --line: #dce3ef;
  --ui-chrome: #f6f8fe;
  --ui-edge: #ffffffE6;
  --ui-shadow: #25334b08;
}
body[data-ui-skin="compass"] {
  background: linear-gradient(140deg, var(--bg), #eef3fc);
}
.topbar {
  background: linear-gradient(108deg, #fff, #f6f8fe 65%, #ebf1fd);
  box-shadow: inset 0 1px 0 var(--ui-edge), 0 1px 0 var(--ui-edge);
}
.sidebar {
  background: linear-gradient(165deg, #fff, #f1f5fd);
  color: var(--text);
  box-shadow: inset -1px 0 0 var(--line);
}
.nav-group-title { color: var(--muted); }
.nav-item { color: #52627b; }
.nav-item:hover { background: #edf2fd; color: var(--accent-dark); }
.nav-item.active {
  background: linear-gradient(100deg, #e6eeff, #f5f8ff);
  color: var(--accent-dark);
  box-shadow: inset 3px 0 0 var(--accent), inset 0 1px 0 var(--ui-edge);
}
.panel, .filters, .kpi, .evaluation-strip, .modal-card,
.direction-editor-popover, .usage-type-editor-popover, .column-panel, .table-pagination {
  background: linear-gradient(150deg, #fff 65%, #f7f9ff);
  border-color: #d8e2f3;
  box-shadow: inset 0 1px 0 var(--ui-edge), 0 2px 3px #25334b06, 0 8px 20px var(--ui-shadow);
}
.panel .panel { background: var(--panel); box-shadow: none; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), select, textarea {
  background-color: var(--panel);
  border-color: #cbd8ee;
  box-shadow: inset 0 1px 2px #25334b06;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
button.primary, a.primary {
  background: linear-gradient(165deg, var(--accent), var(--accent-dark));
  border-color: var(--accent-dark);
  box-shadow: inset 0 1px 0 #ffffff38, 0 2px 3px var(--ui-shadow);
}
button.primary:hover, a.primary:hover { background: var(--accent-dark); }
.ghost-button, .ghost-link { color: var(--accent-dark); background-color: #eaf1ff; }
.status-pill { color: var(--accent-dark); background: #eaf1ff; }
.data-table th { background-color: var(--ui-chrome); border-color: #d8e2f3; }
/* Preserve colored accounting group headers and all semantic warning/error tags. */
/* Homepage only: keep functional-page geometry unchanged. */
.home-account-name { display: none; }
.home-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
body:has(#view-home.active) { padding-bottom: 0; }
body:has(#view-home.active) > .sidebar { display: none; }
body:has(#view-home.active) > .main {
  margin-left: 0; padding: 28px; height: 100dvh; min-height: 560px;
  display: flex; flex-direction: column; box-sizing: border-box;
}
body:has(#view-home.active) .topbar {
  flex-shrink: 0; align-items: center;
  min-height: 80px; padding: 18px 24px 18px 84px;
  position: relative; border-radius: 18px; margin-bottom: 24px;
}
body:has(#view-home.active) .topbar::before {
  content: ""; position: absolute; left: 24px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  background: url('/assets/ui/compass.svg') center / contain no-repeat;
}
body:has(#view-home.active) #pageTitle { font-size: 24px; letter-spacing: .02em; }
body:has(#view-home.active) #pageSubtitle,
body:has(#view-home.active) #serverStatus[data-connected="true"] { display: none; }
body:has(#view-home.active) .status-stack {
  display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px;
}
body:has(#view-home.active) .home-account-name:not(:empty) {
  display: block; color: var(--text); font-size: 15px; font-weight: 500;
  max-width: min(32vw, 380px); overflow-wrap: anywhere;
}
body:has(#view-home.active) #actionStatus { white-space: normal; }
#view-home.active { flex: 1; min-height: 0; display: flex; }
#view-home .home-module-grid {
  display: grid; grid-template-columns: none;
  grid-auto-flow: column; grid-auto-columns: minmax(120px, 1fr);
  gap: 24px; width: 100%; max-width: none; min-height: 0;
  margin: 0 auto; box-sizing: border-box; padding: 4px 4px 12px;
}
#view-home .home-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; min-height: 360px; min-width: 0; width: 100%;
  padding: 24px 20px 80px; text-align: center; border-radius: 22px;
  background: linear-gradient(158deg, #fff 0%, #fff 50%, #f4f7fe 100%);
  border-color: #e2ebfc;
  box-shadow: inset 0 1px 0 var(--ui-edge), 0 2px 4px #26324808, 0 8px 20px #26324808;
}
#view-home .home-card:hover {
  background: linear-gradient(158deg, #fff, #ebf1fd); border-color: #91b3f3;
  box-shadow: inset 0 1px 0 var(--ui-edge), 0 4px 8px #2632480c, 0 12px 24px #2632480c;
}
#view-home .home-card:active {
  background: linear-gradient(158deg, #fff, #e6eeff); border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent), inset 0 2px 6px #2632480c;
}
#view-home .home-card strong {
  font-size: clamp(24px, 1.5vw, 28px); line-height: 1.4; font-weight: 600; letter-spacing: .04em;
}
#view-home .home-card-icon {
  flex: 0 0 auto; width: clamp(128px, 8vw, 144px); height: clamp(128px, 8vw, 144px);
  border-radius: 36px;
  background: linear-gradient(145deg, #ebf1fd, #cddcf9); border: 1px solid #d7e4fb;
  box-shadow: inset 0 2px 0 var(--ui-edge), inset 0 -2px 0 #2632480c, 0 7px 15px #2632480c;
}
#view-home .home-card-icon img { width: 50%; height: 50%; }
#view-home .home-card i {
  position: static; margin-top: 8px; flex-shrink: 0;
  width: 40px; height: 40px; border: 0; background: #f0f4fd;
  box-shadow: inset 0 1px 0 var(--ui-edge);
}
#view-home .home-card i img { width: 22px; height: 22px; }
@media (max-width: 700px) {
  body:has(#view-home.active) > .main { padding: 16px; }
  body:has(#view-home.active) .topbar { padding: 16px 16px 16px 68px; gap: 12px; }
  body:has(#view-home.active) .topbar::before { left: 16px; width: 36px; height: 36px; }
  body:has(#view-home.active) #pageTitle { font-size: 20px; }
  #view-home .home-module-grid { gap: 12px; overflow-x: auto; }
  #view-home .home-card { padding: 20px 12px 64px; }
  #view-home .home-card-icon { width: 88px; height: 88px; border-radius: 26px; }
  #view-home .home-card strong { font-size: 20px; }
}

/* Bilingual display only; functional navigation and controls retain their geometry. */
.brand-title { position: relative; }
.brand-english { position: absolute; left: 0; top: 100%; font-size: 11px; line-height: 14px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.home-brand-english { display: none; }
body:has(#view-home.active) .home-brand-english { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 16px; letter-spacing: .04em; }
