:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #5f6b7a;
  --accent: #0ea5e9;
  --border: #dce3ef;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100dvh;
  overflow: hidden;
  background: linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.app-shell {
  position: relative;
  height: 100dvh;
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.notification-card {
  background: linear-gradient(145deg, #ffffff, #f4f8ff);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.notification-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.notification-app,
.notification-time {
  font-size: 0.78rem;
  color: #6a7686;
  font-weight: 600;
}

.notification-title {
  font-weight: 700;
  font-size: 0.98rem;
}

.notification-text {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.25;
}

.content-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  flex: 1;
}

h1 {
  margin: 0;
  font-size: clamp(1.4rem, 4.8vw, 1.8rem);
}

.nav-row {
  display: flex;
  justify-content: flex-end;
}

.nav-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn {
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 11px;
  width: 100%;
  touch-action: manipulation;
}

.secondary-btn {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 9px 10px;
}

.primary-btn:disabled {
  opacity: 0.6;
}

.control-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.control-row label {
  font-size: 0.9rem;
  color: var(--muted);
}

.control-row select {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  padding: 9px;
  font-size: 0.85rem;
}

.control-row-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.dashboard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.dashboard h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.dashboard p {
  margin: 2px 0;
  font-size: 0.92rem;
  line-height: 1.2;
}

.settings-shell .content-wrap {
  gap: 10px;
}

.settings-panel {
  display: grid;
  gap: 6px;
}

.field-label {
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 600;
}

.field-input {
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--text);
  background: #ffffff;
  padding: 9px 10px;
  width: 100%;
}

.field-area {
  height: 72px;
  resize: none;
}

#cameraFeed {
  position: fixed;
  right: 8px;
  bottom: 8px;
  width: 92px;
  height: 122px;
  border-radius: 10px;
  border: 1px solid #ccd7e9;
  object-fit: cover;
  opacity: 0.65;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#cameraFeed.preview-hidden {
  opacity: 0.05;
  transform: scale(0.75);
}

.privacy-overlay {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay-card {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #101010;
  background: rgba(0, 0, 0, 0.9);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
}

.app-shell.privacy-active .notification-card {
  background: #000000;
  border-color: #000000;
  color: #000000;
}

.app-shell.privacy-active .notification-card .notification-title,
.app-shell.privacy-active .notification-card .notification-text {
  color: #000000;
}

.app-shell.privacy-active .privacy-overlay {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 768px) {
  .app-shell {
    max-width: 520px;
    margin: 0 auto;
  }
}
