/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7fb;
  color: #1f2430;
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.btn {
  display: inline-block;
  background: #007aff;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
  text-align: center;
}

.btn.secondary {
  background: #e9eef7;
  color: #1f2430;
}

.muted {
  color: #6b7280;
}

.topbar {
  width: 100%;
  background: linear-gradient(90deg, #007aff, #34c759);
  color: #ffffff;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  gap: 12px;
}

.topbar .brand {
  font-weight: 700;
  letter-spacing: -0.2px;
}

.topbar-menu {
  position: relative;
}

.topbar-menu summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
}

.topbar-menu[open] summary {
  text-decoration: underline;
}

.topbar-menu .menu-items {
  position: absolute;
  right: 0;
  margin-top: 10px;
  min-width: 200px;
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  padding: 6px 0;
  z-index: 20;
}

.topbar-menu .menu-items a {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: #111827;
  font-weight: 600;
}

.topbar-menu .menu-items a:hover {
  background: #f3f4f6;
}

.topbar-menu .menu-items .menu-button-form {
  margin: 0;
}

.topbar-menu .menu-items .menu-button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  background: none;
  border: none;
  color: #111827;
  font-weight: 600;
  cursor: pointer;
}

.topbar-menu .menu-items .menu-button:hover {
  background: #f3f4f6;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
}

.signed-in-as {
  font-weight: 600;
}

.flash {
  margin: 12px auto;
  width: min(1100px, 92%);
  height: auto;
  overflow: visible;
}

