/* ============================================================
   Kingdom Championships – public bracket page.
   Layout mimics the typical sports knock-out bracket: left half,
   final in the middle, right half mirrored.
   ============================================================ */

:root {
    /* dynamitemc.net design system */
    --gold: #ffc107;
    --gold-deep: #e6a800;
    --ink: #1a0a08;
    --red: #d32027;
    --red-dark: #b71c1c;
    --cream: #fff9e5;
    --white: #fffef8;
    --shadow: rgba(26, 10, 8, 0.22);
    --radius: 1.25rem;
    --radius-lg: 1.75rem;
    --hard: 6px 8px 0 var(--ink);
    --hard-sm: 4px 5px 0 var(--ink);

    --font-hero: "Anton", system-ui, sans-serif;
    --font-display: "Russo One", system-ui, sans-serif;
    --font-ui: "Teko", system-ui, sans-serif;
    --font-body: "Saira", system-ui, sans-serif;
    --font-head: var(--font-hero);

    /* Legacy variable names mapped onto the dynamite palette so the existing
       bracket / modal rules recolour automatically. */
    --bg: var(--gold);
    --bg-2: var(--white);
    --bg-3: var(--cream);
    --panel: var(--white);
    --panel-solid: var(--white);
    --border: var(--ink);
    --border-strong: var(--ink);
    --line: var(--ink);
    --line-dim: rgba(26, 10, 8, 0.55);
    --text: var(--ink);
    --muted: rgba(26, 10, 8, 0.6);
    --accent: var(--red);
    --accent-2: var(--gold-deep);
    --match-bg: var(--white);
    --match-text: var(--ink);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--gold);
    color: var(--ink);
    font-family: var(--font-body), "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

/* Subtle halftone dots over the gold, comic-book style. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(rgba(26, 10, 8, 0.07) 1.4px, transparent 1.5px);
    background-size: 22px 22px;
}

main { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }

/* ---- Top-right gear (admin link) ---- */
.admin-gear {
    position: fixed;
    top: 18px;
    right: 22px;
    color: var(--muted);
    transition: color 0.2s ease, transform 0.6s ease;
    z-index: 50;
    line-height: 0;
}
.admin-gear:hover { color: var(--text); transform: rotate(60deg); }

/* ---- Hero ---- */
.hero {
    text-align: center;
    padding: 52px 20px 14px;
    position: relative;
}
.hero h1 {
    margin: 0;
    font-family: var(--font-hero);
    font-size: clamp(34px, 8vw, 72px);
    letter-spacing: 0.03em;
    font-weight: 400;
    line-height: 0.98;
    text-transform: uppercase;
    color: var(--ink);
    /* Comic offset shadow on the display type. */
    text-shadow: 4px 4px 0 var(--white), 7px 7px 0 var(--red);
}
.hero .subtitle {
    margin: 18px 0 0;
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 17px;
    letter-spacing: 4px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.78;
}
/* Red pill rule under the hero title. */
.hero::after {
    content: "";
    display: block;
    width: 96px;
    height: 8px;
    margin: 20px auto 0;
    border-radius: 999px;
    background: var(--red);
    border: 3px solid var(--ink);
    box-shadow: 3px 4px 0 var(--ink);
}

/* ---- Bracket container ---- */
#bracket-container {
    padding: 28px 24px 60px;
    overflow-x: auto;
}

