/* ══════════════════════════════════════════════════
   MyTube — Design System
══════════════════════════════════════════════════ */
:root {
    --mt-bg:           #09090b;
    --mt-surface:      #131318;
    --mt-surface-2:    #1c1c24;
    --mt-surface-3:    #252530;
    --mt-border:       rgba(255, 255, 255, 0.07);
    --mt-border-hover: rgba(255, 255, 255, 0.13);
    --mt-border-input: rgba(255, 255, 255, 0.4);
    --mt-accent:       #e63950;
    --mt-accent-dim:   rgba(230, 57, 80, 0.15);
    --mt-accent-glow:  rgba(230, 57, 80, 0.28);
    --mt-accent-2:     #a78bfa;
    --mt-text:         #e8e8f0;
    --mt-text-muted:   #7a7a90;
    --mt-text-subtle:  #454558;
    --mt-radius:       10px;
    --mt-radius-sm:    6px;
    --mt-radius-lg:    16px;
    --mt-ease:         0.18s ease;
}

[data-bs-theme="dark"] {
    --bs-body-bg:            var(--mt-bg);
    --bs-body-color:         var(--mt-text);
    --bs-secondary-bg:       var(--mt-surface);
    --bs-tertiary-bg:        var(--mt-surface-2);
    --bs-border-color:       var(--mt-border);
    --bs-card-bg:            var(--mt-surface);
    --bs-dropdown-bg:        var(--mt-surface-2);
    --bs-dropdown-border-color: var(--mt-border);
    --bs-primary-rgb:        230, 57, 80;
    --bs-link-color:         var(--mt-text);
    --bs-link-hover-color:   #fff;
    --bs-link-color-rgb:     232, 232, 240;
}

/* ── Font ─────────────────────────────────────── */
/* Inter (SIL Open Font License, public/static/fonts/inter/LICENSE.txt) served from the site, not from Google Fonts,
   so visitors' IP addresses are not sent to Google. One variable file covers all weights. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../../static/fonts/inter/InterVariable.woff2') format('woff2');
}

/* ── Base ─────────────────────────────────────── */
body {
    padding-top: var(--mt-navbar-height, 74px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background-color: var(--mt-bg);
    color: var(--mt-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--mt-text);
    transition: color var(--mt-ease);
}

a:hover {
    color: #fff;
}

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

/* ── Navbar ───────────────────────────────────── */
/*
 * The blur is on ::before, not on .navbar: backdrop-filter on .navbar would make it the containing block of the fixed
 * #navbarOffcanvas, the side panel would then be only as tall as the navbar.
 */
.navbar {
    background: transparent !important;
    border-bottom: 1px solid var(--mt-border);
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
    color: var(--mt-text) !important;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

/* ── Brand: "My" light + "Tube" in brand red ── */
/* The icon is as tall as the "MyTube" text. */
.brand {
    display: flex;
    align-items: center;
    gap: 0.45em;
}

.brand-logo {
    height: 1.1em;
    width: auto;
    flex: none;
}

.brand-my {
    font-weight: 300;
}

.brand-tube {
    font-weight: 700;
    color: #ff0033;
}

/*
 * Number of videos under "MyTube". It is positioned absolutely, so it does not count in the height of the brand
 * and the icon stays centred on the "MyTube" text.
 */
.brand-text {
    position: relative;
}

.brand-count {
    position: absolute;
    top: calc(100% - 0.25rem);
    left: 0;
    line-height: 1;
    white-space: nowrap;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--mt-text-muted);
}

.navbar .nav-link {
    color: var(--mt-text-muted) !important;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.38rem 0.65rem !important;
    border-radius: var(--mt-radius-sm);
    transition: color var(--mt-ease), background var(--mt-ease);
}

.navbar .nav-link:hover {
    color: var(--mt-text) !important;
    background: rgba(255, 255, 255, 0.06);
}

.navbar .nav-link.active {
    color: var(--mt-text) !important;
}

.navbar .dropdown-menu {
    background: var(--mt-surface-2);
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
    padding: 0.35rem;
    min-width: 160px;
}

.navbar .dropdown-item {
    border-radius: var(--mt-radius-sm);
    color: var(--mt-text-muted);
    font-size: 0.875rem;
    padding: 0.42rem 0.75rem;
    transition: background var(--mt-ease), color var(--mt-ease);
}

.navbar .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--mt-text);
}

