/* static/css/style.css */

/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Palette */
    --bg-body: linear-gradient(to bottom, #ffffff, #f3f4f6);
    --bg-surface: #ffffff;
    --bg-subtle: #f9fafb;
    --bg-hover: #e5e7eb;

    --border: #d1d5db;
    --text-main: #374151;
    --text-muted: #6b7280;

    /* Actions */
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --success: #22c55e;
    --success-hover: #16a34a;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #facc15;
    --warning-hover: #eab308;
    --info: #a855f7;
    --info-hover: #9333ea;

    /* Status Colors */
    --status-success-bg: #d1fae5;
    --status-error-bg: #fee2e2;
    --status-warning-bg: #fef9c3;
    --status-neutral-bg: #f3f4f6;
    --status-critical-bg: #fecaca;
    --status-process-bg: #dbeafe;
    --status-cancelled-bg: #ede9fe;
    --status-selected-bg: #bfdbfe;

    /* Dimensions */
    --radius: 4px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

:focus-visible {
    outline: 1px solid rgb(191, 191, 191);
}

html {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    padding: 0;
    background: var(--bg-body);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--text-main);
}

/* Typography - Underlines REMOVED */
h1,
h2,
h3,
h4 {
    margin-top: 12px;
    padding-bottom: 6px;
    font-weight: 600;
    line-height: 1.2;
    display: block;
    text-decoration: none !important;
    border-bottom: none !important;
}

h1 {
    font-size: 28px;
}

h3 {
    font-size: 20px;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* =========================================
   2. LAYOUT & UTILITIES
   ========================================= */
/* Main Card Container */
.container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background: var(--bg-surface);
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.05);
}

.separator {
    border: none;
    border-bottom: 1px solid var(--border);
    margin: 14px 0;
}

.hidden,
.hidden-stream-value {
    display: none !important;
}

.flex-1 {
    flex: 1;
}

