:root {
  --bg: #f4f8fb;
  --panel-soft: #f8fbfd;
  --ink: #102033;
  --muted: #60748a;
  --line: #d8e4ec;
  --line-soft: #e7eef4;
  --panel: #ffffff;
  --accent: #007c78;
  --accent-strong: #006e67;
  --accent-soft: #e5f5f3;
  --danger: #c43d3d;
  --ok: #138a52;
  --blue: #0f6fb4;
  --lime: #91c914;
  --amber: #b77700;
  --shadow: 0 10px 28px rgba(16, 32, 51, 0.08);
  --shadow-soft: 0 4px 14px rgba(16, 32, 51, 0.05);
  --sidebar-width: 248px;
  --sidebar-width-collapsed: 104px;
}

:root[data-theme="dark"] {
  --bg: #0f1720;
  --panel-soft: #172330;
  --ink: #edf4f8;
  --muted: #a7b7c6;
  --line: #314658;
  --line-soft: #243747;
  --panel: #16212c;
  --accent: #32c5b7;
  --accent-strong: #78e0d4;
  --accent-soft: #123b3a;
  --danger: #ff8585;
  --ok: #55d596;
  --blue: #7dbcf5;
  --lime: #addc54;
  --amber: #f5c162;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.22);
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Malgun Gothic", "Noto Sans KR", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-width: 320px;
  font-size: 15.5px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

a {
  color: var(--accent);
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 24px;
  font-weight: 900;
}

h2 {
  font-size: 17px;
  margin-bottom: 8px;
  font-weight: 900;
}

h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

p {
  line-height: 1.55;
  margin: 8px 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

:root[data-sidebar="collapsed"] .app-shell {
  grid-template-columns: var(--sidebar-width-collapsed) minmax(0, 1fr);
}

.auth-shell {
  display: grid;
  place-items: start center;
  min-height: 100vh;
  padding: 48px 20px;
}

.auth-card {
  width: min(520px, 100%);
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  max-height: 100vh;
  overflow: auto;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 0;
  display: flex;
  flex-direction: column;
  z-index: 30;
}

.brand {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 10px;
  align-items: center;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}

.sidebar-toggle {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 7px;
  background: #fff;
  color: var(--accent-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  font-size: 16px;
  line-height: 1;
}

.auth-brand {
  min-height: auto;
  grid-template-columns: minmax(0, 1fr);
  padding: 0;
  border-bottom: 0;
  margin-bottom: 16px;
}

.brand-logo {
  width: 100%;
  max-width: 178px;
  height: 48px;
  padding: 5px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
  box-sizing: border-box;
}

.auth-brand-logo {
  max-width: 300px;
  height: 78px;
  padding: 7px 9px;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.password-policy {
  display: grid;
  gap: 6px;
  margin: 4px 0 10px;
}

.password-rule-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.password-rule-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  padding: 5px 8px;
  background: var(--surface-soft);
}

.password-rule-list li::before {
  content: "×";
  display: inline-block;
  margin-right: 5px;
  color: var(--danger);
  font-weight: 900;
}

.password-rule-list li.passed {
  border-color: rgba(22, 163, 74, 0.36);
  color: #166534;
  background: #ecfdf5;
}

.password-rule-list li.passed::before {
  content: "✓";
  color: #16a34a;
}

.password-match-message {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
}

.password-match-message.passed {
  color: #15803d;
}

.password-match-message.error {
  color: var(--danger);
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 15px;
  font-weight: 900;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.nav {
  display: grid;
  padding: 14px 12px;
  gap: 6px;
}

.nav-group {
  display: grid;
  gap: 3px;
}

.nav-group-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 4px;
}

.nav-group-main .nav-button {
  min-width: 0;
}

.nav-button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  color: #39516a;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.nav-button:hover {
  background: #f1f7fa;
  color: var(--accent-strong);
}

.nav-button.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: #bfe4df;
  font-weight: 900;
}

.nav-button.has-badge .nav-label {
  color: var(--accent-strong);
  font-weight: 900;
}

.nav-group-toggle {
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  color: #6a8198;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
}

.nav-group-toggle:hover {
  background: #f1f7fa;
  color: var(--accent-strong);
}

.nav-group-toggle-icon::before {
  content: "⌄";
}

.nav-group[data-nav-group-collapsed="true"] .nav-group-toggle-icon::before {
  content: "›";
}

.nav-group[data-nav-group-collapsed="true"] .nav-subitems {
  display: none;
}

.nav-subitems {
  display: grid;
  gap: 3px;
  margin: -2px 0 4px 44px;
}

.nav-subitems a {
  min-height: 28px;
  padding: 5px 8px;
  border-left: 2px solid #d7e6ec;
  color: #587089;
  font-size: 13px;
}

.nav-subitems a:hover {
  color: var(--accent-strong);
  border-left-color: var(--accent);
  background: #f5faf9;
}

.nav-subitems a.active {
  color: var(--accent-strong);
  border-left-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 900;
}

.nav-ico {
  width: 22px;
  text-align: center;
  color: #6a8198;
  font-weight: 900;
  flex: 0 0 22px;
}

.nav-label {
  min-width: 0;
  flex: 1;
}

.nav-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #0b8f86;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.sidebar-note {
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
  padding: 16px 18px;
  background: #fff;
  font-size: 12px;
  color: var(--muted);
}

.sidebar-note strong {
  display: block;
  margin-top: 4px;
  color: var(--accent-strong);
}

.workspace {
  min-width: 0;
  padding: 98px 28px 88px;
}

.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  z-index: 80;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  margin: 0;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

:root[data-sidebar="collapsed"] .topbar {
  left: var(--sidebar-width-collapsed);
}

:root[data-sidebar="collapsed"] .brand {
  min-height: 72px;
  display: grid;
  grid-template-columns: 34px 28px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 0;
}

:root[data-sidebar="collapsed"] .brand-logo {
  position: static;
  width: 34px;
  height: 34px;
  max-width: 34px;
  padding: 0;
  border-color: var(--line);
  border-radius: 50%;
  background: #fff;
}

:root[data-sidebar="collapsed"] .brand-logo img {
  display: none;
}

:root[data-sidebar="collapsed"] .brand-logo::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: url("/assets/lordin-logo.svg") center / cover no-repeat;
}

:root[data-sidebar="collapsed"] .sidebar-toggle {
  position: static;
}

:root[data-sidebar="collapsed"] .nav-label,
:root[data-sidebar="collapsed"] .sidebar-note,
:root[data-sidebar="collapsed"] .nav-group-toggle,
:root[data-sidebar="collapsed"] .nav-subitems {
  display: none;
}

:root[data-sidebar="collapsed"] .nav {
  padding: 12px 8px;
}

:root[data-sidebar="collapsed"] .nav-button {
  justify-content: center;
  padding: 0;
  gap: 0;
}

:root[data-sidebar="collapsed"] .nav-group-main {
  grid-template-columns: 1fr;
}

:root[data-sidebar="collapsed"] .nav-ico {
  flex-basis: auto;
}

:root[data-sidebar="collapsed"] .nav-badge {
  position: absolute;
  margin: -22px 0 0 28px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-title {
  min-width: 0;
}

.page-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.page-title-row h1 {
  margin: 0;
}

.page-title-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.theme-toggle button {
  min-height: 30px;
  padding: 5px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.theme-toggle button[aria-pressed="true"] {
  background: var(--panel);
  color: var(--accent-strong);
  box-shadow: var(--shadow-soft);
}

.language-switch {
  min-width: 44px;
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.auth-language {
  display: flex;
  justify-content: flex-end;
  margin: -6px 0 12px;
}

.user-chip {
  min-height: 40px;
  display: grid;
  gap: 3px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  align-content: center;
}

.user-chip span {
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.stats-metric-grid {
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  overflow-x: auto;
  padding-bottom: 6px;
}

.stats-metric-grid .metric {
  min-width: 150px;
}

.stats-metric-grid .metric-card-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px 8px;
}

.stats-metric-grid .metric-card-link h3 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-metric-grid .metric-card-link strong {
  grid-column: 2;
  margin-top: 0;
  font-size: 24px;
  line-height: 1;
}

.stats-metric-grid .metric-card-link p {
  grid-column: 1 / -1;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.research-days-workspace {
  display: grid;
  grid-template-columns: minmax(520px, 0.94fr) minmax(460px, 1.06fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.research-days-workspace.single-view {
  grid-template-columns: minmax(0, 1fr);
}

.research-days-side {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.research-list-panel {
  overflow: visible;
  container-type: inline-size;
  min-width: 0;
}

.research-list-panel table:not(.research-day-table) {
  min-width: 0;
}

.research-list-scroll {
  max-height: min(640px, calc(100vh - 210px));
  overflow: auto;
  border-top: 1px solid var(--line-soft);
}

.research-list-scroll table {
  border-top: 0;
}

.research-list-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 7;
  background: var(--panel);
  box-shadow: 0 1px 0 var(--line);
}

.research-day-table {
  table-layout: fixed;
  width: 100%;
  min-width: 980px;
}

.research-list-panel .research-day-table {
  min-width: 980px;
}

.research-day-table th,
.research-day-table td {
  overflow-wrap: normal;
  word-break: keep-all;
  line-height: 1.45;
}

.research-day-table th:first-child,
.research-day-table td:first-child {
  width: 230px;
}

.research-day-table th:nth-child(2),
.research-day-table td:nth-child(2) {
  width: auto;
}

.research-day-table th:nth-child(3),
.research-day-table td:nth-child(3) {
  width: 150px;
  text-align: center;
  overflow-wrap: normal;
  word-break: keep-all;
}

.research-day-table th:last-child,
.research-day-table td:last-child {
  width: 168px;
  text-align: center;
}

.research-day-table th:nth-child(3),
.research-day-table td:nth-child(3) {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.status-attachment-heading {
  display: inline-block;
  min-width: 102px;
  white-space: nowrap;
  line-height: 1.15;
  overflow-wrap: normal;
  word-break: keep-all;
}

.research-list-status-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.research-list-status-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text);
  white-space: nowrap;
}

.research-list-status-chip strong {
  margin-left: auto;
  font-size: 15px;
}

@container (max-width: 560px) {
  .research-list-scroll {
    max-height: min(680px, calc(100vh - 230px));
    overflow-y: auto;
    overflow-x: hidden;
    border-top: 1px solid var(--line-soft);
  }

  .research-list-panel .research-day-table,
  .research-list-panel .research-day-table tbody,
  .research-list-panel .research-day-table tr,
  .research-list-panel .research-day-table td {
    display: block;
    width: 100%;
  }

  .research-list-panel .research-day-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
  }

  .research-list-panel .research-day-table-head {
    display: none;
  }

  .research-list-panel .research-day-table tr:not(.research-day-table-head) {
    position: relative;
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--panel-soft);
  }

  .research-list-panel .research-day-table td {
    border: 0;
    padding: 0;
  }

  .research-list-panel .research-day-table td:first-child {
    padding-right: 154px;
  }

  .research-list-panel .research-day-table td:nth-child(2) {
    margin-top: 10px;
  }

  .research-list-panel .research-day-table td:nth-child(3) {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 148px;
    text-align: center;
  }

  .research-list-panel .research-day-table td:last-child {
    margin-top: 10px;
  }

  .research-list-panel .record-project-cell {
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: start;
  }

  .research-list-panel .record-project-cell > span,
  .research-list-panel .record-project-cell > span small,
  .research-list-panel .record-card {
    max-width: 100%;
    overflow-wrap: normal;
    word-break: keep-all;
  }

  .research-list-panel .record-card {
    max-height: 220px;
    overflow: auto;
    padding-right: 4px;
  }

  .research-list-panel .record-action-group {
    flex-wrap: wrap;
    gap: 6px;
  }

  .research-list-status-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title-row h2 {
  margin-bottom: 6px;
}

.report-list-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.research-list-title-row {
  align-items: center;
  flex-wrap: wrap;
}

.research-list-heading-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: min(560px, 100%);
}

.research-list-heading-tools h2 {
  margin: 0;
}

.research-day-project-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
}

.research-day-project-dropdown {
  min-width: min(260px, 72vw);
}

.research-day-project-dropdown .checkbox-dropdown-panel {
  width: min(520px, 88vw);
}

.research-day-project-dropdown .checkbox-list-row {
  align-items: flex-start;
}

.research-day-project-dropdown .checkbox-list-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.research-list-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.project-list-filter {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
}

.project-list-filter > label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.project-list-filter select {
  min-height: 32px;
  padding: 5px 8px;
}

.project-list-category-dropdown {
  min-width: 142px;
}

.project-list-category-dropdown summary {
  min-width: 142px;
}

.project-list-category-dropdown .checkbox-dropdown-panel {
  right: auto;
  left: 0;
  width: min(560px, 88vw);
}

.project-list-category-dropdown .checkbox-list-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.project-list-category-dropdown .checkbox-list-row input {
  margin-top: 3px;
}

.project-list-category-dropdown .checkbox-list-row span {
  min-width: 0;
  white-space: normal;
  word-break: keep-all;
}

.research-day-list-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
}

.research-day-list-filter label {
  margin: 0;
  white-space: nowrap;
  font-size: 12px;
}

.research-day-list-filter input[type="date"] {
  width: 130px;
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.project-list-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 6px;
  min-width: 0;
}

.project-list-title-row h2 {
  margin: 0 0 6px;
}

.status-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.status-legend .pill {
  cursor: help;
}

.daily-status-field {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
}

.daily-status-options {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.daily-status-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  cursor: pointer;
}

.daily-status-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.daily-status-option:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 131, 125, 0.14);
}

.daily-status-option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--panel-soft);
}

.daily-status-rule-message {
  margin: 0 0 8px;
  color: var(--danger);
  font-weight: 800;
}

.daily-status-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.daily-status-dot.green {
  border-color: #008f63;
  background: #20c77a;
}

.daily-status-dot.orange {
  border-color: #bf7100;
  background: #f6a623;
}

.daily-status-dot.red {
  border-color: #b4232f;
  background: #e0444f;
}

.daily-status-dot.unknown {
  border-color: var(--line);
  background: #fff;
}

.auto-approval-field {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-soft);
}

.approval-table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-top: 1px solid var(--line-soft);
}

.approval-table {
  min-width: 1120px;
  table-layout: fixed;
  border-top: 0;
}

.approval-table th:nth-child(1),
.approval-table td:nth-child(1) {
  width: 112px;
}

.approval-table th:nth-child(2),
.approval-table td:nth-child(2) {
  width: 190px;
}

.approval-table th:nth-child(3),
.approval-table td:nth-child(3) {
  width: 98px;
}

.approval-table th:nth-child(4),
.approval-table td:nth-child(4) {
  width: auto;
}

.approval-table th:nth-child(5),
.approval-table td:nth-child(5) {
  width: 360px;
}

