* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

body {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(160deg, #050b17, #0f172a 55%, #111827);
  background-attachment: fixed;
  color: #eaf0ff;
  min-height: 100dvh;
  overflow-x: hidden;
}

.hidden { display: none !important; }

.muted { color: #94a3b8; }
.small { font-size: 12px; }

/* Un singur ecran vizibil */
.screen {
  display: none;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: max(12px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
}

.screen:not(.hidden) {
  display: flex;
  flex-direction: column;
}

.m-header {
  margin: 0 0 12px;
  flex-shrink: 0;
}

.m-header h1 {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.2;
}

.m-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.m-label {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #94a3b8;
}

.m-label input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(96,165,250,.25);
  background: rgba(2,6,23,.75);
  color: #fff;
  font-size: 16px;
}

.m-error { color: #fca5a5; font-size: 14px; font-weight: 600; margin: 0 0 10px; }

.m-btn {
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
}

.m-btn-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  width: 100%;
  box-shadow: 0 8px 20px rgba(22,163,74,.3);
}

.m-btn-primary:disabled { opacity: .55; cursor: not-allowed; }

.m-btn-ghost {
  background: rgba(255,255,255,.08);
  color: #cbd5e1;
  border: 1px solid rgba(255,255,255,.12);
}

.m-btn-block { width: 100%; margin-top: 10px; }

.m-btn-back {
  flex-shrink: 0;
  padding: 8px 10px;
  font-size: 12px;
  white-space: nowrap;
}

#sites-status {
  margin: 0 0 10px;
  flex-shrink: 0;
}

.sites-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.site-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(15,23,42,.92);
  border: 1px solid rgba(255,255,255,.1);
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}

.site-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.site-row-main strong { font-size: 15px; }

