@font-face {
  font-family: "Giants Inline";
  src: url("/fonts/Giants-Inline.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #161b22;
  --bg-alt: #11161d;
  --panel: rgba(30, 38, 47, 0.9);
  --panel-strong: #202a35;
  --line: rgba(179, 196, 214, 0.16);
  --text: #edf3fb;
  --muted: #aab8c8;
  --accent: #d87a40;
  --accent-deep: #a35222;
  --teal: #56b8af;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --table-head: #25303c;
  --table-bg: rgba(17, 22, 29, 0.62);
  --input-bg: #17202a;
  --gantt-vendor-col: 28px;
  --gantt-site-col: 300px;
  --gantt-job-col: 120px;
  --gantt-sv-col: 54px;
  --gantt-date-col: 78px;
  --gantt-lt-col: 48px;
  --gantt-head-row-1: 30px;
  --gantt-head-row-2: 24px;
  --sticky-hero-top: 6px;
  --sticky-tab-top: 92px;
  --sticky-panel-top: 134px;
  --footer-offset: 82px;
  --bottom-safe-cover: 132px;
  --page-bottom-padding: 118px;
  --bottom-cover-bg: #11161d;
}

body[data-theme="light"] {
  --bg: #f5f8ff;
  --bg-alt: #eef4ff;
  --panel: rgba(255, 255, 255, 0.98);
  --panel-strong: #ffffff;
  --line: rgba(110, 140, 190, 0.16);
  --text: #1e2a3a;
  --muted: #6f8099;
  --accent: #2f6df6;
  --accent-deep: #2455df;
  --teal: #2f6df6;
  --shadow: 0 16px 38px rgba(73, 106, 167, 0.1);
  --table-head: #f7faff;
  --table-bg: rgba(255, 255, 255, 0.98);
  --input-bg: #ffffff;
  --bottom-cover-bg: #f5f8ff;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 12px;
  background:
    radial-gradient(circle at top left, rgba(182, 94, 39, 0.18), transparent 26%),
    linear-gradient(180deg, var(--bg-alt), var(--bg));
  color: var(--text);
}

body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--bottom-safe-cover);
  z-index: 38;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(245, 248, 255, 0), var(--bottom-cover-bg) 18px);
}

body[data-theme="light"] {
  background:
    radial-gradient(circle at top left, rgba(47, 109, 246, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(111, 162, 255, 0.08), transparent 24%),
    linear-gradient(180deg, var(--bg-alt), var(--bg));
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: calc(100% - 6px);
  margin: 0 auto;
  padding: 6px 0 var(--page-bottom-padding);
}

.hero,
.panel,
.stat-card {
  backdrop-filter: none;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-radius: 24px;
  padding: 15px 20px;
  margin-bottom: 6px;
  align-items: center;
  position: sticky;
  top: var(--sticky-hero-top);
  z-index: 48;
  background: var(--panel-strong);
}

.site-brand {
  flex: 0 1 auto;
  min-width: 240px;
}

.hero h1,
.panel h2 {
  margin: 0;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  letter-spacing: 0;
  font-weight: 700;
}

.hero h1 {
  display: inline-block;
  font-family: "Giants Inline", "Segoe UI", "Aptos", "Helvetica Neue", "Malgun Gothic", sans-serif;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  letter-spacing: 0;
  font-weight: 800;
  padding-bottom: 3px;
  border-bottom: 2px solid currentColor;
  text-transform: none;
}

#siteTitle {
  line-height: 0.92;
}

.site-subtitle {
  margin-top: 2px;
  font-family: "Giants Inline", "Segoe UI", "Aptos", "Helvetica Neue", "Malgun Gothic", sans-serif;
  font-size: clamp(0.68rem, 1vw, 0.92rem);
  line-height: 1;
  letter-spacing: 0;
  color: var(--muted);
  white-space: nowrap;
}

.hero-welcome {
  flex: 1 1 auto;
  min-width: 220px;
  text-align: right;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

.hero-copy {
  max-width: 900px;
  color: var(--muted);
  line-height: 1.55;
  margin: 10px 0 0;
}

.hero-actions {
  min-width: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  font-weight: 700;
}

.meta-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.primary-button,
.secondary-button,
.tab-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: white;
  padding: 8px 13px;
  font-weight: 700;
}

.secondary-button {
  background: rgba(31, 107, 103, 0.12);
  color: var(--teal);
  padding: 7px 11px;
  font-weight: 700;
  border: 1px solid var(--line);
}

body[data-theme="light"] .primary-button {
  background: linear-gradient(135deg, #3c7bff, #2f6df6);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(47, 109, 246, 0.22);
}

body[data-theme="light"] .secondary-button {
  background: #ffffff;
  color: #2b5ed9;
  border: 1px solid rgba(47, 109, 246, 0.12);
  box-shadow: 0 6px 18px rgba(73, 106, 167, 0.08);
}

.danger-button {
  color: #cf2f2f;
  border-color: rgba(207, 47, 47, 0.22);
  background: rgba(207, 47, 47, 0.08);
}

body[data-theme="light"] .danger-button {
  color: #d92b2b;
  border-color: rgba(217, 43, 43, 0.18);
  background: #fff7f5;
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
}

.record-generate-button {
  min-width: 74px;
}

.record-generate-button.is-loading {
  background: rgba(204, 107, 47, 0.14);
  color: var(--accent-deep);
}

.primary-button:hover,
.secondary-button:hover,
.tab-button:hover,
.sub-tab-button:hover {
  transform: translateY(-1px);
}

.nav-shell {
  position: sticky;
  top: var(--sticky-tab-top);
  z-index: 46;
  margin-bottom: 6px;
  padding: 3px 0 4px;
  background: var(--bg-alt);
  box-shadow: 0 10px 20px rgba(73, 106, 167, 0.08);
}

.tab-bar,
.sub-tab-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sub-tab-bar {
  margin-top: 6px;
}

.tab-button,
.sub-tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 250, 243, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #181818;
  padding: 0;
  font-weight: 700;
  font-family: "Segoe UI", "Aptos", "Helvetica Neue", "Malgun Gothic", sans-serif;
  letter-spacing: 0;
  white-space: nowrap;
}

.tab-button {
  width: 86px;
  height: 34px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.sub-tab-button {
  width: 88px;
  height: 24px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.66rem;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}

.tab-button.active,
.sub-tab-button.active {
  background: linear-gradient(135deg, rgba(182, 94, 39, 0.12), rgba(31, 107, 103, 0.08));
  color: #181818;
  border-color: rgba(182, 94, 39, 0.22);
}

body[data-theme="light"] .tab-button,
body[data-theme="light"] .sub-tab-button {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(47, 109, 246, 0.1);
  color: #314257;
}

body[data-theme="light"] .tab-button.active,
body[data-theme="light"] .sub-tab-button.active {
  background: linear-gradient(135deg, rgba(47, 109, 246, 0.14), rgba(122, 170, 255, 0.12));
  color: #1d4fd7;
  border-color: rgba(47, 109, 246, 0.2);
}

body:not([data-theme="light"]) .tab-button.active,
body:not([data-theme="light"]) .sub-tab-button.active {
  background: linear-gradient(135deg, rgba(204, 107, 47, 0.32), rgba(31, 107, 103, 0.18));
  color: #ffffff;
  border-color: rgba(204, 107, 47, 0.32);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.panel {
  border-radius: 20px;
  padding: 9px;
  margin-bottom: 6px;
  min-width: 0;
}

.wide-panel {
  padding: 8px;
}

.subtle-panel {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 5px;
}

.schedule-panel {
  padding: 12px;
  max-width: 1540px;
  margin-left: auto;
  margin-right: auto;
}

.schedule-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.schedule-sidebar {
  display: grid;
  gap: 14px;
}

.schedule-side-card {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
  padding: 12px;
}

.schedule-side-card h3 {
  margin: 2px 0 10px;
  font-size: 0.98rem;
}

.schedule-main {
  min-width: 0;
}

.schedule-header {
  align-items: center;
  margin-bottom: 10px;
}

.schedule-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.schedule-icon-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.schedule-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
}

.schedule-weekday {
  background: var(--table-head);
  padding: 10px 12px;
  font-weight: 700;
  text-align: left;
  border-right: 1px solid var(--line);
}

.schedule-weekday:last-child {
  border-right: 0;
}

.schedule-weekday.sun {
  color: #c35d4f;
}

.schedule-weekday.sat {
  color: #5073b7;
}

.schedule-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 0 0 18px 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.48);
}

.schedule-day {
  min-height: 132px;
  padding: 10px 10px 12px;
  border-right: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  position: relative;
  display: flex;
  flex-direction: column;
}

.schedule-day:nth-child(-n + 7) {
  border-top: 0;
}

