/**
 * Check-in / Check-out screen — Tissue brand theme (presentation only)
 * Matches Dashboard: Soft Blue #F0F7FF, 24px cards, pastel buttons
 */
body.mt-tissue-brand #s-checkin {
  background: transparent;
  color: var(--mt-tissue-text, #3d4f63);
}

body.mt-tissue-brand #s-checkin .hdr {
  background: rgba(240, 247, 255, 0.88);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--mt-tissue-shadow-sm, 0 8px 28px -6px rgba(90, 159, 212, 0.14));
}

body.mt-tissue-brand #s-checkin .hdr h2 {
  color: var(--mt-tissue-navy, #1e3a5f);
}

body.mt-tissue-brand #s-checkin .hdr-sub {
  color: var(--mt-tissue-blue-500, #5a9fd4);
}

body.mt-tissue-brand #s-checkin .hdr-back {
  background: rgba(255, 255, 255, 0.82);
  border-radius: 14px;
  color: var(--mt-tissue-blue-700, #2c5282);
  box-shadow: var(--mt-tissue-shadow-sm);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.mt-tissue-brand #s-checkin .ci-page {
  padding: 16px 16px 80px;
  box-sizing: border-box;
}

/* Cards */
body.mt-tissue-brand #s-checkin .ci-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 247, 255, 0.82) 100%);
  border-radius: 24px;
  border: none;
  box-shadow: var(--mt-tissue-shadow-md);
  padding: 18px;
  margin-bottom: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.mt-tissue-brand #s-checkin .ci-card__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--mt-tissue-blue-500, #5a9fd4);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

body.mt-tissue-brand #s-checkin #ci-status-content {
  font-size: 14px;
  color: var(--mt-tissue-muted, #6b7f94);
  line-height: 1.5;
}

body.mt-tissue-brand #s-checkin .ci-status-ok {
  color: #3d8b5a;
  font-weight: 600;
}

body.mt-tissue-brand #s-checkin .ci-status-info {
  color: var(--mt-tissue-blue-700, #2c5282);
  font-weight: 600;
}

body.mt-tissue-brand #s-checkin .ci-status-warn {
  color: #c45c5c;
  font-weight: 600;
}

body.mt-tissue-brand #s-checkin .ci-status-muted {
  color: var(--mt-tissue-muted, #6b7f94);
}

body.mt-tissue-brand #s-checkin .ci-status-sub {
  font-size: 12px;
  color: var(--mt-tissue-muted, #6b7f94);
  margin-top: 4px;
}

body.mt-tissue-brand #s-checkin .ci-status-sub.ci-status-info {
  font-size: 11px;
  color: var(--mt-tissue-blue-500, #5a9fd4);
}

body.mt-tissue-brand #s-checkin .ci-status-sub.ci-status-ok {
  font-size: 11px;
  color: #3d8b5a;
}

body.mt-tissue-brand #s-checkin .ci-status-sub.ci-status-warn {
  font-size: 11px;
  color: #c45c5c;
}

body.mt-tissue-brand #s-checkin .ci-status-gap {
  margin-top: 4px;
}

/* Form fields */
body.mt-tissue-brand #s-checkin .ci-field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--mt-tissue-muted, #6b7f94);
  margin-bottom: 12px;
}

body.mt-tissue-brand #s-checkin .ci-field,
body.mt-tissue-brand #s-checkin #ci-store-search,
body.mt-tissue-brand #s-checkin #ci-store-sel,
body.mt-tissue-brand #s-checkin #ci-other-store-sel,
body.mt-tissue-brand #s-checkin #ci-offroute-inp,
body.mt-tissue-brand #s-checkin #ci-remark-inp {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 10px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--mt-tissue-shadow-sm);
  color: var(--mt-tissue-text, #3d4f63);
}

