/* Reset, typography, buttons, form controls, tags */

/* Self-hosted variable fonts (SIL OFL, files in /fonts): no request to Google before or after consent */
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Syne'; font-style: normal; font-display: swap; font-weight: 400 800;
  src: url(/fonts/syne-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Syne'; font-style: normal; font-display: swap; font-weight: 400 800;
  src: url(/fonts/syne-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }
body {
  font-family: var(--fb);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
body.app { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }

a { color: var(--accent); text-decoration: none; }
button { font: inherit; }
[hidden] { display: none !important; }

* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 15px; border-radius: 8px; border: none; cursor: pointer;
  font-family: var(--fb); font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s; text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost   { background: transparent; color: var(--dim); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled) { color: var(--text); border-color: #555; }
.btn-primary { background: var(--accent); color: #000; font-weight: 600; }
.btn-primary:hover:not(:disabled) { background: var(--accent-h); }
.btn-danger  { background: transparent; color: #ff8070; border: 1px solid #5a2a20; }
.btn-danger:hover:not(:disabled) { border-color: var(--red); }
.btn-block { width: 100%; }
.btn-sm { padding: 5px 11px; font-size: 12px; }

/* ── Forms ── */
.fg { margin-bottom: 14px; position: relative; }
.fl {
  display: block; font-size: 11px; font-weight: 600; color: var(--dim);
  letter-spacing: .5px; text-transform: uppercase; margin-bottom: 5px;
}
.fi {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 9px 13px;
  font-family: var(--fb); font-size: 14px; outline: none; transition: border-color .15s;
}
.fi:focus { border-color: var(--accent); }
select.fi { cursor: pointer; appearance: none; }
textarea.fi { resize: vertical; min-height: 75px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.hint { font-size: 11px; color: var(--dimmer); margin-top: 4px; }

/* ── Tags ── */
.tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 4px; white-space: nowrap;
}
.tag-cat  { background: #1a2a1a; color: #4ade80; border: 1px solid #2a3a2a; }
.tag-dist { background: #1a1f2e; color: #7eb3f5; border: 1px solid #2a2f3e; }
.tag-meta { background: #1a1f2e; color: #aaa;    border: 1px solid #2a2f3e; }
.tag-st-open        { background: #1a2a1a; color: #4ade80; border: 1px solid #2a3a2a; }
.tag-st-in_progress { background: #2a2414; color: var(--accent); border: 1px solid #3a3220; }
.tag-st-completed   { background: #14222a; color: #7eb3f5; border: 1px solid #20323a; }
.tag-st-expired, .tag-st-cancelled { background: #222; color: var(--dim); border: 1px solid var(--border); }

.stars { color: var(--accent); letter-spacing: 1px; }
