/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* === Palette 1 — "Nuit Vinyle" === */
    --color-header-bg: #051740;
    --color-bg: #F5F5F7;
    --color-btn-primary: #FF6533;
    --color-btn-secondary: #0A505C;
    --color-btn-tertiary: #878787;
    --color-header-bg-light: rgba(5, 23, 64, 0.1);
    --color-btn-primary-hover: #E65B2E;
    --color-border: #E0E0E0;
    --color-text-muted: #878787;
    --color-success: #0A505C;
    --color-danger: #620A23;

    /* === Variables applicatives === */
    --bg: var(--color-bg);
    --bg-header: var(--color-header-bg);
    --bg-card: #ffffff;
    --bg-card-hover: #F0F0F2;
    --bg-modal: #ffffff;
    --bg-input: #EDEDF0;
    --border: var(--color-border);
    --border-light: #ECECEC;
    --text: #1A1A1A;
    --text-muted: var(--color-text-muted);
    --accent: var(--color-btn-primary);
    --accent-hover: var(--color-btn-primary-hover);
    --accent-light: rgba(255, 101, 51, 0.08);
    --secondary: var(--color-btn-secondary);
    --secondary-hover: #094853;
    --danger: var(--color-danger);
    --danger-hover: #4A0719;
    --success: var(--color-success);
    --tag-bg: #EDEDF0;
    --tag-text: var(--color-header-bg);
    --radius: 8px;
    --radius-sm: 5px;
}

html {
    font-size: 14px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* === Header === */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-header);
    padding: 14px 20px 0;
    border-bottom: none;
    box-shadow: none;
}

body.gallery-mode header {
    box-shadow: 0 2px 8px rgba(5, 23, 64, 0.25);
}

header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0;
    color: #fff;
    letter-spacing: -0.02em;
}

/* === Header Top Row === */
.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}

.user-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === Role Badge === */
.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.role-admin {
    background: rgba(255, 101, 51, 0.2);
    color: var(--accent);
}

.role-guest {
    background: rgba(10, 80, 92, 0.2);
    color: var(--secondary);
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-bar {
    flex: 1;
    min-width: 180px;
    position: relative;
}

.search-clear-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.25);
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: background 0.15s;
}

.search-clear-btn:hover {
    background: rgba(255,255,255,0.4);
    color: #fff;
}

.search-clear-btn.hidden {
    display: none;
}

