:root {
    --primary: #007AFF;
    --primary-hover: #0056b3;
    --bg-dark: #0a0a0c;
    --bg-card: #1c1c1e;
    --bg-sidebar: #161618;
    --text-main: #ffffff;
    --text-muted: #8e8e93;
    --border: #2c2c2e;
    --error: #ff453a;
    --success: #32d74b;
    --warning: #ffd60a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.dark-theme {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    height: 100vh;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.full-height {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Auth Cards */
.login-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.login-card .btn-primary {
    width: 100%;
}

.logo {
    width: 150px;
    margin-bottom: 24px;
}

.logo-small {
    width: 100px;
    margin-bottom: 20px;
}

h1,
h2,
h3 {
    margin-bottom: 20px;
    font-weight: 600;
}

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

input {
    width: 100%;
    background: #2c2c2e;
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 8px;
    color: white;
    font-size: 16px;
}

input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-primary {
    width: auto;
    min-width: 120px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 20px;
    font-size: 16px;
    font-family: 'PP Neue Montreal', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #333;
    color: white;
    border: 1px solid #444;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-family: 'PP Neue Montreal', sans-serif;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background: #444;
    color: #fff;
}

.btn-white {
    background: #ffffff;
    color: #000000;
    border: 1px solid #ffffff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-family: 'PP Neue Montreal', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-white:hover {
    background: #e0e0e0;
    border-color: #e0e0e0;
}

.btn-text {
    background: #333;
    color: white;
    border: 1px solid #444;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-family: 'PP Neue Montreal', sans-serif;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-text:hover {
    background: #444;
    color: #fff;
}

.error-msg {
    color: var(--error);
    font-size: 14px;
    margin-top: 16px;
}

/* Layout */
#mainView {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.nav-links {
    list-style: none;
    margin-top: 40px;
    flex-grow: 1;
}

.nav-links li {
    padding: 12px 16px;
    border-radius: 20px;
    margin-bottom: 8px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.nav-links li .icon {
    margin-right: 12px;
}

.nav-links li:hover,
.nav-links li.active {
    background: #2c2c2e;
    color: white;
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.user-display-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

.user-display-email {
    font-size: 12px;
    color: var(--text-muted);
}

.badge {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 20px;
    margin-left: 8px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.badge-super-admin {
    background: #ffffff;
    color: #000000;
    border: 1px solid #ffffff;
}

.badge-admin {
    background: transparent;
    color: #c0c0c0;
    /* Silver */
    border: 1px solid #333;
}

.content {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
}

/* Tables */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.table-container {
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    background: #2c2c2e;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

tr:hover td {
    background: #2c2c2e;
}

/* Overlays and Modals */
.overlay,
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.overlay.hidden,
.modal.hidden {
    display: none;
}

.overlay-content,
.modal-content {
    background: var(--bg-card);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 20px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Add/edit modals: scrollable body so header and footer buttons stay visible at small viewports */
.modal-content > header {
    flex-shrink: 0;
}

.modal-content > form {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-content > form > .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-content > form > .modal-actions {
    flex-shrink: 0;
    margin-top: 24px;
}

/* Modals without form (e.g. Assign Operator): scrollable body + fixed footer */
.modal-content > .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-content > .modal-actions {
    flex-shrink: 0;
    margin-top: 24px;
}

/* Log detail overlay: scrollable content so header and table stay within viewport */
.overlay-content {
    overflow: hidden;
}

.overlay-content > header {
    flex-shrink: 0;
}

.overlay-content > .table-container {
    flex: 1;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-content-wide {
    max-width: 1200px;
    width: 95vw;
    position: relative;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

#streamConfigModal .modal-content {
    padding-left: 32px;
    padding-right: 32px;
}
.stream-config-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
    padding-left: 0;
    padding-right: 0;
}
.stream-config-body > .stream-config-team-name {
    grid-column: 1 / -1;
    margin-bottom: 8px;
}
.stream-config-section {
    padding: 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border: 1px solid var(--border);
    min-width: 0;
}
.stream-config-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
@media (max-width: 640px) {
    .stream-config-body {
        grid-template-columns: 1fr;
    }
}

/* Assign Elements modal: constrain height so content scrolls and buttons stay visible */
#assignElementsModal .modal-content {
    max-height: 90vh;
    overflow: hidden;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}
#assignElementsModal .modal-content > header,
#assignElementsModal .modal-content > .form-group,
#assignElementsModal .modal-content > .modal-actions {
    flex-shrink: 0;
}
#assignElementsModal .assign-elements-two-col {
    flex: 1;
    min-height: 0;
    margin-bottom: 0;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    gap: 24px;
    align-items: stretch;
}
#assignElementsModal .assign-elements-left {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#assignElementsModal .assign-elements-left .assign-elements-list {
    flex: 1;
    min-height: 200px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
#assignElementsModal .assign-elements-right {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
    padding-bottom: 8px;
}
#assignElementsModal .assign-elements-right::-webkit-scrollbar {
    width: 8px;
}
#assignElementsModal .assign-elements-right::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
#assignElementsModal .modal-actions {
    flex-shrink: 0;
    margin-top: 16px;
    padding-top: 16px;
    background: var(--bg-card);
}

