/* admin.css – Design-Tokens und Komponenten für den Admin-Bereich Move & Care
   Farben/Radien/Schatten übernommen aus dem Stylesheet von physio-moveandcare.de */

@font-face {
  font-family: 'Roboto';
  src: url('fonts/Roboto-VariableFont_wdth,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('fonts/Roboto-Italic-VariableFont_wdth,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --clr-text: #575756;
  --clr-text-strong: #1f2a36;
  --clr-text-body: #3b3f45;
  --clr-text-muted: #5e6670;
  --clr-accent: #507A9C;
  --clr-accent-hover: #3e6785;
  --clr-accent-orange: #C08864;
  --clr-bg: #F2F8FC;
  --clr-surface: #FFFFFF;
  --clr-border: #e6e6e6;
  --clr-icon-bg: #eaf1f5;
  --clr-preview-bg: #f4f7f9;

  --badge-new-bg: #F6EDE6;  --badge-new-fg: #845937;
  --badge-done-bg: #E8F3EA; --badge-done-fg: #2e6b31;
  --toast-ok: #2e7d32;      --toast-err: #c62828;

  --radius-1: 8px; --radius-2: 12px; --radius-3: 14px; --radius-4: 18px;
  --shadow-1: 0 6px 18px rgba(0,0,0,.08);
  --shadow-2: 0 10px 24px rgba(0,0,0,.12);

  /* Roboto lokal hosten (assets/fonts/), kein Google-CDN im Admin */
  --font-sans: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--clr-bg); color: var(--clr-text); font: 15px/1.5 var(--font-sans); }
