/* ---------- Stage (Phone area) ---------- */
.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(250,110,102,0.08), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(115,229,234,0.06), transparent 50%),
    #0a0a0a;
}

.toolbar {
  position: absolute;
  top: 16px;
  left: 50%; transform: translateX(-50%);
  display: flex;
  gap: 8px;
  background: rgba(26, 26, 26, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  padding: 6px;
  z-index: 10;
}
.toolbar button {
  height: 32px;
  padding: 0 14px;
  display: flex; align-items: center; gap: 6px;
  color: #aaa;
  border-radius: 999px;
  font-size: 12px;
  transition: all 0.15s;
}
.toolbar button:hover { background: #2a2a2a; color: #fff; }
.toolbar button.is-icon { width: 32px; padding: 0; justify-content: center; }
.toolbar svg { width: 14px; height: 14px; }

.toolbar__divider { width: 1px; background: #2a2a2a; margin: 4px 2px; }

.toolbar__title {
  display: flex; flex-direction: column;
  padding: 0 12px;
  min-width: 180px;
  text-align: center;
}
.toolbar__title-main { font-size: 12px; color: #fff; font-weight: 600; }
.toolbar__title-sub { font-size: 10px; color: #666; }

/* ---------- Phone Frame ---------- */
.phone {
  width: 440px;
  height: 880px;
  border-radius: 60px;
  background: #1a1a1a;
  padding: 16px;
  box-shadow:
    0 0 0 2px #2a2a2a,
    0 30px 80px rgba(0,0,0,0.7),
    0 0 120px rgba(250,110,102,0.08);
  position: relative;
}
.phone::before {
  /* Side buttons */
  content: "";
  position: absolute;
  left: -3px;
  top: 110px;
  width: 3px;
  height: 30px;
  background: #2a2a2a;
  border-radius: 2px 0 0 2px;
  box-shadow: 0 50px 0 #2a2a2a, 0 90px 0 #2a2a2a;
}
.phone::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 140px;
  width: 3px;
  height: 60px;
  background: #2a2a2a;
  border-radius: 0 2px 2px 0;
}

.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 46px;
  overflow: hidden;
}

/* Dynamic Island */
.phone__island {
  position: absolute;
  top: 11px; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 35px;
  background: #000;
  border-radius: 20px;
  z-index: 100;
  pointer-events: none;
}

/* ========================================================================
   Mobile Screen Base
   ======================================================================== */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.screen::-webkit-scrollbar { width: 4px; }
.screen::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.screen[hidden] { display: none; }

/* Status Bar (iOS-ish) */
.status-bar {
  height: 44px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}
.status-bar__icons { display: flex; align-items: center; gap: 6px; }
.status-bar__icons svg { width: 16px; height: 16px; }
.status-bar__battery {
  width: 26px; height: 12px;
  border: 1px solid var(--fg);
  border-radius: 3px;
  padding: 1px;
  position: relative;
  opacity: 0.95;
}
.status-bar__battery::after {
  content: ""; position: absolute;
  right: -3px; top: 3px; height: 6px; width: 2px;
  background: var(--fg);
  border-radius: 0 1px 1px 0;
}
.status-bar__battery-fill {
  height: 100%; width: 80%;
  background: var(--fg);
  border-radius: 1px;
}

/* Home indicator */
.home-indicator {
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  width: 134px; height: 5px;
  background: var(--fg);
  opacity: 0.85;
  border-radius: 999px;
  z-index: 50;
}

/* ========================================================================
   Reusable Mobile Components
   ======================================================================== */

/* Top bar */
.topbar {
  height: 56px;
  flex-shrink: 0;
  display: flex; align-items: center;
  padding: 14px 20px;
  gap: 14px;
  color: var(--fg);
}
.topbar__back {
  display: grid; place-items: center;
  width: 24px; height: 24px;
  flex-shrink: 0;
  color: var(--fg);
}
.topbar__back svg { width: 24px; height: 24px; }
.topbar__title { font-size: 14px; font-weight: 600; }
.topbar__spacer { flex: 1; }
.topbar__action { color: var(--fg); display: grid; place-items: center; width: 28px; height: 28px; }
.topbar__action svg { width: 22px; height: 22px; }

/* ========================================================================
   Priority Highlight switch & outlining
   ======================================================================== */

/* Toggle Switch Container */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
}

/* Hide default HTML checkbox */
.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #333;
  transition: .3s;
  border-radius: 20px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .switch-slider {
  background-color: var(--primary);
}

input:checked + .switch-slider:before {
  transform: translateX(14px);
}

/* Sidebar priority badges styling */
.nav-item__badge {
  display: none;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  color: #fff;
  margin-left: auto;
  line-height: 1.2;
}

/* Badges show up when highlight is active */
.show-priority .nav-item__badge {
  display: inline-block;
}

.priority-badge-1 { background-color: #4CAF50; }
.priority-badge-2 { background-color: #707EFA; }
.priority-badge-3 { background-color: #FAAB67; }

/* Outlines for priority items inside mock screen */
.show-priority [data-priority="1"] {
  outline: 2px dashed #4CAF50 !important;
  outline-offset: 1px;
}

.show-priority [data-priority="2"] {
  outline: 2px dashed #707EFA !important;
  outline-offset: 1px;
}

.show-priority [data-priority="3"] {
  outline: 2px dashed #FAAB67 !important;
  outline-offset: 1px;
}

