/* =============================================================
   STAFF.CSS — All staff mobile screens
   Merged from: staff-base.css + staff-screen1.css + staff-screen2.css
                + staff-screen3.css + staff-dialogs.css + staff-door-status.css
   ============================================================= */


/* ===== Staff Base ===== */

/* ================================================================
   STAFF BASE — Shared styles across all staff screens
   ================================================================ */

/* ---- Staff Mode: hide header & tab bar, full screen ---- */
body.staff-mode .header,
body.staff-mode .tab-bar {
  display: none !important;
}
body.staff-mode main {
  padding: 0;
  max-width: 100%;
}
body.staff-mode {
  background: #0f1117;
  color: #e8e8ee;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---- Staff Top Bar ---- */
.staff-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #181a24;
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.staff-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.staff-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: #e8e8ee;
  font-size: 1.5rem;
  border: none;
  transition: background .15s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.staff-back-btn:active {
  background: rgba(255,255,255,.16);
}
.staff-topbar-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Door notify screen: allow title to wrap */
.door-topbar-title {
  white-space: normal;
  font-size: 1.05rem;
  line-height: 1.3;
}
.staff-topbar-subtitle {
  font-size: .8rem;
  color: rgba(255,255,255,.45);
  font-weight: 400;
}
.staff-reload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: #e8e8ee;
  font-size: 1.2rem;
  border: none;
  transition: background .15s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.staff-reload-btn:active {
  background: rgba(255,255,255,.16);
}

/* ---- Toast (for staff mode) ---- */
.staff-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  z-index: 9999;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  background: #388e3c;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.staff-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- Staff Modal Override (keep for compatibility) ---- */
body.staff-mode .modal-overlay {
  background: rgba(0,0,0,.7);
}
body.staff-mode .modal-content {
  background: #181a24;
  color: #e8e8ee;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  max-width: 420px;
  margin: auto;
}
body.staff-mode .modal-header {
  background: #1c1e2a;
  border-bottom: 1px solid rgba(255,255,255,.06);
  border-radius: 20px 20px 0 0;
  padding: 16px 20px;
}
body.staff-mode .modal-header h2 {
  color: #fff;
  font-size: 1.15rem;
}
body.staff-mode .btn-close {
  color: rgba(255,255,255,.5);
  font-size: 1.4rem;
}
body.staff-mode .modal-body {
  padding: 0;
}

/* ---- Hidden file inputs ---- */
.staff-file-input {
  display: none !important;
}

/* ---- Safe area padding for iPhone ---- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .staff-detail {
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
  }
  .staff-floor-list {
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
  }
  .staff-room-list {
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
  }
}

/* ---- Divider ---- */
.staff-divider {
  height: 1px;
  background: rgba(255,255,255,.06);
  margin: 8px 16px;
}

/* ---- Floor Dots (room status icons on floor select) ---- */
.staff-floor-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}
.staff-floor-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}


/* ===== Staff Screen 1 — Floor Select ===== */

/* ================================================================
   STAFF SCREEN 1 — Floor Select
   ================================================================ */

/* ---- Staff Greeting Bar ---- */
.staff-greeting {
  padding: 20px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.staff-greeting-left {
  min-width: 0;
}
.staff-greeting-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.staff-greeting-sub {
  font-size: .85rem;
  color: rgba(255,255,255,.45);
  margin-top: 2px;
}

/* ---- Door Notify Button (Floor Select) ---- */
.door-notify-btn {
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.7);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: transform .1s, background .15s;
}
.door-notify-btn:active {
  transform: scale(0.95);
  background: rgba(255,255,255,.12);
}