a { color: var(--clr-accent); } a:hover { color: var(--clr-accent-hover); }
button, input { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout */
.app { min-height: 100vh; display: flex; flex-wrap: wrap; }
.sidebar { flex: 1 1 240px; max-width: 100%; background: var(--clr-surface); border-right: 1px solid var(--clr-border);
  padding: 24px 16px; display: flex; flex-direction: column; gap: 28px; }
.main { flex: 999 1 560px; min-width: 0; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.columns { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.list { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.detail { flex: 2.2 1 480px; min-width: 0; background: var(--clr-surface); border-radius: var(--radius-4);
  box-shadow: var(--shadow-1); padding: 28px; display: flex; flex-direction: column; gap: 24px; }

/* Brand */
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.brand-mark { width: 40px; height: 40px; border-radius: var(--radius-2); background: var(--clr-accent);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.brand-name { font-weight: 700; color: var(--clr-text-strong); font-size: 16px; line-height: 1.2; display: block; }
.brand-sub { font-size: 12px; color: var(--clr-text-muted); display: block; }

/* Navigation */
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: var(--clr-text); text-decoration: none; }
.nav a:hover { background: rgba(80,122,156,.08); }
.nav a[aria-current="page"] { background: rgba(80,122,156,.10); color: var(--clr-text-strong); font-weight: 700; }
.nav .grow { flex: 1 1 auto; }
.nav-bottom { margin-top: auto; border-top: 1px solid var(--clr-border); padding-top: 16px; }
.count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--badge-new-bg);
  color: var(--badge-new-fg); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* Header */
.page-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.page-header h1 { margin: 0; font-size: 28px; color: var(--clr-text-strong); line-height: 1.2; }
.page-header p { margin: 2px 0 0; font-size: 14px; color: var(--clr-text-muted); }
.search { display: flex; align-items: center; gap: 8px; flex: 0 1 320px; min-width: 220px; height: 44px; padding: 0 14px;
  background: var(--clr-surface); border: 1px solid var(--clr-border); border-radius: var(--radius-2); }
.search input { flex: 1 1 auto; min-width: 0; border: 0; outline: none; background: transparent; color: var(--clr-text-strong); }

/* Liste */
.section-label { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--clr-text-body); text-transform: uppercase; letter-spacing: .06em; }
.section-label + .item, .done-group { }
.done-group { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.item { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: var(--radius-3);
  border: 1px solid var(--clr-border); background: rgba(255,255,255,.7); color: var(--clr-text); text-decoration: none; font-size: 14px; }
.item:hover { background: var(--clr-surface); }
.item[aria-current="true"] { background: var(--clr-surface); border-color: var(--clr-accent); box-shadow: var(--shadow-1); }
.item-top { display: flex; align-items: center; gap: 8px; }
.item-name { flex: 1 1 auto; min-width: 0; color: var(--clr-text-strong); font-size: 15px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-date { font-size: 12px; color: var(--clr-text-muted); white-space: nowrap; }
.item-subject { color: var(--clr-text-strong); font-weight: 500; }
.item-preview { color: var(--clr-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-attach { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--clr-accent-hover); }
.dot-new { width: 8px; height: 8px; border-radius: 4px; background: var(--clr-accent-orange); flex: 0 0 auto; }
.item.is-done { background: rgba(255,255,255,.4); padding: 14px 18px; gap: 4px; color: var(--clr-text-muted); }
.item.is-done .item-name { font-weight: 400; color: var(--clr-text-body); }
.item.is-done .item-subject { color: var(--clr-text-muted); font-weight: 400; text-decoration: line-through; }
.tag-done { padding: 1px 10px; border-radius: 10px; font-size: 12px; font-weight: 500; background: var(--badge-done-bg); color: var(--badge-done-fg); }
.empty { padding: 28px 24px; text-align: center; background: var(--clr-surface); border: 1px dashed var(--clr-border);
  border-radius: var(--radius-3); color: var(--clr-text-muted); }

/* Detail */
.done-banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-2);
  background: var(--badge-done-bg); color: var(--badge-done-fg); font-size: 14px; font-weight: 500; }
.meta-line { font-size: 13px; color: var(--clr-text-muted); }
.detail h2 { margin: 0; font-size: 22px; color: var(--clr-text-strong); line-height: 1.25; }
.sender { font-size: 15px; color: var(--clr-text-strong); font-weight: 500; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.contact { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--clr-border);
  border-radius: var(--radius-2); min-width: 0; }
.contact small { display: block; font-size: 12px; color: var(--clr-text-muted); }
.contact a { font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block-label { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--clr-text-body); text-transform: uppercase; letter-spacing: .06em; }
.message { margin: 0; padding: 16px 18px; background: var(--clr-bg); border-radius: var(--radius-2); color: var(--clr-text-body); white-space: pre-line; }
.file { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--clr-border); border-radius: var(--radius-3); }
.file-icon { width: 44px; height: 44px; border-radius: var(--radius-2); background: var(--clr-icon-bg); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.file-info { flex: 1 1 200px; min-width: 0; }
.file-name { display: block; color: var(--clr-text-strong); font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { display: block; font-size: 12px; color: var(--clr-text-muted); }
.file-actions { display: flex; gap: 8px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 20px; border-top: 1px solid var(--clr-border); }

/* Buttons */
.btn { min-height: 44px; padding: 0 20px; border-radius: var(--radius-1); font-size: 15px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--clr-accent); color: #fff; }
.btn-primary:hover { background: var(--clr-accent-hover); color: #fff; }
.btn-secondary { background: var(--clr-surface); color: var(--clr-text); border-color: var(--clr-border); }
.btn-secondary:hover { background: #f7f7f7; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; font-weight: 400; }
.btn-ghost-accent { background: var(--clr-surface); color: var(--clr-accent-hover); border-color: var(--clr-border); }

/* Login */
.login-wrap { min-height: 100vh; padding: 48px 16px; display: flex; align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 400px; background: var(--clr-surface); border-radius: var(--radius-4); box-shadow: var(--shadow-2);
  padding: 40px 32px; display: flex; flex-direction: column; gap: 20px; }
.login-card h1 { margin: 0; font-size: 24px; color: var(--clr-text-strong); }
.login-card p { margin: 4px 0 0; font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; color: var(--clr-text-body); }
.field input { height: 46px; padding: 0 14px; border: 1px solid var(--clr-border); border-radius: var(--radius-2); color: var(--clr-text-strong); }
.field input:focus { outline: 2px solid var(--clr-accent); outline-offset: 1px; }
.error { padding: 10px 14px; border-radius: var(--radius-2); background: #fdecec; color: #a32020; font-size: 14px; }

:focus-visible { outline: 2px solid var(--clr-accent); outline-offset: 2px; }

@media (max-width: 600px) {
  .main { padding: 20px 16px; }
  .detail { padding: 20px; }
}
