:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #101828;
  --muted: #667085;
  --line: #d9e2f3;
  --teal: #142c86;
  --teal-dark: #0b1f68;
  --coral: #3157c9;
  --amber: #2447ad;
  --red: #d92d20;
  --blue: #142c86;
  --blue-soft: #edf3ff;
  --blue-mid: #dbe7ff;
  --shadow: 0 18px 46px rgba(20, 44, 134, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  font-family: Pretendard, "Noto Sans KR", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

body.login-mode {
  display: block;
  background: linear-gradient(135deg, #eef5ff 0%, #ffffff 52%, #e6efff 100%);
}

body.login-mode .sidebar,
body.login-mode .app {
  display: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-card img {
  width: 120px;
  height: auto;
  justify-self: center;
}

.login-card h1 {
  margin: 4px 0 0;
  color: var(--navy);
  text-align: center;
  font-size: 24px;
}

.login-card p,
.login-card small {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.login-card input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
  font-weight: 900;
}

.login-error {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff1f3;
  color: var(--red);
  text-align: center;
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  background: #071b5f;
  color: #fff;
}

.brand {
  display: block;
  margin-bottom: 34px;
}

.brand-logo {
  display: block;
  width: 156px;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  padding: 8px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 4px;
  color: rgba(255,255,255,0.62);
}

.side-nav {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.nav-item {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  color: rgba(255,255,255,0.76);
  background: transparent;
  text-align: left;
  font-weight: 700;
}

.nav-item.active,
.nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

.app {
  min-width: 0;
  padding: 28px clamp(18px, 3vw, 42px) 56px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.today,
.label {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 32px;
}

h2 {
  margin: 0;
  font-size: 20px;
}

h3 {
  margin: 0;
  font-size: 17px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-height: 76px;
  padding-top: 10px;
  resize: vertical;
}

#searchInput {
  width: min(38vw, 360px);
}

.primary,
.ghost,
.text-button,
.icon-button {
  border-radius: 8px;
  border: 0;
  font-weight: 800;
}

.primary {
  min-height: 42px;
  padding: 0 16px;
  color: #fff;
  background: var(--teal);
}

.primary:hover {
  background: var(--teal-dark);
}

.full {
  width: 100%;
}

.ghost {
  min-height: 42px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--blue-soft);
}

.text-button {
  color: var(--teal);
  background: transparent;
}

.icon-button {
  width: 40px;
  height: 40px;
  color: var(--muted);
  background: var(--blue-soft);
  font-size: 24px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kpi-card,
.panel,
.project-row,
.file-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(23, 32, 31, 0.05);
}

.kpi-card {
  padding: 18px;
}

.kpi-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.kpi-card strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

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

.category-card {
  min-height: 96px;
  padding: 16px;
  border-radius: 8px;
  background: var(--blue-soft);
}

.category-card span {
  color: var(--muted);
  font-weight: 800;
}

.category-card strong {
  display: block;
  margin-top: 10px;
  color: var(--blue);
  font-size: 34px;
}

.site-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.meeting-status-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.site-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.site-status-grid h3 {
  margin: 0 0 10px;
  color: var(--blue);
}

.site-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.site-row strong,
.site-row small {
  display: block;
}

.site-row small {
  margin-top: 5px;
  color: var(--muted);
}

.meeting-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-soft);
  text-align: left;
  cursor: pointer;
}

.meeting-row.today-meeting {
  border-color: var(--red);
  background: #fff1f1;
}

.meeting-row strong,
.meeting-row small {
  display: block;
}

.meeting-row small {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 800;
}

.panel {
  padding: 20px;
}

.panel-head,
.toolbar,
.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head {
  margin-bottom: 16px;
}

.panel-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.alert-list,
.task-list,
.calendar-list {
  display: grid;
  gap: 10px;
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.schedule-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 12px;
}

.design-schedule-board {
  overflow-x: auto;
  padding-bottom: 8px;
}

.design-schedule-table {
  display: grid;
  min-width: 1540px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.design-schedule-row {
  display: grid;
  grid-template-columns: 230px 150px 150px 150px repeat(9, 108px);
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  text-align: left;
}

.design-schedule-row:last-child {
  border-bottom: 0;
}

.design-schedule-row > div {
  min-height: 72px;
  padding: 10px;
  border-right: 1px solid var(--line);
}

.design-schedule-row > div:last-child {
  border-right: 0;
}

.design-schedule-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--navy);
  color: #fff;
  font-weight: 900;
  text-align: center;
}