/* ---- Floor Card List ---- */
.staff-floor-list {
  padding: 8px 12px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.staff-floor-card {
  display: flex;
  align-items: center;
  background: #1c1e2a;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.06);
  padding: 18px 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .1s, background .15s;
}
.staff-floor-card:active {
  transform: scale(0.98);
  background: #22253a;
}
.floor-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.floor-card-num {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  min-width: 44px;
}
.floor-card-info {
  flex: 1;
  min-width: 0;
}
.floor-card-count {
  font-size: .8rem;
  color: rgba(255,255,255,.5);
  font-weight: 600;
}
.floor-card-bar {
  height: 6px;
  background: rgba(255,255,255,.08);
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}
.floor-card-bar-fill {
  height: 100%;
  background: #4caf50;
  border-radius: 3px;
  transition: width .4s ease;
}
.floor-card-dots {
  display: flex;
  gap: 5px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.floor-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.floor-dot.dot-done {
  background: #4caf50;
}
.floor-dot.dot-cleaning {
  background: #42a5f5;
}
.floor-dot.dot-before {
  background: #e53935;
}
.floor-card-arrow {
  color: rgba(255,255,255,.2);
  font-size: 1.5rem;
  margin-left: 8px;
  flex-shrink: 0;
}


/* ===== Staff Screen 2 — Room List ===== */

/* ================================================================
   STAFF SCREEN 2 — Room List (Action-oriented cards)
   ================================================================ */

.staff-summary-bar {
  display: flex;
  gap: 6px;
  padding: 12px 16px 6px;
  flex-wrap: wrap;
}
.staff-summary-chip {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
}

.staff-room-list {
  padding: 10px 12px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Room Card — split into left (info) and right (action) */
.staff-room-card {
  display: flex;
  align-items: stretch;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
  background: color-mix(in srgb, var(--room-color) 15%, #1c1e2a);
  min-height: 110px;
}
.staff-room-card-left {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 14px 18px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s;
  min-width: 0;
}
.staff-room-card-left:active {
  background: rgba(255,255,255,.04);
}
.staff-room-card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.staff-room-num {
  font-size: 2.6rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.staff-room-card-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
/* Done rooms — dimmed */
.staff-room-card-done {
  opacity: .45;
}
.staff-room-card-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.staff-front-memo-compact {
  font-size: .78rem;
  color: rgba(255,255,255,.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.staff-room-badges {
  display: flex;
  gap: 4px;
}
.staff-badge-report {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(239,108,0,.2);
  color: #ef6c00;
  font-size: .75rem;
  font-weight: 800;
}
.staff-badge-msg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(30,136,229,.2);
  color: #42a5f5;
  font-size: .7rem;
}
.staff-badge-inspect {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255,152,0,.15);
  color: #ffb300;
  font-size: .65rem;
  font-weight: 700;
}

/* Action button — right side of room card */
.staff-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 100px;
  padding: 12px 16px;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .1s, filter .12s;
  flex-shrink: 0;
}
.staff-action-btn:active {
  transform: scale(0.92);
  filter: brightness(1.2);
}
.staff-action-btn.action-start {
  background: linear-gradient(135deg, #1e88e5, #42a5f5);
  color: #fff;
}
.staff-action-btn.action-complete {
  background: linear-gradient(135deg, #388e3c, #4caf50);
  color: #fff;
}
.staff-action-icon {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}
.staff-action-label {
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.staff-action-done {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  background: rgba(76,175,80,.12);
  flex-shrink: 0;
}
.staff-done-check {
  font-size: 2rem;
  color: #4caf50;
  opacity: .5;
}
/* Status label on room card */
.staff-room-status-label {
  font-size: .85rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  color: #fff;
  display: inline-block;
}

/* Legacy styles kept for detail screen */
.staff-front-memo {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  padding: 4px 8px;
  background: rgba(255,255,255,0.1);
  border-left: 3px solid rgba(255,255,255,0.4);
  border-radius: 0 6px 6px 0;
  line-height: 1.4;
}
.staff-room-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
}
.staff-room-icon.has-report {
  background: rgba(239,108,0,.2);
  color: #ef6c00;
}
.staff-room-icon.has-message {
  background: rgba(30,136,229,.2);
  color: #42a5f5;
}

/* Sent badge on room list */
.staff-sent-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(76,175,80,.15);
  color: #66bb6a;
  font-size: .7rem;
  font-weight: 700;
  margin-top: 4px;
}


/* ===== Staff Screen 3 — Room Detail ===== */

/* ================================================================
   STAFF SCREEN 3 — Room Detail (Full Screen)
   ================================================================ */

.staff-detail {
  padding: 0 0 32px;
  min-height: 100vh;
}
.staff-detail-room-header {
  text-align: center;
  padding: 20px 16px 12px;
}
.staff-detail-room-num {
  font-size: 3rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.staff-detail-status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}
.staff-detail-room-status {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 20px;
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
}

/* Section titles */
.staff-section {
  padding: 0 16px;
  margin-top: 20px;
}
.staff-section-title {
  font-size: .85rem;
  font-weight: 700;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
  padding-left: 4px;
}

/* Status buttons */
.staff-status-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.staff-status-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  border-radius: 14px;
  border: 2px solid transparent;
  background: #1c1e2a;
  color: #e8e8ee;
  font-size: 1.1rem;
  font-weight: 700;
  transition: all .15s;
  min-height: 60px;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  text-align: left;
}
.staff-status-btn:active {
  transform: scale(0.98);
}
.staff-status-btn.current {
  border-color: currentColor;
  background: rgba(255,255,255,.05);
}
.staff-status-dot-lg {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}
.staff-status-check {
  margin-left: auto;
  font-size: 1.3rem;
  opacity: 0;
  transition: opacity .15s;
}
.staff-status-btn.current .staff-status-check {
  opacity: 1;
}

/* ---- Problem Report Section ---- */
.staff-report-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  background: #1c1e2a;
  border: 2px dashed rgba(239,108,0,.3);
  color: #ef6c00;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  min-height: 60px;
  -webkit-tap-highlight-color: transparent;
}
.staff-report-trigger:active {
  background: rgba(239,108,0,.08);
  transform: scale(0.98);
}
.staff-report-trigger .trigger-icon {
  font-size: 1.5rem;
}

/* Report panel (expanded) */
.staff-report-panel {
  background: #1c1e2a;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
}
.staff-report-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.staff-report-panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ef6c00;
}
.staff-report-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.5);
  border: none;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Camera area */
.staff-camera-area {
  padding: 16px;
}
.staff-camera-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ef6c00, #f57c00);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  min-height: 60px;
  -webkit-tap-highlight-color: transparent;
  transition: transform .1s;
}
.staff-camera-btn:active {
  transform: scale(0.97);
}
.staff-camera-icon {
  font-size: 1.5rem;
}

