/* ═══════════════════════════════════════════════════════
   MINO PRO – Handwerker-Bereich
   ═══════════════════════════════════════════════════════ */

:root {
  --bg: #f2f6fd;
  --surface: #ffffff;
  --line: #dce8f8;
  --text: #0d1b36;
  --muted: #5e708a;
  --primary: #0f7bff;
  --primary-dark: #005fd0;
  --success: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --shadow-card: 0 12px 36px rgba(14, 44, 100, 0.10);
  --shadow-btn: 0 10px 28px rgba(11, 115, 255, 0.32);
  --radius-card: 22px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", "Segoe UI", Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; }

*, *::before, *::after { box-sizing: border-box; }

img, video, svg { max-width: 100%; height: auto; }

input, textarea, select, button { max-width: 100%; }

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 22px 18px 50px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
}

/* ── Top bar ───────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 520px) {
  .page { padding: 16px 12px 40px; }
  .topbar { gap: 8px; }
  .topbar-actions .btn { padding: 8px 12px; font-size: 13px; }
  .brand-tag { display: none; }
  .card { padding: 16px; }
  .ping-card, .uploader { word-break: break-word; }
  .row-2 { grid-template-columns: 1fr !important; }
  /* Grid/flex Kinder: erlauben dass Inhalt schrumpft */
  .dash-grid > *, .ping-card > *, .btn-row > *, .topbar-actions > * { min-width: 0; }
  .btn-row { flex-wrap: wrap; }
  .btn-row .btn { flex: 1 1 auto; }
  /* Service-Zeiten: einspaltig */
  .hours-row { grid-template-columns: 1fr 1fr !important; row-gap: 8px; }
  .hours-day { grid-column: 1 / -1; }
  .hours-sep { display: none; }
  /* Lange Inputs/Inhalte */
  input, textarea, select { width: 100%; }
  .metric { font-size: 24px; word-break: break-word; }
  .trade-pill { font-size: 13px; }
}