.schedule-day:nth-child(7n) {
  border-right: 0;
}

.schedule-day.muted {
  background: rgba(246, 242, 237, 0.62);
}

.schedule-day.holiday {
  background: rgba(255, 241, 177, 0.48);
}

.schedule-day.today {
  box-shadow: inset 0 0 0 2px rgba(27, 113, 105, 0.18);
}

.schedule-day.holiday .schedule-day-number {
  color: #c94f42;
}

.schedule-day.popover-open {
  z-index: 30;
}

.schedule-day-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.schedule-day-number {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
}

.schedule-holiday-label {
  max-width: 84px;
  color: #c94f42;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-day-items {
  position: relative;
  display: grid;
  grid-auto-rows: minmax(26px, auto);
  gap: 6px;
  align-content: start;
  overflow: visible;
}

.schedule-item {
  grid-row: var(--schedule-lane-row, auto);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 9px;
  background: rgba(176, 196, 235, 0.26);
  color: var(--text);
  line-height: 1.25;
  position: relative;
  z-index: 2;
  max-width: none;
}

.schedule-item-span {
  width: calc(var(--schedule-span-days, 1) * 100% + (var(--schedule-span-days, 1) - 1) * 22px);
}

.schedule-item-open {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  color: inherit;
  cursor: pointer;
  white-space: normal;
}

.schedule-item:nth-child(3n + 1) {
  background: rgba(204, 107, 47, 0.16);
}

.schedule-item:nth-child(3n + 2) {
  background: rgba(86, 184, 175, 0.14);
}

.schedule-item-checkbox {
  margin: 0;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.schedule-item-title {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.schedule-item-time {
  display: block;
  margin-top: 2px;
  color: var(--teal);
  font-size: 0.58rem;
  font-weight: 800;
}

.schedule-item.completed .schedule-item-title {
  text-decoration: line-through;
  opacity: 0.7;
}

.schedule-inspection {
  margin-top: auto;
  padding-top: 8px;
  position: relative;
  display: flex;
  justify-content: flex-end;
  z-index: 5;
}

.schedule-inspection-badge {
  min-width: 28px;
  height: 22px;
  border: 1px solid rgba(54, 110, 236, 0.72);
  border-radius: 6px;
  background: #3b70f2;
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(54, 110, 236, 0.18);
}

.schedule-inspection-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 120;
  width: min(260px, 68vw);
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(54, 110, 236, 0.24);
  border-radius: 10px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  text-align: left;
}

.schedule-inspection-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.schedule-inspection-list {
  display: grid;
  gap: 6px;
}

.schedule-inspection-row {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(54, 110, 236, 0.08);
  color: var(--text);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.schedule-mobile-summary {
  display: none;
}

.schedule-mobile-summary-badge {
  min-width: 28px;
  height: 22px;
  border: 1px solid rgba(216, 122, 64, 0.72);
  border-radius: 6px;
  background: #d87a40;
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(216, 122, 64, 0.16);
}

.schedule-mobile-summary-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 120;
  width: min(280px, 76vw);
  max-height: 240px;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(204, 107, 47, 0.24);
  border-radius: 10px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  text-align: left;
}

.schedule-mobile-summary-row {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(204, 107, 47, 0.1);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.schedule-mobile-summary-row strong,
.schedule-mobile-summary-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.schedule-mobile-summary-row strong {
  font-size: 0.72rem;
  line-height: 1.25;
}

.schedule-mobile-summary-row span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.schedule-mobile-summary-row.completed strong {
  text-decoration: line-through;
  opacity: 0.72;
}

.schedule-mini-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.schedule-mini-day {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
  border-radius: 10px;
  min-height: 34px;
  font-weight: 600;
}

.schedule-mini-day.has-items {
  font-weight: 800;
}

.schedule-mini-day.today {
  border-color: rgba(31, 107, 103, 0.45);
  color: var(--teal);
}

.schedule-mini-day.holiday {
  color: #c94f42;
  border-color: rgba(201, 79, 66, 0.32);
}

.schedule-mini-day.muted {
  opacity: 0.45;
}

.schedule-todo-list {
  display: grid;
  gap: 10px;
}

.schedule-todo-item {
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 243, 0.62);
}

.schedule-todo-item.done strong {
  text-decoration: line-through;
  opacity: 0.7;
}

.schedule-todo-item strong {
  display: block;
  margin-bottom: 4px;
}

.schedule-todo-item p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.schedule-todo-date {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--teal);
}

.schedule-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 120;
}

.schedule-modal.open {
  display: flex;
}

.schedule-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 24, 30, 0.32);
}

#authModal .schedule-modal-backdrop {
  background: rgba(247, 250, 255, 0.58);
  backdrop-filter: blur(7px);
}

body:not([data-theme="light"]) #authModal .schedule-modal-backdrop {
  background: rgba(12, 16, 22, 0.62);
}

.schedule-modal-dialog {
  position: relative;
  width: min(620px, calc(100vw - 24px));
  max-height: min(88vh, 980px);
  overflow: auto;
  border-radius: 22px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 16px;
  box-sizing: border-box;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

.notice-modal-dialog {
  width: min(1100px, calc(100vw - 24px));
  max-height: min(88vh, 980px);
}

.schedule-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.schedule-modal-header h3 {
  margin: 0;
  font-size: 1rem;
}

.schedule-form {
  display: grid;
  gap: 12px;
}

.schedule-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.schedule-all-day-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.schedule-form .schedule-all-day-label input {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  flex: 0 0 16px;
}

.schedule-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.schedule-form input,
.schedule-form textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--text);
  padding: 10px 12px;
  box-sizing: border-box;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 0.95rem;
  line-height: 1.45;
}

.schedule-form textarea {
  resize: vertical;
  min-height: 92px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: keep-all;
  white-space: pre-wrap;
}

#noticeDetailsInput {
  min-height: 180px;
}

.schedule-assignee-section {
  display: grid;
  gap: 8px;
}

.schedule-assignee-section > span {
  color: var(--muted);
  font-weight: 700;
}

.schedule-assignee-picker,
.schedule-assignee-status-list {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
  padding-right: 4px;
}

.schedule-assignee-picker,
.schedule-assignee-status-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.notice-target-picker,
.notice-read-status-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 300px;
  overflow: auto;
  padding-right: 4px;
}

.notice-target-picker {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.schedule-assignee-option,
.schedule-assignee-status {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  padding: 6px 8px;
}

.schedule-assignee-option,
.schedule-assignee-status {
  min-height: 36px;
}

.notice-target-option,
.notice-read-status {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  padding: 6px 8px;
  box-sizing: border-box;
}

.schedule-assignee-option span,
.schedule-assignee-status span {
  font-size: 0.82rem;
  line-height: 1.2;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

.notice-target-option span,
.notice-read-status span {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.2;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

.schedule-assignee-option input,
.schedule-assignee-status input,
.notice-target-option input,
.notice-read-status input,
.notice-pin-toggle input {
  width: 15px;
  height: 15px;
  margin: 0;
  flex: 0 0 15px;
}

.schedule-assignee-status.done span {
  color: #2f79d0;
  font-weight: 800;
}

.notice-read-status.done span {
  color: #2f79d0;
  font-weight: 800;
}

.notice-pin-toggle {
  grid-auto-flow: column;
  justify-content: start;
  align-items: center;
  gap: 10px;
}

.notice-pin-toggle input {
  width: 18px;
  height: 18px;
}

.notice-target-status {
  justify-content: space-between;
  gap: 12px;
}

.notice-target-status strong {
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--muted);
}

.notice-target-status.done strong {
  color: #2f79d0;
}

.schedule-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.schedule-delete-button {
  color: #b64d3a;
}

.auth-dialog {
  width: min(420px, calc(100vw - 24px));
}

.admin-users-dialog {
  width: min(820px, calc(100vw - 24px));
}

.admin-users-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
}

.admin-users-table-wrap {
  max-height: 360px;
}

.admin-users-table {
  min-width: 100%;
}

.admin-users-table tbody tr {
  cursor: pointer;
}

.admin-user-active-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.admin-user-active-label input {
  width: 16px;
  height: 16px;
}

.main-landing {
  display: grid;
  gap: 12px;
}

.main-hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(260px, 3fr) minmax(260px, 3fr);
  gap: 12px;
  align-items: stretch;
}

.main-lower-stack {
  display: grid;
  gap: 12px;
}