.site-row-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.chevron { font-size: 20px; color: #64748b; }

/* Site detail — header compact sus */
.site-detail-head {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 4px 10px;
  align-items: center;
  margin-bottom: 8px;
}

.site-detail-head .m-btn-back {
  grid-column: 1;
  grid-row: 1;
}

.site-detail-title-wrap {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.site-detail-title-wrap h1 {
  font-size: 18px;
  margin: 0;
  line-height: 1.2;
  word-break: break-word;
}

.site-detail-title-wrap p {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.3;
}

.m-subtabs {
  display: flex;
  gap: 6px;
  margin: 0 0 10px;
  overflow-x: auto;
  flex-shrink: 0;
  padding: 4px 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.m-subtabs::-webkit-scrollbar { display: none; }

.m-subtab {
  flex: 0 0 auto;
  border: none;
  border-radius: 10px;
  padding: 9px 11px;
  font-weight: 800;
  font-size: 11px;
  cursor: pointer;
  background: rgba(255,255,255,.06);
  color: #94a3b8;
  font-family: inherit;
  white-space: nowrap;
}

.m-subtab.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}

.detail-panel {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 16px;
  min-height: 0;
}

.section-block {
  background: rgba(15,23,42,.85);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
}

.section-title {
  margin: 0 0 10px;
  font-size: 15px;
}

.section-subtitle {
  margin: 12px 0 6px;
  font-size: 13px;
  color: #93c5fd;
}

.field-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 13px;
}

.field-row:last-child { border-bottom: none; }

.field-label { color: #94a3b8; flex-shrink: 0; }
.field-value { text-align: right; font-weight: 600; }

.fields-sync-hint {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

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

.progress-list li {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.progress-list li.done span:first-child { color: #86efac; }

.pill {
  font-size: 10px;
  font-weight: 800;
  padding: 5px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.pill-ok { background: rgba(34,197,94,.2); color: #86efac; border: 1px solid rgba(34,197,94,.35); }
.pill-warn { background: rgba(245,158,11,.15); color: #fcd34d; border: 1px solid rgba(245,158,11,.3); }
.pill-blue { background: rgba(59,130,246,.2); color: #93c5fd; border: 1px solid rgba(59,130,246,.35); }
.pill-bad { background: rgba(239,68,68,.2); color: #fca5a5; border: 1px solid rgba(239,68,68,.35); }

.m-textarea {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border-radius: 12px;
  min-height: 64px;
  resize: vertical;
  border: 1px solid rgba(96,165,250,.25);
  background: rgba(2,6,23,.75);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
}

.site-comment {
  font-size: 13px;
  margin: 6px 0 0;
  line-height: 1.4;
  color: #cbd5e1;
}

.photo-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.m-btn-secondary {
  background: rgba(59,130,246,.2);
  color: #bfdbfe;
  border: 1px solid rgba(59,130,246,.35);
  flex: 1;
  min-width: 100px;
  text-align: center;
  font-size: 12px;
  padding: 10px 8px;
}

.photo-row label { margin: 0; }
.photo-row input[type=file] { display: none; }

.upload-status { margin-top: 6px; min-height: 16px; font-size: 12px; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.photo-thumb {
  position: relative;
  padding: 0;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
  background: #1e293b;
  cursor: pointer;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-thumb-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 8px;
  font-weight: 800;
  text-align: center;
  padding: 3px;
  background: rgba(0,0,0,.65);
  color: #e2e8f0;
  text-transform: uppercase;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) 12px env(safe-area-inset-bottom);
}

.photo-lightbox.hidden { display: none !important; }

.photo-lightbox img {
  max-width: 100%;
  max-height: 75dvh;
  object-fit: contain;
  border-radius: 8px;
}

.lb-close {
  position: absolute;
  top: max(8px, env(safe-area-inset-top));
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  z-index: 201;
}

.lb-caption {
  color: #cbd5e1;
  font-size: 12px;
  margin-top: 10px;
  text-align: center;
  padding: 0 16px;
}

body.lb-open { overflow: hidden; }

.m-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.m-modal.hidden { display: none !important; }

.m-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}

.m-modal-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #0f172a;
  border-radius: 20px 20px 16px 16px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.12);
}

.m-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.daily-item {
  background: rgba(2,6,23,.5);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid rgba(255,255,255,.06);
}

.daily-item p {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.4;
}

.m-input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(96,165,250,.25);
  background: rgba(2,6,23,.75);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
}

.m-input[readonly] {
  opacity: 0.85;
  color: #cbd5e1;
}

.m-daily-tabs {
  display: flex;
  gap: 6px;
  margin: 10px 0 12px;
  overflow-x: auto;
  flex-shrink: 0;
  padding-bottom: 4px;
}

.m-daily-tab {
  flex: 0 0 auto;
  border: none;
  border-radius: 10px;
  padding: 8px 11px;
  font-weight: 800;
  font-size: 11px;
  cursor: pointer;
  background: rgba(255,255,255,.06);
  color: #94a3b8;
  font-family: inherit;
}

.m-daily-tab.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}

.daily-sub-panel {
  margin-bottom: 12px;
}

.daily-pane.hidden {
  display: none !important;
}

.daily-extend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}

.daily-extend-row .m-btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 100px;
}

/* —— Login (GCE Expert mockup) —— */
.screen-login:not(.hidden) {
  position: relative;
  max-width: none;
  padding: 0;
  overflow: hidden;
}

.login-page {
  position: relative;
  min-height: 100dvh;
  background: #0b0e14;
  color: #f1f5f9;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.login-page-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #0f1115;
  background-image:
    linear-gradient(180deg, rgba(15,17,21,.9) 0%, rgba(15,17,21,.52) 34%, rgba(15,17,21,.28) 58%, rgba(15,17,21,.84) 100%),
    linear-gradient(to top, rgba(15,17,21,.82) 0%, transparent 42%),
    url("/gce-auth-tower-bg.jpg"),
    url("/desktop/gce-auth-tower-bg.jpg");
  background-size: cover;
  background-position: center;
}

.login-page-waves {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.login-page-waves::before,
.login-page-waves::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(124,92,255,.2);
  border-radius: 50%;
}

.login-page-waves::before {
  width: 340px;
  height: 340px;
  right: -90px;
  bottom: -120px;
}

.login-page-waves::after {
  width: 240px;
  height: 240px;
  right: 24px;
  bottom: -150px;
  border-color: rgba(124,92,255,.12);
}

.login-page-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse 90% 45% at 50% 0%, rgba(15,17,21,.55), transparent 58%),
    radial-gradient(ellipse 70% 40% at 82% 88%, rgba(124,92,255,.08), transparent 55%);
}

.login-page-inner {
  position: relative;
  z-index: 2;
  width: min(400px, 100%);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding:
    max(28px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(22px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
}

.login-brand-block {
  text-align: center;
  margin-bottom: 20px;
  padding-top: 4px;
  flex-shrink: 0;
}

.login-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.login-brand-icon {
  flex-shrink: 0;
}

.login-tower-svg {
  width: 44px;
  height: 52px;
  display: block;
}

.login-wave {
  animation: login-pulse 2.4s ease-in-out infinite;
}

.login-wave--2 { animation-delay: .25s; }
.login-wave--3 { animation-delay: .5s; }

@keyframes login-pulse {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}

.login-brand-wordmark {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  line-height: 1;
}

.login-brand-gce {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .04em;
  color: #fff;
}

.login-brand-expert {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .12em;
  color: #a78bfa;
  margin-top: 0;
}

.login-tagline-mock {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #cbd5e1;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.login-card-mock {
  flex: 0 0 auto;
  background: rgba(22, 27, 38, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px 20px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.login-lbl--sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-welcome {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.login-invite-crew {
  margin: 0 0 14px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(112, 71, 235, 0.12);
  border: 1px solid rgba(112, 71, 235, 0.28);
  color: #c4b5fd;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
#login-email[readonly] {
  opacity: 0.92;
  background: rgba(255, 255, 255, 0.06);
}
.login-welcome-sub {
  margin: 6px 0 20px;
  font-size: 14px;
  color: #94a3b8;
}

.login-lbl {
  display: block;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
  display: flex;
}

.login-input-wrap input {
  width: 100%;
  padding: 14px 44px 14px 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 20, 30, 0.72);
  color: #f8fafc;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-user-select: text;
  user-select: text;
}

.login-input-wrap input::placeholder {
  color: #64748b;
}

.login-input-wrap input:focus {
  border-color: rgba(112,71,235,.55);
  box-shadow: 0 0 0 3px rgba(112,71,235,.15);
}

.login-pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #64748b;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-forgot {
  display: block;
  width: 100%;
  margin: -8px 0 16px;
  padding: 0;
  border: none;
  background: none;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: #a78bfa;
  cursor: pointer;
  font-family: inherit;
}

.login-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #fecaca;
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(248,113,113,.25);
}

.login-btn-primary {
  width: 100%;
  border: none;
  padding: 15px 18px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #7c4dff 0%, #7047eb 100%);
  box-shadow: 0 10px 28px rgba(112, 71, 235, 0.38);
  cursor: pointer;
  font-family: inherit;
}

.login-btn-primary:active {
  transform: scale(.985);
}

.login-role-hint {
  margin: 10px 0 0;
  text-align: center;
  font-size: 11px;
  line-height: 1.45;
  color: #64748b;
}

.login-extra-tools {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-extra-tools .login-btn-secondary,
.login-extra-tools .login-discover-btn {
  padding: 11px 14px;
  font-size: 13px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #94a3b8;
}

.login-extra-tools .login-install-btn {
  margin-top: 0;
}

.login-page-footer {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.login-legal-links {
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.6;
}

.login-legal-links a {
  color: #a78bfa;
  text-decoration: none;
}

.login-legal-links a:hover {
  text-decoration: underline;
}

.login-legal-sep {
  margin: 0 6px;
  opacity: 0.45;
}

.login-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-bottom: 4px;
}

.login-btn-primary--sm {
  padding: 13px 16px;
  font-size: 15px;
}

.login-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.login-or::before,
.login-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.1);
}

.login-btn-secondary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: transparent;
  color: #f1f5f9;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.login-btn-secondary svg {
  flex-shrink: 0;
  opacity: .9;
}

.login-secure-icon {
  flex-shrink: 0;
}

.login-secure-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.login-secure-text b {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
}

.login-secure-text span {
  font-size: 12px;
  color: #94a3b8;
}

.login-modal-card {
  background: #161b26;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
}

.login-modal-card .login-input-wrap input {
  padding-left: 14px;
}

/* —— Daily update — un singur ecran scroll —— */
.daily-update-block {
  padding-bottom: 18px;
}

.daily-form-all {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 10px 0 14px;
}

.daily-section {
  padding: 12px;
  border-radius: 14px;
  background: rgba(2,6,23,.42);
  border: 1px solid rgba(255,255,255,.08);
}

.daily-section-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: #93c5fd;
  letter-spacing: 0.02em;
}