.flex-gap-12 {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.form-control {
    min-height: 36px;
    height: auto;
}

.flex-column-gap-8 {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================
   3. COMPONENTS
   ========================================= */

/* --- Buttons --- */
button,
.btn {
    border: none;
    border-radius: var(--radius);
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 80px;
    height: 36px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

/* Button Variants */
.blue-btn {
    background-color: var(--primary);
}

.blue-btn:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.green-btn {
    background-color: var(--success);
}

.green-btn:hover:not(:disabled) {
    background-color: var(--success-hover);
}

.red-btn {
    background-color: var(--danger);
}

.red-btn:hover:not(:disabled) {
    background-color: var(--danger-hover);
}

.purple-btn {
    background-color: var(--info);
}

.purple-btn:hover:not(:disabled) {
    background-color: var(--info-hover);
}

.yellow-btn {
    background-color: var(--warning);
    color: #854d0e;
    margin-left: 12px;
    margin-right: 4px;
}

.yellow-btn:hover:not(:disabled) {
    background-color: var(--warning-hover);
}

.grey-btn {
    background-color: var(--bg-hover);
    color: var(--text-main);
    margin-right: 4px;
}

.grey-btn:hover:not(:disabled) {
    background-color: var(--border);
}

.btn-icon {
    min-width: 36px !important;
    width: 36px;
    padding: 0;
    font-size: 1.2rem;
    line-height: 1;
}

/* --- Forms --- */

/* Prevents layout reflow caused by User Agent font switching on disabled elements */
.form-control:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    font-family: inherit;
}

.form-control,
.form-group input,
.form-group select {
    flex: 1;
    min-width: 0;
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: white;
    height: 36px;
    color: inherit;
}

.form-group.preset-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.inline-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inline-form-group>label {
    margin-top: 4px;
}

.inline-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inline-input-row .form-control {
    flex: 1;
}

.query-section {
    display: grid;
    grid-template-columns: max-content 1fr auto auto;
    column-gap: 8px;
    row-gap: 12px;
    align-items: center;
    padding-top: 8px;
    grid-auto-rows: 36px;
    /* Add this line to lock row height */
}

.query-section>* {
    height: 36px;
    align-self: stretch;
}

.query-row,
.query-row-bottom {
    display: contents;
}

.query-cell {
    display: flex;
    align-items: center;
    height: 36px;
    min-height: 36px;
}

.query-section>label {
    justify-self: end;
    white-space: nowrap;
}

.query-row {
    margin-bottom: 12px;
}

.query-row select.form-control {
    flex: 2;
}

.query-row .series-id {
    flex: 0 0 80px;
}

.query-row-bottom>button {
    grid-column: -2 / -1;
}

.query-row-bottom>select.form-control {
    grid-column: 2 / -2;
}

.query-row-bottom>* {
    height: 36px;
}

.query-section input.form-control,
.query-section select.form-control {
    width: 100%;
    min-width: 0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

#job-filter-select,
#log-filter-select,
.form-group select.fixed-width {
    flex: 0 0 110px;
    width: 110px;
    max-width: 110px;
}

input.unverified {
    background-color: #fff9db !important;
    border-color: #eab308 !important;
}

#job-status-controls,
#job-date-controls,
#log-level-controls,
#log-date-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-width: 0;
}

.operator-group {
    display: none;
    align-items: center;
    gap: 8px;
}

.operator-group select {
    width: 60px;
    min-width: 60px;
    padding: 0 4px;
    text-align: center;
}

.tabs {
    display: flex;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: -1px;
    position: relative;
    z-index: 10;
}

.tab-button.active {
    background: var(--bg-surface);
    color: var(--text-main);
    font-weight: 600;
    border: 1px solid var(--border);
    border-bottom-color: var(--bg-surface);

    z-index: 11;
}

.container.tab-connected {
    margin-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: var(--radius);
    position: relative;
    z-index: 9;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-button {
    padding: 8px 16px;
    background: transparent;
    cursor: pointer;
    margin-right: 4px;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    color: var(--text-muted);
    margin-bottom: -1px;
    /* Key to joining the container below */
    position: relative;
}

.tab-button:hover {
    color: var(--text-main);
    background-color: var(--bg-hover);
}

.tab-button.active {
    background: var(--bg-surface);
    color: var(--text-main);
    font-weight: 600;
    border-color: var(--border);
    border-bottom-color: var(--bg-surface);
    /* Erases the line */
    z-index: 1;
}

/* --- Toggles & Progress --- */
.toggle-button {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 0.5rem;
    color: var(--primary) !important;
    height: auto !important;
    min-width: 0 !important;
    display: inline-block !important;
    text-align: left;
}

.toggle-button:hover {
    text-decoration: underline;
    background: none !important;
}

.toggle-content {
    display: none;
    margin-top: 0.5rem;
}

.spinner-sm {
    width: 14px;
    height: 14px;
    border: 2px solid;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Job Progress Bars */
.jobs-progress-container {
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background-color: #f4f4f4;
    border-radius: 8px;
}


.job-progress-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 0.5rem;
}

.jobs-progress-container h4 {
    margin-top: 0;
    margin-bottom: 8px;
    padding-bottom: 0;
}

#jobs-progress-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    height: 85px;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 2em;
}

#jobs-progress-list li {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9em;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 12px;
}

.progress-bar-background {
    flex: 1;
    height: 16px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s;
}

.progress-controls {
    display: flex;
    gap: 8px;
    cursor: pointer;
}

.job-stop {
    color: var(--danger);
}

/* =========================================
   4. VIEWS & MODULES
   ========================================= */

/* --- Page Header --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: none;
    margin: 0px;
}

.page-header-modal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 12px 0;
    padding: 0;
}

.page-header-modal>h3 {
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

.page-header-tight {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 0;
}

.page-header-tight h1 {
    margin: 0;
    line-height: 1.2;
}

.page-header-actions {
    display: flex;
    gap: 8px;
}

.page-header-actions button {
    margin-left: 0 !important;
}

/* --- Containers (Inner Lists) --- */
.job-list-container,
.log-list-container,
.add-tag-list-container {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: white;
}

/* Fixed heights for scrolling areas */
.job-list-container {
    height: 272px;
}

.log-list-container {
    height: 400px;
    margin-top: 6px;
}

.add-tag-list-container {
    height: 250px;
    margin-bottom: 12px;
}

/* --- Tag List View --- */
.tag-list-container {
    height: 210px;
    overflow-y: auto;
    margin-bottom: 15px;
}

#tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
}

#tag-list li {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    width: calc(33.3333% - 6px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--bg-subtle);
    font-size: small;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#tag-list li.selected-tag {
    background-color: #60a5fa !important;
    color: white;
    border-color: var(--primary);
}