.empty-state {
    text-align: center;
    color: var(--muted);
    margin-top: 80px;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Placeholder note rendered ABOVE the synthetic empty-bracket so the
   layout (round labels + bracket skeleton) is still visible. */
.empty-state.placeholder-note {
    margin-top: 12px;
    margin-bottom: 0;
    opacity: 0.8;
}

/* ---- Round labels above the bracket ---- */
.round-labels {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 0;
    margin: 0 auto 18px;
    min-width: 1400px;
}
.round-labels .label {
    flex: 1;
    text-align: center;
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 17px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    padding: 0 4px;
}
.round-labels .label.center { flex: 0 0 220px; }

/* ---- Bracket layout (left half – center – right half) ---- */
.bracket {
    display: flex;
    justify-content: center;
    align-items: stretch;
    min-width: 1400px;
    margin: 0 auto;
    min-height: 70vh;
}

.side {
    display: flex;
    flex: 1;
    align-items: stretch;
}

.side.left  .round-col:last-child  { padding-right: 0; }
.side.right .round-col:first-child { padding-left: 0; }

/* A single round (a column of pairs and/or matches). */
.round-col {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex: 1;
    min-width: 140px;
    padding: 0 22px;
    position: relative;
}

/* ---- Final column ---- */
.final-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 0 0 220px;
    padding: 0 4px;
}
.final-col .match.final {
    min-height: 110px;
    padding: 26px 16px;
    border-radius: var(--radius);
    text-align: center;
    color: var(--white);
    font-family: var(--font-ui);
    font-weight: 600;
    letter-spacing: 4px;
    font-size: 18px;
    box-shadow: var(--hard);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--red);
    border: 4px solid var(--ink);
    position: relative;
}
.final-col .match.final::before {
    content: "👑";
    position: absolute; top: -28px; left: 50%;
    transform: translateX(-50%);
    font-size: 28px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
    animation: kc-crown-float 4s ease-in-out infinite;
}
.final-col .match.final .final-label {
    text-shadow: 0 2px 4px rgba(255,255,255,0.4);
}
@keyframes kc-finale-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
@keyframes kc-crown-float {
    0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
    50%      { transform: translateX(-50%) translateY(-6px) rotate(8deg); }
}

/* ---- A match card (white rounded box with two team circles) ---- */
.match {
    background: var(--match-bg);
    color: var(--match-text);
    border: 3px solid var(--ink);
    border-radius: 14px;
    padding: 7px 14px;
    margin: 7px 0;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    box-shadow: var(--hard-sm);
}

.match .teams {
    display: flex;
    gap: 8px;
    align-items: center;
}

.team-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #888;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11px;
    border: 2px solid var(--ink);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
    cursor: help;
    position: relative;
    transition: transform 0.15s ease;
}
.team-circle:hover { transform: scale(1.15); z-index: 4; }
.team-circle.tbd   { background: #4a5365; opacity: 0.5; }
.team-circle.settled-winner {
    box-shadow: 0 0 0 2px var(--accent), inset 0 0 0 1px rgba(0,0,0,0.2);
}
.team-circle.loser  { opacity: 0.35; filter: grayscale(0.7) brightness(0.85); }
.team-circle.winner {
    z-index: 5;
    animation: kc-winner-pop 2s cubic-bezier(.34,1.56,.64,1) both;
}
.team-icon-img {
    width: 100%; height: 100%; border-radius: 50%;
    object-fit: cover; display: block;
    pointer-events: none;
}

@keyframes kc-winner-pop {
    0%   { transform: scale(1);    box-shadow: 0 0 0 0 var(--accent); }
    20%  { transform: scale(1.6);  box-shadow: 0 0 40px 14px var(--accent); }
    50%  { transform: scale(1.25); box-shadow: 0 0 30px 10px var(--accent); }
    100% { transform: scale(1.1);  box-shadow: 0 0 0 2px var(--accent); }
}

/* Match that just got resolved: yellow burst behind the card */
.match.just-resolved { animation: kc-match-flash 1.5s ease-out; }
@keyframes kc-match-flash {
    0%   { box-shadow: 0 0 0 0 rgba(245,183,60,0); }
    30%  { box-shadow: 0 0 40px 14px rgba(245,183,60,0.6); }
    100% { box-shadow: 0 0 0 0 rgba(245,183,60,0); }
}
.win-burst {
    position: absolute; inset: 0; pointer-events: none; border-radius: 6px;
    background: radial-gradient(circle at center, rgba(245,183,60,0.6) 0%, transparent 70%);
    animation: kc-burst 1.5s ease-out forwards;
}
@keyframes kc-burst {
    0%   { opacity: 0; transform: scale(0.5); }
    30%  { opacity: 1; transform: scale(1.4); }
    100% { opacity: 0; transform: scale(2.0); }
}

/* Tooltip rendered via title attr; nothing extra here. */

/* ---- Bracket connector lines ---- */
/* Each pair wraps two matches that feed the next round. The vertical part
   is the pair's right (or left) border; horizontal stubs come off matches. */

.pair {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex: 1;
    position: relative;
    padding: 4px 0;
}

.side.left  .pair { border-right: 2px solid var(--line); }
.side.right .pair { border-left:  2px solid var(--line); }

/* Horizontal stub from each match out to the pair's vertical bar */
.side.left  .match::after,
.side.right .match::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 22px;
    height: 2px;
    background: var(--line);
    transform: translateY(-50%);
}
.side.left  .match::after  { right: -22px; }
.side.right .match::before { left:  -22px; }

