/* =============================================================
   Aeberli Download Page — Brand-aligned styles
   Tokens mirror the Aeberli Digital design system.
   ============================================================= */

/* ---------- FONTS ---------- */
@font-face {
  font-family: "TT Interfaces";
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url("../fonts/TTInterfaces-ExtraLight.woff") format("woff");
}
@font-face {
  font-family: "TT Interfaces";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/TTInterfaces-Light.woff2") format("woff2");
}
@font-face {
  font-family: "TT Interfaces";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/TTInterfaces-Bold.woff2") format("woff2"),
       url("../fonts/TTInterfaces-Bold.woff") format("woff");
}
@font-face {
  font-family: "Capitolium News";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Capitolium-News-Italic.woff") format("woff");
}
@font-face {
  font-family: "Capitolium News";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Capitolium-News-Bold-Italic.woff") format("woff");
}

/* ---------- TOKENS ---------- */
:root {
  --ad-red: #da291c;
  --ad-red-deep: #b81f14;
  --ad-anthrazit: #333f48;
  --ad-anthrazit-deep: #1f262c;

  --ad-paper: #f5f3ee;
  --ad-paper-2: #efece4;
  --ad-surface: #ffffff;
  --ad-border: #e3dfd6;
  --ad-border-strong: #c9c3b3;

  --ad-fg: #1a1a1a;
  --ad-fg-2: #333f48;
  --ad-muted: #666666;
  --ad-subtle: #bbbbbb;

  --ad-sans: "TT Interfaces", "Helvetica Neue", Arial, sans-serif;
  --ad-serif-italic: "Capitolium News", Georgia, "Times New Roman", serif;

  --ad-text-xs: .68rem;
  --ad-text-sm: .82rem;
  --ad-text-base: 1rem;

  --ad-track-tight: -.035em;
  --ad-track-snug: -.025em;
  --ad-track-eyebrow: .14em;
  --ad-track-mini: .06em;

  --ad-wrap: 1100px;
  --ad-grid-cell: 60px;

  --ad-radius-0: 0;
  --ad-radius-1: 2px;
  --ad-radius-pill: 999px;

  --ad-bar: 4px;

  --ad-shadow-sm: 0 1px 2px rgba(26,26,26,.04);
  --ad-shadow-md: 0 4px 14px rgba(26,26,26,.06);
  --ad-shadow-lg: 0 18px 40px rgba(26,26,26,.10);

  --ad-ease: cubic-bezier(.22,.61,.36,1);
  --ad-dur: 250ms;
}

/* ---------- BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ad-sans);
  font-weight: 300;
  font-size: var(--ad-text-base);
  line-height: 1.6;
  color: var(--ad-fg);
  background: var(--ad-paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; color: var(--ad-fg); letter-spacing: var(--ad-track-snug); line-height: 1.1; }
h1 em, h2 em, h3 em, .ad-italic {
  font-family: var(--ad-serif-italic);
  font-style: italic;
  font-weight: 400;
  color: var(--ad-red);
}
p { margin: 0 0 1rem; }
a { color: var(--ad-fg); text-decoration: none; transition: color var(--ad-dur) var(--ad-ease); }
:where(a):hover { color: var(--ad-red); }
::selection { background: var(--ad-red); color: #fff; }

/* Accent bar + grid bg shared across all pages */
.ad-accent-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--ad-bar);
  background: var(--ad-red);
  z-index: 100;
}
.ad-page-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,0,0,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.04) 1px, transparent 1px);
  background-size: var(--ad-grid-cell) var(--ad-grid-cell);
}

/* =============================================================
   LOGIN — split editorial layout (brand canvas + form panel)
   ============================================================= */
.dl-login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--ad-paper);
  position: relative;
  z-index: 1;
}

.dl-login__brand {
  position: relative; overflow: hidden;
  background: var(--ad-anthrazit);
  color: #fff;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.75rem, 5vw, 4rem);
  display: flex; flex-direction: column; justify-content: space-between;
}
.dl-login__brand::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 80% at 30% 30%, black 25%, transparent 80%);
}
.dl-login__brand::after {
  content: ""; position: absolute; top: -25%; right: -15%;
  width: 75%; height: 75%; pointer-events: none;
  background: radial-gradient(ellipse 60% 60% at 60% 40%, rgba(218,41,28,.28) 0%, transparent 65%);
}
.dl-login__brand-inner { position: relative; z-index: 1; }

.dl-login__logo {
  display: inline-flex; align-items: center;
  margin-bottom: 3rem;
}
.dl-login__logo img { height: 28px; width: auto; display: block; }

.dl-login__eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: var(--ad-text-xs); font-weight: 600;
  letter-spacing: var(--ad-track-eyebrow); text-transform: uppercase;
  color: var(--ad-red); margin-bottom: 1.5rem;
}
.dl-login__eyebrow::before {
  content: ""; display: block; width: 24px; height: 2px; background: var(--ad-red);
}

.dl-login__h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.85rem);
  font-weight: 700; line-height: 1.1; letter-spacing: var(--ad-track-snug);
  color: #fff; margin: 0 0 1rem; max-width: 18ch;
}
.dl-login__h1 em {
  font-family: var(--ad-serif-italic);
  font-style: italic; font-weight: 400; color: var(--ad-red);
}
.dl-login__lede {
  font-size: 1rem; line-height: 1.7; font-weight: 300;
  color: rgba(255,255,255,.65); max-width: 44ch; margin: 0;
}

.dl-login__meta {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: .85rem;
  margin-top: 3rem; padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: var(--ad-text-sm); color: rgba(255,255,255,.55);
}
.dl-login__meta-row { display: flex; align-items: center; gap: .65rem; }
.dl-login__meta-row svg {
  width: 16px; height: 16px; flex-shrink: 0;
  color: var(--ad-red); opacity: .85;
}
.dl-login__meta-row a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.dl-login__meta-row a:hover { color: #fff; }

/* Right panel — form */
.dl-login__form-wrap {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(2rem, 6vw, 4rem);
  background: var(--ad-paper);
}
.dl-login__form-wrap::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 85% 18%, rgba(218,41,28,.09) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 15% 85%, rgba(218,41,28,.05) 0%, transparent 70%);
}
.dl-login__form {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.10);
  padding: 2.5rem 2.25rem;
  box-shadow: 0 24px 64px rgba(0,0,0,.08);
  animation: dl-rise .55s cubic-bezier(.22,.61,.36,1);
}
@keyframes dl-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.dl-login__welcome {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: var(--ad-text-xs); font-weight: 600;
  letter-spacing: var(--ad-track-eyebrow); text-transform: uppercase;
  color: var(--ad-red); margin-bottom: .85rem;
}
.dl-login__welcome::before { content: ""; display: block; width: 18px; height: 2px; background: var(--ad-red); }

.dl-login__form h1 {
  font-size: 1.55rem; font-weight: 700;
  letter-spacing: -.015em; line-height: 1.2;
  color: var(--ad-fg); margin: 0 0 .4rem;
}
.dl-login__form > p {
  font-size: .9rem; color: var(--ad-fg-2);
  margin: 0 0 1.75rem; line-height: 1.55;
}

.dl-login__field { margin: 0 0 1.25rem; }
.dl-login__field label {
  display: block; font-size: .72rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ad-fg-2); margin-bottom: .5rem;
}
.dl-login__input-wrap {
  position: relative;
  display: flex; align-items: center;
  border: 1px solid rgba(0,0,0,.10);
  background: #fbf8f2;
  border-radius: 8px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.dl-login__input-wrap:focus-within {
  border-color: var(--ad-red); background: #fff;
  box-shadow: 0 0 0 4px rgba(218,41,28,.12);
}
.dl-login__input-icon {
  width: 18px; height: 18px;
  margin-left: .9rem;
  color: var(--ad-fg-2); flex-shrink: 0;
  transition: color .2s;
}
.dl-login__input-wrap:focus-within .dl-login__input-icon { color: var(--ad-red); }
.dl-login__input-wrap input {
  flex: 1; min-width: 0;
  border: 0; background: transparent;
  font: inherit; color: var(--ad-fg);
  padding: .9rem 1rem .9rem .65rem;
  outline: none;
}
.dl-login__input-wrap input[type="password"] { letter-spacing: .25em; }
.dl-login__toggle {
  background: transparent; border: 0; cursor: pointer;
  padding: 0 .9rem; color: var(--ad-fg-2);
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .2s;
}
.dl-login__toggle:hover { color: var(--ad-fg); }
.dl-login__toggle svg { width: 18px; height: 18px; }
.dl-login__toggle .dl-login__eye-off { display: none; }
.dl-login__toggle.is-shown .dl-login__eye { display: none; }
.dl-login__toggle.is-shown .dl-login__eye-off { display: inline-block; }

.dl-login__submit {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--ad-red); color: #fff;
  border: 0; border-radius: 8px;
  padding: .95rem 1.5rem;
  font: 600 .92rem/1 var(--ad-sans);
  cursor: pointer;
  transition: background .25s, transform .25s, box-shadow .25s;
}
.dl-login__submit:hover {
  background: var(--ad-red-deep);
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(218,41,28,.25);
}
.dl-login__submit:active { transform: translateY(0); }
.dl-login__submit svg { width: 14px; height: 14px; transition: transform .25s; }
.dl-login__submit:hover svg { transform: translateX(3px); }

.dl-login__hint {
  margin: 1.5rem 0 0; padding-top: 1.25rem;
  border-top: 1px solid var(--ad-border);
  font-size: .8rem; color: var(--ad-fg-2); line-height: 1.55;
}
.dl-login__hint a { text-decoration: underline; text-underline-offset: 3px; }

