/* Ursalo – platform pages (login, chooser, Super-Admin). Colours from the bear logo (Produkt, Menüs & Design; DS-01). */
:root {
    --u-red: #E62227;
    --u-yellow: #EFA20E;
    --u-black: #232324;
    --u-bg: #F7F6F3;
    --u-card: #FFFFFF;
    --u-line: #E7E5E0;
    --u-muted: #605C56;
    --u-warn-fg: #6E4A00; --u-warn-bg: #FFF3D6;
    --u-bad-fg: #B5161B;  --u-bad-bg: #FDE8E8;
    --u-ok-fg: #1F6B42;   --u-ok-bg: #E2F2E8;
}
.pf-mark { display: inline-block; width: 34px; height: 24px; background: url("../icons/origin-bear.svg?v=or4") no-repeat center / contain; vertical-align: -5px;
           margin-right: 8px; flex: none; }   /* the Origin bear (19.11.2026) */
.pf-mark-lg { width: 60px; height: 42px; vertical-align: -10px; margin-right: 12px; }
.pf-login-brand { font-size: 34px; font-weight: 700; color: var(--u-black); letter-spacing: -.01em; }

body.platform { background: var(--u-bg); color: var(--u-black); }
.pf-top { display: flex; align-items: center; gap: 24px; padding: 12px 24px; background: var(--u-card); border-bottom: 1px solid var(--u-line);
          position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.pf-brand { font-weight: 700; font-size: 18px; color: var(--u-black); text-decoration: none; white-space: nowrap; }
.pf-brand small { font-weight: 500; font-size: 12px; color: var(--u-muted); margin-left: 6px; }
.pf-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.pf-nav a { padding: 8px 12px; border-radius: 10px; color: var(--u-black); text-decoration: none; font-weight: 500; }
.pf-nav a.is-on { background: var(--u-black); color: #fff; }
.pf-nav a:hover:not(.is-on) { background: var(--u-bg); }
.pf-side { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.pf-who { color: var(--u-muted); font-size: 14px; }
.pf-main { max-width: 1180px; margin: 0 auto; padding: 24px 16px 64px; }
.pf-main .card { margin-bottom: 18px; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.pf-firm { display: flex; flex-direction: column; gap: 8px; }
.pf-firm-name { font-weight: 600; font-size: 17px; }
.pf-firm .btn { align-self: flex-start; margin-top: 6px; }
.pf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .pf-cols { grid-template-columns: 1fr; } .pf-top { gap: 10px; } .pf-side { margin-left: 0; } }
.pf-check { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--u-line); }
.pf-check:last-of-type { border-bottom: 0; }
.pf-check input { width: 18px; height: 18px; accent-color: var(--u-red); }
.pf-pill { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--u-line); }
.pf-st-demo { background: var(--u-warn-bg); color: var(--u-warn-fg); }
.pf-st-active { background: var(--u-ok-bg); color: var(--u-ok-fg); }
.pf-st-paused, .pf-st-locked { background: var(--u-bad-bg); color: var(--u-bad-fg); }
.pf-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.pf-tabs a { padding: 7px 12px; border-radius: 10px; border: 1px solid var(--u-line); background: var(--u-card); color: var(--u-black); text-decoration: none; font-size: 14px; }
.pf-tabs a.is-on { background: var(--u-black); border-color: var(--u-black); color: #fff; }
.pf-inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pf-inline input { padding: 6px 8px; border: 1px solid var(--u-line); border-radius: 8px; font: inherit; font-size: 13px; }
.pf-inline input[type=date] { width: 140px; }
.pf-prices td { vertical-align: top; }
.pf-matrix .pf-c { text-align: center; font-weight: 600; }
.pf-log { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.pf-log li { padding: 6px 0; border-bottom: 1px solid var(--u-line); }
.pf-once code { font-size: 15px; padding: 2px 6px; background: #fff; border-radius: 6px; }
.pf-add { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--u-line); }
tr.is-muted td { opacity: .5; }
.platform .btn-primary { background: var(--u-red); border-color: var(--u-red); }
.platform .btn-primary:hover { filter: brightness(.94); }
.pf-prices td:first-child { max-width: 300px; }
.pf-prices td:last-child { white-space: nowrap; }
.pf-prices .pf-inline { flex-wrap: nowrap; }
.pf-inline input[name=price], .pf-inline input[name=minimum] { width: 76px; text-align: right; }
@media (max-width: 860px) {
    .pf-prices .pf-inline { flex-wrap: wrap; }
    .pf-prices td:last-child { white-space: normal; }
    .pf-main { padding: 16px 12px 48px; }
    .page-head { flex-wrap: wrap; gap: 10px; }
}
.pf-nowrap { white-space: nowrap; }
.pf-prices td:first-child { max-width: 420px; }

/* ---------- the login background (app/pages/login.php): a bear's tracks over the Alps, two slow lights ---------- */
body.bare { background: var(--u-bg); overflow-x: hidden; }
.pf-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.pf-bg::before, .pf-bg::after { content: ""; position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.pf-bg::before { width: 46vmax; height: 46vmax; left: -12vmax; top: -14vmax;
                 background: radial-gradient(circle, rgba(230, 34, 39, .28), rgba(230, 34, 39, 0) 68%); animation: u-drift-a 26s ease-in-out infinite alternate; }
.pf-bg::after { width: 40vmax; height: 40vmax; right: -10vmax; bottom: -6vmax;
                background: radial-gradient(circle, rgba(239, 162, 14, .32), rgba(239, 162, 14, 0) 68%); animation: u-drift-b 31s ease-in-out infinite alternate; }
.pf-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.pf-alps-back { fill: #ECE8E1; }
.pf-alps-front { fill: #E3DED6; }
.pf-snow { fill: #FFFFFF; opacity: .9; }
.pf-paws { fill: var(--u-red); }
.pf-paws use { opacity: 0; animation: u-step 16s linear infinite; animation-delay: calc(var(--i) * .55s); }
@keyframes u-step { 0% { opacity: 0; } 2% { opacity: .28; } 44% { opacity: .28; } 60%, 100% { opacity: 0; } }
@keyframes u-drift-a { to { transform: translate(14vmax, 10vmax) scale(1.12); } }
@keyframes u-drift-b { to { transform: translate(-12vmax, -9vmax) scale(.92); } }
body.bare .login { position: relative; z-index: 1; }
body.bare .bare-langs { z-index: 2; }   /* keeps its own place (style.css), only above the background */
body.bare .login-card { background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
                        box-shadow: 0 24px 60px -30px rgba(35, 35, 36, .35); }
body.bare .login-sub { color: var(--u-muted); }
@media (max-width: 600px) { .pf-paws use { animation-duration: 18s; } .pf-bg::before, .pf-bg::after { opacity: .4; } }
@media (prefers-reduced-motion: reduce) {
    .pf-bg::before, .pf-bg::after { animation: none; }
    .pf-paws use { animation: none; opacity: .1; }
}

/* ---------- the name: the brand «Lemya» (Auftrag 16, 30.11.2026: no firm name in the header) ---------- */
.pf-brand { display: inline-flex; align-items: center; gap: 8px; }
.pf-brand .pf-mark { margin-right: 2px; }
.pf-brand-word { display: inline-flex; flex-direction: column; line-height: 1; letter-spacing: -.01em; }
.pf-brand-word small { margin-top: 3px; font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--u-muted); }
.pf-badge { margin-left: 6px; padding: 2px 8px; border-radius: 6px; background: var(--u-bg); border: 1px solid var(--u-line); font-size: 11px; font-weight: 600; color: var(--u-muted); }
.pf-login-brand { display: flex; align-items: center; justify-content: center; }
.pf-login-brand .pf-brand-word { font-size: 38px; font-weight: 700; }
.pf-login-brand .pf-brand-word small { margin-top: 7px; font-size: 12px; letter-spacing: .14em; }
.pf-top { gap: 16px; }
.pf-top .pf-brand-word small { font-size: 9.5px; letter-spacing: .03em; }
.pf-top .pf-badge { margin-left: 2px; padding: 2px 6px; }
.pf-nav a { padding: 8px 10px; }

.pf-shadow { background: #EDE7F6; color: #4A2D7A; }
.pf-alerts { border-left: 4px solid var(--u-bad-fg); }
.pf-inline-form { display: inline; margin-left: 8px; }
/* Faza 1.16: the overview's traffic lights */
.ov-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; background: var(--u-line); }
.ov-red { background: var(--u-red); box-shadow: 0 0 0 3px var(--u-bad-bg); }
.ov-yellow { background: var(--u-yellow); box-shadow: 0 0 0 3px var(--u-warn-bg); }
.ov-green { background: #2E8B57; box-shadow: 0 0 0 3px var(--u-ok-bg); }
.ov-grey { background: #B9B5AD; }
.ov-table td { vertical-align: middle; }

/* Super-Admin → Admins (20.11.2026): an account each, the password shown once */
.pf-lead { max-width: 760px; margin: 0 0 16px; }
.page-sa_admins .mfa-item.is-muted > div:first-child { opacity: .55; }
.page-sa_admins .mfa-item > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.page-sa_admins .pf-member-actions { justify-content: flex-end; }
.page-sa_admins summary.btn { list-style: none; }
.page-sa_admins summary.btn::-webkit-details-marker { display: none; }
.page-sa_admins .mfa-remove details[open] { min-width: 0; max-width: 320px; }
.page-sa_admins .exit-rows li b { white-space: normal; overflow-wrap: anywhere; text-align: right; }
.page-sa_admins [data-k="admin-password"] .mfa-secret, .page-sa_admins [data-k="agent-code"] .mfa-secret { user-select: all; font-size: 16px; }
.page-sa_chat .sa-chat-card { max-width: 560px; }
.page-sa_chat .sa-chat-code { display: grid; gap: 10px; margin: 12px 0; }
.page-sa_chat .sa-chat-code input { width: 100%; box-sizing: border-box; font-size: 18px; letter-spacing: .1em; }
.page-sa_chat .sa-chat-code .btn { justify-self: start; }
.page-sa_chat .sa-chat-lost { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
@media (max-width: 600px) { .page-sa_chat .sa-chat-code .btn, .page-sa_chat .form-actions .btn { width: 100%; justify-content: center; } }
@media (max-width: 640px) {
    .page-sa_admins .mfa-item { flex-direction: column; }
    .page-sa_admins .pf-member-actions { justify-content: flex-start; }
}

/* 20.11.2026: the Super-Admin's seven menus – a row of main menus, under it the pages of the open one (app/platform_nav.php) */
.pf-sub { flex-basis: 100%; display: flex; gap: 4px; margin: 0 -24px -12px; padding: 6px 24px; border-top: 1px solid var(--u-line);
          background: var(--u-bg); overflow-x: auto; scrollbar-width: thin; }
.pf-sub a { padding: 6px 10px; border-radius: 8px; color: var(--u-black); text-decoration: none; font-size: 14px; white-space: nowrap; }
.pf-sub a.is-on { background: var(--u-card); box-shadow: 0 0 0 1px var(--u-line); font-weight: 600; }
.pf-sub a:hover:not(.is-on) { background: var(--u-card); }
.pf-sub a.is-soon { color: var(--u-muted); }
.pf-sub a small { font-size: 10.5px; margin-left: 4px; padding: 1px 5px; border-radius: 5px; background: var(--u-warn-bg); color: var(--u-warn-fg); }
.pf-search input { width: 170px; padding: 7px 10px; border: 1px solid var(--u-line); border-radius: 10px; font: inherit; font-size: 14px; background: var(--u-bg); }
@media (max-width: 860px) {
    .pf-nav { flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; order: 3; }
    .pf-nav a { white-space: nowrap; }
    .pf-sub { order: 4; margin: 0 -16px -12px; padding: 6px 16px; }
    .pf-top { padding: 10px 16px; }
    .pf-side { flex-wrap: wrap; gap: 10px; }
    .pf-search input { width: 130px; }
}

/* 21.11.2026: Lemya's dashboard (app/pages/sa_dash.php) and its logo */
.dash-h { margin: 22px 0 10px; font-size: 18px; }
.dash-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.dash-card { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; margin-bottom: 0 !important; transition: box-shadow .15s; }
.dash-card:hover { box-shadow: 0 0 0 2px var(--u-black); }
.dash-card.is-empty .dash-value { color: var(--u-muted); }
/* 29.11.2026 (Prüfer review): a task card is red while something waits; the smaller grid above the traffic light (Betrieb) */
.dash-card.is-hot { border-left: 4px solid #B5161B; }
.dash-card.is-hot .dash-value { color: #B5161B; }
.dash-grid-sm { margin-bottom: 14px; }
.dash-rem { gap: 8px; margin: 4px 0; flex-wrap: wrap; }
.dash-rem-add { gap: 8px; flex-wrap: wrap; }
.dash-rem-add input[name=text] { min-width: 280px; flex: 1; }
@media (max-width: 600px) { .dash-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; } .dash-card { min-width: 0; overflow-wrap: anywhere; } .dash-rem-add input[name=text] { min-width: 0; width: 100%; } }
.dash-value { font-size: 26px; font-weight: 700; line-height: 1.15; }
.dash-delta { font-size: 13px; font-weight: 600; }
.dash-delta.is-up { color: #1F6B42; }
.dash-delta.is-down { color: #B5161B; }
.dash-period { flex-wrap: wrap; gap: 6px; align-items: center; }
.pf-chip { display: inline-flex; align-items: center; white-space: nowrap; line-height: 1.2; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--u-line); color: var(--u-black); text-decoration: none; font-size: 14px; background: var(--u-card); }
/* 29.11.2026 (Prüfer, Kunden-Menü H1): the filter rows – chips wrap with a gap, never on top of each other */
.pf-filters > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0; }
.pf-filters > div > strong { min-width: 70px; }
/* 29.11.2026 (Prüfer, Kunden-Menü N6): the inline styles of sa_transfer / sa_tenant as classes */
.pf-row { flex-wrap: wrap; gap: 8px; }
.pf-row-tight { margin: 2px 0; }
.pf-row-top { margin-top: 10px; }
.pf-row-wide { gap: 14px 18px; align-items: flex-start; }
.pf-stage-h { margin: 10px 0 4px; }
.pf-late { color: #B5161B; }
.pf-grow-in { min-width: 240px; flex: 1; }
.pf-num-sm { width: 70px; }
@media (max-width: 600px) { .pf-grow-in { min-width: 0; width: 100%; } }
.pf-chip.is-on { background: var(--u-black); color: #fff; border-color: var(--u-black); }
.dash-custom { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dash-custom input[type=date] { padding: 5px 8px; border: 1px solid var(--u-line); border-radius: 8px; font: inherit; font-size: 14px; }
.pf-logo { height: 34px; width: auto; display: block; }
@media (max-width: 860px) { .pf-logo { height: 28px; } .dash-value { font-size: 22px; } }
/* 23.11.2026: a value changed against the version before (Einstellungen › Branchen) */
.pf-changed { font-weight: 600; color: #b45309; }
.dash-delta.is-flat { color: var(--u-muted); font-weight: 500; }
/* 24.11.2026: the signature by hand (public/assets/signpad.js) */
.signpad { border: 1px dashed #777; border-radius: 10px; background: #fff; position: relative; }
.signpad canvas { width: 100%; height: 190px; display: block; cursor: crosshair; }
.signpad .signpad-line { position: absolute; left: 6%; right: 6%; bottom: 42px; border-bottom: 1px solid #bbb; pointer-events: none; }
.signpad .signpad-x { position: absolute; left: 6%; bottom: 46px; color: #999; font-size: 20px; pointer-events: none; }

/* 28.11.2026: Kontenrahmen – change, switch off, delete in each row */
.ch-acts { white-space: nowrap; }
.ch-acts > * { display: inline-block; margin-right: 10px; vertical-align: top; }
.ch-edit > summary { list-style: none; cursor: pointer; }
.ch-edit > summary::-webkit-details-marker { display: none; }
.ch-edit[open] { display: block; margin: 6px 0; }
.ch-edit-form { flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ch-edit-form input[name="name"] { min-width: 220px; }
.ch-edit-form input[name="note"] { min-width: 320px; flex: 1 1 320px; }
.ch-note { max-width: 60ch; margin-top: 2px; white-space: normal; }
.ch-del { color: #b3261e; }
@media (max-width: 640px) {
    .ch-acts { white-space: normal; }
    .ch-edit-form input[name="name"], .ch-edit-form input[name="note"] { min-width: 0; width: 100%; }
}

/* 28.11.2026: «+» for a new seller / intermediary; a wrong field named at the field (sa_sellers) */
.pf-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pf-card-head .card-title { margin: 0; }
.pf-plus { white-space: nowrap; }
input.is-invalid, select.is-invalid { border-color: #b3261e !important; background: #fdf1f0; outline-color: #b3261e; }
.field-err { display: block; color: #b3261e; font-size: 13px; margin-top: 4px; line-height: 1.35; }
/* 29.11.2026 (Auftrag 11, Sevi): «Alle Kunden» – one filter row (Kunde, Ampel, Art), three selects side by side, also on a phone */
.pf-filterbar { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; padding: 10px; }
.pf-fsel { flex: 1 1 0; min-width: 0; max-width: 260px; margin: 0; }
.pf-fsel select { width: 100%; min-width: 0; padding: 7px 8px; border: 1px solid var(--u-line); border-radius: 8px; font: inherit; font-size: 14px; background: var(--u-card); color: var(--u-black); text-overflow: ellipsis; }
.pf-fsel.is-on select { border-color: var(--u-black); font-weight: 600; }
@media (max-width: 600px) { .pf-filterbar { gap: 6px; padding: 8px; } .pf-fsel select { font-size: 13px; padding: 7px 4px; } }
