/* -------------------------------------------------------------------
   Forroemvinil Admin Panel — Styles
   Matches the warm, vinyl-inspired palette from the contribution portal
   ------------------------------------------------------------------- */

:root {
    --bg:           #FAF6F0;
    --card:         #FFFFFF;
    --primary:      #8B4513;
    --primary-h:    #A0522D;
    --accent:       #D2691E;
    --text:         #2D2A26;
    --text-light:   #6B6560;
    --border:       #DDD5C8;
    --drop-bg:      #F5F0E8;
    --success:      #2E7D32;
    --success-bg:   #E8F5E9;
    --warning:      #E65100;
    --warning-bg:   #FFF3E0;
    --error:        #C62828;
    --error-bg:     #FFEBEE;
    --info-bg:      #E3F2FD;
    --info:         #1565C0;
    --radius:       8px;
    --shadow:       0 1px 3px rgba(0,0,0,.08);
}

[x-cloak] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; }

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

/* ========= Login ========= */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}
.login-card {
    background: var(--card);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
    width: 100%;
    max-width: 380px;
}
.login-card h1 {
    text-align: center;
    color: var(--primary);
    margin: 0 0 .2rem;
    font-size: 1.8rem;
}
.login-card .subtitle {
    text-align: center;
    color: var(--text-light);
    margin: 0 0 1.5rem;
    font-size: .95rem;
}
.login-card .field {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    margin-bottom: 1rem;
}
.login-card label {
    font-weight: 600;
    font-size: .88rem;
}
.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    padding: .6rem .75rem;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 1rem;
}
.login-card input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(210,105,30,.15);
}
.btn.full { width: 100%; }
.btn.primary {
    background: var(--primary);
    color: #fff;
    padding: .65rem 1.6rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.btn.primary:hover:not(:disabled) { background: var(--primary-h); }
.btn.primary:disabled { opacity: .5; cursor: not-allowed; }

.btn.secondary {
    background: var(--card);
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: .5rem 1.2rem;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
}
.btn.secondary:hover { background: var(--drop-bg); }

.btn.danger {
    background: var(--error);
    color: #fff;
    padding: .5rem 1.2rem;
    border: none;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
}
.btn.danger:hover { background: #B71C1C; }
.btn.danger:disabled { opacity: .5; cursor: not-allowed; }

.btn.small { padding: .35rem .9rem; font-size: .85rem; }

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: underline;
    padding: 0;
}
.btn-link:hover { color: var(--accent); }
.btn-link.danger { color: var(--error); }

/* ========= Alerts ========= */
.alert {
    padding: .6rem .8rem;
    border-radius: 5px;
    font-size: .9rem;
    margin-bottom: 1rem;
}
.alert.error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid var(--error);
}

/* ========= Navbar ========= */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: .7rem 1rem;
    gap: 1.5rem;
}
.nav-brand {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
}
.nav-links {
    display: flex;
    gap: .3rem;
    flex: 1;
}
.nav-link {
    color: rgba(255,255,255,.75);
    text-decoration: none;
    padding: .4rem .8rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: .92rem;
    transition: all .15s;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.12); }
.nav-link.active { color: #fff; background: rgba(255,255,255,.2); }

.nav-user {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .88rem;
}
.nav-name { font-weight: 600; }
.nav-name-btn {
    background: none;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 4px;
    color: #fff;
    font-weight: 700;
    font-size: .92rem;
    padding: .25rem .6rem;
    cursor: pointer;
    transition: all .15s;
}
.nav-name-btn:hover {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.5);
}