/* Horizontal connector from each pair's mid-point out to the NEXT round */
.side.left  .pair::after,
.side.right .pair::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 22px;
    height: 2px;
    background: var(--line);
    transform: translateY(-50%);
}
.side.left  .pair::after  { right: -24px; }
.side.right .pair::before { left:  -24px; }

/* Last round on each side connects to the final box */
.side.left  .round-col.last .match::after  { width: 30px; right: -30px; }
.side.right .round-col.last .match::before { width: 30px; left:  -30px; }

/* ---- Footer hint ---- */
.footer-hint {
    text-align: center;
    color: var(--muted);
    margin-top: 12px;
    font-size: 12px;
}

/* ---- Responsive: shrink labels on narrow viewports ---- */
@media (max-width: 1500px) {
    .bracket, .round-labels { min-width: 1300px; }
}

/* ===========================================================
   CHAMPION CELEBRATION OVERLAY
   =========================================================== */

.champion-overlay {
    position: fixed; inset: 0; z-index: 9000;
    background: radial-gradient(circle at center, rgba(0,0,0,0.85), rgba(0,0,0,0.97));
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    animation: kc-overlay-in 0.6s ease-out;
}
.champion-overlay.fading {
    animation: kc-overlay-out 2s ease-in forwards;
}
@keyframes kc-overlay-in {
    0% { opacity: 0; backdrop-filter: blur(0); }
    100% { opacity: 1; backdrop-filter: blur(2px); }
}
@keyframes kc-overlay-out {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.champion-ring {
    width: 360px; height: 360px; border-radius: 50%;
    border: 4px solid var(--accent);
    display: flex; align-items: center; justify-content: center;
    animation: kc-champion-pulse 2.5s ease-in-out infinite;
    position: relative;
    z-index: 2;
}
@keyframes kc-champion-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}
.champion-inner {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    text-align: center;
}
.champion-icon {
    width: 160px; height: 160px; border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.05);
    animation: kc-champion-spin 12s linear infinite;
}
.champion-icon.fallback {
    display: flex; align-items: center; justify-content: center;
    font-size: 56px; font-weight: 900;
}
@keyframes kc-champion-spin {
    0% { transform: rotate(0); } 100% { transform: rotate(360deg); }
}
.champion-crown {
    font-size: 52px;
    animation: kc-crown-bounce 1.4s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(255,215,0,0.6));
}
@keyframes kc-crown-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}
.champion-name {
    font-size: 42px; font-weight: 900; letter-spacing: 4px;
    margin: 0; text-shadow: 0 0 24px currentColor;
}
.champion-sub {
    color: var(--accent); letter-spacing: 6px;
    font-size: 13px; font-weight: 700; margin: 0;
}
.champion-close {
    position: absolute; top: 24px; right: 24px;
    background: rgba(255,255,255,0.1); color: #fff;
    border: 1px solid rgba(255,255,255,0.25); border-radius: 4px;
    padding: 8px 14px; cursor: pointer; z-index: 10;
}
.champion-close:hover { background: rgba(255,255,255,0.2); }

/* Confetti */
.confetti-layer {
    position: absolute; inset: 0; pointer-events: none; overflow: hidden;
    z-index: 1;
}
.confetti {
    position: absolute; top: -20px;
    width: 10px; height: 16px; border-radius: 2px;
    animation: kc-confetti-fall linear infinite;
    opacity: 0.9;
}
@keyframes kc-confetti-fall {
    0%   { transform: translateY(-30px) rotate(0deg); opacity: 0; }
    10%  { opacity: 0.9; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0.7; }
}

/* ===========================================================
   KINGDOM INFO MODAL
   =========================================================== */