/* Language toggle on the login brand panel — single link (shows opposite lang) */
.dl-login__lang {
  display: inline-flex;
  align-items: center;
  margin-top: 1.25rem;
  padding: .35rem .8rem;
  font: 700 .7rem var(--ad-sans);
  letter-spacing: .14em;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 4px;
  transition: color .15s, border-color .15s, background .15s;
}
.dl-login__lang:hover {
  color: #fff;
  border-color: #fff;
  background: rgba(255,255,255,.05);
}

.dl-flash {
  padding: .75rem 1rem; border-radius: 8px;
  font-size: .9rem; margin: 0 0 1rem;
}
.dl-flash--err { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.dl-flash--ok  { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }

@media (max-width: 880px) {
  .dl-login { grid-template-columns: 1fr; }
  .dl-login__brand { padding: 1.75rem 1.5rem; }
  .dl-login__logo { margin-bottom: 1.25rem; }
  .dl-login__h1 { font-size: 1.5rem; max-width: none; }
  .dl-login__lede { display: none; }
  .dl-login__meta { display: none; }
  .dl-login__form-wrap { padding: 2rem 1.5rem; }
  .dl-login__form { box-shadow: none; padding: 1.75rem 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .dl-login__form { animation: none; }
}

/* =============================================================
   DOWNLOADS — file list (post-login)
   ============================================================= */
.dl-topbar {
  position: sticky; top: var(--ad-bar); z-index: 50;
  background: var(--ad-anthrazit); color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.dl-topbar__inner {
  max-width: var(--ad-wrap);
  margin: 0 auto;
  display: flex; align-items: center; gap: 1.25rem;
  padding: .85rem clamp(1rem, 4vw, 2rem);
}
.dl-topbar__logo img { height: 22px; width: auto; display: block; }
.dl-topbar__user {
  margin-left: auto;
  display: flex; align-items: center; gap: 1rem;
  font-size: var(--ad-text-sm);
  color: rgba(255,255,255,.7);
}
.dl-topbar__user strong { color: #fff; font-weight: 600; }
.dl-topbar__logout {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .8rem; color: rgba(255,255,255,.7);
  padding: .45rem .85rem;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--ad-radius-1);
  background: transparent;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.dl-topbar__logout:hover { border-color: #fff; color: #fff; }
.dl-topbar__logout svg { width: 14px; height: 14px; }

.dl-page {
  position: relative; z-index: 1;
  max-width: var(--ad-wrap);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2rem) 6rem;
}

.dl-head {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--ad-border);
}
.dl-head__eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: var(--ad-text-xs); font-weight: 600;
  letter-spacing: var(--ad-track-eyebrow); text-transform: uppercase;
  color: var(--ad-red); margin-bottom: 1.25rem;
}
.dl-head__eyebrow::before {
  content: ""; display: block; width: 20px; height: 2px; background: currentColor;
}
.dl-head h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: var(--ad-track-tight);
  line-height: 1.02;
  margin: 0 0 1rem;
}
.dl-head__lede {
  font-size: 1.05rem;
  color: var(--ad-muted);
  max-width: 60ch;
  margin: 0;
}

/* =============================================================
   FILE-TYPE ICON — document outline + colored extension ribbon
   ============================================================= */
.dl-fi {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 52px;
  flex-shrink: 0;
  color: var(--ad-anthrazit);
  --dl-fi-color: #475569;
}
.dl-fi svg { width: 100%; height: 100%; display: block; }
.dl-fi__ext {
  position: absolute;
  bottom: 4px;
  left: 4px;
  min-width: 22px;
  height: 13px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--dl-fi-color);
  color: #fff;
  font: 700 8px/1 var(--ad-sans);
  letter-spacing: .04em;
  border-radius: 2px;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

.dl-fi--lg {
  width: 56px;
  height: 64px;
}
.dl-fi--lg .dl-fi__ext {
  bottom: 6px;
  left: 6px;
  height: 15px;
  min-width: 28px;
  font-size: 9.5px;
  padding: 0 5px;
}

/* Category colour palette — readable on white, brand-coherent */
.dl-fi--pdf   { --dl-fi-color: #c1372b; }
.dl-fi--doc   { --dl-fi-color: #1f5fc1; }
.dl-fi--xls   { --dl-fi-color: #1f7a3c; }
.dl-fi--ppt   { --dl-fi-color: #c4571a; }
.dl-fi--zip   { --dl-fi-color: #a16207; }
.dl-fi--img   { --dl-fi-color: #6d28d9; }
.dl-fi--video { --dl-fi-color: #0e7490; }
.dl-fi--audio { --dl-fi-color: #be185d; }
.dl-fi--code  { --dl-fi-color: #334155; }
.dl-fi--txt   { --dl-fi-color: #64748b; }
.dl-fi--exe   { --dl-fi-color: #1f262c; }
.dl-fi--font  { --dl-fi-color: #7c3aed; }
.dl-fi--file  { --dl-fi-color: #475569; }

/* =============================================================
   FILE LIST — polished row with rich metadata
   ============================================================= */
.dl-files {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--ad-shadow-sm);
}
.dl-file {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--ad-border);
  position: relative;
  transition: background .2s var(--ad-ease);
}
.dl-file:last-child { border-bottom: 0; }
.dl-file::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--dl-fi-color, var(--ad-red));
  opacity: 0;
  transition: opacity .2s var(--ad-ease);
}
.dl-file:hover { background: var(--ad-paper); }
.dl-file:hover::before { opacity: .8; }

.dl-file__body { min-width: 0; }
.dl-file__name {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ad-fg);
  letter-spacing: -.005em;
  word-break: break-word;
  line-height: 1.3;
}
.dl-file__meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .55rem;
  margin-top: .35rem;
  font-size: var(--ad-text-sm);
  color: var(--ad-muted);
  font-variant-numeric: tabular-nums;
}
.dl-file__kind {
  text-transform: uppercase;
  letter-spacing: var(--ad-track-mini);
  font-weight: 700;
  font-size: .65rem;
  color: var(--ad-fg-2);
  background: var(--ad-paper-2);
  border: 1px solid var(--ad-border);
  padding: .15rem .45rem;
  border-radius: 2px;
  line-height: 1.3;
}
.dl-file__dot { color: var(--ad-subtle); }

.dl-file__btn {
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--ad-anthrazit); color: #fff;
  border: 0; border-radius: 6px;
  padding: .7rem 1.1rem;
  font: 600 .85rem/1 var(--ad-sans);
  text-decoration: none;
  cursor: pointer;
  transition: background .2s var(--ad-ease), transform .2s var(--ad-ease), box-shadow .2s var(--ad-ease);
  white-space: nowrap;
}
.dl-file__btn:hover {
  background: var(--ad-red);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(218,41,28,.22);
}
.dl-file__btn svg { width: 14px; height: 14px; }

/* Customer-side action group: Download + Delete */
.dl-file .dl-file__actions {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.dl-file__del-form { margin: 0; line-height: 0; }
.dl-file__del {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--ad-border-strong);
  border-radius: 6px;
  color: var(--ad-muted);
  cursor: pointer;
  transition: color .2s var(--ad-ease), border-color .2s var(--ad-ease), background .2s var(--ad-ease);
}
.dl-file__del:hover {
  color: var(--ad-red);
  border-color: var(--ad-red);
  background: rgba(218,41,28,.04);
}
.dl-file__del svg { width: 16px; height: 16px; }

/* =============================================================
   STATS GRID — dashboard tile above the file list
   ============================================================= */
.dl-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: var(--ad-shadow-sm);
  overflow: hidden;
}
.dl-stat {
  padding: 1.25rem 1.5rem;
  border-right: 1px solid var(--ad-border);
  display: flex; flex-direction: column; gap: .3rem;
  min-width: 0;
}
.dl-stat:last-child { border-right: 0; }
.dl-stat__label {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ad-red);
}
.dl-stat__value {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ad-fg);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.dl-stat__hint {
  font-size: .8rem;
  color: var(--ad-muted);
  line-height: 1.35;
}

@media (max-width: 720px) {
  .dl-stats { grid-template-columns: 1fr; }
  .dl-stat {
    border-right: 0;
    border-bottom: 1px solid var(--ad-border);
    flex-direction: row; align-items: baseline;
    gap: .75rem;
    padding: .85rem 1.1rem;
  }
  .dl-stat:last-child { border-bottom: 0; }
  .dl-stat__value { font-size: 1.15rem; }
  .dl-stat__hint { font-size: .72rem; margin-left: auto; }
}

/* =============================================================
   ACCOUNT INFO TABLE (settings.php)
   ============================================================= */
.dl-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem 2rem;
  margin: 0;
}
.dl-info > div { display: flex; flex-direction: column; gap: .3rem; }
.dl-info dt {
  font-size: .65rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ad-muted);
}
.dl-info dd {
  margin: 0;
  font-size: 1rem; font-weight: 600;
  color: var(--ad-fg);
}
.dl-info dd code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .92em; font-weight: 500;
  background: var(--ad-paper-2);
  border: 1px solid var(--ad-border);
  border-radius: 2px;
  padding: .1rem .4rem;
}
.dl-info__hint {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ad-border);
  font-size: .85rem;
  color: var(--ad-muted);
  line-height: 1.55;
}

/* =============================================================
   TOPBAR — settings link styling (mirrors logout button)
   ============================================================= */
.dl-topbar__action {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .8rem; color: rgba(255,255,255,.7);
  padding: .45rem .85rem;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px;
  background: transparent;
  text-decoration: none;
  transition: border-color .2s, color .2s, background .2s;
}
.dl-topbar__action:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255,255,255,.04);
}
.dl-topbar__action.is-active {
  border-color: var(--ad-red);
  color: #fff;
  background: rgba(218,41,28,.12);
}
.dl-topbar__action svg { width: 14px; height: 14px; }