.daily-section-hint {
  margin: 0 0 10px !important;
  line-height: 1.45 !important;
}

.daily-submit-hint {
  margin: 10px 0 8px;
  min-height: 40px;
  line-height: 1.35;
}

/* Motiv outage: înălțime fixă — altfel iOS/Android măresc textarea-ul și nu apare scroll */
.m-textarea.outage-extend-reason {
  resize: none !important;
  line-height: 1.38;
  font-size: 15px;
  box-sizing: border-box;
  height: 5.5rem !important;
  min-height: 5.5rem !important;
  max-height: 5.5rem !important;
  overflow-y: scroll !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,.6) rgba(15,23,42,.65);
}

.m-textarea.outage-extend-reason::-webkit-scrollbar {
  width: 10px;
}

.m-textarea.outage-extend-reason::-webkit-scrollbar-track {
  background: rgba(15,23,42,.65);
  border-radius: 6px;
}

.m-textarea.outage-extend-reason::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,.55);
  border-radius: 6px;
  border: 2px solid rgba(15,23,42,.65);
}

.m-textarea.outage-extend-reason::-webkit-scrollbar-thumb:active {
  background: rgba(186,205,246,.65);
}

/* ===== GCE Expert Field App (mockup) ===== */
:root {
  --m-bg: #0b0e14;
  --m-card: #161b22;
  --m-accent: #8b5cf6;
  --m-accent-dim: rgba(139, 92, 246, 0.18);
  --m-border: rgba(255, 255, 255, 0.08);
  --m-text: #ffffff;
  --m-muted: #9ca3af;
  --m-pending: #f59e0b;
  --m-progress: #3b82f6;
  --m-done: #10b981;
}

html[data-gce-mode="light"] {
  --m-bg: #f1f5f9;
  --m-card: #ffffff;
  --m-accent: #6366f1;
  --m-accent-dim: rgba(99, 102, 241, 0.12);
  --m-border: #e2e8f0;
  --m-text: #0f172a;
  --m-muted: #475569;
  --m-pending: #d97706;
  --m-progress: #2563eb;
  --m-done: #059669;
}

body.app-open {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--m-bg);
  color: var(--m-text);
}

.screen-app:not(.hidden),
.screen-detail:not(.hidden) {
  max-width: none;
  padding: 0;
  min-height: 100dvh;
}

.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--m-bg);
}

.app-main {
  flex: 1;
  overflow-y: auto;
  padding:
    max(12px, env(safe-area-inset-top))
    16px
    88px;
  -webkit-overflow-scrolling: touch;
}

.screen-detail:not(.hidden) {
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  background: var(--m-bg);
}

.site-detail-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--m-bg);
}

.site-detail-topbar {
  padding:
    max(12px, env(safe-area-inset-top))
    16px 0;
  margin-bottom: 0;
}

.site-detail-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 96px;
  -webkit-overflow-scrolling: touch;
}

.site-detail-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(480px, 100%);
}

.detail-subtabs-wrap {
  padding: 0 16px 8px;
}

.detail-subtabs-wrap.hidden {
  display: none;
}

.sdt-hero {
  margin-bottom: 14px;
}

.sdt-hero-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sdt-hero-icon {
  margin: 0;
}

.sdt-hero-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sdt-hero-copy b {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
}

.site-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.site-badge--onsite {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.site-badge--done {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.site-badge--off {
  background: rgba(148, 163, 184, 0.12);
  color: var(--m-muted);
}

.sdt-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.sdt-action {
  border: none;
  background: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 0;
}

.sdt-action-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
}

.sdt-action-icon--green { background: #10b981; }
.sdt-action-icon--purple { background: #8b5cf6; }
.sdt-action-icon--blue { background: #3b82f6; }
.sdt-action-icon--yellow { background: #f59e0b; color: #111; }

.sdt-action-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--m-text);
}

.sdt-action--checkin .sdt-action-label {
  color: #10b981;
}

.sdt-action-label--blue {
  color: #3b82f6;
}

.sdt-action--active .sdt-action-icon--green {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.sdt-info-card {
  margin-bottom: 14px;
}

.sdt-card-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.sdt-info-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--m-border);
  align-items: start;
}

.sdt-info-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.sdt-info-label {
  color: var(--m-muted);
  font-size: 14px;
  font-weight: 500;
}

.sdt-info-value {
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  line-height: 1.35;
}

.sdt-info-value--multi {
  white-space: normal;
}

.sdt-pm-call {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 6px;
  color: var(--m-accent);
}

.sdt-back-info {
  border: none;
  background: none;
  color: var(--m-accent);
  font-size: 14px;
  font-weight: 600;
  padding: 0 0 12px;
  cursor: pointer;
}

.detail-panel--mock {
  flex: 1;
  overflow-y: auto;
}

.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.dash-topbar {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.dash-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.gce-theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
}

.gce-theme-toggle {
  width: 52px;
  height: 28px;
}

.gce-theme-toggle-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
}

.gce-theme-toggle-track {
  position: relative;
  width: 52px;
  height: 28px;
  border-radius: 999px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.gce-theme-toggle-input:checked + .gce-theme-toggle-track {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-color: rgba(255, 255, 255, 0.14);
}

html[data-gce-mode="light"] .gce-theme-toggle-input:not(:checked) + .gce-theme-toggle-track {
  background: #f8fafc;
  border-color: #cbd5e1;
}

html[data-gce-mode="light"] .gce-theme-toggle-input:checked + .gce-theme-toggle-track {
  background: linear-gradient(135deg, #312e81, #4338ca);
  border-color: rgba(99, 102, 241, 0.45);
}

html:not([data-gce-mode="light"]) .gce-theme-toggle-input:not(:checked) + .gce-theme-toggle-track {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border-color: #cbd5e1;
}

.gce-theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s;
  z-index: 2;
}

.gce-theme-toggle-input:checked + .gce-theme-toggle-track .gce-theme-toggle-thumb {
  transform: translateX(24px);
}

.gce-theme-toggle-ico {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 1;
}

.gce-theme-toggle-ico--moon {
  left: 7px;
  color: #64748b;
}

.gce-theme-toggle-input:checked + .gce-theme-toggle-track .gce-theme-toggle-ico--moon {
  color: #cbd5e1;
}

.gce-theme-toggle-ico--sun {
  right: 7px;
  color: #f59e0b;
}

.safety-mock-topbar-right .gce-theme-toggle {
  margin-right: 2px;
}

.dash-topbar-title {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.dash-menu-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: var(--m-text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.dash-hero {
  margin-bottom: 18px;
}

.dash-hero-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.dash-hero-sub {
  margin: 8px 0 0;
  color: var(--m-muted);
  font-size: 15px;
  font-weight: 500;
}

.dash-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.dash-section-head--card {
  margin-bottom: 14px;
}

.dash-link-btn {
  border: none;
  background: none;
  color: var(--m-accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.dash-sync-note {
  text-align: center;
  margin: 4px 0 8px;
}

.dash-header--simple {
  align-items: center;
}

.dash-title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dash-greeting {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--m-muted);
  font-weight: 500;
}

.dash-notif {
  position: relative;
  border: none;
  background: var(--m-card);
  color: var(--m-text);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 1px solid var(--m-border);
}

.dash-notif-dot {
  position: absolute;
  top: 10px;
  right: 11px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef4444;
  border: 2px solid var(--m-card);
}

.m-card {
  background: var(--m-card);
  border: 1px solid var(--m-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}

.m-card-label {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--m-muted);
}

.today-site-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}

.today-site-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.today-site-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--m-accent);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.28);
}

.today-site-vendor {
  display: block;
  font-size: 14px;
  color: var(--m-muted);
  margin-top: 2px;
}

.btn-view-inline {
  border: none;
  background: none;
  color: var(--m-accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  padding: 8px 0 0;
}

.today-site-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--m-border);
}