/* Assign Elements: two-column layout */
.assign-elements-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    min-height: 320px;
    margin-bottom: 24px;
}

.assign-elements-search-wrap {
    flex-shrink: 0;
    margin-bottom: 8px;
}
.assign-elements-search {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text-main);
}
.assign-elements-search::placeholder {
    color: var(--text-muted);
}
.assign-elements-search:focus {
    outline: none;
    border-color: var(--text-muted);
}

.assign-elements-col-label,
.assign-elements-phase-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.assign-elements-left {
    display: flex;
    flex-direction: column;
}

.assign-elements-list {
    flex: 1;
    min-height: 200px;
    max-height: 360px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.assign-elements-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.assign-elements-phase {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.assign-elements-dropzone {
    min-height: 60px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.15s, border-color 0.15s;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.assign-elements-dropzone.drag-over {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--text-muted);
}

.assign-elements-element-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    cursor: grab;
    font-size: 13px;
    color: var(--text-main);
    min-width: 0;
}
.assign-elements-element-card > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assign-elements-element-card:active {
    cursor: grabbing;
}

.assign-elements-element-card .card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.assign-elements-element-card .add-to-phase {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.assign-elements-element-card .add-to-phase:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.assign-elements-assigned-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-main);
    min-width: 0;
}
.assign-elements-assigned-item > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assign-elements-assigned-item .remove-element {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 6px;
    font-size: 14px;
    line-height: 1;
}

.assign-elements-assigned-item .remove-element:hover {
    color: var(--error);
}

.overlay-content {
    max-width: 1000px;
    /* Detail view is wider */
}

/* Log detail overlay: entries table scrolls, header stays visible */
#detailOverlay .overlay-content {
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
#detailOverlay .overlay-content > header {
    flex-shrink: 0;
}
#detailOverlay .overlay-content .table-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 12px;
}
#detailOverlay .overlay-content .table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
#detailOverlay .overlay-content .table-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
#detailOverlay #detailTable thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #2c2c2e;
    box-shadow: 0 1px 0 var(--border);
}

.overlay-content header,
.modal-content header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.overlay-content header,
.modal-content header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-right: 40px;
    /* Make room for the absolute close button */
}

.btn-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* Modal date/datetime inputs: dark calendar popup and app-consistent field */
.modal input[type="date"],
.modal input[type="datetime-local"] {
    color-scheme: dark;
    background: #2c2c2e;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 14px;
    padding: 0 36px 0 12px;
    height: 40px;
}

.modal input[type="date"]:focus,
.modal input[type="datetime-local"]:focus {
    outline: none;
    border-color: var(--primary);
}

.modal input[type="date"]::-webkit-datetime-edit,
.modal input[type="datetime-local"]::-webkit-datetime-edit {
    color: var(--text-main);
}

.modal input[type="date"]::-webkit-calendar-picker-indicator,
.modal input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.7;
    cursor: pointer;
}

/* Modal file input: match app theme (choose file button + field) */
.modal input[type="file"] {
    width: 100%;
    padding: 0;
    height: 40px;
    font-size: 14px;
    font-family: inherit;
    background: #2c2c2e;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
}

