/* ============================================================
   RecordDB — Global Stylesheet
   Shared across: Artists, Records, Discs, Tracks pages
   ============================================================ */

/* ── Google Font ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ───────────────────────────────────────── */
:root {
    --color-bg:           #f0f2f5;
    --color-surface:      #ffffff;
    --color-surface-alt:  #f8f9fb;
    --color-border:       #dde1ea;
    --color-accent:       #4f46e5;
    --color-accent-hover: #4338ca;
    --color-accent-soft:  rgba(79,70,229,.1);
    --color-danger:       #dc2626;
    --color-danger-soft:  rgba(220,38,38,.1);
    --color-warning:      #d97706;
    --color-success:      #059669;
    --color-text:         #1e2235;
    --color-text-muted:   #5a6380;
    --color-text-dim:     #9ba3bb;
    --radius-sm:          6px;
    --radius-md:          10px;
    --radius-lg:          16px;
    --shadow-card:        0 1px 6px rgba(0,0,0,.08), 0 4px 18px rgba(0,0,0,.06);
    --shadow-nav:         0 1px 6px rgba(0,0,0,.1);
    --transition:         0.18s ease;
}

/* ── Reset / Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
    background: var(--color-surface) !important;
    border-bottom: 1px solid var(--color-border) !important;
    box-shadow: var(--shadow-nav) !important;
    padding: 0.6rem 1.5rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-accent) !important;
    letter-spacing: -0.3px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: normal;
    word-break: break-all;
}

.navbar-brand::before {
    content: '🎵';
    font-size: 1.1rem;
}

.nav-link {
    color: var(--color-text-muted) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem 0.9rem !important;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--color-text) !important;
    background: var(--color-accent-soft);
}

.navbar-toggler {
    border-color: var(--color-border);
}

.navbar-toggler-icon {
    filter: none;
}

/* ── Main Layout ─────────────────────────────────────────── */
.container {
    max-width: 1200px;
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

main {
    flex: 1;
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}

/* ── Page Header ─────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    letter-spacing: -0.5px;
}

.page-title span {
    color: var(--color-accent);
}

@media (max-width: 480px) {
    .page-header { flex-direction: column; align-items: flex-start; }
    .page-title  { font-size: 1.3rem; }
}

/* ── Badge / Count Pill ──────────────────────────────────── */
.count-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--color-accent-soft);
    color: var(--color-accent-hover);
    border: 1px solid rgba(99,102,241,.3);
    border-radius: 99px;
    padding: 0.3rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
}

/* ── Card (list pages) ──────────────────────────────────── */
.rdb-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;          /* keeps border-radius on table */
    overflow-x: auto;          /* horizontal scroll on narrow screens */
    -webkit-overflow-scrolling: touch;
}

/* ── Table ───────────────────────────────────────────────── */
.rdb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.rdb-table thead tr {
    background: var(--color-surface-alt);
    border-bottom: 1px solid var(--color-border);
}

.rdb-table thead th {
    padding: 0.85rem 1.1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.rdb-table tbody tr {
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition);
}

.rdb-table tbody tr:last-child {
    border-bottom: none;
}

.rdb-table tbody tr:hover {
    background: rgba(99,102,241,.06);
}

.rdb-table td {
    padding: 0.8rem 1.1rem;
    vertical-align: middle;
    color: var(--color-text);
}

.td-name {
    font-weight: 500;
    color: var(--color-text);
    max-width: 220px;
}

.td-bio {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    max-width: 480px;
}

.td-actions {
    white-space: nowrap;
    text-align: right;
    width: 1%;
}

/* ── Action Links ────────────────────────────────────────── */
.action-link {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
    margin-left: 0.3rem;
    border: 1px solid transparent;
}

.action-edit {
    color: var(--color-accent-hover);
    background: var(--color-accent-soft);
    border-color: rgba(99,102,241,.25);
}
.action-edit:hover {
    background: var(--color-accent);
    color: #fff;
}

.action-details,
.action-artistview,
.action-recordview {
    color: var(--color-success);
    background: rgba(16,185,129,.12);
    border-color: rgba(16,185,129,.25);
}
.action-details:hover,
.action-artistview:hover,
.action-recordview:hover {
    background: var(--color-success);
    color: #fff;
}

