/* Line Call — PR Intelligence */

/* ── Brand palette ── */
:root {
    --brand-teal: #01DFCB;
    --brand-teal-dark: #00b8a6;
    --brand-teal-light: #e6faf8;
    --brand-warm: #A29B95;
    --brand-warm-light: #d5d1cd;
    --brand-warm-dark: #7a746f;
    --brand-white: #FFFFFF;
    --brand-charcoal: #2c2c2c;
    --brand-slate: #4a4a4a;
    --bg-page: #f4f5f7;
    --bg-card: #ffffff;
    --border-light: #e5e3e0;
    --text-primary: #2c2c2c;
    --text-secondary: #6b6560;
    --text-muted: #A29B95;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-page);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--brand-teal-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

main {
    flex: 1;
    width: 100%;
}

body.authenticated {
    background:
        radial-gradient(ellipse 80% 60% at 80% 10%, rgba(1, 223, 203, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 70% 50% at 50% 30%, rgba(100, 160, 240, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 20% 80%, rgba(180, 160, 220, 0.10) 0%, transparent 50%),
        var(--bg-page);
    background-attachment: fixed;
}

.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
header {
    background: var(--brand-charcoal);
    color: var(--brand-white);
    padding: 1rem 0;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header .brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--brand-white);
}

header .brand img {
    height: 32px;
    width: 32px;
    filter: invert(1);
}

.header-center {
    display: flex;
    justify-content: center;
    width: 100%;
}

header h1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

h1.brand-name {
    font-family: 'Anton', sans-serif;
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

header nav a {
    color: var(--brand-warm-light);
    text-decoration: none;
    font-size: 0.9rem;
}

header nav a:hover {
    color: var(--brand-teal);
}

.nav-logout {
    background: none;
    border: none;
    color: var(--brand-warm-light);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
}

.nav-logout:hover {
    color: var(--brand-teal);
}

.nav-user-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Settings tabs */
.settings-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-light);
    margin: 1.5rem 0 0;
}

.settings-tab {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}

.settings-tab:hover {
    color: var(--brand-teal-dark);
    text-decoration: none;
}

.settings-tab.active {
    color: var(--brand-teal-dark);
    border-bottom-color: var(--brand-teal);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Hero */
.hero {
    text-align: center;
    padding: 2.5rem 0 1.5rem;
}

.hero h2 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
}

.hero p {
    color: var(--text-secondary);
    margin: 0;
}

/* Form */
.check-form {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.check-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.check-form .hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.input-row {
    display: flex;
    gap: 0.5rem;
}

.input-row input[type="url"],
.check-form > form > input[type="url"] {
    flex: 1;
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--brand-warm-light);
    border-radius: 6px;
    font-size: 0.95rem;
}

.input-row input[type="url"]:focus,
.check-form > form > input[type="url"]:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 2px rgba(1, 223, 203, 0.2);
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: var(--brand-teal);
    color: var(--brand-charcoal);
}

.btn-primary:hover {
    background: var(--brand-teal-dark);
}

