*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --surface2: #16213e;
  --accent: #e2b96f;
  --accent2: #c89b4a;
  --text: #e8e6f0;
  --text-muted: #9490a8;
  --border: rgba(226, 185, 111, 0.15);
  --danger: #e05c6a;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(226,185,111,0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(100,80,180,0.06) 0%, transparent 60%);
}

/* HEADER */
.header {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 6px rgba(226,185,111,0.5));
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.01em;
}

.install-btn {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.install-btn:hover {
  background: var(--accent);
  color: var(--bg);
}

/* MAIN */
.main {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 640px) {
  .main { grid-template-columns: 1fr; padding: 1.5rem 1rem 3rem; }
}

/* SECTION TITLES */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.count-badge {
  background: var(--accent);
  color: var(--bg);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
}

/* FORM CARD */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

input[type="text"],
input[type="date"],
textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  padding: 0.65rem 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
  width: 100%;
}

input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(226,185,111,0.12);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7) sepia(1) hue-rotate(5deg) saturate(3);
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  border: none;
  border-radius: 8px;
  color: #1a1400;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.75rem 1.2rem;
  transition: opacity 0.2s, transform 0.15s;
  width: 100%;
}

.btn-primary:hover { opacity: 0.92; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

/* ENTRIES LIST */
.entries-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.empty-icon { font-size: 2rem; display: block; margin-bottom: 0.75rem; }
.empty-state p { font-size: 0.9rem; line-height: 1.6; }

/* ENTRY CARD */
.entry-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
  position: relative;
  animation: fadeIn 0.3s ease;
  transition: border-color 0.2s;
}

.entry-card:hover { border-color: rgba(226,185,111,0.3); }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.entry-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  line-height: 1.3;
}

.delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.delete-btn:hover { color: var(--danger); background: rgba(224,92,106,0.1); }

.entry-date {
  font-size: 0.73rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.entry-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}