.today-site-times div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.today-site-times b {
  font-size: 16px;
  font-weight: 700;
}

.checklist-progress-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.checklist-progress-meta b {
  font-size: 22px;
  font-weight: 800;
  color: var(--m-accent);
}

.checklist-progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.checklist-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, var(--m-accent));
  transition: width 0.35s ease;
}

.crew-card-head {
  margin-bottom: 12px;
}

.crew-card-meta {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
}

.crew-checkin-msg {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
  font-size: 12px;
}

.crew-members-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crew-members-empty {
  margin: 0;
  padding: 4px 0;
}

.crew-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--m-border);
}

.crew-member-row--on {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.08);
}

.crew-member-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.crew-member-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.crew-member-copy b {
  font-size: 15px;
  color: #f1f5f9;
}

.crew-member-role {
  display: block;
  line-height: 1.3;
}

.crew-member-checkin-btn {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--m-accent), #5b21b6);
}

.crew-member-checkin-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.crew-member-status {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #4ade80;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.activity-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: start;
}

.activity-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.activity-icon--done {
  background: rgba(16, 185, 129, 0.15);
  color: var(--m-done);
}

.activity-copy span {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.activity-time {
  font-size: 12px;
  color: var(--m-muted);
  white-space: nowrap;
}

.activity-empty {
  margin: 0;
}

.today-site-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.today-site-info b {
  font-size: 17px;
}

.btn-accent {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--m-accent);
  cursor: pointer;
  font-family: inherit;
}

.btn-accent:active {
  transform: scale(0.985);
}

.task-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.task-stat {
  text-align: center;
  padding: 8px 4px 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: none;
}

.task-stat b {
  display: block;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}

.task-stat span {
  font-size: 11px;
  font-weight: 600;
  color: var(--m-muted);
}

.task-stat--pending b { color: var(--m-pending); }
.task-stat--progress b { color: var(--m-progress); }
.task-stat--done b { color: var(--m-done); }

/* —— Tasks screen (mockup) —— */
.tasks-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px 14px;
}

.tasks-back-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tasks-topbar-title {
  flex: 1;
  margin: 0;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

.tasks-topbar-spacer {
  width: 40px;
  flex-shrink: 0;
}

.tasks-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 2px 14px;
  scrollbar-width: none;
}

.tasks-filters::-webkit-scrollbar {
  display: none;
}

.tasks-filter {
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}

.tasks-filter.active {
  background: #7047eb;
  color: #fff;
}

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
}

.tasks-empty {
  margin: 8px 4px;
}

.task-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 14px;
  border: 1px solid var(--m-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.task-card:active {
  transform: scale(0.99);
}

.task-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.task-dot--today {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.task-dot--future {
  background: #64748b;
}

.task-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #f1f5f9;
}

.task-due {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}

.task-due--today {
  color: #4ade80;
}

.task-due--future {
  color: #94a3b8;
}

.task-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.task-badge--pending {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.14);
}

.task-badge--pending-muted {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
}

.task-badge--progress {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
}

.task-badge--done {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.14);
}

/* —— Checklists screen (mockup) —— */
.cl-topbar {
  padding: 4px 2px 12px;
}

.cl-topbar-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cl-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 2px 14px;
  scrollbar-width: none;
}

.cl-filters::-webkit-scrollbar {
  display: none;
}

.cl-filter {
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}

.cl-filter.active {
  background: #7047eb;
  color: #fff;
}

.cl-overall-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  margin-bottom: 14px;
}

.cl-overall-card.hidden {
  display: none;
}

.cl-donut {
  --cl-pct: 0;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(#7047eb calc(var(--cl-pct) * 1%), rgba(255, 255, 255, 0.08) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.cl-donut::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--m-card, #151b28);
}

.cl-donut span {
  position: relative;
  z-index: 1;
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
}

.cl-overall-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cl-overall-copy b {
  font-size: 16px;
  color: #f1f5f9;
}

.cl-category-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
}

.cl-empty {
  margin: 8px 4px;
}

.cl-category-card {
  width: 100%;
  border: 1px solid var(--m-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

.cl-category-card:active {
  transform: scale(0.99);
}

.cl-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.cl-category-title {
  font-size: 15px;
  font-weight: 700;
  color: #f1f5f9;
}

.cl-category-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
}

.cl-category-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.cl-category-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7047eb, #8b5cf6);
}

