/* Z.agency OS — mismos colores y letras que zagencyonline.com */
@font-face { font-family: 'DM Sans'; src: url('fonts/dm-sans-latin-wght-normal.woff2') format('woff2'); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('fonts/instrument-serif-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('fonts/instrument-serif-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
:root {
  --sage: #E1EACF; --cream: #F0E9E3; --forest: #242D2A; --text: #26362C; --sage-2: #4A5C43;
  --grey: #786C64; --paper: #F7F3EF; --line: rgba(38,54,44,.14); --red: #B4452F; --amber: #B7791F;
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; --serif: 'Instrument Serif', Georgia, serif;
  --r: 14px; --shadow: 0 1px 2px rgba(36,45,42,.05), 0 18px 40px -18px rgba(36,45,42,.22);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--cream); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 500; }
h1 { font-family: var(--serif); font-size: 34px; font-weight: 400; letter-spacing: -.01em; }
h2 { font-family: var(--serif); font-size: 26px; font-weight: 400; }
.muted { color: var(--grey); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sage-2); outline-offset: 2px; border-radius: 6px; }

.btn { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 8px 16px; cursor: pointer; font-weight: 500; }
.btn:hover { border-color: var(--sage-2); }
.btn.primary { background: var(--forest); color: var(--sage); border-color: var(--forest); }
.btn.primary:hover { background: var(--sage-2); }
.btn.small { padding: 4px 11px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 13px; color: var(--grey); }
.field input, .field select, .field textarea { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: 15px; color: var(--text); }
.field textarea { min-height: 80px; resize: vertical; }
.msg { color: var(--red); min-height: 1.2em; margin: 8px 0 0; font-size: 14px; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--sage); }
.login-card { width: 100%; max-width: 400px; background: var(--paper); border-radius: 24px; padding: 34px; box-shadow: var(--shadow); }
.login-logo { height: 30px; margin-bottom: 26px; }
.login-card p { margin: 6px 0 22px; }
.login-card .btn { width: 100%; padding: 11px; margin-top: 6px; }

/* App */
.top { display: flex; align-items: center; gap: 18px; padding: 14px clamp(16px, 3vw, 36px); background: var(--forest); color: var(--sage); position: sticky; top: 0; z-index: 5; }
.top img { height: 24px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { background: none; border: 0; color: var(--sage); opacity: .7; padding: 7px 13px; border-radius: 999px; cursor: pointer; }
.tab.on, .tab:hover { opacity: 1; background: rgba(225,234,207,.14); }
.tab .n { background: var(--sage); color: var(--forest); border-radius: 999px; padding: 0 7px; font-size: 12px; margin-left: 4px; font-weight: 600; }
.who { margin-left: auto; font-size: 13px; opacity: .8; }
.who a { color: var(--sage); margin-left: 10px; }
main.app { max-width: 1180px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 36px) 80px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--forest); color: var(--sage); border-color: var(--forest); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 10px; }
.row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.row .grow { flex: 1; min-width: 220px; }
.name { font-weight: 600; font-size: 16px; }
.meta { color: var(--grey); font-size: 13px; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; background: var(--sage); color: var(--sage-2); }
.pill.neu { background: #F6E3C8; color: #7A4B10; }
.pill.verloren, .pill.beendet { background: #EBDCD6; color: #7C3A2A; }
.pill.gewonnen, .pill.aktiv { background: var(--sage); color: var(--sage-2); }
.tags span { display: inline-block; font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin: 2px 4px 0 0; }
.text { white-space: pre-wrap; margin-top: 8px; font-size: 14px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
select.inline { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; background: #fff; font-size: 13px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--grey); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.empty { text-align: center; color: var(--grey); padding: 40px 10px; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(36,45,42,.45); display: grid; place-items: center; padding: 16px; z-index: 20; }
.modal .box { background: var(--paper); border-radius: 20px; padding: 24px; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; box-shadow: var(--shadow); }
.modal .box h2 { margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--forest); color: var(--sage); padding: 10px 18px; border-radius: 999px; z-index: 30; font-size: 14px; }
