/* MotoLegion – уеб табло. Цветовете и шрифтовете са по платното „MotoLegion екрани“. */

:root {
  --bg: #0E0F11;
  --panel: #141618;
  --card: #17191C;
  --raised: #1B1E21;
  --active: #22262A;
  --line: #2C3035;
  --line-soft: #24282C;
  --line-strong: #3A3F45;
  --text: #F3F1EC;
  --text-2: #C4C7CB;
  --muted: #A7ABB0;
  --accent: #FF7A2E;
  --accent-ink: #121212;
  --danger: #FF8A73;
  --ok: #7FD69B;
  --radius: 14px;
  --display: "Oswald", "Arial Narrow", sans-serif;
  --body: "Golos Text", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text-2); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; letter-spacing: .3px; }
h1 { font-size: 34px; line-height: 1.15; }
h2 { font-size: 20px; font-weight: 500; }
p { margin: 0; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
a.avatar:hover { color: var(--text); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* --- Рамка --- */

.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; scrollbar-width: thin;
}
.sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { display: block; height: auto; }
.topbar, .tabbar, .scrim { display: none; }
/* Оригиналното лого навсякъде; бутонът за затваряне на менюто е само на телефон. */
.sidebar .nav-close { display: none; }
.sidebar .brand img.logo-full { width: 160px; max-width: 100%; }

.club-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--raised); border: 1px solid var(--line); border-radius: 12px; padding: 8px;
  color: var(--text);
}
.club-card:hover { color: var(--text); border-color: var(--line-strong); }
.club-switch summary { list-style: none; cursor: pointer; }
.club-switch summary::-webkit-details-marker { display: none; }
.club-switch[open] .club-card { border-color: var(--line-strong); }
.club-switch ul { list-style: none; margin: 6px 0 0; padding: 6px; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; }
.club-switch li a { display: block; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.club-switch li a:hover, .club-switch li a[aria-current="true"] { background: var(--active); color: var(--text); }
.club-logo {
  width: 36px; height: 36px; border-radius: 10px; background: #202327; color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden;
}
.club-logo img { width: 100%; height: 100%; object-fit: cover; }
.club-card .meta { min-width: 0; flex: 1; }
.club-card .name, .club-card .plan { display: block; }
.club-card .name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.club-card .plan { font-size: 12px; color: var(--accent); }
.club-card .plan.free { color: var(--muted); }

.nav { display: flex; flex-direction: column; gap: 0; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 12px; border-radius: 10px; font-size: 14px; min-height: 38px; line-height: 1.3;
}
.nav a svg { flex-shrink: 0; color: var(--muted); }
.nav a[aria-current="page"] { background: var(--active); color: var(--text); font-weight: 600; }
.nav a[aria-current="page"] svg { color: var(--accent); }
.nav-sep { height: 1px; background: var(--line); margin: 5px 6px; flex-shrink: 0; }
.nav-label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 8px 12px 2px; }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.me { display: flex; align-items: center; gap: 6px; font-size: 14px; }
/* Аватарът и името водят към „Профил и настройки“ (тази точка вече я няма в менюто). */
.me-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 3px; border-radius: 10px; color: var(--text-2); }
.me-link:hover { background: var(--active); color: var(--text); }
.me-link[aria-current="page"] { background: var(--active); color: var(--text); font-weight: 600; }
.me-link[aria-current="page"] .avatar { box-shadow: 0 0 0 2px var(--accent); }
.me .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* В менюто: само бутонът за другия език, едно натискане го сменя. */
.me .lang button { flex: none; width: 36px; height: 32px; }
.me .lang button[aria-pressed="true"] { display: none; }
.lang { display: flex; gap: 6px; }
.lang button {
  flex: 1; height: 30px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--text-2); font: 600 12px var(--body); cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--active); color: var(--text); border-color: var(--line-strong); }