/* —— Daily Checklist detail —— */
.screen-daily-checklist {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--m-bg, #0b0e14);
}

.screen-daily-checklist:not(.hidden) {
  display: flex;
}

.dcl-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.dcl-back-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dcl-title {
  flex: 1;
  margin: 0;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

.dcl-topbar-spacer {
  width: 40px;
  flex-shrink: 0;
}

.dcl-progress-wrap {
  margin-bottom: 18px;
}

.dcl-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dcl-progress-count {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}

.dcl-progress-pct {
  font-size: 16px;
  color: #f8fafc;
}

.dcl-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.dcl-progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7047eb, #8b5cf6);
  transition: width 0.25s ease;
}

.dcl-sections {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 12px;
}

.dcl-section-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #cbd5e1;
}

.dcl-section-card {
  border: 1px solid var(--m-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.dcl-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 14px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.dcl-item:last-child {
  border-bottom: none;
}

.dcl-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dcl-check--todo {
  border: 2px solid #475569;
  background: transparent;
}

.dcl-check--done {
  border: none;
  background: transparent;
  color: #64748b;
}

.dcl-item-label {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: #e2e8f0;
}

.dcl-item-status {
  flex-shrink: 0;
  display: inline-flex;
}

.dcl-item-status--todo {
  width: 22px;
  height: 22px;
  border: 2px solid #334155;
  border-radius: 50%;
}

.dcl-footer {
  padding-top: 12px;
}

.dcl-cta {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 15px 18px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: #7047eb;
  cursor: pointer;
}

.dcl-cta:active {
  transform: scale(0.99);
}

.dcl-empty {
  margin: 8px 4px;
}

body.checklist-open .app-bottom-nav,
body.checklist-open .install-banner {
  display: none;
}

.site-status-chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  margin-top: 4px;
}

.site-status-chip.task-stat--pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
}

.site-status-chip.task-stat--progress {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
}

.site-status-chip.task-stat--done {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

.dash-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.dash-section-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.site-row--mock {
  background: var(--m-card);
  border: 1px solid var(--m-border);
  border-radius: 14px;
  margin-bottom: 8px;
  padding: 14px;
}

.app-bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(480px, 100%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 8px 10px max(10px, env(safe-area-inset-bottom));
  background: rgba(18, 18, 18, 0.96);
  border-top: 1px solid var(--m-border);
  backdrop-filter: blur(12px);
  z-index: 50;
}

body.detail-open .app-bottom-nav {
  display: none;
}

.app-nav-item {
  border: none;
  background: transparent;
  color: var(--m-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border-radius: 10px;
}

.app-nav-item svg {
  opacity: 0.75;
}

.app-nav-item.active {
  color: var(--m-accent);
}

.app-nav-item.active svg {
  opacity: 1;
  stroke: var(--m-accent);
}

.stack-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stack-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--m-border);
  background: var(--m-card);
  color: var(--m-text);
  cursor: pointer;
  font-family: inherit;
}

.stack-card b {
  display: block;
  font-size: 15px;
}

.stack-card--static {
  cursor: default;
  margin-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.checklist-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  border: 1px solid var(--m-border);
  border-top: none;
  border-radius: 0 0 14px 14px;
  background: rgba(30, 30, 38, 0.6);
  padding: 10px 12px 12px;
}

.checklist-group {
  margin-bottom: 4px;
}

.checklist-group .stack-card--static {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: 0;
}

.btn-outline-sm {
  flex: 1;
  border: 1px solid var(--m-border);
  background: transparent;
  color: var(--m-text);
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-outline-sm:active {
  background: var(--m-accent-dim);
  border-color: rgba(123, 97, 255, 0.35);
}

.files-wrap {
  padding-bottom: 12px;
}

/* —— Files screen (mockup) —— */
#tab-files {
  padding-bottom: 12px;
}

.files-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 14px;
}

.files-topbar-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.files-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.files-icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.files-notif-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #7047eb;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.files-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 2px 14px;
  scrollbar-width: none;
}

.files-filters::-webkit-scrollbar {
  display: none;
}

.files-filter {
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}

.files-filter.active {
  background: #7047eb;
  color: #fff;
}

.files-stats-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
}

.files-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.files-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.files-stat-icon--purple {
  background: rgba(112, 71, 235, 0.18);
  color: #c4b5fd;
}

.files-stat-icon--blue {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

.files-stat-icon--green {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.files-stat-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.files-stat-copy b {
  font-size: 18px;
  line-height: 1.1;
  color: #f8fafc;
}

.files-stat-copy span {
  font-size: 12px;
  color: #94a3b8;
}

.files-stat--storage {
  grid-column: 1 / -1;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.files-storage-ring {
  --files-storage-pct: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: conic-gradient(#7047eb calc(var(--files-storage-pct) * 1%), rgba(255, 255, 255, 0.08) 0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.files-storage-ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #151b28;
}

.files-storage-ring span {
  position: relative;
  z-index: 1;
  font-size: 10px;
  font-weight: 700;
  color: #e2e8f0;
}

.files-storage-label {
  font-size: 13px !important;
  color: #f1f5f9 !important;
}

.files-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.files-search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}

.files-search-field input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #f1f5f9;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.files-search-field input::placeholder {
  color: #64748b;
}

.files-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.files-upload-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 15px 18px;
  border: none;
  border-radius: 14px;
  background: #7047eb;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.files-upload-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.files-upload-btn:active {
  transform: scale(0.99);
}

.files-recent {
  margin-bottom: 16px;
}

.files-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.files-recent-title {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #64748b;
  text-transform: uppercase;
}

.files-view-all {
  border: none;
  background: none;
  color: #a78bfa;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}

.files-recent-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.files-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 4px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.files-row:last-child {
  border-bottom: none;
}

.files-row-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.files-row-icon--yellow {
  background: rgba(234, 179, 8, 0.16);
  color: #facc15;
}

.files-row-icon--blue {
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
}

.files-row-icon--red {
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
}

.files-row-icon--green {
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
}

.files-row-icon--cyan {
  background: rgba(34, 211, 238, 0.16);
  color: #67e8f9;
}

.files-row-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.files-row-body b {
  font-size: 14px;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.files-row-body span {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.files-row-date {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  flex-shrink: 0;
}

.files-row-menu {
  color: #64748b;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.files-empty {
  margin: 8px 2px;
}

.files-share-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  margin-bottom: 8px;
}

.files-share-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(112, 71, 235, 0.16);
  color: #c4b5fd;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.files-share-copy {
  flex: 1;
  min-width: 0;
}

.files-share-copy b {
  display: block;
  font-size: 15px;
  color: #f8fafc;
  margin-bottom: 4px;
}

.files-share-copy p {
  margin: 0 0 10px;
}

.files-share-btn {
  border: none;
  background: none;
  padding: 0;
  color: #a78bfa;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.photo-grid--files {
  margin-top: 12px;
}

/* —— More screen (profile mockup, full screen) —— */
body.more-tab-active,
body.more-tab-active .app-shell {
  background: #121826;
}

.app-main--more {
  padding: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #121826;
}

.more-screen {
  min-height: calc(100dvh - 72px);
  min-height: calc(100dvh - 72px - env(safe-area-inset-bottom));
  box-sizing: border-box;
  padding:
    max(28px, calc(env(safe-area-inset-top) + 16px))
    20px
    calc(96px + env(safe-area-inset-bottom));
  background: #121826;
}

.more-profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 0 28px;
}

.more-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c69ef, #5b21b6);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.more-profile-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.more-profile-copy b {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.more-profile-role {
  font-size: 14px;
  font-weight: 500;
  color: #8b9cb3;
  line-height: 1.35;
}

