:root {
  --bg: #f5f7fb;
  --panel: rgba(255, 255, 255, 0.78);
  --border: rgba(148, 163, 184, 0.18);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-2: #06b6d4;
  --accent-3: #f97316;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.16), transparent 28%),
    linear-gradient(180deg, #eef4ff 0%, #f8fafc 50%, #eef2ff 100%);
}

.app-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero,
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1.45fr 0.9fr;
  gap: 24px;
  border-radius: 34px;
  padding: 32px;
  margin-bottom: 24px;
}

.eyebrow,
.panel-label {
  margin: 0 0 10px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(2.7rem, 6vw, 4.8rem);
  line-height: 0.95;
}

.hero-text {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-actions,
.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn,
.icon-btn,
.text-btn {
  font: inherit;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.btn:hover,
.icon-btn:hover,
.text-btn:hover {
  transform: translateY(-1px);
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
}

.btn-secondary {
  background: #0f172a;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(100, 116, 139, 0.24);
}

.hero-side {
  display: grid;
  gap: 14px;
}

.hero-stat {
  border-radius: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(37, 99, 235, 0.1);
}

.hero-stat.accent {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(6, 182, 212, 0.12));
}

.hero-stat span,
.muted-text {
  color: var(--muted);
}

.hero-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
}

.workspace {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 24px;
}

.panel {
  border-radius: 30px;
  padding: 24px;
}

.sidebar {
  display: grid;
  gap: 18px;
  align-content: start;
}

.sidebar-top,
.editor-top,
.preview-top,
.list-header,
.tag-bar-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

h2 {
  margin: 0;
  font-size: 1.4rem;
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
}

.search-wrap,
.editor-form label {
  display: grid;
  gap: 8px;
}

.search-wrap span,
.editor-form span,
.tag-bar-top span {
  font-size: 0.92rem;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  padding: 14px 15px;
  font: inherit;
}

textarea {
  resize: vertical;
  min-height: 220px;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.25);
  border-color: transparent;
}

.tag-filters,
.preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent);
  font-weight: 700;
}

.tag-chip.active {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: white;
}

.note-list-wrap {
  min-height: 420px;
}

.note-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.note-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  padding: 16px;
  display: grid;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.note-card:hover,
.note-card.active {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.1);
}

.note-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.note-title-row strong {
  font-size: 1rem;
}

.pin-badge {
  font-size: 0.9rem;
}

.note-snippet,
.note-meta {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
}

.editor-column {
  display: grid;
  gap: 24px;
}

.editor-form {
  display: grid;
  gap: 14px;
}

.editor-form .wide {
  grid-column: 1 / -1;
}

.editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.icon-btn {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 10px 12px;
}

.icon-btn.active {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: white;
}

.icon-btn.danger {
  color: #dc2626;
}

.preview-body {
  min-height: 220px;
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(248,250,252,0.86));
  border: 1px solid rgba(148, 163, 184, 0.14);
  line-height: 1.8;
}

.preview-body h3 {
  margin-top: 0;
  font-size: 1.5rem;
}

.preview-body p {
  margin: 0 0 14px;
}

.empty-state {
  color: var(--muted);
  padding: 18px 0;
}

@media (max-width: 980px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }
}