.kc-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex; align-items: center; justify-content: center;
    z-index: 8000;
    animation: kc-overlay-in 0.25s ease-out;
}
.kc-modal {
    background: var(--white);
    border: 4px solid var(--ink);
    border-radius: var(--radius-lg);
    width: 520px; max-width: 92vw; max-height: 88vh;
    overflow: auto;
    box-shadow: var(--hard);
    color: var(--ink);
}
.kc-modal-header {
    display: flex; align-items: center; gap: 16px;
    padding: 18px 22px;
    border-top-left-radius: 8px; border-top-right-radius: 8px;
}
.kc-modal-icon {
    width: 64px; height: 64px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.5);
    object-fit: cover; background: rgba(0,0,0,0.15);
}
.kc-modal-icon.fallback {
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 900;
}
.kc-modal-titles h2 { margin: 0; font-size: 22px; letter-spacing: 1px; }
.kc-modal-titles p  { margin: 4px 0 0; font-size: 12px; opacity: 0.85; font-family: "JetBrains Mono", monospace; }

.kc-modal-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px; padding: 14px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.kc-stat {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    background: var(--cream); border: 2px solid var(--ink); border-radius: 10px; padding: 10px;
}
.kc-stat-value { font-size: 22px; font-weight: 800; }
.kc-stat-label { font-size: 10px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }

.kc-modal-body { padding: 14px 22px; }
.kc-modal-desc { font-style: italic; color: var(--muted); margin: 0; }

.kc-modal-royals {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    padding: 0 22px 16px;
}
.kc-royal {
    background: var(--cream);
    border: 2px solid var(--ink);
    border-radius: 10px; padding: 12px;
    display: flex; flex-direction: column; gap: 4px;
}
.kc-royal .kc-crown { font-size: 22px; }
.kc-royal .kc-royal-label { font-size: 10px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
.kc-royal .kc-royal-name  { font-weight: 700; color: var(--text); }
.kc-royal.kc-king { border-color: rgba(255,215,0,0.5); background: rgba(255,215,0,0.08); }
.kc-royal.empty .kc-royal-name { opacity: 0.5; font-style: italic; }

.kc-modal-members {
    list-style: none; padding: 0 22px 8px; margin: 0;
    max-height: 240px; overflow-y: auto;
}
.kc-member {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--cream);
    border: 1.5px solid var(--ink);
    margin-bottom: 5px;
    font-size: 14px;
}
.kc-member.king   { background: rgba(255,215,0,0.10); }
.kc-member.duke   { background: rgba(192,192,192,0.08); }
.kc-member.empty  { justify-content: center; opacity: 0.6; }
.kc-member-dot {
    width: 10px; height: 10px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
}
.kc-member-name { flex: 1; }
.kc-member-role {
    font-size: 10px; letter-spacing: 1px; padding: 2px 6px;
    border-radius: 3px; background: rgba(255,255,255,0.08);
    color: var(--muted); text-transform: uppercase;
}
.kc-online-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #3fb950;
    box-shadow: 0 0 6px #3fb950;
}