.more-menu-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #1c2431;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.more-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 0 18px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.more-row:last-child {
  border-bottom: none;
}

.more-row--toggle {
  cursor: default;
}

.more-row--modal {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--m-border);
  margin-bottom: 0;
}

.more-row.hidden {
  display: none;
}

.more-row-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #cbd5e1;
}

.more-row-label {
  flex: 1;
  min-width: 0;
}

.more-row-chevron {
  color: #64748b;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.more-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
}

.more-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.more-switch-track {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #3a4354;
  position: relative;
  transition: background 0.2s ease;
}

.more-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.more-switch input:checked + .more-switch-track {
  background: #7c69ef;
}

.more-switch input:checked + .more-switch-track::after {
  transform: translateX(20px);
}

.more-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 12px;
  background: rgba(248, 113, 113, 0.08);
  color: #f87171;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.more-logout-btn:active {
  transform: scale(0.99);
}

.more-version {
  text-align: center;
  margin: 0;
}

.profile-modal-card {
  max-width: 360px;
}

.profile-modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.profile-modal-avatar {
  width: 52px;
  height: 52px;
  font-size: 16px;
}

.profile-modal-meta {
  padding: 12px 0 16px;
  border-top: 1px solid var(--m-border);
  border-bottom: 1px solid var(--m-border);
  margin-bottom: 16px;
}

.login-discover-status {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(112, 71, 235, 0.12);
  color: #c4b5fd;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.login-discover-btn {
  margin-bottom: 10px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--m-accent), #5b21b6);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  flex-shrink: 0;
}

.profile-card b {
  display: block;
  font-size: 17px;
  margin-bottom: 2px;
}

.profile-card .muted {
  display: block;
}

.menu-list {
  padding: 6px;
  overflow: hidden;
}

.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border: none;
  background: transparent;
  color: var(--m-text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  border-bottom: 1px solid var(--m-border);
  text-align: left;
}

.menu-item:last-child {
  border-bottom: none;
  color: #f87171;
}

.menu-chevron {
  margin-left: auto;
  color: var(--m-muted);
  font-size: 18px;
}

.menu-chevron--danger {
  color: #f87171;
}

.m-btn-icon {
  border: none;
  background: var(--m-card);
  color: var(--m-text);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 1px solid var(--m-border);
  flex-shrink: 0;
}

.site-detail-head {
  align-items: center;
}

.site-detail-head .dash-title {
  font-size: 20px;
}

.m-subtabs--mock {
  background: var(--m-card);
  border: 1px solid var(--m-border);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 14px;
}

.m-subtabs--mock .m-subtab {
  border-radius: 10px;
  font-size: 12px;
}

.m-subtabs--mock .m-subtab.active {
  background: var(--m-accent);
  color: #fff;
}

.screen-detail .section-block,
.screen-detail .fields-sync-block {
  background: var(--m-card);
  border: 1px solid var(--m-border);
  border-radius: 16px;
}

.screen-detail .m-btn-primary {
  background: var(--m-accent);
  box-shadow: 0 8px 20px rgba(123, 97, 255, 0.28);
}

.screen-detail .field-row {
  border-color: var(--m-border);
}

.m-progress-title {
  margin: 16px 0 10px;
}

.m-progress-hint {
  margin: 0 0 6px;
  line-height: 1.4;
}

.m-progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
}

.m-progress-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--m-border);
  overflow: hidden;
}

.m-progress-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  transition: width 0.25s ease;
}

.m-progress-pct {
  font-size: 13px;
  font-weight: 800;
  min-width: 36px;
  text-align: right;
}

.m-progress-count {
  margin: 0 0 10px;
  font-weight: 600;
}

.m-progress-empty {
  margin: 0;
}