.approval-table td {
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.approval-action-form {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto;
  gap: 6px;
  align-items: start;
  margin: 0 0 8px;
}

.approval-action-form input,
.approval-action-form textarea {
  width: 100%;
  min-width: 0;
}

.approval-action-form textarea {
  min-height: 76px;
  resize: vertical;
}

.approval-action-form button {
  min-width: 72px;
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.tiny-check {
  white-space: nowrap;
  font-size: 12px;
}

.submit-research-day-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.manual-example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.manual-example-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfe;
}

.manual-mini-screen {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 9px 0;
  padding: 8px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: #f4f8fb;
}

.manual-mini-screen span {
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.template-picker {
  padding: 9px 10px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 8px;
  background: #f8fcfb;
}

.measurement-template-source {
  display: none;
}

.compact-help {
  margin: 0;
}

.login-options {
  margin-top: 10px;
  display: flex;
  gap: 10px 16px;
  flex-wrap: wrap;
}

.login-options .check-row {
  min-height: 28px;
}

.login-save-help {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
}

.auth-panel label {
  font-weight: 700;
  text-transform: none;
}

.signup-panel h2 {
  letter-spacing: 0;
}

.auth-secondary-action {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.desktop-notification-box {
  margin-top: 0;
  padding: 10px 12px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: #f8fcfb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
}

.desktop-notification-box h2 {
  margin: 0;
  flex: 0 0 auto;
}

.desktop-notification-box strong {
  display: inline;
  margin: 0 8px 0 0;
}

.desktop-notification-box span {
  color: var(--muted);
}

.desktop-notification-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  margin-left: auto;
}

.desktop-notification-box[hidden] {
  display: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.money-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.money-input-row span {
  font-weight: 900;
  color: var(--ink);
}

.money-cell {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.full {
  grid-column: 1 / -1;
}

.project-create-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-create-row {
  display: grid;
  gap: 10px 12px;
  align-items: end;
}

.project-create-row > * {
  min-width: 0;
}

.project-create-taxonomy-row {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.project-create-code-row {
  grid-template-columns: minmax(240px, 1.2fr) minmax(180px, 0.8fr) minmax(220px, 1fr);
}

.project-create-media-row {
  grid-template-columns: minmax(160px, 0.25fr) minmax(0, 1fr);
}

.project-create-media-row > .full {
  grid-column: auto;
}

.project-create-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.draft-save-button {
  border-color: var(--line-strong);
  background: var(--panel);
  color: var(--ink);
}

.draft-status {
  grid-column: 1 / -1;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 8px;
  background: rgba(20, 184, 166, 0.08);
  color: var(--accent-strong);
  font-weight: 800;
}

.project-create-submit {
  min-height: 54px;
  padding: 13px 16px;
  border-color: #1f5f86;
  background: #1f5f86;
  color: #fff;
  box-shadow: 0 10px 18px rgba(31, 95, 134, 0.16);
}

.project-create-submit:hover,
.project-create-submit:focus {
  background: #174a69;
  border-color: #174a69;
}

.project-expense-form {
  grid-template-columns: minmax(220px, 1.2fr) minmax(140px, 0.75fr) minmax(220px, 1fr) minmax(180px, 0.8fr) auto;
  align-items: end;
}

.project-expense-form .form-actions {
  margin-top: 0;
}

.project-labor-rate-form,
.project-workday-form,
.project-labor-adjustment-form {
  grid-template-columns: repeat(3, minmax(170px, 1fr)) auto;
  align-items: end;
}

.project-labor-assignment-form {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: end;
}

.project-labor-assignment-form > div {
  min-width: 0;
}

.project-labor-table-scroll,
.project-labor-form-scroll {
  max-height: min(420px, calc(100dvh - 360px));
  overflow: auto;
  border-top: 1px solid var(--line-soft);
  scrollbar-gutter: stable both-edges;
  margin-top: 10px;
}

.project-labor-table-scroll.compact-scroll {
  max-height: 260px;
}

.project-labor-rate-table,
.project-labor-assignment-table,
.project-labor-form-table {
  width: 100%;
  min-width: 760px;
}

.project-labor-form-table input,
.project-labor-form-table select {
  min-width: 130px;
}

.project-labor-details {
  margin-top: 4px;
}

.project-budget-table-scroll,
.project-expense-table-scroll {
  max-height: min(520px, calc(100dvh - 300px));
  overflow: auto;
  border-top: 1px solid var(--line-soft);
  scrollbar-gutter: stable both-edges;
}

.project-budget-table,
.project-expense-table {
  width: 100%;
  min-width: 1080px;
}

.project-budget-table thead th,
.project-expense-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--panel);
}

.expense-edit-details {
  position: relative;
}

.expense-edit-details[open] summary {
  display: none;
}

.expense-edit-details summary {
  width: max-content;
  list-style: none;
  cursor: pointer;
}

.expense-edit-details summary::-webkit-details-marker {
  display: none;
}

.expense-edit-form {
  display: grid;
  grid-template-columns: 150px minmax(220px, 1fr) 210px auto;
  gap: 6px;
  align-items: center;
  min-width: 760px;
  margin-top: 8px;
}

.expense-edit-form .form-actions {
  margin-top: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
}

.compact {
  padding: 12px;
}

details.panel > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
}

details.panel > summary::-webkit-details-marker {
  display: none;
}

.report-security-details summary::after {
  content: "펼치기";
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.report-security-details[open] summary::after {
  content: "접기";
}

.report-security-details table {
  margin-top: 10px;
}

.notice {
  border-left: 4px solid var(--accent);
}

.danger {
  border-left-color: var(--danger);
}

.ok {
  border-left-color: var(--ok);
}

label {
  display: block;
  margin: 0 0 5px;
  font-weight: 900;
  font-size: 13px;
  color: #354554;
}

.check-row {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 400;
}

.check-row input {
  width: auto;
  min-height: 0;
}

.mode-choice {
  display: grid;
  gap: 6px;
  margin: 6px 0 8px;
}

.mode-switch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.mode-switch-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel-soft);
}

.mode-switch-card.active {
  border-color: rgba(15, 118, 110, 0.7);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #c7cfdb;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(20, 32, 51, 0.03);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.required-missing {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

.field-error {
  margin: 5px 0 0;
  color: #dc2626;
  font-size: 0.86rem;
  font-weight: 800;
}

textarea {
  min-height: 66px;
  resize: vertical;
  line-height: 1.45;
}

textarea.tall {
  min-height: 92px;
}

button {
  min-height: 36px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.primary-button {
  min-height: 36px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
}

.ghost-button,
.secondary {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ghost-button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 900;
}

.danger-button {
  background: #fff1f0;
  border-color: #e4b5b5;
  color: var(--danger);
}

.inline-form {
  display: inline;
}

.export-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.action-cell .export-actions {
  justify-content: center;
}

.form-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 8px;
}

.compact-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.action-cell {
  text-align: center;
}

.action-cell > .muted {
  display: block;
  text-align: center;
}

.text-link {
  color: var(--accent-strong);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.edit-draft {
  margin-top: 7px;
  text-align: left;
}

.edit-draft summary {
  width: max-content;
  margin: 6px auto 0;
  list-style: none;
}

.edit-draft,
.entry-view-action {
  position: relative;
  display: inline-block;
}

.edit-draft summary::-webkit-details-marker,
.entry-view-action summary::-webkit-details-marker {
  display: none;
}

.edit-draft[open] summary {
  margin-left: 0;
}

.edit-draft-panel {
  display: grid;
  gap: 12px;
  position: absolute;
  z-index: 70;
  right: 0;
  top: 38px;
  width: min(620px, 70vw);
  max-height: min(560px, 72vh);
  overflow: auto;
  padding: 10px;
  margin-top: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-soft);
  box-shadow: var(--shadow);
  text-align: left;
}

.edit-draft-form {
  display: grid;
  gap: 8px;
}

.edit-draft-panel label {
  text-align: left;
}

.edit-attachment-box {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.editable-attachment-list {
  display: grid;
  gap: 6px;
  padding-left: 0;
  list-style: none;
}

.editable-attachment-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
}

.attachment-file-meta {
  min-width: min(220px, 100%);
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
}

.attachment-file-meta strong {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-file-meta em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.edit-attachment-upload {
  grid-template-columns: minmax(170px, 1fr) minmax(130px, 0.8fr) auto auto;
}

.entry-view-popover {
  position: fixed;
  z-index: 130;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(75vw, calc(100vw - 32px));
  max-height: min(840px, calc(100vh - 40px));
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.32);
  text-align: left;
}

.entry-view-action[open]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(1px);
}

.entry-view-meta {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 6px 10px;
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.entry-view-meta dt {
  color: var(--muted);
  font-weight: 900;
}

.entry-view-meta dd {
  margin: 0;
}

.entry-view-title-row {
  align-items: flex-start;
}

.entry-view-head-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
  min-width: max-content;
}

.entry-view-body {
  display: grid;
  gap: 5px;
}

.entry-view-body p {
  max-height: none;
  overflow: visible;
  margin: 0 0 7px;
  padding: 7px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--panel-soft);
  white-space: pre-wrap;
}

.entry-view-approval-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.entry-view-approval-panel .approval-action-form {
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: stretch;
}

.record-action-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: center;
}

.record-action-group .entry-view-action {
  order: 10;
}

.view-memo-stack {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
}

.view-memo-stack .entry-view-action {
  order: 0;
}

.entry-view-memo-section {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.entry-view-memo-card {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(0, 130, 122, 0.08);
}

.entry-view-memo-card p {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.record-action-group form {
  margin: 0;
}

.project-row-actions,
.project-status-form,
.user-status-form,
.user-management-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.project-row-actions {
  justify-content: flex-start;
  min-width: max-content;
}

.row-action-details {
  position: relative;
}

.row-action-details summary {
  list-style: none;
  cursor: pointer;
  width: max-content;
  display: inline-flex;
  align-items: center;
}

.row-action-details summary::-webkit-details-marker {
  display: none;
}

.row-action-details[open] summary {
  position: relative;
  z-index: 72;
}

.row-action-details[open] .project-status-form,
.row-action-details[open] .user-status-form {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 75;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.row-action-details[open] .user-status-form {
  min-width: 320px;
}

.row-action-details[open] .project-status-form {
  min-width: 270px;
}

.user-management-actions .muted {
  flex: 1 1 auto;
}

.user-management-actions {
  justify-content: flex-end;
  min-width: 0;
}

.user-reset-form {
  margin: 0;
}

.password-reset-result {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 128, 128, 0.28);
  border-radius: 8px;
  background: #f0fdfa;
  color: #0f3f3c;
  display: grid;
  gap: 5px;
  max-width: 460px;
  scroll-margin-top: 120px;
}

.password-reset-result code {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid rgba(0, 128, 128, 0.22);
  color: #102033;
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.project-memo-action {
  position: relative;
}

.project-memo-action summary {
  list-style: none;
  width: 32px;
  min-width: 32px;
}

.project-memo-action summary::-webkit-details-marker {
  display: none;
}

.project-memo-popover {
  position: fixed;
  z-index: 60;
  right: 42px;
  top: 180px;
  width: min(460px, 78vw);
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: left;
}

.project-memo-popover h3 {
  margin: 0 0 8px;
}

.project-memo-popover .compact-title-row {
  align-items: center;
  margin-bottom: 8px;
}

.project-memo-popover .compact-title-row h3 {
  margin: 0;
}

.project-memo-popover ul {
  margin: 0 0 10px;
  padding-left: 18px;
}

.project-memo-popover textarea {
  min-height: 86px;
}

.project-status-form input,
.user-status-form input {
  width: auto;
  min-width: 150px;
  height: 34px;
}

.project-status-form input {
  flex: 1 1 130px;
  width: 130px;
  min-width: 130px;
  height: 32px;
  padding: 6px 8px;
}

.user-status-form input {
  flex: 1 1 190px;
  max-width: 260px;
}

.project-status-form button,
.user-status-form button,
.project-row-actions > button,
.user-reset-form button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 8px;
  font-size: 13px;
  white-space: nowrap;
}

.project-editor-row[hidden],
.project-detail-row[hidden] {
  display: none;
}

.project-editor-panel {
  padding: 10px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 8px;
  background: #fbfdfe;
}

.project-edit-form .form-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  align-items: start;
}

.project-period-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
}

.compact-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 8px 10px;
}

.compact-details summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--accent-strong);
}

.project-table td {
  vertical-align: top;
}

.project-table-scroll {
  height: min(760px, calc(100vh - 245px));
  min-height: 520px;
  overflow: auto;
  border-top: 1px solid var(--line-soft);
}

#project-list {
  display: flex;
  flex-direction: column;
  height: min(760px, calc(100dvh - 132px));
  min-height: 440px;
  max-height: calc(100dvh - 132px);
  overflow: hidden;
}

#project-list .project-list-title-row {
  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--panel);
  padding-bottom: 10px;
}

#project-list .research-list-actions {
  width: 100%;
  margin-left: 0;
  justify-content: flex-start;
}

#project-list .research-list-actions > button {
  flex: 0 0 auto;
}

#project-list .project-list-filter {
  flex: 1 1 640px;
}

#project-list .project-table-scroll {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

.project-table {
  width: 100%;
  min-width: 1320px;
  table-layout: fixed;
}

.project-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--panel);
}

.project-table th:nth-child(1),
.project-table td:nth-child(1) {
  width: 58px;
}

.project-table th:nth-child(2),
.project-table td:nth-child(2) {
  width: 128px;
}

.project-table th:nth-child(3),
.project-table td:nth-child(3) {
  width: 200px;
}

.project-table th:nth-child(4),
.project-table td:nth-child(4) {
  width: 56px;
}

.project-table th:nth-child(5),
.project-table td:nth-child(5) {
  width: 42px;
}

.project-table th:nth-child(6),
.project-table td:nth-child(6) {
  width: 74px;
}

.project-table th:nth-child(7),
.project-table td:nth-child(7) {
  width: 86px;
}

.project-table th:nth-child(8),
.project-table td:nth-child(8) {
  width: 122px;
}

.project-table th:nth-child(9),
.project-table td:nth-child(9) {
  width: 88px;
}

.project-table th:nth-child(10),
.project-table td:nth-child(10) {
  width: 82px;
}

.project-table th:nth-child(11),
.project-table td:nth-child(11) {
  width: 52px;
  text-align: center;
}

.project-table th:nth-child(12),
.project-table td:nth-child(12) {
  width: 46px;
  text-align: center;
}

.project-table th:nth-child(13),
.project-table td:nth-child(13) {
  width: 42px;
  text-align: center;
}

.project-table th:nth-child(14),
.project-table td:nth-child(14) {
  width: 132px;
}

.project-table td.project-kind-cell,
.project-table td.project-related-cell,
.project-table td.project-creator-cell,
.project-table td.project-current-leader-cell,
.project-table td.project-period-cell,
.project-table td.project-daily-status-cell,
.project-table td.project-status-cell,
.project-table td.project-level-cell,
.project-table td.project-chat-cell,
.project-table td.project-memo-cell,
.project-table td.project-action-cell {
  vertical-align: middle;
  white-space: nowrap;
}

.project-current-leader {
  display: grid;
  gap: 2px;
  line-height: 1.2;
}

.project-current-leader strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-daily-status-stack {
  display: inline-grid;
  justify-items: center;
  gap: 3px;
  line-height: 1.15;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.project-daily-status-stack small {
  color: var(--muted);
  font-size: 11px;
}

.daily-status-project-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
}

.daily-status-project-pill.status-green {
  border-color: rgba(16, 185, 129, 0.42);
  background: #ecfdf5;
  color: #047857;
}

.daily-status-project-pill.status-orange {
  border-color: rgba(245, 158, 11, 0.45);
  background: #fff7ed;
  color: #b45309;
}

.daily-status-project-pill.status-red {
  border-color: rgba(239, 68, 68, 0.45);
  background: #fef2f2;
  color: #b91c1c;
}

.project-table td.project-creator-cell {
  overflow: visible;
  position: relative;
  text-overflow: clip;
}

.project-table td.project-action-cell {
  overflow: visible;
}

.project-table th small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.25;
}

.project-creator-hover {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  outline: none;
}