#tag-list li:not(.no-tags-found)::before {
    content: "🏷️";
    margin-right: 0px;
}

#tag-list li span {
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    user-select: none;
}

#tag-list li.no-tags-found {
    width: 100%;
    color: var(--text-muted);
    background: transparent;
    cursor: default;
    opacity: 0.5;
}

.tag-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.tag-actions input {
    flex: 1;
}

/* --- Tag Settings View --- */

.tag-settings-container h4 {
    margin-bottom: 0px;
}

.settings-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-bottom: 6px;
}

.settings-header-wrapper h3 {
    margin: 0;
    padding: 0;
    border: none !important;
}

.settings-id-badge {
    font-size: 1rem;
    padding: 4px 10px;
    color: var(--text-muted);
    font-family: monospace;
    background-color: var(--bg-subtle);
    border-radius: 4px;
    border: 1px solid var(--border);
    min-width: 110px;
    text-align: center;
    display: inline-block;
    box-sizing: border-box;
}

.settings-status-badge {
    font-size: 1rem;
    padding: 4px 10px;
    font-family: monospace;
    border-radius: 4px;
    border: 1px solid var(--border);
    margin-right: 8px;
    font-weight: 600;
    min-width: 200px;
    text-align: center;
    display: inline-block;
    box-sizing: border-box;
}

.status-continuing {
    background-color: var(--status-success-bg);
    color: var(--success-hover);
    border-color: var(--success);
}

.status-ended {
    background-color: var(--status-error-bg);
    color: var(--danger-hover);
    border-color: var(--danger);
}

.status-upcoming {
    background-color: var(--status-process-bg);
    color: var(--primary-hover);
    border-color: var(--primary);
}

.status-fetching {
    background-color: var(--status-process-bg);
    color: var(--primary);
    border-color: var(--primary);
    font-style: italic;
}

.status-unknown {
    background-color: var(--bg-subtle);
    color: var(--text-muted);
    border-color: var(--border);
}

/* --- Lists: Headers & Rows Shared --- */
.job-header-row,
.log-header-row,
.add-tag-header-row,
#job-list li.job-entry,
#log-list li.log-entry,
#add-tag-list li,
.no-jobs-found,
.no-logs-found {
    display: flex;
    align-items: center;
    padding: 8px 12px;
}

.job-header-row,
.log-header-row,
.add-tag-header-row {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: var(--bg-hover);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

#tag-list li,
#job-list li.job-entry,
#log-list li.log-entry,
#add-tag-list li {
    transition: background-color 0.08s ease-in-out, outline-color 0.15s ease-in-out, filter 0.08s ease-in-out;
    outline: 2px solid transparent;
    outline-offset: -2px;
    scroll-margin: 40px;
    cursor: pointer;
}

#tag-list li:hover,
#job-list li.job-entry:hover,
#log-list li.log-entry:hover,
#add-tag-list li:hover {
    filter: brightness(0.95);
}

#job-list:focus,
#log-list:focus,
#add-tag-list:focus {
    outline: none;
}

li.selected {
    outline-color: var(--primary);
    background-color: var(--status-selected-bg) !important;
}

li.selected:not([class*="status-"]) {
    background-color: var(--status-selected-bg) !important;
}