/* ========= Profile panel ========= */
.profile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 200;
    display: flex;
    justify-content: flex-end;
}
.profile-panel {
    width: 420px;
    max-width: 90vw;
    background: var(--card);
    color: var(--text);
    height: 100vh;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: -4px 0 20px rgba(0,0,0,.15);
    animation: slideIn .2s ease-out;
}
@keyframes slideIn {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    padding-bottom: .8rem;
    border-bottom: 2px solid var(--border);
}
.profile-header h2 { margin: 0; font-size: 1.2rem; color: var(--primary); }
.profile-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0 .3rem;
    line-height: 1;
}
.profile-close:hover { color: var(--error); }
.profile-info {
    background: var(--bg);
    border-radius: var(--radius);
    padding: .8rem 1rem;
    margin-bottom: 1.2rem;
}
.profile-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .3rem 0;
}
.profile-field + .profile-field { border-top: 1px solid var(--border); }
.profile-label { font-size: .85rem; color: var(--text-light); font-weight: 600; }
.profile-value { font-size: .92rem; font-weight: 600; }
.profile-section { margin-bottom: 1.2rem; }
.profile-section h3 {
    font-size: 1rem;
    color: var(--primary);
    margin: 0 0 .5rem;
    padding-bottom: .3rem;
    border-bottom: 1px solid var(--border);
}
.profile-input {
    width: 100%;
    padding: .55rem .75rem;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: .95rem;
    margin-bottom: .5rem;
}
.profile-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(210,105,30,.15);
}
.profile-msg {
    padding: .5rem .75rem;
    border-radius: 5px;
    font-size: .88rem;
    margin-bottom: .75rem;
}
.profile-msg.success { background: var(--success-bg); color: var(--success); }
.profile-msg.error   { background: var(--error-bg);   color: var(--error); }
.s-master      { background: #F3E5F5; color: #7B1FA2; }
.s-reviewer    { background: #E3F2FD; color: #1565C0; }
.s-contributor { background: #FFF8E1; color: #E65100; }
.s-draft    { background: #E3F2FD; color: #1565C0; }
.s-pending  { background: #FFF8E1; color: #E65100; }
.s-rejected { background: var(--error-bg); color: var(--error); }
.s-approved { background: var(--success-bg); color: var(--success); }
.count-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0 .45em;
    margin-left: .3em;
    vertical-align: middle;
    line-height: 1.6;
}
.loading-msg, .empty-msg { color: var(--text-light); font-size: .9rem; padding: .5rem 0; }
.text-dimmed { color: var(--text-light); font-size: .85rem; }
.contrib-row {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .75rem 1rem;
    margin-bottom: .6rem;
    background: var(--bg);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.contrib-row:hover { border-color: var(--accent); box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.contrib-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; margin-bottom: .2rem; }
.contrib-title { font-weight: 600; }
.contrib-date-sm { font-size: .8rem; color: var(--text-light); }
.contrib-actions { margin-top: .5rem; display: flex; gap: .5rem; align-items: center; }
.reject-reason {
    font-size: .85rem;
    color: var(--error);
    background: var(--error-bg);
    border-radius: 4px;
    padding: .3rem .6rem;
    margin: .4rem 0 .2rem;
}
.status-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .1em .55em;
    border-radius: 999px;
}
.status-note { font-size: .9rem; color: var(--text-light); }
.status-note.ok { color: var(--success); font-weight: 600; }
/* Profile save button reuse */
.btn-profile {
    display: block;
    width: 100%;
    padding: .65rem 1.6rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    background: var(--primary);
    color: #fff;
    transition: background .15s;
    margin-bottom: 1.5rem;
}
.btn-profile:disabled { opacity: .5; cursor: not-allowed; }
.btn-profile:hover:not(:disabled) { background: var(--primary-h); }

/* ========= Contribution detail overlay ========= */
.contrib-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 300;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 2rem 1rem;
}
.contrib-detail-panel {
    background: var(--card);
    color: var(--text);
    border-radius: var(--radius);
    width: 100%;
    max-width: 760px;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
    padding: 1.5rem 2rem 2rem;
    position: relative;
}
.contrib-detail-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
    padding: 0 .3rem;
}
.contrib-detail-close:hover { color: var(--error); }
.contrib-detail-title { font-size: 1.2rem; font-weight: 700; color: var(--primary); margin: 0 0 .3rem; padding-right: 2rem; }
.contrib-detail-sub { font-size: .88rem; color: var(--text-light); margin-bottom: 1.2rem; }
.contrib-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .6rem 1rem;
    background: var(--bg);
    border-radius: var(--radius);
    padding: .8rem 1rem;
    margin-bottom: 1.2rem;
}
.contrib-detail-grid > div { display: flex; flex-direction: column; gap: .15rem; }
.contrib-detail-grid strong { font-size: .78rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .03em; }
.contrib-detail-grid span  { font-size: .95rem; font-weight: 600; }
.contrib-detail-section { margin-bottom: 1.2rem; }
.contrib-detail-section h4 {
    font-size: .95rem;
    color: var(--primary);
    margin: 0 0 .5rem;
    padding-bottom: .3rem;
    border-bottom: 1px solid var(--border);
}
.contrib-detail-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.contrib-detail-table th {
    text-align: left;
    padding: .3rem .5rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-light);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.contrib-detail-table td { padding: .3rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.contrib-detail-table tr:last-child td { border-bottom: none; }
.contrib-detail-approved { padding: .6rem 1rem; background: var(--success-bg); color: var(--success); border-radius: var(--radius); font-size: .9rem; font-weight: 600; margin-top: .5rem; }
.contrib-detail-rejected { padding: .6rem 1rem; background: var(--error-bg); color: var(--error); border-radius: var(--radius); font-size: .9rem; margin-top: .5rem; }
.contrib-detail-url { word-break: break-all; font-size: .88rem; color: var(--accent); }
.badge {
    display: inline-block;
    padding: .1rem .5rem;
    border-radius: 3px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    vertical-align: middle;
}
.badge.pending { background: var(--warning-bg); color: var(--warning); }
.badge.approved, .badge.ok { background: var(--success-bg); color: var(--success); }
.badge.rejected { background: var(--error-bg); color: var(--error); }
.badge.master { background: rgba(255,255,255,.2); color: #fff; }
.badge.reviewer { background: rgba(255,255,255,.12); color: rgba(255,255,255,.8); }
.badge.contributor { background: rgba(255,255,255,.1); color: rgba(255,255,255,.7); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.inactive { background: var(--error-bg); color: var(--error); }

/* ========= Page layout ========= */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}
.page-header h2 {
    margin: 0;
    color: var(--primary);
    font-size: 1.3rem;
}
.filters {
    display: flex;
    gap: .5rem;
    align-items: center;
}
.filters select {
    padding: .4rem .6rem;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: .9rem;
    background: #fff;
}
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.05rem;
}

/* ========= Contribution list ========= */
.contrib-list {
    display: grid;
    gap: .8rem;
}
.contrib-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all .15s;
    position: relative;
}
.contrib-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    transform: translateY(-1px);
}
.contrib-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .4rem;
}
.contrib-id {
    font-size: .82rem;
    color: var(--text-light);
    font-weight: 600;
}
.contrib-body {}
.contrib-artist {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
}
.contrib-album {
    font-size: .95rem;
    color: var(--text);
}
.contrib-meta {
    font-size: .82rem;
    color: var(--text-light);
    margin-top: .2rem;
}
.contrib-footer {
    display: flex;
    justify-content: space-between;
    margin-top: .5rem;
    font-size: .82rem;
    color: var(--text-light);
}
.dup-badge {
    position: absolute;
    top: .6rem;
    right: 5rem;
    font-size: .75rem;
    color: var(--warning);
    font-weight: 700;
}