.project-creator-name {
  display: inline-block;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.project-creator-popover {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 40;
  min-width: 220px;
  max-width: 320px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  white-space: normal;
  line-height: 1.5;
}

.project-creator-hover:hover .project-creator-popover,
.project-creator-hover:focus-within .project-creator-popover {
  display: grid;
  gap: 4px;
}

.project-period-stack {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.project-period-stack span {
  white-space: nowrap;
}

.project-code-cell {
  display: block;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.project-kind-pill {
  white-space: nowrap;
}

.project-detail-row td {
  padding-top: 8px;
}

.project-row.is-detail-open td {
  position: sticky;
  top: 46px;
  z-index: 3;
  background: var(--panel);
  box-shadow: 0 1px 0 var(--line), 0 10px 20px rgba(15, 23, 42, 0.06);
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.link-button:hover,
.link-button:focus {
  color: var(--accent-strong);
  text-decoration: underline;
}

.project-member-summary {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.project-member-summary.member-count-details {
  position: relative;
  display: inline-block;
}

.project-member-summary.member-count-details summary {
  list-style: none;
  cursor: pointer;
}

.project-member-summary.member-count-details summary::-webkit-details-marker {
  display: none;
}

.project-member-summary span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf7f6;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.member-count-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  min-width: 150px;
  max-width: 260px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.member-count-popover ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.member-count-popover li {
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-member-search-group.required-missing {
  border-color: rgba(196, 61, 61, 0.65);
}

.project-members-detail {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.project-members-detail h3 {
  margin: 0 0 8px;
}

.project-member-list {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.project-member-list dt {
  font-weight: 900;
  color: var(--muted);
}

.project-member-list dd {
  margin: 0;
}

.project-member-pills {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.project-member-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 10px;
  margin-top: 0;
  min-width: 0;
}

.project-member-picker {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-soft);
}

.project-member-picker h3 {
  margin: 0;
  color: var(--accent-strong);
}

.project-member-search-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: start;
  min-width: 0;
}

.project-member-search-group > label {
  margin: 0;
  white-space: normal;
}

.member-search-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 0.8fr) max-content;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.member-search-input,
.member-select {
  min-height: 34px;
  margin: 0;
}

.selected-member-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 0;
}

.selected-member-chips:empty {
  display: none;
}

.selected-member-chip {
  min-height: 28px;
  padding: 4px 8px;
  border-color: rgba(15, 118, 110, 0.22);
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: none;
}

.member-picker-list {
  display: grid;
  gap: 3px;
  max-height: 112px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
}

.member-picker-list[hidden] {
  display: none;
}

.empty-picker-guide {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.empty-picker-guide p {
  margin: 0;
}

.project-user-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  min-height: 30px;
  align-items: start;
  padding: 4px 6px;
  border-radius: 6px;
  margin: 0;
}

.project-user-check input[type="checkbox"] {
  margin: 2px 0 0;
}

.project-user-check:has(input[type="checkbox"]:checked) {
  display: none;
}

.project-user-check span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: keep-all;
  line-height: 1.25;
}

.project-user-check small {
  color: var(--muted);
  font-size: 11px;
}

.project-status-stack {
  display: inline-flex;
  gap: 5px;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
}

.project-list-filter {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  justify-content: flex-start;
  flex-wrap: wrap;
  justify-self: stretch;
  width: 100%;
  margin: 0;
}

.project-list-filter label {
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
}

.project-list-filter select {
  min-width: 132px;
  width: auto;
}

.role-adjust-cell {
  white-space: nowrap;
}

.role-permission-dialog {
  width: min(860px, calc(100vw - 48px));
  max-height: calc(100vh - 72px);
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.role-permission-dialog::backdrop {
  background: rgba(15, 23, 42, 0.34);
}

.lls-confirm-dialog {
  width: min(440px, calc(100vw - 40px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.lls-confirm-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
}

.lls-confirm-card {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 20px;
}

.lls-confirm-card h3,
.lls-confirm-card p {
  margin: 0;
}

.lls-confirm-card h3 {
  font-size: 18px;
}

.lls-confirm-card p {
  line-height: 1.6;
  color: var(--muted);
  white-space: pre-wrap;
}

.lls-confirm-actions {
  justify-content: flex-end;
  margin: 0;
}

.role-permission-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.role-permission-head h3,
.role-permission-head p {
  margin: 0;
}

.role-permission-head h3 {
  margin-bottom: 4px;
}

.role-permission-form {
  margin: 0;
}

.additional-role-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-height: 38px;
  align-items: center;
}

.device-evaluation-form {
  display: grid;
  gap: 18px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.number-cell {
  text-align: right;
  white-space: nowrap;
}

.device-evaluation-runner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.device-evaluation-runner section {
  min-width: 0;
}

.device-evaluation-runner h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.device-evaluation-material-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(96px, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}

.device-evaluation-material-input {
  display: grid;
  gap: 5px;
  min-width: 96px;
}

.device-evaluation-material-input span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.device-evaluation-material-input input {
  min-width: 0;
}

.device-evaluation-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

#device-evaluation-results {
  display: flex;
  flex-direction: column;
  height: min(760px, calc(100dvh - 132px));
  min-height: 440px;
  max-height: calc(100dvh - 132px);
  overflow: hidden;
}

#device-evaluation-results .table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

.device-evaluation-results-table th {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--panel);
  box-shadow: 0 1px 0 var(--line);
}

.device-evaluation-results-table td:nth-child(4) {
  min-width: 220px;
}

.device-evaluation-results-table td:nth-child(5) {
  min-width: 120px;
}

.device-evaluation-detail-action .entry-view-popover {
  width: min(75vw, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
}

.device-evaluation-memo-action[open]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 155;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(1px);
}

.device-evaluation-memo-action .status-memo-popover {
  position: fixed;
  z-index: 170;
  left: 50%;
  right: auto;
  top: 50%;
  width: min(560px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100vh - 72px);
  overflow: auto;
  transform: translate(-50%, -50%);
}

.device-evaluation-memo-action .status-memo-popover textarea {
  min-height: 150px;
}

.report-memo-action[open]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 155;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(1px);
}

.report-memo-action .status-memo-popover {
  position: fixed;
  z-index: 170;
  left: 50%;
  right: auto;
  top: 50%;
  width: min(560px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100vh - 72px);
  overflow: auto;
  transform: translate(-50%, -50%);
}

.report-memo-action .status-memo-popover textarea {
  min-height: 130px;
}

.device-evaluation-dialog {
  width: min(1040px, calc(100vw - 48px));
  max-height: calc(100vh - 72px);
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.device-evaluation-dialog::backdrop {
  background: rgba(15, 23, 42, 0.34);
}

.device-evaluation-detail {
  display: grid;
  gap: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.detail-grid dt {
  color: var(--muted);
  font-weight: 700;
}

.detail-grid dd {
  min-width: 0;
  margin: 0;
  white-space: pre-wrap;
}

.device-evaluation-detail h4 {
  margin: 6px 0 0;
  font-size: 15px;
}

.device-evaluation-material-list {
  display: flex;
  gap: 6px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}

.device-evaluation-material-list span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--text);
  font-weight: 700;
}

.device-evaluation-image-scroll {
  max-width: 100%;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.device-evaluation-attachment-list {
  display: grid;
  gap: 12px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.device-evaluation-attachment-list .device-evaluation-image-scroll {
  max-height: none;
  overflow: visible;
}

.device-evaluation-image-preview {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}

.device-evaluation-image-scroll img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  background: #fff;
}

.attachment-preview-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
}

.attachment-preview-caption strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-preview-caption small {
  flex: 0 0 auto;
  font-weight: 900;
  opacity: 0.9;
}

.device-evaluation-detail-action .device-evaluation-image-scroll.attachment-preview-scroll,
.device-evaluation-dialog .device-evaluation-image-scroll.attachment-preview-scroll {
  width: 100%;
  max-width: 100%;
}

.device-evaluation-detail-action .device-evaluation-image-scroll img,
.device-evaluation-dialog .device-evaluation-image-scroll img {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
}

.device-evaluation-file-card,
.device-evaluation-current-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--soft);
}

.device-evaluation-file-card {
  font: inherit;
  color: var(--ink);
  text-align: left;
  cursor: zoom-in;
}

.device-evaluation-current-file {
  margin-top: 8px;
}

.device-evaluation-current-file-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.device-evaluation-current-file-list > .muted {
  font-weight: 800;
}

.device-evaluation-file-card strong,
.device-evaluation-current-file a {
  min-width: 0;
  overflow-wrap: anywhere;
}

.device-evaluation-upload-preview .daily-attachment-preview-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
}

.device-evaluation-upload-preview .daily-attachment-preview-card-shell {
  width: 100%;
  height: auto;
  min-height: 140px;
}

.device-evaluation-upload-preview .daily-attachment-preview-card {
  min-height: 140px;
  height: auto;
}

.device-evaluation-upload-preview .daily-attachment-preview-card img {
  width: 100%;
  max-height: 420px;
  height: auto;
  object-fit: contain;
}

.device-evaluation-upload-preview .daily-attachment-preview-pdf {
  min-height: 120px;
}

.device-evaluation-conclusion {
  margin: 0;
  white-space: pre-wrap;
}

.device-evaluation-memo-list {
  display: grid;
  gap: 8px;
}

.device-evaluation-memo-card {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-soft);
}

.device-evaluation-memo-card > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}

.device-evaluation-memo-card p {
  margin: 0;
  white-space: pre-wrap;
}

[data-detail-list-expanded="true"] .entry-view-action {
  display: block;
}

[data-detail-list-expanded="true"] .entry-view-action[open]::before {
  content: none;
}

[data-detail-list-expanded="true"] .entry-view-popover {
  position: static;
  transform: none;
  width: 100%;
  max-height: none;
  margin-top: 8px;
  box-shadow: var(--shadow);
}

[data-detail-list-expanded="true"] .device-evaluation-detail-action .entry-view-popover {
  width: 100%;
}

.user-create-panel {
  padding: 0;
  overflow: hidden;
}

.user-create-summary {
  display: grid;
  grid-template-columns: max-content minmax(140px, max-content) minmax(0, 1fr);
  align-items: center;
  gap: 8px 14px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.user-create-summary::-webkit-details-marker {
  display: none;
}

.user-create-summary h2,
.user-create-summary p {
  margin: 0;
}

.user-create-summary p {
  line-height: 1.35;
  font-size: 13.5px;
  min-width: 0;
}

.summary-caret {
  color: var(--accent-strong);
  font-weight: 900;
  transition: transform 0.16s ease;
}

.user-create-panel[open] .summary-caret {
  transform: rotate(90deg);
}

.user-create-body {
  padding: 0 18px 18px;
}

.user-create-guide {
  margin: 0 0 10px;
}

.user-create-form {
  margin-top: 10px;
}

.user-create-grid {
  grid-template-columns: minmax(130px, 0.7fr) minmax(230px, 1.2fr) minmax(180px, 0.95fr) minmax(150px, 0.85fr);
  align-items: end;
}

.user-create-grid input,
.user-create-grid select,
.user-create-grid .checkbox-dropdown summary {
  min-height: 34px;
}

.user-create-projects {
  grid-column: span 2;
}

.user-create-actions {
  justify-content: flex-end;
  margin-top: 10px;
}

.user-list-title-row {
  align-items: center;
  margin-bottom: 8px;
}

.user-list-title-row h2 {
  margin: 0;
}

.user-list-title-row .muted {
  font-size: 0.9rem;
  font-weight: 700;
  margin-left: 6px;
}

.permission-approval-panel {
  padding: 0;
  overflow: hidden;
}

.permission-approval-summary {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  align-items: center;
  gap: 8px 18px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.permission-approval-summary::-webkit-details-marker {
  display: none;
}

.permission-approval-panel[open] .summary-caret {
  transform: rotate(90deg);
}

.permission-approval-summary h2,
.permission-approval-summary p {
  margin: 0;
}

.permission-approval-body {
  padding: 0 18px 18px;
}

.permission-approval-table-scroll {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.permission-approval-table-scroll table {
  margin: 0;
}

.permission-approval-status {
  margin-left: auto;
  font-weight: 900;
}

.permission-approval-status.ok {
  color: var(--accent-strong);
}

.permission-approval-status.wait {
  color: #b7791f;
}

.user-table-scroll {
  height: clamp(420px, calc(100vh - 430px), 760px);
  max-height: 760px;
  overflow: auto;
  overscroll-behavior: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.user-table {
  min-width: 1180px;
  table-layout: auto;
  font-size: 15px;
}

.user-table th,
.user-table td {
  padding: 10px 9px;
  vertical-align: middle;
}

.user-table th {
  position: sticky;
  top: 0;
  z-index: 5;
  font-size: 13.5px;
}

.table-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  min-height: auto;
}

.table-sort-button:hover,
.table-sort-button.is-active {
  color: var(--accent-strong);
}

.user-table .pill {
  font-size: 13px;
}

.user-table-name {
  width: 150px;
}

.user-table-email {
  width: 230px;
}

.user-table-role {
  width: 145px;
}

.user-table-scope {
  width: 170px;
}

.user-table-role-adjust {
  width: 115px;
}

.user-table-status {
  width: 95px;
}

.user-table-action {
  width: 230px;
}

.user-table th:nth-child(1),
.user-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 4;
  background: var(--panel);
}

.user-table th:nth-child(2),
.user-table td:nth-child(2) {
  position: sticky;
  left: 150px;
  z-index: 4;
  background: var(--panel);
}

.user-table th:nth-child(1),
.user-table th:nth-child(2) {
  z-index: 6;
  background: #fbfdfe;
}

.user-action-cell {
  min-width: 220px;
}

.user-action-cell .user-status-form {
  width: 100%;
}

.user-action-cell input,
.user-action-cell button {
  min-height: 38px;
  font-size: 13px;
}

.user-action-cell .user-status-details {
  flex: 0 0 auto;
}

.permission-requests-table {
  font-size: 14px;
}

.permission-requests-table th {
  font-size: 13px;
}

.checkbox-dropdown {
  position: relative;
  max-width: 100%;
}

.checkbox-dropdown summary {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.checkbox-dropdown summary::after {
  content: "⌄";
  color: var(--muted);
}

.checkbox-dropdown summary::-webkit-details-marker {
  display: none;
}

.checkbox-dropdown[open] summary {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.08);
}

.checkbox-dropdown-panel {
  position: absolute;
  z-index: 80;
  left: 0;
  top: calc(100% + 4px);
  width: min(680px, 86vw);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.checkbox-dropdown-panel .checkbox-grid,
.checkbox-dropdown-panel .checkbox-list {
  max-height: 220px;
  overflow: auto;
  border: 0;
  padding: 0;
}

.checkbox-list {
  display: grid;
  gap: 2px;
}

.checkbox-list-row {
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 6px;
}

.checkbox-list-row:hover {
  background: #f4f7fa;
}

.checkbox-select-all {
  min-height: 34px;
  margin: 0 0 6px;
  padding: 6px 8px 8px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--accent-strong);
  font-weight: 900;
}

.compact-checkbox-grid {
  max-height: 96px;
  overflow: auto;
}

.compact-checkbox-list {
  max-height: 180px;
  overflow: auto;
}

.status-attachment-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: 100%;
  min-width: 116px;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.status-dot-line,
.status-pill-line,
.attachment-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  flex-wrap: nowrap;
}

.status-attachment-cell .pill,
.status-attachment-cell .status-memo-action,
.status-attachment-cell .attachment-clip {
  white-space: nowrap;
  max-width: 100%;
}

.status-attachment-cell .attachment-clip {
  margin-inline: auto;
}

.status-memo-action {
  position: relative;
  display: inline-flex;
  justify-content: center;
}

.status-memo-action summary {
  list-style: none;
}

.status-memo-button {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 58px;
  width: auto;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--panel);
}

.status-memo-action summary::-webkit-details-marker,
.status-memo-button::-webkit-details-marker {
  display: none;
}

.status-memo-action[open] .status-memo-button {
  border-color: var(--accent);
  background: rgba(0, 130, 122, 0.1);
}

.status-memo-popover {
  position: absolute;
  z-index: 150;
  right: 0;
  top: calc(100% + 8px);
  width: min(390px, calc(100vw - 56px));
  max-width: 390px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: left;
}

.status-memo-popover form {
  display: grid;
  gap: 8px;
}

.status-memo-current {
  max-height: 78px;
  overflow: auto;
  margin: 0;
  padding: 8px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text);
  white-space: pre-wrap;
}

.status-memo-popover textarea {
  min-height: 96px;
  resize: vertical;
}

.status-memo-actions {
  justify-content: flex-end;
  margin: 0;
}

.approval-comment-action {
  position: relative;
  display: inline-flex;
  justify-content: center;
}

.approval-comment-button {
  list-style: none;
  cursor: pointer;
  border: 1px solid rgba(15, 118, 110, 0.35);
}

.approval-comment-button::-webkit-details-marker {
  display: none;
}

.approval-comment-action[open] .approval-comment-button,
.approval-comment-action:hover .approval-comment-button {
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.14);
}

.approval-comment-popover {
  display: none;
  position: absolute;
  z-index: 160;
  right: 0;
  top: calc(100% + 8px);
  width: min(360px, calc(100vw - 56px));
  max-width: 360px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: left;
  white-space: normal;
}