.action-delete {
    color: var(--color-danger);
    background: var(--color-danger-soft);
    border-color: rgba(239,68,68,.25);
}
.action-delete:hover {
    background: var(--color-danger);
    color: #fff;
}

/* ── Pagination ──────────────────────────────────────────── */
.rdb-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.1rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface-alt);
    text-align: center;
    min-width: 0;
}

.pagination-info {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.pagination-links {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 600px) {
    .rdb-pagination { padding: 0.75rem 0.75rem; }
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-muted);
    transition: all var(--transition);
    cursor: pointer;
}

.page-btn:hover {
    background: var(--color-accent-soft);
    border-color: var(--color-accent);
    color: var(--color-accent-hover);
}

.page-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
    font-weight: 700;
    cursor: default;
}

.page-btn.disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* Group-jump buttons ( « and » ) */
.page-btn-group {
    font-weight: 700;
    color: var(--color-accent);
    border-color: var(--color-accent);
    background: var(--color-accent-soft);
    min-width: 36px;
}

.page-btn-group:hover {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}

/* ── Home Page — Options Table ───────────────────────────── */
.home-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    max-width: 760px;
    margin: 0 auto;
}

.home-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.home-table thead tr {
    background: var(--color-surface-alt);
    border-bottom: 2px solid var(--color-border);
}

.home-table thead th {
    padding: 0.75rem 1.1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
}

.home-table tbody tr {
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition);
}

.home-table tbody tr:last-child { border-bottom: none; }
.home-table tbody tr.spacer-row { background: transparent; height: 4px; }
.home-table tbody tr.spacer-row td { padding: 0; border: none; }
.home-table tbody tr:not(.spacer-row):hover { background: rgba(99,102,241,.06); }

.home-table td {
    padding: 0.6rem 1.1rem;
    vertical-align: middle;
}

.home-table td:first-child a {
    color: var(--color-accent-hover);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition);
}

.home-table td:first-child a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.home-table td:last-child {
    color: var(--color-text-muted);
    font-size: 0.83rem;
}

/* ── Home Page — Hero ────────────────────────────────────── */
.home-hero {
    text-align: center;
    padding: 2.5rem 1rem 2rem;
}

.home-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    letter-spacing: -0.5px;
}

.home-hero h1 span { color: var(--color-accent); }

.home-hero .clock-display {
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--color-accent-hover);
    letter-spacing: 2px;
    margin: 0.5rem 0;
    font-variant-numeric: tabular-nums;
}

.home-hero .date-display {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border) !important;
    color: var(--color-text-muted);
    font-size: 0.82rem;
    padding: 1rem 0;
    text-align: center;
}

footer a {
    color: var(--color-accent-hover);
    text-decoration: none;
}

footer a:hover { text-decoration: underline; }

/* ── Focus / Accessibility ───────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ── Scrollbar (Webkit) ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-dim); }

/* ── Form Pages (Edit / Create) ──────────────────────────── */
.rdb-form-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 2.5rem;
}

@media (max-width: 600px) {
    .rdb-form-card { padding: 1.25rem 1rem; border-radius: var(--radius-md); }
}

.rdb-form-card .form-group {
    margin-bottom: 1.25rem;
}

.rdb-form-card label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.4rem;
}

.rdb-form-card input[type="text"],
.rdb-form-card textarea {
    width: 100%;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface-alt);
    color: var(--color-text);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.rdb-form-card input[type="text"]:focus,
.rdb-form-card textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.rdb-form-card textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.5;
}

.rdb-form-card .field-validation-error {
    display: block;
    font-size: 0.78rem;
    color: var(--color-danger);
    margin-top: 0.3rem;
}

.form-error-banner {
    background: var(--color-danger-soft);
    border: 1px solid rgba(220,38,38,.3);
    border-radius: var(--radius-sm);
    color: var(--color-danger);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.65rem 1rem;
    margin-bottom: 1.25rem;
}

.form-error-banner ul { margin: 0; padding-left: 1.2rem; }

.form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.5rem;
    flex-wrap: wrap;
    max-width: 680px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Spacing utility — sits below a centred card */
.mt-card { margin-top: 1.25rem; }

