:root {
  --bg: #fff7fb;
  --panel: rgba(255, 255, 255, 0.86);
  --text: #2b1b2f;
  --muted: #8c718f;
  --line: #f0ddea;
  --rose: #f35d9f;
  --rose-dark: #c93778;
  --lilac: #8d69f1;
  --cream: #fff0d8;
  --mint: #dff8ee;
  --instagram: #e84c88;
  --tiktok: #1f1f29;
  --shadow: 0 24px 70px rgba(135, 58, 104, 0.16);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, #ffe0f0 0, transparent 34%),
    radial-gradient(circle at top right, #e9ddff 0, transparent 30%),
    linear-gradient(135deg, #fff8fb, #fff3e9 48%, #f9f0ff);
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

[hidden] { display: none !important; }

.auth-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(520px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-brand { margin-bottom: 24px; }
.auth-card h1 {
  margin: 0 0 10px;
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1;
}
.auth-card > p { color: var(--muted); line-height: 1.55; }
.auth-tabs { display: flex; gap: 8px; margin: 24px 0; padding: 5px; border-radius: 999px; background: #faedf5; }
.auth-tabs button { flex: 1; border: 0; border-radius: 999px; padding: 11px; color: var(--muted); background: transparent; font-weight: 800; }
.auth-tabs button.active { color: white; background: var(--rose); }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 7px; font-weight: 800; }
.auth-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  color: var(--text);
  background: white;
  outline: none;
}
.auth-message { min-height: 22px; margin-bottom: 0; color: #b4235a; font-weight: 700; }

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  min-height: 100vh;
  padding: 24px;
}

.sidebar, .hero-panel, .calendar-panel, .details-panel, .content-card, .stat-card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.sidebar {
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: var(--radius-xl);
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 18px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--rose), var(--lilac));
}
.brand p { margin: 0; font-weight: 800; }
.brand span, .eyebrow { color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.user-box {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  padding: 16px;
  border-radius: 18px;
  background: #fff0f7;
}
.user-box span { color: var(--muted); font-size: 0.75rem; font-weight: 800; text-transform: uppercase; }
.user-box strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-list { display: grid; gap: 10px; margin: 34px 0; }
.nav-list a {
  padding: 13px 15px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 16px;
  font-weight: 700;
}
.nav-list a.active, .nav-list a:hover { color: var(--rose-dark); background: #fff0f7; }

.sidebar-card {
  margin-top: auto;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(145deg, #fff0f7, #f0e9ff);
}
.sidebar-card h3 { margin: 8px 0; }
.sidebar-card p { margin: 0; color: var(--muted); line-height: 1.5; }

.main-content { display: grid; gap: 22px; }

.hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 34px;
  border-radius: var(--radius-xl);
}
.hero-panel h1 {
  max-width: 780px;
  margin: 8px 0 10px;
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 0.98;
}
.hero-panel p { max-width: 690px; margin: 0; color: var(--muted); font-size: 1.05rem; line-height: 1.6; }

.primary-btn, .ghost-btn, .view-toggle button, .icon-btn {
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}
.primary-btn {
  padding: 14px 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--lilac));
  box-shadow: 0 15px 35px rgba(222, 71, 139, 0.28);
  white-space: nowrap;
}
.primary-btn.small { padding: 10px 16px; }
.primary-btn.full { width: 100%; }
.ghost-btn {
  padding: 10px 14px;
  color: var(--rose-dark);
  background: #fff1f7;
}
.icon-btn { width: 38px; height: 38px; color: var(--muted); background: #fff1f7; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { padding: 20px; border-radius: var(--radius-lg); }
.stat-card span { color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.stat-card strong { display: block; margin-top: 6px; font-size: 2.4rem; }
.instagram-card strong { color: var(--instagram); }
.tiktok-card strong { color: var(--tiktok); }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; }
.calendar-panel, .details-panel, .content-card { padding: 24px; border-radius: var(--radius-xl); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel-header.compact { margin-bottom: 14px; }
.panel-header h2 { margin: 4px 0 0; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.view-toggle { display: flex; padding: 4px; border-radius: 999px; background: #faedf5; }
.view-toggle button { padding: 8px 12px; color: var(--muted); background: transparent; }
.view-toggle button.active { color: #fff; background: var(--rose); }

.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.calendar-weekdays { margin-bottom: 8px; color: var(--muted); font-size: 0.78rem; font-weight: 800; text-align: center; }
.day-cell {
  min-height: 126px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}
.day-cell.week { min-height: 420px; }
.day-cell.outside { opacity: 0.4; }
.day-cell.selected { outline: 3px solid rgba(243, 93, 159, 0.22); }
.day-number { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 800; }
.today-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); }
.event-pill {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 7px 8px;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  color: white;
  font-size: 0.73rem;
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.event-pill.instagram { background: linear-gradient(135deg, #f05b9b, #bd4de3); }
.event-pill.tiktok { background: linear-gradient(135deg, #20202a, #5d5664); }
.event-pill.both { background: linear-gradient(135deg, #f05b9b, #1f1f29); }

.agenda-list, .idea-list, .task-list { display: grid; gap: 12px; }
.agenda-card, .idea-card, .task-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}
.agenda-card h3, .idea-card h3 { margin: 7px 0; font-size: 1rem; }
.agenda-card p, .idea-card p { margin: 6px 0 0; color: var(--muted); line-height: 1.45; }
.delete-btn {
  margin-top: 12px;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: #b4235a;
  background: #ffe8f1;
  font-size: 0.78rem;
  font-weight: 800;
}
.delete-btn:hover { background: #ffd8e8; }
.meta-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--rose-dark);
  background: #fff0f7;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: capitalize;
}
.tag.dark { color: #fff; background: var(--tiktok); }
.tag.purple { color: #fff; background: var(--lilac); }
.empty-state { padding: 18px; color: var(--muted); border: 1px dashed #e9cde0; border-radius: 18px; text-align: center; }

.bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.idea-input { display: flex; gap: 8px; margin-bottom: 12px; }
.idea-input input { flex: 1; }
.task-card { display: flex; align-items: center; gap: 10px; }
.task-card input { width: 18px; height: 18px; accent-color: var(--rose); }
.task-card.done { opacity: 0.55; text-decoration: line-through; }

.video-modal {
  width: min(720px, calc(100vw - 28px));
  border: 0;
  border-radius: 30px;
  padding: 0;
  box-shadow: 0 30px 100px rgba(43, 27, 47, 0.35);
}
.video-modal::backdrop { background: rgba(43, 27, 47, 0.34); backdrop-filter: blur(6px); }
.video-form { display: grid; gap: 14px; padding: 26px; background: #fffafd; }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; }
.modal-header h2 { margin: 4px 0 0; }
.video-form label, fieldset { display: grid; gap: 7px; color: var(--text); font-weight: 800; }
.video-form input, .video-form select, .video-form textarea, .idea-input input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  color: var(--text);
  background: white;
  outline: none;
}
.video-form input:focus, .video-form select:focus, .video-form textarea:focus, .idea-input input:focus { border-color: var(--rose); box-shadow: 0 0 0 4px rgba(243, 93, 159, 0.12); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset { border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
legend { padding: 0 8px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.checkbox-grid label, .inline-check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.inline-check input, .checkbox-grid input { width: auto; accent-color: var(--rose); }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .workspace { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .app-shell { padding: 12px; }
  .sidebar, .hero-panel, .calendar-panel, .details-panel, .content-card, .stat-card { backdrop-filter: none; }
  .hero-panel, .panel-header { align-items: stretch; flex-direction: column; }
  .hero-panel { padding: 24px; }
  .stats-grid, .bottom-grid, .form-row, .checkbox-grid { grid-template-columns: 1fr; }
  .calendar-weekdays { display: none; }
  .calendar-grid { grid-template-columns: 1fr; }
  .day-cell, .day-cell.week { min-height: auto; }
  .header-actions { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar, .hero-panel, .calendar-panel, .details-panel, .content-card, .stat-card { backdrop-filter: none; }
}