/* Error message */
.error-msg {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Success message */
.success-msg {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Risk badges */
.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-green {
    background: #dcfce7;
    color: #166534;
}

.badge-amber {
    background: #fef9c3;
    color: #854d0e;
}

.badge-red {
    background: #fee2e2;
    color: #991b1b;
}

.badge-muted {
    background: #e5e7eb;
    color: #6b7280;
}

.text-risk-green { color: #166534 !important; }
.text-risk-amber { color: #854d0e !important; }
.text-risk-red   { color: #991b1b !important; }

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

th, td {
    text-align: left;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border-light);
}

th {
    background: #f8f7f6;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

td {
    font-size: 0.78rem;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: #f8f7f6;
}

.table-clickable tbody tr {
    cursor: pointer;
}
.table-clickable tbody tr:hover {
    background: #f0eeec;
}

/* Section jump nav */
.section-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-nav a {
    font-size: 0.85rem;
}

/* Section headings */
.section-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin: 2rem 0 0.8rem;
}

/* Review detail card */
.card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.card h3 {
    margin: 0 0 0.8rem;
    font-size: 1.1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--brand-teal);
}

.card h3 .badge {
    margin-left: 0.4rem;
}

.card-subsection-heading {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 1.2rem 0 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.card-subsection-heading:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* Review hero card */
.review-hero {
    padding: 1.5rem 1.5rem 1rem;
}

.review-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.review-hero-top .text-muted {
    margin-left: auto;
    font-size: 0.75rem;
}

.review-hero-title {
    margin: 0 0 0.4rem;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.review-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.review-hero-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 0.5rem;
    color: var(--brand-warm-light);
}

.review-hero-summary {
    margin: 0.8rem 0 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.review-hero-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.review-hero-stat {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.review-hero-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.feedback-icon {
    font-size: .9em;
    opacity: 0.7;
    cursor: help;
}

.review-hero-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.review-hero-release {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.review-hero-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}


.review-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.review-meta span {
    margin-right: 1rem;
}

/* Lists */
.card ul {
    margin: 0;
    padding-left: 1.2rem;
}

.card li {
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

/* Pending / pulse animation */
.pending-status {
    text-align: center;
    padding: 3rem 1rem;
}

.pending-status h2 {
    margin-bottom: 0.5rem;
}


.pulse {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--brand-teal);
    animation: pulse-anim 1.5s ease-in-out infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

@keyframes pulse-anim {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* Review card list (landing page) */
a.review-card {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 0.75rem;
    transition: box-shadow 0.15s;
}

a.review-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.check-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.check-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot-green { background-color: #2da44e; }
.dot-red { background-color: #cf222e; }
.dot-amber { background-color: #bf8700; }
.dot-grey { background-color: var(--brand-warm-light); }


/* Metadata tables (key-value pairs) */
.meta-table {
    box-shadow: none;
}

.meta-table td {
    padding: 0.4rem 0.8rem;
}

.meta-label {
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    width: 1%;
}

/* Pre-wrapped text */
.pre-wrap {
    white-space: pre-wrap;
    word-break: break-word;
}

/* Utility */
.text-muted {
    color: var(--text-muted);
}

.text-small {
    font-size: 0.8rem;
}

code {
    background: #eeedeb;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-size: 0.85em;
}

code.file-ref {
    font-size: 0.85em;
    margin-right: 0.3em;
}

.text-right {
    text-align: right;
}

.text-added {
    color: #0d7d6c;
}

.text-removed {
    color: #991b1b;
}

.mt-1 { margin-top: 1rem; }

.nav-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    color: var(--brand-charcoal);
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
}

.nav-avatar:hover {
    background: var(--brand-teal);
    color: var(--brand-charcoal);
    text-decoration: none;
}

/* Login page */
.login-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.36;
    z-index: -1;
}

.login-card {
    max-width: 380px;
    margin: 3rem auto;
    background: var(--bg-card);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.login-card h2 {
    margin: 0 0 1.2rem;
    font-size: 1.3rem;
    text-align: center;
}

.login-card .error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 0.5rem 0.8rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

.bb-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.7rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--brand-teal);
    color: var(--brand-charcoal);
    text-decoration: none;
    transition: background 0.15s;
}

.bb-login-btn:hover {
    background: var(--brand-teal-dark);
}

.login-hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.6rem 0 0;
}


/* Settings pages */
.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0 1.2rem;
}

.settings-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.settings-header .btn {
    text-decoration: none;
}

.clickable-row {
    cursor: pointer;
}

.status-icon {
    font-size: 1.1rem;
    font-weight: 700;
}

.status-check {
    color: #2da44e;
}

.status-x {
    color: #cf222e;
}

/* Coming soon placeholder */
.coming-soon {
    text-align: center;
    padding: 4rem 1rem;
}

.coming-soon h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

.delete-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.danger-zone-heading {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #991b1b;
    margin: 0 0 0.8rem;
}

.btn-small {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
}

.btn-secondary {
    background: #e5e3e0;
    color: var(--brand-slate);
}

.btn-secondary:hover {
    background: var(--brand-warm-light);
}

.btn-danger {
    background: #fee2e2;
    color: #991b1b;
}

.btn-danger:hover {
    background: #fecaca;
}

.inline-form {
    display: inline;
}

/* Form styles */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--brand-warm-light);
    border-radius: 6px;
    font-size: 0.95rem;
    background: var(--bg-card);
}

.form-group textarea {
    font-family: inherit;
    resize: vertical;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 2px rgba(1, 223, 203, 0.2);
}

.check-form textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--brand-warm-light);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    background: var(--bg-card);
}

.check-form textarea:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 2px rgba(1, 223, 203, 0.2);
}

.form-group input[type="date"] {
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--brand-warm-light);
    border-radius: 6px;
    font-size: 0.95rem;
    background: var(--bg-card);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 2px rgba(1, 223, 203, 0.2);
}

.form-group .hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--brand-teal);
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.form-actions .btn {
    text-decoration: none;
}

.copy-btn {
    position: relative;
    background: none;
    border: 1px solid var(--brand-warm-light);
    border-radius: 4px;
    cursor: pointer;
    padding: 0.25rem 0.35rem;
    margin-left: 0.3rem;
    color: var(--text-secondary);
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.copy-btn img {
    width: 16px;
    height: 16px;
}

.copy-btn:hover {
    background: #eeedeb;
    border-color: var(--brand-warm);
}

.copy-btn .copy-toast {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand-charcoal);
    color: var(--brand-white);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    animation: copy-toast-fade 1.5s ease-out forwards;
}