.search-bar input {
    width: 100%;
    padding: 9px 32px 9px 14px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    color: #fff;
    font-size: 0.93rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-bar input::placeholder {
    color: rgba(255,255,255,0.5);
}

.search-bar input:focus {
    border-color: var(--accent);
    background: rgba(255,255,255,0.18);
    box-shadow: 0 0 0 2px rgba(255, 101, 51, 0.25);
}

.stats {
    margin-top: 6px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
}

/* === Buttons === */
.btn {
    padding: 9px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.85;
}

.btn-secondary {
    background: var(--secondary);
    color: #fff;
    border: 1px solid var(--secondary);
}

.btn-secondary:hover {
    opacity: 0.85;
}

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

.btn-danger:hover {
    opacity: 0.85;
}

.btn-small {
    padding: 7px 11px;
    font-size: 0.82rem;
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.btn-small:hover {
    background: var(--border);
}

/* btn-small inside header: light-on-dark style */
header .btn-small {
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.2);
}

header .btn-small:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.btn-reset {
    color: var(--text-muted);
    font-size: 1rem !important;
    padding: 6px 8px !important;
    line-height: 1;
}

.btn-reset:hover {
    color: var(--danger);
    background: rgba(98, 10, 35, 0.08);
    border-color: var(--danger);
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.btn-close:hover {
    color: var(--text);
}

/* === Filters === */
.filters {
    display: flex;
    gap: 8px;
    padding: 8px 20px;
    overflow-x: auto;
    background: var(--bg-header);
    -webkit-overflow-scrolling: touch;
    margin: 0 -20px;
    border-top: 1px solid var(--bg-header);
}

.filters select {
    padding: 6px 10px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.85);
    font-size: 0.8rem;
    min-width: 0;
    cursor: pointer;
}

.filters select option {
    background: var(--bg-card);
    color: var(--text);
}

/* === Table === */
.table-wrapper {
    padding: 0 0 100px;
    overflow-x: clip;
}

.vinyl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.vinyl-table thead th {
    background: var(--bg-header);
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: none;
    white-space: nowrap;
    cursor: default;
    position: sticky;
    top: var(--header-height, 0px);
    z-index: 50;
}

.vinyl-table thead tr {
    box-shadow: 0 2px 8px rgba(5, 23, 64, 0.25);
}

.vinyl-table thead th:first-child {
    padding-left: 20px;
}

.vinyl-table thead th:last-child {
    padding-right: 20px;
}

.vinyl-table thead th[data-sort] {
    cursor: pointer;
    user-select: none;
}

.vinyl-table thead th[data-sort]:hover {
    color: var(--accent);
}

.vinyl-table thead th.th-sorted {
    color: var(--accent);
}

.vinyl-table thead th.th-sorted::after {
    content: attr(data-sort-dir);
    margin-left: 4px;
    font-size: 0.7rem;
}

.vinyl-table tbody tr {
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.1s;
    background: var(--bg-card);
}

.vinyl-table tbody tr:nth-child(even) {
    background: var(--bg-input);
}

.vinyl-table tbody tr:hover {
    background: var(--accent-light);
}

.vinyl-table tbody td {
    padding: 9px 8px;
    vertical-align: top;
    max-width: 200px;
}

.vinyl-table tbody td:first-child {
    padding-left: 20px;
}

.vinyl-table tbody td:last-child {
    padding-right: 20px;
}

.vinyl-table tbody td.cell-artiste {
    font-weight: 600;
    color: var(--accent);
}

.vinyl-table tbody td.cell-album {
    font-weight: 500;
}

.vinyl-table tbody td.cell-comment {
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vinyl-table tbody td.cell-num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.vinyl-table tbody td.cell-styles {
    max-width: 160px;
}

.col-center, .vinyl-table td.cell-center {
    text-align: center !important;
}

.col-check {
    width: 32px;
    min-width: 32px;
}

.cell-check input[type="checkbox"], .col-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
    cursor: pointer;
}

.btn-import {
    cursor: pointer;
}

/* === View toggle === */
.view-toggle {
    display: flex;
    gap: 2px;
}

.view-btn {
    font-size: 1rem !important;
    padding: 6px 10px !important;
    opacity: 0.6;
    transition: opacity 0.15s, background 0.15s;
}

.view-btn:hover {
    opacity: 0.85;
}

.view-btn.active {
    opacity: 1;
    background: var(--accent) !important;
    color: #fff !important;
    border-color: var(--accent) !important;
}

/* === Gallery === */
.gallery {
    padding: 16px 8px 100px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.gallery-card {
    cursor: pointer;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    transition: all 0.15s;
}

.gallery-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.gallery-card-img {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.gallery-card-img .gallery-no-img {
    color: var(--text-muted);
    font-size: 2rem;
    opacity: 0.3;
}

.gallery-card-info {
    padding: 8px 10px;
}

.gallery-card-info .g-artist {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-card-info .g-album {
    font-size: 0.78rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.gallery-card-info .g-year-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
    gap: 4px;
}

.gallery-card-info .g-year-row .g-year {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.gallery-card-info .g-ratings {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gallery-card-info .g-rating {
    display: flex;
    align-items: center;
    gap: 1px;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.gallery-card-info .g-rating .material-symbols-outlined {
    font-size: 14px;
    font-variation-settings: 'FILL' 0, 'wght' 300;
}

.gallery-card-info .g-styles {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

@media (min-width: 768px) {
    .gallery {
        padding: 16px 32px 60px;
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 16px;
    }
}

/* Mobile: gallery card info plus compact */
@media (max-width: 767px) {
    .gallery-card-info {
        padding: 4px 6px;
    }
    .gallery-card-info .g-artist {
        font-size: 0.7rem;
    }
    .gallery-card-info .g-album {
        font-size: 0.65rem;
    }
    .gallery-card-info .g-year-row {
        display: none;
    }
    .gallery-card-info .g-styles {
        display: none;
    }
}

.vinyl-table tbody td.cell-gout, .vinyl-table tbody td.cell-audio, .vinyl-table tbody td.cell-energie {
    white-space: nowrap;
    font-size: 0.8rem;
}

/* === Tags === */
.tag {
    display: inline-block;
    padding: 1px 6px;
    background: var(--tag-bg);
    border-radius: 10px;
    font-size: 0.72rem;
    color: var(--tag-text);
    margin: 1px 2px;
}

.tag-categorie {
    background: var(--accent);
    color: #fff;
}

.tag-style {
    background: rgba(10, 80, 92, 0.12);
    color: var(--secondary);
}

.tag-style-sm {
    display: inline-block;
    padding: 0 4px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    font-size: 0.65rem;
}

.tag-remove {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0 2px;
    margin-left: 2px;
    opacity: 0.6;
    line-height: 1;
    vertical-align: middle;
}

.tag-remove:hover {
    opacity: 1;
    color: var(--danger);
}

.badge-classé {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}

.classé-oui {
    background: rgba(10, 80, 92, 0.1);
    color: var(--success);
}

.classé-non {
    background: rgba(98, 10, 35, 0.08);
    color: var(--danger);
}

/* === Tags Input Zone === */
.tags-input-zone {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    min-height: 38px;
    cursor: text;
    transition: border-color 0.2s;
}

.tags-input-zone:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 101, 51, 0.2);
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tags-text-input {
    flex: 1;
    min-width: 120px;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.88rem;
    font-family: inherit;
    color: var(--text);
    padding: 2px 4px;
}

/* === Discogs URL Row === */
.discogs-url-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.discogs-url-row input {
    flex: 1;
    padding: 8px 11px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.discogs-url-row input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 101, 51, 0.2);
}

.btn-discogs-link {
    text-decoration: none;
    font-size: 1.1rem;
    padding: 6px 10px !important;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-discogs-link:hover {
    background: var(--accent-light);
}

/* === Discogs Results === */
.discogs-results {
    margin: 12px 0;
    padding: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 300px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.discogs-results.hidden {
    display: none;
}

.discogs-results p {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 10px;
}

.discogs-result-item {
    cursor: pointer;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.15s;
    background: var(--bg-card);
}

.discogs-result-item:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: scale(1.02);
}

.discogs-result-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: var(--bg-input);
}

.discogs-result-item .dr-info {
    padding: 6px 8px;
}

.discogs-result-item .dr-title {
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.discogs-result-item .dr-styles {
    font-size: 0.68rem;
    color: var(--secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.discogs-result-item .dr-year {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.discogs-loading, .discogs-no-results, .discogs-error {
    font-style: italic;
}

.discogs-error {
    color: var(--danger);
}

/* === Discogs table link === */
.discogs-table-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.15s;
}

.discogs-table-link:hover {
    background: var(--accent);
    color: #fff;
}

/* === Modal === */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 23, 64, 0.5);
    backdrop-filter: blur(3px);
}

.modal-content {
    position: relative;
    background: var(--bg-modal);
    border-radius: 14px 14px 0 0;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px 20px 30px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

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

/* === Cover photo === */
.form-top-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    align-items: flex-start;
}

.cover-col {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.form-top-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.form-top-fields .form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-top-fields .form-group input {
    padding: 8px 11px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.form-top-fields .form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 101, 51, 0.2);
}

.cover-zone {
    width: 160px;
    height: 160px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    background: var(--bg-input);
    transition: border-color 0.2s;
}

.cover-zone:hover {
    border-color: var(--accent);
}

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

.cover-placeholder {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.cover-url-input {
    margin-top: 8px;
    width: 160px;
    padding: 8px 11px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.cover-url-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 101, 51, 0.2);
}

.cover-actions {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    width: 160px;
}

.btn-discogs {
    flex: 1;
    text-align: center;
    font-size: 0.78rem !important;
    padding: 6px 4px !important;
    background: var(--bg-input) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
}

.btn-discogs:hover {
    border-color: var(--secondary) !important;
    color: var(--secondary) !important;
    background: rgba(10, 80, 92, 0.08) !important;
}

.btn-discogs.searching {
    opacity: 0.6;
    pointer-events: none;
}

.btn-secondary.searching {
    opacity: 0.7;
    pointer-events: none;
}

.cover-results {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 8px;
    z-index: 10;
    width: 340px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 8px;
}

.cover-result-item {
    cursor: pointer;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
}

.cover-result-item:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: scale(1.03);
}

.cover-result-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: var(--bg-input);
}

.cover-result-item .cr-info {
    padding: 4px 5px;
    background: var(--bg-input);
}

.cover-result-item .cr-artist {
    font-weight: 600;
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.cover-result-item .cr-album {
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
}

/* === Form === */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group label small {
    font-weight: 400;
    opacity: 0.7;
}

.form-group input, .form-group select, .form-group textarea {
    padding: 8px 11px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 101, 51, 0.2);
}

.form-group textarea {
    resize: vertical;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.84rem;
    color: var(--text);
    cursor: pointer;
    padding: 3px 0;
}

.checkbox-group input[type="checkbox"] {
    accent-color: var(--accent);
    width: 15px;
    height: 15px;
}

/* === IA Section === */
.ia-section {
    border-top: 1px solid var(--border-light);
    padding-top: 12px;
}

.ia-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-ia {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--color-header-bg);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
}

.btn-ia:hover:not(:disabled) {
    opacity: 0.85;
}

.btn-ia:disabled {
    opacity: 0.6;
    cursor: wait;
}

.ia-result-zone {
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text);
}

.ia-result-zone h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 14px 0 6px;
    color: var(--color-header-bg);
}

.ia-result-zone h3 {
    font-size: 0.93rem;
    font-weight: 600;
    margin: 12px 0 4px;
    color: var(--color-header-bg);
}

.ia-result-zone h3:first-child,
.ia-result-zone h2:first-child {
    margin-top: 0;
}

.ia-result-zone p {
    margin: 4px 0;
}

.ia-result-zone ul {
    margin: 4px 0 8px;
    padding-left: 18px;
}

.ia-result-zone li {
    margin: 2px 0;
}

.ia-result-zone strong {
    font-weight: 600;
}

.ia-error {
    color: var(--danger);
    font-weight: 500;
}

.ia-spinner {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-style: italic;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid var(--border);
    border-top-color: var(--color-header-bg);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}

.form-actions-right {
    display: flex;
    gap: 10px;
}

.hidden {
    display: none !important;
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 0.95rem;
}

/* === Admin Modal === */
.modal-admin {
    max-width: 560px;
}

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

.admin-user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    gap: 12px;
}

.admin-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.admin-user-info strong {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user-email {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-role-select {
    padding: 6px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.82rem;
    cursor: pointer;
    flex-shrink: 0;
}

/* === Admin API Key === */
.admin-apikey-section {
    padding: 4px 0;
}

.admin-apikey-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    line-height: 1.5;
}

.admin-apikey-field {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.admin-apikey-field input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    font-family: monospace;
}

.admin-apikey-field input:focus {
    border-color: var(--accent);
    outline: none;
}

.admin-apikey-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-apikey-status {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.admin-apikey-status.admin-apikey-success {
    color: #4caf50;
}

.admin-apikey-status.admin-apikey-error {
    color: #e53935;
}

/* === Prompt IA Modal === */
.modal-ia-prompt {
    max-width: 700px;
}

.ia-prompt-section {
    padding: 4px 0;
}

.ia-prompt-section textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.82rem;
    font-family: monospace;
    line-height: 1.5;
    resize: vertical;
    min-height: 200px;
    box-sizing: border-box;
}

.ia-prompt-section textarea:focus {
    border-color: var(--accent);
    outline: none;
}

.ia-prompt-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

/* === Token Modal === */
.modal-token {
    max-width: 440px;
}

.token-info {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    line-height: 1.5;
}

.token-info a {
    color: var(--accent);
}

/* === Material Symbols === */
.material-symbols-outlined {
    font-size: 20px;
    vertical-align: middle;
    line-height: 1;
}

/* === Hamburger Menu === */
.hamburger-menu {
    position: relative;
}

.hamburger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.hamburger-btn .material-symbols-outlined {
    font-size: 22px;
}

.hamburger-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    z-index: 200;
    padding: 4px 0;
}

.hamburger-dropdown.open {
    display: block;
}

.hamburger-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    color: var(--text);
    font-size: 0.88rem;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    gap: 10px;
    transition: background 0.1s;
}