.dl-empty {
  border: 1px dashed var(--ad-border-strong);
  background: var(--ad-surface);
  padding: 3rem 2rem;
  text-align: center;
  border-radius: 8px;
}
.dl-empty__icon {
  width: 56px; height: 56px;
  margin: 0 auto 1rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ad-paper-2);
  border: 1px solid var(--ad-border);
  border-radius: 50%;
  color: var(--ad-muted);
}
.dl-empty__icon svg { width: 26px; height: 26px; }
.dl-empty h2 {
  font-size: 1.25rem; margin: 0 0 .5rem;
}
.dl-empty p {
  color: var(--ad-muted); max-width: 44ch; margin: 0 auto;
  font-size: .95rem;
}

.dl-footer {
  position: relative; z-index: 1;
  max-width: var(--ad-wrap);
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2rem) 3rem;
  font-size: var(--ad-text-sm);
  color: var(--ad-muted);
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  border-top: 1px solid var(--ad-border);
}
.dl-footer a { color: var(--ad-muted); }
.dl-footer a:hover { color: var(--ad-red); }

@media (max-width: 640px) {
  .dl-file {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "ico  body"
      "btn  btn";
    gap: .75rem 1rem;
    padding: 1rem;
  }
  .dl-file > .dl-fi { grid-area: ico; }
  .dl-file__body { grid-area: body; }
  .dl-file__btn  { grid-area: btn; justify-content: center; padding: .85rem 1rem; }
  .dl-topbar__user span { display: none; }
  .dl-topbar__action span { display: none; }
  .dl-topbar__logout span { display: none; }
}

/* =============================================================
   ADMIN — dashboard, customer cards, forms, dropzone, danger zone
   ============================================================= */

.dl-topbar__badge {
  display: inline-flex; align-items: center;
  font-size: .62rem; font-weight: 700;
  letter-spacing: var(--ad-track-eyebrow);
  text-transform: uppercase;
  color: #fff;
  background: var(--ad-red);
  padding: .3rem .55rem;
  border-radius: 4px;
  white-space: nowrap;
}
.dl-topbar__badge--admin    { background: var(--ad-red); }
.dl-topbar__badge--agent    { background: #6b7280; }

.dl-topbar__nav {
  display: flex;
  gap: .15rem;
  margin-left: .5rem;
}
.dl-topbar__nav a {
  display: inline-flex; align-items: center;
  padding: .55rem .9rem;
  font-size: .85rem; font-weight: 500;
  color: rgba(255,255,255,.7);
  border-radius: 6px;
  text-decoration: none;
  transition: color .2s, background .2s;
}
.dl-topbar__nav a:hover {
  color: #fff;
  background: rgba(255,255,255,.06);
}
.dl-topbar__nav a.is-active {
  color: #fff;
  background: rgba(255,255,255,.10);
}

/* Generic select styling — match input fields */
.dl-field select {
  display: block;
  width: 100%;
  font: inherit;
  font-size: .95rem;
  padding: .65rem 2rem .65rem .75rem;
  background: #fbf8f2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%23333f48' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right .8rem center / 10px no-repeat;
  border: 1px solid var(--ad-border);
  border-radius: 8px;
  color: var(--ad-fg);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--ad-sans);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.dl-field select:focus {
  border-color: var(--ad-red);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(218,41,28,.12);
}
.dl-field select[disabled] {
  background-color: var(--ad-paper);
  color: var(--ad-muted);
  cursor: not-allowed;
}

/* Customer card — Verantwortlich line */
.dl-customer__assignee {
  display: flex; align-items: center; gap: .5rem;
  margin: 0 0 .85rem;
  padding: .5rem .7rem;
  background: var(--ad-paper);
  border: 1px solid var(--ad-border);
  border-radius: 4px;
  font-size: .8rem;
  color: var(--ad-fg-2);
}
.dl-customer__assignee svg {
  width: 14px; height: 14px;
  color: var(--ad-red);
  flex-shrink: 0;
}
.dl-customer__assignee em {
  font-style: italic;
  color: var(--ad-muted);
  font-family: var(--ad-serif-italic);
}
.dl-customer__assignee strong {
  font-weight: 600;
  color: var(--ad-fg);
}

/* =============================================================
   STAFF LIST (users.php)
   ============================================================= */
.dl-staff {
  display: flex; flex-direction: column;
  gap: 1rem;
}
.dl-staff-row {
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-left: 3px solid var(--ad-border-strong);
  border-radius: var(--ad-radius-1);
  padding: 1.5rem 1.75rem;
  transition: border-color .2s var(--ad-ease);
}
.dl-staff-row:has(.dl-role-pill--admin) {
  border-left-color: var(--ad-red);
}
.dl-staff-row:has(.dl-role-pill--agent) {
  border-left-color: #6b7280;
}

.dl-staff-row__head {
  display: flex; align-items: center; gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ad-border);
  margin-bottom: 1.25rem;
}
.dl-staff-row__avatar {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ad-anthrazit);
  color: #fff;
  font-weight: 700; font-size: 1.05rem;
  border-radius: 4px;
  flex-shrink: 0;
}
.dl-staff-row__avatar--admin { background: var(--ad-red); }
.dl-staff-row__avatar--agent { background: var(--ad-anthrazit); }
.dl-staff-row__ident { flex: 1; min-width: 0; }
.dl-staff-row__ident strong {
  display: flex; align-items: center; gap: .55rem;
  font-weight: 700; font-size: 1.05rem;
  color: var(--ad-fg);
}
.dl-staff-row__ident span {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .78rem;
  color: var(--ad-muted);
  margin-top: .1rem;
}
.dl-staff-row__ident code {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.dl-role-pill {
  display: inline-flex; align-items: center;
  font-size: .65rem; font-weight: 700;
  letter-spacing: var(--ad-track-eyebrow);
  text-transform: uppercase;
  color: #fff;
  padding: .3rem .65rem;
  border-radius: 999px;
  white-space: nowrap;
}
.dl-role-pill--admin    { background: var(--ad-red); }
.dl-role-pill--agent    { background: #6b7280; }
.dl-role-pill--customer { background: var(--ad-anthrazit); }

.dl-badge {
  display: inline-flex;
  font-size: .58rem; font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .2rem .45rem;
  border-radius: 3px;
}
.dl-badge--me {
  background: var(--ad-paper-2);
  color: var(--ad-fg-2);
  border: 1px solid var(--ad-border);
}

.dl-staff-row__form { margin: 0; }
.dl-staff-row__pw {
  margin-top: 1rem;
  border-top: 1px dashed var(--ad-border);
  padding-top: 1rem;
}
.dl-staff-row__pw > summary {
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ad-fg-2);
  letter-spacing: .02em;
  padding: .25rem 0;
  list-style: none;
  display: inline-flex; align-items: center; gap: .35rem;
}
.dl-staff-row__pw > summary::-webkit-details-marker { display: none; }
.dl-staff-row__pw > summary::before {
  content: "+";
  display: inline-flex;
  width: 16px; height: 16px;
  align-items: center; justify-content: center;
  color: var(--ad-red);
  font-weight: 700;
}
.dl-staff-row__pw[open] > summary::before { content: "−"; }
.dl-staff-row__pw > summary:hover { color: var(--ad-red); }
.dl-staff-row__pw > form { margin-top: 1rem; }

.dl-staff-row__del {
  margin-top: 1rem;
  text-align: right;
}

@media (max-width: 640px) {
  .dl-topbar__nav { display: none; }
  .dl-staff-row { padding: 1.25rem; }
  .dl-staff-row__head { flex-wrap: wrap; }
}

/* =============================================================
   ADMIN SHELL — sticky sidebar + topbar layout (admin/staff pages)
   ============================================================= */

:root {
  --dl-sidebar-w: 240px;
  --dl-topbar-h: 60px;
}

body.dl-body--shell { background: var(--ad-paper); }

.dl-shell {
  display: grid;
  grid-template-columns: var(--dl-sidebar-w) 1fr;
  min-height: 100vh;
  background: var(--ad-paper);
  position: relative;
  z-index: 1;
}

/* Hamburger — mobile only */
.dl-shell__toggle {
  display: none;
  position: fixed; top: 14px; left: 14px;
  z-index: 60;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: #fff; color: var(--ad-fg);
  border: 1px solid var(--ad-border);
  border-radius: 6px;
  box-shadow: var(--ad-shadow-sm);
  cursor: pointer; padding: 0;
  transition: border-color .15s, color .15s;
}
.dl-shell__toggle:hover { border-color: var(--ad-red); color: var(--ad-red); }
.dl-shell__toggle svg { width: 20px; height: 20px; }

/* Sidebar */
.dl-shell__sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex; flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--ad-border);
  padding: 1rem .75rem;
  gap: 1.25rem;
}

.dl-shell__brand {
  display: flex; align-items: center; gap: .65rem;
  padding: .6rem .65rem;
  font-size: 1rem; font-weight: 700;
  letter-spacing: -.012em;
  color: var(--ad-fg);
  text-decoration: none;
  border-radius: 6px;
  transition: background .15s;
}
.dl-shell__brand:hover { background: var(--ad-paper-2); color: var(--ad-fg); }
.dl-shell__brand em {
  font-style: italic;
  font-family: var(--ad-serif-italic);
  font-weight: 400;
  color: var(--ad-red);
}
.dl-shell__brand-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--ad-red);
  box-shadow: 0 0 0 4px rgba(218,41,28,.12);
  flex-shrink: 0;
}

.dl-shell__nav {
  display: flex; flex-direction: column;
  gap: 1.1rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.dl-shell__nav-group {
  display: flex; flex-direction: column;
  gap: .15rem;
}
.dl-shell__nav-h {
  font-size: .62rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ad-subtle);
  padding: .25rem .65rem .4rem;
}