.main-hero-card,
.main-story-card,
.main-metric-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.main-hero-card {
  --main-depth-y: 0px;
  --main-orbit-y: 0px;
  --main-glow-shift: 0px;
  display: flex;
  align-items: center;
  padding: 26px 28px;
  background:
    radial-gradient(circle at top left, rgba(86, 184, 175, 0.24), transparent 30%),
    radial-gradient(circle at bottom right, rgba(216, 122, 64, 0.28), transparent 28%),
    linear-gradient(135deg, rgba(22, 27, 34, 0.96), rgba(34, 42, 54, 0.98));
  transform: translateY(calc(var(--main-depth-y) * 0.18)) perspective(1400px) rotateX(calc(var(--main-depth-y) * -0.02deg));
  transition: transform 180ms ease-out, box-shadow 180ms ease-out;
}

.main-kicker {
  margin: 0 0 8px;
  color: #8ae1d6;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.68rem;
  font-weight: 800;
}

.main-hero-card h2 {
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  line-height: 0.96;
  margin: 0 0 12px;
  color: #ffffff;
  letter-spacing: -0.04em;
}

.main-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.main-description {
  max-width: 720px;
  margin: 0;
  color: rgba(237, 243, 251, 0.82);
  line-height: 1.65;
  font-size: 0.95rem;
}

.main-parallax-copy {
  transform: translateY(var(--main-depth-y));
  transition: transform 180ms ease-out;
}

.main-hero-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.main-hero-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f6fd;
  font-weight: 700;
}

.main-hero-orbit {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(var(--main-orbit-y));
  transition: transform 180ms ease-out;
}

.main-orbit-ring,
.main-orbit-core,
.main-orbit-node {
  position: absolute;
}

.main-orbit-ring {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.main-orbit-ring.ring-a {
  width: 240px;
  height: 240px;
  animation: orbit-spin 18s linear infinite;
}

.main-orbit-ring.ring-b {
  width: 178px;
  height: 178px;
  animation: orbit-spin-reverse 13s linear infinite;
}

.main-orbit-core {
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: linear-gradient(135deg, #73d4cf, #d87a40);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #121820;
  font-size: 1.65rem;
  font-weight: 900;
  box-shadow: 0 0 calc(36px + var(--main-glow-shift)) rgba(115, 212, 207, 0.28);
  animation: orbit-pulse 3.8s ease-in-out infinite;
}

.main-orbit-node {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #eef4fb;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.node-a { top: 20px; right: 34px; }
.node-b { bottom: 28px; left: 18px; }
.node-c { top: 112px; left: -2px; }

.main-hero-board {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  min-height: 260px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(18, 24, 31, 0.38), rgba(29, 37, 48, 0.54));
  transform: translateY(var(--main-orbit-y));
  transition: transform 180ms ease-out, box-shadow 180ms ease-out;
}

.main-popular-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(138, 225, 214, 0.16);
  color: #8ae1d6;
  font-size: 0.72rem;
  font-weight: 900;
}

.main-hero-board-head h3 {
  margin: 2px 0 0;
  color: #ffffff;
  font-size: 1.05rem;
}

.main-hero-board-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.main-hero-notice {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.main-hero-notice:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(138, 225, 214, 0.24);
}

.main-hero-notice-pinned {
  border-color: rgba(255, 172, 92, 0.24);
  background: linear-gradient(90deg, rgba(255, 172, 92, 0.12), rgba(255, 255, 255, 0.06));
}

.main-hero-notice-top,
.notice-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.main-hero-notice-top strong,
.notice-board-head h3 {
  color: #ffffff;
  font-size: 0.98rem;
  margin: 0;
}

.main-hero-notice-top strong {
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.main-hero-notice-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 172, 92, 0.2);
  color: #ffbf80;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.main-hero-notice p,
.notice-board-preview {
  margin: 0;
  color: rgba(237, 243, 251, 0.76);
  font-size: 0.86rem;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-panel {
  padding: 18px;
}

.notice-board-list {
  display: grid;
  gap: 12px;
  min-height: 380px;
  align-content: start;
}

.notice-board-table {
  display: grid;
  gap: 6px;
  align-content: start;
  grid-auto-rows: min-content;
}

.notice-board-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1.9fr) 120px 138px 110px;
  gap: 12px;
  align-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 4px 12px;
  min-height: 42px;
}

.notice-board-row-head {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-weight: 800;
  min-height: 34px;
}

.notice-board-row-body {
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.notice-board-row-pinned {
  border-color: rgba(255, 172, 92, 0.32);
  background: linear-gradient(90deg, rgba(255, 172, 92, 0.14), rgba(255, 255, 255, 0.04));
}

.notice-board-row-pinned-copy {
  box-shadow: 0 8px 18px rgba(255, 172, 92, 0.08);
}

.notice-board-row-body:hover {
  transform: translateY(-1px);
  border-color: rgba(138, 225, 214, 0.24);
  box-shadow: 0 12px 22px rgba(10, 18, 28, 0.14);
}

.notice-col {
  min-width: 0;
}

.notice-col-no,
.notice-col-pin,
.notice-col-author,
.notice-col-date,
.notice-col-read {
  font-weight: 700;
}

.notice-col-title {
  display: grid;
  gap: 0;
}

.notice-col-title strong {
  font-size: 0.86rem;
  color: var(--text);
  line-height: 1.15;
}

.notice-col-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.notice-board-row-pinned .notice-col-pin {
  background: rgba(255, 172, 92, 0.18);
  color: #ffbf80;
}

.notice-col-read {
  display: flex;
  justify-content: flex-end;
}

.notice-read-summary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(86, 184, 175, 0.12);
  color: #8ae1d6;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.notice-read-summary:hover .notice-read-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -4px);
}

.notice-read-tooltip {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  min-width: 180px;
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 20, 28, 0.96);
  color: #eef4fb;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
  box-shadow: 0 18px 36px rgba(9, 15, 24, 0.24);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 2px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
  z-index: 30;
  pointer-events: none;
  white-space: normal;
}

.main-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.main-metric-card {
  min-height: 118px;
  padding: 14px 18px 13px;
  background: linear-gradient(180deg, rgba(33, 42, 53, 0.96), rgba(24, 30, 38, 0.98));
}

.main-metric-label {
  display: inline-block;
  color: #8ae1d6;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.main-metric-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.75rem;
  line-height: 1;
  color: #ffffff;
}

.main-metric-card p {
  margin: 8px 0 0;
  color: rgba(237, 243, 251, 0.7);
}

.main-story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.main-story-card {
  padding: 18px 18px 16px;
  background: rgba(32, 42, 53, 0.92);
}

.main-story-card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: #ffffff;
}

.main-story-card p:not(.eyebrow) {
  margin: 0;
  color: rgba(237, 243, 251, 0.72);
  line-height: 1.55;
}

.main-edit-button {
  margin-bottom: 14px;
}

.main-story-card.accent-card {
  background:
    radial-gradient(circle at top right, rgba(216, 122, 64, 0.22), transparent 22%),
    rgba(32, 42, 53, 0.94);
}

.main-story-card.dark-card {
  background:
    linear-gradient(160deg, rgba(23, 29, 38, 0.98), rgba(17, 22, 29, 0.98));
}

.main-schedule-list {
  display: grid;
  gap: 10px;
  min-height: 260px;
  align-content: start;
  overflow: hidden;
}

.main-schedule-item {
  display: grid;
  grid-template-columns: minmax(116px, 148px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.main-schedule-item.done {
  opacity: 0.72;
}

.main-schedule-item strong {
  display: block;
  color: #ffffff;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.main-schedule-item p {
  margin-top: 4px;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.main-schedule-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  min-width: 0;
  width: 100%;
  border-radius: 999px;
  background: rgba(115, 212, 207, 0.14);
  color: #8ae1d6;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0 16px;
  white-space: nowrap;
}

.main-flow-steps {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.main-flow-steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.08em;
}

body[data-theme="light"] .main-hero-card {
  background:
    radial-gradient(circle at top left, rgba(86, 184, 175, 0.18), transparent 32%),
    radial-gradient(circle at bottom right, rgba(216, 122, 64, 0.2), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 250, 252, 0.98));
}

body[data-theme="light"] .main-kicker {
  color: #1b7169;
}

body[data-theme="light"] .main-hero-card h2 {
  color: #1e2a34;
}

body[data-theme="light"] .main-description {
  color: rgba(49, 37, 25, 0.78);
}

body[data-theme="light"] .main-hero-pill {
  background: rgba(27, 113, 105, 0.08);
  border-color: rgba(27, 113, 105, 0.1);
  color: #255b57;
}

body[data-theme="light"] .main-orbit-ring {
  border-color: rgba(27, 113, 105, 0.14);
}

body[data-theme="light"] .main-orbit-core {
  color: #ffffff;
  box-shadow: 0 0 calc(30px + var(--main-glow-shift)) rgba(204, 107, 47, 0.18);
}

body[data-theme="light"] .main-orbit-node {
  background: rgba(255, 255, 255, 0.86);
  color: #2b3c4a;
  border-color: rgba(173, 121, 63, 0.14);
}

body[data-theme="light"] .main-metric-card,
body[data-theme="light"] .main-story-card {
  background: rgba(255, 255, 255, 0.94);
}

body[data-theme="light"] .main-metric-label {
  color: #1b7169;
}

body[data-theme="light"] .main-metric-card strong,
body[data-theme="light"] .main-story-card h3 {
  color: #1e2a34;
}

body[data-theme="light"] .main-metric-card p,
body[data-theme="light"] .main-story-card p:not(.eyebrow) {
  color: rgba(49, 37, 25, 0.7);
}

body[data-theme="light"] .main-story-card.accent-card {
  background:
    radial-gradient(circle at top right, rgba(216, 122, 64, 0.14), transparent 22%),
    rgba(255, 255, 255, 0.96);
}

body[data-theme="light"] .main-story-card.dark-card {
  background: linear-gradient(160deg, rgba(244, 249, 250, 0.98), rgba(255, 255, 255, 0.98));
}

body[data-theme="light"] .main-schedule-item {
  background: rgba(27, 113, 105, 0.05);
}

body[data-theme="light"] .main-schedule-item strong,
body[data-theme="light"] .main-flow-steps span {
  color: #1e2a34;
}

body[data-theme="light"] .main-schedule-date {
  background: rgba(27, 113, 105, 0.1);
  color: #1b7169;
}

body[data-theme="light"] .main-flow-steps span {
  background: rgba(27, 113, 105, 0.05);
}

body[data-theme="light"] .main-hero-board {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 250, 0.96));
  border-color: rgba(27, 113, 105, 0.12);
}

