/* My-Angebot App — helles Design-System (Rot / Weiß / Blau) */
:root {
  --bg: #ffffff;
  --bg-soft: #f4f7fc;
  --card: #ffffff;
  --line: #e2e8f2;
  --text: #16233b;
  --muted: #5c6b82;
  --primary: #e23b3b;        /* Rot — Haupt-CTAs */
  --primary-hover: #c92f30;
  --secondary: #1f4fd8;      /* Blau — Links, Akzente */
  --secondary-hover: #1a42b8;
  --on-primary: #ffffff;
  --ok: #15884a;
  --ok-soft: #e6f6ec;
  --err: #d11f2f;
  --err-soft: #fdeaec;
  --shadow: 0 1px 3px rgba(22,35,59,.06), 0 4px 16px rgba(22,35,59,.05);
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.6; overflow-x: hidden; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
img { max-width: 100%; }
a { color: var(--secondary); }

.nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px clamp(16px, 4vw, 48px); position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { white-space: nowrap; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--text); text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: clamp(10px, 2vw, 22px); flex-wrap: wrap; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; min-height: 44px; display: inline-flex; align-items: center; }
.nav-links a:hover { color: var(--secondary); }
.inline-form { display: inline; }
.linklike { background: none; border: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; }
.linklike:hover { color: var(--primary); }

.page { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 48px); }
.page section { margin-bottom: clamp(32px, 6vw, 64px); }

h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); font-weight: 900; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 16px; }
h2 { font-size: clamp(1.2rem, 3vw, 1.6rem); font-weight: 800; margin: 28px 0 16px; }
h3 { font-size: 1.05rem; margin-bottom: 6px; }
.accent { color: var(--primary); }
.muted { color: var(--muted); }
.sub { color: var(--muted); font-size: clamp(1rem, 2.2vw, 1.15rem); max-width: 640px; }

.hero { text-align: center; padding-top: clamp(16px, 4vw, 48px); }
.hero .sub { margin: 0 auto 8px; }
.badge { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--secondary); font-size: .85rem; font-weight: 600; margin-bottom: 18px; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 22px 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: var(--radius); border: none; cursor: pointer; font-size: 1rem; font-weight: 700; text-decoration: none; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--secondary); color: var(--secondary); }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 1.08rem; }
.btn-sm { min-height: 44px; padding: 8px 16px; font-size: .92rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card p { color: var(--muted); font-size: .95rem; }
.num { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--secondary); color: #fff; font-weight: 900; border-radius: 11px; margin-bottom: 10px; }

.form-page { max-width: 480px; margin: 0 auto; }
.stack { display: grid; gap: 14px; margin: 18px 0; }
.stack label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 1rem; font-family: inherit;
}
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--secondary); border-color: transparent; }
.alert { background: var(--err-soft); border: 1px solid var(--err); color: var(--err); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; font-weight: 600; }
.notice { background: var(--ok-soft); border: 1px solid var(--ok); color: var(--ok); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; font-weight: 600; }

.role-toggle { display: grid; gap: 10px; }
.role-opt { display: flex; gap: 10px; align-items: flex-start; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; font-weight: 400; }
.role-opt:has(input:checked) { border-color: var(--primary); background: #fff; }
.role-opt input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--primary); flex-shrink: 0; }

.list { list-style: none; display: grid; gap: 10px; }
.list-item { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); }
.list-item a { text-decoration: none; color: var(--text); }
.list-item a:hover { color: var(--secondary); }
.tag { padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted); }
.tag-published, .tag-offers_received { color: var(--secondary); border-color: var(--secondary); background: #eef2fd; }
.tag-awarded, .tag-released, .tag-accepted { color: var(--ok); border-color: var(--ok); background: var(--ok-soft); }
.tag-blocked, .tag-disputed, .tag-cancelled { color: var(--err); border-color: var(--err); background: var(--err-soft); }

.footer { border-top: 1px solid var(--line); padding: 22px clamp(16px, 4vw, 48px); display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; color: var(--muted); font-size: .88rem; background: var(--bg-soft); }
.footer div { display: flex; align-items: center; gap: 10px; }
.footer nav { display: flex; gap: 16px; }
.footer a { color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; }
.footer a:hover { color: var(--secondary); }

/* Chat (Ausschreibungs-Flow) */
.chat-page { max-width: 680px; margin: 0 auto; }
.chat-box { display: flex; flex-direction: column; gap: 10px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 18px 0 12px; max-height: 55vh; overflow-y: auto; }
.chat-box.readonly { max-height: none; }
.chat-msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; font-size: .97rem; white-space: pre-wrap; word-break: break-word; }
.chat-msg.user { align-self: flex-end; background: var(--secondary); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.assistant { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-msg.system { align-self: center; background: none; color: var(--muted); font-size: .85rem; padding: 2px 8px; }
.chat-msg.typing { color: var(--muted); }
.chat-input { display: flex; gap: 8px; align-items: flex-end; }
.chat-input textarea { flex: 1; min-height: 52px; }
.upload-btn { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; min-width: 48px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1.2rem; }
.upload-btn:hover { border-color: var(--secondary); }
.publish-panel { background: var(--card); border: 1px solid var(--primary); border-radius: var(--radius); padding: 22px; margin-top: 22px; box-shadow: var(--shadow); }
.publish-panel h2 { margin-top: 0; }
.attach-grid { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.attach-thumb { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* Profile */
.profile-card { text-decoration: none; color: var(--text); display: block; }
.profile-card:hover { border-color: var(--secondary); }
.badge-verifiziert { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--ok-soft); border: 1px solid var(--ok); color: var(--ok); vertical-align: middle; margin-left: 6px; }
.rating-line { font-weight: 700; color: var(--primary); font-size: .92rem; }
.review-item { flex-direction: column; align-items: flex-start; gap: 4px; }
.stars { color: var(--primary); font-weight: 800; }
fieldset { border: none; }
legend { font-weight: 700; margin-bottom: 8px; }

/* Angebote */
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-row .tag { text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
.tag-active { color: var(--secondary); border-color: var(--secondary); background: #eef2fd; }
.offer-card { display: flex; flex-direction: column; gap: 6px; }
.offer-card h3 a { color: var(--text); text-decoration: none; }
.offer-card h3 a:hover { color: var(--secondary); }
.offer-accepted { border-color: var(--ok); }
.offer-msg { color: var(--muted); font-size: .92rem; flex: 1; }
.offer-price { font-size: 1.4rem; font-weight: 900; color: var(--primary); }
.offer-form .field-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .offer-form .field-row { grid-template-columns: 1fr; } }

/* Auftrag / Timeline */
.timeline { list-style: none; display: grid; gap: 14px; margin-top: 8px; }
.timeline li { display: flex; gap: 12px; align-items: flex-start; }
.timeline-dot { width: 12px; height: 12px; min-width: 12px; border-radius: 50%; background: var(--primary); margin-top: 7px; }

/* Admin */
.override-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.override-form select, .override-form input { min-height: 44px; width: auto; }
.admin-order { align-items: center; }