/* ========= Contribution detail ========= */
.mb-1 { margin-bottom: 1rem; }

.detail-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.detail-header h3 {
    margin: 0 0 .3rem;
    font-size: 1.25rem;
    color: var(--primary);
}
.detail-meta {
    font-size: .88rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem 1.5rem;
    margin-bottom: 1.2rem;
    padding: 1rem;
    background: var(--drop-bg);
    border-radius: var(--radius);
}
.info-grid div {
    display: flex;
    flex-direction: column;
    gap: .1rem;
}
.info-grid strong {
    font-size: .78rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .03em;
}
@media (max-width: 640px) {
    .info-grid { grid-template-columns: 1fr; }
}

.section {
    margin-bottom: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.section h4 {
    margin: 0 0 .6rem;
    font-size: 1rem;
    color: var(--primary);
}
.comments {
    background: var(--drop-bg);
    padding: .75rem;
    border-radius: 5px;
    font-size: .93rem;
    white-space: pre-wrap;
}

.warning-section {
    background: var(--warning-bg);
    border: 1px solid var(--warning);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 1rem;
}
.warning-section h4 { color: var(--warning); }
.dup-item {
    font-size: .88rem;
    padding: .3rem 0;
    border-bottom: 1px solid rgba(230,81,0,.15);
}

.success-section {
    background: var(--success-bg);
    border: 1px solid var(--success);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 1rem;
}
.success-section p { margin: .3rem 0; }

/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}
.admin-table th {
    text-align: left;
    padding: .5rem .4rem;
    border-bottom: 2px solid var(--border);
    font-size: .78rem;
    color: var(--text-light);
    text-transform: uppercase;
}
.admin-table td {
    padding: .4rem .4rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.admin-table .w-num { width: 50px; }

/* Artwork list */
.artwork-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.artwork-item {
    display: flex;
    align-items: center;
    gap: .4rem;
    background: var(--drop-bg);
    padding: .3rem .6rem;
    border-radius: 4px;
    font-size: .88rem;
}

/* Artwork thumbnail grid */
.artwork-thumb-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}
.artwork-thumb-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    background: var(--drop-bg);
    padding: .5rem;
    border-radius: 6px;
    max-width: 140px;
    text-align: center;
}
.artwork-thumb {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform .15s ease;
}
.artwork-thumb:hover {
    transform: scale(2.5);
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
    position: relative;
}
.artwork-thumb-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text);
    text-transform: capitalize;
}
.artwork-thumb-name {
    font-size: .72rem;
    color: var(--text-light);
    word-break: break-all;
    line-height: 1.2;
}

/* Action bar */
.action-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1.2rem;
    border-top: 2px solid var(--border);
    margin-top: 1.2rem;
}
.hint {
    font-size: .85rem;
    color: var(--text-light);
    font-style: italic;
}