.modal input[type="file"]::file-selector-button,
.modal input[type="file"]::-webkit-file-upload-button {
    height: 40px;
    padding: 0 16px;
    margin: 0;
    margin-right: 12px;
    border: none;
    border-right: 1px solid var(--border);
    border-radius: 8px 0 0 8px;
    background: #333;
    color: var(--text-main);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.modal input[type="file"]::file-selector-button:hover,
.modal input[type="file"]::-webkit-file-upload-button:hover {
    background: #444;
}

.modal input[type="file"]:focus {
    outline: none;
    border-color: var(--primary);
}

.modal input[type="file"]:focus::file-selector-button,
.modal input[type="file"]:focus::-webkit-file-upload-button {
    border-color: var(--border);
}

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-group {
    position: relative;
    width: 240px;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.search-group input {
    padding-left: 36px;
    height: 40px;
}

.control-select {
    height: 40px;
    padding: 0 36px 0 12px;
    background: #2c2c2e;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    cursor: pointer;
}

.control-select:focus {
    outline: none;
    border-color: var(--primary);
}

.view-toggle {
    display: flex;
    background: #2c2c2e;
    border-radius: 8px;
    padding: 2px;
    border: 1px solid var(--border);
    height: 40px;
}

.view-toggle button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    /* Matches parent height minus padding */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.view-toggle button:hover {
    color: white;
}

.view-toggle button.active {
    background: #444;
    color: white;
}

/* Grid Layout */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.grid-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.grid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    border-color: #555;
    z-index: 1;
}

.card-preview {
    height: 160px;
    background: #111;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
}

.card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-preview .no-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.card-content {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.card-meta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #888;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.meta-row {
    display: flex;
    justify-content: space-between;
}

.card-actions {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
}

/* Teams card view */
.teams-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    border-color: #555;
    z-index: 1;
}

.team-card-logo-wrap {
    width: 100%;
    padding: 24px 20px 16px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border);
}

.team-card-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.team-card-logo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 24px;
    font-weight: 600;
}

.team-card-league {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.team-card-league img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.team-card-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin: 10px 16px 4px;
    line-height: 1.3;
    min-height: 2.6em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-card-short {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.team-card-actions {
    width: 100%;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.team-card-actions .btn-text {
    margin: 0;
}

/* Log Recipients */
.recipients-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.recipients-team-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.recipients-team-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-main);
}

.recipients-list {
    list-style: none;
    margin: 0 0 16px 0;
    padding: 0;
}

.recipients-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.recipients-list li:last-child {
    border-bottom: none;
}

.recipients-add-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.recipients-email-input {
    flex: 1;
    padding: 10px 12px;
    background: var(--bg-dark);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}

.recipients-email-input::placeholder {
    color: var(--text-muted);
}

.multi-select-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.multi-select-list label {
    margin-bottom: 0;
}

/* Sponsor rules: auto-assign by team / phase / date range */
.sponsor-rules-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sponsor-rule-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.sponsor-rule-row select.control-select {
    min-width: 140px;
    flex: 0 0 auto;
}

.sponsor-rule-row .sponsor-rule-phase.control-select {
    min-width: 110px;
}

/* Date inputs in sponsor rules: match control-select and app theme; dark calendar popup */
.sponsor-rule-row input[type="date"],
.sponsor-rule-row input[type="datetime-local"] {
    width: 140px;
    min-width: 0;
    flex: 0 0 auto;
    padding: 0 36px 0 12px;
    height: 40px;
    font-size: 14px;
    font-family: inherit;
    background: #2c2c2e;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    cursor: pointer;
    color-scheme: dark;
}

.sponsor-rule-row input[type="date"]:focus,
.sponsor-rule-row input[type="datetime-local"]:focus {
    outline: none;
    border-color: var(--primary);
}

/* Native date/datetime picker internal text and icon (WebKit/Blink) */
.sponsor-rule-row input[type="date"]::-webkit-datetime-edit,
.sponsor-rule-row input[type="datetime-local"]::-webkit-datetime-edit {
    color: var(--text-main);
}

.sponsor-rule-row input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.sponsor-rule-row input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

.sponsor-rule-row input[type="date"]::-webkit-calendar-picker-indicator,
.sponsor-rule-row input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.7;
    cursor: pointer;
    margin-left: 4px;
}

.sponsor-rule-row .btn-entire-season {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.sponsor-rule-row .btn-entire-season:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-main);
}

.sponsor-rule-row .sponsor-rule-times-label {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    margin: 0 2px;
}

.sponsor-rule-row .sponsor-rule-instances {
    width: 44px;
    min-width: 44px;
    padding: 8px 6px;
    height: 40px;
    font-size: 14px;
    text-align: center;
    background: #2c2c2e;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
}

.sponsor-rule-row .sponsor-rule-instances:focus {
    outline: none;
    border-color: var(--primary);
}