/* Photo preview grid */
.staff-photos-grid {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
  flex-wrap: wrap;
}
.staff-photo-thumb {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  background: #252838;
}
.staff-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.staff-photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,.7);
  color: #fff;
  border: none;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.staff-photo-add {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 2px dashed rgba(255,255,255,.15);
  color: rgba(255,255,255,.3);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Category chips */
.staff-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
}
.staff-category-chip {
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.staff-category-chip:active {
  transform: scale(0.96);
}
.staff-category-chip.selected {
  background: rgba(239,108,0,.15);
  border-color: #ef6c00;
  color: #ef6c00;
}

/* Memo input */
.staff-memo-section {
  padding: 12px 16px 16px;
}
.staff-memo-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: #e8e8ee;
  font-size: .95rem;
  outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
}
.staff-memo-input:focus {
  border-color: rgba(255,255,255,.25);
}
.staff-memo-input::placeholder {
  color: rgba(255,255,255,.25);
}

/* ---- Photo Attach (inline compact) ---- */
.staff-photo-attach {
  margin-bottom: 12px;
}
.staff-photo-attach-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1.5px dashed rgba(255,255,255,.15);
  color: rgba(255,255,255,.5);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all .15s;
}
.staff-photo-attach-btn:active {
  background: rgba(255,255,255,.08);
  transform: scale(0.98);
}
.staff-photo-attach-icon {
  font-size: 1.2rem;
}

/* Contact trigger button (done state) */
.staff-contact-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.55);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all .15s;
}
.staff-contact-trigger:active {
  background: rgba(255,255,255,.1);
  transform: scale(0.97);
}

/* Sent summary */
.staff-sent-summary {
  padding: 12px 0;
}
.staff-sent-memo {
  color: rgba(255,255,255,.5);
  font-size: .85rem;
  margin-top: 8px;
  padding: 0 4px;
}