.hamburger-item .material-symbols-outlined {
    font-size: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.hamburger-item:hover {
    background: var(--accent-light);
}

.hamburger-danger {
    color: var(--danger);
}

.hamburger-danger .material-symbols-outlined {
    color: var(--danger);
}

.hamburger-danger:hover {
    background: rgba(98, 10, 35, 0.08);
}

.hamburger-separator {
    height: 1px;
    background: var(--border-light);
    margin: 4px 0;
}

/* === Styles Button === */
#manageStylesBtn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

#manageStylesBtn .material-symbols-outlined {
    font-size: 18px;
}

/* === Styles Manager Modal === */
.modal-styles {
    max-width: 600px;
}

.styles-manager-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.styles-manager-toolbar input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.styles-manager-toolbar input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 101, 51, 0.2);
}

.styles-count {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.styles-manager-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 55vh;
    overflow-y: auto;
}

.styles-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 20px;
}

.style-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    gap: 10px;
    transition: background 0.1s;
}

.style-row:hover {
    background: var(--accent-light);
}

.style-row-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.style-row-info .tag {
    font-size: 0.82rem;
    padding: 2px 8px;
}

.style-show-albums {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem !important;
    padding: 4px 10px !important;
    color: #fff !important;
    background: var(--accent) !important;
    border: none !important;
    border-radius: 12px;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s;
}