.dl-shell__nav-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .6rem .7rem;
  border: 0;
  background: transparent;
  color: var(--ad-fg-2);
  font: 500 .9rem/1.2 var(--ad-sans);
  text-align: left;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background .12s, color .12s;
  width: 100%;
}
.dl-shell__nav-item:hover {
  background: var(--ad-paper-2);
  color: var(--ad-fg);
}
.dl-shell__nav-item.is-active {
  background: var(--ad-anthrazit);
  color: #fff;
}
.dl-shell__nav-item.is-active .dl-shell__nav-icon { color: #fff; }
.dl-shell__nav-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  flex-shrink: 0;
  color: var(--ad-subtle);
}
.dl-shell__nav-icon svg { width: 18px; height: 18px; display: block; }
.dl-shell__nav-item:hover .dl-shell__nav-icon { color: var(--ad-fg); }

/* Sidebar foot — user pill + logout */
.dl-shell__foot {
  border-top: 1px solid var(--ad-border);
  padding-top: .75rem;
}
.dl-shell__user {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .65rem;
  margin-bottom: .35rem;
  background: var(--ad-paper);
  border: 1px solid transparent;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background .15s var(--ad-ease), border-color .15s var(--ad-ease);
}
.dl-shell__user:hover {
  background: var(--ad-paper-2);
  border-color: var(--ad-border-strong);
  color: var(--ad-fg);
}
.dl-shell__user.is-active {
  background: rgba(218,41,28,.06);
  border-color: rgba(218,41,28,.25);
}
.dl-shell__user-arrow {
  width: 14px; height: 14px;
  color: var(--ad-subtle);
  margin-left: auto;
  flex-shrink: 0;
  transition: color .15s, transform .15s;
}
.dl-shell__user:hover .dl-shell__user-arrow,
.dl-shell__user.is-active .dl-shell__user-arrow {
  color: var(--ad-red);
  transform: translateX(2px);
}
.dl-shell__user-avatar {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--ad-anthrazit);
  color: #fff;
  font-weight: 700; font-size: .82rem;
  flex-shrink: 0;
}
.dl-shell__user-avatar--admin { background: var(--ad-red); }
.dl-shell__user-avatar--agent { background: var(--ad-anthrazit); }
.dl-shell__user-meta { min-width: 0; flex: 1; }
.dl-shell__user-name {
  font-size: .82rem; font-weight: 600;
  color: var(--ad-fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dl-shell__user-role {
  font-size: .6rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ad-muted);
}

.dl-shell__logout-form { margin: 0; }

/* Language switcher — mirrors the main project's `.ad-utilbar__lang`:
   a single text link that displays the *opposite* language and toggles it. */
.dl-shell__topbar-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.dl-shell__lang {
  display: inline-flex;
  align-items: center;
  padding: .25rem .65rem;
  font: 700 .7rem var(--ad-sans);
  letter-spacing: .14em;
  color: var(--ad-fg-2);
  text-decoration: none;
  border-radius: 4px;
  transition: color .15s var(--ad-ease);
}
.dl-shell__lang:hover { color: var(--ad-red); }
.dl-shell__nav-item--logout {
  width: 100%;
}
.dl-shell__nav-item--logout:hover {
  color: var(--ad-red);
  background: rgba(218,41,28,.08);
}
.dl-shell__nav-item--logout:hover .dl-shell__nav-icon { color: var(--ad-red); }

/* Backdrop (mobile only) */
.dl-shell__backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(31,38,44,.45);
  z-index: 55;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.dl-shell__backdrop.is-show { opacity: 1; pointer-events: auto; }

/* Main column */
.dl-shell__main {
  display: flex; flex-direction: column;
  min-width: 0; min-height: 100vh;
}
.dl-shell__topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  height: var(--dl-topbar-h);
  padding: 0 clamp(1rem, 3vw, 2rem);
  background: rgba(245,243,238,.88);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--ad-border);
}
.dl-shell__page-title {
  margin: 0;
  font-size: 1.05rem; font-weight: 700;
  letter-spacing: -.012em;
  color: var(--ad-fg);
}
.dl-shell__topbar-actions {
  display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
}

.dl-shell__content {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 3vw, 2rem) 4rem;
}

/* `wide` opt removes the centered max-width so data-heavy pages fill the
   whole main column — mirrors the editor's `.ad-shell--wide`. */
.dl-shell--wide .dl-shell__content {
  max-width: none;
}

/* Responsive — collapse sidebar below 1024px */
@media (max-width: 1024px) {
  .dl-shell { grid-template-columns: 1fr; }
  .dl-shell__toggle { display: inline-flex; }
  .dl-shell__sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: 280px;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform .22s cubic-bezier(.22,.61,.36,1);
    box-shadow: var(--ad-shadow-lg);
    padding-top: 1.25rem;
  }
  .dl-shell__sidebar.is-open { transform: translateX(0); }
  .dl-shell__backdrop { display: block; }
  .dl-shell__topbar { padding-left: 70px; }
}
@media (max-width: 540px) {
  .dl-shell__page-title { font-size: .95rem; }
  .dl-shell__content { padding: 1.25rem 1rem 3rem; }
}

/* =============================================================
   PAGE HEADER — date rule + pill eyebrow + serif-accented title
   (mirrors the editor's `.ad-pg` block)
   ============================================================= */

.dl-pg-rule {
  display: flex; align-items: baseline; gap: 1.5rem;
  flex-wrap: wrap;
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ad-fg-2);
  font-variant-numeric: tabular-nums;
  padding-bottom: .9rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--ad-border);
}
.dl-pg-rule .red {
  color: var(--ad-red);
  font-weight: 600;
}

.dl-pg { margin-bottom: 2rem; max-width: 760px; }
.dl-pg__eyebrow {
  display: inline-flex; align-items: center;
  font-size: .65rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ad-red);
  padding: .4rem .9rem;
  background: rgba(218,41,28,.08);
  border: 1px solid rgba(218,41,28,.22);
  border-radius: 999px;
  margin-bottom: 1.5rem;
}
.dl-pg__title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: var(--ad-track-tight);
  line-height: 1.02;
  margin: 0 0 1rem;
  color: var(--ad-fg);
}
.dl-pg__title em {
  font-family: var(--ad-serif-italic);
  font-style: italic;
  font-weight: 400;
  color: var(--ad-red);
}
.dl-pg__lede {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ad-muted);
  max-width: 65ch;
}

/* Page summary — single card, red left stripe, inline stat columns */
.dl-pg-summary {
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-left: 4px solid var(--ad-red);
  border-radius: 8px;
  padding: 1.4rem 1.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem 2rem;
  margin-bottom: 2.25rem;
  box-shadow: var(--ad-shadow-sm);
}
.dl-pg-summary__cell {
  display: flex; flex-direction: column; gap: .25rem;
}
.dl-pg-summary__label {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ad-muted);
}
.dl-pg-summary__value {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ad-fg);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* =============================================================
   NUMBERED-SECTION FORM PATTERN — mirrors `.ad-settings/.ad-fieldset`
   Usage:
     <form class="dl-settings">
       <fieldset class="dl-fieldset">
         <legend><span class="dl-pg__num">01 ·</span> Server</legend>
         <div class="dl-grid2">
           <label class="dl-field">…</label>
           <label class="dl-field">…</label>
         </div>
       </fieldset>
       <div class="dl-form__actions">[buttons]</div>
     </form>
   ============================================================= */

.dl-settings { max-width: 760px; }

.dl-fieldset {
  background: #fff;
  border: 1px solid var(--ad-border);
  border-radius: 8px;
  box-shadow: var(--ad-shadow-sm);
  padding: 1.25rem 1.4rem 1.5rem;
  margin: 0 0 1rem;
  min-width: 0;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.dl-fieldset:hover {
  transform: translateY(-2px);
  border-color: var(--ad-red);
  box-shadow: 0 8px 24px rgba(218,41,28,.10);
}
.dl-fieldset legend {
  /* `<legend>` is special — float gets it into normal flow and lets it span. */
  float: left;
  width: 100%;
  padding: 0 0 .9rem;
  margin: 0 0 1.1rem;
  border-bottom: 1px dashed var(--ad-border);
  font-weight: 700; font-size: .82rem;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ad-fg-2);
}
.dl-fieldset legend + * { clear: both; }

/* Numbered prefix inside a legend: "01 · Server" */
.dl-pg__num {
  display: inline-block;
  font-size: .58rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ad-red);
  margin-right: .55rem;
  font-feature-settings: "tnum";
}

/* Strict two-column grid (vs. the auto-fit .dl-grid) */
.dl-grid2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem;
}
@media (max-width: 540px) { .dl-grid2 { grid-template-columns: 1fr; } }

.dl-form__actions {
  display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem;
}

/* When .dl-field is used directly inside .dl-fieldset (no wrapper), the
   editor's pattern wants a top margin between rows. */
.dl-fieldset .dl-field { margin-bottom: 1rem; }
.dl-fieldset .dl-field:last-child { margin-bottom: 0; }

/* "Description + add button" header row (above the card grid) */
.dl-users__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin: 0 0 1.25rem;
}
.dl-users__head p {
  margin: 0;
  color: var(--ad-muted);
  font-size: .88rem;
}
.dl-users__add-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .65rem 1.1rem;
  background: var(--ad-anthrazit);
  color: #fff;
  border: 0;
  border-radius: 6px;
  font: 600 .85rem var(--ad-sans);
  cursor: pointer;
  transition: background .2s var(--ad-ease);
  white-space: nowrap;
}
.dl-users__add-btn:hover { background: var(--ad-red); }
.dl-users__add-btn svg { width: 14px; height: 14px; }

/* =============================================================
   USER CARDS — mirrors the editor's .ad-user-card pattern
   ============================================================= */

.dl-users-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .85rem;
}