/* Toolbar that sits between the page-header and the data card */
.list-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
    flex-wrap: wrap;
}

/* Push an element to the far right inside a flex row */
.ms-auto { margin-left: auto; }

/* ── Search Form ─────────────────────────────────────────── */
.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    max-width: 420px;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.search-icon {
    position: absolute;
    left: 0.65rem;
    font-size: 0.85rem;
    pointer-events: none;
    line-height: 1;
    top: 50%;
    transform: translateY(-50%);
}

.search-input {
    width: 100%;
    padding: 0.5rem 2.2rem 0.5rem 2.1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input::placeholder { color: var(--color-text-dim); }

.search-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-soft);
}

/* ✕ clear button inside the search box */
.search-clear {
    position: absolute;
    right: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.7rem;
    line-height: 1;
    color: var(--color-text-muted);
    background: var(--color-border);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}

.search-clear:hover {
    background: var(--color-danger);
    color: #fff;
}

/* ── Search Results Info Bar ─────────────────────────────── */
.search-results-info {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.1rem;
}

.search-results-info strong { color: var(--color-text); }
.search-results-info a { color: var(--color-accent); text-decoration: none; }
.search-results-info a:hover { text-decoration: underline; }

/* ── Table empty-state cell ──────────────────────────────── */
.td-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--color-text-dim);
    font-style: italic;
    font-size: 0.9rem;
}

/* Centred short-value columns (year, media, rating) */
.td-center {
    text-align: center;
    white-space: nowrap;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* ── Responsive form grid rows ───────────────────────────── */
.form-row-2,
.form-row-3 {
    display: grid;
    gap: 0 1rem;
}

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

@media (max-width: 600px) {
    .form-row-2,
    .form-row-3 { grid-template-columns: 1fr; gap: 0; }
}

/* Read-only display field inside a form */
.input-readonly {
    width: 100%;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: not-allowed;
}

/* Responsive: stack search + button on narrow screens */
@media (max-width: 560px) {
    .search-form { max-width: 100%; }
    .ms-auto { margin-left: 0; }
    .list-toolbar { flex-direction: column; align-items: stretch; }
    .list-toolbar .btn-rdb { text-align: center; }
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-rdb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.3rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition),
                color var(--transition), box-shadow var(--transition);
}

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

.btn-danger-rdb {
    background: var(--color-danger);
    color: #fff;
    border-color: var(--color-danger);
}
.btn-danger-rdb:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

.btn-secondary-rdb {
    background: var(--color-surface-alt);
    color: var(--color-text-muted);
    border-color: var(--color-border);
}
.btn-secondary-rdb:hover {
    background: var(--color-border);
    color: var(--color-text);
}

/* ── Detail View (read-only fields) ─────────────────────── */
.rdb-detail-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.detail-row {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 1.5rem;
    gap: 1rem;
}

.detail-row:last-child { border-bottom: none; }

.detail-label {
    flex: 0 0 120px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    padding-top: 0.1rem;
}

.detail-value {
    flex: 1;
    color: var(--color-text);
    font-size: 0.9rem;
    line-height: 1.6;
    word-break: break-word;
}

.detail-value.empty {
    color: var(--color-text-dim);
    font-style: italic;
}

/* Stack label above value on phones */
@media (max-width: 480px) {
    .detail-row   { flex-direction: column; gap: 0.2rem; padding: 0.65rem 1rem; }
    .detail-label { flex: none; }
}

/* ── Delete Confirm Card ─────────────────────────────────── */
.rdb-danger-card {
    background: var(--color-surface);
    border: 2px solid var(--color-danger);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

/* Override the inner detail card's auto-margin inside danger card */
.rdb-danger-card .rdb-detail-card {
    max-width: 100%;
    margin: 0;
    box-shadow: none;
    border-radius: var(--radius-md);
}

@media (max-width: 600px) {
    .danger-body { padding: 1rem; }
    .danger-header { padding: 0.75rem 1rem; }
}

.danger-header {
    background: var(--color-danger-soft);
    border-bottom: 1px solid rgba(220,38,38,.2);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.danger-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-danger);
}

.danger-body {
    padding: 1.5rem;
}

.danger-warning {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* ── Artist List Page ────────────────────────────────────── */
.artist-list-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    padding: 0 0.5rem;
}