body.mt-tissue-brand #s-checkin .ci-field:focus,
body.mt-tissue-brand #s-checkin #ci-store-search:focus,
body.mt-tissue-brand #s-checkin #ci-store-sel:focus,
body.mt-tissue-brand #s-checkin #ci-other-store-sel:focus,
body.mt-tissue-brand #s-checkin #ci-offroute-inp:focus,
body.mt-tissue-brand #s-checkin #ci-remark-inp:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(143, 193, 232, 0.28), var(--mt-tissue-shadow-sm);
}

body.mt-tissue-brand #s-checkin #ci-remark-inp {
  resize: none;
  min-height: 72px;
}

/* Other-store panel */
body.mt-tissue-brand #s-checkin .ci-other-panel {
  margin-bottom: 10px;
  padding: 14px;
  background: rgba(240, 247, 255, 0.65);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.mt-tissue-brand #s-checkin .ci-other-panel__title {
  font-size: 11px;
  color: var(--mt-tissue-blue-700, #2c5282);
  margin-bottom: 8px;
  font-weight: 700;
}

body.mt-tissue-brand #s-checkin .ci-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

body.mt-tissue-brand #s-checkin .ci-mode-btn {
  padding: 11px 8px;
  border: none;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--mt-tissue-muted, #6b7f94);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--mt-tissue-shadow-sm);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

body.mt-tissue-brand #s-checkin .ci-mode-btn--active {
  background: linear-gradient(145deg, #dceefb 0%, #b8d9f2 100%);
  color: var(--mt-tissue-blue-700, #2c5282);
  box-shadow: 0 6px 18px -4px rgba(90, 159, 212, 0.28);
}

body.mt-tissue-brand #s-checkin .ci-hint {
  font-size: 10px;
  color: #d4846a;
  line-height: 1.45;
}

body.mt-tissue-brand #s-checkin .ci-remark-label {
  font-size: 11px;
  color: var(--mt-tissue-blue-700, #2c5282);
  display: block;
  margin-bottom: 6px;
}

body.mt-tissue-brand #s-checkin .ci-remark-required {
  color: #c45c5c;
}

/* Photo box */
body.mt-tissue-brand #s-checkin .ci-photo-box {
  margin-bottom: 12px;
  padding: 16px;
  background: rgba(240, 247, 255, 0.55);
  border-radius: 20px;
  border: 2px dashed rgba(143, 193, 232, 0.55);
  text-align: center;
}

body.mt-tissue-brand #s-checkin .ci-photo-box__title {
  font-size: 11px;
  color: var(--mt-tissue-blue-700, #2c5282);
  margin-bottom: 8px;
  font-weight: 700;
}

body.mt-tissue-brand #s-checkin .ci-photo-box__icon {
  font-size: 36px;
  opacity: 0.35;
  margin: 6px 0;
}

body.mt-tissue-brand #s-checkin .ci-photo-box__hint {
  font-size: 10px;
  color: var(--mt-tissue-muted, #6b7f94);
  margin-bottom: 4px;
}

body.mt-tissue-brand #s-checkin #ci-photo-preview {
  max-width: 100%;
  max-height: 180px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: var(--mt-tissue-shadow-sm);
}

/* Active / warn banners */
body.mt-tissue-brand #s-checkin .ci-active-banner {
  margin-bottom: 10px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(220, 238, 251, 0.9) 0%, rgba(184, 217, 242, 0.45) 100%);
  border-radius: 20px;
  box-shadow: var(--mt-tissue-shadow-sm);
}

body.mt-tissue-brand #s-checkin .ci-active-banner__title {
  font-size: 12px;
  font-weight: 700;
  color: #3d8b5a;
  margin-bottom: 4px;
}

body.mt-tissue-brand #s-checkin .ci-active-banner__detail {
  font-size: 12px;
  color: var(--mt-tissue-text, #3d4f63);
  line-height: 1.5;
}

