/* ============================================================
   macOS Web — app styles (Calculator, Notes, Terminal, Settings)
   ============================================================ */

/* ---------------- Calculator ---------------- */

.calc {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(38, 38, 41, 0.96);
  padding-top: 40px; /* room for overlay titlebar */
}
.calc-display {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 18px 8px;
  color: #fff;
  font-weight: 300;
  font-size: 52px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
}
.calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5px;
  padding: 1.5px;
}
.calc-btn {
  height: 56px;
  border: none;
  font-family: var(--font-ui);
  font-size: 21px;
  color: #fff;
  background: #5f5f63;
  cursor: default;
  transition: filter 0.05s;
}
.calc-btn:active { filter: brightness(1.45); }
.calc-btn.fn { background: #484a4d; font-size: 19px; }
.calc-btn.op { background: #ff9f0a; font-size: 26px; }
.calc-btn.op.held { background: #fff; color: #ff9f0a; }
.calc-btn.zero { grid-column: span 2; text-align: left; padding-left: 24px; }

/* ---------------- Notes ---------------- */

.notes {
  flex: 1;
  display: flex;
  min-height: 0;
}
.notes-sidebar {
  width: 220px;
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--menu-sep);
  min-height: 0;
}
.notes-search {
  margin: 10px;
  padding: 5px 10px 5px 28px;
  border: none;
  border-radius: 7px;
  background: var(--hover-bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
  outline: none;
}
.notes-search-wrap { position: relative; display: flex; flex-direction: column; }
.notes-search-wrap svg {
  position: absolute;
  left: 18px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}
.notes-list { flex: 1; overflow-y: auto; padding: 0 10px 10px; }
.note-row {
  padding: 9px 12px;
  border-radius: 8px;
  cursor: default;
}
.note-row + .note-row { margin-top: 2px; }
.note-row.selected { background: #ffd60a; }
.note-row.selected .note-row-title { color: #1d1d1f; }
.note-row.selected .note-row-meta { color: rgba(0,0,0,0.55); }
.note-row-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.note-row-meta {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.notes-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--pane-bg);
  min-width: 0;
}
.notes-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--menu-sep);
}
.notes-toolbar .spacer { flex: 1; }
.tool-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 26px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  cursor: default;
}
.tool-btn:hover { background: var(--hover-bg); color: var(--text); }
.notes-date {
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  padding: 12px 0 0;
}
.notes-editor {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  padding: 10px 22px 22px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14.5px;
  line-height: 1.5;
}
.notes-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 15px;
}

/* ---------------- Terminal ---------------- */

.terminal {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(24, 24, 27, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 46px 10px 10px;
  min-height: 0;
}
.term-scroll {
  flex: 1;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.45;
  color: #e8e8e8;
  user-select: text;
}
.term-scroll::-webkit-scrollbar { width: 8px; }
.term-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 4px; }
.term-line { white-space: pre-wrap; word-break: break-all; }
.term-prompt-user { color: #7ee787; }
.term-prompt-path { color: #79c0ff; }
.term-dir { color: #79c0ff; font-weight: 700; }
.term-err { color: #ff7b72; }
.term-dim { color: #8b949e; }
.term-input-row { display: flex; }
.term-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: #e8e8e8;
  font-family: var(--font-mono);
  font-size: 12.5px;
  caret-color: #aeafad;
  padding: 0;
}
.nf-apple { line-height: 1.15; }
.nf-g { color: #7ee787; }
.nf-y { color: #f2cc60; }
.nf-o { color: #ffa657; }
.nf-r { color: #ff7b72; }
.nf-p { color: #d2a8ff; }
.nf-b { color: #79c0ff; }
.nf-k { color: #79c0ff; font-weight: 700; }

/* ---------------- System Settings ---------------- */

.settings {
  flex: 1;
  display: flex;
  min-height: 0;
}
.settings-sidebar {
  width: 215px;
  flex: 0 0 215px;
  display: flex;
  flex-direction: column;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--menu-sep);
  padding: 10px;
  overflow-y: auto;
  min-height: 0;
}
.settings-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.settings-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0a84ff, #5e5ce6);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 17px;
}
.settings-profile-name { font-size: 13px; font-weight: 700; color: var(--text); }
.settings-profile-sub { font-size: 11.5px; color: var(--text-dim); }

.settings-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text);
  cursor: default;
}
.settings-item.selected { background: var(--accent); color: #fff; }
.settings-icon {
  width: 24px; height: 24px;
  flex: 0 0 24px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.settings-icon svg { width: 15px; height: 15px; }
.settings-group-sep { height: 10px; }

.settings-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--pane-bg);
  overflow-y: auto;
  padding: 18px 22px;
  min-width: 0;
}
.settings-h1 { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 16px; }
.settings-section {
  background: var(--win-bg);
  border: 1px solid var(--menu-sep);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.settings-section-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px; }

.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.wallpaper-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  cursor: default;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.12s;
}
.wallpaper-thumb.selected { outline-color: var(--accent); }
.wallpaper-name {
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--text-dim);
  text-align: center;
}

.appearance-row { display: flex; gap: 14px; }
.appearance-opt { text-align: center; cursor: default; }
.appearance-opt .ap-preview {
  width: 110px; height: 72px;
  border-radius: 9px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.12s;
}
.appearance-opt.selected .ap-preview { outline-color: var(--accent); }
.appearance-opt .ap-label { margin-top: 6px; font-size: 12px; color: var(--text); }

.accent-row { display: flex; gap: 12px; align-items: center; }
.accent-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  cursor: default;
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
}
.accent-dot.selected { box-shadow: 0 0 0 2.5px var(--pane-bg), 0 0 0 4.5px currentColor; }

.settings-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 14px;
}
.settings-placeholder .ph-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.settings-placeholder .ph-icon svg { width: 36px; height: 36px; }

/* ---------------- About This Mac ---------------- */

.about {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 52px 30px 30px;
  background: var(--win-bg);
}
.about-logo { font-size: 0; margin-bottom: 18px; }
.about-logo svg { width: 72px; height: 72px; color: var(--text); }
.about h1 { font-size: 26px; font-weight: 800; color: var(--text); }
.about .about-ver { font-size: 13px; color: var(--text-dim); margin: 4px 0 22px; }
.about table { font-size: 12.5px; border-spacing: 0 4px; }
.about td { padding: 0 8px; }
.about td:first-child { text-align: right; color: var(--text-dim); }
.about td:last-child { text-align: left; color: var(--text); }
