:root {
  color-scheme: light;
  --bg: #eef1f5;
  --ink: #17201c;
  --muted: #66736c;
  --line: #dde4df;
  --panel: #ffffff;
  --navy: #0c1238;
  --blue: #2d35c9;
  --green: #1f7148;
  --green-2: #155435;
  --red: #b6423b;
  --gold: #f2ce44;
  --gold-2: #c58d1e;
  --shadow: 0 22px 60px rgba(15, 26, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 24% 0%, rgba(242, 206, 68, 0.18), transparent 30%),
    linear-gradient(135deg, #f7f8f2 0%, var(--bg) 46%, #e7ebf7 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  padding: 0 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(31, 113, 72, 0.2);
}

button:hover {
  background: var(--green-2);
}

button.secondary {
  background: #eef4ef;
  color: var(--green-2);
  box-shadow: none;
}

button.danger {
  background: var(--red);
  box-shadow: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 26px;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(242, 206, 68, 0.3), transparent 24%),
    linear-gradient(160deg, #060816 0%, #111756 58%, #2e32bd 100%);
  color: white;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 950;
}

.brand p,
.brand strong {
  display: block;
  margin: 0;
}

.brand p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 850;
}

.brand strong {
  font-size: 20px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-tab {
  min-height: 0;
  border: 0;
  color: white;
  text-align: left;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 750;
  box-shadow: none;
}

.nav-tab.active,
.nav-tab:hover {
  background: rgba(242, 206, 68, 0.22);
  color: white;
}

.sidebar-note {
  align-self: end;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.11);
}

.sidebar-note span,
.sidebar-note small {
  display: block;
}

.sidebar-note span {
  font-size: 26px;
  font-weight: 950;
  color: var(--gold);
}

.sidebar-note small {
  color: rgba(255, 255, 255, 0.72);
}

.main {
  min-width: 0;
  width: min(1280px, 100%);
  padding: 24px clamp(16px, 3vw, 36px) 60px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 190px;
  margin-bottom: 16px;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 8px;
  color: white;
  background:
    radial-gradient(circle at 88% 18%, rgba(242, 206, 68, 0.36), transparent 18%),
    linear-gradient(135deg, #071022 0%, #141a62 48%, #3434d9 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-badge {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero-copy {
  max-width: 700px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--green);
  text-transform: uppercase;
  font-weight: 900;
  font-size: 12px;
}

.hero .eyebrow {
  color: var(--gold);
}

.icon-button {
  width: 48px;
  padding: 0;
  font-size: 23px;
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 12px 26px rgba(242, 206, 68, 0.28);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-card,
.panel {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(221, 228, 223, 0.86);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -34px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  opacity: 0.22;
}

.metric-gold::after {
  background: var(--gold);
}

.metric-green::after {
  background: var(--green);
}

.metric-blue::after {
  background: var(--blue);
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  font-size: clamp(32px, 6vw, 50px);
  line-height: 1;
  margin: 10px 0;
}

.panel {
  padding: 18px;
  margin-bottom: 16px;
}

.showcase-panel {
  background:
    linear-gradient(90deg, rgba(12, 18, 56, 0.04), rgba(242, 206, 68, 0.08)),
    rgba(255, 255, 255, 0.92);
}

.dashboard-panel {
  min-height: 420px;
}

.birthday-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.birthday-card {
  position: relative;
  overflow: hidden;
  min-height: 138px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #fff8d9 100%);
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  box-shadow: none;
}

.birthday-card::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -28px;
  width: 94px;
  height: 94px;
  border-radius: 999px;
  background: rgba(242, 206, 68, 0.42);
}

.birthday-card strong {
  position: relative;
  z-index: 1;
  font-size: 18px;
  color: var(--ink);
}

.birthday-card span {
  color: var(--muted);
  font-weight: 780;
}