body.mt-tissue-brand #s-checkin .ci-warn-banner {
  margin-bottom: 10px;
  padding: 14px;
  background: linear-gradient(145deg, #fdf2f6 0%, #f9e0ea 100%);
  border-radius: 20px;
  font-size: 12px;
  color: #b85c6e;
  line-height: 1.5;
  box-shadow: var(--mt-tissue-shadow-sm);
}

/* Action buttons */
body.mt-tissue-brand #s-checkin .ci-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

body.mt-tissue-brand #s-checkin .ci-btn-row .btn-primary {
  border-radius: 999px !important;
  font-weight: 700;
  font-size: 13px;
  padding: 13px 10px;
  border: none !important;
  box-shadow: var(--mt-tissue-shadow-sm) !important;
}

body.mt-tissue-brand #s-checkin #ci-checkin-btn {
  background: linear-gradient(145deg, #c8e6d4 0%, #8fd4a8 50%, #6bc48a 100%) !important;
  color: #1e4d32 !important;
}

body.mt-tissue-brand #s-checkin #ci-checkout-btn {
  background: linear-gradient(145deg, #dceefb 0%, #8fc1e8 50%, #5a9fd4 100%) !important;
  color: #1e3a5f !important;
}

body.mt-tissue-brand #s-checkin .ci-btn-row .btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* GPS status */
body.mt-tissue-brand #s-checkin #ci-gps-status {
  display: block;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 12px;
  text-align: center;
  box-shadow: var(--mt-tissue-shadow-sm);
}

body.mt-tissue-brand #s-checkin #ci-gps-status.ci-gps--loading {
  background: linear-gradient(145deg, #dceefb 0%, #b8d9f2 100%);
  color: var(--mt-tissue-blue-700, #2c5282);
}

body.mt-tissue-brand #s-checkin #ci-gps-status.ci-gps--ok {
  background: linear-gradient(145deg, #e8f5ec 0%, #c8e6d4 100%);
  color: #3d8b5a;
}

body.mt-tissue-brand #s-checkin #ci-gps-status.ci-gps--warn {
  background: linear-gradient(145deg, #fdf2f6 0%, #f3c9d9 100%);
  color: #b85c6e;
}

body.mt-tissue-brand #s-checkin #ci-gps-status.ci-gps--busy {
  background: rgba(30, 58, 95, 0.82);
  color: #fff;
}

/* Success modal */
body.mt-tissue-brand #ci-success-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100500;
  align-items: center;
  justify-content: center;
  background: rgba(30, 58, 95, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

body.mt-tissue-brand #ci-success-modal .ci-success-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 247, 255, 0.92) 100%);
  border-radius: 28px;
  padding: 28px 24px;
  text-align: center;
  max-width: 340px;
  width: 90%;
  box-shadow: var(--mt-tissue-shadow-lg);
  position: relative;
  overflow: hidden;
  border: none;
}

body.mt-tissue-brand #ci-success-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

body.mt-tissue-brand #ci-success-title {
  font-size: 18px;
  font-weight: 700;
  color: #3d8b5a;
  margin-bottom: 6px;
}

body.mt-tissue-brand #ci-success-msg {
  font-size: 13px;
  color: var(--mt-tissue-text, #3d4f63);
  margin-bottom: 12px;
  line-height: 1.5;
  white-space: pre-line;
}

body.mt-tissue-brand #ci-success-photo {
  max-width: 100%;
  max-height: 200px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: var(--mt-tissue-shadow-sm);
}

body.mt-tissue-brand #ci-success-btn {
  width: 100%;
  background: linear-gradient(145deg, #c8e6d4 0%, #6bc48a 100%) !important;
  color: #1e4d32 !important;
  border-radius: 999px !important;
}

body.mt-tissue-brand #ci-success-title.ci-success-title--checkout {
  color: var(--mt-tissue-blue-700, #2c5282);
}

body.mt-tissue-brand #ci-success-btn.ci-success-btn--checkout {
  background: linear-gradient(145deg, #dceefb 0%, #5a9fd4 100%) !important;
  color: #1e3a5f !important;
}