.copy-btn .copy-toast::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--brand-charcoal);
}

@keyframes copy-toast-fade {
    0%, 60% { opacity: 1; }
    100% { opacity: 0; }
}

/* Filter bar (landing page) */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-right: 0.2rem;
}

.filter-pill {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    background: var(--bg-card);
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.filter-pill:hover {
    border-color: var(--brand-teal);
    color: var(--brand-teal-dark);
}

.filter-pill.active {
    background: var(--brand-teal);
    border-color: var(--brand-teal);
    color: var(--brand-charcoal);
    font-weight: 600;
}

.filter-select {
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 2px rgba(1, 223, 203, 0.2);
}

/* Search card */
.search-card {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.search-input-wrap {
    position: relative;
    flex: 1;
}

.search-input-wrap input[type="text"] {
    width: 100%;
    padding: 0.6rem 0.8rem;
    padding-right: 2rem;
    border: 1px solid var(--brand-warm-light);
    border-radius: 6px;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.search-input-wrap input[type="text"]:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 2px rgba(1, 223, 203, 0.2);
}

.search-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 0.2rem;
    line-height: 1;
}

.search-clear:hover {
    color: var(--text-primary);
}

/* New reviews notification banner */
.new-reviews-banner {
    background: var(--brand-charcoal);
    border-bottom: 2px solid var(--brand-teal);
    padding: 0.6rem 0;
    color: var(--brand-white);
    font-size: 0.9rem;
    animation: banner-slide-in 0.3s ease-out;
}

.banner-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.banner-inner span {
    flex: 1;
}

.banner-dismiss {
    background: none;
    border: none;
    color: var(--brand-warm-light);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 0.2rem;
    line-height: 1;
}

.banner-dismiss:hover {
    color: var(--brand-white);
}

@keyframes banner-slide-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* New-content separator (after banner-triggered refresh) */
.new-content-separator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem 0;
    font-size: 0.75rem;
    color: var(--brand-warm-light);
    letter-spacing: 0.03em;
    animation: separator-fade-in 0.4s ease-out;
}

.new-content-separator::before,
.new-content-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--brand-warm-light);
    opacity: 0.4;
}

@keyframes separator-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Inline button spinner */
.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: scroll-spin 0.7s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

/* Infinite scroll sentinel & spinner */
.scroll-sentinel {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.scroll-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border-light);
    border-top-color: var(--brand-teal);
    border-radius: 50%;
    animation: scroll-spin 0.7s linear infinite;
}

@keyframes scroll-spin {
    to { transform: rotate(360deg); }
}

/* Profile & Token management */
.token-success-card {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #166534;
}

.token-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    background: #fff;
    border: 1px solid #bbf7d0;
    border-radius: 4px;
    padding: 0.5rem 0.8rem;
}

.token-display code {
    flex: 1;
    background: none;
    padding: 0;
    font-size: 0.85rem;
    word-break: break-all;
}

.token-create-form {
    margin-top: 0.8rem;
}

.token-create-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.token-name-input {
    flex: 1;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--brand-warm-light);
    border-radius: 6px;
    font-size: 0.9rem;
}

.token-name-input:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 2px rgba(1, 223, 203, 0.2);
}

/* API docs on profile page */
.api-docs ul {
    margin: 0.3rem 0 0;
    padding-left: 1.2rem;
}

.api-docs li {
    margin-bottom: 0.2rem;
}

.api-endpoint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.api-method {
    display: inline-block;
    background: var(--brand-teal-light);
    color: var(--brand-teal-dark);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.api-example {
    background: var(--brand-charcoal);
    color: #e0e0e0;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    overflow-x: auto;
    line-height: 1.5;
}

/* Review card link (merged dashboard) */
a.review-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

a.review-card-link:hover {
    text-decoration: none;
}

/* Kebab dropdown menu */
.kebab-menu {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
}

.kebab-btn {
    background: none;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.1rem 0.4rem;
    color: var(--text-muted);
    line-height: 1;
}

.kebab-btn:hover {
    background: #eeedeb;
    border-color: var(--border-light);
    color: var(--text-secondary);
}

.kebab-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    min-width: 200px;
    padding: 0.4rem;
}

.kebab-menu.open .kebab-dropdown {
    display: block;
}

.kebab-item {
    display: block;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 0.5rem 0.6rem;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 4px;
    color: var(--text-primary);
}

.kebab-item:hover {
    background: #f4f5f7;
}