.dl-user-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--ad-border);
  border-radius: 8px;
  box-shadow: var(--ad-shadow-sm);
  padding: 1.1rem 1.1rem 1rem;
  position: relative;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.dl-user-card:hover {
  transform: translateY(-2px);
  border-color: var(--ad-red);
  box-shadow: 0 10px 28px rgba(218,41,28,.12);
}
.dl-user-card.is-self::before {
  /* "This is you" corner mark */
  content: "";
  position: absolute; top: -1px; right: -1px;
  width: 22px; height: 22px;
  border-top: 3px solid var(--ad-red);
  border-right: 3px solid var(--ad-red);
  pointer-events: none;
}

.dl-user-card__avatar-wrap {
  background: var(--ad-paper-2);
  border-radius: 6px;
  margin-bottom: .9rem;
  aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
}
.dl-user-card__avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--ad-anthrazit);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font: 700 1.6rem var(--ad-sans);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  overflow: hidden;
}
.dl-user-card__avatar--admin    { background: var(--ad-red); }
.dl-user-card__avatar--agent    { background: var(--ad-anthrazit); }
.dl-user-card__avatar--customer { background: #0f766e; }
.dl-user-card.is-self .dl-user-card__avatar { box-shadow: 0 4px 12px rgba(218,41,28,.18); }

/* When the entire card is an <a> link */
a.dl-user-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a.dl-user-card:hover .dl-btn--ghost {
  border-color: var(--ad-red);
  color: var(--ad-red);
  background: rgba(218,41,28,.04);
}

/* Role eyebrow — bullet dot + uppercase tracker */
.dl-user-card__role {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .62rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: .25rem;
}
.dl-user-card__role::before {
  content: ""; display: block;
  width: 7px; height: 7px; border-radius: 50%;
  flex-shrink: 0;
}
.dl-user-card__role.is-admin            { color: var(--ad-red); }
.dl-user-card__role.is-admin::before    { background: var(--ad-red); }
.dl-user-card__role.is-agent            { color: #1f8c5a; }
.dl-user-card__role.is-agent::before    { background: #2eb872; }
.dl-user-card__role.is-customer         { color: #0d9488; }
.dl-user-card__role.is-customer::before { background: #14b8a6; }

/* Name */
.dl-user-card__name {
  display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap;
  font: 700 1rem/1.25 var(--ad-sans);
  color: var(--ad-fg);
  letter-spacing: -.005em;
  margin-bottom: .25rem;
}
.dl-user-card__name-text {
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  min-width: 0; flex: 1;
}
.dl-user-card__name-self {
  font-family: var(--ad-serif-italic);
  font-size: .8rem;
  font-style: italic;
  font-weight: 400;
  color: var(--ad-red);
  flex-shrink: 0;
}

/* @username sub-line */
.dl-user-card__sub {
  font-size: .78rem;
  color: var(--ad-fg-2);
  line-height: 1.45;
  margin-bottom: .65rem;
  overflow: hidden; word-break: break-word;
}
.dl-user-card__sub code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .74rem;
  color: var(--ad-fg);
  background: transparent;
  padding: 0;
  border: 0;
}

/* Status blurb — fills space so actions stay pinned to the bottom */
.dl-user-card__perms {
  flex: 1;
  font-size: .78rem;
  color: var(--ad-fg-2);
  line-height: 1.5;
  margin-bottom: 1rem;
  padding-top: .65rem;
  border-top: 1px dashed var(--ad-border);
  overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  word-break: break-word;
}
.dl-user-card__perms em {
  font-style: italic;
  color: var(--ad-muted);
  font-family: var(--ad-serif-italic);
}

/* Action row */
.dl-user-card__actions {
  display: flex; gap: .35rem; align-items: center;
  margin-top: auto;
}
.dl-user-card__actions .dl-btn {
  flex: 1;
  height: 36px;
  justify-content: center;
  font-size: .82rem;
}
.dl-user-card__rm-btn {
  width: 36px; height: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--ad-border);
  border-radius: 6px;
  color: var(--ad-muted);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
  flex-shrink: 0;
}
.dl-user-card__rm-btn:hover {
  color: var(--ad-red);
  border-color: var(--ad-red);
  background: rgba(218,41,28,.06);
}
.dl-user-card__rm-btn svg { width: 15px; height: 15px; display: block; }

/* =============================================================
   USER MODAL — edit overlay (mirrors editor's .ad-um pattern)
   ============================================================= */

.dl-um {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(31,38,44,.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center; justify-content: center;
  padding: 1.25rem;
}
.dl-um.is-open { display: flex; animation: dl-um-fade .2s ease; }
@keyframes dl-um-fade { from { opacity: 0; } to { opacity: 1; } }

.dl-um__panel {
  background: #fff;
  border-radius: 18px;
  width: 100%; max-width: 640px;
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,.28), 0 0 0 1px rgba(0,0,0,.02);
  animation: dl-um-rise .26s cubic-bezier(.2,.85,.25,1);
}
@keyframes dl-um-rise {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.dl-um__hero {
  position: relative;
  padding: 1.7rem 1.85rem 1.5rem;
  background:
    radial-gradient(ellipse 50% 90% at 18% 30%, rgba(218,41,28,.08), transparent 60%),
    linear-gradient(180deg, var(--ad-paper-2) 0%, #fff 100%);
  border-bottom: 1px solid var(--ad-border);
  display: flex; align-items: center; gap: 1.25rem;
}
.dl-um__avatar {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--ad-anthrazit);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font: 700 1.9rem var(--ad-sans);
  flex-shrink: 0;
  box-shadow: 0 10px 26px rgba(0,0,0,.18);
}
.dl-um__avatar--admin { background: var(--ad-red); }
.dl-um__avatar--agent { background: var(--ad-anthrazit); }

.dl-um__hero-text { flex: 1; min-width: 0; }
.dl-um__eyebrow {
  margin: 0;
  font-size: .62rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ad-red);
}
.dl-um__title {
  margin: .25rem 0 .15rem;
  font-size: 1.45rem; font-weight: 700;
  letter-spacing: -.015em;
  color: var(--ad-fg);
}
.dl-um__sub {
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .82rem;
  color: var(--ad-muted);
}

.dl-um__close {
  position: absolute; top: 1rem; right: 1rem;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.7);
  border: 1px solid var(--ad-border);
  border-radius: 50%;
  color: var(--ad-fg-2);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.dl-um__close:hover { color: var(--ad-red); border-color: var(--ad-red); background: #fff; }
.dl-um__close svg { width: 14px; height: 14px; }

.dl-um__body {
  padding: 1.5rem 1.85rem 1.75rem;
  display: flex; flex-direction: column;
  gap: 1.5rem;
}
.dl-um__form { margin: 0; }
.dl-um__section {
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed var(--ad-border);
}
.dl-um__section:last-child { padding-bottom: 0; border-bottom: 0; }
.dl-um__section h3 {
  margin: 0 0 1rem;
  font-size: .82rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ad-fg-2);
}
.dl-um__section p {
  font-size: .85rem;
  color: var(--ad-fg-2);
  margin: 0 0 1rem;
  line-height: 1.55;
}
.dl-um__section--danger h3 { color: var(--ad-red); }
.dl-um__actions {
  margin-top: 1rem;
  display: flex; gap: .5rem; flex-wrap: wrap;
}

@media (max-width: 560px) {
  .dl-um__hero { padding: 1.25rem 1.25rem 1rem; gap: .9rem; }
  .dl-um__avatar { width: 54px; height: 54px; font-size: 1.5rem; }
  .dl-um__title { font-size: 1.2rem; }
  .dl-um__body { padding: 1.25rem; gap: 1.25rem; }
}

/* =============================================================
   CONFIRM MODAL — narrow danger variant of .dl-um
   ============================================================= */
.dl-um__panel--narrow { max-width: 480px; }

.dl-um__hero--danger {
  background:
    radial-gradient(ellipse 60% 100% at 20% 30%, rgba(218,41,28,.10), transparent 65%),
    linear-gradient(180deg, rgba(218,41,28,.04) 0%, #fff 100%);
}

.dl-um__icon {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--ad-paper-2);
  color: var(--ad-fg-2);
}
.dl-um__icon svg { width: 24px; height: 24px; }

.dl-um__icon--danger {
  background: rgba(218,41,28,.10);
  color: var(--ad-red);
  box-shadow: 0 0 0 6px rgba(218,41,28,.05);
}

.dl-um__message {
  margin: 0 0 1.5rem;
  font-size: .95rem;
  line-height: 1.6;
  color: var(--ad-fg-2);
}

/* Slightly tighter spacing for the confirm variant */
.dl-um--confirm .dl-um__hero { padding: 1.5rem 1.85rem 1.25rem; }
.dl-um--confirm .dl-um__body { padding: 1.25rem 1.85rem 1.75rem; }
.dl-um--confirm .dl-um__actions {
  margin-top: 0;
  justify-content: flex-end;
}

@media (max-width: 560px) {
  .dl-um__icon { width: 44px; height: 44px; }
  .dl-um__icon svg { width: 20px; height: 20px; }
  .dl-um--confirm .dl-um__hero,
  .dl-um--confirm .dl-um__body { padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* =============================================================
   DASHBOARD — mirrors the editor's dashboard 1:1 (.dash-* → .dl-d-*)
   ============================================================= */

/* ── Editorial date rule ─────────────────────────────────────────────── */
.dl-d-rule {
  display: flex; align-items: baseline; gap: 1.5rem; flex-wrap: wrap;
  font: 500 .65rem var(--ad-sans);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ad-fg-2);
  font-variant-numeric: tabular-nums;
  padding-bottom: .9rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--ad-border);
}
.dl-d-rule .red    { color: var(--ad-red); font-weight: 600; }
.dl-d-rule .spacer { flex: 1; }
.dl-d-livechip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .25rem .6rem .25rem .55rem;
  background: rgba(218,41,28,.08);
  color: var(--ad-red);
  border-radius: 999px;
  border: 1px solid rgba(218,41,28,.18);
  font-weight: 600;
}
.dl-d-livechip .dot {
  width: 7px; height: 7px;
  background: var(--ad-red);
  border-radius: 50%;
  animation: dl-d-pulse 1.8s ease-out infinite;
}
@keyframes dl-d-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(218,41,28,.55); }
  100% { box-shadow: 0 0 0 10px rgba(218,41,28,0); }
}