.navbar .dropdown-item.active,
.navbar .dropdown-item:active {
    background: var(--mt-accent-dim);
    color: var(--mt-accent);
}

.navbar .dropdown-divider {
    border-color: var(--mt-border);
    margin: 0.3rem 0;
}

/* Search bar */
.navbar .form-control {
    background: var(--mt-surface-2);
    border: 1px solid var(--mt-border);
    color: var(--mt-text);
    border-right: none;
    border-radius: var(--mt-radius) 0 0 var(--mt-radius);
    font-size: 0.875rem;
    transition: border-color var(--mt-ease), box-shadow var(--mt-ease), background var(--mt-ease);
}

.navbar .form-control:focus {
    background: var(--mt-surface-3);
    border-color: rgba(230, 57, 80, 0.45);
    box-shadow: 0 0 0 3px var(--mt-accent-dim);
    color: var(--mt-text);
    outline: none;
}

.navbar .form-control::placeholder {
    color: var(--mt-text-subtle);
}

.navbar .btn-outline-success {
    background: var(--mt-surface-2);
    border: 1px solid var(--mt-border);
    border-left: none;
    color: var(--mt-text-muted);
    border-radius: 0 var(--mt-radius) var(--mt-radius) 0;
    transition: background var(--mt-ease), color var(--mt-ease);
}

.navbar .btn-outline-success:hover {
    background: var(--mt-surface-3);
    color: var(--mt-text);
    border-color: var(--mt-border-hover);
}

/* Count as a small badge at the top right of a navbar link (Playlist, Favorites); hidden when empty */
.nav-badge {
    display: inline-block;
    position: relative;
    top: -0.6em;
    margin-left: 0.1rem;
    min-width: 1.35em;
    padding: 0.2em 0.4em;
    border-radius: 999px;
    background: var(--mt-accent);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.nav-badge:empty {
    display: none;
}

/* Clear button in the search input; the result count badge (.ac-count) moves left of it */
#searchInput::-webkit-search-cancel-button {
    display: none;
}

#searchInput.has-clear {
    padding-right: 2rem;
}

#searchInput.has-clear.has-count {
    padding-right: 4.6rem;
}

.search-clear {
    position: absolute;
    top: 50%;
    right: 44px;    /* clears the search submit button */
    z-index: 6;
    transform: translateY(-50%);
    width: 1.9rem;
    height: 1.9rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--mt-text-muted);
    line-height: 1;
}

.search-clear:hover,
.search-clear:focus-visible {
    color: var(--mt-text);
    background: var(--mt-surface-3);
}

.search-clear:not([hidden]) ~ .ac-count {
    right: calc(44px + 1.9rem);
}

/*
 * Below lg: the search gets its own row under the logo, the hamburger opens #navbarOffcanvas from the right
 */
