:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7fb;
  color: #1f2937;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, #eef2ff 100%);
}

img {
  max-width: 100%;
}

.page-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.08);
}

.app-header h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
}

.app-header p {
  margin: 12px 0 0;
  max-width: 560px;
  line-height: 1.7;
  color: #4b5563;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  margin-top: 24px;
}

.note-form-card,
.notes-panel {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  padding: 28px;
}

.note-form-card h2,
.notes-panel h2 {
  margin: 0 0 18px;
  font-size: 1.3rem;
}

.note-form {
  display: grid;
  gap: 16px;
}

.note-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #111827;
}

.note-form input,
.note-form textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  padding: 14px 16px;
  background: #f9fafb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font: inherit;
  color: #111827;
}

.note-form input:focus,
.note-form textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
  background: #ffffff;
}

.note-form textarea {
  resize: vertical;
}

.note-form button {
  justify-self: start;
  padding: 14px 24px;
  border: none;
  border-radius: 999px;
  background: #4f46e5;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.note-form button:hover {
  background: #4338ca;
  transform: translateY(-1px);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.note-count {
  color: #6b7280;
  font-size: 0.95rem;
}

.notes-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.note-item {
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.note-item h3 {
  margin: 0;
  font-size: 1.1rem;
}

.note-item p {
  margin: 0;
  color: #475569;
  line-height: 1.7;
}

.note-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: #6b7280;
  font-size: 0.9rem;
}

.delete-link {
  color: #ef4444;
  text-decoration: none;
  font-weight: 600;
}

.delete-link:hover {
  text-decoration: underline;
}

.empty-state {
  padding: 32px;
  text-align: center;
  border-radius: 20px;
  background: #eef2ff;
  color: #4f46e5;
}

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

@media (max-width: 640px) {
  .page-shell {
    padding: 18px;
  }

  .app-header {
    flex-direction: column;
    align-items: stretch;
  }

  .note-form-card,
  .notes-panel {
    padding: 22px;
  }

  .note-form button {
    width: 100%;
  }
}