/* ── Greeting hero ───────────────────────────────────────────────────── */
.dl-d-hero {
  position: relative;
  background:
    radial-gradient(ellipse 80% 70% at 15% 20%, rgba(218,41,28,.06), transparent 60%),
    radial-gradient(ellipse 60% 60% at 85% 80%, rgba(13,148,136,.06), transparent 60%),
    #fff;
  border: 1px solid var(--ad-border);
  border-radius: 18px;
  padding: 2.5rem 2.5rem 2.25rem;
  margin-bottom: 1.75rem;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(15,23,42,.02), 0 8px 30px rgba(15,23,42,.04);
}
.dl-d-hero::before {
  content: '';
  position: absolute; top: -1px; right: -1px;
  width: 80px; height: 80px;
  border-top: 3px solid var(--ad-red);
  border-right: 3px solid var(--ad-red);
  border-top-right-radius: 18px;
  opacity: .9;
}
.dl-d-hero__time {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 600 .65rem var(--ad-sans);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ad-red);
  margin-bottom: 1rem;
}
.dl-d-hero__time .pulse {
  width: 7px; height: 7px;
  background: var(--ad-red);
  border-radius: 50%;
  animation: dl-d-pulse 1.8s ease-out infinite;
}
.dl-d-hero__title {
  font-size: clamp(1.95rem, 4.2vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.05;
  color: var(--ad-fg);
  margin: 0 0 .8rem;
}
.dl-d-hero__title em {
  font-family: var(--ad-serif-italic);
  font-style: italic; font-weight: 400;
  color: var(--ad-red);
}
.dl-d-hero__lede {
  font-size: 1rem; line-height: 1.6;
  color: var(--ad-fg-2);
  max-width: 64ch;
  margin: 0 0 1.5rem;
}
.dl-d-hero__summary {
  display: flex; flex-wrap: wrap; gap: .55rem;
  margin: 0;
}
.dl-d-hero__chip {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--ad-paper-2);
  border: 1px solid var(--ad-border);
  border-radius: 999px;
  padding: .4rem .85rem;
  font: 500 .82rem var(--ad-sans);
  color: var(--ad-fg-2);
}
.dl-d-hero__chip strong { color: var(--ad-fg); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── Big stat strip ──────────────────────────────────────────────────── */
.dl-d-bigstats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}
@media (max-width: 1300px) { .dl-d-bigstats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px)  { .dl-d-bigstats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .dl-d-bigstats { grid-template-columns: 1fr; } }

.dl-d-bigstat {
  position: relative;
  display: block;
  background: #fff;
  border: 1px solid var(--ad-border);
  border-radius: 14px;
  padding: 1.2rem 1.3rem 1.25rem;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.dl-d-bigstat:hover {
  transform: translateY(-2px);
  border-color: var(--ad-red);
  box-shadow: 0 12px 28px rgba(218,41,28,.08);
}
.dl-d-bigstat__lbl {
  font: 600 .65rem var(--ad-sans);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ad-muted);
  margin: 0 0 .55rem;
}
.dl-d-bigstat__val {
  font: 700 2.1rem var(--ad-sans);
  letter-spacing: -.025em;
  line-height: 1;
  color: var(--ad-fg);
  font-variant-numeric: tabular-nums;
  margin: 0 0 .4rem;
}
.dl-d-bigstat__val small {
  font: 500 .85rem var(--ad-sans);
  color: var(--ad-muted);
  letter-spacing: 0;
  margin-left: .25rem;
}
.dl-d-bigstat__sub {
  font: 500 .76rem var(--ad-sans);
  color: var(--ad-muted);
  margin: 0;
}
.dl-d-bigstat__trend {
  display: inline-flex; align-items: center; gap: .3rem;
  font: 600 .8rem var(--ad-sans);
}
.dl-d-bigstat--live { border-color: rgba(218,41,28,.3); }
.dl-d-bigstat--live .dl-d-bigstat__lbl,
.dl-d-bigstat--live .dl-d-bigstat__val { color: var(--ad-red); }
.dl-d-bigstat--total { border-color: rgba(31,38,44,.25); }
.dl-d-bigstat__lbl-icon {
  width: 13px; height: 13px;
  vertical-align: -2px;
  margin-right: .25rem;
  opacity: .7;
}
.dl-d-bigstat--live .live-pulse {
  width: 9px; height: 9px;
  background: var(--ad-red);
  border-radius: 50%;
  animation: dl-d-pulse 1.6s ease-out infinite;
  margin-right: .4rem;
  display: inline-block;
  vertical-align: middle;
}
.dl-d-bigstat--live .dl-d-bigstat__lbl {
  display: inline-flex; align-items: center;
}
.dl-d-bigstat__decor {
  position: absolute;
  right: -10px; top: -10px;
  width: 70px; height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(218,41,28,.06), transparent 70%);
  pointer-events: none;
}

/* ── Two-column layout: trend chart + insights ───────────────────────── */
.dl-d-row {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.dl-d-row--6040 { grid-template-columns: 6fr 4fr; }
.dl-d-row--5050 { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) {
  .dl-d-row--6040, .dl-d-row--5050 { grid-template-columns: 1fr; }
}

.dl-d-card {
  background: #fff;
  border: 1px solid var(--ad-border);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  display: flex; flex-direction: column;
}
.dl-d-card__head {
  display: flex; align-items: baseline; gap: .65rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.dl-d-card__head h3 {
  margin: 0;
  font: 700 1rem var(--ad-sans);
  letter-spacing: -.01em;
  color: var(--ad-fg);
}
.dl-d-card__head h3 em {
  font-family: var(--ad-serif-italic);
  font-style: italic; font-weight: 400;
  color: var(--ad-red);
}
.dl-d-card__head small {
  color: var(--ad-muted);
  font: 500 .78rem var(--ad-sans);
}
.dl-d-card__head .more {
  margin-left: auto;
  font: 600 .72rem var(--ad-sans);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ad-muted);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: .25rem;
}
.dl-d-card__head .more:hover { color: var(--ad-red); }
.dl-d-card__head .more svg { width: 12px; height: 12px; }

/* Chart canvas wrapper */
.dl-d-spark-wrap { position: relative; height: 220px; flex: 1; }

/* Insights list (right column of row 1) */
.dl-d-insight {
  display: grid;
  grid-template-columns: 36px 1fr 90px;
  gap: .75rem;
  align-items: center;
  padding: .85rem .25rem;
  border-bottom: 1px dashed var(--ad-border);
}
.dl-d-insight:last-child { border-bottom: 0; }
.dl-d-insight__icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--ad-paper-2);
  color: var(--ad-fg-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dl-d-insight__icon svg { width: 18px; height: 18px; }
.dl-d-insight__body { min-width: 0; }
.dl-d-insight__body .lbl {
  font: 600 .62rem var(--ad-sans);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ad-muted);
  margin: 0 0 .15rem;
}
.dl-d-insight__body .val {
  font: 600 .92rem var(--ad-sans);
  color: var(--ad-fg);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dl-d-insight__body .val small {
  font-weight: 500;
  color: var(--ad-muted);
  margin-left: .35em;
}
.dl-d-insight__body .val.mono {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: 0;
}
.dl-d-insight__cnt {
  font: 700 1rem var(--ad-sans);
  color: var(--ad-fg);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
  line-height: 1.15;
}
.dl-d-insight__cnt small {
  display: block;
  font: 500 .62rem var(--ad-sans);
  color: var(--ad-muted);
  text-align: right;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: .15rem;
}

/* ── Quick actions ───────────────────────────────────────────────────── */
.dl-d-actions__title {
  display: flex; align-items: baseline; gap: 1rem;
  margin: 0 0 1rem;
}
.dl-d-actions__title h2 {
  font: 700 1.15rem var(--ad-sans);
  letter-spacing: -.01em;
  color: var(--ad-fg);
  margin: 0;
}
.dl-d-actions__title h2 em {
  font-family: var(--ad-serif-italic);
  font-style: italic; font-weight: 400;
  color: var(--ad-red);
}
.dl-d-actions__title small {
  font: 600 .68rem var(--ad-sans);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ad-muted);
}