body[data-theme="light"] .main-hero-board-head h3,
body[data-theme="light"] .main-hero-notice-top strong,
body[data-theme="light"] .notice-board-head h3 {
  color: #1e2a34;
}

body[data-theme="light"] .main-hero-notice,
body[data-theme="light"] .notice-board-row-head,
body[data-theme="light"] .notice-board-row-body {
  background: rgba(27, 113, 105, 0.05);
  border-color: rgba(27, 113, 105, 0.08);
}

body[data-theme="light"] .main-hero-notice-pinned {
  border-color: rgba(232, 150, 59, 0.24);
  background: linear-gradient(90deg, rgba(255, 198, 147, 0.26), rgba(255, 255, 255, 0.96));
}

body[data-theme="light"] .main-hero-notice:hover,
body[data-theme="light"] .notice-board-row-body:hover {
  border-color: rgba(27, 113, 105, 0.2);
}

body[data-theme="light"] .main-hero-notice p,
body[data-theme="light"] .notice-board-preview {
  color: rgba(49, 37, 25, 0.74);
}

body[data-theme="light"] .notice-read-summary {
  background: rgba(27, 113, 105, 0.1);
  color: #1b7169;
}

body[data-theme="light"] .main-hero-notice-flag {
  background: rgba(232, 150, 59, 0.16);
  color: #a95e16;
}

body[data-theme="light"] .notice-read-tooltip {
  background: rgba(255, 255, 255, 0.98);
  color: #1e2a34;
  border: 1px solid rgba(27, 113, 105, 0.12);
}

body[data-theme="light"] .notice-target-option,
body[data-theme="light"] .notice-read-status {
  background: #ffffff;
}

body[data-theme="light"] .notice-col-title strong,
body[data-theme="light"] .notice-col-no,
body[data-theme="light"] .notice-col-pin,
body[data-theme="light"] .notice-col-author,
body[data-theme="light"] .notice-col-date,
body[data-theme="light"] .notice-col-read {
  color: #1e2a34;
}

body[data-theme="light"] .notice-board-row-pinned {
  border-color: rgba(232, 150, 59, 0.28);
  background: linear-gradient(90deg, rgba(255, 198, 147, 0.28), rgba(255, 255, 255, 0.96));
}

body[data-theme="light"] .notice-board-row-pinned .notice-col-pin {
  background: rgba(232, 150, 59, 0.16);
  color: #a95e16;
}

@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes orbit-spin-reverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes orbit-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 24px rgba(115, 212, 207, 0.22); }
  50% { transform: scale(1.04); box-shadow: 0 0 38px rgba(216, 122, 64, 0.28); }
}

body:not([data-theme="light"]) .schedule-panel {
  background: rgba(24, 31, 39, 0.96);
}

body:not([data-theme="light"]) .schedule-side-card {
  background: rgba(28, 36, 48, 0.96);
}

body:not([data-theme="light"]) .schedule-weekdays,
body:not([data-theme="light"]) .schedule-calendar-grid {
  border-color: rgba(117, 135, 156, 0.18);
}

body:not([data-theme="light"]) .schedule-weekday {
  background: #1f2732;
  color: #eef4fb;
}

body:not([data-theme="light"]) .schedule-calendar-grid {
  background: #161d27;
}

body:not([data-theme="light"]) .schedule-day {
  background: #1c2430;
}

body:not([data-theme="light"]) .schedule-day.muted {
  background: #202732;
}

body:not([data-theme="light"]) .schedule-day.holiday {
  background: rgba(95, 78, 34, 0.48);
}

body:not([data-theme="light"]) .schedule-day-number {
  color: #aab8c8;
}

body:not([data-theme="light"]) .schedule-item {
  color: #edf3fb;
}

body:not([data-theme="light"]) .schedule-mini-day {
  background: #1b2430;
  color: #edf3fb;
}

body:not([data-theme="light"]) .schedule-todo-item {
  background: #1b2430;
}

body:not([data-theme="light"]) .schedule-assignee-option,
body:not([data-theme="light"]) .schedule-assignee-status {
  background: #1b2430;
}

body:not([data-theme="light"]) .notice-target-option,
body:not([data-theme="light"]) .notice-read-status {
  background: #1b2430;
}

body:not([data-theme="light"]) .auth-dialog,
body:not([data-theme="light"]) .admin-users-dialog {
  background: #1c2430;
}

.pivot-controls {
  display: flex;
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
}

.pivot-controls label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  min-width: 160px;
}

.stats-grid,
.file-grid {
  display: grid;
  gap: 8px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 6px;
}

.file-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.pivot-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 8px;
  margin-bottom: 6px;
}

.pivot-column {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.stat-card,
.file-card,
.issue-card {
  border-radius: 18px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

.stat-card h3,
.file-card h3,
.issue-card h3 {
  margin: 5px 0 4px;
  font-size: 0.82rem;
}

.stat-value {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.filters input,
.filters select,
.pivot-controls select {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  min-height: 30px;
  padding: 0 12px;
  color: var(--text);
}

.records-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.records-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.records-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.records-save-hint {
  min-width: 168px;
  text-align: right;
}

.title-select {
  min-width: 132px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--text);
  padding: 0 12px;
}

.filters {
  display: grid;
  grid-template-columns: 220px minmax(260px, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 6px;
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 0.74rem;
}

.table-wrap {
  overflow: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--table-bg);
  min-width: 0;
}

.gantt-wrap {
  min-width: 0;
}

.admin-diagnostics-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}

.admin-summary-card,
.admin-log-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--table-bg);
  padding: 12px;
}

.admin-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-bottom: 5px;
}

.admin-summary-card strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.admin-summary-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.admin-summary-wide,
.admin-file-card {
  grid-column: span 3;
}

.admin-file-table-wrap {
  max-height: 180px;
  margin-top: 8px;
}

.admin-log-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-log-header {
  margin-bottom: 8px;
}