.kebab-item-danger {
    color: #991b1b;
}

.kebab-item-danger:hover {
    background: #fef2f2;
}

.kebab-notes-input {
    display: block;
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.kebab-notes-input:focus {
    outline: none;
    border-color: var(--brand-teal);
}

.regression-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.6rem;
    font-size: 0.85rem;
}

.regression-form .filter-pill {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
}

.regression-form .btn-small {
    align-self: flex-start;
}

.regression-form-notes {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--brand-warm-light);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    resize: vertical;
    background: var(--bg-card);
}

.regression-form-notes:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 2px rgba(1, 223, 203, 0.2);
}

.regression-form-select {
    flex: 1;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--brand-warm-light);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    background: var(--bg-card);
}

.regression-form-select:focus {
    outline: none;
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 2px rgba(1, 223, 203, 0.2);
}

.regression-notes {
    margin: 0.3rem 0 0;
    font-style: italic;
}

.regression-row {
    background: #fef2f2;
}

.regression-card {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.regression-card h3 {
    color: #991b1b;
    border-bottom-color: #f87171;
}

/* Visually hidden (accessible radio inputs) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.sr-only:checked + .filter-pill {
    background: var(--brand-teal);
    border-color: var(--brand-teal);
    color: var(--brand-charcoal);
    font-weight: 600;
}

.filter-group label.filter-pill {
    cursor: pointer;
}

/* Tier distribution boxes */
.tier-box-row {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
}

.tier-box {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

.box-green { background-color: #2da44e; }

.tier-badge-row {
    display: inline-flex;
    gap: 0.25rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}
.box-amber { background-color: #e3b341; }
.box-red { background-color: #cf222e; }

/* Badge small variant */
.badge-small {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
}

/* Merged dashboard table */
.merged-table {
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 1.5rem;
}

.merged-table th {
    padding: 0.4rem 0.5rem;
    white-space: nowrap;
}

.merged-table td {
    padding: 0.4rem 0.5rem;
    vertical-align: middle;
}

.merged-row {
    cursor: pointer;
}

.merged-repo-name {
    font-weight: 600;
}

.merged-col-summary {
    max-width: 300px;
}

.merged-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 280px;
    margin-right: 0.3rem;
    line-height: 1.3;
}

.merged-col-summary .badge {
    vertical-align: middle;
    margin-right: 0.15rem;
}

/* Import merges */
.import-row-muted { opacity: 0.5; }
.import-status-new { color: #22c55e; font-weight: 600; font-size: 0.75rem; white-space: nowrap; }
.import-status-muted { color: #6b7280; font-weight: 600; font-size: 0.75rem; white-space: nowrap; }
.badge-release { background: #6366f1; color: #fff; font-size: 0.7rem; }
.import-progress-bar { background: #e5e7eb; border-radius: 4px; height: 12px; margin: 0.75rem 0; overflow: hidden; }
.import-progress-bar.active {
    background: linear-gradient(90deg, #e5e7eb 0%, #d1d5db 50%, #e5e7eb 100%);
    background-size: 200% 100%;
    animation: progress-shimmer 2.5s ease-in-out infinite;
}
.import-progress-fill { background: #22c55e; height: 100%; transition: width 0.3s ease; }
@keyframes progress-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.text-danger { color: #ef4444; }
.text-success { color: #22c55e; }
/* Feedback history */
.feedback-text {
    white-space: pre-wrap;
    font-family: inherit;
    background: var(--bg-page);
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin: 0;
}

.feedback-round + .feedback-round {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.feedback-round h4 {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
}

/* Job count cards */
.job-counts-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.job-count-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-card);
    border-radius: 8px;
    padding: 1rem 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.job-count-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.job-count-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.job-count-sub {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }

/* Chart containers */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-tooltip {
    position: absolute;
    padding: 20px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 20;
}

.chart-tooltip-inner {
    background: var(--brand-charcoal);
    color: var(--brand-white);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
    line-height: 1.5;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.chart-tooltip-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.chart-tooltip-row {
    color: #ccc;
}

.chart-tooltip-row .badge {
    font-size: 0.65rem;
    vertical-align: middle;
}

.chart-tooltip-link {
    margin-top: 0.3rem;
    color: var(--brand-teal);
    font-size: 0.75rem;
}

/* Stat cards (system analytics) */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-card);
    border-radius: 8px;
    padding: 1rem 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.stat-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

th.sortable { user-select: none; }
th.sortable::after { content: ' \2195'; opacity: 0.3; }
th.sort-asc::after { content: ' \2191'; opacity: 1; }
th.sort-desc::after { content: ' \2193'; opacity: 1; }

@media (max-width: 600px) {
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}