@media (max-width: 991.98px) {
    :root {
        --mt-navbar-height: 112px;
    }

    .navbar-search {
        order: 10;
        width: 100%;
        margin-top: 0.5rem;
    }

    .navbar-search > .position-relative {
        width: 100%;
    }

    .navbar .offcanvas {
        --bs-offcanvas-width: min(400px, 88vw);
        background: var(--mt-surface);
        border-left: 1px solid var(--mt-border);
    }

    /* Favorites and the user as icons next to the hamburger */
    .navbar-quick {
        align-items: center;
        gap: 0.15rem;
        margin-right: 0.25rem;
    }

    .navbar-quick .nav-link {
        padding: 0.5rem 0.6rem;
        font-size: 1.05rem;
    }

    .navbar-quick .dropdown-toggle::after {
        display: none;
    }

    /* Bootstrap shows dropdowns in a collapsed navbar inline, which would make the navbar taller */
    .navbar-quick .nav-item {
        position: relative;
    }

    .navbar-quick .dropdown-menu {
        position: absolute;
        top: 100%;
        right: 0;
        left: auto;
        margin-top: 0.35rem;
        min-width: 12rem;
    }

    /* Header of the side panel: MyTube, Playlist, "Menu" dropdown, close button */
    .navbar .offcanvas-header {
        gap: 0.5rem;
    }

    .offcanvas-header-nav {
        gap: 0.25rem;
        margin-left: auto;
    }

    .offcanvas-header-nav .nav-link {
        padding: 0.4rem 0.5rem;
        white-space: nowrap;
    }

    /* Bootstrap shows dropdowns in a navbar inline (position: static), here it floats under "Menu" */
    .offcanvas-header-nav .nav-item {
        position: relative;
    }

    .offcanvas-header-nav .dropdown-menu {
        position: absolute;
        top: 100%;
        right: 0;
        left: auto;
        margin-top: 0.35rem;
        min-width: 11rem;
    }

    .offcanvas-header-nav .dropdown-item i {
        margin-right: 0.35rem;
        color: var(--mt-text-subtle);
    }

    .offcanvas-header-nav .dropdown-item.active i {
        color: inherit;
    }

    /* The close button keeps its size and a gap from the screen edge, the rest of the header gives way */
    .navbar .offcanvas-header .btn-close {
        flex-shrink: 0;
        margin: 0 0.35rem 0 0.25rem;
    }

    .offcanvas-header-nav {
        min-width: 0;
    }

    /* "Menu" in the side panel header is an icon, without the dropdown arrow */
    .offcanvas-header-nav .offcanvas-menu-toggle {
        font-size: 1.2rem;
        line-height: 1;
    }

    /* tube.css (loaded later) draws the arrow with .dropdown-toggle::after, hence the longer selector */
    .offcanvas-header-nav .offcanvas-menu-toggle::after {
        display: none;
    }

    /* Narrow phones: smaller gaps, so the header fits on one line */
    @media (max-width: 399.98px) {
        .navbar .offcanvas-header {
            gap: 0.25rem;
        }

        .offcanvas-header-nav .nav-link {
            padding: 0.4rem 0.4rem;
        }
    }

    /* Hamburger: three lines, the middle one shorter, no box */
    .navbar-toggler.mt-burger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        padding: 0;
        border: 0;
        border-radius: var(--mt-radius);
        color: var(--mt-text);
        transition: background var(--mt-ease);
    }

    .navbar-toggler.mt-burger:hover,
    .navbar-toggler.mt-burger[aria-expanded="true"] {
        background: var(--mt-surface-2);
    }

    .navbar-toggler.mt-burger:focus {
        box-shadow: none;
    }

    .navbar-toggler.mt-burger:focus-visible {
        box-shadow: 0 0 0 3px var(--mt-accent-dim);
    }

    .mt-burger-lines {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
        width: 22px;
    }

    .mt-burger-lines span {
        display: block;
        width: 100%;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
        transition: width var(--mt-ease), background var(--mt-ease);
    }

    .mt-burger-lines span:nth-child(2) {
        width: 65%;
        background: var(--mt-accent, #ff0033);
    }

    .navbar-toggler.mt-burger:hover .mt-burger-lines span:nth-child(2) {
        width: 100%;
    }

    /* Video list in the side panel: smaller thumbnails and text than next to the player */
    #offcanvasVideos .sidebar-video {
        margin-top: 0.35rem;
        padding: 4px;
    }

    #offcanvasVideos .video-small-thumb {
        width: 112px;
        height: 63px;
    }

    #offcanvasVideos .video-small-thumb img {
        width: 112px;
    }

    #offcanvasVideos .duration {
        bottom: 8px;
        right: 2px;
        padding: 1px 4px;
        font-size: 10px;
    }

    #offcanvasVideos a.video-title-side {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    #offcanvasVideos .tube-info {
        font-size: 0.7rem;
    }

    /* The navbar is a stacking context (z-index 1030), the open panel must be above the backdrop (1040) */
    .navbar:has(.offcanvas.show),
    .navbar:has(.offcanvas.showing),
    .navbar:has(.offcanvas.hiding) {
        z-index: 1046;
    }

    .navbar .offcanvas-header {
        border-bottom: 1px solid var(--mt-border);
    }

    .navbar .offcanvas-title {
        font-size: 1.25rem;
        font-weight: 700;
    }

    .offcanvas-videos:not(:has(#secondary)) {
        display: none;
    }

    #offcanvasVideos #secondary {
        padding-top: 0;
    }

    /* On /watch: Autoplay and refresh stay under the panel header, only the video list scrolls */
    #offcanvasVideos .secondary-controls {
        position: sticky;
        top: calc(-1 * var(--bs-offcanvas-padding-y));
        z-index: 2;
        margin: calc(-1 * var(--bs-offcanvas-padding-y)) calc(-1 * var(--bs-offcanvas-padding-x)) 0.5rem !important;
        padding: 0.6rem var(--bs-offcanvas-padding-x);
        background: var(--mt-surface);
        border-bottom: 1px solid var(--mt-border);
    }

    #offcanvasVideos .secondary-controls .form-check {
        margin-bottom: 0;
    }
}

