/* Repo Pulse - styles */

:root {
    --bg:        #0c0e10;
    --panel:     #16191c;
    --panel-2:   #1b1f23;
    --border:    #242a30;
    --border-2:  #2e353c;

    --text:      #e6edf3;
    --muted:     #9aa5b1;
    --dim:       #5e6b78;

    --accent:    #5ce1e6;
    --accent-d:  #2db4b9;

    --green:     #3fb950;
    --red:       #f85149;
    --yellow:    #d29922;
    --purple:    #a371f7;
    --orange:    #f78166;
    --blue:      #58a6ff;

    --serif:     'Fraunces', ui-serif, Georgia, serif;
    --mono:      'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --sans:      'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

    --radius:    10px;
    --radius-sm: 6px;
    --shadow:    0 8px 24px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-d); text-decoration: underline; }

button { font: inherit; color: inherit; cursor: pointer; }

code { font-family: var(--mono); font-size: 0.92em; background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }

/* ----- Login ----- */

.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.login-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(92, 225, 230, 0.55);
}
.brand-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 28px;
    margin: 0;
    letter-spacing: -0.01em;
}
.brand-tagline {
    color: var(--muted);
    margin: 14px 0 24px;
}
.login-hint {
    color: var(--dim);
    font-size: 12px;
    margin: 18px 0 0;
}

/* ----- Buttons ----- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--border); border-color: var(--border-2); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
    background: var(--accent);
    color: #07181a;
    border-color: transparent;
    font-weight: 600;
}
.btn-primary:hover { background: var(--accent-d); color: #051213; }

.btn-danger {
    color: var(--red);
    border-color: var(--border);
}
.btn-danger:hover { background: rgba(248, 81, 73, 0.08); border-color: var(--red); }

.icon-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    width: 26px; height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
}
.icon-btn:hover { color: var(--text); background: var(--panel-2); border-color: var(--border); }

/* ----- Layout ----- */

.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}
.sidebar {
    border-right: 1px solid var(--border);
    background: var(--panel);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar-head {
    padding: 20px 18px 16px;
    border-bottom: 1px solid var(--border);
}

.sidebar-section {
    padding: 14px 10px;
    flex: 1;
    overflow-y: auto;
}
.sidebar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--dim);
    padding: 4px 8px 8px;
}
.project-list { display: flex; flex-direction: column; gap: 2px; }
.project-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    text-align: left;
    width: 100%;
    transition: background 0.12s, color 0.12s;
}
.project-item:hover { background: var(--panel-2); color: var(--text); }
.project-item.is-active {
    background: var(--panel-2);
    color: var(--text);
    border-color: var(--border);
}
.project-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}
.project-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.project-count {
    margin-left: auto;
    color: var(--dim);
    font-family: var(--mono);
    font-size: 11px;
}

.sidebar-foot {
    border-top: 1px solid var(--border);
    padding: 12px 14px;
}
.me {
    display: flex;
    align-items: center;
    gap: 10px;
}
.me-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--panel-2);
}
.me-text { line-height: 1.25; }
.me-login {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text);
}
.me-logout {
    font-size: 11px;
    color: var(--dim);
}
.me-logout:hover { color: var(--red); }

/* ----- Content / page head ----- */

.content {
    padding: 28px 32px 80px;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}
.page-title-wrap { min-width: 0; }
.page-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 28px;
    margin: 0 0 4px;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 12px;
}
.page-title .project-dot { width: 10px; height: 10px; }
.page-sub {
    color: var(--muted);
    font-size: 13px;
}
.page-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ----- Empty / loading ----- */

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--muted);
}
.empty-state h2 {
    font-family: var(--serif);
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px;
}
.empty-state p { margin: 0 0 18px; }

.loading {
    color: var(--dim);
    text-align: center;
    padding: 40px;
    font-family: var(--mono);
    font-size: 12px;
}

/* ----- Repo summary cards ----- */