.sponsor-rule-row .remove-sponsor-rule {
    margin-left: auto;
    flex-shrink: 0;
}

.run-dates-cell .text-muted,
.run-dates-inline .text-muted {
    color: var(--text-muted);
}

/* Games header: team filter + view tabs + timezone */
.games-header-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.games-view-tabs {
    display: flex;
    gap: 4px;
}

.games-view-tabs button {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
}

.games-view-tabs button.active {
    background: #3a3a3c;
    color: var(--text-main);
    border-color: #48484a;
}

/* Calendar view */
.games-calendar-view {
    margin-top: 16px;
}

.calendar-month-nav,
.list-month-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}

.games-list-view .table-container {
    margin-top: 0;
}

.calendar-month-nav .btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.calendar-month-nav .btn-icon:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
}

.calendar-month-nav .btn-icon:active {
    background: rgba(255, 255, 255, 0.2);
}

.calendar-month-nav h3 {
    margin: 0;
    min-width: 180px;
    text-align: center;
}

.calendar-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-box {
    width: 14px;
    height: 14px;
    border-radius: 2px;
}

.legend-box.home {
    background: #ffffff;
    border: 1px solid #ddd;
}

.legend-box.away {
    background: transparent;
    border: 1px solid var(--border);
}

.calendar-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calendar-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

/* Header row: no border, no background, no square aspect — override .calendar-cell */
.calendar-cell.calendar-cell-header {
    aspect-ratio: auto;
    min-height: 0;
    padding: 4px;
    background: transparent !important;
    border: none !important;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    height: auto;
    overflow: visible;
}
.calendar-cell-header .day-abbrev {
    display: none;
}
@media (max-width: 991px) {
    .calendar-cell-header .day-full {
        display: none;
    }
    .calendar-cell-header .day-abbrev {
        display: inline;
    }
}