.content { min-width: 0; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 24px; max-width: 1360px; width: 100%; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head .eyebrow { color: var(--muted); font-size: 14px; }
.page-head h1 { margin-top: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* --- Елементи --- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--text);
  font: 600 14px var(--body); cursor: pointer; white-space: nowrap;
}
.btn:hover { color: var(--text); border-color: #50565D; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { color: var(--accent-ink); background: #FF8C4A; border-color: #FF8C4A; }
.btn-sm { height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.btn-ghost { background: transparent; }
.btn-icon { width: 36px; padding: 0; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { color: var(--danger); border-color: var(--danger); }
.btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.inline { display: inline; margin: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; min-width: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head a { font-size: 13px; color: var(--muted); }
.card-head a:hover { color: var(--text); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .label { font-size: 13px; color: var(--muted); }
.stat .value { font-family: var(--display); font-size: 32px; font-weight: 600; margin-top: 6px; line-height: 1.2; }
.stat .note { font-size: 12px; color: var(--muted); margin-top: 2px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .5px;
  text-transform: uppercase; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 14px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
td.nowrap { white-space: nowrap; }
.strong { font-weight: 600; color: var(--text); }
.sub { color: var(--muted); font-size: 12px; }
.soft { color: var(--text-2); }
.muted { color: var(--muted); }
.bar { height: 6px; width: 110px; border-radius: 3px; background: var(--line); margin-top: 6px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }

.badge {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 12px;
  font-size: 12px; font-weight: 600; background: var(--active); color: var(--text-2); white-space: nowrap;
}
.badge-accent { background: rgba(255, 122, 46, .16); color: #FFA470; }
.badge-live { background: rgba(127, 214, 155, .16); color: var(--ok); }
.badge-warn { background: rgba(255, 138, 115, .16); color: var(--danger); }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: #4A5562; color: var(--text);
  font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person .meta { min-width: 0; flex: 1; }

.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.list-row:last-child { border-bottom: none; }
.empty { color: var(--muted); font-size: 14px; padding: 6px 0; }

.event-mini { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); color: var(--text); }
.event-mini:last-child { border-bottom: none; }
.event-mini:hover { color: var(--text); }
.datebox {
  width: 52px; flex-shrink: 0; text-align: center; border-radius: 10px; background: var(--raised);
  border: 1px solid var(--line); padding: 6px 0;
}
.datebox .d { font-family: var(--display); font-size: 22px; font-weight: 600; line-height: 1.1; }
.datebox .m { font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: .5px; }

select, input[type="search"], input[type="text"] {
  height: 40px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg);
  color: var(--text); font: 400 14px var(--body); padding: 0 12px;
}
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 18px;
  border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; color: var(--text-2);
}
.chip[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.month-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.month-nav .current { font-family: var(--display); font-size: 18px; min-width: 150px; text-align: center; text-transform: capitalize; }

.events-group h2 { text-transform: capitalize; margin: 4px 0 12px; }
.event-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.event-row + .event-row { margin-top: 10px; }
.event-row .datebox { width: 64px; padding: 8px 0; }
.event-row .datebox .d { font-size: 26px; }
.event-row h3 { font-size: 18px; font-weight: 500; }
.event-row h3 a { color: var(--text); }
.event-row .info { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; margin-top: 4px; }
.event-row.promoted { border-color: rgba(255, 122, 46, .5); }

.messages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.messages li { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--raised); font-size: 14px; }
.messages .error { border-color: rgba(255, 138, 115, .5); color: #FFC2B5; }
.messages .success { border-color: rgba(127, 214, 155, .45); color: #BFF0CE; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.prose { color: var(--text-2); white-space: pre-line; }
.cover { width: 100%; max-height: 320px; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; }

/* --- Форми --- */

.form { display: flex; flex-direction: column; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.field .help { font-size: 12px; color: var(--muted); }
.field .errorlist { list-style: none; margin: 0; padding: 0; color: var(--danger); font-size: 13px; }
.errorlist.nonfield { list-style: none; margin: 0; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(255, 138, 115, .5); color: #FFC2B5; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .field select, .field textarea {
  width: 100%; min-height: 44px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--text); font: 400 15px var(--body); padding: 10px 12px;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field input[type="file"] { color: var(--text-2); font: 400 14px var(--body); }
.field input[type="file"]::file-selector-button {
  margin-right: 12px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--card); color: var(--text); font: 600 13px var(--body); cursor: pointer;
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.section-title { font-family: var(--display); font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin: 6px 0 -4px; }
.settings-nav { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; padding: 8px 0; background: var(--bg); }
.danger-zone { border-color: rgba(255, 138, 115, .45); }
.bike { border: 1px solid var(--line); border-radius: 12px; background: var(--raised); }
.bike summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.bike summary::-webkit-details-marker { display: none; }
.bike[open] summary { border-bottom: 1px solid var(--line); }
.bike .body { padding: 14px; }
.thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--active); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); }

/* --- Карта --- */

.map { height: 360px; border-radius: 14px; border: 1px solid var(--line); background: #1b1e21; z-index: 0; }
.map.tall { height: 520px; }
.map.picker { height: 320px; cursor: crosshair; }
.leaflet-container { font: 400 13px var(--body); background: #1b1e21; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--raised); color: var(--text); border: 1px solid var(--line-strong); }
.leaflet-popup-content { margin: 10px 14px; }
.leaflet-control-attribution { background: rgba(14, 15, 17, .7) !important; color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--text-2) !important; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: var(--dot); vertical-align: -1px; }

/* --- На живо --- */

.live-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.live-layout .map { height: calc(100vh - 220px); min-height: 420px; }
.live-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.live-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live-status.on .dot { background: var(--ok); }
.btn-sos { background: #D9342B; border-color: #D9342B; color: #fff; }
.btn-sos:hover { background: #E8473E; border-color: #E8473E; color: #fff; }
.alert-sos { padding: 12px 16px; border-radius: 12px; background: rgba(217, 52, 43, .18); border: 1px solid rgba(217, 52, 43, .6); color: #FFC9C4; font-weight: 600; }

/* --- Вход --- */

.login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px;
}
.login-box { width: 100%; max-width: 520px; display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.login-logo { width: 100%; max-width: 440px; height: auto; }
.login-lead { color: var(--text-2); font-size: 17px; max-width: 420px; }
.login-card { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.login-card .hint { color: var(--muted); font-size: 13px; }
.login .lang { width: 160px; }
.login .messages { width: 100%; text-align: left; }

/* --- Публични страници (поверителност, изтриване на акаунта) --- */

.public-page { max-width: 760px; margin: 0 auto; padding: 32px 16px; display: flex; flex-direction: column; gap: 20px; }
.public-text { display: flex; flex-direction: column; gap: 12px; line-height: 1.6; }
.public-text h2 { margin-top: 12px; }
.public-text ul, .public-text ol { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.public-text a { text-decoration: underline; }
.public-links { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 14px; }
.public-page .lang { width: 160px; }

/* --- Таблет: менюто е тясна лента с икони --- */

@media (max-width: 1100px) {
  .split, .detail-grid, .live-layout { grid-template-columns: minmax(0, 1fr); }
  .live-layout .map { height: 60vh; }
}

@media (max-width: 1180px) and (min-width: 761px) {
  .shell { grid-template-columns: 80px minmax(0, 1fr); }
  .sidebar { padding: 14px 12px; align-items: center; gap: 12px; }
  .sidebar-top { justify-content: center; }
  .brand { padding: 0; }
  .sidebar .brand img.logo-full { width: 60px; }
  .nav .label, .club-card .meta, .me .who, .nav-label { display: none; }
  .club-switch { position: relative; }
  .club-card { padding: 6px; justify-content: center; }
  .club-switch ul { position: absolute; left: calc(100% + 10px); top: 0; width: 240px; z-index: 20; box-shadow: 0 12px 30px rgba(0, 0, 0, .45); }
  .nav { width: 100%; align-items: center; }
  .nav a { width: 52px; height: 40px; min-height: 0; justify-content: center; padding: 0; }
  .nav-sep { width: 40px; }
  .sidebar-foot { width: 100%; align-items: center; }
  .me { flex-direction: column; gap: 6px; }
  .me-link { flex: none; padding: 3px; }
  .content { padding: 24px 24px 40px; }
}

/* --- Нисък екран: менюто се събира без плъзгач --- */

@media (max-height: 720px) and (min-width: 761px) {
  .sidebar { gap: 12px; padding-top: 14px; padding-bottom: 14px; }
  .club-card { padding: 6px 8px; }
  .club-logo { width: 34px; height: 34px; }
  .nav a { min-height: 34px; padding-top: 5px; padding-bottom: 5px; }
  .sidebar .brand img.logo-full { width: 130px; }
}
@media (max-height: 720px) and (max-width: 1180px) and (min-width: 761px) {
  .nav a { height: 34px; }
  .sidebar .brand img.logo-full { width: 52px; }
}

/* --- Телефон: горна лента, долни табове, менюто се плъзга отляво --- */

@media (max-width: 760px) {
  .shell { display: block; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 30; height: 56px; padding: 0 12px 0 16px;
    background: rgba(14, 15, 17, .94); border-bottom: 1px solid var(--line);
    backdrop-filter: blur(8px);
  }
  .topbar .brand img.logo-full { width: 113px; }
  .sidebar {
    position: fixed; z-index: 50; top: 0; left: 0; bottom: 0; width: min(300px, 86vw); height: 100%;
    transform: translateX(-100%); transition: transform .2s ease; border-right: 1px solid var(--line);
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .6); }
  .sidebar .nav-close { display: inline-flex; }
  .sidebar .brand img.logo-full { width: 190px; }
  .scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .55); }
  body.nav-open .scrim { display: block; }
  body.nav-open { overflow: hidden; }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    background: rgba(20, 22, 24, .97); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 52px; border-radius: 10px; font-size: 11px; font-weight: 600; color: var(--muted);
  }
  .tabbar a[aria-current="page"] { color: var(--accent); }
  .tabbar svg { width: 22px; height: 22px; }

  .content { padding: 18px 16px 104px; gap: 18px; }
  h1 { font-size: 26px; }
  .page-head { align-items: stretch; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat .value { font-size: 24px; }
  .card { padding: 16px; border-radius: 14px; }

  .event-row { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .event-row .datebox { width: 52px; }
  .event-row .row-action { grid-column: 1 / -1; }
  .event-row .row-action .btn { width: 100%; }
  .month-nav { margin-left: 0; width: 100%; justify-content: space-between; }
  .month-nav .current { min-width: 0; flex: 1; }
  .chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; }
  .chip { flex-shrink: 0; }

  /* Таблиците стават карти: всеки ред е карта, всяка клетка е „етикет: стойност“. */
  table.cards thead { display: none; }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards tr { border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; margin-bottom: 10px; background: var(--raised); }
  table.cards td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); text-align: right; white-space: normal; }
  table.cards td:last-child { border-bottom: none; }
  table.cards td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; flex-shrink: 0; }
  table.cards td.cell-main { display: block; text-align: left; }
  table.cards td.cell-main::before { display: none; }
  table.cards .bar { margin-left: auto; }
  table.cards td.empty { text-align: left; }
  .table-wrap { overflow: visible; }
}

/* Връзки за споделяне (web/share.html) */
.share-details { list-style: none; padding: 0 !important; color: var(--muted, inherit); }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.share-actions .btn { text-decoration: none; }