.style-show-albums .material-symbols-outlined {
    font-size: 15px;
    color: #fff;
}

.style-show-albums:hover {
    background: var(--accent-hover) !important;
}

.style-row-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.style-rename-btn {
    font-size: 0.75rem !important;
    padding: 4px 8px !important;
}

.style-delete-btn {
    font-size: 0.75rem !important;
    padding: 4px 8px !important;
}

/* === Responsive Desktop === */
@media (min-width: 768px) {
    header {
        padding: 16px 32px 0;
    }

    .filters {
        padding: 8px 32px;
        margin: 0 -32px;
    }

    .table-wrapper {
        padding: 0 0 60px;
    }

    .vinyl-table thead th:first-child,
    .vinyl-table tbody td:first-child {
        padding-left: 32px;
    }

    .vinyl-table thead th:last-child,
    .vinyl-table tbody td:last-child {
        padding-right: 32px;
    }

    .modal {
        align-items: center;
    }

    .modal-content {
        border-radius: 14px;
        max-height: 85vh;
        padding: 22px 26px 26px;
    }

    .form-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* === Login Screen === */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-header);
}

.login-screen.hidden {
    display: none !important;
}

.login-card {
    text-align: center;
    background: var(--bg-card);
    padding: 48px 40px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    max-width: 400px;
    width: 90%;
}