.admin-log-output {
  min-height: 260px;
  max-height: 420px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  font: 0.68rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.chart-box {
  min-height: 185px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  padding: 8px;
  margin-bottom: 6px;
}

.chart-box svg {
  width: 100%;
  height: 145px;
  display: block;
}

.chart-caption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.tab-pane[data-tab-pane="pivot"] .panel {
  padding: 8px;
}

.tab-pane[data-tab-pane="pivot"] .panel-header {
  margin-bottom: 4px;
}

.tab-pane[data-tab-pane="pivot"] .panel h2 {
  font-size: 0.98rem;
}

.tab-pane[data-tab-pane="pivot"] .chart-box {
  min-height: 214px;
  padding: 10px 8px 8px 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tab-pane[data-tab-pane="pivot"] .chart-box svg {
  height: 158px;
}

.tab-pane[data-tab-pane="pivot"] .chart-caption {
  margin-top: 6px;
  font-size: 0.74rem;
}

.tab-pane[data-tab-pane="pivot"] .compact-table table {
  min-width: 100%;
  width: 100%;
  table-layout: fixed;
  font-size: 0.6rem;
}

.tab-pane[data-tab-pane="pivot"] .compact-table th,
.tab-pane[data-tab-pane="pivot"] .compact-table td {
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 0.66rem;
  padding: 3px 2px;
}

.tab-pane[data-tab-pane="pivot"] .pivot-column:first-child .compact-table th,
.tab-pane[data-tab-pane="pivot"] .pivot-column:first-child .compact-table td {
  font-size: 0.52rem;
}

.tab-pane[data-tab-pane="pivot"] .pivot-column:first-child .table-wrap {
  overflow: visible;
}

.tab-pane[data-tab-pane="pivot"] .pivot-column:last-child .compact-table table {
  font-size: 0.6rem;
}

.tab-pane[data-tab-pane="pivot"] .pivot-column:last-child .compact-table th,
.tab-pane[data-tab-pane="pivot"] .pivot-column:last-child .compact-table td {
  padding: 3px 1px;
}

.tab-pane[data-tab-pane="pivot"] .pivot-right-panel {
  padding: 6px 7px;
}

.tab-pane[data-tab-pane="pivot"] .pivot-column:last-child .table-wrap {
  overflow: visible;
}

.tab-pane[data-tab-pane="pivot"] .pivot-column:last-child .panel-header {
  margin-bottom: 3px;
}

.tab-pane[data-tab-pane="pivot"] .pivot-column:last-child .panel h2 {
  font-size: 0.92rem;
}

.tab-pane[data-tab-pane="pivot"] .compact-table th,
.tab-pane[data-tab-pane="pivot"] .compact-table td {
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 0.62rem;
}

.pivot-summary-row-total {
  background: rgba(45, 115, 198, 0.08);
  font-weight: 700;
}

.pivot-summary-label,
.pivot-summary-cell-total {
  font-weight: 700;
}

.pivot-summary-cell-overload {
  background: rgba(216, 122, 64, 0.18);
  color: #9a4d1f;
  font-weight: 700;
}

body:not([data-theme="light"]) .pivot-summary-cell-overload {
  background: rgba(216, 122, 64, 0.22);
  color: #ffd0ad;
}

.pivot-detail-menu {
  position: relative;
  display: inline-flex;
  justify-content: center;
}

.pivot-detail-menu summary {
  list-style: none;
  min-width: 20px;
  cursor: pointer;
  color: inherit;
  font-weight: 800;
}

.pivot-detail-menu summary::-webkit-details-marker {
  display: none;
}

.pivot-detail-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 130;
  width: min(280px, 70vw);
  max-height: 240px;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(54, 110, 236, 0.24);
  border-radius: 10px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  text-align: left;
}

.pivot-detail-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.pivot-detail-list {
  display: grid;
  gap: 6px;
}

.pivot-detail-row,
.pivot-detail-empty {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(54, 110, 236, 0.08);
  color: var(--text);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.pivot-line-chart {
  position: relative;
  width: 100%;
  height: 100%;
}

.load-sv-controls {
  display: flex;
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.load-sv-sections {
  display: grid;
  gap: 10px;
}

.load-sv-section {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
  padding: 8px 10px 4px;
}

.load-sv-subheader {
  margin-bottom: 2px;
}

.load-sv-controls label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  min-width: 160px;
}

.load-sv-chart-box {
  min-height: 260px;
  padding: 4px 8px 2px;
}

.search-panel {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.search-toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.search-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.search-filter-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.search-filter-grid input,
.search-filter-grid select {
  width: 100%;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--text);
  padding: 10px 12px;
}

.search-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-meta-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-results-wrap {
  min-height: 220px;
}

.search-results-list {
  display: grid;
  gap: 10px;
}

.search-result-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
  border-radius: 18px;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

.search-result-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
}

.search-result-top strong {
  font-size: 0.98rem;
}

.search-result-sv {
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(31, 107, 103, 0.1);
  color: var(--teal);
  font-weight: 700;
  white-space: nowrap;
}

.search-result-site {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.search-result-address-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(31, 107, 103, 0.06);
}

.search-result-address {
  margin: 0;
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.search-address-copy-button {
  flex: 0 0 auto;
  padding: 6px 9px;
  font-size: 0.74rem;
}

.search-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.search-result-field {
  display: grid;
  gap: 4px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  padding: 10px 12px;
}

.search-result-field span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.search-result-field strong {
  color: var(--text);
  font-size: 0.92rem;
}

.search-result-field-wide {
  grid-column: 1 / -1;
}

.search-finishing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.search-finishing-field {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 9px;
  border-radius: 10px;
  background: rgba(47, 109, 246, 0.06);
  border: 1px solid rgba(47, 109, 246, 0.08);
}

.search-finishing-field span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.search-finishing-field strong {
  min-width: 0;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

body:not([data-theme="light"]) .search-result-card,
body:not([data-theme="light"]) .search-result-field {
  background: rgba(255, 255, 255, 0.04);
}

body:not([data-theme="light"]) .search-finishing-field {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

body:not([data-theme="light"]) .search-result-address-row {
  background: rgba(255, 255, 255, 0.04);
}

.load-sv-line-chart svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.load-sv-grid-line {
  stroke: rgba(170, 184, 200, 0.22);
  stroke-width: 1;
}

.load-sv-threshold-line {
  stroke: rgba(210, 76, 63, 0.92);
  stroke-width: 2;
  stroke-dasharray: 6 6;
}

.load-sv-threshold-label {
  fill: #c85446;
  font-size: 9px;
  font-weight: 700;
}

.load-sv-axis-label {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

body:not([data-theme="light"]) .load-sv-grid-line {
  stroke: rgba(139, 156, 175, 0.24);
}

body:not([data-theme="light"]) .load-sv-threshold-label {
  fill: #ff958c;
}

body:not([data-theme="light"]) .load-sv-axis-label {
  fill: #9fb1c5;
}

.pivot-chart-tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  transform: translateY(-100%);
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(28, 33, 41, 0.92);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}

body[data-theme="light"] .pivot-chart-tooltip {
  background: rgba(49, 37, 25, 0.92);
}

body:not([data-theme="light"]) .gantt-total-table,
body:not([data-theme="light"]) .gantt-detail-table,
body:not([data-theme="light"]) .vendor-capacity-table {
  color: #edf3fb;
}

body:not([data-theme="light"]) .gantt-vendor-row .gantt-sticky,
body:not([data-theme="light"]) .gantt-vendor-row .gantt-detail-summary {
  background: #202833;
  color: #edf3fb;
}

body:not([data-theme="light"]) .gantt-capacity-row .gantt-sticky,
body:not([data-theme="light"]) .gantt-capacity-row .gantt-detail-summary {
  background: #1b3133;
  color: #d8faf5;
}

body:not([data-theme="light"]) .gantt-gap-row .gantt-sticky,
body:not([data-theme="light"]) .gantt-gap-row .gantt-detail-summary {
  background: #37271f;
  color: #ffe7d8;
}

body:not([data-theme="light"]) #ganttTotalWrap .gantt-total-row .gantt-total-left {
  background: #2f221c;
  color: #ffe7d8;
}

body:not([data-theme="light"]) #ganttTotalWrap .gantt-capacity-row .gantt-total-left {
  background: #1b3133;
  color: #d8faf5;
}

body:not([data-theme="light"]) #ganttTotalWrap .gantt-gap-row .gantt-total-left,
body:not([data-theme="light"]) #ganttTotalWrap .gantt-gap-row td:not(.gantt-sticky),
body:not([data-theme="light"]) #ganttTotalWrap .gantt-gap-row th:not(.gantt-sticky) {
  background: #37271f;
  color: #ffe7d8;
}

body:not([data-theme="light"]) #ganttTotalWrap .gantt-vendor-row .gantt-total-left {
  background: #202833;
  color: #edf3fb;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
  font-size: 0.68rem;
}

.wide-table table {
  min-width: 2140px;
}

.gantt-total-table,
.gantt-detail-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 0.64rem;
}

.gantt-total-table th,
.gantt-total-table td,
.gantt-detail-table th,
.gantt-detail-table td {
  min-width: 18px;
  width: 18px;
  height: 24px;
  padding: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
}

.gantt-table-wrap {
  position: relative;
  overflow-x: auto;
  overflow-y: auto;
  max-height: max(320px, calc(100vh - var(--sticky-panel-top) - var(--footer-offset) - 72px));
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: none;
}

.gantt-table-wrap::-webkit-scrollbar {
  display: none;
}

.gantt-left-head,
.gantt-total-left,
.gantt-detail-left {
  min-width: var(--gantt-vendor-col);
  width: var(--gantt-vendor-col);
  background: var(--table-head);
  z-index: 5;
}

.gantt-detail-table thead .gantt-left-head:first-child,
.gantt-detail-table tbody th.gantt-detail-left:first-child {
  padding: 0 2px;
}

.gantt-detail-left:nth-child(2) {
  min-width: var(--gantt-job-col);
  width: var(--gantt-job-col);
}

