body[data-page="dashboard"] {
  padding: 18px;
}

.staff-app {
  width: min(1480px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
}

.staff-sidebar,
.section-card,
.summary-card,
.mini-panel,
.day-card,
.mission-card,
.training-item {
  background: rgba(255, 252, 247, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 16px 48px rgba(36, 27, 22, 0.08);
}

.staff-sidebar {
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 36px);
  position: sticky;
  top: 18px;
}

.staff-brand-kicker,
.staff-kicker,
.section-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--brand-dark);
}

.staff-brand h1,
.staff-header h2 {
  margin: 0;
  line-height: 0.94;
}

.staff-brand h1 {
  font-size: clamp(34px, 4vw, 48px);
}

.staff-brand p:last-child {
  color: var(--muted);
  line-height: 1.6;
}

.staff-nav {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.staff-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  text-align: left;
  border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.staff-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(185, 45, 28, 0.12);
  color: #b92d1c;
  font-size: 11px;
  font-weight: 900;
}

.staff-nav-badge.is-hidden {
  display: none;
}

.staff-nav-link.is-active {
  background: linear-gradient(135deg, rgba(212, 85, 30, 0.16) 0%, rgba(143, 53, 16, 0.12) 100%);
  border-color: rgba(212, 85, 30, 0.22);
}

.staff-sidebar-footer {
  margin-top: auto;
}

.staff-main {
  display: grid;
  gap: 18px;
}

.staff-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 16px 4px 0;
}

.user-badge {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.8);
  border: 1px solid var(--line);
}

.user-badge span,
.summary-card small,
.mini-panel p,
.mission-card p,
.training-item p,
.training-item small,
.section-note,
.notes-label {
  color: var(--muted);
}

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

.summary-grid-inline {
  margin-bottom: 14px;
}

.summary-card {
  padding: 18px 20px;
  border-radius: 20px;
}

.summary-card strong {
  display: block;
  font-size: 30px;
}

.summary-card span {
  display: block;
  margin-top: 6px;
  font-weight: 800;
}

.staff-sections {
  display: grid;
}

.section-card {
  border-radius: 28px;
  padding: 24px;
}

.section-card.is-hidden {
  display: none;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 18px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: end;
}

.filter-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.filter-chip.is-active {
  background: rgba(212, 85, 30, 0.12);
  border-color: rgba(212, 85, 30, 0.22);
  color: var(--ink);
}

.date-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.date-input {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.section-head h3 {
  margin: 0;
  font-size: 28px;
}

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

.overview-stack {
  margin-top: 14px;
}

.agenda-panel {
  margin-bottom: 14px;
  border: 1px solid rgba(212, 85, 30, 0.2);
  background: linear-gradient(135deg, rgba(212, 85, 30, 0.12) 0%, rgba(255, 252, 247, 0.96) 100%);
}

.reminders-panel {
  margin-bottom: 14px;
}

.reminders-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.reminders-panel-head h4,
.reminders-panel-head p {
  margin: 0;
}

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

.reminder-item {
  display: flex;
  gap: 10px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.reminder-item-main {
  display: grid;
  gap: 4px;
  flex: 1;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.reminder-item strong {
  color: var(--ink);
}

.reminder-item span {
  color: var(--muted);
}

.reminder-dismiss {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}

.reminder-item.severity-high {
  background: rgba(185, 45, 28, 0.05);
  border-color: rgba(185, 45, 28, 0.18);
}

.reminder-item.severity-medium {
  background: rgba(168, 100, 0, 0.05);
  border-color: rgba(168, 100, 0, 0.16);
}

.reminder-item.severity-low {
  background: rgba(31, 92, 168, 0.05);
  border-color: rgba(31, 92, 168, 0.14);
}

.mini-panel,
.mission-card,
.training-item {
  border-radius: 20px;
  padding: 18px;
}

.notice-card {
  cursor: pointer;
}

.notice-card.is-unread {
  border-color: rgba(212, 85, 30, 0.24);
  box-shadow: 0 0 0 2px rgba(212, 85, 30, 0.05);
}

.notice-card-urgent,
.notice-highlight.urgent {
  border-color: rgba(185, 45, 28, 0.24);
  background: rgba(185, 45, 28, 0.04);
}

.notice-highlight {
  margin-bottom: 14px;
}

.chat-shell {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 1px 1px, rgba(168, 100, 0, 0.08) 1px, transparent 0) 0 0 / 22px 22px,
    linear-gradient(180deg, #efe7da 0%, #e8dece 100%);
  border: 1px solid var(--line);
}

.chat-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}

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

.chat-message {
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 18px 18px 18px 8px;
  border: 1px solid rgba(36, 27, 22, 0.08);
  background: #fffdf8;
  box-shadow: 0 8px 18px rgba(36, 27, 22, 0.08);
}

.chat-message.is-mine {
  margin-left: auto;
  background: #dcf8c6;
  border-color: rgba(22, 117, 71, 0.14);
  border-radius: 18px 18px 8px 18px;
}

.chat-message-pinned {
  border-color: rgba(168, 100, 0, 0.24);
  background: rgba(168, 100, 0, 0.05);
}

.chat-message-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.chat-message-meta span {
  color: var(--muted);
  font-size: 12px;
}

.chat-message p {
  margin: 0;
}

.chat-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(36, 27, 22, 0.06);
}

.chat-input {
  min-height: 100px;
}

.chat-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.mini-panel h4 {
  margin: 0 0 10px;
}

.mini-panel ul {
  margin: 0;
  padding-left: 18px;
}

.inline-link {
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  font-weight: 800;
  padding: 0;
  cursor: pointer;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(36, 27, 22, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.status-chip.ok,
.status-chip.completed {
  background: rgba(22, 117, 71, 0.14);
  color: var(--ok);
}

.status-chip.warn,
.status-chip.in_progress {
  background: rgba(168, 100, 0, 0.14);
  color: var(--progress);
}

.status-chip.assigned,
.status-chip.muted {
  background: rgba(31, 92, 168, 0.14);
  color: var(--pending);
}

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

.checklist-group h4 {
  margin: 0 0 10px;
}

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

.check-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.check-item.info {
  align-items: flex-start;
}

.check-item.interactive {
  cursor: pointer;
  align-items: center;
}

.check-item.interactive input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.check-item.interactive.is-done {
  background: rgba(22, 117, 71, 0.08);
  border-color: rgba(22, 117, 71, 0.16);
}

.check-item-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(212, 85, 30, 0.1);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.checklist-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.notes-label {
  display: block;
  margin-top: 18px;
  margin-bottom: 8px;
  font-weight: 700;
}

.notes-area {
  width: 100%;
  min-height: 120px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  resize: vertical;
}

.mission-list,
.training-list {
  display: grid;
  gap: 12px;
}

.training-block {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(36, 27, 22, 0.04);
  border: 1px solid var(--line);
}

.training-block h4 {
  margin: 0 0 8px;
}

.training-block ol,
.training-block ul {
  margin: 0;
  padding-left: 18px;
}

.training-inline-note {
  margin-top: 12px;
}

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

.attendance-panel p {
  margin-bottom: 8px;
  font-size: 28px;
  font-weight: 900;
  color: var(--ink);
}

.attendance-panel-primary p {
  font-size: 16px;
  font-weight: 500;
}

.attendance-detail-grid {
  align-items: start;
}

.attendance-breakdown {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.attendance-breakdown-month {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 6px;
}

.attendance-day-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}

.stack-form {
  display: grid;
  gap: 10px;
}

.field-input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.attendance-corrections {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.mission-meta,
.training-item-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.mission-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.mission-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(36, 27, 22, 0.06);
  font-size: 12px;
  font-weight: 700;
}

.mission-tags-actions {
  margin-top: 12px;
}

.alert-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.alert-card.severity-high,
.alert-row.severity-high,
.alert-card.severity-critical,
.alert-row.severity-critical {
  border-color: rgba(185, 45, 28, 0.22);
  background: rgba(185, 45, 28, 0.04);
}

.alert-card.severity-medium,
.alert-row.severity-medium {
  border-color: rgba(168, 100, 0, 0.2);
  background: rgba(168, 100, 0, 0.04);
}

.alert-card.severity-low,
.alert-row.severity-low {
  border-color: rgba(31, 92, 168, 0.2);
  background: rgba(31, 92, 168, 0.04);
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
}

.status-banner {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.status-banner-ok {
  background: rgba(22, 117, 71, 0.08);
  border-color: rgba(22, 117, 71, 0.14);
}

.status-banner strong {
  color: var(--ink);
}

.status-banner span,
.status-banner p {
  margin: 0;
  color: var(--muted);
}

.shift-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 320px;
  gap: 16px;
}

.calendar-shell,
.team-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  background: #fffdfa;
}

.range-switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(36, 27, 22, 0.06);
  border: 1px solid var(--line);
}

.range-switch-button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.range-switch-button.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(36, 27, 22, 0.08);
}