.approval-comment-action[open] .approval-comment-popover,
.approval-comment-action:hover .approval-comment-popover {
  display: block;
}

.approval-comment-popover p {
  margin: 8px 0;
  white-space: pre-wrap;
}

.daily-status-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  white-space: nowrap;
}

.record-project-cell {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin-top: 7px;
}

.record-project-cell span,
.record-project-cell small {
  display: block;
  min-width: 0;
}

.record-project-text {
  min-width: 0;
  max-width: 100%;
  max-height: 86px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.record-project-code,
.record-project-cell small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.record-project-cell small {
  color: var(--muted);
  font-size: 12px;
}

.record-feedback {
  margin: 2px 0 0;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.record-feedback.ok {
  background: #e9f7ef;
  border-color: #bfe8d0;
  color: var(--ok);
}

.record-feedback.danger {
  background: #fdecec;
  border-color: #f4c2c2;
  color: var(--danger);
}

.record-feedback.status {
  background: #f1fbfb;
  border-color: #bcebea;
  color: var(--ink);
}

.measurement-editor {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.measurement-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.measurement-rows {
  display: grid;
  gap: 6px;
}

.measurement-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(86px, 0.65fr) minmax(112px, 0.75fr) minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.measurement-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.measurement-tags span {
  display: inline-flex;
  gap: 4px;
  align-items: baseline;
  padding: 4px 7px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: #eef8f6;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.measurement-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.measurement-chip-row span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef8f6;
  color: var(--accent-strong);
  font-size: 12px;
}

.project-workload-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 720px;
}

.project-workload-chip {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 2px 6px;
  min-width: 154px;
  padding: 6px 8px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: #f7fbfa;
  color: var(--ink);
  font-size: 12px;
}

.project-workload-chip strong {
  font-size: 12px;
}

.project-workload-chip em {
  justify-self: end;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef8f6;
  color: var(--accent-strong);
  font-style: normal;
  font-weight: 900;
  font-size: 11px;
}

.project-workload-chip small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.project-plan {
  display: grid;
  gap: 4px;
  padding: 10px 0;
}

.project-plan p,
.project-memos p {
  margin: 2px 0;
}

.project-plan-text-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.project-plan-text-grid textarea {
  min-height: 96px;
}

.project-memos {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.project-attachments {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.project-record-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.project-record-links .ghost-button {
  white-space: nowrap;
}

.project-attachments h3,
.project-memos h3 {
  margin: 0 0 6px;
}

.project-memos ul {
  margin: 6px 0;
  padding-left: 18px;
}

.project-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.project-icon-viewer {
  position: relative;
}

.project-icon-viewer summary {
  list-style: none;
}

.project-icon-viewer summary::-webkit-details-marker {
  display: none;
}

.project-icon-thumb {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  cursor: zoom-in;
}

.project-image-thumb-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  cursor: zoom-in;
}

.project-image-thumb-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.project-image-dialog {
  width: min(75vw, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.project-image-dialog::backdrop {
  background: rgba(2, 8, 23, 0.62);
}

.project-image-dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel);
}

.project-image-dialog img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  background: var(--panel-soft);
}

.project-daily-dialog {
  width: min(960px, 92vw);
  max-height: 84vh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.project-daily-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.project-daily-dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel);
}

.project-daily-dialog-head h3,
.project-daily-dialog-head p {
  margin: 0;
}

.project-daily-dialog-body {
  max-height: calc(84vh - 78px);
  overflow: auto;
  padding: 12px 18px 18px;
}

.project-daily-dialog-body thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel);
}

.project-evaluation-scroll {
  max-height: min(560px, calc(100dvh - 260px));
  overflow: auto;
  border-top: 1px solid var(--line-soft);
}

.project-evaluation-filter {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.project-evaluation-filter label {
  display: grid;
  gap: 4px;
  min-width: min(360px, 100%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.project-evaluation-filter select {
  min-height: 36px;
}

.project-evaluation-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel);
}

.device-file-dialog {
  width: min(75vw, calc(100vw - 24px));
}

.daily-attachment-preview-dialog {
  width: min(75vw, calc(100vw - 24px));
}

.daily-attachment-preview-dialog-body {
  min-height: 220px;
  background: var(--panel-soft);
}

.daily-attachment-preview-dialog-body img,
.daily-attachment-preview-dialog-body iframe {
  display: block;
  width: 100%;
  border: 0;
}

.daily-attachment-preview-dialog-body img {
  height: auto;
  max-height: none;
}

.daily-attachment-preview-dialog-body iframe {
  height: min(72vh, 760px);
  object-fit: contain;
}

@media (max-width: 1180px), (pointer: coarse) {
  .device-evaluation-attachment-list {
    grid-template-columns: repeat(auto-fill, minmax(168px, 220px));
    justify-content: start;
  }

  .device-evaluation-image-scroll {
    overflow: hidden;
  }

  .device-evaluation-image-preview {
    min-height: 128px;
    background: #fff;
  }

  .device-evaluation-image-scroll img,
  .device-evaluation-detail-action .device-evaluation-image-scroll img,
  .device-evaluation-dialog .device-evaluation-image-scroll img {
    height: 128px;
    max-height: 128px;
    object-fit: contain;
  }

  .device-evaluation-file-card {
    min-height: 128px;
    align-content: center;
  }

  .device-evaluation-detail-action .entry-view-popover {
    width: min(86vw, calc(100vw - 24px));
  }

  .daily-attachment-preview-dialog,
  .device-file-dialog {
    width: min(86vw, calc(100vw - 24px));
  }
}

@media (max-width: 760px) {
  .entry-view-popover,
  .device-evaluation-detail-action .entry-view-popover,
  .project-image-dialog,
  .device-file-dialog,
  .daily-attachment-preview-dialog {
    width: calc(100vw - 24px);
  }
}

.project-icon-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-icon-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.project-icon-large {
  position: absolute;
  z-index: 50;
  top: 62px;
  left: 0;
  width: min(420px, 72vw);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.project-icon-large img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
  background: #f8fbfd;
  border-radius: 6px;
  margin-bottom: 8px;
}

.project-image-thumb,
.project-image-empty {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.project-image-thumb {
  cursor: zoom-in;
}

.project-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.project-image-empty {
  border-style: dashed;
  background: #f8fbfd;
  box-shadow: none;
}

.project-image-square.list .project-image-thumb,
.project-image-empty.list {
  width: 58px;
  height: 58px;
}

.daily-entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

[data-research-day-editor] > .section-title-row {
  position: sticky;
  top: 72px;
  z-index: 55;
  margin: -14px -14px 16px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 8px 8px 0 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

:root[data-theme="dark"] [data-research-day-editor] > .section-title-row {
  border-bottom-color: #33485a;
  background: rgba(22, 33, 44, 0.96);
}

.daily-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.daily-action-button {
  min-height: 44px;
  padding: 10px 16px;
  font-size: 15px;
}

.research-project-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfe;
  padding: 12px;
}

.daily-header-actions .research-project-preview {
  display: grid;
  grid-template-columns: auto 58px;
  grid-template-rows: auto auto auto;
  gap: 3px 8px;
  align-items: center;
  min-width: 230px;
  max-width: 310px;
  padding: 7px 9px;
}

.daily-header-actions .previous-log-loader,
.daily-header-actions .previous-log-empty-button {
  flex: 0 0 auto;
}

.research-project-preview h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.daily-header-actions .research-project-preview h3,
.daily-header-actions .research-project-preview p {
  grid-column: 1;
  margin: 0;
}

.daily-header-actions .research-project-preview h3 {
  font-size: 13px;
}

.daily-header-actions .research-project-preview p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.research-project-preview-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
}

.daily-header-actions .research-project-preview-image {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 54px;
}

.research-project-preview-empty {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 54px;
  aspect-ratio: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  line-height: 1.25;
}

.previous-log-loader {
  position: relative;
  margin-top: 0;
}

.previous-log-loader summary {
  width: fit-content;
  list-style: none;
}

.previous-log-loader summary::-webkit-details-marker {
  display: none;
}

.previous-log-loader-panel {
  position: absolute;
  z-index: 35;
  top: calc(100% + 6px);
  right: auto;
  left: 0;
  width: min(420px, 78vw);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.previous-log-loader-panel select {
  width: 100%;
}

.research-project-preview-image.is-empty {
  border-style: dashed;
  background: #f8fbfd;
  pointer-events: none;
}

.research-project-preview-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 6px 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.project-taxonomy-form {
  grid-template-columns: minmax(170px, 0.7fr) repeat(3, minmax(180px, 1fr)) auto;
  align-items: end;
}

.taxonomy-create-actions {
  align-self: end;
}

.taxonomy-kind {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  margin-top: 10px;
  overflow: hidden;
}

.taxonomy-kind summary {
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--ink);
}

.taxonomy-kind summary span,
.taxonomy-kind summary em {
  color: var(--muted);
  font-style: normal;
}

.taxonomy-table {
  min-width: 820px;
}

.taxonomy-grid {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) repeat(3, minmax(150px, 1fr)) minmax(150px, 0.8fr);
  gap: 10px;
  align-items: center;
  justify-items: start;
}

.taxonomy-grid > span,
.taxonomy-grid > div {
  min-width: 0;
}

.taxonomy-grid > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taxonomy-grid-head {
  padding: 8px 12px;
  color: var(--muted);
  font-weight: 900;
  border-bottom: 1px solid var(--line);
}

.taxonomy-path-list {
  border-top: 1px solid var(--line-soft);
}