.artist-list-card {
    padding: 2rem;
    margin: 0 auto;
    background: var(--color-surface);
}

.artist-records-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: stretch;
}

.artist-group-item {
    width: 100%;
    text-align: left;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--color-border);
}

.artist-group-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.artist-heading {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-align: left;
}

.artist-link {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition), transform var(--transition);
    display: inline-block;
}

.artist-link:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
    transform: translateY(-1px);
}

.record-items-list {
    list-style: none;
    padding-left: 1.5rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    text-align: left;
    width: 100%;
}

.record-item {
    width: 100%;
    text-align: left;
}

.record-link {
    display: inline-block;
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition), transform var(--transition);
    word-break: break-word;
    text-align: left;
}

.record-link:hover {
    color: var(--color-accent);
    background: var(--color-accent-soft);
    transform: translateY(-1px);
}

.no-records-text {
    color: var(--color-text-dim);
    font-size: 0.88rem;
    font-style: italic;
    margin: 0;
    padding-left: 1.5rem;
    text-align: left;
}

@media (max-width: 768px) {
    .artist-list-container {
        padding: 0 0.25rem;
    }
    
    .artist-list-card {
        padding: 1.5rem 1rem;
        border-radius: var(--radius-md);
    }

    .artist-heading {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }

    .record-link {
        font-size: 0.9rem;
        padding: 0.5rem 0.6rem;
    }

    .artist-records-wrapper {
        gap: 1.8rem;
    }

    .artist-group-item {
        padding-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .artist-list-card {
        padding: 1.25rem 0.75rem;
    }

    .artist-heading {
        font-size: 1.1rem;
    }

    .record-link {
        font-size: 0.85rem;
        line-height: 1.4;
    }
}

/* ── Total Costs Page ───────────────────────────────────── */
.total-costs-container {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

/* ── Statistics Page ───────────────────────────────────── */
.statistics-container {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

tr.spacer-row td {
    padding: 0;
    border: none;
    background: transparent;
    height: 4px;
}

.normal-row td {
    padding: 0;
    border: none;
    background: transparent;
    background: var(--color-surface-alt);
    border-bottom: 1px solid var(--color-border);
}

/* ── Nested dropdown menus on  _Layout page ───────────────────────────────────── */
.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu .dropdown-menu {
        position: absolute;
        top: 0;
        left: 100%;
        margin-top: -0.5rem;
        display: none;
    }

    .dropdown-submenu:hover > .dropdown-toggle::after {
        transform: rotate(-90deg);
    }

    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
    }

.dropdown-menu .dropdown-submenu .dropdown-toggle::after {
    float: right;
    margin-right: -0.75rem;
}

/* ── RecordView Page Styles ───────────────────────────────── */
.rv-container {
    max-width: 900px;
    margin: 1.5rem auto;
    padding: 0 1rem;
    width: 100%;
}

.rv-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.rv-top-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.rv-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 2rem;
}

.rv-hero {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.rv-hero-icon {
    font-size: 3rem;
    background: var(--color-accent-soft);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.rv-hero-content {
    flex: 1;
}

.rv-artist-subtitle {
    font-size: 1.4rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.rv-artist-link,
.rv-artist-link:hover,
.rv-artist-link:focus,
.rv-artist-link:active,
.rv-artist-link:visited {
    color: inherit;
    text-decoration: none;
}

.rv-subtitle-label {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.rv-title {
    font-size: 1.85rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    color: var(--color-text);
    line-height: 1.25;
}

.rv-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rv-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.825rem;
    font-weight: 600;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.rv-badge-genre { background: rgba(79, 70, 229, 0.08); color: var(--color-accent); border-color: rgba(79, 70, 229, 0.2); }
.rv-badge-year  { background: rgba(5, 150, 105, 0.08); color: var(--color-success); border-color: rgba(5, 150, 105, 0.2); }
.rv-badge-media { background: rgba(217, 119, 6, 0.08); color: var(--color-warning); border-color: rgba(217, 119, 6, 0.2); }
.rv-badge-rating{ background: rgba(220, 38, 38, 0.08); color: var(--color-danger); border-color: rgba(220, 38, 38, 0.2); }

.rv-quick-links {
    display: flex;
    gap: 1rem;
    margin: 1.25rem 0;
    flex-wrap: wrap;
}

.rv-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all var(--transition);
}

.rv-quick-btn:hover {
    background: var(--color-accent-soft);
    border-color: var(--color-accent);
    color: var(--color-accent-hover);
    transform: translateY(-1px);
}

.rv-divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 1.5rem 0;
}

.rv-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.rv-field-item {
    background: var(--color-surface-alt);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.rv-field-full {
    grid-column: span 2;
}

.rv-field-label {
    font-size: 0.775rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--color-text-muted);
}

.rv-field-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text);
}

.rv-cost-highlight {
    font-size: 1.35rem;
    color: var(--color-success);
}

.rv-empty {
    color: var(--color-text-dim);
    font-style: italic;
    font-weight: 400;
}

.rv-info-section {
    margin-top: 1.5rem;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition);
}