/* From lg on the side panel is part of the bar: of its header only the Playlist link is shown, on the right */
@media (min-width: 992px) {
    .navbar-expand-lg .offcanvas .offcanvas-header {
        display: flex;
        justify-content: flex-end;
        padding: 0;
    }
}

/* ── Breadcrumb ───────────────────────────────── */
nav[aria-label="breadcrumb"] {
    padding-top: 0.5rem;
}

.breadcrumb {
    font-size: 0.78rem;
    margin-bottom: 0.25rem;
    gap: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--mt-text-subtle);
    content: "/";
    padding: 0 0.4rem;
}

.breadcrumb-item a {
    color: var(--mt-text-muted);
    text-decoration: none;
    transition: color var(--mt-ease);
}

.breadcrumb-item a:hover {
    color: var(--mt-text);
}

.breadcrumb-item,
.breadcrumb-item.active {
    color: var(--mt-text-subtle);
}

/* ── Buttons ──────────────────────────────────── */
.btn-primary {
    --bs-btn-bg: var(--mt-accent);
    --bs-btn-border-color: var(--mt-accent);
    --bs-btn-hover-bg: #c8283a;
    --bs-btn-hover-border-color: #c8283a;
    --bs-btn-active-bg: #b02030;
    --bs-btn-active-border-color: #b02030;
    --bs-btn-focus-shadow-rgb: 230, 57, 80;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.btn-outline-primary {
    --bs-btn-color: var(--mt-accent);
    --bs-btn-border-color: var(--mt-accent);
    --bs-btn-hover-bg: var(--mt-accent);
    --bs-btn-hover-border-color: var(--mt-accent);
    --bs-btn-hover-color: #fff;
}

.btn-outline-secondary {
    --bs-btn-color: var(--mt-text-muted);
    --bs-btn-border-color: var(--mt-border);
    --bs-btn-hover-bg: var(--mt-surface-3);
    --bs-btn-hover-border-color: var(--mt-border-hover);
    --bs-btn-hover-color: var(--mt-text);
    /* Bootstrap's default disabled gray (#6c757d) would make a disabled button stand out more than an enabled one */
    --bs-btn-disabled-color: var(--mt-text-muted);
    --bs-btn-disabled-border-color: var(--mt-border);
    --bs-btn-disabled-bg: transparent;
}

.btn {
    transition: background var(--mt-ease), border-color var(--mt-ease), color var(--mt-ease), box-shadow var(--mt-ease), transform var(--mt-ease);
}

.btn:active {
    transform: translateY(1px);
}

/* ── Forms ────────────────────────────────────── */
.form-control,
.form-select {
    background-color: var(--mt-surface);
    border-color: var(--mt-border-input);
    color: var(--mt-text);
    border-radius: var(--mt-radius-sm);
    transition: border-color var(--mt-ease), box-shadow var(--mt-ease);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--mt-surface-2);
    border-color: rgba(230, 57, 80, 0.5);
    box-shadow: 0 0 0 3px var(--mt-accent-dim);
    color: var(--mt-text);
}

