* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #E8E8E8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 32px 16px 48px;
  font-family: -apple-system, "Google Sans", Roboto, sans-serif;
}

.scenario-label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
  text-align: center;
}

.phone-wrap {
  position: relative;
  width: 375px;
}

.phone-frame {
  width: 375px;
  min-height: 812px;
  border-radius: 44px;
  overflow: hidden;
  box-shadow:
    0 0 0 10px #1A1A1A,
    0 0 0 11px #333,
    0 32px 80px rgba(0,0,0,0.45);
  position: relative;
  background: #D6D6D6;
}

/* =============================================
   INTERACTION SCREENS
   ============================================= */

/* Base overlay screen — hidden by default */
.screen-slide {
  position: absolute;
  inset: 0;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
  overflow: hidden;
}
.screen-slide.fade-in {
  transform: translateX(0);
}
.screen-slide.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

/* App close animation */
.app-screen.closing {
  transform: scale(0.94) translateY(10px);
  opacity: 0;
  transition: transform 0.32s ease, opacity 0.32s ease;
}

/* "Tap to go back" hint */
.tap-hint {
  position: absolute;
  bottom: 28px;
  left: 0; right: 0;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.03em;
  pointer-events: none;
}
.tap-hint.light { color: rgba(255,255,255,0.45); }
.tap-hint.dark  { color: rgba(0,0,0,0.35); }

/* =============================================
   ANDROID HOME SCREEN
   ============================================= */
.android-home {
  width: 100%;
  height: 100%;
  background: linear-gradient(155deg, #1B2B6B 0%, #0E1525 48%, #1A0F35 100%);
  display: flex;
  flex-direction: column;
}
.home-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px 0;
  color: rgba(255,255,255,0.95);
  font-size: 14px;
  font-weight: 600;
}
.home-statusbar .h-icons { display: flex; align-items: center; gap: 5px; font-size: 11px; }
.home-clock-block { text-align: center; margin-top: 36px; }
.home-clock { font-size: 80px; font-weight: 100; color: #fff; letter-spacing: -5px; line-height: 1; }
.home-date { font-size: 15px; color: rgba(255,255,255,0.7); margin-top: 6px; }

/* Play Store update notification */
.home-notif {
  margin: 18px 16px 0;
  background: rgba(255,255,255,0.13);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 12px 14px 10px;
}
.notif-row { display: flex; align-items: center; gap: 10px; }
.notif-ps-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #01875F;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notif-ps-icon svg { width: 18px; height: 18px; }
.notif-app { font-size: 11px; color: rgba(255,255,255,0.55); margin-bottom: 1px; }
.notif-msg { font-size: 13px; color: rgba(255,255,255,0.9); font-weight: 500; }
.notif-progress-bar {
  height: 3px;
  background: rgba(255,255,255,0.18);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}
.notif-progress-fill {
  height: 100%;
  width: 58%;
  background: #34D399;
  border-radius: 2px;
  animation: pbar 3s ease-in-out infinite alternate;
}
@keyframes pbar { from { width: 42%; } to { width: 74%; } }

/* App icon grid */
.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 20px 18px 0;
}
.app-icon {
  display: flex; flex-direction: column;
  align-items: center; gap: 5px;
  padding: 6px 2px;
}
.app-icon-img {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  color: #fff;
  font-weight: 700;
}
.app-icon-lbl {
  font-size: 11px;
  color: rgba(255,255,255,0.82);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  max-width: 60px;
  text-overflow: ellipsis;
}

/* Gusto icon with spinning progress ring */
.gusto-icon-wrap { position: relative; width: 52px; height: 52px; }
.gusto-icon-wrap .ring-svg {
  position: absolute;
  top: -6px; left: -6px;
  width: 64px; height: 64px;
  animation: spin-ring 2.8s linear infinite;
}
@keyframes spin-ring { to { transform: rotate(360deg); } }
.gusto-icon-inner {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: #E8552A;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: #fff;
  font-style: italic; letter-spacing: -1px;
}

/* =============================================
   ANDROID SETTINGS SCREEN
   ============================================= */
