/* =============================================================================
   Utility apps — System Settings, Calculator, Clock, Weather, Stocks, Reminders
   macOS 27 Liquid Glass fidelity (generic sample data only)
   ============================================================================= */

/* ---------- System Settings ---------- */
#system-settings-app {
  background: rgba(242, 242, 247, 0.92);
}
html[data-theme='dark'] #system-settings-app {
  background: rgba(28, 28, 30, 0.94);
  color: rgba(255, 255, 255, 0.92);
}

.settings-sb {
  width: 220px;
  padding: 10px 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255, 255, 255, 0.42);
  border-right: 0.5px solid rgba(0, 0, 0, 0.08);
}
html[data-theme='dark'] .settings-sb {
  background: rgba(44, 44, 46, 0.55);
  border-right-color: rgba(255, 255, 255, 0.08);
}

.settings-sb .settings-search {
  margin: 4px 4px 10px;
  width: calc(100% - 8px);
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  border: none;
  outline: none;
  color: inherit;
}
html[data-theme='dark'] .settings-sb .settings-search {
  background: rgba(255, 255, 255, 0.08);
}

.settings-sb .app-sidebar-item {
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
}
.settings-sb .app-sidebar-item.is-hidden {
  display: none;
}

.settings-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.25);
}
.settings-icon.wifi { background: linear-gradient(180deg, #0a84ff, #0071e3); }
.settings-icon.bluetooth { background: linear-gradient(180deg, #0a84ff, #0055d4); }
.settings-icon.network { background: linear-gradient(180deg, #30d158, #248a3d); }
.settings-icon.notifications { background: linear-gradient(180deg, #ff453a, #d70015); }
.settings-icon.sound { background: linear-gradient(180deg, #ff453a, #c93400); }
.settings-icon.focus { background: linear-gradient(180deg, #5e5ce6, #3634a3); }
.settings-icon.appearance { background: linear-gradient(180deg, #bf5af2, #8944ab); }
.settings-icon.desktop { background: linear-gradient(180deg, #5e5ce6, #3634a3); }
.settings-icon.displays { background: linear-gradient(180deg, #64d2ff, #0a84ff); }
.settings-icon.wallpaper { background: linear-gradient(135deg, #ff9f0a, #ff375f, #5e5ce6); }
.settings-icon.intelligence { background: linear-gradient(135deg, #bf5af2, #5e5ce6); }
.settings-icon.privacy { background: linear-gradient(180deg, #0a84ff, #0071e3); }
.settings-icon.users { background: linear-gradient(180deg, #8e8e93, #636366); }
.settings-icon.general { background: linear-gradient(180deg, #8e8e93, #636366); }

.settings-main {
  padding: 22px 28px 28px;
  gap: 12px;
  overflow: auto;
}
.settings-main h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.settings-card {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
html[data-theme='dark'] .settings-card {
  background: rgba(44, 44, 46, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
  font-size: 13px;
}
html[data-theme='dark'] .settings-row {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.settings-row:last-child {
  border-bottom: none;
}

.sound-alert-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sound-alert-btn {
  min-width: 72px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.7);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  color: inherit;
}
html[data-theme='dark'] .sound-alert-btn {
  background: rgba(58, 58, 60, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
}
.sound-alert-btn.is-selected {
  background: #0a84ff;
  color: #fff;
  border-color: transparent;
}
.wallpaper-pick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.wallpaper-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: none;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  color: inherit;
}
.wallpaper-pick.is-selected {
  background: rgba(10, 132, 255, 0.12);
  outline: 2px solid #0a84ff;
}
.wp-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 0.5px solid rgba(0, 0, 0, 0.08);
}
.wp-thumb.wp-a {
  background: linear-gradient(145deg, #5b7cfa 0%, #8b5cf6 45%, #ec4899 100%);
}
.wp-thumb.wp-b {
  background: linear-gradient(160deg, #a5f3fc 0%, #67e8f9 40%, #818cf8 100%);
}
.wp-thumb.wp-c {
  background: linear-gradient(135deg, #e0e7ff 0%, #c4b5fd 50%, #fbcfe8 100%);
}

.appearance-seg {
  display: flex;
  gap: 10px;
  padding: 4px;
}
.appearance-seg button {
  flex: 1;
  padding: 12px 8px 10px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 500;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.appearance-seg button .ap-preview {
  width: 64px;
  height: 42px;
  border-radius: 8px;
  border: 0.5px solid rgba(0, 0, 0, 0.12);
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.appearance-seg button .ap-preview.light {
  background: linear-gradient(180deg, #e8e8ed 0 30%, #f5f5f7 30%);
}
.appearance-seg button .ap-preview.dark {
  background: linear-gradient(180deg, #1c1c1e 0 30%, #2c2c2e 30%);
}
.appearance-seg button .ap-preview.auto {
  background: linear-gradient(90deg, #f5f5f7 50%, #1c1c1e 50%);
}
.appearance-seg button.is-selected {
  background: rgba(0, 122, 255, 0.12);
  box-shadow: inset 0 0 0 1.5px #0a84ff;
}
html[data-theme='dark'] .appearance-seg button.is-selected {
  background: rgba(10, 132, 255, 0.22);
}

/* ---------- Calculator (macOS classic layout) ---------- */
.window[data-app='calculator'] .window-body,
.window[data-app='calculator'] .window-content {
  background: #1c1c1e !important;
}
.calc {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #1c1c1e;
  color: #fff;
  padding: 6px 10px 10px;
  gap: 6px;
  user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  box-sizing: border-box;
  overflow: hidden;
  min-height: 0;
}
.calc-display {
  text-align: right;
  font-size: clamp(36px, 8vh, 48px);
  font-weight: 200;
  padding: 8px 12px 4px;
  letter-spacing: 0.5px;
  min-height: 48px;
  max-height: 64px;
  flex-shrink: 0;
  line-height: 1.1;
  word-break: break-all;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.calc-keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  align-content: stretch;
}
.calc-key {
  appearance: none;
  border: none;
  border-radius: 50%;
  background: #333336;
  color: #fff;
  font-size: clamp(18px, 2.6vh, 24px);
  font-weight: 400;
  cursor: pointer;
  /* Prefer square but allow shrink so bottom row never clips */
  aspect-ratio: 1;
  width: 100%;
  height: auto;
  max-height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  transition: filter 0.08s ease, background 0.08s ease;
}
.calc-key.fn {
  background: #a5a5a5;
  color: #1c1c1e;
  font-size: 20px;
  font-weight: 500;
}
.calc-key.op {
  background: #ff9f0a;
  color: #fff;
  font-size: 26px;
}
.calc-key.op.is-active {
  background: #fff;
  color: #ff9f0a;
}
.calc-key.wide {
  grid-column: span 2;
  border-radius: 999px;
  aspect-ratio: auto;
  justify-content: flex-start;
  padding-left: 28px;
  place-items: center start;
}
.calc-key:active {
  filter: brightness(1.35);
}
.calc-key.fn:active {
  filter: brightness(1.1);
}

/* Memory strip — compact text, never giant circles */
.calc-mem {
  display: flex;
  flex-shrink: 0;
  gap: 2px;
  padding: 0 6px 2px;
  justify-content: flex-end;
  align-items: center;
}
.calc-mem-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
  min-width: 0;
  aspect-ratio: auto;
}
.calc-mem-btn:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
}
.calc-mem-btn:active {
  background: rgba(255, 255, 255, 0.14);
}
.calc-history {
  flex-shrink: 0;
  max-height: 56px;
}

/* ---------- Clock ---------- */
.clock-app {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: rgba(246, 246, 248, 0.9);
  color: #1d1d1f;
}
html[data-theme='dark'] .clock-app {
  background: rgba(28, 28, 30, 0.96);
  color: rgba(255, 255, 255, 0.92);
}

.clock-tabs {
  display: flex;
  gap: 2px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 9px;
  padding: 3px;
  margin: 12px 14px 0;
  flex-shrink: 0;
}
html[data-theme='dark'] .clock-tabs {
  background: rgba(255, 255, 255, 0.08);
}
.clock-tabs button,
.clock-tabs span {
  flex: 1;
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  text-align: center;
  padding: 7px 4px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  cursor: default;
  font-family: inherit;
}
.clock-tabs button.active,
.clock-tabs span.active {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  font-weight: 600;
}
html[data-theme='dark'] .clock-tabs button.active,
html[data-theme='dark'] .clock-tabs span.active {
  background: rgba(99, 99, 102, 0.95);
  color: #fff;
}

.clock-panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 0 12px;
}
.clock-panel[hidden] {
  display: none !important;
}

.world-clocks {
  display: flex;
  flex-direction: column;
}
.wc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
  gap: 12px;
}
html[data-theme='dark'] .wc-row {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.wc-row strong {
  font-size: 16px;
  font-weight: 600;
}
.wc-meta {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
  margin-top: 2px;
}
html[data-theme='dark'] .wc-meta {
  color: rgba(255, 255, 255, 0.45);
}
.wc-right {
  text-align: right;
  display: flex;
  align-items: center;
  gap: 12px;
}
.wc-time {
  font-size: 32px;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.wc-ampm {
  font-size: 13px;
  opacity: 0.55;
  font-weight: 400;
}

/* Mini analog face */
.wc-analog {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.18);
  position: relative;
  flex-shrink: 0;
  background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.9), rgba(240, 240, 245, 0.95));
}
html[data-theme='dark'] .wc-analog {
  border-color: rgba(255, 255, 255, 0.25);
  background: radial-gradient(circle at 40% 35%, #3a3a3c, #2c2c2e);
}
.wc-analog .hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform-origin: bottom center;
  background: #1d1d1f;
  border-radius: 1px;
}
html[data-theme='dark'] .wc-analog .hand {
  background: #f5f5f7;
}
.wc-analog .hand.hour {
  width: 2px;
  height: 11px;
  margin-left: -1px;
}
.wc-analog .hand.minute {
  width: 1.5px;
  height: 15px;
  margin-left: -0.75px;
  opacity: 0.75;
}
.wc-analog .hand.second {
  width: 1px;
  height: 16px;
  margin-left: -0.5px;
  background: #ff3b30 !important;
}
.wc-analog .dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: #ff3b30;
}

/* Alarms */
.alarm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
}
html[data-theme='dark'] .alarm-row {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.alarm-time {
  font-size: 36px;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.alarm-label {
  font-size: 12px;
  opacity: 0.5;
  margin-top: 2px;
}

/* Stopwatch */
.stopwatch-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 16px 16px;
  gap: 20px;
}
.sw-time {
  font-size: 56px;
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  font-feature-settings: 'tnum';
}
.sw-controls {
  display: flex;
  gap: 28px;
  align-items: center;
}
.sw-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
html[data-theme='dark'] .sw-btn {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}
.sw-btn.primary {
  background: rgba(48, 209, 88, 0.18);
  border-color: rgba(48, 209, 88, 0.45);
  color: #248a3d;
}
html[data-theme='dark'] .sw-btn.primary {
  color: #30d158;
}
.sw-btn.stop {
  background: rgba(255, 69, 58, 0.15);
  border-color: rgba(255, 69, 58, 0.4);
  color: #ff453a;
}
.sw-laps {
  width: 100%;
  max-width: 320px;
  font-size: 13px;
}
.sw-lap {
  display: flex;
  justify-content: space-between;
  padding: 8px 4px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
  font-variant-numeric: tabular-nums;
}
html[data-theme='dark'] .sw-lap {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Timers */
.timers-view {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.timer-display {
  text-align: center;
  font-size: 52px;
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  padding: 12px 0 4px;
}
.timer-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.timer-preset {
  appearance: none;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.65);
  border-radius: 12px;
  padding: 14px 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: inherit;
}
html[data-theme='dark'] .timer-preset {
  background: rgba(44, 44, 46, 0.9);
  border-color: rgba(255, 255, 255, 0.1);
}
.timer-preset:hover,
.timer-preset.is-selected {
  border-color: #0a84ff;
  background: rgba(10, 132, 255, 0.12);
}
.timer-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 4px;
}

/* ---------- Weather ---------- */
.weather-app {
  height: 100%;
  background: linear-gradient(165deg, #1b4f9c 0%, #3a7bd5 38%, #5dade2 72%, #85c1e9 100%);
  color: #fff;
  padding: 16px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}
.wx-hero {
  text-align: center;
  padding: 8px 0 4px;
}
.wx-city {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.15);
}
.wx-temp {
  font-size: 84px;
  font-weight: 200;
  line-height: 1;
  margin: 2px 0;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.12);
}
.wx-cond {
  font-size: 18px;
  font-weight: 500;
  opacity: 0.95;
}
.wx-hl {
  font-size: 15px;
  opacity: 0.88;
  margin-top: 4px;
}
.wx-hourly,
.wx-days {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  border: 0.5px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  padding: 12px 10px;
  flex-shrink: 0;
}
.wx-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.7;
  padding: 0 6px 8px;
}
.wx-hourly {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.wx-hourly-strip {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.wx-hourly-strip::-webkit-scrollbar {
  display: none;
}
.wx-h {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 52px;
  font-size: 13px;
  padding: 4px 2px;
}
.wx-h .wx-h-icon {
  font-size: 18px;
  line-height: 1;
}
.wx-h .wx-h-temp {
  font-weight: 500;
}
.wx-h.is-now {
  font-weight: 600;
}
.wx-days {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px 12px;
}
.wx-d {
  display: grid;
  grid-template-columns: 52px 28px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 2px;
  font-size: 15px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.12);
}
.wx-d:last-child {
  border-bottom: none;
}
.wx-d-day {
  font-weight: 500;
}
.wx-d-icon {
  text-align: center;
  font-size: 16px;
}
.wx-d-bar {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #64d2ff, #ffd60a, #ff9f0a);
  opacity: 0.85;
  margin: 0 8px;
}
.wx-d-temps {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 14px;
}
.wx-d-temps .lo {
  opacity: 0.65;
  margin-right: 8px;
}
.wx-d-temps .hi {
  font-weight: 500;
}

/* ---------- Stocks ---------- */
.stocks-app {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(246, 246, 248, 0.92);
  color: #1d1d1f;
}
html[data-theme='dark'] .stocks-app {
  background: rgba(28, 28, 30, 0.96);
  color: rgba(255, 255, 255, 0.92);
}
.stocks-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
html[data-theme='dark'] .stocks-toolbar {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.stocks-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.stocks-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0;
}
.stock-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
  cursor: default;
}
html[data-theme='dark'] .stock-row {
  border-bottom-color: rgba(255, 255, 255, 0.07);
}
.stock-row:hover {
  background: rgba(0, 0, 0, 0.03);
}
.stock-row.is-selected {
  background: rgba(0, 122, 255, 0.1);
}
html[data-theme='dark'] .stock-row.is-selected {
  background: rgba(10, 132, 255, 0.18);
}
.stock-sym {
  font-weight: 600;
  font-size: 14px;
}
.stock-name {
  font-size: 11px;
  opacity: 0.5;
  margin-top: 1px;
}
.stock-price {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 500;
  text-align: right;
  min-width: 64px;
}
.stock-change {
  min-width: 68px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 4px 8px;
  border-radius: 6px;
  color: #fff;
}
.stock-change.up {
  background: #30d158;
}
.stock-change.down {
  background: #ff453a;
}

.stock-chart {
  margin: 0;
  height: 160px;
  flex-shrink: 0;
  border-top: 0.5px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.45);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
html[data-theme='dark'] .stock-chart {
  border-top-color: rgba(255, 255, 255, 0.08);
  background: rgba(22, 22, 24, 0.6);
}
.stock-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 14px 0;
  font-size: 12px;
}
.stock-chart-header strong {
  font-size: 15px;
}
.stock-chart-svg {
  flex: 1;
  width: 100%;
  height: 100%;
  padding: 8px 8px 12px;
  box-sizing: border-box;
}
.stock-chart-svg path.line {
  fill: none;
  stroke: #30d158;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.stock-chart-svg path.line.down {
  stroke: #ff453a;
}
.stock-chart-svg path.area {
  fill: url(#stockFillUp);
  opacity: 0.35;
}
.stock-chart-svg path.area.down {
  fill: url(#stockFillDown);
}
.stock-range {
  display: flex;
  gap: 4px;
  padding: 0 12px 10px;
  font-size: 11px;
  font-weight: 500;
}
.stock-range span {
  padding: 3px 8px;
  border-radius: 999px;
  opacity: 0.55;
  cursor: default;
}
.stock-range span.active {
  background: rgba(0, 122, 255, 0.15);
  color: #0a84ff;
  opacity: 1;
}

/* ---------- Reminders ---------- */
.reminders-app {
  height: 100%;
  display: flex;
  background: rgba(246, 246, 248, 0.92);
  color: #1d1d1f;
}
html[data-theme='dark'] .reminders-app {
  background: rgba(28, 28, 30, 0.96);
  color: rgba(255, 255, 255, 0.92);
}
.reminders-sb {
  width: 200px;
  flex-shrink: 0;
  padding: 12px 10px;
  background: rgba(255, 255, 255, 0.38);
  border-right: 0.5px solid rgba(0, 0, 0, 0.08);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
html[data-theme='dark'] .reminders-sb {
  background: rgba(44, 44, 46, 0.55);
  border-right-color: rgba(255, 255, 255, 0.08);
}
.rem-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.45;
  padding: 12px 10px 6px;
}
.rem-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: default;
  font-size: 13px;
  font-weight: 500;
}
.rem-list-item:hover {
  background: rgba(0, 0, 0, 0.05);
}
.rem-list-item.active {
  background: rgba(0, 122, 255, 0.88);
  color: #fff;
}
.rem-list-item.active .rem-count {
  color: rgba(255, 255, 255, 0.85);
}
.rem-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rem-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.5;
  font-variant-numeric: tabular-nums;
}
.rem-smart-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}
.rem-smart-icon.today { background: #0a84ff; }
.rem-smart-icon.scheduled { background: #ff9f0a; }
.rem-smart-icon.all { background: #8e8e93; }
.rem-smart-icon.flagged { background: #ff453a; }

.reminders-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rem-header {
  padding: 16px 20px 8px;
  flex-shrink: 0;
}
.rem-header h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0a84ff;
}
.rem-header h2.orange { color: #ff9f0a; }
.rem-header h2.gray { color: #8e8e93; }
.rem-header h2.red { color: #ff453a; }
.rem-header h2.blue { color: #0a84ff; }
.rem-header h2.green { color: #30d158; }
.rem-header h2.purple { color: #bf5af2; }

.reminder-list {
  flex: 1;
  overflow: auto;
  padding: 4px 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.reminder-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 8px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  font-size: 15px;
}
html[data-theme='dark'] .reminder-item {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.reminder-item input[type='checkbox'] {
  display: none;
}
.rem-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
  margin-top: 1px;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease;
  background: transparent;
}
html[data-theme='dark'] .rem-circle {
  border-color: rgba(255, 255, 255, 0.28);
}
.reminder-item.is-done .rem-circle,
.reminder-item input:checked + .rem-circle {
  background: #0a84ff;
  border-color: #0a84ff;
}
.reminder-item.is-done .rem-circle::after,
.reminder-item input:checked + .rem-circle::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.reminder-item .rem-text {
  flex: 1;
  line-height: 1.35;
}
.reminder-item.is-done .rem-text,
.reminder-item .rem-text.done {
  text-decoration: line-through;
  opacity: 0.4;
}
.rem-note {
  display: block;
  font-size: 12px;
  opacity: 0.45;
  margin-top: 2px;
}
.rem-add {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px 16px;
  color: #0a84ff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}
.rem-add:hover {
  opacity: 0.85;
}
.rem-add-plus {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0a84ff;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}
.rem-inline-input {
  width: 100%;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  outline: none;
  padding: 0;
  margin: 0;
}
.reminder-item.is-editing {
  background: rgba(10, 132, 255, 0.08);
  border-radius: 8px;
}

/* Dark text fixes for shared muted in utilities */
html[data-theme='dark'] .clock-app .muted,
html[data-theme='dark'] .stocks-app .muted,
html[data-theme='dark'] .reminders-app .muted,
html[data-theme='dark'] #system-settings-app .muted {
  color: rgba(255, 255, 255, 0.45);
}