.birthday-card .days {
  justify-self: start;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--navy);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.birthday-card.active {
  border-color: var(--gold-2);
  box-shadow: 0 16px 34px rgba(197, 141, 30, 0.2);
  background: linear-gradient(135deg, #143c27 0%, #1f7148 100%);
}

.birthday-card.active strong,
.birthday-card.active span {
  color: white;
}

.preview-panel {
  display: grid;
  gap: 12px;
}

.dashboard-preview {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

#dashboardPreviewCanvas {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 8px;
  background: #dfe5e4;
  box-shadow: 0 18px 40px rgba(15, 26, 45, 0.16);
}

.preview-info {
  display: grid;
  gap: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.preview-info strong {
  color: var(--ink);
  font-size: 24px;
}

.preview-actions {
  display: flex;
  justify-content: flex-start;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-title h2 {
  margin: 0;
  letter-spacing: 0;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
}

.workspace-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wide-panel {
  grid-column: 1 / -1;
}

.left-column {
  display: grid;
  gap: 16px;
  align-content: start;
}

.form-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfcfa;
  padding: 11px 12px;
}

select[multiple] {
  min-height: 112px;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkline input {
  width: 18px;
  height: 18px;
}

.hidden {
  display: none !important;
}

.hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.art-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.art-card canvas,
.art-card img {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #e7ece3;
}

.art-body {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.art-body h3 {
  margin: 0;
  font-size: 18px;
}

.pill-row,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  border-radius: 999px;
  padding: 5px 9px;
  background: #edf3ea;
  color: var(--green-2);
  font-size: 12px;
  font-weight: 850;
}

.pill.pending_approval {
  background: #fff3d6;
  color: #845c09;
}

.pill.approved,
.pill.sent {
  background: #e2f4e8;
  color: #17623d;
}

.pill.rejected,
.pill.failed {
  background: #f9e2e0;
  color: #8b2e29;
}

.empty {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 22px;
  text-align: center;
  background: rgba(255, 255, 255, 0.5);
}

.list-panel {
  max-height: 760px;
  overflow: auto;
}

.people-list,
.log-list {
  display: grid;
  gap: 10px;
}

.log-item,
.person-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfa;
}

.log-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.error-line {
  display: block;
  color: #8b2e29;
  margin-top: 4px;
  max-width: 720px;
}

.whatsapp-panel {
  align-self: start;
}

.whatsapp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: center;
}

.whatsapp-info {
  display: grid;
  gap: 8px;
}

.whatsapp-info span {
  color: var(--muted);
}

.qr-box {
  min-height: 220px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: var(--muted);
  padding: 12px;
  text-align: center;
}

.qr-box img {
  display: block;
  width: min(100%, 196px);
  aspect-ratio: 1;
}

.log-item small,
.person-item small {
  color: var(--muted);
}

.person-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.person-actions button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

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

  .sidebar {
    position: relative;
    height: auto;
    grid-template-columns: 1fr;
  }

  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .summary-grid,
  .workspace-grid,
  .workspace-grid.compact {
    grid-template-columns: 1fr;
  }

  .whatsapp-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .main {
    padding-inline: 12px;
  }

  .hero,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .section-title button {
    width: 100%;
  }

  .nav-list {
    grid-template-columns: 1fr 1fr;
  }

  .person-item {
    align-items: stretch;
    flex-direction: column;
  }

  .person-actions {
    justify-content: flex-start;
  }

  .dashboard-preview {
    grid-template-columns: 1fr;
  }
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 76% 18%, rgba(242, 206, 68, 0.32), transparent 22%),
    linear-gradient(135deg, #060816 0%, #111756 50%, #3434d9 100%);
}

.login-card {
  width: min(460px, 100%);
  display: grid;
  gap: 18px;
  padding: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.25);
}

.login-brand {
  color: var(--ink);
}

.login-card h1 {
  margin: 0;
  font-size: 36px;
}

.login-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.google-button {
  display: grid;
  place-items: center;
  min-height: 46px;
  border-radius: 8px;
  background: var(--navy);
  color: white;
  text-decoration: none;
  font-weight: 850;
}