.android-settings {
  width: 100%;
  height: 100%;
  background: #F2F2F7;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
.settings-statusbar {
  background: #fff;
  padding: 14px 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: #1A1A1A;
  flex-shrink: 0;
}
.settings-statusbar .s-icons { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #1A1A1A; }
.settings-toolbar {
  background: #fff;
  padding: 10px 16px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #E5E5EA;
  flex-shrink: 0;
}
.settings-back {
  background: none; border: none; cursor: pointer;
  font-size: 26px; color: #1A1A1A; padding: 0; line-height: 1;
  display: flex; align-items: center;
}
.settings-title { font-size: 18px; font-weight: 600; color: #1A1A1A; }
.settings-body {
  flex: 1;
  padding: 12px 16px 80px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.settings-section-lbl {
  font-size: 11px;
  font-weight: 700;
  color: #0A7B7B;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 8px 4px 4px;
}
.settings-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.settings-row {
  padding: 13px 16px;
  border-bottom: 1px solid #F2F2F7;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings-row:last-child { border-bottom: none; }
.s-row-label { font-size: 15px; color: #1A1A1A; font-weight: 400; }
.s-row-value { font-size: 13px; color: #666; }
.settings-row.warn-row { background: #FFF9EC; }
.settings-row.warn-row .s-row-value { color: #C07000; font-weight: 600; }
.settings-warn-pill {
  display: inline-block;
  background: #FEF3C7;
  color: #92400E;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 3px;
  width: fit-content;
}
.settings-update-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  border: 1.5px solid #0A7B7B;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-top: 2px;
}
.s-update-title { font-size: 15px; font-weight: 600; color: #0A7B7B; margin-bottom: 6px; }
.s-update-body { font-size: 13px; color: #555; line-height: 1.4; margin-bottom: 14px; }
.s-update-btn {
  background: #0A7B7B; color: #fff;
  border: none; border-radius: 100px;
  padding: 10px 20px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
}

/* Dialog overlay must be a direct child of .phone-frame to cover edge to edge */

/* Status bar */
.status-bar {
  background: #D6D6D6;
  padding: 14px 24px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #1A1A1A;
}
.status-bar .time { font-size: 15px; font-weight: 700; }
.status-icons { display: flex; align-items: center; gap: 4px; font-size: 11px; }

/* App screen */
.app-screen {
  background: #D6D6D6;
  min-height: 750px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 32px;
}

/* Gusto logo */
.gusto-logo {
  font-size: 36px;
  font-weight: 700;
  color: #E8552A;
  letter-spacing: -0.5px;
  margin: 20px 0 16px;
}

/* Login card */
.login-card {
  background: #fff;
  border-radius: 16px;
  width: 327px;
  padding: 24px 20px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  position: relative;
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  color: #1A1A1A;
  text-align: center;
  margin-bottom: 16px;
}

.email-input {
  border: 1.5px solid #C8C8C8;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 15px;
  color: #888;
  width: 100%;
  margin-bottom: 8px;
}

.forgot-link {
  color: #0A7B7B;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
  display: block;
}

.biometrics-btn {
  display: block;
  width: 100%;
  border: 2px solid #0A7B7B;
  border-radius: 8px;
  color: #0A7B7B;
  font-size: 16px;
  font-weight: 600;
  padding: 14px;
  text-align: center;
  margin-top: 8px;
  background: transparent;
}

/* Bottom links */
.bottom-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  width: 327px;
}
.bottom-links a {
  color: #0A7B7B;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
}

/* Home indicator */
.home-indicator {
  width: 134px;
  height: 5px;
  background: #1A1A1A;
  border-radius: 3px;
  margin: 16px auto 8px;
  opacity: 0.3;
}

/* Dialog overlay */
.dialog-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  z-index: 10;
}

/* Android Material 3 AlertDialog */
.dialog {
  background: #EEF2F2; /* M3 surfaceContainerHigh, teal-tinted for Gusto */
  border-radius: 28px;
  width: 312px;
  padding: 24px 24px 20px;
  box-shadow:
    0 4px 8px rgba(0,0,0,0.12),
    0 8px 24px rgba(0,0,0,0.10);
}

/* M3 headlineSmall: 24sp, not bold by default but Gusto theme uses medium */
.dialog-title {
  font-size: 24px;
  font-weight: 500;
  color: #1A1A1A;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: 0;
}

/* M3 bodyMedium: 14sp */
.dialog-body {
  font-size: 14px;
  font-weight: 400;
  color: #3D3D3D;
  line-height: 1.43;
  margin-bottom: 24px;
  letter-spacing: 0.01em;
}

/* M3: text buttons, right-aligned, 8dp gap */
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* M3 labelLarge: 14sp, medium weight, uppercase tracking */
.dialog-btn {
  color: #0A7B7B;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 100px;
  line-height: 1;
}
.dialog-btn:hover { background: rgba(10,123,123,0.08); }

/* Nav bar */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 8px;
  background: #fff;
  border-top: 1px solid #E8E8E8;
  gap: 8px;
  flex-wrap: wrap;
}
.nav-bar a {
  color: #0A7B7B;
  font-size: 11px;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.nav-bar a.active {
  font-weight: 700;
  color: #E8552A;
}