.calendar-date-grid {
  display: grid;
  gap: 10px;
}

.calendar-date-grid.is-week {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-date-grid.is-month {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.calendar-date-card {
  min-height: 148px;
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
}

.calendar-date-card.is-today {
  border-color: rgba(212, 85, 30, 0.34);
  box-shadow: 0 0 0 2px rgba(212, 85, 30, 0.08);
}

.calendar-date-head {
  padding: 10px 12px 8px;
  background: rgba(36, 27, 22, 0.03);
}

.calendar-date-head span,
.calendar-date-head small {
  display: block;
  color: var(--muted);
}

.calendar-date-head span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.calendar-date-head strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
  line-height: 1;
}

.calendar-date-body {
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.calendar-event {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(212, 85, 30, 0.08);
  border: 1px solid rgba(212, 85, 30, 0.12);
}

.calendar-event strong,
.team-card strong {
  display: block;
}

.calendar-empty,
.team-card small,
.team-panel-head small,
.phone-missing {
  color: var(--muted);
}

.calendar-event strong {
  font-size: 14px;
  line-height: 1.25;
}

.calendar-empty {
  font-weight: 700;
  font-size: 14px;
}

.team-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.team-panel-head h4 {
  margin: 0;
}

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

.team-card {
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.team-card.is-me {
  border-color: rgba(212, 85, 30, 0.28);
}

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

.team-card-actions {
  margin-top: 12px;
}

.phone-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

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

  .staff-sidebar {
    min-height: auto;
    position: static;
  }

  .summary-grid,
  .overview-grid,
  .operations-grid,
  .checklist-columns {
    grid-template-columns: 1fr 1fr;
  }

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

  .calendar-date-grid.is-week,
  .calendar-date-grid.is-month {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body[data-page="dashboard"] {
    padding: 12px;
  }

  .summary-grid,
  .overview-grid,
  .operations-grid,
  .checklist-columns {
    grid-template-columns: 1fr;
  }

  .staff-header,
  .section-head,
  .mission-meta,
  .training-item-top,
  .team-card-top {
    flex-direction: column;
    align-items: start;
  }

  .calendar-date-grid.is-week,
  .calendar-date-grid.is-month {
    grid-template-columns: 1fr;
  }

  .calendar-date-card {
    min-height: auto;
  }

  .calendar-date-head strong {
    font-size: 16px;
  }

  .calendar-event strong {
    font-size: 13px;
  }
}
