:root {
  --accent: #7c5cff;
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.10);
  --text-primary: #f2f2f7;
  --text-muted: #9a9aab;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  overflow-x: hidden;
}

#bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  background-size: cover;
  background-position: center;
  transition: background 0.4s ease;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  min-height: 100vh;
}

/* Topbar / clock */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 10px 40px;
}

.clock-widget {
  text-align: left;
}

.clock {
  font-size: 3.2rem;
  font-weight: 600;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

.date {
  font-size: 1.05rem;
  color: var(--text-muted);
  text-transform: capitalize;
  margin-top: 4px;
}

.icon-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 0.2s ease, transform 0.2s ease;
}
.icon-btn:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-1px);
}

/* Grid / cards */

.grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}

@media (max-width: 800px) {
  .grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px 22px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  min-height: 280px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.card-header h2 {
  font-size: 1.05rem;
  margin: 0;
  font-weight: 600;
}

.mini-btn {
  background: var(--accent);
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.mini-btn:hover { opacity: 0.85; }

/* Notities */

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
}

.note-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 12px;
  position: relative;
}

.note-item textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  resize: vertical;
  min-height: 60px;
  outline: none;
}

.note-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.note-meta .timestamp {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.delete-note {
  background: none;
  border: none;
  color: #ff6b6b;
  cursor: pointer;
  font-size: 0.8rem;
}

.empty-state {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 40px 0;
}

/* Agenda placeholder */

.agenda-placeholder {
  color: var(--text-muted);
  padding: 20px 0;
}
.agenda-placeholder .muted { font-size: 0.85rem; }

/* Settings panel */

.settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100%;
  background: #14141f;
  border-left: 1px solid var(--card-border);
  padding: 20px;
  z-index: 50;
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.settings-panel.hidden {
  transform: translateX(100%);
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.settings-section {
  margin-bottom: 22px;
}

.settings-section label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.option-row {
  display: flex;
  gap: 8px;
}

.option-btn {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 8px 4px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
}
.option-btn.active {
  border-color: var(--accent);
  background: rgba(124,92,255,0.18);
}

.swatch-row {
  display: flex;
  gap: 10px;
}

.swatch {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
}
.swatch.active {
  border-color: white;
}

input[type="color"] {
  width: 60px;
  height: 36px;
  border: none;
  background: none;
  cursor: pointer;
}

input[type="file"] {
  color: var(--text-muted);
  font-size: 0.85rem;
}