.design-schedule-head > div {
  min-height: 46px;
  display: grid;
  place-items: center;
}

.design-schedule-row strong,
.design-schedule-row span,
.design-schedule-row small {
  display: block;
}

.design-schedule-row small {
  color: var(--muted);
  font-weight: 900;
}

.design-schedule-row span {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.4;
}

.design-stage-cell {
  display: grid;
  align-content: center;
  background: var(--blue-soft);
}

.design-stage-cell.done {
  background: #e9f8ef;
}

.design-stage-cell.soon {
  background: #fff6d7;
}

.design-stage-cell.late {
  background: #fff1f1;
  color: var(--red);
}

.design-stage-cell.late span {
  color: var(--red);
}

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

.schedule-board-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.schedule-board-card.design-card {
  border-left: 5px solid var(--blue);
}

.schedule-board-card.construction-card-soft {
  border-left: 5px solid #2f6fb3;
}

.schedule-card-main {
  display: grid;
  grid-template-columns: 42px minmax(240px, 1.5fr) minmax(150px, .8fr) minmax(160px, .8fr) minmax(180px, .9fr);
  width: 100%;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #ffffff 0%, #f7fbff 100%);
  color: var(--navy);
  text-align: left;
}

.schedule-card-main:hover {
  background: var(--blue-soft);
}

.schedule-card-main strong,
.schedule-card-main span,
.schedule-card-main small {
  display: block;
}

.schedule-card-main strong {
  font-size: 17px;
}

.schedule-card-main span,
.schedule-card-main small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.4;
}

.schedule-number {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.schedule-progress strong {
  color: var(--blue);
}

.schedule-stage-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  padding: 14px;
  background: #fbfdff;
}

.schedule-stage-chip {
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-soft);
}

.schedule-stage-chip strong,
.schedule-stage-chip span,
.schedule-stage-chip small {
  display: block;
}

.schedule-stage-chip strong {
  color: var(--navy);
  font-size: 14px;
}

.schedule-stage-chip span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.schedule-stage-chip small {
  margin-top: 5px;
  color: var(--blue);
  font-weight: 900;
}

.schedule-stage-chip.done {
  background: #edf7ff;
  border-color: #b8d6f5;
}

.schedule-stage-chip.done small {
  color: var(--blue);
}

.schedule-stage-chip.active {
  background: #e6f0ff;
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.schedule-stage-chip.soon {
  background: #edf3ff;
  border-color: #b8d6f5;
}

.schedule-stage-chip.late {
  background: #dbe7ff;
  border-color: #9eb6f0;
}

.schedule-stage-chip.late strong,
.schedule-stage-chip.late small {
  color: var(--blue);
}

.construction-track .schedule-stage-chip {
  background: #eef5ff;
}

.timeline-toolbar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto minmax(220px, 320px) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.timeline-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
}

.timeline-tabs button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.timeline-tabs button.active {
  background: var(--blue);
  color: #fff;
}

.timeline-tabs.compact button {
  min-width: 72px;
  padding: 0 10px;
}

.timeline-month-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.timeline-month-tools strong {
  min-width: 118px;
  color: var(--navy);
  text-align: center;
  font-size: 16px;
}