/* ---- Front Message Section ---- */
.staff-msg-group {
  margin-bottom: 16px;
}
.staff-msg-group-title {
  font-size: .8rem;
  font-weight: 700;
  color: rgba(255,255,255,.3);
  margin-bottom: 8px;
  padding-left: 2px;
}
.staff-msg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.staff-msg-chip {
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.staff-msg-chip:active {
  transform: scale(0.96);
}
.staff-msg-chip.selected {
  background: rgba(30,136,229,.15);
  border-color: #42a5f5;
  color: #42a5f5;
}

/* Submit button */
.staff-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e88e5, #42a5f5);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  min-height: 60px;
  margin-top: 8px;
  -webkit-tap-highlight-color: transparent;
  transition: transform .1s, opacity .15s;
}
.staff-submit-btn:active {
  transform: scale(0.97);
}
.staff-submit-btn:disabled {
  opacity: .4;
  cursor: default;
}
.staff-submit-btn:disabled:active {
  transform: none;
}

/* ---- Start Cleaning Button (Screen 3: before status) ---- */
.staff-start-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1e88e5, #42a5f5);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  min-height: 72px;
  -webkit-tap-highlight-color: transparent;
  transition: transform .1s;
}
.staff-start-btn:active {
  transform: scale(0.97);
}
.staff-start-icon {
  font-size: 1.5rem;
}

/* ---- Complete Cleaning Button (Screen 3: cleaning status) ---- */
.staff-complete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, #388e3c, #4caf50);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  min-height: 72px;
  -webkit-tap-highlight-color: transparent;
  transition: transform .1s;
}
.staff-complete-btn:active {
  transform: scale(0.97);
}

/* ---- Done Message (Screen 3: done status) ---- */
.staff-done-message {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: #4caf50;
  padding: 32px 16px;
}

/* ---- Detail Header extras ---- */
.staff-detail-guest {
  font-size: 1rem;
  color: rgba(255,255,255,.6);
  margin-top: 8px;
}
.staff-detail-memo {
  font-size: .9rem;
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.1);
  border-left: 3px solid rgba(255,255,255,.4);
  border-radius: 0 8px 8px 0;
  padding: 6px 10px;
  margin: 10px auto 0;
  max-width: 280px;
  text-align: left;
  line-height: 1.4;
}
.staff-detail-inspection-flag {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 16px;
  border-radius: 12px;
  background: rgba(255,152,0,.15);
  color: #ffb300;
  font-size: .9rem;
  font-weight: 700;
}

/* ---- Undo Button ---- */
.staff-undo-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.5);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s;
}
.staff-undo-btn:active {
  background: rgba(255,255,255,.15);
}


/* ===== Staff Dialogs ===== */

/* ================================================================
   STAFF DIALOGS — Confirm, Rich Confirm, Inspection Flag
   ================================================================ */

/* ---- Custom Confirm Dialog ---- */
.staff-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 24px;
  opacity: 0;
  transition: opacity .2s ease;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.staff-confirm-overlay.visible {
  opacity: 1;
}
.staff-confirm-dialog {
  background: #1c1e2a;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  width: 100%;
  max-width: 340px;
  overflow: hidden;
  transform: scale(0.92);
  transition: transform .2s ease;
}
.staff-confirm-overlay.visible .staff-confirm-dialog {
  transform: scale(1);
}
.staff-confirm-msg {
  padding: 28px 24px 20px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.5;
}
.staff-confirm-btns {
  display: flex;
  border-top: 1px solid rgba(255,255,255,.08);
}
.staff-confirm-cancel,
.staff-confirm-ok {
  flex: 1;
  padding: 18px;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s;
}
.staff-confirm-cancel {
  background: transparent;
  color: rgba(255,255,255,.5);
  border-right: 1px solid rgba(255,255,255,.08);
}
.staff-confirm-cancel:active {
  background: rgba(255,255,255,.06);
}
.staff-confirm-ok {
  background: transparent;
  color: #42a5f5;
}
.staff-confirm-ok:active {
  background: rgba(66,165,245,.1);
}