.repo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}
.repo-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.15s, transform 0.15s;
}
.repo-card:hover { border-color: var(--border-2); }
.repo-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}
.repo-name {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    word-break: break-all;
}
.repo-name .owner { color: var(--dim); }
.repo-name a { color: inherit; }
.repo-name a:hover { color: var(--accent); text-decoration: none; }

.repo-card-remove {
    color: var(--dim);
    background: transparent;
    border: none;
    padding: 0 4px;
    font-size: 16px;
    line-height: 1;
}
.repo-card-remove:hover { color: var(--red); }

.repo-desc {
    font-size: 12px;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 32px;
}

.repo-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    padding-top: 10px;
    margin-top: auto;
}
.repo-stat { display: inline-flex; align-items: center; gap: 4px; }
.repo-stat.warn { color: var(--yellow); }
.repo-stat.fail { color: var(--red); }
.repo-stat.ok   { color: var(--green); }

.repo-error {
    font-size: 11px;
    font-family: var(--mono);
    color: var(--red);
    background: rgba(248, 81, 73, 0.08);
    border: 1px solid rgba(248, 81, 73, 0.2);
    border-radius: var(--radius-sm);
    padding: 6px 8px;
}

/* ----- Activity feed ----- */

.section-head {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--dim);
    margin: 0 0 12px;
}

.feed {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.feed-row {
    display: grid;
    grid-template-columns: 36px 28px 1fr auto;
    gap: 12px;
    padding: 12px 16px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    transition: background 0.12s;
}
.feed-row:last-child { border-bottom: none; }
.feed-row:hover { background: var(--panel-2); }

.feed-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    border: 1px solid transparent;
}
.feed-icon.commit            { background: rgba(92, 225, 230, 0.12);  color: var(--accent); border-color: rgba(92, 225, 230, 0.25); }
.feed-icon.pr_open           { background: rgba(63, 185, 80, 0.12);   color: var(--green);  border-color: rgba(63, 185, 80, 0.28); }
.feed-icon.pr_merged         { background: rgba(163, 113, 247, 0.12); color: var(--purple); border-color: rgba(163, 113, 247, 0.28); }
.feed-icon.pr_closed         { background: rgba(248, 81, 73, 0.10);   color: var(--red);    border-color: rgba(248, 81, 73, 0.22); }
.feed-icon.workflow_success  { background: rgba(63, 185, 80, 0.10);   color: var(--green);  border-color: rgba(63, 185, 80, 0.25); }
.feed-icon.workflow_failure  { background: rgba(248, 81, 73, 0.12);   color: var(--red);    border-color: rgba(248, 81, 73, 0.28); }
.feed-icon.workflow_pending  { background: rgba(210, 153, 34, 0.12);  color: var(--yellow); border-color: rgba(210, 153, 34, 0.28); }
.feed-icon.workflow_cancelled{ background: rgba(154, 165, 177, 0.12); color: var(--muted);  border-color: rgba(154, 165, 177, 0.22); }
.feed-icon.workflow_run      { background: rgba(154, 165, 177, 0.12); color: var(--muted);  border-color: rgba(154, 165, 177, 0.22); }
.feed-icon.release           { background: rgba(247, 129, 102, 0.12); color: var(--orange); border-color: rgba(247, 129, 102, 0.28); }

.feed-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--panel-2);
    flex-shrink: 0;
}

.feed-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.feed-title {
    font-size: 13px;
    color: var(--text);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.feed-title a { color: var(--text); }
.feed-title a:hover { color: var(--accent); text-decoration: none; }
.feed-meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--dim);
    margin-top: 2px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}
.feed-meta .repo-tag { color: var(--muted); }
.feed-meta .badge {
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
    border: 1px solid var(--border-2);
}
.feed-meta .badge.green  { color: var(--green);  border-color: rgba(63,185,80,0.35); }
.feed-meta .badge.red    { color: var(--red);    border-color: rgba(248,81,73,0.35); }
.feed-meta .badge.purple { color: var(--purple); border-color: rgba(163,113,247,0.35); }
.feed-meta .badge.yellow { color: var(--yellow); border-color: rgba(210,153,34,0.35); }
.feed-meta .badge.orange { color: var(--orange); border-color: rgba(247,129,102,0.35); }

