/* ── FSDZ Admin CSS ──────────────────────────────────────────────────────── */
:root {
  --a-bg:      #f1f5f9;
  --a-white:   #ffffff;
  --a-border:  #e2e8f0;
  --a-dark:    #1e293b;
  --a-text:    #334155;
  --a-muted:   #64748b;
  --a-green:   #16a34a;
  --a-green-l: #dcfce7;
  --a-red:     #dc2626;
  --a-red-l:   #fee2e2;
  --a-yellow:  #d97706;
  --a-yellow-l:#fef3c7;
  --a-radius:  8px;
  --a-shadow:  0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  background: var(--a-bg);
  color: var(--a-text);
}

/* ── Top bar ── */
.a-topbar {
  background: var(--a-dark);
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 56px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.a-topbar__brand { font-weight: 700; font-size: 1rem; letter-spacing: -.02em; }
.a-topbar__brand span { color: var(--a-green); }
.a-topbar__right { display: flex; align-items: center; gap: .75rem; }
.a-topbar__user { font-size: .82rem; color: #94a3b8; }
.a-topbar a, .a-topbar button {
  background: none; border: 1px solid #475569; color: #f8fafc;
  padding: .35rem .85rem; border-radius: var(--a-radius);
  font-size: .82rem; cursor: pointer; text-decoration: none;
  transition: background .15s;
}
.a-topbar a:hover, .a-topbar button:hover { background: #334155; }

/* ── Page wrapper ── */
.a-page { max-width: 1100px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }

/* ── Tabs ── */
.a-tabs { display: flex; gap: .5rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--a-border); padding-bottom: 0; }
.a-tab {
  padding: .6rem 1.2rem;
  background: none; border: none; cursor: pointer;
  font-size: .92rem; font-weight: 600; color: var(--a-muted);
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.a-tab:hover { color: var(--a-text); }
.a-tab--active { color: var(--a-green); border-bottom-color: var(--a-green); }

/* ── Cards ── */
.a-card {
  background: var(--a-white);
  border: 1px solid var(--a-border);
  border-radius: var(--a-radius);
  box-shadow: var(--a-shadow);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.a-card__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--a-border);
}
.a-card__title { font-size: 1.05rem; font-weight: 700; margin: 0; }

/* ── Alerts ── */
.a-alert {
  padding: .75rem 1rem; border-radius: var(--a-radius);
  font-size: .88rem; margin-bottom: 1.25rem;
}
.a-alert--success { background: var(--a-green-l);  color: #14532d; border: 1px solid #86efac; }
.a-alert--error   { background: var(--a-red-l);    color: #7f1d1d; border: 1px solid #fca5a5; }
.a-alert--warning { background: var(--a-yellow-l); color: #78350f; border: 1px solid #fcd34d; }

/* ── Buttons ── */
.a-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1.1rem;
  border: none; border-radius: var(--a-radius);
  font-size: .88rem; font-weight: 600; cursor: pointer;
  text-decoration: none;
  transition: opacity .15s, box-shadow .15s;
}
.a-btn:hover { opacity: .88; }
.a-btn--primary  { background: var(--a-green); color: #fff; }
.a-btn--danger   { background: var(--a-red);   color: #fff; }
.a-btn--outline  { background: transparent; border: 1px solid var(--a-border); color: var(--a-text); }
.a-btn--outline:hover { background: var(--a-bg); }
.a-btn--sm { padding: .32rem .75rem; font-size: .8rem; }

/* ── Table ── */
.a-table-wrap { overflow-x: auto; }
table.a-table {
  width: 100%; border-collapse: collapse; font-size: .88rem;
}
.a-table th {
  text-align: left; padding: .65rem .85rem;
  background: var(--a-bg); color: var(--a-muted);
  font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 2px solid var(--a-border);
}
.a-table td {
  padding: .7rem .85rem; border-bottom: 1px solid var(--a-border);
  vertical-align: middle;
}
.a-table tbody tr:last-child td { border-bottom: none; }
.a-table tbody tr:hover { background: var(--a-bg); }
.a-table .a-table__actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.a-table__empty { text-align: center; padding: 2.5rem 1rem; color: var(--a-muted); font-style: italic; }

/* ── Forms ── */
.a-form { display: flex; flex-direction: column; gap: 1.1rem; }
.a-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .a-form__row { grid-template-columns: 1fr; } }
.a-field { display: flex; flex-direction: column; gap: .35rem; }
.a-label {
  font-size: .8rem; font-weight: 600; color: var(--a-muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.a-input, .a-textarea, .a-select {
  width: 100%; padding: .55rem .75rem;
  border: 1px solid var(--a-border); border-radius: var(--a-radius);
  font-size: .9rem; color: var(--a-text);
  background: var(--a-white);
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.a-input:focus, .a-textarea:focus, .a-select:focus {
  outline: none;
  border-color: var(--a-green);
  box-shadow: 0 0 0 3px rgba(22,163,74,.12);
}
.a-textarea { resize: vertical; min-height: 120px; }
.a-textarea--lg { min-height: 260px; }
.a-hint { font-size: .78rem; color: var(--a-muted); margin-top: .1rem; }
.a-upload-current {
  font-size: .82rem; color: var(--a-muted); margin-top: .3rem;
  display: flex; align-items: center; gap: .5rem;
}
.a-upload-current a { color: var(--a-green); text-decoration: none; }
.a-upload-current a:hover { text-decoration: underline; }

/* ── Form actions bar ── */
.a-form__actions {
  display: flex; align-items: center; gap: .75rem;
  padding-top: 1rem; border-top: 1px solid var(--a-border);
  flex-wrap: wrap;
}

/* ── Badge ── */
.a-badge {
  display: inline-block; padding: .2rem .55rem;
  border-radius: 99px; font-size: .72rem; font-weight: 700;
}
.a-badge--pdf   { background: #dbeafe; color: #1d4ed8; }
.a-badge--none  { background: var(--a-bg); color: var(--a-muted); }
.a-badge--draft { background: var(--a-yellow-l); color: var(--a-yellow); }
.a-badge--pub   { background: var(--a-green-l);  color: #14532d; }

/* ── Editor toolbar (Fett button) ── */
.a-editor-toolbar { display: flex; gap: .4rem; margin-bottom: .35rem; }

/* ── Login page ── */
.a-login-wrap {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; background: var(--a-dark);
}
.a-login-box {
  background: var(--a-white); border-radius: 12px;
  padding: 2.5rem 2rem; width: 100%; max-width: 420px;
  box-shadow: 0 20px 40px rgba(0,0,0,.3);
}
.a-login-box__logo { text-align: center; margin-bottom: 1.75rem; }
.a-login-box__logo strong { font-size: 1.15rem; letter-spacing: -.02em; }
.a-login-box__logo span { color: var(--a-green); }
.a-login-box h2 { font-size: 1.2rem; font-weight: 700; margin: 0 0 1.5rem; text-align: center; }

/* ── Page header ── */
.a-page-head { margin-bottom: 1.5rem; }
.a-page-head h1 { font-size: 1.4rem; font-weight: 800; margin: 0 0 .25rem; }
.a-page-head p { color: var(--a-muted); font-size: .88rem; margin: 0; }

/* ── Delete confirm inline ── */
.a-confirm-delete { background: var(--a-red-l); border: 1px solid #fca5a5; border-radius: var(--a-radius); padding: 1rem 1.25rem; }
.a-confirm-delete p { margin: 0 0 .75rem; font-size: .9rem; color: #7f1d1d; }