.m-site-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.m-site-task {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.m-site-task-check {
  border: none;
  background: transparent;
  padding: 0;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.m-site-task-box {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid var(--m-border-strong, #94a3b8);
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.m-site-task--done .m-site-task-box {
  background: #22c55e;
  border-color: #16a34a;
  box-shadow: inset 0 0 0 2px #fff;
}

.m-site-task-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.m-site-task-copy b {
  font-size: 14px;
  line-height: 1.35;
}

.m-site-task--done .m-site-task-copy b {
  opacity: 0.72;
  text-decoration: line-through;
}

.m-site-task-check--busy {
  opacity: 0.55;
  pointer-events: none;
}

.m-progress-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 4px;
}

.m-progress-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  position: relative;
  padding: 0 0 14px 0;
}

.m-progress-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 16px;
  bottom: 0;
  width: 2px;
  background: var(--m-border);
}

.m-progress-step--done .m-progress-dot-btn .m-progress-dot {
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.m-progress-dot-btn {
  border: none;
  background: transparent;
  padding: 0;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.m-progress-dot-btn--busy {
  opacity: 0.55;
  pointer-events: none;
}

.m-progress-dot-btn:active .m-progress-dot {
  transform: scale(0.9);
}

.m-progress-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--m-border);
  border: 2px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
  display: block;
  position: relative;
  z-index: 1;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.m-progress-step--done .m-progress-dot {
  background: #22c55e;
  border-color: #22c55e;
}

.m-progress-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.m-progress-copy b {
  font-size: 14px;
  font-weight: 600;
}

.weather-modal-card {
  max-width: 360px;
  padding: 18px 18px 16px;
}

.weather-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.weather-close-btn {
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--m-text);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.weather-location {
  margin: 0 0 14px;
}

.weather-body {
  min-height: 120px;
}

.weather-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.weather-icon {
  font-size: 48px;
  line-height: 1;
}

.weather-temp-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.weather-temp {
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.weather-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--m-accent);
}

.weather-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 14px 0 0;
  border-top: 1px solid var(--m-border);
}

.weather-stats div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.weather-stats b {
  font-size: 16px;
}

.weather-forecast {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--m-border);
}

.weather-forecast-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--m-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.weather-forecast-row {
  display: grid;
  grid-template-columns: 72px 28px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.weather-forecast-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.weather-forecast-row--today {
  background: rgba(112, 71, 235, 0.08);
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 10px;
  border-bottom-color: transparent;
}

.weather-forecast-day {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
}

.weather-forecast-icon {
  font-size: 22px;
  line-height: 1;
  text-align: center;
}

.weather-forecast-label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weather-forecast-temps {
  display: flex;
  align-items: baseline;
  gap: 8px;
  justify-content: flex-end;
  min-width: 72px;
}

.weather-forecast-temps b {
  font-size: 15px;
  color: #f8fafc;
}

.weather-forecast-temps .muted {
  font-size: 13px;
}

/* —— Add to Home Screen —— */
.login-install-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  padding: 12px 16px;
  border: 1px solid rgba(112, 71, 235, 0.45);
  border-radius: 12px;
  background: rgba(112, 71, 235, 0.12);
  color: #c4b5fd;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.login-install-btn.hidden {
  display: none;
}

.install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 1200;
}

.install-banner.hidden {
  display: none;
}

.install-banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #151b28;
  border: 1px solid rgba(112, 71, 235, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.install-banner-icon img {
  display: block;
  border-radius: 10px;
}

.install-banner-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

.install-banner-text b {
  font-size: 14px;
  color: #f1f5f9;
}

.install-banner-text span {
  color: #94a3b8;
}

.install-banner-action {
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  background: #7047eb;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.install-banner-close {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.install-modal-card {
  max-width: 420px;
}

.install-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.install-modal-lead {
  margin: 0 0 12px;
  line-height: 1.45;
}

.install-steps {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--m-border);
}

.install-steps.hidden {
  display: none;
}

.install-steps-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
}

.install-steps ol {
  margin: 0;
  padding-left: 18px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.55;
}

.install-modal-url {
  margin: 0;
  word-break: break-all;
  line-height: 1.45;
}