/* ---- Rich Confirm (door status send) ---- */
.staff-confirm-rich {
  width: min(340px, 88vw);
}
.staff-confirm-title {
  padding: 22px 24px 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  text-align: center;
}
.staff-confirm-body {
  padding: 8px 20px 18px;
}
.door-confirm-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.door-confirm-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
}
.door-confirm-room {
  font-size: 1.15rem;
  font-weight: 700;
  color: rgba(255,255,255,.9);
}
.door-confirm-badge {
  padding: 4px 14px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
}
.door-confirm-extra {
  margin-top: 10px;
  padding: 0 4px;
  font-size: .9rem;
  color: rgba(255,255,255,.5);
}
.staff-confirm-btns-rich {
  gap: 10px;
  padding: 12px 20px 18px;
  border-top: none;
}
.staff-confirm-btns-rich .staff-confirm-cancel {
  border-right: none;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  padding: 14px;
}
.staff-confirm-ok-rich {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: #1e88e5;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s;
}
.staff-confirm-ok-rich:active {
  background: #1565c0;
}

/* ---- Inspection flag on room list bar ---- */
.staff-inspection-flag {
  margin-left: auto;
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255,152,0,.5);
  padding: 2px 8px;
  border-radius: 6px;
}


/* ===== Staff Door Status ===== */

/* ================================================================
   STAFF SCREEN 4 — Door Status Notification
   ================================================================ */

/* Full-screen fixed layout */
.door-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.door-header {
  flex-shrink: 0;
  background: #13141f;
  z-index: 10;
}
.door-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 16px;
}
.door-footer {
  flex-shrink: 0;
  background: #13141f;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 10px 16px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.door-footer .door-send-btn {
  margin: 0;
}
.door-footer .door-memo-row {
  margin: 0;
}
/* Photo thumbnail in footer */
.door-photo-preview-mini {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
}
.door-photo-preview-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.door-photo-remove-mini {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}

/* Camera button */
.door-camera-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 20px;
  border-radius: 14px;
  background: #1c1e2a;
  border: 2px dashed rgba(30,136,229,.4);
  color: #42a5f5;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  min-height: 80px;
  -webkit-tap-highlight-color: transparent;
}
.door-camera-btn:active {
  background: rgba(30,136,229,.08);
  transform: scale(0.98);
}
.door-camera-icon {
  font-size: 1.8rem;
}

/* Photo preview */
.door-photo-preview {
  border-radius: 14px;
  overflow: hidden;
  background: #1c1e2a;
  border: 1px solid rgba(255,255,255,.08);
}
.door-photo-preview img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  display: block;
}
.door-photo-actions {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
}
.door-photo-retake,
.door-photo-remove {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s;
}
.door-photo-retake {
  background: rgba(30,136,229,.15);
  color: #42a5f5;
}
.door-photo-retake:active {
  background: rgba(30,136,229,.25);
}
.door-photo-remove {
  background: rgba(229,57,53,.15);
  color: #ef5350;
}
.door-photo-remove:active {
  background: rgba(229,57,53,.25);
}

/* ---- Door Status Legend + Reset ---- */
.door-legend-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.door-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.door-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .75rem;
  font-weight: 700;
  color: rgba(255,255,255,.55);
}
.door-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.door-reset-btn {
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.6);
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.door-reset-btn:active {
  background: rgba(255,255,255,.18);
}

/* ---- Floor filter tabs + toolbar ---- */
.door-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
/* Floor select dropdown (scales for 20F+ hotels) */
.door-floor-select {
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  appearance: auto;
  min-height: 36px;
}

/* Memo toggle */
.door-memo-toggle {
  padding: 0 0 4px;
}
.door-memo-toggle-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.45);
  font-size: .8rem;
  cursor: pointer;
  padding: 4px 0;
}
.door-memo-detail {
  display: none;
}
.door-memo-detail.open {
  display: block;
}