/* --- Columns --- */
.col {
    flex: 1;
    min-width: 0;
    padding: 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.col.job-id {
    flex: 0.25;
    min-width: 4em;
}

.col.job-tag-name {
    flex: 1.75;
}

.col.job-status {
    flex: 1.2;
}

.col.job-added,
.col.job-started,
.col.job-completed {
    flex: 1.5;
}

.col.log-timestamp {
    flex: 0 0 140px;
}

.col.log-level {
    flex: 0 0 80px;
}

.col.log-job,
.col.log-pid {
    flex: 0 0 80px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.col.log-message {
    flex: 1 1 auto;
}

.col.add-tag-col-name {
    flex: 2;
}

.col.add-tag-col-size,
.col.add-tag-col-num {
    flex: 0 0 100px;
}

.col.add-tag-col-num {
    text-align: right;
}

/* --- Status Colors --- */
.status-complete,
.level-info {
    background-color: var(--status-success-bg) !important;
}

.status-failed,
.level-error {
    background-color: var(--status-error-bg) !important;
}

.status-pending,
.level-warning {
    background-color: var(--status-warning-bg) !important;
}

.level-debug {
    background-color: var(--status-neutral-bg) !important;
}

.level-critical {
    background-color: var(--status-critical-bg) !important;
}

.status-processing {
    background-color: var(--status-process-bg) !important;
}

.status-cancelled {
    background-color: var(--status-cancelled-bg) !important;
}

/* --- Details & Pagination --- */
.pagination {
    display: grid;
    grid-template-columns: 30px minmax(100px, auto) 30px;
    gap: 4px;
    justify-content: center;
    margin-top: 12px;
}

.pagination button {
    width: 100%;
    min-width: 0;
    height: 30px;
    padding: 0;
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
    user-select: none;
}

.pagination-info {
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: pre;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
}

.job-detail-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.job-detail-key {
    min-width: 130px;
    font-weight: 500;
}

.detail-field {
    flex: 1;
    min-width: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.log-details-container {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.log-details-content {
    background-color: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    overflow-y: auto;
    height: 15em;
    line-height: 1.4;
    user-select: text;
    color: var(--text-main);
    margin-top: 8px;
}

.json-row {
    margin-bottom: 0.15rem;
}

.json-key {
    font-weight: 500;
}

/* =========================================
   HELP MODAL (GLOBAL)
   ========================================= */

.tag-help-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tag-help-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.tag-help-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tag-help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
}

.tag-help-body {
    padding: 20px;
    padding-top: 0;
}

.tag-help-body code {
    padding: 0 4px;
    background: var(--bg-hover);
    border-radius: 3px;
    font-family: monospace;
}

.tag-help-body>section> :first-child {
    margin-top: 0;
}

/* Edit tag RSS row */
.edit-tag-settings-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.edit-tag-settings-span-3 {
    grid-column: span 3;
}

.edit-tag-settings-grid>.inline-form-group {
    min-width: 0;
}

/* Create job */
.create-job-container .preset-row {
    margin-top: 12px;
}

.create-job-container h4 {
    margin-bottom: 0px;
}

/* --- Browser --- */

/* --- Overlay & Layout --- */
.browser-modal {
    position: fixed;
    inset: 0;
    z-index: 30000;

    display: flex;
    justify-content: center;
    align-items: center;
}

.browser-modal.hidden {
    display: none !important;
}

.browser-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.browser-content {
    position: relative;
    z-index: 1;
    width: 600px;
    max-width: 95vw;
    height: 80vh;
    /* Fixed height for browser */
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.browser-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 15px;
}

/* --- Breadcrumbs --- */
.browser-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    font-size: 0.9rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    line-height: 1;
}

.browser-path-label {
    color: var(--text-muted);
    font-weight: 600;
    user-select: none;
    -webkit-user-select: none;
    white-space: nowrap;
}

.browser-path-text {
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- List Area --- */
.browser-list-container {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-surface);
    overflow: hidden;
    /* Contains scroll */
    margin-bottom: 15px;
}

.browser-list {
    height: 100%;
    overflow-y: auto;
}

/* --- Rows --- */
.browser-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--bg-subtle);
    font-size: 0.95rem;
    user-select: none;
    transition: background-color 0.1s;
}

.browser-entry:hover {
    background-color: var(--bg-hover);
}

.browser-entry.selected {
    background-color: var(--status-selected-bg);
    border-left: 4px solid var(--primary);
    padding-left: 8px;
}

.browser-entry.disabled {
    opacity: 0.5;
    cursor: default;
}

.browser-entry.disabled:hover {
    background-color: transparent;
}

.browser-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.browser-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Footer --- */
.browser-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 36px;
}

.browser-footer-row .form-actions {
    margin-top: 0;
}

.browser-status {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
}

/* ==============================
   Unified selection indicator
   ============================== */
#add-tag-list li.add-tag-search-row,
#job-list li.job-entry,
#log-list li.log-entry,
#tag-list li {
    border-left: 4px solid transparent;
    padding-left: 8px;
}

#add-tag-list li.add-tag-search-row.selected,
#job-list li.job-entry.selected,
#log-list li.log-entry.selected,
#tag-list li.selected-tag {
    border-left-color: var(--primary);
}

#add-tag-list li {
    scroll-margin: 40px;
}