.form-control::placeholder {
    color: var(--mt-text-subtle);
}

/* Addons next to inputs: Bootstrap uses --bs-border-color, keep them the same as the input */
.input-group-text {
    border-color: var(--mt-border-input);
}

/* Checkbox, radio and switch: Bootstrap draws their outline with --bs-border-color, which is almost
   invisible here (7 % white), so unchecked inputs get their own, stronger outline. Checked inputs keep
   Bootstrap's colors. A radio whose group has nothing checked is :indeterminate too, so only an indeterminate
   checkbox (drawn by Bootstrap as checked) is left out. */
.form-check-input:not(:checked):not([type="checkbox"]:indeterminate) {
    background-color: var(--mt-surface-2);
    border-color: var(--mt-border-input);
}

.form-check-input:not(:checked):not([type="checkbox"]:indeterminate):hover {
    border-color: rgba(255, 255, 255, 0.6);
}

.form-check-input:focus,
.form-check-input:not(:checked):not([type="checkbox"]:indeterminate):focus {
    border-color: rgba(230, 57, 80, 0.6);
    box-shadow: 0 0 0 3px var(--mt-accent-dim);
}

/* The knob of an unchecked switch is 25 % white in Bootstrap's dark theme */
[data-bs-theme="dark"] .form-switch .form-check-input:not(:checked):not(:focus) {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28255, 255, 255, 0.6%29'/%3e%3c/svg%3e");
}

.form-switch .form-check-input:not(:checked):focus {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%28230, 57, 80, 0.8%29'/%3e%3c/svg%3e");
}

/* Range: Bootstrap colors the track with --bs-secondary-bg, the same color as cards here, so it is invisible.
   The rules for WebKit and Firefox stay separate, a selector list with an unknown pseudo-element is dropped whole. */
.form-range::-webkit-slider-runnable-track {
    background-color: rgba(255, 255, 255, 0.2);
}

.form-range::-moz-range-track {
    background-color: rgba(255, 255, 255, 0.2);
}

.form-range:hover::-webkit-slider-runnable-track {
    background-color: rgba(255, 255, 255, 0.28);
}

.form-range:hover::-moz-range-track {
    background-color: rgba(255, 255, 255, 0.28);
}

.form-range:disabled::-webkit-slider-runnable-track {
    background-color: rgba(255, 255, 255, 0.1);
}

.form-range:disabled::-moz-range-track {
    background-color: rgba(255, 255, 255, 0.1);
}

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

label.required::after {
    content: " *";
    color: var(--mt-accent);
}

/* ── Cards ────────────────────────────────────── */
.card {
    background: var(--mt-surface);
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius);
    overflow: hidden;
    transition: border-color var(--mt-ease), box-shadow var(--mt-ease), transform var(--mt-ease);
}

.card:hover {
    border-color: var(--mt-border-hover);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

/* A card with a form (login) stays in place on hover, the lift is meant for clickable cards */
.card.card-static:hover {
    border-color: var(--mt-border);
    box-shadow: none;
    transform: none;
}

.card-body {
    padding: 0.75rem;
}

/* ── Tables ───────────────────────────────────── */
.table {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--mt-border);
    --bs-table-color: var(--mt-text);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
}

.table th {
    color: var(--mt-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom-color: var(--mt-border-hover);
}

/* ── Modals ───────────────────────────────────── */
.modal-content {
    background: var(--mt-surface);
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius-lg);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
}