.taxonomy-path-row,
.taxonomy-empty-row {
  min-height: 38px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.taxonomy-path-row:last-child,
.taxonomy-empty-row:last-child {
  border-bottom: 0;
}

.taxonomy-kind-cell {
  min-width: 0;
}

.taxonomy-action-cell {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  align-items: center;
  min-width: 0;
  width: 100%;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.taxonomy-action-cell > * {
  flex: 0 0 auto;
}

.taxonomy-projects-details {
  position: relative;
}

.taxonomy-projects-details summary {
  list-style: none;
  cursor: pointer;
}

.taxonomy-projects-details summary::-webkit-details-marker {
  display: none;
}

.taxonomy-project-list {
  min-width: min(440px, 80vw);
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.taxonomy-project-list ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.taxonomy-empty-message {
  grid-column: span 3;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taxonomy-tree,
.taxonomy-tree ul {
  list-style: none;
  margin: 0;
  padding: 0 0 0 18px;
}

.taxonomy-tree {
  padding: 6px 12px 12px;
}

.taxonomy-tree li {
  margin: 6px 0;
  border-left: 1px solid var(--line-soft);
  padding-left: 10px;
}

.taxonomy-node-line {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(170px, auto);
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 4px 0;
}

.taxonomy-node-line span:first-child {
  display: flex;
  gap: 8px;
  align-items: center;
}

.taxonomy-node-line em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.taxonomy-delete-note {
  justify-self: start;
  white-space: nowrap;
  cursor: pointer;
}

.taxonomy-projects-details {
  position: relative;
}

.taxonomy-projects-details summary {
  list-style: none;
  cursor: pointer;
}

.taxonomy-projects-details summary::-webkit-details-marker {
  display: none;
}

.taxonomy-project-list {
  position: absolute;
  left: 0;
  z-index: 30;
  min-width: 360px;
  max-width: min(520px, 80vw);
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.taxonomy-action-cell .taxonomy-project-list {
  left: auto;
  right: 0;
}

.taxonomy-count-details summary .pill {
  cursor: pointer;
  user-select: none;
}

.taxonomy-project-list ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.taxonomy-project-list li {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.taxonomy-project-list li span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.taxonomy-delete-form {
  justify-self: start;
}

.taxonomy-empty {
  padding: 0 12px 12px;
}

.compact-form {
  display: grid;
  gap: 8px;
}

.tiny-button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.attachment-box {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.report-row-actions {
  min-width: 190px;
}

.report-status-cell {
  white-space: nowrap;
}

.report-attachment-box {
  display: grid;
  grid-template-columns: auto minmax(34px, 1fr);
  gap: 6px 8px;
  align-items: center;
}

.report-attachment-title {
  font-size: 12px;
  color: var(--muted);
}

.report-attachment-box .attachment-list,
.report-attachment-box .attachment-upload {
  grid-column: 1 / -1;
}

.report-attachment-box .attachment-preview-scroll,
.report-attachment-box .attachment-preview-file-card {
  max-width: min(360px, 100%);
}

.report-attachment-box .attachment-empty-square {
  justify-self: start;
}

.attachment-list {
  margin: 0 0 8px;
  padding-left: 16px;
}

.attachment-list li {
  margin: 4px 0;
}

.attachment-list-item-main {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
}

.attachment-preview-scroll,
.attachment-preview-file-card {
  margin-top: 6px;
  width: 100%;
  max-width: min(460px, 100%);
}

.attachment-preview-scroll img {
  max-height: 220px;
}

.attachment-preview-file-card {
  justify-content: flex-start;
}

.disabled-row {
  opacity: 0.62;
}

.attachment-upload {
  display: grid;
  gap: 6px;
  align-items: center;
}

.attachment-upload {
  grid-template-columns: minmax(170px, 1fr) minmax(130px, 0.8fr) auto auto;
}

.attachment-upload-preview {
  grid-column: 1 / -1;
}

.attachment-upload .toggle-chip {
  min-height: 38px;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  white-space: nowrap;
}

.project-attachment-upload {
  grid-template-columns: max-content minmax(150px, 180px) minmax(220px, 520px);
  align-items: center;
}

.project-attachment-upload .file-picker-button {
  min-width: 86px;
  min-height: 34px;
  padding: 6px 10px;
}

.clearable-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.project-icon-upload-line {
  display: grid;
  grid-template-columns: minmax(220px, 420px) minmax(260px, 1fr);
  gap: 8px 12px;
  align-items: center;
}

.project-icon-upload-line .compact-help {
  margin: 0;
}

.project-icon-file-row {
  width: 100%;
}

.clearable-file-row input[type="file"] {
  min-width: 0;
}

.project-icon-file-row input[type="file"] {
  width: 100%;
}

.file-picker-button {
  position: relative;
  display: inline-flex;
  justify-self: start;
  width: auto;
  min-width: 108px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.file-picker-button input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.inline-attachment-upload {
  display: grid;
  gap: 8px;
}

.selected-attachment-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.selected-attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 5px 7px 5px 10px;
}

.selected-attachment-item span {
  min-width: 0;
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.selected-attachment-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-attachment-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.daily-attachment-preview {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
}

.daily-attachment-preview-empty {
  display: grid;
  min-height: 72px;
  place-items: center;
  margin: 8px 0 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.daily-attachment-preview-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.daily-attachment-preview-card-shell {
  position: relative;
  flex: 0 0 180px;
  height: 116px;
}

.daily-attachment-preview-card {
  display: grid;
  place-items: center;
  width: 100%;
  height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
  cursor: zoom-in;
  padding: 0;
}

.daily-attachment-preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(16, 32, 51, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--danger);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.daily-attachment-preview-remove:hover {
  background: #fff;
  border-color: rgba(196, 61, 61, 0.45);
}

.daily-attachment-preview-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8fafc;
}

.daily-attachment-preview-pdf {
  display: grid;
  gap: 6px;
  justify-items: center;
  max-width: 100%;
  padding: 12px;
  color: var(--ink);
}

.daily-attachment-preview-pdf strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 34px;
  border-radius: 6px;
  background: #fee2e2;
  color: #991b1b;
}

.daily-attachment-preview-pdf em {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.research-day-summary-media {
  display: flex;
  gap: 10px;
  max-width: 100%;
  overflow-x: auto;
  padding: 6px 0 8px;
  scroll-snap-type: x proximity;
}

.research-day-summary-image {
  flex: 0 0 100%;
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  cursor: zoom-in;
  overflow: hidden;
  scroll-snap-align: start;
}

.research-day-summary-image img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
}

.attachment-clip {
  position: relative;
  display: inline-block;
}

.attachment-clip summary {
  list-style: none;
}

.attachment-clip summary::-webkit-details-marker {
  display: none;
}

.clip-button,
.attachment-empty-square {
  width: 38px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #fff;
  color: var(--accent-strong);
}

.clip-button {
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.clip-button strong {
  font-size: 12px;
}

.attachment-empty-square {
  border-style: dashed;
  background: #f8fbfd;
  color: transparent;
}

.attachment-popover {
  position: absolute;
  z-index: 45;
  right: 0;
  top: 40px;
  min-width: 340px;
  max-width: min(520px, 80vw);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.deleted-records-popover {
  position: relative;
  display: inline-block;
}

.deleted-records-popover summary {
  list-style: none;
}

.deleted-records-popover summary::-webkit-details-marker {
  display: none;
}

.deleted-records-menu {
  position: absolute;
  z-index: 55;
  right: 0;
  top: 38px;
  width: min(900px, 84vw);
  max-height: 560px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: left;
}

.compact-table {
  font-size: 12px;
}

.research-day-table th:nth-child(3),
.research-day-table th:nth-child(4),
.research-day-table td:nth-child(3),
.research-day-table td:nth-child(4) {
  text-align: center;
}

.research-day-table td.action-cell {
  text-align: left;
}

.research-day-table .action-cell .record-action-group {
  justify-content: flex-start;
  align-items: flex-start;
  gap: 6px;
}

.research-day-table .view-memo-stack {
  justify-items: stretch;
  width: 78px;
}

.research-day-table .entry-view-action > summary.ghost-button.tiny-button,
.research-day-table .status-memo-button {
  box-sizing: border-box;
  width: 78px;
  min-width: 78px;
  min-height: 30px;
  height: 30px;
  padding: 5px 8px;
  font-size: 12px;
  line-height: 1;
}

.msg {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  background: #eef6ff;
  color: #073763;
}

.compact-message {
  margin: 8px 0 0;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
}

.error {
  background: #fff1f0;
  color: var(--danger);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  padding: 9px 8px;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  background: #fbfdfe;
  border-bottom: 1px solid var(--line);
  text-transform: none;
}

tr:hover td {
  background: #fbfdfe;
}

.notification-table-scroll {
  max-height: min(680px, calc(100vh - 270px));
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.notification-list-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 10px;
}

.notification-list-header h2 {
  margin: 0;
  white-space: nowrap;
}

.notification-bulk-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  min-width: 0;
  overflow: visible;
  padding-bottom: 0;
}

.notification-bulk-actions button,
.notification-bulk-actions .check-row {
  white-space: nowrap;
}

.notification-page-size {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
  font-weight: 800;
}

.notification-page-size select {
  width: auto;
  min-width: 96px;
  min-height: 34px;
}

.audit-table-scroll {
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.audit-table {
  min-width: 1180px;
  table-layout: fixed;
  font-size: 15px;
}

.audit-summary-table th:nth-child(1),
.audit-summary-table td:nth-child(1) {
  width: 260px;
}

.audit-summary-table th:nth-child(2),
.audit-summary-table td:nth-child(2) {
  width: 150px;
}

.audit-summary-table th:nth-child(3),
.audit-summary-table td:nth-child(3),
.audit-summary-table th:nth-child(5),
.audit-summary-table td:nth-child(5) {
  width: 190px;
}

.audit-summary-table th:nth-child(4),
.audit-summary-table td:nth-child(4) {
  width: 310px;
}

.audit-summary-table th:nth-child(6),
.audit-summary-table td:nth-child(6) {
  width: 120px;
}

.audit-summary-table th:nth-child(7),
.audit-summary-table td:nth-child(7) {
  width: 220px;
}

.audit-summary-table th:nth-child(8),
.audit-summary-table td:nth-child(8) {
  width: 150px;
}

.notification-table {
  width: 100%;
  min-width: 1080px;
  table-layout: fixed;
  font-size: 15px;
}

.notification-table th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fbfdfe;
  box-shadow: 0 1px 0 var(--line);
}

.notification-table th:nth-child(1),
.notification-table td:nth-child(1) {
  width: 74px;
  min-width: 74px;
  position: sticky;
  left: 0;
  z-index: 4;
  background: var(--panel);
  text-align: center;
}

.notification-table th:nth-child(2),
.notification-table td:nth-child(2) {
  width: 128px;
  min-width: 128px;
}

.notification-table th:nth-child(3),
.notification-table td:nth-child(3) {
  width: 78px;
  min-width: 78px;
  text-align: center;
}

.notification-table th:nth-child(4),
.notification-table td:nth-child(4) {
  width: 82px;
  min-width: 82px;
  text-align: center;
}

.notification-table th:nth-child(1) {
  z-index: 6;
  background: #fbfdfe;
}

.notification-table th:nth-child(5),
.notification-table td:nth-child(5) {
  width: 210px;
  overflow-wrap: anywhere;
}

.notification-table th:nth-child(6),
.notification-table td:nth-child(6) {
  width: auto;
  overflow-wrap: anywhere;
}

.notification-table th:nth-child(7),
.notification-table td:nth-child(7) {
  width: 116px;
}

.notification-table th:nth-child(8),
.notification-table td:nth-child(8) {
  width: 88px;
}

.notification-table th,
.notification-table td {
  overflow-wrap: normal;
  word-break: keep-all;
}

.notification-row[data-notification-href] {
  cursor: pointer;
}

.notification-row[data-notification-href]:hover td {
  background: #f6fbfb;
}

.plain-link {
  color: inherit;
  text-decoration: none;
}

.plain-link:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.notification-time-stack {
  display: grid;
  gap: 2px;
  line-height: 1.25;
  white-space: nowrap;
}

.notification-table td:nth-child(6) strong,
.notification-table td:nth-child(6) p {
  overflow-wrap: anywhere;
}

.notification-select-title,
.notification-select-all {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.notification-select-title {
  margin-bottom: 4px;
}

.notification-select-all {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.notification-select-all input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.notification-level-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1;
}

.row-checkbox {
  width: 19px;
  height: 19px;
  min-height: 19px;
  accent-color: var(--accent);
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

code {
  background: #eef2f7;
  padding: 2px 6px;
  border-radius: 4px;
}

.muted {
  color: var(--muted);
}

.pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eef2f7;
  color: #30485a;
  font-size: 12px;
  font-weight: 900;
}

.pill-link {
  text-decoration: none;
  cursor: pointer;
}

.pill-link:hover,
.pill-link:focus-visible {
  box-shadow: 0 0 0 2px rgba(34, 115, 185, 0.18);
}

.pill.ok {
  background: #e9f7ef;
  color: var(--ok);
}

.pill.wait {
  background: #fff5df;
  color: var(--amber);
}

.pill.danger {
  background: #fdecec;
  color: var(--danger);
}

.pill.draft {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.metric {
  min-height: 92px;
  padding: 14px;
  border-left: 3px solid var(--accent);
  display: block;
  background: #fff;
}

.metric-card-link {
  display: block;
  height: 100%;
  color: inherit;
}

.metric:nth-child(2) {
  border-left-color: var(--blue);
}

.metric:nth-child(3) {
  border-left-color: var(--lime);
}

.metric strong {
  display: block;
  font-size: 26px;
  margin-top: 8px;
  line-height: 1;
  letter-spacing: 0;
}

.metric-link {
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.metric-link:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.32);
  box-shadow: var(--shadow);
}

.table-link {
  font-weight: 800;
  color: var(--accent-strong);
  border-bottom: 1px solid rgba(15, 118, 110, 0.28);
}

.approval-pending-panel {
  border-left-color: var(--amber);
}

.approval-pending-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.approval-pending-table td:nth-child(1) {
  width: 72px;
}

.approval-pending-table td:nth-child(3) {
  width: 150px;
  white-space: nowrap;
}

.approval-pending-table td:nth-child(4) {
  width: 110px;
  text-align: right;
}

.bar-cell {
  position: relative;
  min-width: 44px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.bar-cell span {
  position: absolute;
  inset: auto auto -2px 0;
  height: 3px;
  min-width: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.55), rgba(8, 115, 185, 0.45));
}

.bar-cell strong {
  position: relative;
  z-index: 1;
}

.bar-link {
  display: block;
  color: var(--ink);
}

.trend-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 6px 0 14px;
}

.trend-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfe;
  padding: 9px;
}

.trend-card strong,
.trend-card p,
.trend-card small {
  display: block;
}

.trend-card p {
  margin: 6px 0 2px;
  font-weight: 900;
}

.trend-card small {
  color: var(--muted);
  font-size: 12px;
}

.trend-bar {
  height: 7px;
  margin-top: 8px;
  border-radius: 999px;
  background: #edf4f7;
  overflow: hidden;
}

.trend-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--blue));
}

.trend-bar span[data-progress="0"] {
  width: 0 !important;
}

.scope-chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
  margin: 10px 0;
}

.scope-chips strong,
.scope-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef8f6;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.scope-chips span {
  background: #f4f7fa;
  color: #405872;
}

.project-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.project-progress-strip {
  display: flex;
  overflow-x: auto;
  padding-bottom: 8px;
}

.project-progress-strip .project-progress-card {
  flex: 0 0 292px;
}

.project-progress-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfe;
  padding: 12px;
}

.daily-status-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 10px;
}

.daily-status-summary-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 4px 8px;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfe;
}

.daily-status-summary-card strong {
  font-size: 22px;
  line-height: 1;
}

.daily-status-summary-card span:last-child {
  grid-column: 2;
  color: var(--muted);
  font-weight: 800;
}

.compact-status-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
}

.compact-status-panel h2 {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}

.compact-status-panel .daily-status-summary-grid {
  flex: 1;
  grid-template-columns: repeat(4, minmax(105px, 1fr));
  gap: 8px;
}

.compact-status-panel .daily-status-summary-card {
  grid-template-columns: auto auto minmax(0, 1fr);
  min-height: 42px;
  padding: 8px 10px;
}

.compact-status-panel .daily-status-summary-card strong {
  font-size: 20px;
}

.compact-status-panel .daily-status-summary-card span:last-child {
  grid-column: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-period-panel {
  position: sticky;
  top: 0;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  flex-wrap: wrap;
}

.stats-period-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stats-period-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 900;
  text-decoration: none;
  background: var(--panel);
}

.stats-period-tabs a.active {
  border-color: rgba(45, 199, 184, 0.7);
  color: var(--accent-strong);
  background: rgba(45, 199, 184, 0.12);
}

.stats-period-form {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.stats-project-filter {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.stats-period-form label,
.stats-project-filter label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.stats-period-form input,
.stats-period-form select,
.stats-project-filter select {
  min-height: 32px;
  padding: 5px 8px;
}

.statistics-project-dropdown {
  min-width: 220px;
}

.statistics-project-dropdown .checkbox-dropdown-panel {
  right: 0;
  left: auto;
  width: min(520px, 86vw);
}

.statistics-project-dropdown .checkbox-list-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.statistics-project-dropdown .checkbox-list-row input {
  margin-top: 3px;
}

.statistics-project-dropdown .checkbox-list-row span {
  min-width: 0;
  white-space: normal;
  word-break: keep-all;
}

.stats-project-selection {
  flex-basis: 100%;
  margin: -2px 0 0;
}

.stats-summary-panel {
  padding: 14px 16px;
}

.stats-summary-panel ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--ink);
}

.stats-summary-panel li + li {
  margin-top: 5px;
}

.stats-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.stats-section-head h2,
.stats-section-head p {
  margin: 0;
}

.stats-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 12px;
}

.stats-visual-panel {
  min-height: 280px;
  overflow: hidden;
}

.stats-heatmap-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
}

.stats-heatmap {
  display: grid;
  gap: 6px;
  align-items: center;
  min-width: 610px;
}

.heatmap-label,
.heatmap-month,
.heatmap-project {
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
}

.heatmap-project {
  min-width: 0;
  color: var(--ink);
}

.heatmap-project strong,
.heatmap-project span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heatmap-project span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.heatmap-cell {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--accent-strong);
  background: rgba(148, 163, 184, 0.08);
}