.login-card h1 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: var(--bg-header);
}

.login-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 28px;
}

.login-vinyl-icon {
    margin-bottom: 16px;
}

.btn-google {
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* === Backup Modal === */
.modal-backup {
    max-width: 600px;
}

.backup-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.backup-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.backup-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.backup-section-title .material-symbols-outlined {
    font-size: 20px;
    color: var(--accent);
}

.backup-drive-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.backup-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.backup-status-dot.connected {
    background: var(--success);
}

.backup-status-dot.disconnected {
    background: var(--text-muted);
}

.backup-drive-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.backup-schedule-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.backup-schedule-row label {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.backup-schedule-row select {
    padding: 6px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
}

.backup-last-info {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-style: italic;
}

.backup-snapshot-actions {
    margin-bottom: 12px;
}

.backup-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
}

.backup-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 16px;
    font-style: italic;
}

.backup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    gap: 10px;
}

.backup-item:hover {
    background: var(--accent-light);
}

.backup-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.backup-item-date {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.backup-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.backup-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.backup-item-actions .btn-small {
    font-size: 0.75rem !important;
    padding: 4px 8px !important;
}

.backup-item .material-symbols-outlined {
    font-size: 16px;
}

.backup-item-type {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.68rem;
    font-weight: 600;
}

.backup-type-auto {
    background: rgba(10, 80, 92, 0.12);
    color: var(--secondary);
}

.backup-type-manual {
    background: var(--accent-light);
    color: var(--accent);
}

.backup-type-drive {
    background: rgba(10, 80, 92, 0.12);
    color: var(--success);
}

/* === Vue 3D — Graphe === */
.graph3d-view {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--header-height, 200px));
    overflow: hidden;
    background: #0a0a12;
}