.modal-header {
    border-bottom-color: var(--mt-border);
    padding: 1.1rem 1.25rem 0.85rem;
}

.modal-footer {
    border-top-color: var(--mt-border);
}

.modal-footer:empty {
    display: none;
}

.modal-title {
    font-weight: 600;
    font-size: 1rem;
}

/* ── Toasts ───────────────────────────────────── */
.toast {
    background: var(--mt-surface-2);
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ── Alerts ───────────────────────────────────── */
.alert {
    border-radius: var(--mt-radius);
    border: 1px solid;
    font-size: 0.875rem;
}

/* ── Badges ───────────────────────────────────── */
.badge {
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ── Dropdown (generic) ───────────────────────── */
.dropdown-menu {
    background: var(--mt-surface-2);
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    padding: 0.35rem;
}

.dropdown-item {
    border-radius: var(--mt-radius-sm);
    color: var(--mt-text-muted);
    font-size: 0.875rem;
    padding: 0.42rem 0.75rem;
    transition: background var(--mt-ease), color var(--mt-ease);
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--mt-text);
}

.dropdown-item:active {
    background: var(--mt-accent-dim);
    color: var(--mt-accent);
}

.dropdown-divider {
    border-color: var(--mt-border);
}

/* ── Pagination ───────────────────────────────── */
.pagination {
    gap: 0.2rem;
}

.page-link {
    background: var(--mt-surface);
    border-color: var(--mt-border);
    color: var(--mt-text-muted);
    border-radius: var(--mt-radius-sm) !important;
    font-size: 0.875rem;
    transition: background var(--mt-ease), color var(--mt-ease), border-color var(--mt-ease);
}

.page-link:hover {
    background: var(--mt-surface-2);
    border-color: var(--mt-border-hover);
    color: var(--mt-text);
}

.page-item.active .page-link {
    background: var(--mt-accent);
    border-color: var(--mt-accent);
    color: #fff;
}

/* ── Footer ───────────────────────────────────── */
.footer {
    margin-top: 3rem;
    border-top: 1px solid var(--mt-border);
    background: var(--mt-surface) !important;
}

.footer .container {
    color: var(--mt-text-muted);
    font-size: 0.85rem;
    padding-top: 2rem;
    padding-bottom: 1.25rem;
}

.footer-main {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.footer-brand .brand {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--mt-text);
    text-decoration: none;
}

.footer-tagline {
    margin: 0.35rem 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.footer-links a {
    color: var(--mt-text-muted);
    text-decoration: none;
    transition: color var(--mt-ease);
}

.footer-links a:hover,
.footer-links a.active {
    color: var(--mt-text);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    margin-top: 1.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--mt-border);
    color: var(--mt-text-subtle);
    font-size: 0.75rem;
}

/* ── 404 ──────────────────────────────────────── */
.page-404 {
    margin-top: 100px;
    text-align: center;
}

.page-404 h1 {
    font-weight: 800;
    font-size: 480%;
    margin-bottom: 0;
    background: linear-gradient(135deg, var(--mt-accent), var(--mt-accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Utility ──────────────────────────────────── */
.text-muted {
    color: var(--mt-text-muted) !important;
}

.border {
    border-color: var(--mt-border) !important;
}

.bg-body-tertiary {
    background-color: var(--mt-surface) !important;
}

.click-to-copy {
    cursor: pointer;
}

.click-to-copy:hover {
    background-color: var(--mt-surface-3);
}

.qr-code {
    display: inline-block;
    padding: 5px;
    background-color: #fff;
    border-radius: var(--mt-radius-sm);
}

.fixed-button {
    position: fixed;
    bottom: 50px;
    right: 50px;
    border: none;
}

tr.has-error td,
tr.has-error td a {
    color: var(--mt-accent) !important;
}

.link-list a.selected {
    background-color: var(--mt-accent);
}