.heatmap-cell.level-1 { background: rgba(45, 199, 184, 0.12); }
.heatmap-cell.level-2 { background: rgba(45, 199, 184, 0.24); }
.heatmap-cell.level-3 { background: rgba(45, 199, 184, 0.4); color: #053b3b; }
.heatmap-cell.level-4 { background: rgba(15, 118, 110, 0.82); color: #fff; }

.portfolio-plot {
  position: relative;
  height: 292px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(148, 163, 184, 0.25) 50%, transparent 50.2%),
    linear-gradient(0deg, transparent 49.8%, rgba(148, 163, 184, 0.25) 50%, transparent 50.2%),
    rgba(148, 163, 184, 0.06);
  overflow: hidden;
}

.plot-axis {
  position: absolute;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.plot-x {
  right: 12px;
  bottom: 8px;
}

.plot-y {
  left: 12px;
  top: 8px;
}

.portfolio-bubble {
  position: absolute;
  transform: translate(-10px, 50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 8px 4px 4px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  max-width: 178px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  background: rgba(148, 163, 184, 0.12);
  white-space: nowrap;
}

.portfolio-bubble.label-left {
  transform: translate(calc(-100% + 10px), 50%);
  flex-direction: row-reverse;
  padding: 4px 4px 4px 8px;
}

.portfolio-dot {
  width: var(--bubble-size);
  height: var(--bubble-size);
  min-width: var(--bubble-size);
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.portfolio-label {
  display: block;
  max-width: 136px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-bubble.risk-normal { border-color: rgba(45, 199, 184, 0.45); }
.portfolio-bubble.risk-warn { border-color: rgba(245, 158, 11, 0.5); }
.portfolio-bubble.risk-danger { border-color: rgba(248, 113, 113, 0.55); }
.portfolio-bubble.risk-normal .portfolio-dot { background: rgba(15, 118, 110, 0.95); }
.portfolio-bubble.risk-warn .portfolio-dot { background: rgba(217, 119, 6, 0.95); }
.portfolio-bubble.risk-danger .portfolio-dot { background: rgba(185, 28, 28, 0.95); }

.risk-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.risk-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px;
  background: rgba(148, 163, 184, 0.06);
}

.risk-card header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.risk-card header span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
}

.risk-card.risk-warn header span { background: #d97706; }
.risk-card.risk-danger header span { background: #dc2626; }
.risk-card h3,
.risk-card p {
  margin: 0 0 6px;
}

.risk-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.funnel-chart {
  display: grid;
  gap: 12px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 86px 1fr 52px;
  align-items: center;
  gap: 10px;
}

.funnel-row span,
.funnel-row strong {
  font-weight: 900;
}

.funnel-row i {
  display: block;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--blue));
}

.funnel-row.draft i { background: #64748b; }
.funnel-row.submitted i { background: #d97706; }
.funnel-row.approved i { background: #0f766e; }
.funnel-row.rejected i { background: #dc2626; }

.radar-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.radar-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(148, 163, 184, 0.06);
  padding: 10px;
}

.radar-card svg {
  width: 92px;
  height: 92px;
}

.radar-bg {
  fill: rgba(148, 163, 184, 0.09);
  stroke: rgba(148, 163, 184, 0.5);
}

.radar-shape {
  fill: rgba(45, 199, 184, 0.36);
  stroke: var(--accent);
  stroke-width: 2;
}

.radar-card circle {
  fill: var(--accent);
}

.radar-card strong,
.radar-card small {
  display: block;
}

.budget-gauge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.budget-gauge-card {
  display: grid;
  gap: 8px;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  background: rgba(148, 163, 184, 0.06);
  text-align: center;
  align-content: start;
  min-width: 0;
}

.budget-gauge {
  width: 112px;
  height: 62px;
  position: relative;
  overflow: hidden;
}

.budget-gauge::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 112px 112px 0 0;
  background: conic-gradient(from 270deg at 50% 100%, var(--accent) var(--gauge), rgba(148, 163, 184, 0.2) 0 180deg, transparent 0);
}

.budget-gauge::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 46px;
  border-radius: 80px 80px 0 0;
  background: var(--panel);
}

.budget-gauge span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  z-index: 1;
  font-weight: 900;
}

.budget-gauge-card.warn .budget-gauge::before { background: conic-gradient(from 270deg at 50% 100%, #d97706 var(--gauge), rgba(148, 163, 184, 0.2) 0 180deg, transparent 0); }
.budget-gauge-card.danger .budget-gauge::before { background: conic-gradient(from 270deg at 50% 100%, #dc2626 var(--gauge), rgba(148, 163, 184, 0.2) 0 180deg, transparent 0); }

.budget-gauge-name {
  display: -webkit-box;
  width: 100%;
  min-height: 2.5em;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: keep-all;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.budget-gauge-card .muted {
  width: 100%;
  overflow-wrap: anywhere;
}

.project-progress-card header {
  display: grid;
  gap: 2px;
}

.project-progress-card header span {
  color: var(--muted);
  font-size: 12px;
}

.progress-bar {
  margin: 10px 0 8px;
}

.mini-sparkline {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  min-width: 74px;
  height: 44px;
  margin-right: 8px;
  padding: 5px;
  border-radius: 8px;
  background: #f4f7fa;
  vertical-align: middle;
}

.mini-sparkline i {
  display: block;
  width: 7px;
  border-radius: 999px 999px 2px 2px;
  background: linear-gradient(180deg, var(--blue), var(--accent));
}

.measurement-history summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 800;
}

.measurement-history ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.stats-budget-table th,
.stats-budget-table td {
  vertical-align: middle;
}

.stats-budget-table th:first-child,
.stats-budget-table td:first-child {
  min-width: 170px;
}

.stats-budget-row .money-cell {
  white-space: nowrap;
  text-align: right;
}

.stats-inline-meter {
  display: grid;
  grid-template-columns: auto minmax(52px, 92px);
  align-items: center;
  gap: 6px;
  min-width: 92px;
  max-width: 140px;
}

.stats-inline-meter strong {
  white-space: nowrap;
}

.stats-mini-bar {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf4f7;
}

.stats-mini-bar i {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(90deg, rgba(15, 118, 110, 0.95) 0 5px, rgba(45, 199, 184, 0.9) 5px 10px);
}

.stats-mini-bar i[data-progress="0"] {
  width: 0 !important;
}

.stats-mini-bar.over i {
  background: repeating-linear-gradient(90deg, rgba(220, 38, 38, 0.95) 0 5px, rgba(248, 113, 113, 0.9) 5px 10px);
}

.stats-collapsible-panel {
  padding: 0;
}

.stats-collapsible-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.stats-collapsible-panel summary::-webkit-details-marker {
  display: none;
}

.stats-collapsible-panel summary h2 {
  margin: 0;
}

.stats-collapsible-panel > table {
  margin: 0 16px 16px;
  width: calc(100% - 32px);
}

.stats-collapsible-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--accent-strong);
  font-weight: 900;
}

.stats-collapsible-toggle::after {
  content: "펼치기";
}

.stats-collapsible-panel[open] .stats-collapsible-toggle::after {
  content: "접기";
}

.highlight-row {
  background: #f0fdfa;
  outline: 2px solid rgba(15, 118, 110, 0.22);
  outline-offset: -2px;
}

.ops-check-row.ops-check-warn {
  background: rgba(245, 158, 11, 0.09);
}

.ops-check-row.ops-check-error {
  background: rgba(220, 38, 38, 0.1);
}

.ops-check-row.ops-check-warn td:first-child,
.ops-check-row.ops-check-error td:first-child {
  box-shadow: inset 3px 0 0 currentColor;
}

.ops-check-row.ops-check-warn td:first-child {
  color: #b7791f;
}

.ops-check-row.ops-check-error td:first-child {
  color: #c53030;
}

.ops-action-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 7px;
  color: var(--accent-strong);
  font-weight: 900;
  text-decoration: none;
  background: rgba(15, 118, 110, 0.07);
}

.ops-action-link:hover {
  border-color: rgba(15, 118, 110, 0.42);
  background: rgba(15, 118, 110, 0.12);
}

.record-card {
  display: grid;
  gap: 6px;
}

.watermark {
  position: fixed;
  right: 18px;
  bottom: 12px;
  color: rgba(0, 0, 0, 0.28);
  font-size: 12px;
  pointer-events: none;
  z-index: 2;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(600px, 1.35fr) minmax(340px, 0.65fr);
  gap: 16px;
  align-items: start;
}

.dashboard-executive-layout {
  display: grid;
  grid-template-columns: minmax(480px, 0.95fr) minmax(420px, 1.05fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

.discussion-panel {
  display: grid;
  gap: 14px;
}

.discussion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.discussion-title-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
  flex-wrap: wrap;
}

.discussion-head h2,
.discussion-head p {
  margin: 0;
}

.discussion-head h2 {
  flex: 0 0 auto;
}

.discussion-head p {
  min-width: 260px;
  flex: 1 1 620px;
}

.discussion-link-box {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #cddde7;
  border-radius: 8px;
  background: #f7fbfd;
}

.discussion-link-box code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--accent-strong);
  font-weight: 900;
}

.discussion-direct-link {
  font-weight: 900;
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.discussion-link-box.compact {
  grid-template-columns: max-content minmax(160px, 0.55fr) max-content minmax(240px, 1fr);
}

.discussion-room-list {
  display: grid;
  gap: 12px;
}

.discussion-room-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border: 1px solid #c7d9e3;
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: linear-gradient(90deg, #eefaf8 0%, #ffffff 42%, #fbfdff 100%);
  box-shadow: 0 5px 16px rgba(16, 32, 51, 0.08);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.discussion-room-card:hover {
  border-color: #9bbbc9;
  box-shadow: 0 8px 22px rgba(16, 32, 51, 0.12);
  transform: translateY(-1px);
}

.discussion-room-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(0, 124, 120, 0.2);
}

.discussion-room-main {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
  white-space: nowrap;
}

.discussion-room-main strong {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discussion-room-main span {
  flex: 1 1 auto;
  min-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discussion-room-main span,
.discussion-room-count {
  color: var(--muted);
  font-weight: 700;
}

.discussion-room-side {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  white-space: nowrap;
}

.discussion-unread {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid #d8e7ed;
  background: #eef6f8;
  color: var(--muted);
  font-weight: 900;
}

.discussion-unread.active {
  background: #fff3d6;
  color: #9a5b00;
}

.dashboard-metrics {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-bottom: 16px;
}

.dashboard-executive-metrics .metric {
  min-height: 86px;
}

.dashboard-executive-metrics .metric strong {
  font-size: 28px;
}

.dashboard-status-panel {
  min-width: 0;
}

.dashboard-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(82px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.dashboard-status-bucket {
  position: relative;
  min-width: 0;
}

.dashboard-status-bucket summary {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  list-style: none;
}

.dashboard-status-bucket summary::-webkit-details-marker {
  display: none;
}

.dashboard-status-bucket summary > span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-status-count {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

.dashboard-status-bucket.status-green .dashboard-status-count {
  color: #16803b;
  background: #ecfdf3;
}

.dashboard-status-bucket.status-orange .dashboard-status-count {
  color: #b45309;
  background: #fff7ed;
}

.dashboard-status-bucket.status-red .dashboard-status-count {
  color: #dc2626;
  background: #fef2f2;
}

.dashboard-status-bucket.status-unknown .dashboard-status-count {
  color: #64748b;
  background: #fff;
}

.dashboard-status-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: min(340px, calc(100vw - 48px));
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.dashboard-status-bucket:nth-child(n + 3) .dashboard-status-popover {
  left: auto;
  right: 0;
}

.dashboard-status-popover h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.dashboard-status-project-list {
  display: grid;
  gap: 6px;
}

.dashboard-status-project {
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: inherit;
  background: #fbfdfe;
}

.dashboard-status-project:hover {
  border-color: rgba(15, 118, 110, 0.28);
  background: #f3fbfa;
}

.dashboard-status-project strong,
.dashboard-status-project span,
.dashboard-status-project small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-status-project small {
  color: var(--muted);
  font-weight: 800;
}

.notification-summary-panel {
  overflow: auto;
}

.notification-summary-table {
  min-width: 760px;
  table-layout: fixed;
}

.notification-summary-table th:nth-child(1),
.notification-summary-table td:nth-child(1) {
  width: 74px;
  text-align: center;
}

.notification-summary-table th:nth-child(2),
.notification-summary-table td:nth-child(2) {
  width: 190px;
}

.notification-summary-table th:nth-child(4),
.notification-summary-table td:nth-child(4) {
  width: 124px;
}

.notification-summary-table th,
.notification-summary-table td {
  overflow-wrap: anywhere;
}

.dashboard-stack {
  display: grid;
  gap: 14px;
}

.action-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.panel-title-row h2 {
  margin: 0;
}

.calendar-view-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.project-calendar-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 0;
}

.calendar-category-dropdown {
  min-width: min(250px, 72vw);
}

.calendar-category-dropdown .checkbox-dropdown-panel {
  width: min(520px, 88vw);
}

.calendar-category-dropdown .checkbox-list-row {
  align-items: flex-start;
}

.calendar-category-dropdown .checkbox-list-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.calendar-project-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.calendar-project-chip {
  display: inline-flex;
  align-items: center;
  max-width: 260px;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #f4fbfa;
  color: var(--accent-strong);
  font-weight: 900;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-week-grid {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: min(720px, calc(100vh - 310px));
  overflow: auto;
  background: var(--panel);
}

.calendar-week-header {
  display: grid;
  position: sticky;
  top: 0;
  z-index: 6;
  min-width: 720px;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  background: var(--panel);
}

.calendar-week-scroll {
  min-width: 720px;
}

.calendar-week-bars {
  display: grid;
  min-width: 720px;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 0;
  min-height: calc((var(--calendar-row-count, 1) * 76px) + 18px);
  padding: 0;
  border-top: 1px solid var(--line-soft);
  background: var(--panel);
}

.calendar-week-day-column {
  min-height: calc((var(--calendar-row-count, 1) * 76px) + 18px);
  padding: 10px;
  border-right: 1px solid var(--line-soft);
}

.calendar-week-day-column:last-child {
  border-right: 0;
}

.calendar-week-day-column.is-today {
  box-shadow: inset 0 0 0 2px rgba(45, 199, 184, 0.28);
}

.calendar-week-day-events {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-week-day-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 8px 10px;
  text-decoration: none;
}

.calendar-week-day-project-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 6px;
  min-width: 0;
}

.calendar-week-project-title {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-week-day-project small {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-day-log-link {
  white-space: nowrap;
}

.calendar-day-log-link.ghost-button {
  font-weight: 900;
}

.calendar-day-log-link.ghost-button.status-green {
  border-color: rgba(16, 185, 129, 0.42);
  background: #ecfdf5;
  color: #047857;
}

.calendar-day-log-link.ghost-button.status-orange {
  border-color: rgba(245, 158, 11, 0.45);
  background: #fff7ed;
  color: #b45309;
}

.calendar-day-log-link.ghost-button.status-red {
  border-color: rgba(239, 68, 68, 0.45);
  background: #fef2f2;
  color: #b91c1c;
}

.calendar-day-log-link.ghost-button.status-unknown {
  border-color: var(--line);
  background: #f8fafc;
  color: var(--muted);
}

.calendar-week-project-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  min-height: 54px;
  align-items: center;
  background:
    linear-gradient(to right, transparent calc(20% - 1px), var(--line-soft) calc(20% - 1px), var(--line-soft) 20%, transparent 20%),
    linear-gradient(to right, transparent calc(40% - 1px), var(--line-soft) calc(40% - 1px), var(--line-soft) 40%, transparent 40%),
    linear-gradient(to right, transparent calc(60% - 1px), var(--line-soft) calc(60% - 1px), var(--line-soft) 60%, transparent 60%),
    linear-gradient(to right, transparent calc(80% - 1px), var(--line-soft) calc(80% - 1px), var(--line-soft) 80%, transparent 80%);
}

.calendar-week-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  align-self: center;
  box-sizing: border-box;
  margin: 3px 5px;
}

.calendar-week-bar strong {
  flex: 0 1 auto;
  max-width: min(380px, 46%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-week-bar small {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-week-empty {
  margin: 0;
  align-self: center;
}

.calendar-week-bars > .calendar-week-empty {
  grid-column: 1 / -1;
  padding: 10px;
}

.calendar-day-card {
  min-height: 220px;
  border-right: 1px solid var(--line-soft);
  background: #fff;
}

.calendar-day-card:last-child {
  border-right: 0;
}

.calendar-day-card.is-sunday .calendar-day-head {
  background: #fff1f0;
  color: #b42318;
}

.calendar-day-card.is-saturday .calendar-day-head {
  background: #edf6ff;
  color: #175cd3;
}

.calendar-day-card.is-today {
  box-shadow: inset 0 0 0 2px rgba(0, 136, 128, 0.44);
}

.calendar-day-head.is-today {
  box-shadow: inset 0 0 0 2px rgba(0, 136, 128, 0.44);
}

.calendar-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  background: #f0f8fb;
  color: var(--ink);
  font-weight: 900;
}

.calendar-day-head span {
  color: inherit;
  font-size: 12px;
}

.calendar-day-events {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 10px;
}

.calendar-event-card {
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: #f8fcfb;
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.calendar-event-card strong,
.calendar-event-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-card small {
  color: var(--muted);
}

.calendar-event-badge {
  width: fit-content;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e6fffb;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
}

.calendar-month-groups {
  display: grid;
  gap: 12px;
  max-height: min(720px, calc(100dvh - 320px));
  overflow: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.calendar-month-group {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  overflow: visible;
}

.calendar-month-group-head {
  display: grid;
  position: sticky;
  top: 0;
  z-index: 5;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: #fbfdfe;
}

.calendar-month-title-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.calendar-month-group-head h3 {
  flex: 0 0 auto;
  margin: 0;
}

.calendar-month-title-line span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-month-list {
  display: grid;
  gap: 0;
}

.calendar-month-list > .muted {
  margin: 0;
  padding: 10px 14px;
}

.calendar-month-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 1.4fr);
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  text-decoration: none;
}

.calendar-month-card:last-child {
  border-bottom: 0;
}

.calendar-month-card strong,
.calendar-month-card small {
  display: block;
}

.calendar-month-card small {
  margin-top: 3px;
  color: var(--muted);
}

.calendar-month-meta {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}

.calendar-person-scroll {
  max-height: min(680px, calc(100dvh - 320px));
  min-height: 320px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  scrollbar-gutter: stable both-edges;
}

.calendar-person-scroll table {
  min-width: 940px;
  border-top: 0;
}

.calendar-person-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 7;
  background: var(--panel);
  box-shadow: 0 1px 0 var(--line);
}

.calendar-person-table th:first-child,
.calendar-person-table td:first-child {
  width: 190px;
}

.calendar-person-table th:nth-child(2),
.calendar-person-table td:nth-child(2) {
  width: 130px;
}

.panel-action-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.panel-action-header h2 {
  margin-top: 0;
}

.backup-action-strip {
  justify-content: flex-end;
  flex: 0 0 auto;
  margin-left: auto;
}

.backup-action-strip form {
  margin: 0;
}

.activity-history-dialog {
  width: min(1120px, calc(100vw - 48px));
  max-height: calc(100vh - 72px);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.activity-history-dialog::backdrop {
  background: rgba(15, 23, 42, 0.34);
}

.activity-history-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.activity-history-modal-head h3 {
  margin: 0 0 4px;
}

.activity-history-scroll {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.activity-history-scroll table {
  min-width: 1180px;
  font-size: 14px;
}

.table-actions {
  margin-bottom: 10px;
}

.report-export-body {
  background: #fff;
}

.report-page {
  max-width: 920px;
  margin: 28px auto;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.report-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.report-head h1 {
  font-size: 24px;
}

.report-section {
  margin: 18px 0;
}

.report-watermark {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  padding: 5px 12px;
  border: 1px solid rgba(15, 118, 110, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 900;
  color: #006e67;
  pointer-events: none;
  white-space: nowrap;
}

.print-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin: 16px auto 0;
  max-width: 920px;
}

:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .sidebar-note,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .auth-card .panel,
:root[data-theme="dark"] .project-editor-panel,
:root[data-theme="dark"] .compact-details,
:root[data-theme="dark"] .manual-example-card,
:root[data-theme="dark"] .project-members-detail,
:root[data-theme="dark"] .checkbox-dropdown summary,
:root[data-theme="dark"] .checkbox-dropdown-panel,
:root[data-theme="dark"] .project-memo-popover,
:root[data-theme="dark"] .deleted-records-menu,
:root[data-theme="dark"] .discussion-link-box,
:root[data-theme="dark"] .discussion-room-card,
:root[data-theme="dark"] .attachment-popover,
:root[data-theme="dark"] .research-project-preview,
  :root[data-theme="dark"] .activity-history-dialog,
  :root[data-theme="dark"] .role-permission-dialog,
  :root[data-theme="dark"] .lls-confirm-dialog,
  :root[data-theme="dark"] .activity-history-scroll,
:root[data-theme="dark"] .selected-attachment-item,
:root[data-theme="dark"] .user-chip,
:root[data-theme="dark"] .metric,
:root[data-theme="dark"] .dashboard-status-bucket summary,
:root[data-theme="dark"] .dashboard-status-popover,
:root[data-theme="dark"] .dashboard-status-project,
:root[data-theme="dark"] .trend-card,
:root[data-theme="dark"] .project-progress-card,
:root[data-theme="dark"] .stats-collapsible-toggle,
:root[data-theme="dark"] .desktop-notification-box,
:root[data-theme="dark"] .msg {
  background: var(--panel);
}

:root[data-theme="dark"] .dashboard-status-project:hover {
  background: #16283a;
}

:root[data-theme="dark"] .dashboard-status-bucket.status-green .dashboard-status-count {
  color: #86efac;
  background: rgba(22, 101, 52, 0.2);
}

:root[data-theme="dark"] .dashboard-status-bucket.status-orange .dashboard-status-count {
  color: #fbbf24;
  background: rgba(146, 64, 14, 0.2);
}

:root[data-theme="dark"] .dashboard-status-bucket.status-red .dashboard-status-count {
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.22);
}

:root[data-theme="dark"] .dashboard-status-bucket.status-unknown .dashboard-status-count {
  color: #d1d5db;
  background: #111c26;
}

:root[data-theme="dark"] .password-rule-list li {
  background: #111827;
}

:root[data-theme="dark"] .password-rule-list li.passed {
  border-color: rgba(74, 222, 128, 0.42);
  color: #bbf7d0;
  background: rgba(22, 101, 52, 0.24);
}

:root[data-theme="dark"] .password-match-message.passed {
  color: #86efac;
}

:root[data-theme="dark"] .topbar {
  background: rgba(22, 33, 44, 0.9);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .ghost-button,
:root[data-theme="dark"] .secondary,
:root[data-theme="dark"] .sidebar-toggle {
  background: #111c26;
  color: var(--ink);
}

:root[data-theme="dark"] button:disabled,
:root[data-theme="dark"] .secondary:disabled,
:root[data-theme="dark"] .ghost-button:disabled {
  background: #203142;
  border-color: #3b5266;
  color: #b7c6d4;
  opacity: 1;
}

:root[data-theme="dark"] label,
:root[data-theme="dark"] .nav-button,
:root[data-theme="dark"] .nav-group-toggle,
:root[data-theme="dark"] .nav-subitems a {
  color: #c7d4df;
}

:root[data-theme="dark"] .nav-ico {
  color: #91a6b8;
}

:root[data-theme="dark"] .discussion-room-card {
  border-color: #3b5966;
  border-left-color: var(--accent);
  background: linear-gradient(90deg, rgba(45, 199, 184, 0.12), rgba(17, 28, 38, 0.7));
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .discussion-room-card:hover {
  border-color: #537284;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.36);
}

:root[data-theme="dark"] .project-workload-chip {
  border-color: #3b5966;
  background: linear-gradient(135deg, rgba(45, 199, 184, 0.12), rgba(20, 34, 47, 0.96));
  color: #edf7ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

:root[data-theme="dark"] .project-workload-chip strong {
  color: #f6fbff;
}

:root[data-theme="dark"] .project-workload-chip em {
  background: rgba(45, 199, 184, 0.18);
  color: #8df3e8;
}

:root[data-theme="dark"] .project-workload-chip small {
  color: #a9bfd1;
}

:root[data-theme="dark"] .discussion-unread {
  border-color: #344b5c;
  background: #203142;
  color: #c7d4df;
}

:root[data-theme="dark"] .discussion-unread.active {
  background: rgba(255, 184, 77, 0.18);
  color: #ffd18b;
}

:root[data-theme="dark"] .nav-button:hover,
:root[data-theme="dark"] .nav-group-toggle:hover,
:root[data-theme="dark"] .nav-subitems a:hover {
  background: #1d2c39;
  color: var(--accent-strong);
}

:root[data-theme="dark"] .nav-subitems a {
  border-left-color: #405568;
}

:root[data-theme="dark"] .nav-subitems a.active {
  background: rgba(45, 199, 184, 0.16);
  color: var(--accent-strong);
  border-left-color: var(--accent);
}

:root[data-theme="dark"] th,
:root[data-theme="dark"] tr:hover td,
:root[data-theme="dark"] .manual-mini-screen,
:root[data-theme="dark"] .manual-mini-screen span,
:root[data-theme="dark"] .record-card,
:root[data-theme="dark"] .measurement-editor,
:root[data-theme="dark"] .inline-attachment-upload,
:root[data-theme="dark"] .project-image-empty,
:root[data-theme="dark"] .research-project-preview-image.is-empty,
:root[data-theme="dark"] .attachment-empty-square {
  background: var(--panel-soft);
}

:root[data-theme="dark"] .research-project-preview-image,
:root[data-theme="dark"] .previous-log-loader-panel {
  border-color: #344b5c;
  background: #111c26;
}

:root[data-theme="dark"] .user-table-scroll,
:root[data-theme="dark"] .notification-table-scroll,
:root[data-theme="dark"] .audit-table-scroll {
  border-color: var(--line);
  background: var(--panel);
}

:root[data-theme="dark"] .user-table th,
:root[data-theme="dark"] .user-table td:nth-child(1),
:root[data-theme="dark"] .user-table td:nth-child(2),
:root[data-theme="dark"] .notification-table th,
:root[data-theme="dark"] .notification-table td:nth-child(1),
:root[data-theme="dark"] .notification-select-all input {
  background: var(--panel);
  color: var(--ink);
}

:root[data-theme="dark"] .user-table th:nth-child(1),
:root[data-theme="dark"] .user-table th:nth-child(2),
:root[data-theme="dark"] .notification-table th:nth-child(1) {
  background: var(--panel-soft);
}

:root[data-theme="dark"] .notification-row[data-notification-href]:hover td {
  background: #16283a;
}

:root[data-theme="dark"] .highlight-row {
  background: rgba(45, 199, 184, 0.16);
  outline-color: rgba(45, 199, 184, 0.38);
}

:root[data-theme="dark"] .ops-check-row.ops-check-warn {
  background: rgba(245, 158, 11, 0.12);
}

:root[data-theme="dark"] .ops-check-row.ops-check-error {
  background: rgba(220, 38, 38, 0.14);
}

:root[data-theme="dark"] .ops-action-link {
  border-color: rgba(45, 199, 184, 0.34);
  background: rgba(45, 199, 184, 0.1);
  color: var(--accent-strong);
}

:root[data-theme="dark"] .manual-mini-screen span {
  color: var(--ink);
  border: 1px solid var(--line-soft);
}

:root[data-theme="dark"] .nav-button.active,
:root[data-theme="dark"] .project-member-summary span {
  background: var(--accent-soft);
}

:root[data-theme="dark"] .nav-button.active {
  border-color: rgba(120, 224, 212, 0.45);
  color: #d8fffb;
}

:root[data-theme="dark"] .nav-button.has-badge .nav-label,
:root[data-theme="dark"] .user-chip strong,
:root[data-theme="dark"] .metric strong,
:root[data-theme="dark"] .metric-card-link {
  color: var(--ink);
}

:root[data-theme="dark"] .user-chip span,
:root[data-theme="dark"] .muted,
:root[data-theme="dark"] .trend-card small,
:root[data-theme="dark"] .project-progress-card header span {
  color: var(--muted);
}

:root[data-theme="dark"] .stats-mini-bar {
  background: #203142;
}

:root[data-theme="dark"] .stats-collapsible-toggle {
  border-color: var(--line);
  color: #8df3e8;
}

:root[data-theme="dark"] .pill {
  background: #233241;
  color: #d8e6f0;
}

:root[data-theme="dark"] .pill.ok {
  background: #12382a;
  color: #86efb8;
}

:root[data-theme="dark"] .pill.wait {
  background: #3a2f16;
  color: #ffd88a;
}

:root[data-theme="dark"] .pill.danger {
  background: #3b2024;
  color: #ff9f9f;
}

:root[data-theme="dark"] .record-feedback.ok {
  background: rgba(45, 199, 184, 0.13);
  border-color: rgba(120, 224, 212, 0.42);
  color: #d8fffb;
}

:root[data-theme="dark"] .record-feedback.danger {
  background: rgba(117, 37, 44, 0.34);
  border-color: rgba(255, 133, 133, 0.5);
  color: #ffd0d0;
}

:root[data-theme="dark"] .record-feedback.status {
  background: rgba(45, 199, 184, 0.12);
  border-color: rgba(120, 224, 212, 0.34);
  color: #eafffd;
}

:root[data-theme="dark"] .status-memo-popover {
  background: #132331;
  border-color: rgba(120, 224, 212, 0.35);
  color: var(--ink);
}

:root[data-theme="dark"] .status-memo-button {
  border-color: #365168;
  background: #0f1b27;
  color: #f1f7fb;
}

:root[data-theme="dark"] .status-memo-current,
:root[data-theme="dark"] .entry-view-memo-card,
:root[data-theme="dark"] .approval-comment-popover {
  background: #0f1b27;
  border-color: rgba(120, 224, 212, 0.28);
  color: #f1f7fb;
}

:root[data-theme="dark"] .measurement-tags span,
:root[data-theme="dark"] .measurement-chip-row span {
  background: rgba(45, 199, 184, 0.13);
  border-color: rgba(120, 224, 212, 0.34);
  color: #ccfbf1;
}

:root[data-theme="dark"] .measurement-tags span strong,
:root[data-theme="dark"] .measurement-chip-row span strong {
  color: #8df1df;
}

:root[data-theme="dark"] .desktop-notification-box {
  border-color: rgba(120, 224, 212, 0.28);
}

:root[data-theme="dark"] .desktop-notification-actions .secondary,
:root[data-theme="dark"] .desktop-notification-actions .ghost-button {
  border-color: #4d6578;
  background: #10202d;
  color: #f1f7fb;
}

:root[data-theme="dark"] .desktop-notification-box strong {
  color: var(--ink);
}

:root[data-theme="dark"] .desktop-notification-box span {
  color: #c7d4df;
}

:root[data-theme="dark"] .ghost-button.is-active {
  border-color: rgba(120, 224, 212, 0.52);
  background: rgba(45, 199, 184, 0.16);
  color: #bff8ef;
}

:root[data-theme="dark"] .calendar-day-log-link.ghost-button.status-green {
  border-color: rgba(45, 212, 191, 0.48);
  background: rgba(16, 185, 129, 0.18);
  color: #a7f3d0;
}

:root[data-theme="dark"] .calendar-day-log-link.ghost-button.status-orange {
  border-color: rgba(251, 191, 36, 0.52);
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
}

:root[data-theme="dark"] .calendar-day-log-link.ghost-button.status-red {
  border-color: rgba(248, 113, 113, 0.52);
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

:root[data-theme="dark"] .calendar-day-log-link.ghost-button.status-unknown {
  border-color: #39556a;
  background: #162636;
  color: #c7d4df;
}

:root[data-theme="dark"] .daily-status-project-pill.status-green {
  border-color: rgba(45, 212, 191, 0.48);
  background: rgba(16, 185, 129, 0.18);
  color: #a7f3d0;
}

:root[data-theme="dark"] .daily-status-project-pill.status-orange {
  border-color: rgba(251, 191, 36, 0.52);
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
}

:root[data-theme="dark"] .daily-status-project-pill.status-red {
  border-color: rgba(248, 113, 113, 0.52);
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

:root[data-theme="dark"] .daily-attachment-preview-card img {
  background: #0e1a24;
}

:root[data-theme="dark"] .daily-attachment-preview-empty {
  background: #0e1a24;
}

:root[data-theme="dark"] .daily-attachment-preview-remove {
  border-color: #40576b;
  background: rgba(16, 31, 43, 0.94);
  color: #fecaca;
}

:root[data-theme="dark"] .daily-attachment-preview-pdf strong {
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
}

:root[data-theme="dark"] .research-day-summary-image {
  background: #0e1a24;
}

:root[data-theme="dark"] .calendar-project-chip {
  border-color: #3b5966;
  background: rgba(45, 199, 184, 0.12);
  color: #bff8ef;
}

:root[data-theme="dark"] .calendar-week-grid,
:root[data-theme="dark"] .calendar-day-card,
:root[data-theme="dark"] .calendar-month-group,
:root[data-theme="dark"] .calendar-person-scroll {
  border-color: var(--line);
  background: var(--panel);
}

:root[data-theme="dark"] .calendar-day-head,
:root[data-theme="dark"] .calendar-month-group-head {
  border-color: var(--line);
  background: #182838;
  color: var(--ink);
}

:root[data-theme="dark"] .calendar-day-card.is-sunday .calendar-day-head {
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
}

:root[data-theme="dark"] .calendar-day-card.is-saturday .calendar-day-head {
  background: rgba(96, 165, 250, 0.14);
  color: #bfdbfe;
}

:root[data-theme="dark"] .calendar-event-card {
  border-left-color: #39d7c8;
  background: #10202d;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

:root[data-theme="dark"] .project-progress-card,
:root[data-theme="dark"] .daily-status-summary-card,
:root[data-theme="dark"] .taxonomy-project-list {
  background: #10202d;
  color: var(--ink);
  border-color: var(--line);
}

:root[data-theme="dark"] .daily-status-summary-card span:last-child,
:root[data-theme="dark"] .project-progress-card header span,
:root[data-theme="dark"] .taxonomy-project-list li span {
  color: #b9c8d5;
}

:root[data-theme="dark"] .calendar-event-card small,
:root[data-theme="dark"] .calendar-month-card small {
  color: #b9c8d5;
}

:root[data-theme="dark"] .calendar-event-badge {
  background: rgba(45, 199, 184, 0.17);
  color: #bff8ef;
}

:root[data-theme="dark"] .calendar-month-card {
  border-color: var(--line);
  color: var(--ink);
}

:root[data-theme="dark"] .calendar-month-card:hover {
  background: #10202d;
}

:root[data-theme="dark"] .money-input-row span {
  color: #edf4f8;
}

:root[data-theme="dark"] .watermark {
  background: rgba(22, 33, 44, 0.92);
  color: rgba(237, 244, 248, 0.88);
  border: 1px solid rgba(237, 244, 248, 0.22);
  opacity: 1;
}

:root[data-theme="dark"] code {
  background: #203142;
  color: #edf4f8;
}

:root[data-theme="dark"] .activity-history-dialog,
:root[data-theme="dark"] .role-permission-dialog {
  color: var(--ink);
  border-color: var(--line);
}

:root[data-theme="dark"] .activity-history-dialog::backdrop,
:root[data-theme="dark"] .role-permission-dialog::backdrop {
  background: rgba(0, 0, 0, 0.64);
}

:root[data-theme="dark"] .activity-history-scroll {
  border-color: var(--line);
}

:root[data-theme="dark"] .activity-history-scroll td,
:root[data-theme="dark"] .activity-history-scroll th {
  background: transparent;
  color: var(--ink);
}

:root[data-theme="dark"] .msg {
  color: #d8e9f8;
  border: 1px solid var(--line);
}

:root[data-theme="dark"] .password-reset-result {
  background: rgba(20, 184, 166, 0.12);
  border-color: rgba(94, 234, 212, 0.42);
  color: #dffcf8;
}

:root[data-theme="dark"] .password-reset-result code {
  background: #0b1724;
  border-color: rgba(148, 163, 184, 0.42);
  color: #f8fbff;
}

:root[data-theme="dark"] .error {
  color: #ffb1b1;
}

.time-cell {
  min-width: 176px;
  white-space: nowrap;
}

:root[data-theme="dark"] .danger-button,
:root[data-theme="dark"] .error {
  background: #351b1f;
}

body.mobile-view {
  background: #f4f7f8;
}

body.mobile-view .app-shell {
  display: block;
  min-height: 100vh;
}

body.mobile-view .sidebar,
body.mobile-view .topbar {
  display: none;
}

body.mobile-view .workspace {
  min-height: 100vh;
  padding: 0;
  margin: 0;
  background: #f4f7f8;
}

.mobile-app-shell {
  max-width: 760px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 14px 28px;
}

.mobile-app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 10px;
}

.mobile-app-header p {
  margin: 0 0 2px;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
}

.mobile-app-header h1 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  letter-spacing: 0;
}

.mobile-header-actions {
  display: inline-flex;
  gap: 6px;
  flex: 0 0 auto;
}

.mobile-header-actions a,
.mobile-tabs a,
.mobile-filter-actions a,
.mobile-filter-actions button,
.mobile-memo-form button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.mobile-header-actions a {
  padding: 8px 9px;
}

.mobile-notification-link {
  position: relative;
}

.mobile-notification-link span {
  display: inline-flex;
  min-width: 18px;
  min-height: 18px;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.mobile-notification-link.active {
  border-color: rgba(0, 124, 120, 0.34);
  background: var(--accent);
  color: #fff;
}

.mobile-user-line {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mobile-tabs {
  position: sticky;
  top: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
  gap: 6px;
  padding: 8px 0;
  background: rgba(244, 247, 248, 0.96);
  backdrop-filter: blur(10px);
}

.mobile-tabs a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 9px 8px;
}

.mobile-tabs a.active {
  border-color: rgba(0, 124, 120, 0.34);
  background: var(--accent);
  color: #fff;
}

.mobile-filter {
  display: grid;
  gap: 9px;
  margin: 8px 0 12px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.mobile-filter label {
  display: grid;
  gap: 5px;
}

.mobile-filter label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.mobile-filter select,
.mobile-filter input,
.mobile-memo-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.mobile-filter select,
.mobile-filter input {
  min-height: 38px;
  padding: 7px 9px;
}

.mobile-filter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-filter-actions button,
.mobile-filter-actions a,
.mobile-memo-form button {
  min-height: 38px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: center;
}

.mobile-filter-actions button,
.mobile-memo-form button {
  border-color: rgba(0, 124, 120, 0.34);
  background: var(--accent);
  color: #fff;
}

.mobile-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 8px;
  color: var(--ink);
}

.mobile-list-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.mobile-record-list {
  display: grid;
  gap: 10px;
}

.mobile-notification-list {
  display: grid;
  gap: 10px;
}

.mobile-notification-filter {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 7px;
  margin: 8px 0 12px;
}

.mobile-notification-filter a,
.mobile-notification-filter button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.mobile-notification-filter a.active,
.mobile-notification-filter button {
  border-color: rgba(0, 124, 120, 0.34);
  background: var(--accent);
  color: #fff;
}

.mobile-notification-filter button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.mobile-notification-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.mobile-notification-card.unread {
  border-color: rgba(0, 124, 120, 0.34);
  box-shadow: 0 0 0 1px rgba(0, 124, 120, 0.1), var(--shadow-soft);
}

.mobile-notification-card-head,
.mobile-notification-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.mobile-notification-card-head > span:last-child,
.mobile-notification-meta span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.mobile-notification-card strong,
.mobile-notification-target b {
  color: var(--ink);
  line-height: 1.35;
}

.mobile-notification-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.mobile-notification-target {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-soft);
}

.mobile-notification-target span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.mobile-notification-meta a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid rgba(0, 124, 120, 0.34);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.mobile-project-list {
  display: grid;
  gap: 10px;
}

.mobile-project-card {
  display: grid;
  gap: 7px;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.mobile-project-code {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.mobile-project-card strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.mobile-project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.mobile-project-status-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.mobile-project-chips,
.mobile-project-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mobile-project-chips span,
.mobile-project-detail-actions a,
.mobile-project-detail-head > a,
.mobile-project-section-head a,
.mobile-project-bottom-link a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.mobile-project-chips span {
  padding: 5px 8px;
}

.mobile-project-detail-head {
  display: grid;
  gap: 8px;
  margin: 8px 0 12px;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.mobile-project-detail-head > a,
.mobile-project-section-head a,
.mobile-project-bottom-link a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 7px 9px;
}

.mobile-project-detail-head > a {
  justify-self: start;
}

.mobile-project-detail-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.mobile-project-detail-actions a {
  min-height: 34px;
  padding: 8px 10px;
}

.mobile-project-record-section {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-project-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-project-section-head div {
  display: grid;
  gap: 2px;
}

.mobile-project-section-head strong {
  color: var(--ink);
  font-size: 14px;
}

.mobile-project-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.mobile-record-list.compact {
  gap: 8px;
}

.mobile-project-bottom-link {
  display: flex;
  justify-content: center;
  padding: 14px 0 0;
}

.mobile-record-card {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.mobile-record-card summary {
  display: grid;
  gap: 5px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.mobile-record-card summary::-webkit-details-marker {
  display: none;
}

.mobile-record-card[open] summary {
  border-bottom: 1px solid var(--line-soft);
}

.mobile-record-date {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.mobile-record-card summary strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.mobile-record-sub {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mobile-record-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.mobile-record-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.mobile-detail-section {
  display: grid;
  gap: 7px;
}

.mobile-detail-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.mobile-detail-section p {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mobile-record-body .research-day-summary-media {
  padding: 0 0 4px;
}

.mobile-record-body .research-day-summary-image img {
  max-height: 240px;
}

.mobile-attachment-strip,
.mobile-linked-days {
  display: flex;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}

.mobile-attachment-thumb,
.mobile-attachment-file,
.mobile-linked-day {
  flex: 0 0 168px;
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 96px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.mobile-attachment-thumb img {
  display: block;
  width: 100%;
  height: 92px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

.mobile-device-attachment-list {
  display: grid;
  gap: 10px;
}

.mobile-device-attachment-image,
.mobile-device-attachment-file {
  width: 100%;
  display: grid;
  gap: 7px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.mobile-device-attachment-image {
  grid-template-columns: 108px minmax(0, 1fr);
  min-height: 98px;
}

.mobile-device-attachment-image img {
  display: block;
  width: 108px;
  height: 78px;
  max-height: 78px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

.mobile-device-attachment-image span {
  display: grid;
  gap: 4px;
}

.mobile-device-attachment-image strong,
.mobile-device-attachment-file strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.mobile-device-attachment-image small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.mobile-device-attachment-file small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.mobile-attachment-thumb span,
.mobile-attachment-file strong,
.mobile-linked-day strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.mobile-attachment-file small,
.mobile-linked-day span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.mobile-memo-current {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fbfb;
}

.mobile-memo-current span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.mobile-memo-form {
  display: grid;
  gap: 8px;
}

.mobile-memo-form textarea {
  min-height: 96px;
  padding: 9px;
  resize: vertical;
}

.mobile-empty-line,
.mobile-empty-state {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mobile-empty-state {
  padding: 18px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

:root[data-theme="dark"] body.mobile-view,
:root[data-theme="dark"] body.mobile-view .workspace,
:root[data-theme="dark"] .mobile-tabs {
  background: #0b1724;
}

:root[data-theme="dark"] .mobile-filter,
:root[data-theme="dark"] .mobile-notification-card,
:root[data-theme="dark"] .mobile-notification-filter a,
:root[data-theme="dark"] .mobile-notification-filter button,
:root[data-theme="dark"] .mobile-project-card,
:root[data-theme="dark"] .mobile-project-detail-head,
:root[data-theme="dark"] .mobile-record-card,
:root[data-theme="dark"] .mobile-header-actions a,
:root[data-theme="dark"] .mobile-tabs a,
:root[data-theme="dark"] .mobile-filter-actions a,
:root[data-theme="dark"] .mobile-empty-state {
  background: #102033;
  border-color: var(--line);
  color: var(--ink);
}

:root[data-theme="dark"] .mobile-filter select,
:root[data-theme="dark"] .mobile-filter input,
:root[data-theme="dark"] .mobile-memo-form textarea {
  background: #0b1724;
  border-color: var(--line);
  color: var(--ink);
}

:root[data-theme="dark"] .mobile-memo-current,
:root[data-theme="dark"] .mobile-notification-target,
:root[data-theme="dark"] .mobile-project-chips span,
:root[data-theme="dark"] .mobile-project-detail-actions a,
:root[data-theme="dark"] .mobile-project-detail-head > a,
:root[data-theme="dark"] .mobile-project-section-head a,
:root[data-theme="dark"] .mobile-project-bottom-link a,
:root[data-theme="dark"] .mobile-attachment-thumb,
:root[data-theme="dark"] .mobile-attachment-file,
:root[data-theme="dark"] .mobile-device-attachment-image,
:root[data-theme="dark"] .mobile-device-attachment-file,
:root[data-theme="dark"] .mobile-linked-day {
  background: #0e1a24;
  border-color: var(--line);
}

:root[data-theme="dark"] .mobile-tabs a.active,
:root[data-theme="dark"] .mobile-notification-link.active,
:root[data-theme="dark"] .mobile-notification-filter a.active,
:root[data-theme="dark"] .mobile-notification-filter button {
  border-color: rgba(0, 124, 120, 0.5);
  background: var(--accent);
  color: #fff;
}

@media (max-width: 520px) {
  .mobile-app-shell {
    padding: 12px 10px 24px;
  }

  .mobile-app-header h1 {
    font-size: 20px;
  }

  .mobile-attachment-thumb,
  .mobile-attachment-file,
  .mobile-linked-day {
    flex-basis: 146px;
  }
}

@media print {
  @page {
    margin: 12mm;
  }

  html,
  body {
    background: #fff !important;
    color: #111827 !important;
  }

  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a {
    color: #111827 !important;
    text-decoration: none !important;
  }

  .app-shell,
  :root[data-sidebar="collapsed"] .app-shell {
    display: block !important;
    min-height: auto !important;
  }

  .sidebar,
  .sidebar-note,
  .sidebar-toggle,
  .topbar-actions,
  .theme-toggle,
  .watermark,
  .print-actions,
  .action-strip,
  .export-actions,
  .pagination-row,
  .desktop-notification-box,
  .notification-bulk-actions,
  .notification-page-size,
  .project-list-filter,
  .backup-action-strip,
  dialog,
  button,
  input[type="button"],
  input[type="submit"],
  .ghost-button,
  .secondary,
  .danger-button {
    display: none !important;
  }

  .topbar,
  :root[data-sidebar="collapsed"] .topbar {
    position: static !important;
    inset: auto !important;
    min-height: auto !important;
    margin: 0 0 8mm !important;
    padding: 0 0 5mm !important;
    background: transparent !important;
    border-bottom: 1px solid #d0d7de !important;
    backdrop-filter: none !important;
  }

  .topbar h1 {
    font-size: 20pt;
    margin: 0;
  }

  .eyebrow {
    color: #0f766e !important;
  }

  .workspace {
    padding: 0 !important;
  }

  .panel {
    background: #fff !important;
    border: 1px solid #d7dee8 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .grid,
  .grid-2,
  .dashboard-layout,
  .research-days-workspace,
  .daily-entry-layout {
    display: block !important;
  }

  .metric-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .stats-period-panel,
  .stats-collapsible-toggle,
  .stats-collapsible-panel:not([open]) {
    display: none !important;
  }

  .stats-summary-panel {
    margin-bottom: 8px !important;
  }

  .stats-visual-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .stats-visual-panel {
    min-height: auto !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .portfolio-plot {
    height: 190px !important;
  }

  .budget-gauge-grid,
  .radar-card-grid,
  .risk-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .research-list-scroll,
  .project-table-scroll,
  .user-table-scroll,
  .notification-table-scroll,
  .audit-table-scroll,
  .activity-history-scroll,
  .calendar-month-groups,
  .calendar-person-scroll {
    max-height: none !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    border: 0 !important;
  }

  #project-list {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
    border-collapse: collapse !important;
    font-size: 9.5pt !important;
  }

  tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  th,
  td {
    background: #fff !important;
    color: #111827 !important;
    border-color: #d7dee8 !important;
  }

  th {
    position: static !important;
  }

  .pill,
  .status-pill {
    border: 1px solid #cbd5e1 !important;
    background: #fff !important;
    color: #111827 !important;
  }

  .report-page {
    margin: 0;
    padding: 18mm 14mm;
    border: 0;
    box-shadow: none;
    max-width: none;
  }
}

@media (max-width: 880px) {
  .device-evaluation-runner {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
    max-height: none;
  }

  .brand {
    min-height: 64px;
  }

  .nav {
    grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
    padding: 10px 12px 14px;
  }

  .workspace {
    padding: 16px 16px 88px;
  }

  .topbar {
    position: sticky;
    left: auto;
    right: auto;
    margin: -16px -16px 16px;
    padding: 14px 16px;
    align-items: flex-start;
    min-height: auto;
    flex-direction: column;
  }

  .grid-2,
  .dashboard-layout,
  .dashboard-executive-layout,
  .research-days-workspace,
  .daily-entry-layout,
  .project-period-row,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-status-grid {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }

  .dashboard-status-bucket:nth-child(n) .dashboard-status-popover {
    left: 0;
    right: auto;
  }

  .attachment-upload {
    grid-template-columns: 1fr;
  }

  .desktop-notification-box,
  .notification-list-header,
  .discussion-head,
  .discussion-title-row,
  .discussion-link-box,
  .discussion-link-box.compact {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .discussion-room-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .discussion-room-side {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .discussion-room-main {
    flex-wrap: wrap;
    gap: 3px 8px;
    white-space: normal;
  }

  .discussion-room-main strong,
  .discussion-room-main span {
    flex: 1 1 100%;
    min-width: 0;
  }

  .desktop-notification-box,
  .discussion-head {
    flex-wrap: wrap;
  }

  :root[data-sidebar="collapsed"] .app-shell {
    grid-template-columns: 1fr;
  }

  :root[data-sidebar="collapsed"] .topbar {
    left: auto;
  }

  .desktop-notification-actions,
  .notification-page-size {
    margin-left: 0;
    justify-content: flex-start;
  }

  .project-create-taxonomy-row,
  .project-create-code-row {
    grid-template-columns: 1fr;
  }

  .project-icon-upload-line,
  .member-search-row,
  .user-create-summary {
    grid-template-columns: 1fr;
  }

  .project-member-picker,
  .project-member-picker-grid,
  .project-member-search-group {
    grid-template-columns: 1fr;
  }

  .project-member-picker h3,
  .project-member-search-group > label,
  .selected-member-chips,
  .member-picker-list {
    grid-column: auto;
  }

  .project-plan-text-grid {
    grid-template-columns: 1fr;
  }

  .user-create-actions {
    justify-content: flex-start;
  }

  .project-attachment-upload {
    grid-template-columns: max-content minmax(130px, 1fr);
  }

  .project-attachment-upload input[name="projectAttachmentNote"] {
    grid-column: 1 / -1;
  }

  .calendar-month-groups,
  .calendar-person-scroll {
    max-height: min(640px, calc(100dvh - 260px));
  }

  .calendar-month-title-line,
  .calendar-month-card,
  .calendar-month-meta {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    white-space: normal;
  }

  .deleted-records-menu {
    position: fixed;
    inset: 12px;
    width: auto;
    max-height: calc(100vh - 24px);
  }

  .measurement-row {
    grid-template-columns: 1fr 1fr;
  }
}