/* ========= Modal ========= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}
.modal {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
    width: 100%;
    max-width: 440px;
}
.modal h3 {
    margin: 0 0 1rem;
    color: var(--primary);
}
.modal .field {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    margin-bottom: 1rem;
}
.modal label {
    font-weight: 600;
    font-size: .88rem;
}
.modal input[type="text"],
.modal input[type="password"],
.modal select,
.modal textarea {
    width: 100%;
    padding: .55rem .7rem;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: .95rem;
    background: #fff;
}
.modal input:focus,
.modal select:focus,
.modal textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(210,105,30,.15);
}
.modal textarea { resize: vertical; font-family: inherit; }
.modal-actions {
    display: flex;
    gap: .8rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* ========= Users ========= */
.users-list {
    display: grid;
    gap: .8rem;
}
.user-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .6rem;
}
.user-card.inactive { opacity: .6; }
.user-info {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}
.user-login {
    font-size: .85rem;
    color: var(--text-light);
}
.user-meta {
    font-size: .82rem;
    color: var(--text-light);
}
.user-btns {
    display: flex;
    gap: .8rem;
}

/* ========= Toast ========= */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: .8rem 1.2rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .95rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    cursor: pointer;
    z-index: 300;
    animation: slideUp .3s ease;
}
.toast.success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success); }
.toast.error { background: var(--error-bg); color: var(--error); border: 1px solid var(--error); }
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ========= Responsive ========= */
@media (max-width: 640px) {
    .nav-inner { flex-wrap: wrap; }
    .contrib-card { padding: .8rem; }
    .detail-card { padding: 1rem; }
    .action-bar { flex-direction: column; align-items: stretch; }
    .user-card { flex-direction: column; align-items: flex-start; }
}

/* ========= Album Editor ========= */
.album-search-bar {
    display: flex;
    gap: .6rem;
    margin-bottom: 1.2rem;
}
.album-search-input {
    flex: 1;
    padding: .55rem .8rem;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 1rem;
    background: #fff;
}
.album-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(210,105,30,.15);
}

.album-edit-form {
    margin-bottom: 1rem;
}
.album-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .8rem 1.2rem;
    margin-bottom: 1rem;
}
.album-edit-grid .field {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.album-edit-grid .field:nth-child(3) {
    grid-column: 1 / -1;  /* URL field spans full width */
}
.album-edit-grid label {
    font-weight: 600;
    font-size: .82rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .03em;
}
.album-edit-grid input,
.album-edit-grid select {
    width: 100%;
    padding: .5rem .65rem;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: .95rem;
    background: #fff;
}
.album-edit-grid input:focus,
.album-edit-grid select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(210,105,30,.15);
}

.url-field {
    display: flex;
    gap: .4rem;
    align-items: center;
}
.url-field input {
    flex: 1;
}
.url-field a {
    font-size: 1.1rem;
    text-decoration: none;
    flex-shrink: 0;
}

.track-counts {
    display: flex;
    gap: 1.5rem;
    font-size: .9rem;
    color: var(--text-light);
}

.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .6rem;
}
.section-header-row h4 {
    margin: 0;
    color: var(--primary);
}

.album-tracks-table .w-info {
    width: 80px;
    text-align: right;
}
.album-tracks-table .w-actions {
    width: 80px;
    text-align: center;
}

.track-actions {
    white-space: nowrap;
}
.track-btns {
    display: flex;
    gap: .5rem;
    align-items: center;
    justify-content: center;
}

.ac-wrap {
    position: relative;
    width: 100%;
}
.ac-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 180px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--accent);
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,.15);
    z-index: 50;
    font-size: .85rem;
}
.ac-item {
    padding: .3rem .5rem;
    cursor: pointer;
}
.ac-item:hover, .ac-item.ac-active {
    background: var(--accent);
    color: #fff;
}

.inline-input {
    padding: .2rem .4rem;
    border: 1px solid var(--accent);
    border-radius: 3px;
    font-size: .88rem;
    width: 100%;
    background: #FFF8F0;
}
.inline-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(210,105,30,.2);
}
.w-num-input {
    width: 50px;
}

.inline-actions {
    display: flex;
    gap: .3rem;
}

.replace-label {
    cursor: pointer;
    position: relative;
}
.hidden-file {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
}

tr.track-replacing {
    background: var(--info-bg) !important;
    opacity: .7;
}
tr.track-missing td {
    color: var(--error);
    opacity: .6;
}

@media (max-width: 640px) {
    .album-edit-grid { grid-template-columns: 1fr; }
    .album-edit-grid .field:nth-child(3) { grid-column: 1; }
    .album-tracks-table { font-size: .8rem; }
    .album-search-bar { flex-direction: column; }
}
