/* Birthday Manager — © 2026 Martinhal IT */
:root {
  --pine: #123f3a;
  --pine-deep: #0c2b28;
  --paper: #f6f4ee;
  --card: #ffffff;
  --ink: #21302d;
  --muted: #6b7a76;
  --line: #e2ddd1;
  --marigold: #e8a13a;
  --marigold-deep: #c07f1c;
  --danger: #b3402a;
  --ok: #2e7d4f;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}

h1, h2, h3, .brand-name, .cal-year {
  font-family: "Sora", "Segoe UI", system-ui, sans-serif;
  letter-spacing: -0.01em;
}
h1 { font-size: 1.6rem; margin: 0.2rem 0; }
h2 { font-size: 1.15rem; margin-top: 0; }
h3 { font-size: 0.9rem; margin: 0 0 0.4rem; }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.7rem 1.4rem;
  background: var(--pine);
  color: #f2efe6;
}
.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; }
.brand-mark { font-size: 1.3rem; }
.nav { display: flex; gap: 0.4rem; flex: 1; }
.nav a {
  color: #cfe0d8;
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-weight: 500;
}
.nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav a.active { background: var(--marigold); color: var(--pine-deep); font-weight: 600; }
.userbox { display: flex; align-items: center; gap: 0.7rem; }
.userchip {
  background: rgba(255,255,255,0.12);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

/* ---------- layout ---------- */
.page {
  flex: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 1.4rem 1.2rem 2.5rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.3rem;
  box-shadow: 0 1px 2px rgba(18, 63, 58, 0.05);
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
.two-col .card { margin-bottom: 1.3rem; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.footer {
  text-align: center;
  padding: 1rem;
  background: var(--pine-deep);
  color: #cfe0d8;
  font-size: 0.85rem;
}

/* ---------- yesterday / today / tomorrow banner ---------- */
.tri-banner {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  gap: 1.3rem;
  align-items: stretch;
}
.day-panel { margin-bottom: 1.3rem; }
.day-panel-today {
  border-left: 6px solid var(--marigold);
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
@media (max-width: 980px) { .tri-banner { grid-template-columns: 1fr; } }

/* ---------- image copy command ---------- */
.copy-row { display: flex; gap: 0.35rem; width: 100%; }
.copy-input {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.72rem;
  padding: 0.35rem 0.45rem;
  background: #f0ede4;
}

/* ---------- today banner ---------- */
.today-banner {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  border-left: 6px solid var(--marigold);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0;
}
.today-people { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.today-people li { margin: 0.25rem 0; }
.today-right { text-align: right; flex-shrink: 0; max-width: 220px; }

/* ---------- forms ---------- */
label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; font-weight: 500; }
input, select, textarea {
  font: inherit;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fdfcf9;
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--marigold);
  outline-offset: 1px;
}
textarea { resize: vertical; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.85rem; }
.entry-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}
.entry-form label { flex: 1 1 150px; }
.stack-form { display: flex; flex-direction: column; gap: 0.8rem; align-items: flex-start; }
.stack-form label { width: 100%; }
.row-gap { display: flex; gap: 0.7rem; margin-top: 0.8rem; }

/* ---------- buttons ---------- */
.btn {
  font: inherit;
  font-weight: 600;
  border: none;
  border-radius: 9px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-primary { background: var(--pine); color: #fff; }
.btn-primary:hover { background: var(--pine-deep); }
.btn-accent { background: var(--marigold); color: var(--pine-deep); }
.btn-accent:hover { background: var(--marigold-deep); color: #fff; }
.btn-danger { background: #fbeae5; color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: inherit; border: 1px solid currentColor; opacity: 0.85; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn-lg { padding: 0.8rem 1.6rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
th, td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); }
tbody tr:hover { background: #faf8f2; }
.ta-right { text-align: right; }
.nowrap { white-space: nowrap; }
.log-wrap { max-height: 420px; overflow-y: auto; }

/* ---------- pills / flash ---------- */
.pill { border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.72rem; font-weight: 600; }
.pill-ok { background: #e2f2e8; color: var(--ok); }
.pill-bad { background: #fbeae5; color: var(--danger); }
.pill-wait { background: #fdf1dc; color: var(--marigold-deep); }
.flash { padding: 0.7rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: 0.9rem; }
.flash-ok { background: #e2f2e8; color: var(--ok); }
.flash-error { background: #fbeae5; color: var(--danger); }

/* ---------- yearly calendar ---------- */
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; }
.cal-nav { display: flex; align-items: center; gap: 0.7rem; }
.cal-year { font-size: 1.2rem; font-weight: 700; }
.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 1rem;
}
.mini-cal { font-size: 0.72rem; }
.mini-cal th, .mini-cal td { padding: 0.22rem; text-align: center; border: none; }
.mini-cal td { position: relative; border-radius: 6px; }
.mini-cal td.bday { background: #fdf1dc; font-weight: 700; color: var(--marigold-deep); cursor: help; }
.mini-cal td.today { outline: 2px solid var(--pine); }
.mini-cal .dot {
  position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--marigold-deep);
}

/* ---------- images ---------- */
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-top: 1rem; }
.image-tile {
  border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem;
  display: flex; flex-direction: column; gap: 0.5rem; align-items: center; text-align: center;
}
.image-tile img { max-width: 100%; max-height: 110px; object-fit: contain; border-radius: 6px; }
.image-tile code { word-break: break-all; }

/* ---------- auth / misc ---------- */
.auth-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  max-width: 380px; margin: 8vh auto 0; padding: 2rem;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.auth-card.wide { max-width: 480px; margin-top: 3vh; }
.auth-card form { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 0.8rem; }
.qr-wrap { text-align: center; margin: 0.5rem 0; }
.qr-wrap img { width: 190px; height: 190px; }
.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
code { background: #f0ede4; padding: 0.1rem 0.35rem; border-radius: 5px; font-size: 0.82em; }
.tpl-zone textarea { width: 100%; }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background 0.15s ease, color 0.15s ease; }
}
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; gap: 0.6rem; }
  .today-banner { flex-direction: column; align-items: flex-start; }
  .today-right { text-align: left; }
}