body.app-open .install-banner {
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.weather-updated {
  margin: 14px 0 0;
  text-align: center;
}

/* Safety manager — mobile Safety Audit */
body.safety-manager-mode .app-nav-crew-only {
  display: none !important;
}

body.safety-manager-mode .app-nav-safety-only {
  display: flex !important;
}

body.safety-manager-mode .app-bottom-nav {
  grid-template-columns: repeat(4, 1fr);
}

body.safety-manager-mode .app-nav-safety-only span {
  font-size: 10px;
}

/* Field check-in geofence live status */
.geo-live-bar {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 13px;
  line-height: 1.35;
}
.geo-live-ok { color: #4ade80; }
.geo-live-bad { color: #f87171; }
.geo-live-warn { color: #fbbf24; }
.geo-live-bar .muted { opacity: 0.85; }

/* Mobile Finance (read-only) */
.m-fin-note { padding: 0 16px 8px; margin: 0; }
.m-fin-root { padding: 0 16px 24px; display: flex; flex-direction: column; gap: 12px; }
.m-fin-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px; }
.m-fin-kpi { padding: 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.m-fin-kpi span { display: block; font-size: 11px; color: var(--muted, #94a3b8); font-weight: 700; text-transform: uppercase; }
.m-fin-kpi b { display: block; font-size: 20px; margin-top: 4px; }
.m-fin-kpi small { display: block; font-size: 11px; color: var(--muted, #94a3b8); margin-top: 2px; }
.m-fin-kpi--profit b { color: #4ade80; }
.m-fin-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.m-fin-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.m-fin-row:last-child { border-bottom: none; }
.m-fin-row small { display: block; color: var(--muted, #94a3b8); font-size: 11px; margin-top: 2px; }

/* =============================================================================
   Light theme — readable text & surfaces (fixes white-on-white glitch)
   ============================================================================= */
html[data-gce-mode="light"] body,
html[data-gce-mode="light"] body.app-open {
  background: var(--m-bg) !important;
  color: var(--m-text);
}

html[data-gce-mode="light"] .muted,
html[data-gce-mode="light"] .m-label,
html[data-gce-mode="light"] .crew-card-meta,
html[data-gce-mode="light"] .chevron {
  color: var(--m-muted) !important;
}

html[data-gce-mode="light"] .app-shell,
html[data-gce-mode="light"] .app-main,
html[data-gce-mode="light"] .screen-app:not(.hidden),
html[data-gce-mode="light"] .screen-detail:not(.hidden) {
  background: var(--m-bg);
  color: var(--m-text);
}

html[data-gce-mode="light"] .dash-hero-title,
html[data-gce-mode="light"] .dash-topbar-title,
html[data-gce-mode="light"] .cl-topbar-title,
html[data-gce-mode="light"] .tasks-topbar-title,
html[data-gce-mode="light"] .files-topbar-title,
html[data-gce-mode="light"] .crew-member-copy b,
html[data-gce-mode="light"] .cl-overall-copy b,
html[data-gce-mode="light"] .cl-category-title,
html[data-gce-mode="light"] .cl-donut span,
html[data-gce-mode="light"] .task-card-title,
html[data-gce-mode="light"] .files-stat-copy b,
html[data-gce-mode="light"] .files-share-copy b,
html[data-gce-mode="light"] .files-storage-label,
html[data-gce-mode="light"] .files-row-body b,
html[data-gce-mode="light"] .today-site-info b,
html[data-gce-mode="light"] .today-site-times b,
html[data-gce-mode="light"] .activity-copy span,
html[data-gce-mode="light"] .site-row-main strong,
html[data-gce-mode="light"] .m-header h1,
html[data-gce-mode="light"] .sdt-hero-copy b,
html[data-gce-mode="light"] .sdt-info-value,
html[data-gce-mode="light"] .m-fin-kpi b,
html[data-gce-mode="light"] .m-fin-row > b {
  color: var(--m-text) !important;
}

html[data-gce-mode="light"] .m-fin-kpi span,
html[data-gce-mode="light"] .m-fin-kpi small,
html[data-gce-mode="light"] .m-fin-row small {
  color: var(--m-muted) !important;
}

html[data-gce-mode="light"] body.more-tab-active,
html[data-gce-mode="light"] body.more-tab-active .app-shell,
html[data-gce-mode="light"] .app-main--more,
html[data-gce-mode="light"] .more-screen {
  background: var(--m-bg) !important;
}

html[data-gce-mode="light"] .more-menu-card {
  background: var(--m-card) !important;
  border-color: var(--m-border) !important;
}

html[data-gce-mode="light"] .more-profile-copy b,
html[data-gce-mode="light"] .more-row {
  color: var(--m-text) !important;
}

html[data-gce-mode="light"] .more-profile-role {
  color: var(--m-muted) !important;
}

html[data-gce-mode="light"] .more-row-icon {
  color: #475569 !important;
}

html[data-gce-mode="light"] .more-row {
  border-bottom-color: var(--m-border) !important;
}

html[data-gce-mode="light"] .m-card,
html[data-gce-mode="light"] .task-card,
html[data-gce-mode="light"] .cl-category-card,
html[data-gce-mode="light"] .files-share-card,
html[data-gce-mode="light"] .m-fin-kpi {
  background: var(--m-card) !important;
  border-color: var(--m-border) !important;
}

html[data-gce-mode="light"] .crew-member-row {
  background: #f8fafc !important;
  border-color: var(--m-border) !important;
}

html[data-gce-mode="light"] .crew-member-row--on {
  background: #ecfdf5 !important;
  border-color: rgba(5, 150, 105, 0.28) !important;
}

html[data-gce-mode="light"] .site-row {
  background: var(--m-card) !important;
  border-color: var(--m-border) !important;
  color: var(--m-text);
}

html[data-gce-mode="light"] .task-stat {
  background: #f8fafc;
  border: 1px solid var(--m-border);
}

html[data-gce-mode="light"] .tasks-filter,
html[data-gce-mode="light"] .cl-filter,
html[data-gce-mode="light"] .files-filter {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid var(--m-border);
}

html[data-gce-mode="light"] .tasks-filter.active,
html[data-gce-mode="light"] .cl-filter.active,
html[data-gce-mode="light"] .files-filter.active {
  background: #6366f1 !important;
  color: #fff !important;
  border-color: transparent;
}

html[data-gce-mode="light"] .tasks-back-btn,
html[data-gce-mode="light"] .files-icon-btn {
  color: var(--m-text) !important;
}

html[data-gce-mode="light"] .files-icon-btn {
  background: #f1f5f9 !important;
  border: 1px solid var(--m-border);
}

html[data-gce-mode="light"] .cl-donut::before,
html[data-gce-mode="light"] .files-storage-ring::before {
  background: var(--m-card) !important;
}

html[data-gce-mode="light"] .cl-donut {
  background: conic-gradient(#6366f1 calc(var(--cl-pct) * 1%), #e2e8f0 0) !important;
}

html[data-gce-mode="light"] .files-storage-ring {
  background: conic-gradient(#6366f1 calc(var(--files-storage-pct) * 1%), #e2e8f0 0) !important;
}

html[data-gce-mode="light"] .files-storage-ring span {
  color: var(--m-text) !important;
}

html[data-gce-mode="light"] .cl-category-track,
html[data-gce-mode="light"] .checklist-progress-track {
  background: #e2e8f0 !important;
}

html[data-gce-mode="light"] .files-search-field {
  background: #f8fafc !important;
  border-color: var(--m-border) !important;
  color: var(--m-muted) !important;
}

html[data-gce-mode="light"] .files-search-field input {
  color: var(--m-text) !important;
}

html[data-gce-mode="light"] .files-filter-btn {
  background: #f8fafc !important;
  border-color: var(--m-border) !important;
  color: #475569 !important;
}

html[data-gce-mode="light"] .files-stat--storage,
html[data-gce-mode="light"] .files-row,
html[data-gce-mode="light"] .m-fin-row {
  border-color: var(--m-border) !important;
}

html[data-gce-mode="light"] .app-bottom-nav {
  background: rgba(255, 255, 255, 0.97) !important;
  border-top-color: var(--m-border) !important;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
}

html[data-gce-mode="light"] .app-nav-item {
  color: var(--m-muted);
}

html[data-gce-mode="light"] .app-nav-item.active {
  color: var(--m-accent);
}

html[data-gce-mode="light"] .m-modal-card {
  background: var(--m-card) !important;
  border-color: var(--m-border) !important;
  color: var(--m-text);
}

html[data-gce-mode="light"] .profile-card b {
  color: var(--m-text);
}

html[data-gce-mode="light"] .geo-live-bar {
  background: #f8fafc !important;
  border-color: var(--m-border) !important;
  color: var(--m-text) !important;
}

html[data-gce-mode="light"] .daily-item {
  background: #f8fafc !important;
  border: 1px solid var(--m-border);
  color: var(--m-text);
}

html[data-gce-mode="light"] .crew-checkin-msg {
  background: rgba(239, 68, 68, 0.08) !important;
  color: #b91c1c !important;
}

/* Safety audit form visuals: mobile_safety_audit.css (desktop light parity) */
