/* Kundenbereich – baut auf ../style.css (Variablen, Schrift, Buttons) auf */
body.portal { background: var(--bg-tint); min-height: 100vh; }
[hidden] { display: none !important; }

/* ── Login ── */
.login { min-height: 100svh; display: grid; place-items: center; padding: 24px; background: linear-gradient(180deg, #eaf3fa, #f8fbfd); position: relative; overflow: hidden; }
.login::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 72px 72px; opacity: .45; -webkit-mask-image: radial-gradient(circle at 50% 40%, #000, transparent 70%); mask-image: radial-gradient(circle at 50% 40%, #000, transparent 70%); pointer-events: none; }
.login-card { position: relative; width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 44px 38px 36px; box-shadow: 0 40px 80px -40px rgba(12,42,67,.35); }
.login-card .logo { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 22px; border: 1px solid var(--line); }
.login-card h1 { font-size: 1.5rem; font-weight: 500; letter-spacing: -.02em; text-align: center; }
.login-card .sub { text-align: center; color: var(--ink-soft); font-size: .92rem; margin: 6px 0 28px; }
.login-card .btn { width: 100%; justify-content: center; }
.login-foot { margin-top: 22px; text-align: center; font-size: .82rem; color: var(--muted); }
.login-foot a { color: var(--blue); }
.demo-tag { position: fixed; z-index: 150; bottom: 14px; left: 50%; transform: translateX(-50%); background: #fff7e0; border: 1px solid #f0dca0; color: #7a5d00; font-size: .76rem; padding: 6px 14px; border-radius: 999px; letter-spacing: .02em; }

/* ── App-Gerüst ── */
.topbar { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.tabs { display: flex; gap: 6px; }
.tab { padding: 10px 16px; border-radius: var(--radius); font-size: .9rem; text-decoration: none; color: var(--ink-soft); transition: background .2s, color .2s; white-space: nowrap; }
.tab:hover { background: var(--bg-tint); color: var(--ink); }
.tab[aria-current="page"] { background: var(--aqua-soft); color: var(--blue); font-weight: 500; }
.user { display: flex; align-items: center; gap: 14px; font-size: .85rem; color: var(--ink-soft); }
.user b { font-weight: 500; color: var(--ink); }
.linkbtn { background: none; border: 0; font: inherit; color: var(--blue); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

main.app { max-width: 1160px; margin: 0 auto; padding: 48px var(--gutter) 100px; }
.view { animation: viewIn .5s cubic-bezier(.2,.7,.2,1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.view-head { margin-bottom: 32px; }
.view-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }
.view-head p { color: var(--ink-soft); margin-top: 6px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.panel-pad { padding: 26px 28px; }
.panel h2 { font-size: 1rem; font-weight: 500; margin: 0 0 4px; letter-spacing: -.01em; }
.panel .hint { font-size: .85rem; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px 26px; }
.stat small { display: block; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.stat strong { display: block; font-size: 1.9rem; font-weight: 500; letter-spacing: -.03em; line-height: 1.15; margin-top: 10px; color: var(--ink); }
.stat span { display: block; font-size: .86rem; color: var(--ink-soft); margin-top: 4px; }

.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }

.list { list-style: none; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list .when { font-weight: 500; font-size: .95rem; }
.list .what { font-size: .85rem; color: var(--ink-soft); }

.badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: .74rem; font-weight: 500; white-space: nowrap; }
.b-geplant { background: var(--aqua-soft); color: var(--blue); }
.b-erledigt, .b-bezahlt { background: #e4f4ea; color: #1c7a4b; }
.b-ausgefallen { background: #fde9e7; color: #b3372f; }
.b-offen { background: #fff2d6; color: #8a5a00; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { font: inherit; font-size: .85rem; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink-soft); transition: .2s; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 16px 24px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 18px 24px; border-top: 1px solid var(--line); vertical-align: middle; }
tbody tr:first-child td { border-top: 0; }
tbody tr:hover td { background: #fafcfe; }
td.num, th.num { text-align: right; }
.pdf { font: inherit; font-size: .82rem; color: var(--blue); background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 14px; cursor: pointer; transition: .2s; }
.pdf:hover { border-color: var(--blue); background: var(--aqua-soft); }

.objs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.obj { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.obj h3 { font-size: 1.1rem; font-weight: 500; letter-spacing: -.01em; }
.obj .addr { color: var(--ink-soft); font-size: .92rem; margin: 4px 0 20px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { text-align: right; font-weight: 500; }

.contact-big { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 760px; }
.contact-big .ccard { padding: 26px; }

.toast { position: fixed; z-index: 300; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: var(--radius); font-size: .88rem; opacity: 0; pointer-events: none; transition: .35s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Viele Reiter: unterhalb von 1240 px in eine zweite Zeile */
@media (max-width: 1240px) {
  .topbar-in { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 6px; gap: 6px 16px; }
  .tabs { order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .tab { padding: 8px 14px; }
}
@media (max-width: 900px) {
  .stats { grid-template-columns: 1fr; }
  .cols, .contact-big { grid-template-columns: 1fr; }
  .user b { display: none; }
  .topbar-in { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; gap: 8px; }
  .tabs { order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; }
  main.app { padding-top: 32px; }
  th, td { padding: 14px 16px; }
}

/* Fotos & Reinigungsplan */
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 16px; }
.fotos a { display: block; text-decoration: none; color: var(--ink-soft); font-size: .84rem; }
.fotos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); transition: transform .3s; }
.fotos a:hover img { transform: translateY(-2px); }
.fotos span { display: block; margin-top: 6px; }
.plan-h { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 18px 0 6px; }
.plan { list-style: none; display: grid; gap: 4px; }
.plan li { display: flex; gap: 12px; align-items: baseline; font-size: .93rem; color: var(--ink-soft); }
.plan .dot { flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); display: inline-grid; place-items: center; font-size: .7rem; color: #fff; transform: translateY(3px); }
.plan li.ok { color: var(--ink); } .plan li.ok .dot { background: #1c7a4b; border-color: #1c7a4b; }
.plan small { color: var(--muted); }
.plan-box { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.plan-box summary { cursor: pointer; font-weight: 500; font-size: .92rem; color: var(--blue); }