.rv-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.rv-info-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
}

.rv-toggle-btn {
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background var(--transition);
}

.rv-toggle-btn:hover {
    background: var(--color-accent-soft);
    color: var(--color-accent);
}

.rv-info-content {
    padding: 1.25rem;
}

.rv-info-section:not(.rv-expanded) .rv-info-content {
    display: none;
}

.rv-text-content {
    margin: 0;
    line-height: 1.65;
    color: var(--color-text);
    font-size: 0.95rem;
}

.rv-text-content::after {
    content: "";
    display: table;
    clear: both;
}

.rv-empty-text {
    margin: 0;
    color: var(--color-text-muted);
    font-style: italic;
}

/* ── Track Listing ─────────────────────────────────────────── */
.rv-tracklist {
    padding: 0;
}

.rv-disc-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.25rem;
    background: var(--color-accent-soft);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0;
}

.rv-disc-summary {
    display: flex;
    justify-content: flex-end;
    padding: 0.4rem 1.25rem 0.2rem;
    color: var(--color-text-muted);
}

.rv-disc-icon {
    font-size: 1.1rem;
}

.rv-disc-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--color-accent);
    flex: 1;
}

.rv-disc-track-count {
    font-size: 0.775rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.rv-disc-duration {
    font-size: 0.75rem;
    color: var(--color-text-dim, var(--color-text-muted));
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    margin-left: 0.15rem;
}

.rv-track-list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

.rv-track-item {
    display: grid;
    grid-template-columns: 2.25rem 1fr auto;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition);
}

.rv-track-item:last-child {
    border-bottom: none;
}

.rv-track-item:hover {
    background: var(--color-surface);
}

.rv-track-number {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-align: right;
    font-variant-numeric: tabular-nums;
    min-width: 1.5rem;
}

.rv-track-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.4;
}

.rv-track-extended {
    display: inline;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    font-style: italic;
    margin-left: 0.35rem;
}

.rv-track-duration {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

/* ── Content Image Utilities (Float & Rounded Styles) ────────── */
.clearfix::after,
.clearfix::before {
    content: "";
    display: table;
    clear: both;
}

.clearfix {
    clear: both;
}

.img-fluid {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.rounded {
    border-radius: var(--radius-md, 10px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--color-border);
    transition: transform var(--transition), box-shadow var(--transition);
}

.rounded:hover {
    transform: scale(1.015);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}

.float-right {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1.25rem;
    margin-top: 0.25rem;
    max-width: 320px;
}

.float-left {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1.25rem;
    margin-top: 0.25rem;
    max-width: 320px;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .rv-card {
        padding: 1.5rem;
    }

    .rv-title {
        font-size: 1.5rem;
    }

    .rv-hero-icon {
        width: 60px;
        height: 60px;
        font-size: 2.2rem;
    }

    .float-right,
    .float-left {
        max-width: 240px;
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

@media (max-width: 640px) {
    .rv-hero {
        flex-direction: column;
        gap: 1rem;
    }

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

    .rv-field-full {
        grid-column: span 1;
    }

    .rv-quick-links {
        flex-direction: column;
    }

    .rv-quick-btn {
        justify-content: center;
    }

    .float-right,
    .float-left {
        float: none !important;
        display: block;
        margin: 1.25rem auto !important;
        max-width: 100%;
    }
}