.kc-modal-close {
    display: block; margin: 12px auto 20px;
    background: var(--accent); color: var(--bg-2);
    border: 0; padding: 8px 22px;
    border-radius: 4px; font-weight: 700; cursor: pointer;
}
.kc-modal-close:hover { background: #ffa500; }

/* ============================================================
   Admin panel (admin.html) – preserved from previous design.
   ============================================================ */

.admin-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}
.admin-shell header { display:flex; align-items:center; justify-content:space-between; margin-bottom: 20px; }
.admin-shell h1 {
    font-size: 22px; margin: 0;
    background: linear-gradient(90deg, var(--accent), #ff7e5f);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.admin-shell .tag { background: var(--accent); color: var(--bg); padding: 2px 8px; border-radius: 4px; font-size: 11px; margin-left: 8px; -webkit-text-fill-color: var(--bg); }

.admin-shell .card {
    background: var(--bg-2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 20px;
    max-width: 420px;
    margin: 40px auto;
}
.admin-shell .card h2 { margin-top: 0; color: var(--accent); }
.admin-shell label { display: block; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.admin-shell label input { display: block; width: 100%; margin-top: 4px; padding: 8px; border-radius: 4px;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: var(--text); }
.admin-shell button {
    background: var(--accent); color: var(--bg); border: 0; padding: 8px 16px;
    border-radius: 4px; font-weight: 700; cursor: pointer;
}
.admin-shell button:hover { background: #ff9a4a; }
.admin-shell button.danger { background: #f85149; color: #fff; }

.admin-shell .tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-shell .tabs button {
    background: transparent; color: var(--muted); border: 0;
    padding: 10px 16px; border-bottom: 2px solid transparent; border-radius: 0;
}
.admin-shell .tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.admin-shell .tab-panel { display: none; }
.admin-shell .tab-panel.active { display: block; }

.admin-shell table { width: 100%; border-collapse: collapse; }
.admin-shell table th, .admin-shell table td {
    text-align: left; padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.admin-shell table th { color: var(--muted); font-size: 12px; }

.admin-shell .inline-form { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-shell .inline-form input, .admin-shell .inline-form select {
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px; padding: 8px 10px; color: var(--text);
}

/* Native <option> elements ignore parent CSS by default and inherit the
   OS theme – on a dark background that means white-on-white. Force them
   to use our dark palette explicitly. */
.admin-shell select option,
.admin-shell select optgroup {
    background-color: var(--bg-2);
    color: var(--text);
}
.admin-shell select option:checked,
.admin-shell select option:hover {
    background-color: var(--accent);
    color: var(--bg);
}
.admin-shell select option[disabled] {
    color: var(--muted);
    font-style: italic;
}

/* Test-mode banner – sits at the top of the admin panel when active. */
.admin-shell .test-mode-banner {
    background: repeating-linear-gradient(45deg,
        rgba(245,183,60,0.10) 0 12px,
        rgba(245,183,60,0.20) 12px 24px);
    border: 1px solid var(--accent);
    color: var(--text);
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.admin-shell .test-mode-banner strong { color: var(--accent); }
.admin-shell .test-mode-banner .pill {
    background: var(--accent); color: var(--bg);
    padding: 2px 8px; border-radius: 999px;
    font-weight: 700; font-size: 12px;
    -webkit-text-fill-color: var(--bg);
}
.admin-shell button.flash-ok {
    background: #3fb950 !important;
    color: #fff !important;
    transition: background 0.2s, color 0.2s;
}
.admin-shell .swatch {
    display:inline-block; width:14px; height:14px; border-radius:3px;
    border:1px solid rgba(255,255,255,0.2); vertical-align:middle; margin-right:6px;
}
.admin-shell .error { color: #f85149; margin-top: 8px; font-size: 13px; }
.admin-shell .hint { color: var(--muted); font-size: 13px; }
.admin-shell code {
    background: rgba(255,255,255,0.08); padding: 2px 5px; border-radius: 3px;
    font-family: "JetBrains Mono", "Fira Code", monospace; font-size: 12px;
}

/* Discord tab specifics */
.admin-shell details {
    background: var(--bg-2);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 12px 16px;
}
.admin-shell details > summary {
    cursor: pointer;
    color: var(--accent);
    font-size: 14px;
    list-style: none;
    user-select: none;
}
.admin-shell details > summary::before { content: "▸ "; }
.admin-shell details[open] > summary::before { content: "▾ "; }

.admin-shell .settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 18px;
    margin-top: 12px;
}
.admin-shell .settings-grid label { display: flex; flex-direction: column; }
.admin-shell .settings-grid input, .admin-shell .settings-grid select {
    padding: 6px 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    color: var(--text);
    margin-top: 4px;
}
.admin-shell .settings-actions {
    grid-column: 1 / -1;
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-top: 8px;
}

.admin-shell .status-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.admin-shell .status-pill.on  { background: rgba(63, 185, 80, 0.25); color: #3fb950; }
.admin-shell .status-pill.off { background: rgba(248, 81, 73, 0.25); color: #f85149; }

/* Select with inline refresh button */
.admin-shell .select-with-refresh {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    margin-top: 4px;
    width: 100%;
}
.admin-shell .select-with-refresh select {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    margin-top: 0;
}
.admin-shell .refresh-btn {
    background: rgba(255,255,255,0.06);
    color: var(--muted);
    border: 1px solid rgba(255,255,255,0.12);
    border-left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    padding: 0 10px;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.4s ease, color 0.2s ease, background 0.2s ease;
}
.admin-shell .refresh-btn:hover {
    background: rgba(245,183,60,0.15);
    color: var(--accent);
}
.admin-shell .refresh-btn.spinning {
    transform: rotate(360deg);
}

/* Inline form variant – refresh button inside an inline-form */
.admin-shell .inline-form .select-with-refresh {
    width: auto;
    margin-top: 0;
}
.admin-shell .inline-form .select-with-refresh select {
    min-width: 180px;
}