.gantt-detail-left:nth-child(3) {
  min-width: var(--gantt-site-col);
  width: var(--gantt-site-col);
  text-align: left;
  padding-left: 4px;
}

.gantt-detail-table tbody .gantt-sticky:nth-child(3) {
  text-align: left;
  padding-left: 4px;
}

.gantt-detail-table thead .gantt-left-head:nth-child(3) {
  text-align: center;
}

.gantt-detail-left:nth-child(4) {
  min-width: var(--gantt-sv-col);
  width: var(--gantt-sv-col);
}

.gantt-detail-left:nth-child(5),
.gantt-detail-left:nth-child(6),
.gantt-detail-left:nth-child(7) {
  min-width: var(--gantt-date-col);
  width: var(--gantt-date-col);
}

.gantt-detail-left:nth-child(8) {
  min-width: var(--gantt-lt-col);
  width: var(--gantt-lt-col);
}

.gantt-total-left:first-child {
  min-width: 96px;
  width: 96px;
}

.gantt-total-left:nth-child(2) {
  min-width: 52px;
  width: 52px;
}

.gantt-sticky {
  position: sticky;
  left: 0;
  background: var(--panel-strong);
  z-index: 8;
}

.gantt-detail-table .gantt-sticky:nth-child(2) {
  left: var(--gantt-vendor-col);
}

.gantt-detail-table .gantt-sticky:nth-child(3) {
  left: calc(var(--gantt-vendor-col) + var(--gantt-job-col));
}

.gantt-detail-table .gantt-sticky:nth-child(4) {
  left: calc(var(--gantt-vendor-col) + var(--gantt-job-col) + var(--gantt-site-col));
}

.gantt-detail-table .gantt-sticky:nth-child(5) {
  left: calc(var(--gantt-vendor-col) + var(--gantt-job-col) + var(--gantt-site-col) + var(--gantt-sv-col));
}

.gantt-detail-table .gantt-sticky:nth-child(6) {
  left: calc(
    var(--gantt-vendor-col) + var(--gantt-job-col) + var(--gantt-site-col) + var(--gantt-sv-col) + var(--gantt-date-col)
  );
}

.gantt-detail-table .gantt-sticky:nth-child(7) {
  left: calc(
    var(--gantt-vendor-col) + var(--gantt-job-col) + var(--gantt-site-col) + var(--gantt-sv-col) + var(--gantt-date-col) * 2
  );
}

.gantt-detail-table .gantt-sticky:nth-child(8) {
  left: calc(
    var(--gantt-vendor-col) + var(--gantt-job-col) + var(--gantt-site-col) + var(--gantt-sv-col) + var(--gantt-date-col) * 3
  );
}

.gantt-detail-summary {
  position: sticky;
  left: var(--gantt-vendor-col);
  min-width: calc(
    var(--gantt-job-col) + var(--gantt-site-col) + var(--gantt-sv-col) + var(--gantt-date-col) * 3 + var(--gantt-lt-col)
  );
  width: calc(
    var(--gantt-job-col) + var(--gantt-site-col) + var(--gantt-sv-col) + var(--gantt-date-col) * 3 + var(--gantt-lt-col)
  );
  max-width: calc(
    var(--gantt-job-col) + var(--gantt-site-col) + var(--gantt-sv-col) + var(--gantt-date-col) * 3 + var(--gantt-lt-col)
  );
  background: var(--panel-strong);
  z-index: 12;
  font-weight: 700;
  box-sizing: border-box;
  border-right: 1px solid var(--line);
}

.gantt-total-table .gantt-sticky:nth-child(2) {
  left: 96px;
}

#ganttTotalWrap .gantt-total-table {
  font-size: 0.76rem;
}

#ganttTotalWrap .gantt-total-table th,
#ganttTotalWrap .gantt-total-table td {
  min-width: 22px;
  width: 22px;
  height: 28px;
}

#ganttTotalWrap .gantt-total-table .gantt-total-left:first-child {
  min-width: 110px;
  width: 110px;
}

#ganttTotalWrap .gantt-total-table .gantt-total-left:nth-child(2) {
  min-width: 62px;
  width: 62px;
}

#ganttTotalWrap .gantt-total-table .gantt-sticky:nth-child(2) {
  left: 110px;
}

#ganttTotalWrap .gantt-total-table .gantt-sticky {
  z-index: 22;
  overflow: hidden;
  background-clip: padding-box;
}

#ganttTotalWrap .gantt-total-table thead .gantt-sticky {
  z-index: 36;
}

.gantt-total-table thead th,
.gantt-detail-table thead th {
  position: sticky;
  z-index: 20;
  background: var(--table-head);
  background-clip: padding-box;
  box-shadow: inset 0 -1px 0 var(--line);
}

.gantt-total-table thead tr:first-child th,
.gantt-detail-table thead tr:first-child th {
  top: 0;
  height: var(--gantt-head-row-1);
  line-height: var(--gantt-head-row-1);
}

.gantt-total-table thead tr:nth-child(2) th,
.gantt-detail-table thead tr:nth-child(2) th {
  top: var(--gantt-head-row-1);
  height: var(--gantt-head-row-2);
  line-height: var(--gantt-head-row-2);
}

.gantt-total-table thead .gantt-sticky,
.gantt-detail-table thead .gantt-sticky {
  z-index: 34;
}

.gantt-month-head {
  background: var(--table-head);
  color: var(--text);
  font-size: 0.68rem;
  padding: 0;
}

.gantt-month-head.month-boundary-start,
.gantt-day-head.month-boundary-start,
.gantt-count-cell.month-boundary-start,
.gantt-range-cell.month-boundary-start {
  border-left: 2px solid rgba(79, 112, 168, 0.42) !important;
}

body:not([data-theme="light"]) .gantt-month-head.month-boundary-start,
body:not([data-theme="light"]) .gantt-day-head.month-boundary-start,
body:not([data-theme="light"]) .gantt-count-cell.month-boundary-start,
body:not([data-theme="light"]) .gantt-range-cell.month-boundary-start {
  border-left: 2px solid rgba(163, 186, 224, 0.4) !important;
}

.gantt-day-head {
  background: var(--table-head);
  font-size: 0.55rem;
  color: var(--muted);
  padding: 0;
}

.gantt-day-head.weekend,
.gantt-count-cell.weekend,
.gantt-range-cell.weekend {
  background: rgba(123, 99, 74, 0.05);
}

.gantt-total-table thead .gantt-day-head.weekend,
.gantt-total-table thead .gantt-month-head.weekend,
.gantt-detail-table thead .gantt-day-head.weekend,
.gantt-detail-table thead .gantt-month-head.weekend {
  background: var(--table-head);
}

.gantt-day-head.today,
.gantt-count-cell.today,
.gantt-range-cell.today {
  box-shadow: inset 0 0 0 1px rgba(27, 113, 105, 0.25);
  background: rgba(86, 184, 175, 0.08);
}

.gantt-total-table thead .gantt-day-head.today,
.gantt-total-table thead .gantt-month-head.today,
.gantt-detail-table thead .gantt-day-head.today,
.gantt-detail-table thead .gantt-month-head.today {
  background: var(--table-head);
  box-shadow: inset 0 0 0 1px rgba(27, 113, 105, 0.25), inset 0 -1px 0 var(--line);
}

.gantt-group-row td,
.gantt-group-cell {
  background: rgba(204, 107, 47, 0.08);
  color: var(--accent-deep);
  font-weight: 700;
  text-align: left;
  padding: 6px 10px;
}

.gantt-range-cell.active {
  position: relative;
  z-index: 1;
}

.gantt-range-cell.active::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  right: 0;
  background: rgba(86, 184, 175, 0.25);
  pointer-events: none;
}

.gantt-range-cell.active.mint::before {
  background: #7ae0a6;
}

.gantt-range-cell.active.sky::before {
  background: #86b9ff;
}

.gantt-range-cell.active.orange::before {
  background: #ffc166;
}

.gantt-range-cell.active.pink::before {
  background: #ff8fa5;
}

.gantt-range-cell.active.violet::before {
  background: #b68bff;
}

.gantt-range-cell.active.yellow::before {
  background: #ffd95b;
}

.gantt-range-cell.active.teal::before {
  background: #73d4cf;
}

.gantt-range-cell.active.slate::before {
  background: #b0c0d9;
}

.gantt-range-cell.range-start {
  overflow: hidden;
}

.gantt-range-cell.range-end {
  overflow: hidden;
}

