/* V8 — temporary guest live-location sessions without accounts */
html.guest-mode-pending #root { display: none !important; }
html.guest-mode-pending body { background: #eef4f1; }
.auth-card > .text-button { display: none !important; }

.guest-admin-panel { scroll-margin-top: 150px; margin: 16px 0; background: #fff; border: 1px solid #dce7e2; border-radius: 22px; box-shadow: 0 12px 34px rgba(18,51,42,.06); overflow: hidden; }
.guest-admin-heading { padding: 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid #e3ece8; }
.guest-admin-heading h2 { margin: 0 0 5px; font-size: 19px; }
.guest-admin-heading p { margin: 0; color: #71817b; font-size: 11px; line-height: 1.7; }
.guest-admin-badge { white-space: nowrap; border-radius: 999px; padding: 7px 11px; background: #e9f8f2; color: #137356; font-size: 10px; font-weight: 900; }
.guest-admin-layout { display: grid; grid-template-columns: minmax(310px,.68fr) minmax(0,1.32fr); gap: 18px; padding: 18px; }
.guest-create-card, .guest-list-card { border: 1px solid #dce7e2; border-radius: 18px; background: #fbfdfc; padding: 16px; }
.guest-create-card h3, .guest-list-card h3 { margin: 0 0 13px; font-size: 15px; }
.guest-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.guest-form-grid label { display: grid; gap: 6px; font-size: 11px; font-weight: 800; }
.guest-form-grid label.wide { grid-column: 1 / -1; }
.guest-form-grid input, .guest-form-grid select, .guest-form-grid textarea { width: 100%; border: 1px solid #d6e4de; background: white; border-radius: 12px; padding: 11px 12px; font: inherit; outline: none; }
.guest-form-grid textarea { min-height: 76px; resize: vertical; }
.guest-form-grid input:focus, .guest-form-grid select:focus, .guest-form-grid textarea:focus { border-color: #168a68; box-shadow: 0 0 0 4px rgba(30,170,128,.1); }
.guest-create-button { width: 100%; min-height: 47px; margin-top: 13px; border: 0; border-radius: 13px; background: linear-gradient(135deg,#168a68,#0b3b2e); color: white; font-weight: 900; }
.guest-form-message { min-height: 18px; margin-top: 9px; font-size: 10px; font-weight: 700; }
.guest-form-message.error { color: #b0252d; }
.guest-form-message.success { color: #137356; }
.guest-list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.guest-list-toolbar span { color: #71817b; font-size: 10px; }
.guest-refresh { border: 1px solid #d5e4de; background: #fff; color: #145e49; border-radius: 10px; padding: 7px 11px; font-weight: 800; font-size: 10px; }
.guest-session-list { display: grid; gap: 10px; max-height: 500px; overflow: auto; padding-left: 3px; }
.guest-session-card { border: 1px solid #dce7e2; border-radius: 14px; padding: 13px; background: white; }
.guest-session-card.emergency { border-color: #ef9ba0; background: #fff4f5; }
.guest-session-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.guest-session-name strong, .guest-session-name span { display: block; }
.guest-session-name strong { font-size: 13px; }
.guest-session-name span { color: #71817b; font-size: 9px; margin-top: 3px; }
.guest-status-pill { border-radius: 999px; padding: 5px 8px; font-size: 8px; font-weight: 900; background: #eef3f1; color: #677771; }
.guest-status-pill.live { background: #e7f8f1; color: #137356; }
.guest-status-pill.waiting { background: #fff4d8; color: #936300; }
.guest-status-pill.offline, .guest-status-pill.ended { background: #f1f2f2; color: #68736f; }
.guest-status-pill.sos { background: #ffe0e3; color: #ae222a; }
.guest-session-details { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 11px; }
.guest-session-details div { background: #f3f7f5; border-radius: 10px; padding: 8px; }
.guest-session-details span, .guest-session-details strong { display: block; }
.guest-session-details span { color: #7c8a85; font-size: 7px; }
.guest-session-details strong { font-size: 9px; margin-top: 2px; direction: ltr; text-align: right; }
.guest-session-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.guest-session-actions button, .guest-session-actions a { border: 1px solid #d4e3dd; background: #f8fbfa; color: #115b46; border-radius: 9px; padding: 7px 10px; font: inherit; font-size: 9px; font-weight: 800; text-decoration: none; }
.guest-session-actions .danger { color: #a9272e; border-color: #f0c9cc; background: #fff7f7; }
.guest-empty { min-height: 140px; border: 1px dashed #cedbd6; border-radius: 14px; display: grid; place-items: center; text-align: center; color: #7c8a85; font-size: 11px; padding: 20px; }
.guest-created-link { margin-top: 12px; border: 1px solid #bfe5d6; background: #ebf9f3; border-radius: 13px; padding: 11px; }
.guest-created-link strong { display: block; font-size: 10px; color: #12664d; margin-bottom: 6px; }
.guest-created-link code { display: block; direction: ltr; text-align: left; background: white; border-radius: 8px; padding: 8px; font-size: 9px; overflow-wrap: anywhere; }
.guest-created-link div { display: flex; gap: 7px; margin-top: 8px; }
.guest-created-link button { flex: 1; border: 0; border-radius: 9px; min-height: 34px; font-weight: 800; font-size: 9px; color: white; background: #137356; }
.guest-created-link button.secondary { color: #145e49; background: #d9eee6; }

/* Guest mobile page */
#guest-tracker-app { min-height: 100vh; direction: rtl; color: #13251f; font-family: 'Cairo', system-ui, sans-serif; background: radial-gradient(circle at top right,#dff4eb,transparent 35%),#f1f6f4; padding: 16px; }
.guest-mobile-shell { width: min(520px,100%); margin: 0 auto; }
.guest-mobile-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.guest-mobile-logo { width: 155px; background: white; border: 1px solid #dce7e2; border-radius: 16px; padding: 8px; box-shadow: 0 8px 24px rgba(10,55,42,.08); }
.guest-mobile-logo img { display: block; width: 100%; }
.guest-link-pill { border-radius: 999px; padding: 7px 10px; background: #e4f5ee; color: #137356; font-size: 9px; font-weight: 900; }
.guest-mobile-card { background: rgba(255,255,255,.97); border: 1px solid #dce7e2; border-radius: 22px; padding: 20px; box-shadow: 0 14px 40px rgba(13,55,43,.09); margin-bottom: 13px; }
.guest-welcome-eyebrow { color: #168a68; font-size: 10px; font-weight: 900; letter-spacing: 1px; }
.guest-mobile-card h1 { font-size: 25px; line-height: 1.35; margin: 5px 0 6px; }
.guest-mobile-card > p { color: #71817b; font-size: 11px; line-height: 1.8; }
.guest-worker-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.guest-worker-meta div { background: #f2f7f5; border-radius: 12px; padding: 10px; }
.guest-worker-meta span, .guest-worker-meta strong { display: block; }
.guest-worker-meta span { color: #7b8a84; font-size: 8px; }
.guest-worker-meta strong { font-size: 10px; margin-top: 3px; }
.guest-tracking-state { border-radius: 18px; padding: 17px; background: linear-gradient(135deg,#0b3b2e,#14664f); color: white; display: flex; align-items: center; gap: 13px; }
.guest-tracking-state .pulse { width: 15px; height: 15px; border-radius: 50%; background: #71f0bf; box-shadow: 0 0 0 0 rgba(113,240,191,.6); animation: guestPulse 1.6s infinite; flex: 0 0 auto; }
.guest-tracking-state.idle { background: #edf3f0; color: #52645e; }
.guest-tracking-state.idle .pulse { background: #91a49d; animation: none; box-shadow: none; }
.guest-tracking-state strong, .guest-tracking-state span { display: block; }
.guest-tracking-state strong { font-size: 13px; }
.guest-tracking-state span { font-size: 9px; opacity: .82; margin-top: 3px; line-height: 1.6; }
@keyframes guestPulse { 70% { box-shadow: 0 0 0 12px rgba(113,240,191,0); } 100% { box-shadow: 0 0 0 0 rgba(113,240,191,0); } }
.guest-location-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; margin-top: 12px; }
.guest-location-grid div { border: 1px solid #dce7e2; background: #fbfdfc; border-radius: 13px; padding: 11px; }
.guest-location-grid span, .guest-location-grid strong { display: block; }
.guest-location-grid span { color: #7b8a84; font-size: 8px; }
.guest-location-grid strong { font-size: 11px; margin-top: 3px; direction: ltr; text-align: right; }
.guest-main-button, .guest-stop-button, .guest-sos-button { width: 100%; min-height: 54px; border: 0; border-radius: 15px; font: inherit; font-weight: 900; margin-top: 12px; }
.guest-main-button { color: white; background: linear-gradient(135deg,#168a68,#0b3b2e); }
.guest-stop-button { color: #7b252a; background: #fff1f2; border: 1px solid #f3c7ca; }
.guest-sos-button { color: white; background: #ce3039; }
.guest-sos-button.active { background: #7e151c; box-shadow: 0 0 0 5px rgba(206,48,57,.12); }
.guest-permission-note { color: #735a41; background: #fff8ee; border: 1px solid #f1ddbd; border-radius: 13px; padding: 12px; font-size: 9px; line-height: 1.8; margin-top: 12px; }
.guest-mobile-message { display: none; border-radius: 12px; padding: 11px; margin-top: 10px; font-size: 10px; font-weight: 700; }
.guest-mobile-message.show { display: block; }
.guest-mobile-message.error { color: #a51f27; background: #fff0f1; border: 1px solid #f3c9cc; }
.guest-mobile-message.success { color: #12644c; background: #eaf9f3; border: 1px solid #c6eadc; }
.guest-invalid { min-height: calc(100vh - 32px); display: grid; place-items: center; }
.guest-invalid .guest-mobile-card { text-align: center; width: min(460px,100%); }
.guest-expired-icon { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 22px; margin: 0 auto 13px; background: #fff0f1; color: #b3262e; font-size: 34px; }

@media (max-width: 1050px) { .guest-admin-layout { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .guest-admin-heading { display: block; }
  .guest-admin-badge { display: inline-block; margin-top: 10px; }
  .guest-form-grid { grid-template-columns: 1fr; }
  .guest-form-grid label.wide { grid-column: auto; }
  .guest-session-details { grid-template-columns: 1fr 1fr; }
}