/* ── Top bar ───────────────────────────────────────────── */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-tag {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

/* ── Card ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 22px;
}

.card h1, .card h2, .card h3 { margin: 0 0 8px; letter-spacing: -0.01em; }
.card h1 { font-size: clamp(26px, 5vw, 36px); }
.card h2 { font-size: 22px; }
.card h3 { font-size: 16px; }

.muted { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0; }

.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

/* ── Forms ─────────────────────────────────────────────── */
label {
  display: block;
  margin: 12px 0 5px;
  font-size: 13px;
  font-weight: 700;
}

.hint { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 4px; }

input[type="text"],
input[type="tel"],
input[type="number"],
input[type="email"],
textarea,
select {
  width: 100%;
  border: 1.5px solid #d5e2f6;
  border-radius: 12px;
  padding: 11px 13px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea { min-height: 110px; resize: vertical; line-height: 1.5; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #80b0ff;
  box-shadow: 0 0 0 3px rgba(15, 123, 255, 0.13);
}

.row-2 {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .row-2 { grid-template-columns: 1fr 1fr; }
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s, background 0.15s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary), #3d9bff);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; filter: none; box-shadow: none; }

.btn-ghost {
  background: #f0f5ff;
  color: #1f4b92;
  border: 1px solid #d7e6ff;
}

.btn-ghost:hover { background: #e4edff; }

.btn-block { width: 100%; padding: 14px; font-size: 15px; }

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* ── Stepper ───────────────────────────────────────────── */
.stepper {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}

.step-pill {
  flex: 1;
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  transition: background 0.3s;
}

.step-pill.done   { background: var(--success); }
.step-pill.active { background: var(--primary); }

.step-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.step-screen { display: none; }
.step-screen.active { display: block; animation: fadeIn 0.25s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Trades multi-select ───────────────────────────────── */
.trade-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.trade-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border: 1.5px solid #d5e2f6;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  transition: all 0.15s;
  user-select: none;
}

.trade-pill:hover { border-color: #80b0ff; }

.trade-pill.selected {
  background: linear-gradient(90deg, var(--primary), #3d9bff);
  color: #fff;
  border-color: transparent;
}

/* ── Image uploader ────────────────────────────────────── */
.uploader {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1.5px dashed #b8d0ff;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  background: #f6f9ff;
  transition: border-color 0.2s, background 0.2s;
}

.uploader:hover { border-color: var(--primary); background: #eef5ff; }

.uploader.has-file { border-style: solid; border-color: var(--success); background: #f0fff4; }

.uploader-icon {
  width: 44px; height: 44px;
  background: #e8f0ff;
  color: var(--primary);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.uploader-icon svg { width: 22px; height: 22px; }

.uploader.has-file .uploader-icon { background: #d4f8de; color: #0f6740; }

.uploader-text strong { display: block; font-size: 14px; font-weight: 700; }
.uploader-text span   { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

.uploader input[type="file"] { display: none; }

/* Reference grid uploader */
.ref-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
}

.ref-cell {
  position: relative;
  aspect-ratio: 4/3;
  background: #f6f9ff;
  border: 1.5px dashed #b8d0ff;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: border-color 0.15s, background 0.15s;
}

.ref-cell:hover { border-color: var(--primary); }
.ref-cell.has { border: 0; }

.ref-cell .plus { font-size: 30px; font-weight: 300; }

.ref-remove {
  position: absolute;
  top: 4px; right: 4px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

/* ── Status banner / chips ─────────────────────────────── */
.status-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
}

.status-banner.warn { background: #fff8e1; color: #8a5b00; border: 1px solid #ffe49a; }
.status-banner.ok   { background: #e8faf0; color: #0e6c43; border: 1px solid #b6ecc8; }
.status-banner.err  { background: #fdecec; color: #93221e; border: 1px solid #f5b8b6; }

.status-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }

/* ── Dashboard ─────────────────────────────────────────── */
.dash-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid .full { grid-column: 1 / -1; }
}

.metric {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1;
  margin: 6px 0 2px;
}

.metric-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
}

.live-toggle {
  display: flex;
  gap: 6px;
  background: #f0f5ff;
  padding: 5px;
  border-radius: 999px;
  margin-top: 12px;
}

.live-opt {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.live-opt.active.online  { background: var(--success); color: #fff; }
.live-opt.active.busy    { background: var(--warn); color: #fff; }
.live-opt.active.offline { background: #94a3b8; color: #fff; }

/* Request ping cards */
.ping-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

.ping-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ping-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.ping-trade {
  display: inline-block;
  padding: 3px 8px;
  background: #eaf2ff;
  color: #1e55b0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.ping-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.ping-actions { display: flex; gap: 8px; margin-top: 4px; }

.ping-actions .btn { flex: 1; padding: 9px 12px; font-size: 13px; }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.08); }

.btn-danger { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.btn-danger:hover { background: #fee2e2; }

/* Empty state */
.empty {
  text-align: center;
  padding: 28px 14px;
  color: var(--muted);
  font-size: 13px;
}

/* ── Public profile (mirror customer overlay-detail look) ─ */
.profile-cover {
  height: 240px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-card);
  position: relative;
  overflow: hidden;
}

.profile-cover::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(8,22,48,0.65) 100%);
}

.profile-header {
  position: absolute;
  bottom: 16px; left: 18px; right: 18px;
  z-index: 2; color: #fff;
  display: flex; align-items: flex-end; gap: 14px;
}

.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 3px solid #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800;
  background: var(--primary);
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.profile-headline h2 { margin: 0; font-size: 22px; }
.profile-headline p { margin: 2px 0 0; font-size: 13px; opacity: 0.92; }

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--success);
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  margin-left: 6px;
}

.refs-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 600px) {
  .refs-grid { grid-template-columns: repeat(3, 1fr); }
}

.ref-img {
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.ref-img:hover {
  transform: scale(1.04);
  box-shadow: 0 12px 28px rgba(8,22,60,0.22);
}

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  background: #eaf2ff;
  color: #1e55b0;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.section-title {
  margin: 18px 0 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* Wochenplan / Service-Zeiten */
.hours-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.hours-row {
  display: grid;
  grid-template-columns: 110px 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.hours-day {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
}
.hours-day input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}
.hours-time {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
.hours-time:disabled {
  background: #f1f5f9;
  color: #94a3b8;
}
.hours-sep {
  color: #94a3b8;
  text-align: center;
}

/* Ping countdown */
.ping-countdown {
  margin-left: auto;
  background: #eef5ff;
  color: #1e55b0;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.ping-countdown.urgent {
  background: #fff1d6;
  color: #8a5b00;
  animation: pulse 1s ease-in-out infinite;
}
.ping-countdown.expired {
  background: #fde2e2;
  color: #93221e;
  animation: none;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

.ping-card.accepted { border-left: 4px solid #10b981; background: #f0fdf4; }
.ping-status-ok { color: #047857; font-weight: 700; }