/* ---- Door Room Grid (large tiles) ---- */
.door-floor-section-label {
  font-size: .85rem;
  font-weight: 800;
  color: rgba(255,255,255,.4);
  margin-bottom: 8px;
  padding: 8px 16px 0;
}
.door-room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  padding: 0 10px 12px;
}
/* Tile wrapper for picker overlay */
.door-tile-wrap {
  position: relative;
}
/* Large tile — square aspect ratio */
.door-tile-lg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  aspect-ratio: 1;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 2px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.6);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all .15s;
}
.door-tile-lg:active {
  transform: scale(0.95);
}
.door-tile-lg-active {
  background: color-mix(in srgb, var(--dt-color) 18%, transparent);
  border-color: var(--dt-color);
  color: #fff;
}
.door-tile-num-lg {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}
.door-tile-label {
  font-size: .7rem;
  font-weight: 700;
  opacity: .85;
}
.door-tile-label-lg {
  font-size: .85rem;
  font-weight: 700;
  opacity: .85;
}

/* Preset/already-notified rooms — dimmed, status only */
.door-tile-preset {
  opacity: .35;
  pointer-events: auto;
}
.door-tile-preset .door-tile-num-lg {
  font-size: 1.4rem;
}

/* Selected tile highlight */
.door-tile-selected {
  outline: 3px solid #42a5f5;
  outline-offset: -3px;
}

/* Fullscreen picker overlay */
.door-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.7);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.door-picker-sheet {
  background: #1c1e2a;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 500px;
  padding: 24px 20px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.door-picker-sheet-room {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.door-picker-sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}
.door-picker-sheet-btn {
  padding: 24px 8px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--dp-color) 18%, transparent);
  border: 3px solid var(--dp-color);
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
}
.door-picker-sheet-btn.active {
  background: color-mix(in srgb, var(--dp-color) 45%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--dp-color) 40%, transparent);
}
.door-picker-sheet-btn:active {
  transform: scale(0.95);
}
.door-picker-sheet-label {
  font-size: 1.3rem;
  font-weight: 800;
}
.door-picker-sheet-clear {
  background: none;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
  color: rgba(255,255,255,.5);
  font-size: .95rem;
  padding: 10px 24px;
  cursor: pointer;
  width: 100%;
}
.door-picker-sheet-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.35);
  font-size: .9rem;
  cursor: pointer;
  padding: 8px 16px;
}

/* Memo + Photo unified row */
.door-memo-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.door-memo-flex {
  flex: 1;
  min-width: 0;
}
.door-cam-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.6);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s;
}
.door-cam-icon-btn:active {
  background: rgba(255,255,255,.15);
}

/* Batch entry list (still used in history) */
.door-batch-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.door-batch-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 6px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
}
.door-batch-room {
  font-size: .95rem;
  font-weight: 700;
  color: rgba(255,255,255,.8);
}
.door-batch-status {
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
}
.door-batch-remove {
  background: none;
  border: none;
  color: rgba(255,255,255,.3);
  font-size: .85rem;
  cursor: pointer;
  padding: 2px 4px;
  -webkit-tap-highlight-color: transparent;
}
.door-batch-remove:active {
  color: #ef5350;
}
.door-batch-item.from-front {
  border-color: rgba(255,255,255,.12);
  opacity: .65;
}
.door-batch-preset-tag {
  font-size: .6rem;
  font-weight: 500;
  color: rgba(255,255,255,.3);
  letter-spacing: .03em;
}

.door-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 3px;
  vertical-align: middle;
}

/* Send button */
.door-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e88e5, #42a5f5);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  min-height: 60px;
  -webkit-tap-highlight-color: transparent;
  transition: transform .1s, opacity .15s;
}
.door-send-btn:active {
  transform: scale(0.97);
}
.door-send-btn:disabled {
  opacity: .35;
  cursor: default;
}
.door-send-btn:disabled:active {
  transform: none;
}

/* History */
.door-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.door-history-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
}
.door-history-time {
  font-size: .85rem;
  font-weight: 700;
  color: rgba(255,255,255,.4);
  min-width: 42px;
  padding-top: 2px;
}
.door-history-content {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.door-history-room {
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
}
.door-history-status {
  padding: 3px 10px;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
}
.door-history-photo {
  font-size: .8rem;
  color: rgba(255,255,255,.5);
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,.08);
}
.door-history-memo {
  width: 100%;
  font-size: .8rem;
  color: rgba(255,255,255,.45);
  margin-top: 2px;
}