.calendar-cell {
    aspect-ratio: 1 / 1;
    min-height: 0;
    padding: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.calendar-cell-empty {
    background: transparent;
    aspect-ratio: 1 / 1;
    min-height: 0;
    border: none;
}

.calendar-cell-game.calendar-cell-home {
    background: #ffffff;
    color: #111;
    border-color: #ddd;
}

.calendar-cell-game.calendar-cell-home .calendar-day-num,
.calendar-cell-game.calendar-cell-home .calendar-result,
.calendar-cell-game.calendar-cell-home .calendar-network,
.calendar-cell-game.calendar-cell-home .calendar-team-abbrev,
.calendar-cell-game.calendar-cell-home .calendar-opponent-abbrev {
    color: #333;
}

.calendar-cell-game.calendar-cell-home .calendar-network {
    color: #666;
}

.calendar-cell-game.calendar-cell-away {
    background: none;
}

.calendar-hsfb-matchup {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    margin: 4px 0;
    line-height: 1.2;
    color: var(--text-main);
}

.calendar-cell-game.calendar-cell-away .calendar-hsfb-matchup {
    color: var(--text-main);
}

.calendar-cell-multi {
    background: rgba(255, 255, 255, 0.04);
    border-style: solid;
}

.calendar-day-num-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.calendar-day-num-row .calendar-day-num {
    margin-bottom: 0;
}

.calendar-day-num {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.calendar-day-num-badge {
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.calendar-day-games-carousel {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.calendar-day-games-strip {
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-out;
}

.calendar-day-games-strip .calendar-game-item {
    flex: 0 0 150px;
    min-height: 150px;
}

.calendar-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.calendar-carousel-btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.calendar-carousel-prev {
    left: 4px;
}

.calendar-carousel-next {
    right: 4px;
}

.calendar-game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px;
    border-radius: 6px;
    flex-shrink: 0;
}

.calendar-game-item-home {
    background: rgba(255, 255, 255, 0.9);
    color: #111;
}

.calendar-game-item-home .calendar-result,
.calendar-game-item-home .calendar-time,
.calendar-game-item-home .calendar-stream-pilot,
.calendar-game-item-home .calendar-network,
.calendar-game-item-home .calendar-opponent-abbrev {
    color: #333;
}

.calendar-game-item-home .calendar-stream-pilot-assign {
    color: #0066cc;
}

.calendar-game-item-away {
    background: none;
}

.calendar-game-item-single {
    position: relative;
    min-height: 150px;
}

.calendar-team-indicator-inline {
    font-size: 10px;
    gap: 3px;
}

.calendar-team-indicator-inline .calendar-team-logo {
    width: 16px;
    height: 16px;
}

.calendar-game-item-compact .calendar-result,
.calendar-game-item-compact .calendar-time,
.calendar-game-item-compact .calendar-stream-pilot,
.calendar-game-item-compact .calendar-network {
    font-size: 10px;
}

.calendar-game-item-compact .calendar-view-log {
    font-size: 10px;
    padding: 1px 4px;
}

.calendar-opponent-logo-compact {
    width: 36px;
    height: 36px;
}

.calendar-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.calendar-opponent-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 50%;
    border: 1px solid #d0d0d0;
}

.calendar-opponent-abbrev {
    font-size: 14px;
    font-weight: 600;
}

.calendar-time {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.calendar-cell-game.calendar-cell-home .calendar-time {
    color: #333;
}

.calendar-cell-game.calendar-cell-home .calendar-opponent-logo {
    border-color: #ccc;
}

.calendar-result {
    font-size: 13px;
    white-space: nowrap;
}

.calendar-stream-pilot {
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.calendar-stream-pilot:hover {
    text-decoration: underline;
}

.calendar-stream-pilot-assign {
    color: var(--primary, #4a9eff);
}

.calendar-stream-pilot-readonly {
    cursor: default;
}

.calendar-stream-pilot-readonly:hover {
    text-decoration: none;
}

.calendar-cell-game.calendar-cell-home .calendar-stream-pilot {
    color: #555;
}

.calendar-cell-game.calendar-cell-home .calendar-stream-pilot-assign {
    color: #0066cc;
}

.calendar-view-log {
    font-size: 11px;
    padding: 2px 6px;
    margin-top: 2px;
}

.calendar-network {
    font-size: 11px;
    color: var(--text-muted);
}

.calendar-team-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.calendar-team-indicator-tr {
    margin: 0;
    gap: 4px;
    flex-shrink: 0;
}

.calendar-team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.calendar-team-abbrev {
    font-size: 11px;
}

/* List view: team indicator when "All teams" */
.team-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.team-logo-small {
    width: 28px;
    height: 28px;
    object-fit: contain;
    vertical-align: middle;
}
/* --- Responsive & Mobile Styles --- */

/* Mobile Header (Hidden by default) */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 900;
}

.hamburger-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998; /* Behind sidebar (999 or 1000) */
    display: none;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.visible {
    display: block;
}

/* Mobile Info Icon (Hidden by default) */
.mobile-info-icon {
    display: none;
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
    margin: -10px -10px 0 0;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    -webkit-tap-highlight-color: transparent;
}
.mobile-info-icon svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    pointer-events: none;
}
.calendar-cell-game.calendar-cell-home .mobile-info-icon {
    background: rgba(0,0,0,0.1);
    color: #333;
}

/* Tablet & Mobile Layout */
@media (max-width: 1024px) {
    #mainView {
        flex-direction: column;
        height: auto; /* Allow scrolling of whole page if needed, or fixed height with overflow */
        height: 100vh;
        overflow: hidden;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        box-shadow: 2px 0 10px rgba(0,0,0,0.5);
        transition: transform 0.3s ease;
        transform: translateX(0); /* Using transform for smoother animation if needed, or just left */
    }
    
    .sidebar.open {
        transform: translateX(280px);
    }

    .mobile-header {
        display: flex;
    }

    .content {
        padding: 20px;
        height: calc(100vh - 60px);
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }

    /* Tablet: smaller logos so stream pilot & elements stay visible */
    .calendar-cell .calendar-opponent-logo,
    .calendar-cell .calendar-game-item .calendar-opponent-logo {
        width: 44px;
        height: 44px;
    }
    .calendar-cell .calendar-opponent-logo-compact,
    .calendar-cell .calendar-game-item-compact .calendar-opponent-logo-compact {
        width: 32px;
        height: 32px;
    }
}

/* Small tablet / large phone: logos smaller, still show stream pilot & elements */
@media (max-width: 768px) {
    .calendar-cell .calendar-opponent-logo,
    .calendar-cell .calendar-game-item .calendar-opponent-logo {
        width: 36px;
        height: 36px;
    }
    .calendar-cell .calendar-opponent-logo-compact,
    .calendar-cell .calendar-game-item-compact .calendar-opponent-logo-compact {
        width: 28px;
        height: 28px;
    }
    .calendar-cell .calendar-stream-pilot,
    .calendar-cell .calendar-network {
        font-size: 10px;
    }
    .calendar-cell .calendar-game-item {
        gap: 3px;
    }

    /* Adjust Modals */
    .modal-content, .overlay-content {
        width: 95%;
        padding: 20px;
        max-height: 85vh;
    }

    /* Tables */
    .table-container {
        overflow-x: auto;
    }
    
    /* Header Controls Stack */
    .header-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-group {
        width: 100%;
    }
    
    .view-toggle {
        align-self: flex-start;
    }
}

/* Small mobile only: hide operator/elements in cell, use "i" icon; smallest logos */
@media (max-width: 480px) {
    /* Allow scrolling inside cell so opponent logo and time are visible */
    .calendar-cell.calendar-cell-game,
    .calendar-cell:not(.calendar-cell-header):not(.calendar-cell-empty) {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    .calendar-cell .calendar-stream-pilot,
    .calendar-cell .calendar-network,
    .calendar-cell .calendar-view-log {
        display: none !important;
    }
    .calendar-cell .calendar-time,
    .calendar-cell .calendar-result {
        display: block !important;
    }
    .calendar-cell .calendar-opponent-logo,
    .calendar-cell .calendar-game-item .calendar-opponent-logo {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }
    .calendar-cell .calendar-opponent-logo-compact,
    .calendar-cell .calendar-game-item-compact .calendar-opponent-logo-compact {
        width: 22px;
        height: 22px;
    }
    .calendar-cell .calendar-result {
        font-size: 10px;
        line-height: 1.2;
    }
    .calendar-cell .calendar-time {
        font-size: 10px;
        font-weight: 600;
    }
    .calendar-cell .calendar-game-item {
        gap: 2px;
        justify-content: center;
        padding-right: 44px;
        padding-bottom: 44px;
        min-height: 0;
    }
    .calendar-cell .calendar-team-indicator {
        min-width: 0;
    }
    .calendar-cell .calendar-team-indicator .calendar-team-logo {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }
    .calendar-cell .calendar-team-abbrev {
        font-size: 10px;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 4em;
    }
    .mobile-info-icon {
        display: flex !important;
    }
}

/* ─── Clips Page ─────────────────────────────────────────────────────────── */

.clips-page {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.clips-page.hidden {
    display: none;
}

.clips-page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--bg-sidebar);
}

.clips-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.clips-back-btn:hover {
    background: rgba(255,255,255,0.07);
    color: white;
}

.clips-page-title-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.clips-page-title-group h2 {
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clips-count-badge {
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.clips-grid {
    flex: 1;
    min-height: 0; /* allow flex child to shrink so overflow scroll works */
    overflow-y: auto;
    padding: 28px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    grid-auto-rows: min-content; /* each row is content height; cards don't shrink */
    gap: 20px;
    align-content: start;
}

.clips-loading,
.clips-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    padding: 60px 20px;
}

/* Clip Card */
.clip-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s;
    min-height: 0; /* allow card to size to content within grid row */
}

.clip-card:hover {
    border-color: rgba(255,255,255,0.18);
}

.clip-card-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    flex-shrink: 0; /* keep 16:9 preview fixed; card grows, grid scrolls */
    background: #000;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.clip-card-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1c 0%, #0d0d0f 100%);
    transition: background 0.15s;
}

.clip-card-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.clip-card-placeholder .clip-play-icon {
    position: relative;
    z-index: 1;
}

.clip-card-thumb:not([src]),
.clip-card-thumb[src=""] {
    display: none;
}

.clip-card-video:hover .clip-card-placeholder {
    background: linear-gradient(135deg, #242426 0%, #111113 100%);
}

.clip-play-icon {
    opacity: 0.8;
    transition: opacity 0.15s, transform 0.15s;
}

.clip-card-video:hover .clip-play-icon {
    opacity: 1;
    transform: scale(1.08);
}

.clip-card-info {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.clip-card-element {
    font-size: 14px;
    font-weight: 600;
    color: white;
    line-height: 1.3;
}

.clip-card-sponsor {
    font-size: 12px;
    color: var(--text-muted);
}

.clip-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.clip-card-time {
    font-size: 11px;
    color: var(--text-muted);
}

.clip-duration-badge {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
}

.clip-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

/* "Clips" button pill in log rows / grid cards */
.btn-clips {
    color: var(--primary) !important;
}

.clip-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 2px;
}