.flash .notice {
  background: #e7f6ef;
  color: #1a7f4b;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.flash .alert {
  background: #fdecec;
  color: #b42318;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}

.badge--emergency {
  background: #f97316;
}

.badge--routine {
  background: #0ea5e9;
}

.btn--auto {
  width: auto;
}

.btn--sm {
  padding: 6px 10px;
}

.btn--danger {
  background: #fee2e2;
  color: #b91c1c;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  box-sizing: border-box;
}

.form-control--sm {
  padding: 8px 10px;
  border-radius: 8px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
}

.form-label--sm {
  margin-bottom: 4px;
}

.form-hint {
  font-size: 12px;
  margin-top: 6px;
  color: #6b7280;
}

.form-hint--sm {
  font-size: 13px;
  margin-top: 6px;
  color: #6b7280;
}

.nav-inline {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.table--tight th,
.table--tight td {
  padding: 6px 4px;
}

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

.table--review th,
.table--review td {
  padding: 8px;
}

.row-divider {
  border-bottom: 1px solid #f1f5f9;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 50;
  align-items: center;
  justify-content: center;
}

.modal.open {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  width: 90%;
  max-width: 720px;
  max-height: 80vh;
  overflow: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: none;
  font-size: 20px;
  cursor: pointer;
}

.u-m-0 { margin: 0; }
.u-mx-auto { margin-left: auto; margin-right: auto; }
.u-my-32 { margin-top: 32px; margin-bottom: 32px; }
.u-mb-4 { margin-bottom: 4px; }
.u-mb-6 { margin-bottom: 6px; }
.u-mb-8 { margin-bottom: 8px; }
.u-mb-10 { margin-bottom: 10px; }
.u-mb-12 { margin-bottom: 12px; }
.u-mb-14 { margin-bottom: 14px; }
.u-mb-16 { margin-bottom: 16px; }
.u-mb-18 { margin-bottom: 18px; }
.u-mb-20 { margin-bottom: 20px; }
.u-mt-4 { margin-top: 4px; }
.u-mt-6 { margin-top: 6px; }
.u-mt-8 { margin-top: 8px; }
.u-mt-10 { margin-top: 10px; }
.u-mt-12 { margin-top: 12px; }
.u-mt-14 { margin-top: 14px; }
.u-mt-16 { margin-top: 16px; }
.u-mt-18 { margin-top: 18px; }
.u-w-full { width: 100%; }
.u-w-auto { width: auto; }
.u-w-360 { width: 360px; }
.u-maxw-320 { max-width: 320px; }
.u-maxw-360 { max-width: 360px; }
.u-maxw-420 { max-width: 420px; }
.u-maxw-720 { max-width: 720px; }
.u-maxw-780 { max-width: 780px; }
.u-maxw-900 { max-width: 900px; }
.u-maxw-920 { max-width: 920px; }
.u-maxw-1100 { max-width: 1100px; }
.u-text-12 { font-size: 12px; }
.u-text-13 { font-size: 13px; }
.u-text-18 { font-size: 18px; }
.u-text-20 { font-size: 20px; }
.u-text-22 { font-size: 22px; }
.u-font-700 { font-weight: 700; }
.u-text-center { text-align: center; }
.u-text-right { text-align: right; }
.u-flex { display: flex; }
.u-flex-wrap { flex-wrap: wrap; }
.u-items-center { align-items: center; }
.u-items-end { align-items: flex-end; }
.u-justify-between { justify-content: space-between; }
.u-justify-end { justify-content: flex-end; }
.u-gap-8 { gap: 8px; }
.u-gap-10 { gap: 10px; }
.u-gap-12 { gap: 12px; }
.u-gap-14 { gap: 14px; }
.u-gap-16 { gap: 16px; }
.u-grid { display: grid; }
.u-grid-auto-220 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.u-grid-auto-240 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.u-grid-auto-260 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.u-grid-auto-280 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.u-grid-auto-320 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.u-grid-auto-180 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.u-self-end { align-self: flex-end; }
.u-pre-wrap { white-space: pre-wrap; }
.u-nowrap { white-space: nowrap; }
.u-valign-top { vertical-align: top; }
.u-border { border: 1px solid #e5e7eb; }
.u-rounded-8 { border-radius: 8px; }
.u-rounded-10 { border-radius: 10px; }
.u-rounded-12 { border-radius: 12px; }
.u-ml-12 { margin-left: 12px; }
.u-flex-1 { flex: 1; }
.u-pl-16 { padding-left: 16px; }
.u-col-span-full { grid-column: 1 / -1; }
.u-p-6-4 { padding: 6px 4px; }
.u-p-8 { padding: 8px; }
.u-p-8-10 { padding: 8px 10px; }
.u-p-10-6 { padding: 10px 6px; }
.u-p-10-12 { padding: 10px 12px; }
.u-p-12 { padding: 12px; }
.u-p-12-14 { padding: 12px 14px; }
.u-p-14 { padding: 14px; }
.u-my-12 { margin-top: 12px; margin-bottom: 12px; }
.u-my-14 { margin-top: 14px; margin-bottom: 14px; }
.u-hidden { display: none; }
.u-justify-center { justify-content: center; }
.u-text-14 { font-size: 14px; }
.u-break-all { word-break: break-all; }
.u-mono { font-family: monospace; }
.u-shadow-lg { box-shadow: 0 12px 36px rgba(0,0,0,0.2); }
.u-p-16 { padding: 16px; }
.u-minh-260 { min-height: 260px; }

.alert-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.alert-box__list {
  margin: 8px 0 0 18px;
  padding: 0;
}

.divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 16px 0;
}

.mfa-secret-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.modal--dark {
  background: rgba(0, 0, 0, 0.55);
}

.survey-shell {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 18px;
}

.survey-empty {
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.survey-empty-text {
  font-size: 13px;
  color: #475569;
}

.survey-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
}

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

.survey-panel {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.survey-panel--compact {
  padding: 10px;
}

.survey-panel--padded {
  padding: 16px;
}

.survey-heading {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.survey-shift-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.survey-shift-link {
  text-decoration: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  display: block;
}

.survey-shift-link.is-selected {
  border-color: #4f46e5;
  background: #eef2ff;
}

.survey-shift-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.survey-shift-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.survey-shift-date {
  font-size: 11px;
  color: #64748b;
}

.survey-shift-time {
  font-size: 12px;
  color: #475569;
  margin-top: 2px;
}

.survey-status {
  font-size: 11px;
  margin-top: 4px;
}

.survey-status.is-skipped {
  color: #b45309;
}

.survey-status.is-pending {
  color: #4338ca;
}

.survey-detail-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2px;
}

.survey-detail-date {
  font-size: 13px;
  color: #475569;
}

.survey-detail-note {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.admin-flash {
  padding: 10px 12px;
  margin: 12px 0;
  border: 1px solid;
}

.admin-flash--notice {
  background: #ecfeff;
  border-color: #99f6e4;
}

.admin-flash--alert {
  background: #fef2f2;
  border-color: #fecaca;
}

.test-lab-section {
  margin-bottom: 24px;
}

.test-lab-field {
  margin-bottom: 10px;
}

.test-lab-note {
  margin-top: 8px;
  color: #6b7280;
}

.test-lab-panel {
  border: 1px solid #e5e7eb;
  padding: 10px;
  margin-bottom: 12px;
}

.test-lab-error {
  color: #b91c1c;
}

.test-lab-pre {
  background: #f9fafb;
  padding: 8px;
  white-space: pre-wrap;
}

.violence-card {
  border: 1px solid;
}

.violence-card.is-danger {
  border-color: #ef4444;
}

.violence-card.is-safe {
  border-color: #22c55e;
}

.violence-text {
  font-size: 18px;
  font-weight: 700;
}

.violence-card.is-danger .violence-text {
  color: #ef4444;
}

.violence-card.is-safe .violence-text {
  color: #22c55e;
}

.analysis-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.analysis-item {
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}

.analysis-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.analysis-body {
  white-space: pre-wrap;
}

.review-summary {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.chartkick-h-220 { height: 220px; }
.chartkick-h-240 { height: 240px; }
.chartkick-h-300 { height: 300px; }
.chartkick-w-full { width: 100%; }
.chartkick-text-center { text-align: center; }

.recipient-picker-list {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.recipient-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e5e7eb;
  color: #111827;
  border-radius: 9999px;
  padding: 4px 10px;
  font-size: 13px;
}

.recipient-chip-remove {
  border: 0;
  background: transparent;
  color: #374151;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.token-source-select {
  display: none !important;
}

.impersonation-banner {
  margin: 10px auto 0;
  width: min(1100px, calc(100% - 24px));
  border: 1px solid #f59e0b;
  background: #fffbeb;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.impersonation-banner__button {
  border: 1px solid #92400e;
  background: #f59e0b;
  color: #111827;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 600;
}