.graph3d-view canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.graph3d-back-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    background: rgba(10, 10, 18, 0.85);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
}

.graph3d-back-btn:hover {
    background: var(--accent);
    color: #fff;
}

.graph3d-back-btn.hidden {
    display: none !important;
}

.graph3d-tooltip {
    position: absolute;
    z-index: 10;
    background: rgba(10, 10, 18, 0.9);
    color: #fff;
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    pointer-events: none;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    font-family: inherit;
}

.graph3d-tooltip.hidden {
    display: none !important;
}

/* Popup 3D */
.graph3d-popup {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.graph3d-popup.hidden {
    display: none !important;
}

.graph3d-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.graph3d-popup-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    text-align: center;
    z-index: 1;
}

.graph3d-popup-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.graph3d-popup-close:hover {
    color: var(--text);
}

.graph3d-popup-cover {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    background: var(--bg-input);
}

.graph3d-popup-artist {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 2px;
}

.graph3d-popup-album {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.graph3d-popup-ratings {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}

.graph3d-popup-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.graph3d-popup-rating-value {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

.graph3d-popup-rating-value .material-symbols-outlined {
    font-size: 18px;
    color: var(--accent);
}

.graph3d-popup-rating-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    max-width: 100px;
    line-height: 1.2;
}

.graph3d-popup-ia-btn {
    margin-bottom: 12px;
    font-size: 0.85rem;
    padding: 6px 16px;
}

.graph3d-popup-ia-text {
    text-align: left;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 12px;
    max-height: 250px;
    overflow-y: auto;
}

.graph3d-popup-ia-text p {
    margin-bottom: 6px;
}

.graph3d-popup-ia-text strong {
    color: var(--accent);
}

/* === Modale Suggestions d'écoute === */
.listen-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.listen-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.listen-modal-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    max-width: 600px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.listen-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.listen-modal-close:hover {
    color: var(--text);
}

.listen-modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 20px 0;
}

.listen-modal-title .material-symbols-outlined {
    color: var(--accent);
    font-size: 1.4rem;
}

.listen-section {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 16px;
}

.listen-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 20px;
}

@media (max-width: 767px) {
    .listen-columns {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.listen-col-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    display: block;
    margin-bottom: 10px;
}

.listen-cat-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.listen-cat-label {
    font-size: 0.8rem;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.listen-cat-label input[type="checkbox"] {
    accent-color: var(--accent);
}

.listen-section-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.listen-section-actions .btn {
    font-size: 0.85rem;
    padding: 8px 18px;
}

.listen-result {
    margin-top: 16px;
}

.listen-result-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 10px 0;
}

.listen-empty {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.listen-result-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.listen-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s;
}

.listen-result-item:hover {
    background: var(--bg-hover);
}

.listen-result-cover {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.listen-result-nocover {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border-radius: 4px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.listen-result-info {
    flex: 1;
    min-width: 0;
}

.listen-result-artist {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listen-result-album {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listen-result-missing {
    font-size: 0.7rem;
    color: var(--accent);
    margin-top: 2px;
}

.listen-result-ratings {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
    display: flex;
    gap: 8px;
}

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

.listen-criteria-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.listen-criteria-check {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 90px;
}

.listen-criteria-check input[type="checkbox"] {
    accent-color: var(--accent);
}

.listen-criteria-select {
    flex: 1;
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-family: inherit;
}

.listen-scope-toggle {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.listen-scope-option {
    font-size: 0.85rem;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.listen-scope-option input[type="radio"] {
    accent-color: var(--accent);
}

/* === iOS safe area === */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .table-wrapper {
        padding-bottom: calc(100px + env(safe-area-inset-bottom));
    }

    .modal-content {
        padding-bottom: calc(30px + env(safe-area-inset-bottom));
    }
}