.timeline-project-picker {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.timeline-project-picker.is-muted {
  opacity: .55;
}

.timeline-view-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.design-timeline-shell,
.project-timeline-card {
  overflow-x: auto;
  scrollbar-gutter: stable;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.timeline-head-row,
.timeline-project-row,
.project-stage-row {
  display: grid;
  grid-template-columns: 280px max-content;
  min-width: max-content;
}

.timeline-head-row {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.timeline-left-head {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  border-right: 1px solid var(--line);
}

.timeline-grid {
  display: grid;
}

.timeline-days > div {
  min-height: 48px;
  padding: 7px 3px;
  border-right: 1px solid #e8eef8;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  font-weight: 900;
}

.timeline-days span,
.timeline-days strong {
  display: block;
}

.timeline-days strong {
  margin-top: 3px;
  color: var(--navy);
  font-size: 13px;
}

.timeline-days .today {
  background: #edf3ff;
  color: var(--blue);
}

.timeline-days .saturday {
  background: #f0f7ff;
  color: #1f5f99;
}

.timeline-days .sunday {
  background: #fff1f4;
  color: #b4234b;
}

.timeline-days .today.saturday,
.timeline-days .today.sunday {
  background: #dfeaff;
  color: var(--blue);
}

.timeline-project-list,
.project-stage-list {
  display: grid;
}

.timeline-project-row,
.project-stage-row {
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.timeline-project-row:last-child,
.project-stage-row:last-child {
  border-bottom: 0;
}

.timeline-project-info {
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 12px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  background: linear-gradient(90deg, #fff 0%, #f8fbff 100%);
  color: var(--navy);
  text-align: left;
}

.timeline-project-info strong,
.stage-row-info strong {
  font-size: 15px;
}

.timeline-project-info span,
.timeline-project-info small,
.stage-row-info span,
.stage-row-info small,
.project-timeline-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.timeline-lane {
  position: relative;
  align-items: center;
  padding: 16px 0;
  background: #fff;
}

.timeline-lane > i {
  grid-row: 1;
  display: block;
  min-height: 44px;
  border-right: 1px solid #edf2f8;
}

.timeline-lane > i.today-line,
.timeline-cell-button.today-line {
  background: #edf3ff;
  border-right-color: #9eb6f0;
}

.timeline-lane > i.saturday-line,
.timeline-cell-button.saturday-line {
  background: #f7fbff;
}

.timeline-lane > i.sunday-line,
.timeline-cell-button.sunday-line {
  background: #fff7f9;
}

.timeline-lane > i.today-line.saturday-line,
.timeline-lane > i.today-line.sunday-line,
.timeline-cell-button.today-line.saturday-line,
.timeline-cell-button.today-line.sunday-line {
  background: #edf3ff;
}

.timeline-cell-button {
  grid-row: 1;
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 0;
  border-right: 1px solid #edf2f8;
  border-radius: 0;
  background: #fff;
  color: transparent;
  font-size: 13px;
  font-weight: 900;
}

.timeline-cell-button:hover,
.timeline-cell-button:focus {
  color: var(--blue);
  background: #eef5ff;
  outline: 2px solid #b7dcff;
  outline-offset: -2px;
}

.timeline-cell-button.is-selected {
  z-index: 3;
  color: #fff;
  background: var(--blue);
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.timeline-cell-button.is-selected span::before {
  color: var(--blue);
}

.timeline-cell-button span {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: currentColor;
}

.timeline-cell-button span::before {
  content: "+";
  color: #fff;
}

.timeline-bar {
  grid-row: 1;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 28px;
  margin: 0 3px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  color: #0f2d5c;
  background: #b7dcff;
  box-shadow: 0 6px 16px rgba(20, 44, 134, .12);
  text-align: left;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
}

.timeline-bar.is-editing {
  pointer-events: none;
  opacity: .38;
}

.timeline-bar span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.timeline-bar.active {
  color: #fff;
  background: var(--blue);
}

.timeline-bar.done {
  color: #0f2d5c;
  background: #b7dcff;
}

.timeline-bar.late {
  color: #0f2d5c;
  background: #9fd0f5;
}

.construction-timeline-shell .timeline-days .today,
.construction-timeline-shell .timeline-lane > i.today-line {
  background: #edf3ff;
}

.construction-project-info {
  background: linear-gradient(90deg, #fff 0%, #f8fbff 100%);
}

.timeline-bar.construction-bar {
  color: #0f2d5c;
  background: #b7dcff;
}

.timeline-bar.construction-bar.active {
  color: #fff;
  background: var(--blue);
}

.timeline-bar.construction-bar.done {
  color: #0f2d5c;
  background: #b7dcff;
}

.timeline-bar.construction-bar.late {
  color: #0f2d5c;
  background: #9fd0f5;
}

.project-timeline-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.project-timeline-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.project-timeline-title strong,
.project-timeline-title span {
  display: block;
}

.project-timeline-title strong {
  color: var(--navy);
  font-size: 18px;
}

.stage-row-info {
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.timeline-inline-editor {
  display: grid;
  gap: 7px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #b7dcff;
  border-radius: 8px;
  background: #f4f9ff;
}

.timeline-inline-editor label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.timeline-inline-editor input {
  width: 100%;
  min-height: 34px;
}

.timeline-inline-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.timeline-stage-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 8px;
  margin-top: 4px;
}

.timeline-stage-edit label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.timeline-stage-edit input,
.timeline-stage-edit select {
  width: 100%;
  min-height: 34px;
}

.design-period-edit {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 96px;
}

.construction-process-edit {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 96px;
}

.schedule-card {
  min-height: 220px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-soft);
}

.schedule-card h3 {
  margin: 0 0 10px;
  color: var(--blue);
}

.schedule-card-list {
  display: grid;
  gap: 8px;
}

.schedule-card-list button {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 58px;
  padding: 10px;
  border: 1px solid #c8d8ff;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.schedule-card-list strong,
.schedule-card-list small {
  display: block;
  overflow-wrap: anywhere;
}

.schedule-card-list small {
  color: var(--muted);
}

.share-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-soft);
}

.share-tools strong,
.share-tools p {
  display: block;
}

.share-tools p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.share-tools small {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 9px;
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-weight: 900;
}

.import-data-button {
  display: inline-grid;
  place-items: center;
  position: relative;
  min-height: 42px;
}

.import-data-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.schedule-card-list .today-schedule {
  border-color: var(--red);
  color: var(--red);
  background: #fff1f0;
}

.schedule-card-list .today-schedule small {
  color: var(--red);
}

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

.calendar-day-name {
  padding: 8px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.calendar-cell {
  min-height: 124px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.empty-cell {
  background: #f8faff;
  border-style: dashed;
}

.today-cell {
  outline: 2px solid var(--blue);
}

.calendar-cell > strong {
  color: var(--blue);
}

.calendar-events {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.calendar-events button,
.calendar-events span {
  min-height: 24px;
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  color: var(--blue);
  background: var(--blue-soft);
  text-align: left;
  font-size: 12px;
  font-weight: 800;
}

.calendar-events .today-event {
  color: #fff;
  background: var(--red);
}

.alert,
.task,
.calendar-item {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-radius: 8px;
  background: #f6f9f8;
}

.alert.critical {
  background: #fff1f0;
  color: var(--red);
  border-left: 4px solid var(--red);
}

.alert.warning {
  background: #fff1f0;
  color: var(--red);
  border-left: 4px solid var(--red);
}

.alert strong,
.alert small {
  color: var(--red);
}

.alert strong,
.task strong,
.calendar-item strong {
  font-size: 15px;
}

.alert small,
.task small,
.calendar-item small {
  color: var(--muted);
  line-height: 1.45;
}

.project-table {
  display: grid;
  gap: 10px;
}

.project-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) 110px 120px 120px 110px 190px;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

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

.project-actions button {
  min-width: 82px;
}

.delete-folder-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #f2b6b6;
  border-radius: 8px;
  background: #fff3f3;
}

.delete-folder-box strong,
.delete-folder-box p {
  display: block;
}

.delete-folder-box p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.project-main strong {
  display: block;
  margin-bottom: 5px;
}

.project-main small,
.meta,
.empty {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
}

.badge.red {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge.amber {
  background: #e6eeff;
  color: var(--blue);
}

.badge.blue {
  background: #dce8ff;
  color: var(--blue);
}

.toolbar {
  margin-bottom: 16px;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.segmented button.active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

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

.file-grid {
  display: grid;
  gap: 18px;
}

.file-business-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.file-business-tabs button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--navy);
  font-weight: 900;
  cursor: pointer;
}

.file-business-tabs button.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.file-business-tabs strong {
  font-size: 22px;
}

.file-business-section {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.file-business-section.is-empty {
  opacity: 0.76;
}

.file-business-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 4px 8px;
  border-bottom: 2px solid var(--blue-mid);
}

.file-business-head h3 {
  color: var(--blue);
  font-size: 20px;
}

.file-business-head span {
  color: var(--muted);
  font-weight: 900;
}

.file-section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.file-card {
  display: grid;
  align-content: start;
  padding: 18px;
  min-height: 100%;
}

.file-card h3 {
  color: var(--navy);
  line-height: 1.35;
}

.file-card .meta {
  min-height: 42px;
  line-height: 1.5;
}

.file-card ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.file-card li {
  padding: 10px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--muted);
  font-weight: 700;
}

.file-as-summary {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.file-as-summary strong {
  color: var(--blue);
}

.file-as-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.modal {
  width: min(900px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.modal.large {
  width: min(1120px, calc(100vw - 28px));
}

.modal::backdrop {
  background: rgba(16, 36, 35, 0.46);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 20px 0;
}

.edit-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.crm-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

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

.employee-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.employee-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--navy);
  font-weight: 900;
}

.employee-summary span {
  color: var(--blue);
}

.crm-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.crm-row strong,
.crm-row small {
  display: block;
}

.crm-row small {
  margin-top: 5px;
  color: var(--muted);
}

.crm-row p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.wide {
  grid-column: span 3;
}

.modal-actions {
  justify-content: flex-end;
}

.edit-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.detail-grid > .panel:only-child {
  grid-column: 1 / -1;
}

.stage-list,
.process-list {
  display: grid;
  gap: 10px;
}

.stage-item,
.process-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 118px 150px 150px 130px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: var(--blue-soft);
}

.stage-date-readonly {
  display: grid;
  gap: 4px;
  min-height: 46px;
  align-content: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stage-date-readonly span,
.stage-confirmed-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.stage-date-readonly strong {
  color: var(--navy);
  font-size: 14px;
}

.stage-confirmed-date {
  display: grid;
  gap: 4px;
}

.stage-confirmed-date input {
  width: 100%;
}

.stage-file-tools {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.stage-site-meeting-tool {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #c8d8ff;
  border-radius: 8px;
  background: #fff;
}

.compact-head {
  margin-bottom: 0;
}

.compact-head h3 {
  margin: 0;
  color: var(--blue);
  font-size: 16px;
}

.mini-upload,
.file-drop {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px dashed #9eb6f0;
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-weight: 800;
}

.mini-upload input,
.file-drop input {
  width: 100%;
}

.mini-upload small,
.file-drop small,
.upload-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.stage-item input,
.process-item select,
.process-item input {
  min-height: 36px;
}

.process-item {
  grid-template-columns: minmax(220px, 1fr) 120px minmax(180px, 1fr) 150px;
}

.process-period-tool {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 150px 150px minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.memo-box {
  margin-top: 18px;
}

.summary-panel {
  margin-top: 18px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.summary-grid div {
  min-height: 76px;
  padding: 14px;
  border-radius: 8px;
  background: var(--blue-soft);
}

.summary-grid span,
.summary-grid strong {
  display: block;
}

.summary-grid span {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.setting-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-soft);
}

.setting-card h3 {
  margin-bottom: 8px;
  color: var(--blue);
}

.setting-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.setting-card strong {
  align-self: flex-start;
  min-width: 88px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  text-align: center;
  font-size: 13px;
}

.memo-box textarea {
  margin-top: 10px;
}

.upload-box {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.upload-head {
  display: grid;
  grid-template-columns: 1fr 180px;
  align-items: end;
  gap: 12px;
}

.uploaded-file-list {
  display: grid;
  gap: 10px;
}

.uploaded-file-list.compact {
  gap: 8px;
}

.uploaded-file {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.uploaded-file.has-image {
  grid-template-columns: auto 1fr auto;
}

.uploaded-image-thumb {
  display: grid;
  width: 92px;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.uploaded-image-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  background: #fff;
}

.uploaded-image-thumb span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
}

.uploaded-file strong,
.uploaded-file small {
  display: block;
}

.uploaded-file small {
  margin-top: 5px;
  color: var(--muted);
}

.uploaded-file details {
  margin-top: 8px;
}

.uploaded-file summary {
  color: var(--blue);
  cursor: pointer;
  font-weight: 800;
}

.uploaded-file pre {
  max-height: 180px;
  overflow: auto;
  padding: 10px;
  border-radius: 8px;
  background: var(--blue-soft);
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
}

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

.selected-image-preview {
  margin-top: -4px;
}

.image-preview-modal {
  width: min(980px, calc(100vw - 28px));
}

.image-preview-body {
  display: grid;
  place-items: center;
  padding-top: 14px;
}

.image-preview-body img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.danger-button {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--red);
  font-weight: 800;
}

.as-board {
  display: grid;
  gap: 12px;
}

.as-analysis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.as-analysis article {
  padding: 16px;
  border-radius: 8px;
  background: var(--blue-soft);
}

.as-analysis span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 900;
}

.as-analysis strong {
  color: var(--blue);
  font-size: 22px;
}

.as-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-soft);
}

.as-card-head {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 160px auto auto;
  align-items: end;
  gap: 12px;
}

.as-card h3 {
  margin-bottom: 6px;
  color: var(--blue);
}

.as-card p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.as-card h4 {
  margin-bottom: 10px;
  color: var(--navy);
}

.as-support-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 12px;
}

.as-support-grid > div,
.as-request {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.as-form .wide {
  grid-column: 1 / -1;
}

.as-form textarea {
  min-height: 82px;
}

.site-meeting-form {
  display: grid;
  grid-template-columns: 160px 150px 130px minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
}

.site-meeting-form .wide {
  grid-column: auto;
}

.site-meeting-form textarea {
  min-height: 74px;
}

.meeting-send-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 180px minmax(260px, 1.4fr);
  gap: 12px;
  align-items: end;
}

.meeting-send-form .edit-actions {
  align-items: end;
}

.site-meeting-list,
.shared-meeting-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.site-meeting-row,
.shared-meeting-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.site-meeting-actions.compact {
  min-width: 210px;
}

.site-meeting-row strong,
.site-meeting-row small,
.shared-meeting-row strong,
.shared-meeting-row small {
  display: block;
}

.site-meeting-row small,
.shared-meeting-row small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.site-meeting-row p {
  margin-top: 6px;
  color: var(--muted);
}

.shared-site-meetings {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.shared-site-meetings h5 {
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 15px;
}

.as-request-list,
.as-mini-list {
  display: grid;
  gap: 10px;
}

.as-request {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 90px auto auto;
  align-items: center;
  gap: 10px;
}

.as-request.done {
  background: var(--blue-soft);
}

.as-request strong,
.as-mini-row span {
  color: var(--navy);
  font-weight: 900;
}

.as-request small,
.as-mini-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-weight: 900;
}

.as-mini-row {
  width: 100%;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-soft);
  text-align: left;
  cursor: pointer;
}

.as-mini-row.static {
  cursor: default;
}

.construction-board,
.construction-process-list,
.daily-report-list {
  display: grid;
  gap: 12px;
}

.construction-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-soft);
}

.construction-card-head {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.construction-card h3,
.construction-card h4 {
  color: var(--blue);
}

.construction-card p {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.5;
}

.construction-card .red-text {
  color: var(--red);
  font-weight: 900;
}

.construction-layout {
  display: grid;
  grid-template-columns: minmax(420px, .9fr) minmax(520px, 1.1fr);
  gap: 14px;
}

.construction-layout > section,
.daily-report-list-wrap {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.construction-process-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(170px, 1fr) 140px 140px 120px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: var(--blue-soft);
}

.construction-process-row select,
.construction-process-row input {
  min-width: 0;
}

.construction-process-row strong,
.construction-process-row small {
  display: block;
}

.construction-process-row small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.daily-report-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.daily-report-head,
.daily-report-list-title {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.daily-report-head p,
.daily-report-list-title span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.daily-report-date-picker {
  min-width: 168px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.daily-report-date-tabs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-bottom: 4px;
  overflow-x: auto;
}

.daily-report-date-tabs button {
  display: grid;
  gap: 3px;
  min-width: 92px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--muted);
  text-align: left;
  font-weight: 900;
}

.daily-report-date-tabs button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.daily-report-date-tabs span {
  font-size: 12px;
}

.previous-daily-report {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.daily-report-output {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.daily-report-form .wide {
  grid-column: 1 / -1;
}

.daily-report-form textarea {
  min-height: 116px;
}

.compact-drop {
  min-height: 96px;
}

.daily-report {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.daily-report.compact {
  grid-template-columns: 1fr;
}

.daily-report strong,
.daily-report small {
  display: block;
}

.daily-report small {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 800;
}

.daily-report p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.daily-photo-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(86px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.daily-photo-thumb {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 104px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.daily-photo-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  background: #fff;
}

.daily-photo-thumb span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sms-button {
  min-height: 42px;
  text-align: center;
}

.construction-manager-box {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-soft);
}

.construction-manager-box strong,
.construction-manager-box p {
  display: block;
}

.construction-manager-box p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.file-open {
  margin-top: 12px;
}

.report-bar {
  margin-top: 12px;
}

.report-bar span {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.track {
  height: 12px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--blue-mid);
}

.track i {
  display: block;
  height: 100%;
  background: var(--teal);
}

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  body.print-design-schedule,
  body.print-construction-schedule {
    background: #fff;
  }

  body.print-design-schedule .app,
  body.print-construction-schedule .app {
    display: block;
  }

  body.print-design-schedule .sidebar,
  body.print-design-schedule .topbar,
  body.print-design-schedule .view,
  body.print-design-schedule dialog,
  body.print-construction-schedule .sidebar,
  body.print-construction-schedule .topbar,
  body.print-construction-schedule .view,
  body.print-construction-schedule dialog {
    display: none !important;
  }

  body.print-design-schedule #calendarView {
    display: block !important;
  }

  body.print-construction-schedule #constructionView {
    display: block !important;
  }

  body.print-design-schedule .main,
  body.print-construction-schedule .main {
    padding: 0;
  }

  body.print-design-schedule #calendarView > .panel:not(:first-child),
  body.print-design-schedule .timeline-toolbar,
  body.print-design-schedule .project-timeline-title button,
  body.print-design-schedule .timeline-cell-button,
  body.print-design-schedule .timeline-inline-editor,
  body.print-construction-schedule #constructionView > .panel:not(:first-child),
  body.print-construction-schedule .timeline-toolbar,
  body.print-construction-schedule .project-timeline-title button,
  body.print-construction-schedule .timeline-cell-button,
  body.print-construction-schedule .timeline-inline-editor {
    display: none !important;
  }

  body.print-design-schedule .panel,
  body.print-design-schedule .design-timeline-shell,
  body.print-design-schedule .project-timeline-card,
  body.print-construction-schedule .panel,
  body.print-construction-schedule .design-timeline-shell,
  body.print-construction-schedule .project-timeline-card {
    border: 1px solid #d7e1ef;
    box-shadow: none;
    overflow: visible;
  }

  body.print-design-schedule .timeline-head-row,
  body.print-design-schedule .timeline-project-row,
  body.print-design-schedule .project-stage-row,
  body.print-construction-schedule .timeline-head-row,
  body.print-construction-schedule .timeline-project-row,
  body.print-construction-schedule .project-stage-row {
    break-inside: avoid;
  }
}

@media (max-width: 1120px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .side-nav {
    grid-template-columns: repeat(6, 1fr);
  }

  .kpi-grid,
  .category-grid,
  .file-business-tabs,
  .as-analysis,
  .file-section-grid,
  .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-row {
    grid-template-columns: 1fr 100px 110px 190px;
  }

  .project-row .hide-md {
    display: none;
  }

  .daily-photo-list {
    grid-template-columns: repeat(3, minmax(86px, 1fr));
  }

  .timeline-toolbar {
    grid-template-columns: 1fr;
  }

  .timeline-month-tools {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  body {
    display: block;
    overflow-x: hidden;
  }

  button,
  input,
  select,
  textarea {
    font-size: 16px;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.16);
  }

  .brand {
    margin-bottom: 12px;
  }

  .brand-logo {
    width: 132px;
    max-width: 70vw;
    height: auto;
  }

  .side-nav {
    display: flex;
    gap: 8px;
    margin: 0 -4px 12px;
    overflow-x: auto;
    padding: 0 4px 6px;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
    min-width: 92px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    text-align: center;
    white-space: nowrap;
  }

  .sidebar .primary.full {
    min-height: 46px;
  }

  .app {
    padding: 18px 14px 42px;
  }

  .topbar,
  .top-actions,
  .split,
  .detail-grid {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

  #searchInput {
    width: 100%;
  }

  .kpi-grid,
  .category-grid,
  .file-business-tabs,
  .as-analysis,
  .schedule-summary-grid,
  .month-calendar,
  .file-section-grid,
  .report-grid,
  .settings-grid,
  .summary-grid,
  .edit-form,
  .crm-form,
  .as-form,
  .site-meeting-form,
  .meeting-send-form,
  .daily-report-form,
  .timeline-toolbar,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: auto;
  }

  .project-row,
  .stage-item,
  .process-item,
  .process-period-tool,
  .uploaded-file,
  .project-actions,
  .delete-folder-box,
  .upload-head,
  .site-status-grid,
  .crm-row,
  .as-card-head,
  .as-support-grid,
  .as-request,
  .as-card,
  .site-meeting-row,
  .shared-meeting-row,
  .site-meeting-actions,
  .construction-card-head,
  .construction-layout,
  .construction-process-row,
  .schedule-card-main,
  .share-tools,
  .daily-report,
  .construction-manager-box,
  .meeting-row,
  .site-row {
    grid-template-columns: 1fr;
  }

  .calendar-cell {
    min-height: auto;
  }

  .timeline-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .timeline-head-row,
  .timeline-project-row,
  .project-stage-row {
    grid-template-columns: 220px minmax(760px, 1fr);
  }

  .timeline-grid {
    min-width: 760px;
  }

  .daily-photo-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel {
    padding: 16px;
  }

  .panel-head {
    align-items: flex-start;
    gap: 8px;
    flex-direction: column;
  }

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

  .schedule-card-main {
    padding: 14px;
  }

  .schedule-number {
    width: 30px;
    height: 30px;
  }

  .month-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(118px, 1fr));
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 18px;
  }

  .modal-head {
    align-items: flex-start;
    gap: 10px;
  }

  .file-business-tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .file-business-tabs button {
    flex: 0 0 136px;
  }
}

@media (max-width: 430px) {
  .app {
    padding: 14px 10px 36px;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 21px;
  }

  .top-actions {
    gap: 8px;
  }

  .top-actions .primary,
  .top-actions .ghost,
  .primary.full {
    width: 100%;
  }

  .daily-photo-list {
    grid-template-columns: 1fr;
  }
}
