:root {
      --bg: #0a101c;
      --card: #121b2c;
      --card-elevated: #162033;
      --text: #e8eef8;
      --muted: #8b9bb4;
      --accent: #4d94ff;
      --accent-soft: rgba(77, 148, 255, 0.14);
      --accent-mid: #3d7fe0;
      --violet: #a78bfa;
      --ok: #3dd68c;
      --ok-bg: rgba(61, 214, 140, 0.12);
      --err: #f07178;
      --err-bg: rgba(240, 113, 120, 0.12);
      --warn: #e6c07b;
      --warn-bg: rgba(230, 192, 123, 0.12);
      --border: #243044;
      --border-soft: rgba(36, 48, 68, 0.7);
      --header: rgba(12, 18, 32, 0.88);
      --input-bg: #0c1422;
      --radius: 12px;
      --radius-lg: 16px;
      --shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
      background:
        radial-gradient(1000px 520px at 8% -12%, rgba(77, 148, 255, 0.16) 0%, transparent 55%),
        radial-gradient(800px 400px at 92% 0%, rgba(167, 139, 250, 0.1) 0%, transparent 50%),
        var(--bg);
      color: var(--text);
      line-height: 1.5;
      -webkit-font-smoothing: antialiased;
    }
    a { color: var(--accent); text-decoration: none; }
    a:hover { text-decoration: underline; color: #7ab0ff; }
    code {
      font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
      font-size: 0.86em;
      background: rgba(255, 255, 255, 0.04);
      padding: 0.1em 0.35em;
      border-radius: 5px;
      border: 1px solid var(--border-soft);
    }

    /* —— Header —— */
    header {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.85rem 1.15rem;
      padding: 0.85rem 1.4rem;
      border-bottom: 1px solid var(--border);
      background: var(--header);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      position: sticky;
      top: 0;
      z-index: 10;
    }
    header .brand {
      display: flex;
      flex-direction: column;
      gap: 0.1rem;
      font-weight: 800;
      letter-spacing: 0.02em;
      line-height: 1.15;
      background: linear-gradient(105deg, #7eb6ff 0%, #a78bfa 55%, #c4b5fd 100%);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      user-select: none;
    }
    header .brand small {
      display: block;
      font-size: 0.62rem;
      letter-spacing: 0.16em;
      color: var(--muted);
      font-weight: 650;
      -webkit-text-fill-color: var(--muted);
    }
    nav { display: flex; flex-wrap: wrap; gap: 0.3rem; }
    nav a {
      color: var(--muted);
      padding: 0.38rem 0.78rem;
      border-radius: 999px;
      font-size: 0.875rem;
      font-weight: 600;
      transition: background 0.15s, color 0.15s;
    }
    nav a:hover {
      background: var(--accent-soft);
      color: var(--text);
      text-decoration: none;
    }
    .user-meta {
      margin-left: auto;
      display: flex;
      align-items: center;
      gap: 0.55rem;
      font-size: 0.85rem;
      color: var(--muted);
    }
    .user-meta .user-chip {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      padding: 0.28rem 0.65rem;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--border);
      color: var(--text);
      font-weight: 600;
      font-size: 0.82rem;
    }
    .user-meta a { font-weight: 600; }
    .disk-stat {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 0.05rem;
      padding: 0.28rem 0.7rem;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--border);
      font-size: 0.75rem;
      line-height: 1.25;
      color: var(--muted);
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    .disk-stat strong { color: var(--text); font-weight: 700; }
    .date-filters {
      display: flex;
      flex-wrap: wrap;
      gap: 0.55rem 0.85rem;
      align-items: flex-end;
      margin-bottom: 0.9rem;
    }
    .date-filters label { margin: 0; font-size: 0.75rem; }
    .date-filters input[type=date] {
      width: auto;
      margin: 0.2rem 0 0;
      padding: 0.4rem 0.55rem;
      color-scheme: dark;
    }
    .date-filters .btn { margin-bottom: 0.05rem; }

    /* —— Layout —— */
    main {
      max-width: 1080px;
      width: 100%;
      margin: 0 auto;
      padding: 1.5rem 1.25rem 2.5rem;
      flex: 1;
    }
    footer.admin-footer {
      border-top: 1px solid var(--border);
      background: #0c1422;
      color: var(--muted);
      font-size: 0.78rem;
      padding: 0.8rem 1.25rem;
      text-align: center;
      letter-spacing: 0.01em;
    }
    footer.admin-footer strong { color: var(--text); font-weight: 650; }
    footer.admin-footer .admin-version { margin-top: 0.35rem; }
    footer.admin-footer .admin-version:first-child { margin-top: 0; }

    /* —— Page header —— */
    .page-head {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      justify-content: space-between;
      gap: 0.65rem 1rem;
      margin-bottom: 1.25rem;
    }
    .page-head h1 { margin: 0; }
    .page-head .lede {
      margin: 0.3rem 0 0;
      color: var(--muted);
      font-size: 0.9rem;
      max-width: 52ch;
    }
    h1 {
      font-size: 1.5rem;
      margin: 0 0 0.35rem;
      font-weight: 750;
      letter-spacing: -0.02em;
    }
    h2 {
      font-size: 0.78rem;
      margin: 0 0 0.85rem;
      color: var(--muted);
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
    }

    /* —— Surfaces —— */
    .flash {
      padding: 0.75rem 1rem;
      border-radius: 10px;
      margin-bottom: 1rem;
      font-size: 0.92rem;
      border: 1px solid transparent;
    }
    .flash.ok {
      background: var(--ok-bg);
      color: var(--ok);
      border-color: rgba(61, 214, 140, 0.25);
    }
    .flash.err {
      background: var(--err-bg);
      color: var(--err);
      border-color: rgba(240, 113, 120, 0.28);
    }
    .card {
      background: linear-gradient(180deg, var(--card-elevated) 0%, var(--card) 100%);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 1.15rem 1.25rem;
      margin-bottom: 1rem;
      box-shadow: var(--shadow);
    }
    .card + .card { margin-top: 0; }
    .card-head {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.65rem;
      margin-bottom: 0.85rem;
    }
    .card-head h2 { margin: 0; }

    /* —— Forms —— */
    label {
      display: block;
      font-size: 0.82rem;
      color: var(--muted);
      margin-bottom: 0.3rem;
      font-weight: 600;
    }
    input[type=text], input[type=number], input[type=password], input[type=date], textarea, select {
      width: 100%;
      padding: 0.62rem 0.8rem;
      border-radius: 9px;
      border: 1px solid var(--border);
      background: var(--input-bg);
      color: var(--text);
      margin-bottom: 0.85rem;
      font-size: 0.92rem;
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    input:focus, textarea:focus, select:focus {
      outline: none;
      border-color: rgba(77, 148, 255, 0.55);
      box-shadow: 0 0 0 3px var(--accent-soft);
    }
    input::placeholder, textarea::placeholder { color: #5a6a84; }
    textarea {
      min-height: 110px;
      font-family: ui-monospace, monospace;
      font-size: 0.88rem;
      resize: vertical;
    }
    .row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
    .checkbox {
      display: flex;
      align-items: center;
      gap: 0.55rem;
      margin-bottom: 0.9rem;
      padding: 0.55rem 0.7rem;
      border-radius: 9px;
      background: rgba(255, 255, 255, 0.02);
      border: 1px solid var(--border-soft);
    }
    .checkbox input { width: auto; margin: 0; accent-color: var(--accent); }
    .checkbox label { margin: 0; color: var(--text); font-weight: 500; cursor: pointer; }

    button, .btn {
      appearance: none;
      border: none;
      border-radius: 9px;
      padding: 0.52rem 1rem;
      background: linear-gradient(180deg, #5a9fff 0%, var(--accent-mid) 100%);
      color: #fff;
      font-weight: 650;
      cursor: pointer;
      font-size: 0.88rem;
      box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 2px 8px rgba(45, 110, 210, 0.28);
      transition: filter 0.12s, transform 0.08s;
    }
    button:hover, .btn:hover { filter: brightness(1.07); }
    button:active, .btn:active { transform: translateY(1px); }
    button.secondary, .btn.secondary {
      background: transparent;
      border: 1px solid var(--border);
      color: var(--text);
      box-shadow: none;
    }
    button.secondary:hover, .btn.secondary:hover {
      background: rgba(255, 255, 255, 0.04);
      filter: none;
    }
    button.danger {
      background: linear-gradient(180deg, #d45a5a 0%, #b04040 100%);
      box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 2px 8px rgba(160, 50, 50, 0.25);
    }
    button.full { width: 100%; padding: 0.7rem 1rem; font-size: 0.95rem; }
    form.inline { display: inline; }

    /* —— Tables —— */
    .table-wrap {
      max-height: 70vh;
      overflow: auto;
      overscroll-behavior: contain;
      margin: 0 -0.15rem;
    }
    .table-wrap table { border-collapse: separate; border-spacing: 0; }
    .table-wrap thead th {
      position: sticky;
      top: 0;
      z-index: 1;
      background: #162033;
      box-shadow: 0 1px 0 var(--border);
    }
    table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
    th, td {
      text-align: left;
      padding: 0.72rem 0.55rem;
      border-bottom: 1px solid var(--border-soft);
      vertical-align: middle;
    }
    tbody tr:last-child td { border-bottom: none; }
    tbody tr { transition: background 0.12s; }
    tbody tr:hover td { background: rgba(255, 255, 255, 0.018); }
    th {
      color: var(--muted);
      font-weight: 700;
      font-size: 0.72rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      padding-top: 0.35rem;
      padding-bottom: 0.55rem;
      border-bottom-color: var(--border);
    }
    .muted { color: var(--muted); font-size: 0.85rem; }
    .title-cell strong { font-weight: 650; letter-spacing: -0.01em; }
    .title-cell .sub { display: block; margin-top: 0.15rem; color: var(--muted); font-size: 0.8rem; }

    /* —— Badges —— */
    .badge {
      display: inline-flex;
      align-items: center;
      gap: 0.25rem;
      padding: 0.18rem 0.55rem;
      border-radius: 999px;
      background: #1e2a3e;
      font-size: 0.74rem;
      color: var(--muted);
      font-weight: 650;
      letter-spacing: 0.02em;
      white-space: nowrap;
      border: 1px solid transparent;
    }
    .badge-accent {
      background: var(--accent-soft);
      color: #9ec5ff;
      border-color: rgba(77, 148, 255, 0.22);
    }
    .badge-ok {
      background: var(--ok-bg);
      color: var(--ok);
      border-color: rgba(61, 214, 140, 0.22);
    }
    .badge-err {
      background: var(--err-bg);
      color: var(--err);
      border-color: rgba(240, 113, 120, 0.25);
    }
    .badge-warn {
      background: var(--warn-bg);
      color: var(--warn);
      border-color: rgba(230, 192, 123, 0.25);
    }
    .badge-quality {
      background: linear-gradient(135deg, rgba(77, 148, 255, 0.18), rgba(167, 139, 250, 0.14));
      color: #c5d9ff;
      border-color: rgba(167, 139, 250, 0.25);
      font-variant-numeric: tabular-nums;
    }
    .badge-size {
      background: #1a2438;
      color: #b8c6dc;
      border-color: var(--border);
      font-variant-numeric: tabular-nums;
    }
    .size-cell {
      font-variant-numeric: tabular-nums;
      font-weight: 600;
      color: #c5d0e0;
      white-space: nowrap;
    }

    /* —— Stats —— */
    .grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
      gap: 0.7rem;
    }
    .stat {
      background: linear-gradient(160deg, #152033 0%, #0f1726 100%);
      border-radius: 12px;
      padding: 0.9rem 0.95rem;
      border: 1px solid var(--border);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }
    .stat .n {
      font-size: 1.4rem;
      font-weight: 750;
      letter-spacing: -0.02em;
      font-variant-numeric: tabular-nums;
      line-height: 1.2;
    }
    .stat .l {
      font-size: 0.7rem;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-top: 0.25rem;
      font-weight: 650;
    }

    /* —— Thumbs —— */
    .thumb {
      width: 100px;
      height: 56px;
      object-fit: cover;
      border-radius: 8px;
      background: var(--input-bg);
      border: 1px solid var(--border);
      display: block;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    .thumb-ph {
      width: 100px;
      height: 56px;
      border-radius: 8px;
      background: linear-gradient(145deg, #1a2438, #121a2a);
      border: 1px dashed var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--muted);
      font-size: 0.68rem;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    /* —— Empty states —— */
    .empty {
      text-align: center;
      padding: 2.25rem 1.25rem;
      color: var(--muted);
    }
    .empty-icon {
      width: 48px;
      height: 48px;
      margin: 0 auto 0.9rem;
      border-radius: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.35rem;
      background: linear-gradient(145deg, rgba(77, 148, 255, 0.12), rgba(167, 139, 250, 0.1));
      border: 1px solid rgba(77, 148, 255, 0.18);
    }
    .empty-title {
      color: var(--text);
      font-weight: 700;
      font-size: 0.98rem;
      margin: 0 0 0.35rem;
    }
    .empty p {
      margin: 0;
      font-size: 0.88rem;
      max-width: 36ch;
      margin-inline: auto;
      line-height: 1.5;
    }

    /* —— System meta rows —— */
    .meta-list { display: flex; flex-direction: column; gap: 0.55rem; }
    .meta-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem 0.75rem;
      align-items: baseline;
      font-size: 0.9rem;
      color: var(--muted);
    }
    .meta-row strong { color: var(--text); font-weight: 650; }
    .meta-label {
      min-width: 7.5rem;
      font-size: 0.78rem;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      font-weight: 650;
      color: #6d7d96;
    }

    /* —— Login shell —— */
    body.login-page header .user-meta { display: none; }
    body.login-page main {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      flex: 1;
      padding-top: 2rem;
      padding-bottom: 2rem;
    }
    .login-shell { width: 100%; max-width: 400px; }
    .login-brand {
      text-align: center;
      margin-bottom: 1.5rem;
    }
    .login-mark {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 56px;
      height: 56px;
      border-radius: 16px;
      margin-bottom: 0.9rem;
      font-weight: 800;
      font-size: 1.05rem;
      letter-spacing: -0.02em;
      color: #fff;
      background: linear-gradient(145deg, #4d94ff 0%, #6b5ce7 55%, #a78bfa 100%);
      box-shadow: 0 8px 24px rgba(77, 148, 255, 0.28), 0 1px 0 rgba(255, 255, 255, 0.2) inset;
    }
    .login-brand h1 {
      margin: 0 0 0.35rem;
      font-size: 1.35rem;
      background: linear-gradient(105deg, #9ec5ff, #c4b5fd);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }
    .login-brand .tagline {
      margin: 0;
      color: var(--muted);
      font-size: 0.88rem;
    }
    .login-card { margin-bottom: 0; }
    .login-hint {
      margin-top: 1rem;
      text-align: center;
      font-size: 0.78rem;
      color: var(--muted);
      line-height: 1.45;
    }
    .login-hint code { font-size: 0.74rem; }

    .progress-bar {
      height: 6px;
      border-radius: 999px;
      background: #1a2438;
      overflow: hidden;
      min-width: 72px;
    }
    .progress-bar > span {
      display: block;
      height: 100%;
      max-width: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--accent), var(--violet));
    }
    .progress-label {
      font-size: 0.78rem;
      color: var(--muted);
      font-variant-numeric: tabular-nums;
      margin-top: 0.2rem;
    }

    @media (max-width: 640px) {
      header { padding: 0.75rem 1rem; }
      main { padding: 1.15rem 0.9rem 2rem; }
      .thumb, .thumb-ph { width: 80px; height: 45px; }
      .stat .n { font-size: 1.2rem; }
    }

    .flash-tight { margin-bottom: 0.9rem; }
    .text-strong { color: var(--text); }
    .mb-section { margin-bottom: 1.15rem; }
    .mb-block { margin-bottom: 1rem; }
    .mb-row { margin-bottom: 0.75rem; }
    .mb-tight { margin-bottom: 0.85rem; }
    .mt-note { margin-top: 0.5rem; }
    .mt-form { margin-top: 0.75rem; }
    .empty-pad { padding: 1.5rem 1rem; }
    .row input.playlist-name {
      width: 16rem;
      max-width: 100%;
      margin: 0;
      padding: 0.45rem 0.7rem;
    }
    .toolbar { margin-bottom: 0.75rem; gap: 0.5rem; align-items: center; }
    .toolbar-lg { margin-bottom: 0.85rem; gap: 0.5rem; align-items: center; }
    .checkbox-inline { margin: 0; }
    .col-check { width: 2.2rem; }
    .badge-inline { vertical-align: middle; }
    .back-link { margin: 0 0 0.35rem; }
    .link-plain { color: inherit; text-decoration: none; }
    .field-inline { width: auto; margin: 0; }
    .field-flush { margin-bottom: 0; }
    .field-compact { width: auto; margin: 0; padding: 0.25rem; }
    .select-compact { width: auto; margin: 0; padding: 0.35rem 0.5rem; min-width: 5.5rem; }
    .cell-clip { max-width: 280px; word-break: break-all; }
    .paste-row { align-items: flex-end; gap: 0.5rem; flex-wrap: wrap; }
    .paste-grow { flex: 1; min-width: 220px; }
    .paste-quality { min-width: 120px; }
    .inline-form { gap: 0.35rem; align-items: center; margin: 0; }
    .card-head-tight { margin-bottom: 0.5rem; }
    .chips { margin-bottom: 1rem; gap: 0.4rem; }
    .player-back { margin-bottom: 0.75rem; }

    /* YouTube-style grids for Kanały, Inbox, and Biblioteka. */
    body.yt-browse main { max-width: 1600px; }
    .yt-stage {
      background: #0f0f0f;
      border-radius: 12px;
      padding: 16px 8px 24px;
      margin-bottom: 1rem;
    }
    .yt-count {
      margin: 0 0 0.75rem;
      font-size: 16px;
      font-weight: 500;
      color: #f1f1f1;
    }
    .yt-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      column-gap: 16px;
      row-gap: 24px;
    }
    .yt-card, .yt-channel { min-width: 0; position: relative; }
    .yt-thumb {
      position: relative;
      aspect-ratio: 16 / 9;
      border-radius: 12px;
      overflow: hidden;
      background: #272727;
    }
    .yt-thumb a { display: block; height: 100%; }
    .yt-thumb img, .yt-fallback {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
      border: none;
      border-radius: 0;
      box-shadow: none;
    }
    .yt-time {
      position: absolute;
      right: 6px;
      bottom: 6px;
      z-index: 1;
      padding: 3px 4px;
      border-radius: 4px;
      background: rgba(0, 0, 0, 0.8);
      color: #fff;
      font-size: 12px;
      font-weight: 500;
      line-height: 1.2;
      font-variant-numeric: tabular-nums;
    }
    .yt-check {
      position: absolute;
      top: 8px;
      left: 8px;
      z-index: 2;
      display: grid;
      place-items: center;
      width: 28px;
      height: 28px;
      margin: 0;
      padding: 0;
      border-radius: 4px;
      background: rgba(0, 0, 0, 0.6);
      opacity: 0;
      pointer-events: none;
    }
    .yt-check input {
      width: 20px;
      height: 20px;
      margin: 0;
      accent-color: #f1f1f1;
    }
    .yt-card:hover .yt-check,
    .yt-card:focus-within .yt-check,
    .yt-grid.has-selection .yt-check { opacity: 1; pointer-events: auto; }
    .yt-body {
      position: relative;
      margin-top: 12px;
    }
    .yt-copy { min-width: 0; padding-right: 32px; }
    .yt-title {
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      margin: 0;
      color: #f1f1f1;
      font-size: 16px;
      font-weight: 500;
      line-height: 22px;
      text-decoration: none;
      overflow-wrap: anywhere;
    }
    a.yt-title:hover { color: #f1f1f1; text-decoration: none; }
    .yt-meta {
      margin: 4px 0 0;
      color: #aaa;
      font-size: 14px;
      line-height: 20px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .yt-byline {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      margin-top: 12px;
    }
    .yt-face {
      width: 36px;
      height: 36px;
      flex: 0 0 36px;
      border-radius: 50%;
      object-fit: cover;
      background: #272727;
      display: block;
    }
    .yt-byline-copy { min-width: 0; flex: 1; }
    .yt-channel-line {
      margin: 0;
      color: #aaa;
      font-size: 14px;
      font-weight: 400;
      line-height: 20px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .yt-channel-list { display: flex; flex-direction: column; }
    .yt-channel {
      display: grid;
      grid-template-columns: 40px minmax(0, 1fr) auto auto;
      column-gap: 12px;
      align-items: center;
      padding: 8px 4px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .yt-channel-avatar {
      width: 40px;
      height: 40px;
      margin: 0;
      border-radius: 50%;
      object-fit: cover;
      background: #272727;
      display: block;
    }
    .yt-channel-copy { min-width: 0; }
    .yt-channel-name {
      margin: 0;
      padding: 0;
      min-width: 0;
      color: #f1f1f1;
      font-size: 15px;
      font-weight: 500;
      line-height: 20px;
      text-align: left;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .yt-channel-auto {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-start;
      align-items: center;
      gap: 8px;
      margin-top: 4px;
    }
    .yt-channel-refresh {
      display: flex;
      justify-content: flex-end;
      margin: 0;
    }
    .yt-auto {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      height: 36px;
      margin: 0;
      color: #f1f1f1;
      font-size: 14px;
      font-weight: 500;
    }
    .yt-auto input {
      width: 18px;
      height: 18px;
      margin: 0;
      accent-color: #f1f1f1;
    }
    .yt-actions { margin-top: 8px; min-height: 36px; }
    .yt-actions form, .yt-pending {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
      min-height: 36px;
      margin: 0;
    }
    .yt-pending { color: #aaa; font-size: 14px; }
    .yt-progress { flex: 1; height: 4px; min-width: 72px; margin: 0; }
    .yt-select {
      width: auto;
      height: 36px;
      margin: 0;
      padding: 0 10px;
      border: none;
      border-radius: 8px;
      background: #272727;
      color: #f1f1f1;
    }
    .yt-go {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 36px;
      margin: 0;
      padding: 0 16px;
      border: none;
      border-radius: 18px;
      background: #f1f1f1;
      box-shadow: none;
      color: #0f0f0f;
      font-size: 14px;
      font-weight: 500;
      text-decoration: none;
    }
    .yt-go:hover { background: #fff; color: #0f0f0f; filter: none; text-decoration: none; }
    .yt-quiet {
      height: 36px;
      margin: 0;
      padding: 0 16px;
      border: none;
      border-radius: 18px;
      background: transparent;
      box-shadow: none;
      color: #aaa;
      font-size: 14px;
      font-weight: 500;
    }
    .yt-quiet:hover { background: rgba(255, 255, 255, 0.1); color: #f1f1f1; filter: none; }
    .yt-menu { opacity: 0; pointer-events: none; }
    .yt-card .yt-menu {
      position: absolute;
      top: -8px;
      right: -8px;
    }
    .yt-channel .yt-menu { position: static; }
    .yt-card:hover .yt-menu,
    .yt-card:focus-within .yt-menu,
    .yt-channel:hover .yt-menu,
    .yt-channel:focus-within .yt-menu,
    .yt-menu[open] { opacity: 1; pointer-events: auto; }
    .yt-menu summary {
      display: grid;
      place-items: center;
      width: 40px;
      height: 40px;
      margin: 0;
      padding: 0;
      list-style: none;
      border-radius: 50%;
      cursor: pointer;
    }
    .yt-menu summary::-webkit-details-marker { display: none; }
    .yt-menu summary::marker { content: ""; }
    .yt-menu summary:hover { background: rgba(255, 255, 255, 0.1); }
    .yt-menu summary:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
    .yt-dots {
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: #f1f1f1;
      box-shadow: 0 -6px 0 #f1f1f1, 0 6px 0 #f1f1f1;
    }
    .yt-menu-panel {
      position: absolute;
      top: 40px;
      right: 0;
      z-index: 5;
      min-width: 180px;
      margin: 0;
      padding: 8px 0;
      border-radius: 12px;
      background: #282828;
      box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
    }
    .yt-menu-panel form { margin: 0; }
    .yt-menu-panel a,
    .yt-menu-panel button {
      display: block;
      width: 100%;
      height: auto;
      margin: 0;
      padding: 10px 16px;
      border: none;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
      color: #f1f1f1;
      font-size: 14px;
      font-weight: 400;
      line-height: 20px;
      text-align: left;
      text-decoration: none;
      cursor: pointer;
    }
    .yt-menu-panel a:hover,
    .yt-menu-panel button:hover {
      background: rgba(255, 255, 255, 0.1);
      color: #f1f1f1;
      filter: none;
      text-decoration: none;
    }
    .yt-stage .empty-title { color: #f1f1f1; }
    .yt-stage .empty { color: #aaa; }
    @media (max-width: 640px) {
      .yt-grid { grid-template-columns: 1fr; }
      .yt-menu, .yt-check { opacity: 1; pointer-events: auto; }
    }
    .offline-list { display: flex; flex-direction: column; }
    .offline-item {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      align-items: center;
      padding: 12px 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .offline-actions { display: flex; gap: 8px; flex-wrap: wrap; }
    #offline-player {
      width: 100%;
      max-height: 70vh;
      margin-bottom: 16px;
      background: #000;
    }
    .phone-log-name {
      margin: 16px 16px 0;
      font-size: 14px;
      font-weight: 600;
    }
    .phone-log {
      margin: 8px 16px 16px;
      padding: 12px;
      max-height: 24rem;
      overflow: auto;
      white-space: pre-wrap;
      word-break: break-word;
      font-size: 12px;
      line-height: 1.4;
      background: #0c1422;
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 8px;
    }

    /* ---------- Logi aplikacji (panel administratora) ---------- */
    .tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      margin-bottom: 1rem;
    }
    .tab {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.45rem 1rem;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: var(--card);
      color: var(--text);
      text-decoration: none;
      font-size: 0.9rem;
      transition: border-color 0.15s ease, background 0.15s ease;
    }
    .tab:hover { border-color: var(--accent); }
    .tab.active {
      background: var(--accent-soft);
      border-color: var(--accent);
      font-weight: 600;
    }
    .tab-count {
      font-size: 0.75rem;
      line-height: 1.5;
      padding: 0.05rem 0.55rem;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.08);
      color: var(--muted);
    }
    .tab.active .tab-count {
      background: rgba(255, 255, 255, 0.18);
      color: var(--text);
    }
    .tab-name { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .phone-head { justify-content: space-between; align-items: flex-start; }
    .phone-chips,
    .log-chips { display: flex; margin-bottom: 0; flex-wrap: wrap; }
    .badge-mute { background: rgba(255, 255, 255, 0.06); color: var(--muted); }
    .log-list .log-item {
      padding: 1rem 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .log-list .log-item:last-child { border-bottom: none; }
    .log-item-head {
      justify-content: space-between;
      align-items: center;
      margin-bottom: 0.6rem;
    }
    .log-actions button, .log-actions .btn { white-space: nowrap; }