.dl-d-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem;
  margin-bottom: 1.75rem;
}
.dl-d-action {
  position: relative;
  display: flex; flex-direction: column; gap: .55rem;
  background: #fff;
  border: 1px solid var(--ad-border);
  border-radius: 12px;
  padding: 1rem 1.1rem 1.05rem;
  color: inherit; text-decoration: none;
  overflow: hidden;
  transition: transform .15s, border-color .15s, box-shadow .15s, background .15s;
}
.dl-d-action::after {
  content: '';
  position: absolute; right: -25px; bottom: -25px;
  width: 70px; height: 70px; border-radius: 50%;
  background: var(--ad-red);
  opacity: 0;
  transition: opacity .2s, transform .25s;
}
.dl-d-action:hover {
  transform: translateY(-2px);
  border-color: var(--ad-red);
  box-shadow: 0 10px 22px rgba(218,41,28,.08);
}
.dl-d-action:hover::after { opacity: .07; transform: scale(1.2); }
.dl-d-action__icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--ad-paper-2);
  color: var(--ad-fg);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.dl-d-action:hover .dl-d-action__icon { background: var(--ad-red); color: #fff; }
.dl-d-action__icon svg { width: 18px; height: 18px; }
.dl-d-action__lbl {
  font: 700 .95rem var(--ad-sans);
  letter-spacing: -.005em;
  color: var(--ad-fg);
}
.dl-d-action__cta {
  display: inline-flex; align-items: center; gap: .3rem;
  margin-top: auto;
  font: 600 .72rem var(--ad-sans);
  letter-spacing: .04em;
  color: var(--ad-muted);
  transition: color .15s, gap .15s;
}
.dl-d-action__cta svg { width: 11px; height: 11px; transition: transform .15s; }
.dl-d-action:hover .dl-d-action__cta { color: var(--ad-red); gap: .55rem; }
.dl-d-action:hover .dl-d-action__cta svg { transform: translateX(2px); }

/* ── Live ticker + top files ─────────────────────────────────────────── */
.dl-d-ticker { font-variant-numeric: tabular-nums; }
.dl-d-ticker__row {
  display: grid;
  grid-template-columns: 1.5em 1fr auto;
  gap: .65rem;
  align-items: center;
  padding: .65rem .25rem;
  border-bottom: 1px dashed var(--ad-border);
  font: 500 .85rem var(--ad-sans);
}
.dl-d-ticker__row:last-child { border-bottom: 0; }
.dl-d-ticker__sign {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-weight: 700; font-size: .9rem;
  text-align: center;
}
.dl-d-ticker__sign.is-get    { background: rgba(46,184,114,.14); color: #1f8c5a; }
.dl-d-ticker__sign.is-delete { background: rgba(218,41,28,.10);  color: var(--ad-red); }
.dl-d-ticker__path {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 700;
  font-size: .82rem;
  color: var(--ad-fg);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dl-d-ticker__path small {
  display: block;
  font-family: var(--ad-sans);
  font-weight: 500;
  font-size: .72rem;
  color: var(--ad-muted);
  margin-top: .15rem;
}
.dl-d-ticker__time {
  font: 600 .75rem var(--ad-sans);
  color: var(--ad-muted);
  white-space: nowrap;
}

.dl-d-recent__row {
  display: flex; align-items: center; gap: .65rem;
  padding: .65rem .25rem;
  border-bottom: 1px dashed var(--ad-border);
  text-decoration: none;
  color: inherit;
  transition: background .12s;
}
.dl-d-recent__row:last-child { border-bottom: 0; }
.dl-d-recent__row:hover { background: rgba(0,0,0,.02); }
.dl-d-recent__body { flex: 1; min-width: 0; }
.dl-d-recent__title {
  display: block;
  font: 600 .9rem var(--ad-sans);
  color: var(--ad-fg);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dl-d-recent__file {
  display: block;
  font: 500 .72rem var(--ad-sans);
  color: var(--ad-muted);
  margin-top: .15rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dl-d-recent__time {
  font: 700 .82rem var(--ad-sans);
  color: var(--ad-fg);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dl-d-recent__row.is-fresh .dl-d-recent__time { color: var(--ad-red); }
.dl-d-recent__row.is-fresh::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ad-red);
  flex-shrink: 0;
}

/* ── Empty state ─────────────────────────────────────────────────────── */
.dl-d-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--ad-muted);
  font-size: .88rem;
  font-style: italic;
}
.dl-d-empty em {
  display: block;
  font-family: var(--ad-serif-italic);
  font-size: 1.3rem;
  color: var(--ad-red);
  font-style: italic;
  margin-bottom: .35rem;
}

/* ── Help card (customer welcome page) ───────────────────────────────── */
.dl-help-card__lede {
  font-size: .92rem;
  line-height: 1.6;
  color: var(--ad-fg-2);
  margin: 0 0 1.25rem;
}
.dl-help-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex; flex-direction: column;
}
.dl-help-card__list li {
  display: flex; align-items: center; gap: .85rem;
  padding: .85rem 0;
  border-bottom: 1px dashed var(--ad-border);
}
.dl-help-card__list li:last-child { border-bottom: 0; }
.dl-help-card__list li svg {
  width: 22px; height: 22px;
  color: var(--ad-red);
  flex-shrink: 0;
}
.dl-help-card__list li > div {
  display: flex; flex-direction: column;
  gap: .15rem;
  min-width: 0;
}
.dl-help-card__label {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ad-muted);
}
.dl-help-card__list a {
  font-size: .95rem;
  font-weight: 600;
  color: var(--ad-fg);
  text-decoration: none;
}
.dl-help-card__list a:hover { color: var(--ad-red); }

/* ── Footer note ─────────────────────────────────────────────────────── */
.dl-d-footnote {
  text-align: center;
  font: 500 .72rem var(--ad-sans);
  color: var(--ad-muted);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ad-border);
}
.dl-d-footnote em {
  font-family: var(--ad-serif-italic);
  font-style: italic;
  color: var(--ad-red);
}

/* Generic dashboard card head */
.dl-card--padded { padding: 1.5rem 1.75rem; }
.dl-card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .75rem; flex-wrap: wrap;
  margin: 0 0 1.25rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--ad-border);
}
.dl-card-head h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: var(--ad-track-snug);
  margin: 0;
}
.dl-card-head span {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ad-muted);
}
.dl-card__empty {
  margin: 0;
  padding: 1.5rem 0 .25rem;
  color: var(--ad-muted);
  font-size: .92rem;
  text-align: center;
}

/* Sparkline */
.dl-spark {
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
}
.dl-spark__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .75rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.dl-spark__head h2 {
  font-size: 1.05rem; font-weight: 700; margin: 0;
  letter-spacing: var(--ad-track-snug);
}
.dl-spark__head span {
  font-size: .8rem;
  color: var(--ad-muted);
}
.dl-spark__chart {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: .35rem;
  align-items: end;
  height: 160px;
  padding-bottom: 2.2rem;
  position: relative;
}
.dl-spark__col {
  display: flex; flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
}
.dl-spark__bar {
  width: 100%;
  max-width: 36px;
  min-height: 2px;
  background: linear-gradient(180deg, var(--ad-anthrazit) 0%, var(--ad-anthrazit-deep) 100%);
  border-radius: 3px 3px 0 0;
  transition: background .2s var(--ad-ease);
}
.dl-spark__col:hover .dl-spark__bar,
.dl-spark__col.is-today .dl-spark__bar {
  background: linear-gradient(180deg, var(--ad-red) 0%, var(--ad-red-deep) 100%);
}
.dl-spark__count {
  position: absolute;
  bottom: 100%;
  margin-bottom: .25rem;
  font-size: .62rem;
  font-weight: 700;
  color: var(--ad-fg-2);
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity .15s;
}
.dl-spark__col:hover .dl-spark__count,
.dl-spark__col.is-today .dl-spark__count { opacity: 1; }
.dl-spark__col.is-today .dl-spark__count { color: var(--ad-red); }
.dl-spark__label {
  position: absolute;
  top: 100%;
  margin-top: .55rem;
  font-size: .62rem;
  letter-spacing: .04em;
  color: var(--ad-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dl-spark__col.is-today .dl-spark__label {
  color: var(--ad-red);
  font-weight: 700;
}

/* Dashboard grid rows */
.dl-dash-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.dl-dash-row--3 {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1100px) {
  .dl-dash-row--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .dl-dash-row,
  .dl-dash-row--3 { grid-template-columns: 1fr; }
  .dl-spark__chart { gap: .25rem; }
  .dl-spark__label { font-size: .55rem; }
}

/* Top files / top actors list */
.dl-toplist {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: .15rem;
}
.dl-toplist__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .85rem;
  padding: .7rem .5rem;
  border-radius: 6px;
  transition: background .15s var(--ad-ease);
}
.dl-toplist__row:hover { background: var(--ad-paper); }
.dl-toplist__avatar {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ad-anthrazit);
  color: #fff;
  font-weight: 700; font-size: .9rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.dl-toplist__body { min-width: 0; }
.dl-toplist__name {
  display: block;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ad-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dl-toplist__sub {
  display: block;
  font-size: .75rem;
  color: var(--ad-muted);
  margin-top: .15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dl-toplist__count {
  font-size: .82rem;
  font-weight: 700;
  color: var(--ad-fg);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  background: var(--ad-paper-2);
  border: 1px solid var(--ad-border);
  border-radius: 999px;
  padding: .25rem .65rem;
}
.dl-toplist--compact .dl-toplist__count {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--ad-muted);
  font-weight: 600;
  font-size: .78rem;
}
.dl-toplist .dl-fi { transform: scale(.85); transform-origin: left center; }

/* Activity feed */
.dl-feed {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
}
.dl-feed__row {
  display: grid;
  grid-template-columns: 70px auto 1fr;
  gap: .8rem;
  align-items: flex-start;
  padding: .7rem 0;
  border-bottom: 1px solid var(--ad-border);
}
.dl-feed__row:last-child { border-bottom: 0; }
.dl-feed__time {
  display: flex; flex-direction: column;
  align-items: flex-start;
}
.dl-feed__time strong {
  font-size: .85rem;
  font-weight: 700;
  color: var(--ad-fg);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.dl-feed__time em {
  display: block;
  font-style: normal;
  font-size: .68rem;
  color: var(--ad-muted);
  margin-top: .2rem;
}
.dl-feed__action {
  display: inline-flex; align-items: center;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .2rem .55rem;
  border-radius: 4px;
  margin-top: .15rem;
  white-space: nowrap;
}
.dl-feed__action.is-get {
  background: rgba(46,184,114,.12);
  color: #1f8c5a;
}
.dl-feed__action.is-delete {
  background: rgba(218,41,28,.10);
  color: var(--ad-red);
}
.dl-feed__body {
  min-width: 0;
  display: flex; flex-direction: column;
  gap: .15rem;
}
.dl-feed__file {
  font-size: .88rem;
  font-weight: 600;
  color: var(--ad-fg);
  word-break: break-word;
  line-height: 1.3;
}
.dl-feed__meta {
  font-size: .75rem;
  color: var(--ad-muted);
  line-height: 1.4;
}
.dl-feed__meta em {
  font-style: italic;
  font-family: var(--ad-serif-italic);
  color: var(--ad-red);
}

/* Distribution bar list (Browser / OS / Device) */
.dl-dist {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: .8rem;
}
.dl-dist__row {
  display: grid;
  grid-template-columns: 1fr 60px;
  gap: .35rem 1rem;
  grid-template-areas:
    "name   count"
    "track  count";
  align-items: center;
}
.dl-dist__name {
  grid-area: name;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ad-fg);
  line-height: 1.2;
}
.dl-dist__track {
  grid-area: track;
  height: 6px;
  background: var(--ad-paper-2);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.dl-dist__fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--ad-anthrazit) 0%, var(--ad-red) 100%);
  border-radius: 999px;
  transition: width .3s var(--ad-ease);
  min-width: 4px;
}
.dl-dist__count {
  grid-area: count;
  display: flex; flex-direction: column;
  align-items: flex-end;
  font-variant-numeric: tabular-nums;
}
.dl-dist__count strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ad-fg);
  line-height: 1;
}
.dl-dist__count span {
  font-size: .65rem;
  color: var(--ad-muted);
  margin-top: .2rem;
  letter-spacing: .04em;
}