.feed-time {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--dim);
    white-space: nowrap;
}

.feed-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--dim);
    font-family: var(--mono);
    font-size: 12px;
}

/* ----- Errors panel ----- */

.errors-panel {
    background: rgba(248, 81, 73, 0.06);
    border: 1px solid rgba(248, 81, 73, 0.2);
    color: var(--red);
    font-family: var(--mono);
    font-size: 12px;
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 18px;
}
.errors-panel ul { margin: 6px 0 0; padding-left: 18px; }

/* ----- Modals ----- */

.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
/* The HTML `hidden` attribute is implemented in the UA stylesheet as
 * [hidden] { display: none }. A class-only selector like `.modal` has the
 * same specificity, but the author stylesheet loads later, so its
 * `display: flex` wins — which makes every modal visible on page load
 * regardless of `hidden`. Bumping specificity with `.modal[hidden]` fixes it. */
.modal[hidden] { display: none; }
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 7, 9, 0.7);
    backdrop-filter: blur(4px);
}
.modal-card {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow);
    animation: pop 0.15s ease-out;
}
@keyframes pop {
    from { transform: translateY(8px); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
}
.modal-head {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-head h2 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 18px;
}
.modal-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot {
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.field-hint { color: var(--dim); text-transform: none; letter-spacing: 0; font-size: 11px; }
.field input[type="text"],
.field input[type="color"] {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font-family: var(--sans);
    font-size: 13px;
}
.field input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(92,225,230,0.12);
}
.field input[type="color"] {
    height: 36px;
    width: 56px;
    padding: 2px;
}

.modal-error {
    color: var(--red);
    background: rgba(248,81,73,0.08);
    border: 1px solid rgba(248,81,73,0.2);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font-size: 12px;
    font-family: var(--mono);
}

/* ----- Wider modal (add-repo picker) ----- */

.modal-card-wide {
    max-width: 720px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

/* ----- Repo picker stats panel ----- */

.repo-stats {
    background: linear-gradient(180deg, rgba(92, 225, 230, 0.04), transparent 70%), var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: fade-in 0.18s ease-out;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.stats-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
}
.stats-num {
    font-family: var(--mono);
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}
.stats-num.accent { color: var(--accent); }
.stats-lbl {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    margin-right: 4px;
}
.stats-sep { color: var(--dim); margin: 0 2px; }
.stats-spacer { flex: 1; min-width: 8px; }
.stats-vis { display: flex; gap: 6px; }
.vis-pill {
    font-family: var(--mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-2);
    color: var(--muted);
    background: var(--bg);
}
.vis-pill.private {
    color: var(--yellow);
    border-color: rgba(210, 153, 34, 0.35);
}

.stats-block { display: flex; flex-direction: column; gap: 6px; }
.stats-label {
    font-family: var(--mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--dim);
}

/* Stacked horizontal language bar */
.lang-bar {
    height: 10px;
    display: flex;
    border-radius: 999px;
    overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--border);
}
.lang-bar-seg {
    transition: filter 0.15s, transform 0.2s;
    cursor: default;
}
.lang-bar-seg:hover {
    filter: brightness(1.25);
}

.lang-legend {
    display: flex;
    gap: 10px 14px;
    flex-wrap: wrap;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}
.lang-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.lang-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.lang-count { color: var(--dim); }

/* 30-day push sparkline */
.spark {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 36px;
    padding: 4px 2px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.spark-bar {
    flex: 1;
    min-height: 2px;
    background: var(--accent);
    border-radius: 1px;
    transition: filter 0.15s, transform 0.15s;
    transform-origin: bottom;
    opacity: 0.85;
}
.spark-bar:hover { filter: brightness(1.4); transform: scaleY(1.05); }
.spark-bar.empty {
    background: transparent;
    border-bottom: 1px dashed var(--border);
    min-height: 0;
    height: 0 !important;
}
.spark-axis {
    display: flex;
    justify-content: space-between;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--dim);
    padding: 0 2px;
}

/* Toolbar between stats and rows */
.picker-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 0 2px;
}
.picker-count {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
}
.select-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--dim);
}
.select-label { text-transform: uppercase; letter-spacing: 0.06em; }
#ar-sort {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px 8px;
    font-family: var(--sans);
    font-size: 12px;
    cursor: pointer;
}
#ar-sort:focus {
    outline: none;
    border-color: var(--accent);
}

