/*
 * File          : control.css (Bored Again Media Portal - Control Center, /admin)
 * Author        : KiDnEy
 * Version       : 1.1.0 (follows app/server.py; new in 1.20.0, history pages 1.21.0)
 * Last Modified : 2026-10-20
 * Version History: see the header of app/server.py.
 * Note          : every rule is scoped to .cc-page; same look as the Music
 *                 Process Center (reuses .pc-btn / .pc-tile / .pc-chip from
 *                 process.css); colours come from the tokens in styles.css.
 */
.cc-page { max-width: 1320px; margin: 0 auto; padding: 18px clamp(1rem, 3vw, 2rem) 120px; }
.cc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cc-head h1 { margin: 0; font-size: 1.4rem; }
.cc-sub { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.cc-page .hidden { display: none !important; }

.cc-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.cc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.cc-main, .cc-side { display: grid; gap: 14px; min-width: 0; }
.cc-side { position: sticky; top: 5rem; }

.cc-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.cc-card-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.cc-static .cc-card-head { cursor: default; border-bottom: 1px solid var(--line); }
.cc-card-head::-webkit-details-marker { display: none; }
.cc-card-head h2 { margin: 0; font-size: 0.98rem; }
.cc-count { min-width: 22px; padding: 1px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text); font-size: 0.78rem; font-weight: 700; text-align: center; }
.cc-card-state { color: var(--muted); font-size: 0.8rem; }
.cc-chevron { width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform 0.15s; margin-left: 4px; }
details[open] > .cc-card-head .cc-chevron { transform: rotate(45deg); }
details[open] > .cc-card-head { border-bottom: 1px solid var(--line); }
.cc-card-body { padding: 12px 14px; display: grid; gap: 10px; }
.cc-h3 { margin: 6px 0 0; font-size: 0.85rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.cc-muted { color: var(--muted); font-size: 0.82rem; }
.cc-mini-link { color: var(--muted); font-size: 0.78rem; }
.cc-mini-link:hover { color: var(--gold); }
.cc-proc-groups { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-proc-groups .pc-chip { color: var(--text); text-decoration: none; font-size: 0.82rem; }
.cc-proc-groups .pc-chip:hover { border-color: var(--gold); }

.cc-services { list-style: none; margin: 0; padding: 6px 0; }
.cc-services li { display: flex; align-items: center; gap: 9px; padding: 6px 14px; font-size: 0.86rem; }
.cc-svc { flex: 1; }
.cc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.cc-dot.ok { background: var(--green); }
.cc-dot.down { background: var(--red); box-shadow: 0 0 0 3px rgba(224, 122, 106, 0.2); }
.cc-links { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px; }
.cc-links a { padding: 5px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); text-decoration: none; font-size: 0.84rem; }
.cc-links a:hover { border-color: var(--gold); }

/* the request cards drawn by app.js, made compact */
.cc-page .queue-list { display: grid; gap: 0; }
.cc-page .queue-card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.cc-page .queue-card:last-child { border-bottom: 0; }
.cc-page .music-row-summary { padding: 9px 2px; }
.cc-page .music-row-copy h3 { font-size: 0.95rem; }
.cc-page .empty-state { color: var(--muted); font-size: 0.86rem; padding: 6px 2px; border: 0; background: none; }
.cc-page .cc-card-body button,
.cc-page .cc-card-body .ghost-button,
.cc-page .cc-card-body .button-link,
.cc-page .cc-card-body .quiet-link { min-height: 0; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); border-radius: 8px; padding: 6px 12px; font-size: 0.85rem; font-weight: 500; box-shadow: none; text-decoration: none; }
.cc-page .cc-card-body button:hover,
.cc-page .cc-card-body .ghost-button:hover,
.cc-page .cc-card-body .button-link:hover { border-color: var(--gold); }
.cc-page .cc-card-body button[data-access-status="approved"],
.cc-page .cc-card-body button[data-lidarr-request],
.cc-page .cc-card-body button[data-bindery-request],
.cc-page .cc-card-body button[type="submit"],
.cc-page .cc-card-body #admin-process-batch-approve-button { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 600; }
.cc-page .cc-card-body button:disabled { opacity: 0.5; cursor: default; }
.cc-page .cc-card-body input,
.cc-page .cc-card-body select,
.cc-page .cc-card-body textarea { min-height: 0; width: auto; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.85rem; }
.cc-page .cc-card-body textarea { width: 100%; min-height: 3.5rem; }
.cc-page .admin-controls { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; }
.cc-page .process-settings-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.cc-page .process-settings-bar input[type="number"] { width: 4.2rem; }
.cc-page .process-auto-log,
.cc-page .cc-classic { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.cc-page .process-auto-log > summary,
.cc-page .cc-classic > summary { cursor: pointer; font-size: 0.88rem; }
.cc-page .cc-classic[open] > summary,
.cc-page .process-auto-log[open] > summary { margin-bottom: 10px; }
.cc-page .process-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }

/* sign-in card sits in the page, not in an old panel */
.cc-page .admin-login-wrap { padding: 0; }

@media (max-width: 980px) {
  .cc-grid { grid-template-columns: 1fr; }
  .cc-side { position: static; }
  .cc-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .cc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cc-page .admin-controls { grid-template-columns: 1fr; }
}

/* v1.21.0: history pages */
.cc-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cc-tools:empty { display: none; }
.cc-search { flex: 1; min-width: 180px; min-height: 0; padding: 7px 11px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 0.88rem; }
.cc-search:focus { outline: none; border-color: var(--gold); }
.cc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-chip { min-height: 0; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-size: 0.8rem; cursor: pointer; }
.cc-chip b { color: var(--muted); margin-left: 3px; }
.cc-chip:hover { border-color: var(--gold); }
.cc-chip.on { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.cc-chip.on b { color: var(--ink); }
.cc-links a[aria-current="page"] { border-color: var(--gold); color: var(--gold); }

/* v1.26.0: Library duplicates */
.cc-dup-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cc-dup { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.cc-dup-title { font-size: 0.9rem; margin-bottom: 4px; }
.cc-dup-row { display: grid; grid-template-columns: 18px 78px minmax(0, 1fr); gap: 8px; align-items: start; padding: 5px 0; border-top: 1px solid var(--line); cursor: pointer; font-weight: 400; margin: 0; }
.cc-dup-row:first-of-type { border-top: 0; }
.cc-page .cc-dup-row input { width: 16px; height: 16px; min-height: 0; padding: 0; margin: 2px 0 0; accent-color: var(--red); }
.cc-dup-tag { font-size: 0.72rem; font-weight: 700; text-align: center; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--muted); }
.cc-dup-tag.remove { color: var(--red); border-color: rgba(224, 122, 106, 0.5); }
.cc-dup-tag.review { color: var(--gold); border-color: rgba(255, 179, 71, 0.5); }
.cc-dup-name { min-width: 0; font-size: 0.86rem; overflow-wrap: anywhere; }
.cc-dup-name small { display: block; color: var(--muted); font-size: 0.76rem; margin-top: 1px; }
.cc-dup-name small.cc-dup-why { color: var(--soft); }