.gantt-range-cell.range-start.active::before {
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.gantt-range-cell.range-end.active::before {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.gantt-count-cell.has-count {
  background: rgba(27, 113, 105, 0.12);
  color: var(--teal);
  font-weight: 700;
}

.gantt-total-row th,
.gantt-total-row td {
  background: rgba(204, 107, 47, 0.12);
  font-weight: 700;
}

.gantt-separator-row td {
  height: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.gantt-capacity-row th,
.gantt-capacity-row td {
  background: rgba(86, 184, 175, 0.08);
}

.gantt-gap-row th,
.gantt-gap-row td {
  background: rgba(204, 107, 47, 0.05);
}

.gantt-total-table .gantt-count-cell.has-count,
.gantt-total-table .gantt-total-row td:not(.gantt-sticky),
.gantt-total-table .gantt-capacity-row td:not(.gantt-sticky),
.gantt-total-table .gantt-gap-row td:not(.gantt-sticky),
.gantt-total-table .gantt-vendor-row td:not(.gantt-sticky) {
  background: transparent;
  color: var(--text);
}

.gantt-total-table .gantt-count-cell.today,
.gantt-total-table .gantt-count-cell.weekend {
  background: transparent;
  box-shadow: none;
}

#ganttTotalWrap .gantt-total-row .gantt-total-left {
  background: #fdf3ea;
}

#ganttTotalWrap .gantt-capacity-row .gantt-total-left {
  background: #edf9f7;
}

#ganttTotalWrap .gantt-gap-row .gantt-total-left {
  background: #fff8ef;
}

#ganttTotalWrap .gantt-gap-row td:not(.gantt-sticky),
#ganttTotalWrap .gantt-gap-row th:not(.gantt-sticky) {
  background: #fff8ef;
}

#ganttTotalWrap .gantt-vendor-row .gantt-total-left {
  background: #ffffff;
}

.gantt-vendor-row .gantt-sticky,
.gantt-vendor-row .gantt-detail-summary {
  background: #ffffff;
}

.gantt-capacity-row .gantt-sticky,
.gantt-capacity-row .gantt-detail-summary {
  background: #edf9f7;
}

.gantt-gap-row .gantt-sticky,
.gantt-gap-row .gantt-detail-summary {
  background: #fff8ef;
}

.gantt-detail-table tbody .gantt-sticky:nth-child(3) {
  border-right: 1px solid var(--line);
}

.gantt-detail-table thead .gantt-left-head:nth-child(3),
.gantt-detail-table tbody .gantt-sticky:nth-child(3) {
  border-right: 1px solid var(--line);
}

.gantt-detail-table thead .gantt-left-head:nth-child(2),
.gantt-detail-table tbody .gantt-sticky:nth-child(2) {
  border-right: 1px solid var(--line);
}

.negative-gap,
.negative-gap-text {
  color: #b42318;
  font-weight: 700;
}

.gantt-total-table .gantt-count-cell.negative-gap,
.gantt-detail-table .gantt-count-cell.negative-gap,
.gantt-total-table .negative-gap-text,
.gantt-detail-table .negative-gap-text {
  color: #b42318 !important;
  background: rgba(180, 35, 24, 0.14) !important;
  font-weight: 800;
}

.gantt-total-table .gantt-count-cell.overall-overload {
  background: #ffd6d1 !important;
  color: #8f1d14 !important;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(180, 35, 24, 0.35);
}

#ganttTotalWrap .gantt-total-row td.gantt-count-cell.overall-overload {
  background: #ffc2b8 !important;
  color: #8f1d14 !important;
}

#ganttTotalWrap .gantt-gap-row td.gantt-count-cell.negative-gap,
#ganttDetailWrap .gantt-gap-row td.gantt-count-cell.negative-gap {
  background: #ffe2de !important;
  color: #b42318 !important;
}

.gantt-detail-table tbody tr:not(.gantt-separator-row) td:first-of-type {
  box-shadow: none;
  border-left: 0;
}

.compact-table table {
  min-width: 520px;
}

th,
td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
  line-height: 1.1;
  text-align: center;
}

th {
  position: sticky;
  top: 0;
  background: var(--table-head);
  font-size: 0.66rem;
  color: var(--muted);
  z-index: 4;
}

.vendor-capacity-table thead th {
  top: 0;
  z-index: 6;
}

.filter-input {
  width: 100%;
  min-width: 88px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  font-size: 0.64rem;
  background: var(--input-bg);
  color: var(--text);
}

.cell-edit-input {
  width: 100%;
  min-width: 88px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  font-size: 0.64rem;
  background: var(--input-bg);
  color: var(--text);
}

.cell-edit-input.is-dirty {
  border-color: rgba(216, 122, 64, 0.85);
  box-shadow: 0 0 0 2px rgba(216, 122, 64, 0.16);
}

.cell-edit-input.is-pending-vendor {
  border-color: rgba(216, 122, 64, 0.92);
  background: rgba(255, 202, 157, 0.42);
  color: #8f4318;
  font-weight: 700;
}

body:not([data-theme="light"]) .cell-edit-input.is-pending-vendor {
  border-color: rgba(255, 174, 108, 0.92);
  background: rgba(128, 70, 30, 0.42);
  color: #ffd7b5;
}

.cell-date-input {
  min-width: 116px;
}

.cell-date-editor {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 4px;
  min-width: 124px;
}

.cell-date-text {
  min-width: 0;
  padding-right: 8px;
}

.cell-date-picker-button {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.72rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.cell-date-picker-button:hover {
  border-color: rgba(64, 103, 216, 0.35);
}

.cell-date-picker-native {
  position: absolute;
  inset: auto 0 0 auto;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.cell-left {
  text-align: left;
}

.cell-center {
  text-align: center;
}

.job-number-display {
  white-space: pre;
}

.filter-button {
  width: 100%;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.64rem;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
}

.header-label {
  display: block;
  text-align: center;
}

.filter-menu {
  position: relative;
}

.filter-menu details {
  position: relative;
}

.filter-menu summary {
  list-style: none;
}

.filter-menu summary::-webkit-details-marker {
  display: none;
}

.dropdown-panel {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 140;
  width: 240px;
  max-height: 240px;
  overflow: auto;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.filter-search-input {
  width: 100%;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font-size: 0.72rem;
  outline: none;
}

.filter-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.dropdown-actions {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.dropdown-actions button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.74rem;
  cursor: pointer;
}

.dropdown-option {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--text);
  font-size: 0.66rem;
  margin-bottom: 6px;
  text-align: left;
}

.dropdown-option[hidden] {
  display: none;
}

.records-panel {
  display: flex;
  flex-direction: column;
  height: max(460px, calc(100dvh - var(--sticky-panel-top) - var(--footer-offset) - 22px));
  min-height: 0;
  max-height: none;
  font-size: 0.83em;
  overflow: hidden;
}

.records-toolbar {
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
  background: var(--panel-strong);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
  overflow: visible;
  box-shadow: none;
}

.records-scroll {
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: none;
  overscroll-behavior: contain;
}

.records-scroll::-webkit-scrollbar {
  display: none;
}

.records-filter-scroll {
  margin-top: 8px;
  border-radius: 12px 12px 0 0;
  overflow-x: hidden;
  overflow-y: visible;
  scrollbar-width: none;
}

.records-filter-scroll::-webkit-scrollbar {
  display: none;
}

.records-filter-scroll table {
  margin-right: 0;
  table-layout: fixed;
}

.records-filter-scroll th {
  position: static;
  vertical-align: top;
  overflow: visible;
}

.records-filter-scroll .header-cell,
.records-filter-scroll .filter-menu,
.records-filter-scroll .filter-menu details {
  min-width: 0;
}

.records-filter-scroll .header-label,
.records-filter-scroll .filter-button {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.records-filter-scroll .filter-input,
.records-filter-scroll .filter-button {
  min-width: 0;
  padding-left: 4px;
  padding-right: 4px;
}

.records-scroll thead {
  display: none;
}

.records-scroll table {
  margin-right: 0;
  table-layout: fixed;
}

.records-scroll td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.records-scroll .cell-edit-input,
.records-scroll .cell-date-editor {
  min-width: 0;
}

.records-scroll .cell-edit-input {
  padding-left: 5px;
  padding-right: 5px;
}

.tab-pane[data-tab-pane="team-records"] th,
.tab-pane[data-tab-pane="team-records"] td {
  padding: 3px 5px;
  font-size: 0.61rem;
}

.tab-pane[data-tab-pane="team-records"] .filter-input,
.tab-pane[data-tab-pane="team-records"] .filter-button,
.tab-pane[data-tab-pane="team-records"] .cell-edit-input {
  height: 22px;
  min-height: 22px;
  font-size: 0.58rem;
}

.tab-pane[data-tab-pane="team-records"] .cell-date-editor {
  grid-template-columns: minmax(0, 1fr) 22px;
  gap: 3px;
}

.tab-pane[data-tab-pane="team-records"] .cell-date-picker-button {
  width: 22px;
  height: 22px;
  font-size: 0.65rem;
}

.records-scroll th:last-child,
.records-scroll td:last-child {
  padding-right: 20px;
}

.records-scroll tbody tr.row-mof-pending td {
  background: rgba(255, 207, 222, 0.32);
}

.records-scroll tbody tr.row-dirty td {
  box-shadow: inset 0 1px 0 rgba(216, 122, 64, 0.12), inset 0 -1px 0 rgba(216, 122, 64, 0.12);
}

.locked-value,
.change-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
}

.locked-value {
  background: rgba(31, 107, 103, 0.12);
  color: var(--teal);
}

.change-pill {
  background: rgba(204, 107, 47, 0.14);
  color: var(--accent-deep);
}

.row-select-checkbox {
  width: 12px;
  height: 12px;
}

.team-select-all-checkbox {
  align-self: center;
  width: 13px;
  height: 13px;
  margin: 0;
}

.page-footer {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 64;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.floating-horizontal-scroll {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: var(--footer-offset);
  z-index: 63;
  height: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 999px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(73, 106, 167, 0.12);
  backdrop-filter: none;
}

.floating-horizontal-scroll[hidden] {
  display: none;
}

.floating-horizontal-scroll-inner {
  height: 1px;
}

.page-footer.hidden {
  display: none;
}

.footer-legal {
  justify-self: start;
  max-width: 520px;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.35;
}

.footer-legal p {
  margin: 0;
}

.footer-status {
  text-align: center;
  margin: 0;
}

.footer-status-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 280px;
}

.upload-progress {
  width: min(320px, 52vw);
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(31, 107, 103, 0.12);
  border: 1px solid rgba(31, 107, 103, 0.18);
}

.upload-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(31, 107, 103, 0.85), rgba(182, 94, 39, 0.82));
  transition: width 140ms linear;
}

.footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.footer-sync-button {
  justify-self: end;
  font-size: 10px;
}

.processing-overlay {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(247, 250, 255, 0.22);
  backdrop-filter: blur(2px);
}

.processing-overlay.open {
  display: flex;
}

.processing-dialog {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 184px;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.86rem;
}

.processing-spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid rgba(64, 103, 216, 0.18);
  border-top-color: var(--accent);
  animation: processing-spin 780ms linear infinite;
}

@keyframes processing-spin {
  to {
    transform: rotate(360deg);
  }
}

tbody tr:hover {
  background: rgba(182, 94, 39, 0.05);
}

.issue-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.vendor-capacity-table-wrap {
  width: fit-content;
  max-width: min(760px, 100%);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.vendor-capacity-table-wrap::-webkit-scrollbar {
  display: none;
}

.vendor-capacity-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.vendor-add-input {
  min-width: 160px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
}

.vendor-add-capacity {
  min-width: 92px;
  width: 92px;
}

.vendor-capacity-table {
  width: auto;
  min-width: 560px;
}

.vendor-capacity-table th,
.vendor-capacity-table td {
  padding: 6px 10px;
}

.vendor-delete-button {
  min-width: 54px;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
}

.hc-input {
  width: 62px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  text-align: center;
  padding: 0 4px;
}

.issue-card p,
.file-card p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(31, 107, 103, 0.1);
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pivot-layout {
    grid-template-columns: 1fr;
  }

  .main-hero-shell,
  .admin-diagnostics-grid,
  .admin-log-grid {
    grid-template-columns: 1fr;
  }

  .main-metrics-grid,
  .main-story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-summary-wide,
  .admin-file-card {
    grid-column: auto;
  }
}

@media (max-width: 920px) {
  body::after {
    display: none;
  }

  .page-shell {
    width: calc(100% - 14px);
    padding-top: 10px;
    padding-bottom: 12px;
  }

  .hero,
  .panel-header {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero,
  .nav-shell {
    position: static;
    top: auto;
    z-index: auto;
  }

  .site-brand {
    min-width: 0;
  }

  .hero h1,
  .site-subtitle {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .hero-actions {
    align-items: flex-start;
  }

  .stats-grid,
  .filters,
  .issue-list {
    grid-template-columns: 1fr;
  }

  .hero-action-row {
    width: 100%;
    flex-direction: column;
  }

  .records-header-row,
  .records-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .schedule-shell {
    grid-template-columns: 1fr;
  }

  .load-sv-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .load-sv-controls label {
    min-width: 0;
  }

  .load-sv-chart-box {
    min-height: 230px;
    padding-inline: 6px;
  }

  .schedule-assignee-picker,
  .schedule-assignee-status-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-footer {
    position: static;
    grid-template-columns: 1fr;
    left: 8px;
    right: 8px;
    bottom: 8px;
    margin-top: 12px;
  }

  .floating-horizontal-scroll {
    display: none !important;
  }

  .footer-status-wrap {
    width: 100%;
    min-width: 0;
  }

  .footer-legal {
    max-width: none;
    width: 100%;
  }

  .upload-progress {
    width: min(100%, 320px);
  }

  .footer-sync-button {
    justify-self: start;
  }

  .footer-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .main-metrics-grid,
  .main-story-grid {
    grid-template-columns: 1fr;
  }

  .schedule-time-grid {
    grid-template-columns: 1fr;
  }

  .schedule-panel {
    padding: 8px;
  }

  .schedule-header {
    align-items: stretch;
  }

  .schedule-nav {
    gap: 6px;
  }

  .schedule-main {
    min-width: 0;
  }

  .schedule-weekday {
    padding: 7px 4px;
    text-align: center;
    font-size: 0.7rem;
  }

  .schedule-day {
    min-height: 58px;
    padding: 5px 4px 6px;
  }

  .schedule-day-header {
    justify-content: center;
    margin-bottom: 3px;
  }

  .schedule-day-number {
    font-size: 0.7rem;
  }

  .schedule-day-items {
    display: none;
  }

  .schedule-mobile-summary {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 8;
  }

  .schedule-inspection {
    justify-content: center;
    margin-top: 4px;
    padding-top: 0;
  }

  .schedule-inspection-badge,
  .schedule-mobile-summary-badge {
    min-width: 26px;
    height: 22px;
    font-size: 0.68rem;
  }

  .schedule-inspection-popover,
  .schedule-mobile-summary-popover {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 14px;
    width: auto;
    max-height: min(52vh, 320px);
    z-index: 160;
  }

  .notice-panel {
    padding: 12px;
  }

  .search-panel {
    padding: 12px;
  }

  .search-filter-grid {
    grid-template-columns: 1fr;
  }

  .search-meta-row {
    align-items: stretch;
  }

  .search-meta-row .secondary-button {
    width: 100%;
  }

  .search-meta-actions {
    width: 100%;
  }

  .search-meta-actions .primary-button,
  .search-meta-actions .secondary-button {
    width: 100%;
  }

  .search-result-card {
    padding: 10px 12px;
  }

  .search-result-top {
    flex-direction: column;
    align-items: stretch;
  }

  .search-result-address-row {
    align-items: stretch;
    flex-direction: column;
  }

  .search-address-copy-button {
    width: 100%;
  }

  .search-result-sv {
    justify-self: start;
    width: fit-content;
  }

  .search-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notice-board-list {
    min-height: 0;
    gap: 8px;
  }

  .notice-board-table {
    gap: 8px;
  }

  .notice-board-row-head {
    display: none !important;
  }

  .notice-board-row,
  .notice-board-row-body,
  .notice-board-row-pinned,
  .notice-board-row-pinned-copy {
    width: 100%;
    box-sizing: border-box;
  }

  .notice-board-row {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas:
      "pin title"
      "pin author"
      "pin date"
      "pin read";
    gap: 4px 10px;
    padding: 8px 10px;
    min-height: 0;
    align-items: start;
    border-radius: 10px;
  }

  .notice-col-pin {
    grid-area: pin;
    min-height: 26px;
    min-width: 0;
    align-self: start;
    padding: 0 8px;
    font-size: 0.74rem;
  }

  .notice-col-title {
    grid-area: title;
    min-width: 0;
  }

  .notice-col-title strong {
    font-size: 0.84rem;
    line-height: 1.2;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  .notice-col-author {
    grid-area: author;
    font-size: 0.74rem;
    color: var(--muted);
  }

  .notice-col-date {
    grid-area: date;
    font-size: 0.72rem;
    color: var(--muted);
    justify-self: start;
    white-space: nowrap;
  }

  .notice-col-read {
    grid-area: read;
    justify-content: flex-start;
  }

  .notice-read-summary {
    min-height: 24px;
    padding: 0 8px;
    font-size: 0.74rem;
  }

  .notice-read-tooltip {
    left: 0;
    top: calc(100% + 6px);
    min-width: 140px;
    max-width: min(220px, calc(100vw - 48px));
    transform: translate(0, 0);
  }

  .notice-read-summary:hover .notice-read-tooltip {
    transform: translate(0, -4px);
  }
}