/* ----- Repo picker (rows) ----- */

.repo-picker {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.picker-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px 10px 18px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-align: left;
    width: 100%;
    transition: background 0.12s;
}
.picker-row:last-child { border-bottom: none; }
.picker-row:hover:not(:disabled) { background: var(--panel-2); }
.picker-row:disabled,
.picker-row.is-added {
    cursor: default;
    opacity: 0.55;
}

/* The colored vertical stripe on the left of each row, tinted to the
 * repo's primary language. Acts as a quick visual scan cue when paging
 * through the list. */
.picker-row-rail {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--dim);
    opacity: 0.5;
    transition: opacity 0.15s, width 0.15s;
}
.picker-row:hover:not(:disabled) .picker-row-rail {
    opacity: 1;
    width: 4px;
}

.picker-row-main {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.picker-row-name {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.picker-row-owner { color: var(--dim); }
.picker-row-desc {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.picker-row-stats {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    align-items: center;
}
.picker-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.picker-stat.dim { color: var(--dim); }
.picker-stat.lang .lang-dot { width: 9px; height: 9px; }

.picker-row-action {
    flex-shrink: 0;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--panel);
    transition: color 0.12s, border-color 0.12s, background 0.12s;
}
/* Freshness-tinted action button — at-a-glance signal of how active each
 * repo is. Hover and is-added override these. */
.picker-row.fresh-hot  .picker-row-action { color: var(--green);  border-color: rgba(63, 185, 80, 0.25); }
.picker-row.fresh-warm .picker-row-action { color: var(--accent); border-color: rgba(92, 225, 230, 0.25); }
.picker-row.fresh-mild .picker-row-action { color: var(--yellow); border-color: rgba(210, 153, 34, 0.25); }
.picker-row.fresh-cold .picker-row-action { color: var(--dim);    border-color: var(--border); }

.picker-row:hover:not(:disabled) .picker-row-action {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(92, 225, 230, 0.08);
}
.picker-row.is-added .picker-row-action {
    color: var(--green);
    border-color: rgba(63, 185, 80, 0.35);
    background: rgba(63, 185, 80, 0.08);
}

.picker-badge {
    font-family: var(--mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid var(--border-2);
    color: var(--muted);
    background: var(--panel-2);
}
.picker-badge.muted { color: var(--dim); }

.picker-empty,
.picker-error {
    padding: 24px 16px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    font-family: var(--mono);
}
.picker-error { color: var(--red); }

/* ----- Manual entry fallback (add-repo modal) ----- */

.ar-manual {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--panel-2);
}
.ar-manual > summary {
    list-style: none;
    cursor: pointer;
    padding: 10px 12px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    user-select: none;
}
.ar-manual > summary::-webkit-details-marker { display: none; }
.ar-manual > summary::before {
    content: '▸ ';
    color: var(--dim);
}
.ar-manual[open] > summary::before { content: '▾ '; }
.ar-manual > summary:hover { color: var(--text); }
.ar-manual-body {
    padding: 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}
.ar-manual-body .btn { align-self: flex-start; }

/* ----- Toast ----- */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    font-size: 13px;
    z-index: 100;
}
.toast.error { border-color: var(--red); color: var(--red); }
.toast.ok    { border-color: var(--green); }

/* ----- Responsive ----- */

@media (max-width: 820px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar {
        position: relative;
        height: auto;
        min-height: 0;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .sidebar-section { max-height: 220px; }
    .content { padding: 20px 16px 60px; }
    .page-head { flex-direction: column; align-items: stretch; }
    .page-actions { width: 100%; }
}