@media (max-width: 560px) {
  .dl-feed__row { grid-template-columns: 56px auto 1fr; gap: .55rem; }
  .dl-card--padded { padding: 1.25rem; }
  .dl-spark { padding: 1.25rem; }
  .dl-spark__chart { height: 120px; padding-bottom: 1.9rem; }
}

.dl-head__sub {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 400;
  font-size: .55em;
  color: var(--ad-muted);
  letter-spacing: 0;
  vertical-align: middle;
}

.dl-breadcrumb {
  margin-bottom: 1.5rem;
  font-size: var(--ad-text-sm);
}
.dl-breadcrumb a {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--ad-muted);
  font-weight: 500;
  letter-spacing: var(--ad-track-mini);
  text-transform: uppercase;
  font-size: var(--ad-text-xs);
}
.dl-breadcrumb a:hover { color: var(--ad-red); }
.dl-breadcrumb svg { width: 14px; height: 14px; }

/* Sections */
.dl-admin-section {
  margin-top: 3rem;
}
.dl-admin-section:first-of-type { margin-top: 1rem; }
.dl-admin-section__head {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--ad-border);
}
.dl-admin-section__head h2 {
  font-size: 1.35rem;
  letter-spacing: var(--ad-track-snug);
  margin: 0;
  flex: 1;
}
.dl-admin-section__count {
  display: inline-block;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ad-muted);
  background: var(--ad-paper-2);
  border: 1px solid var(--ad-border);
  border-radius: var(--ad-radius-pill);
  padding: .2rem .6rem;
  margin-left: .35rem;
  vertical-align: middle;
}

/* Buttons — mirror the editor's `.ad-btn` (8px radius, 1px border, simpler hover) */
.dl-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem 1.1rem;
  font: 600 .85rem/1 var(--ad-sans);
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
}
.dl-btn[disabled] { opacity: .45; cursor: not-allowed; }
.dl-btn svg { width: 14px; height: 14px; }

.dl-btn--red {
  background: var(--ad-red); color: #fff; border-color: var(--ad-red);
}
.dl-btn--red:hover:not([disabled]) {
  background: var(--ad-red-deep);
  border-color: var(--ad-red-deep);
  color: #fff;
}

.dl-btn--dark {
  background: var(--ad-anthrazit); color: #fff; border-color: var(--ad-anthrazit);
}
.dl-btn--dark:hover:not([disabled]) {
  background: var(--ad-anthrazit-deep);
  border-color: var(--ad-anthrazit-deep);
  color: #fff;
}

.dl-btn--ghost {
  background: transparent;
  color: var(--ad-fg);
  border-color: var(--ad-border-strong);
}
.dl-btn--ghost:hover:not([disabled]) {
  border-color: var(--ad-fg);
  color: var(--ad-fg);
}

.dl-btn--danger {
  color: var(--ad-red);
  border-color: rgba(218,41,28,.3);
  background: #fff;
}
.dl-btn--danger:hover:not([disabled]) {
  color: #fff;
  background: var(--ad-red);
  border-color: var(--ad-red);
}

.dl-btn--danger-solid {
  background: var(--ad-red); color: #fff; border-color: var(--ad-red);
}
.dl-btn--danger-solid:hover:not([disabled]) {
  background: var(--ad-red-deep);
  border-color: var(--ad-red-deep);
  color: #fff;
}

/* Cards & forms */
.dl-card {
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  box-shadow: var(--ad-shadow-sm);
  margin-bottom: 1.25rem;
}
.dl-card[hidden] { display: none; }
.dl-card--form h3 {
  font-size: 1rem;
  margin: 0 0 1.25rem;
  letter-spacing: var(--ad-track-snug);
}
.dl-card__actions {
  margin-top: 1.5rem;
  display: flex; gap: .65rem; flex-wrap: wrap;
}
.dl-card--danger {
  border-color: rgba(218,41,28,.25);
  border-left: 3px solid var(--ad-red);
  background: #fff;
}
.dl-card--danger p { color: var(--ad-fg-2); }
.dl-card--danger code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .9em;
  background: var(--ad-paper-2);
  padding: .1rem .35rem;
  border-radius: var(--ad-radius-1);
}
.dl-danger-head { color: var(--ad-red); }

.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.1rem 1.25rem;
}
.dl-field {
  display: flex; flex-direction: column; gap: .35rem;
}
.dl-field > span {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ad-fg-2);
}
.dl-field input[type="text"],
.dl-field input[type="email"],
.dl-field input[type="number"],
.dl-field input[type="password"],
.dl-field input[type="search"],
.dl-field input[type="url"] {
  display: block;
  width: 100%;
  font: inherit;
  font-size: .95rem;
  padding: .65rem .75rem;
  background: #fbf8f2;
  border: 1px solid var(--ad-border);
  border-radius: 8px;
  color: var(--ad-fg);
  outline: none;
  font-family: var(--ad-sans);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.dl-field input:focus {
  border-color: var(--ad-red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(218,41,28,.12);
}
.dl-field input[readonly],
.dl-field input[disabled] {
  background: var(--ad-paper);
  color: var(--ad-muted);
  cursor: not-allowed;
}
.dl-field small {
  font-size: .72rem;
  color: var(--ad-muted);
  line-height: 1.4;
}

/* Customer cards (admin home) */
.dl-customers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.dl-customer {
  display: flex; flex-direction: column;
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: var(--ad-radius-1);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.dl-customer:hover {
  border-color: var(--ad-red);
  transform: translateY(-2px);
  box-shadow: var(--ad-shadow-md);
}
.dl-customer__head {
  display: flex; align-items: center; gap: .85rem;
  margin-bottom: 1rem;
}
.dl-customer__avatar {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ad-anthrazit);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: var(--ad-radius-1);
  flex-shrink: 0;
}
.dl-customer:hover .dl-customer__avatar { background: var(--ad-red); }
.dl-customer__name { flex: 1; min-width: 0; }
.dl-customer__name strong {
  display: block; font-weight: 700; font-size: 1rem;
  color: var(--ad-fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dl-customer__name span {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .78rem;
  color: var(--ad-muted);
  margin-top: .15rem;
}
.dl-customer__chevron {
  width: 18px; height: 18px;
  color: var(--ad-subtle);
  flex-shrink: 0;
  transition: color .2s, transform .2s;
}
.dl-customer:hover .dl-customer__chevron { color: var(--ad-red); transform: translateX(3px); }

.dl-customer__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--ad-border);
}
.dl-customer__stats div { display: flex; flex-direction: column; gap: .15rem; }
.dl-customer__stats dt {
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ad-muted);
}
.dl-customer__stats dd {
  margin: 0;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ad-fg);
  font-variant-numeric: tabular-nums;
}

/* Dropzone */
.dl-dropzone {
  display: block;
  position: relative;
  border: 2px dashed var(--ad-border-strong);
  border-radius: var(--ad-radius-1);
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--ad-paper-2);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.dl-dropzone:hover,
.dl-dropzone.is-drag {
  border-color: var(--ad-red);
  background: rgba(218,41,28,.04);
}
.dl-dropzone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.dl-dropzone__inner {
  position: relative;
  pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: .55rem;
  color: var(--ad-fg-2);
}
.dl-dropzone__inner svg {
  width: 36px; height: 36px;
  color: var(--ad-red);
  margin-bottom: .25rem;
}
.dl-dropzone__inner small { color: var(--ad-muted); font-size: .78rem; max-width: 50ch; }
.dl-dropzone__chosen {
  display: flex; flex-wrap: wrap; gap: .35rem;
  justify-content: center;
  margin-top: .75rem;
}
.dl-chip {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--ad-border);
  border-radius: var(--ad-radius-pill);
  padding: .25rem .65rem;
  font-size: .78rem;
  color: var(--ad-fg);
  font-variant-numeric: tabular-nums;
}

/* Admin file rows */
.dl-files--admin .dl-file {
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
}
.dl-file__actions {
  display: flex; gap: .5rem; flex-wrap: wrap;
}
.dl-file__actions .dl-btn { padding: .5rem .8rem; }

.dl-empty--compact {
  padding: 1.5rem;
  text-align: left;
  background: var(--ad-paper-2);
  border-style: solid;
  border-color: var(--ad-border);
}
.dl-empty--compact p { margin: 0; color: var(--ad-fg-2); }

@media (max-width: 640px) {
  .dl-admin-section__head { flex-wrap: wrap; }
  .dl-customer__stats { grid-template-columns: repeat(3, 1fr); }
  .dl-files--admin .dl-file {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "ico  body"
      "act  act";
  }
  .dl-files--admin .dl-file > .dl-fi { grid-area: ico; }
  .dl-files--admin .dl-file__body { grid-area: body; }
  .dl-files--admin .dl-file__actions { grid-area: act; justify-content: flex-end; }
}
