@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500&family=Inter:wght@400;500;600&display=swap');

:root {
    --color-primary: #2563eb;
    --color-secondary: #f97316;
    --color-bg: #f5f7fb;
    --color-text: #1f2937;
    --color-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-success: #16a34a;
    --color-error: #dc2626;
    --login-hero-start: #eff4ff;
    --login-hero-end: #f6fbff;
    --login-hero-accent: #c7d2fe;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    color: var(--color-text);
    background: #f8fafc;
    min-height: 100vh;
    line-height: 1.6;
}

body.container-fluid {
    display: block;
    padding: clamp(10px, 1.6vw, 20px);
    background: radial-gradient(circle at 10% 20%, #fff9f7 0%, #eef2ff 35%, #e0f2fe 100%);
    color: var(--color-text);
}

.mt-3 {
    width: 100%;
    max-width: none;
}

.login-hero {
    background: linear-gradient(160deg, var(--login-hero-start), var(--login-hero-end));
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 32px;
    padding: clamp(24px, 4vw, 36px);
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    overflow: hidden;
}

.login-hero::before,
.login-hero::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    filter: blur(0.5px);
    opacity: 0.5;
}

.login-hero::before {
    width: 220px;
    height: 220px;
    background: rgba(99, 102, 241, 0.35);
    right: -60px;
    top: -60px;
}

.login-hero::after {
    width: 180px;
    height: 180px;
    background: rgba(14, 165, 233, 0.25);
    left: -70px;
    bottom: -70px;
}

.login-hero__badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.2);
    background: rgba(255, 255, 255, 0.55);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.login-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.6rem);
}

.login-hero__intro {
    font-size: 1.05rem;
    color: #1e293b;
    margin: 0;
}

.login-benefits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.login-benefits li {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 22px;
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    align-items: flex-start;
}

.login-benefits span {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.3));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.login-benefits strong {
    display: block;
    font-size: 1rem;
    color: var(--color-text);
}

.login-benefits p {
    margin: 4px 0 0;
    color: var(--color-muted);
}

.login-hero__cta {
    position: relative;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 22px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.login-scan-tip__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.login-panel {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-text);
    border-radius: 24px;
    padding: clamp(16px, 2vw, 24px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 16px;
    backdrop-filter: blur(6px);
}

.login-panel .eyebrow {
    color: var(--color-primary);
    margin: 0;
}

.login-panel .subtitle {
    color: var(--color-muted);
    margin: 0;
}

.login-panel__header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.login-panel__header h2 {
    margin: 0;
}

.login-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(240px, 1fr));
    gap: 14px;
}

@media (max-width: 1320px) {
    .login-options {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }
}

@media (max-width: 860px) {
    .login-options {
        grid-template-columns: 1fr;
    }
}

.login-card {
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 20px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 50px rgba(15, 23, 42, 0.12);
}

.login-card h3 {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.25;
}


.login-card label {
    font-weight: 600;
}

.login-card .stacked-form input[type="text"] {
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.7);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-card .stacked-form input[type="text"]:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.login-card--accent {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    box-shadow: 0 30px 55px rgba(37, 99, 235, 0.35);
}

.login-card--accent .btn {
    background: #fff;
    color: #1d4ed8;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.25);
}

.login-card--accent .btn:hover {
    transform: translateY(-1px);
}

.login-card--accent .muted,
.login-card--accent h3,
.login-card--accent .login-list li {
    color: rgba(248, 250, 252, 0.9);
}

.login-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: rgba(37, 99, 235, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.login-card--accent .login-card__icon {
    background: rgba(255, 255, 255, 0.18);
}

.login-card--qr {
    border-color: rgba(14, 165, 233, 0.5);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(59, 130, 246, 0.05));
}

.login-card--qr .login-card__icon {
    background: rgba(14, 165, 233, 0.18);
    color: #0369a1;
}

.login-qr {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.login-qr__image-wrapper {
    display: flex;
    justify-content: center;
    padding: 10px;
    background: #fff;
    border-radius: 20px;
    border: 1px dashed rgba(14, 165, 233, 0.4);
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.6);
}

.login-qr__image {
    width: min(160px, 100%);
    aspect-ratio: 1 / 1;
}

.login-qr__status {
    margin: 0;
    font-weight: 600;
    color: #0f172a;
    background: rgba(226, 232, 240, 0.6);
    border-radius: 14px;
    padding: 10px 12px;
}

.login-qr__status.is-error {
    color: var(--color-error);
    background: rgba(248, 113, 113, 0.1);
}

.login-qr__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.login-card--qr.is-loading .login-qr__image {
    opacity: 0.5;
    filter: grayscale(0.1);
}

.login-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.95rem;
    color: var(--color-muted);
}

.login-divider {
    display: none;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.login-divider::before,
.login-divider::after {
    content: '';
    height: 1px;
    flex: 1;
    background: rgba(226, 232, 240, 0.9);
}

.login-footer {
    text-align: center;
    margin-top: 0;
}

.login-scan-tip p {
    margin: 4px 0 0;
    color: var(--color-text);
}

.login-card h2 {
    margin-top: 0;
}

.form-error {
    color: var(--color-error);
    margin: 8px 0 0;
    font-weight: 600;
}

.form-success {
    color: #166534;
    margin: 8px 0 0;
    font-weight: 600;
}

body.container-fluid .btn {
    border-radius: 16px;
    padding: 12px 20px;
}

body.container-fluid .btn--secondary {
    background: #fff;
    color: var(--color-primary);
    border: 1px solid rgba(37, 99, 235, 0.4);
    box-shadow: 0 15px 25px rgba(15, 23, 42, 0.08);
}

body.container-fluid .btn--secondary:hover {
    background: rgba(37, 99, 235, 0.08);
}

body.container-fluid .btn--ghost {
    border-radius: 14px;
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: var(--color-primary);
    background: transparent;
}

@media (max-height: 820px) and (min-width: 960px) {
    .login-panel {
        padding: 14px;
    }

    .login-card {
        padding: 12px;
    }

    .login-qr__image {
        width: min(130px, 100%);
    }
}

.login-help {
    text-align: center;
    margin: 0;
}

body.basic-layout {
    background: var(--color-bg);
}

body.dashboard-page {
    background: #ffffff;
    color: var(--color-text);
}

body.basic-layout header,
body.basic-layout main {
    width: 100%;
    margin: 0;
}

body.basic-layout header {
    padding: 0;
}

body.basic-layout main {
    padding-bottom: 48px;
}

body.basic-layout nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

body.basic-layout nav a {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.9rem;
}

.dialog {
    max-width: 560px;
    margin: 10vh auto;
    background: #fff;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.2);
    border: 1px solid var(--color-border);
}

.dialog h1 {
    margin-top: 0;
}

body.basic-layout .nav-chip {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 600;
}

body.theme-streaming {
    background: radial-gradient(circle at top, #0f172a 0%, #020617 60%);
    color: #f8fafc;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}


body.with-toolbar {
    padding-top: 84px;
}

.app-toolbar {
    width: 100%;
}

.app-toolbar .container-fluid {
    max-width: 100%;
}

.app-toolbar__search {
    min-width: min(420px, 100%);
    max-width: 920px;
    gap: 8px;
}

.app-toolbar__search .form-control {
    min-height: 46px;
}

.app-toolbar__avatar {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0d6efd;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}

.app-toolbar__user-dropdown {
    position: relative;
}

.app-toolbar__user-dropdown summary::-webkit-details-marker {
    display: none;
}


.app-toolbar .btn,
.app-toolbar .btn:hover,
.app-toolbar .btn:focus,
.app-toolbar .btn:active {
    box-shadow: none !important;
    transform: none !important;
}

.app-toolbar__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 260px;
    border-radius: 16px;
    border: 1px solid #dee2e6;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.18);
    padding: 8px;
}

body.with-toolbar main,
body.with-toolbar .page {
    margin-top: 0;
    padding-top: 12px;
}

.app-header {
    background: radial-gradient(circle at top left, #1d4ed8, #1e3a8a);
    color: #fff;
    padding: 32px 0 48px;
    position: relative;
}

.theme-streaming .app-header.streaming-hero {
    background: linear-gradient(135deg, #111827 0%, #0f172a 40%, #111 100%);
    padding-bottom: 24px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
}

.app-header h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

.theme-streaming .subtitle {
    color: rgba(248, 250, 252, 0.85);
}

.header-actions {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

.header-logout {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
}

@media (max-width: 768px) {
    .header-logout {
        position: static;
        align-self: flex-end;
        margin: 0 16px 12px auto;
    }
}

.theme-streaming .header-actions .btn--ghost {
    border-color: rgba(255, 255, 255, 0.3);
}

.role-badge {
    display: inline-flex;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-weight: 500;
    text-transform: capitalize;
}

.header-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.page {
    margin-top: 24px;
    padding-bottom: 56px;
}

.streaming-page {
    margin-top: 12px;
}

.panel {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.2);
    margin-bottom: 20px;
}

.theme-streaming .panel {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: inherit;
}

.panel__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.panel__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}



.dashboard-metrics .card {
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: var(--color-text);
}

.dashboard-metrics .display-6 {
    font-weight: 600;
}

.dashboard-filter-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dashboard-filter-form select {
    min-height: 40px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    padding: 0 14px;
    background: #fff;
}

.article-detail-page .header-content {
    align-items: center;
    gap: clamp(18px, 3vw, 48px);
}

.article-detail-hero .hero-copy {
    max-width: 720px;
}

.article-highlight {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.article-cover {
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-cover img {
    max-width: min(280px, 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.article-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

.article-detail-actions .btn {
    width: auto;
}


.article-detail-actions--inline {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
}

.article-detail-actions--inline label {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
}

.article-detail-actions--inline input {
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    padding: 0 10px;
    background: #fff;
}

.article-cta {
    margin: 0;
}

.article-detail-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(18px, 3vw, 36px);
    align-items: start;
}

.article-detail-panel__status,
.article-detail-panel__description {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-detail-summary {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.article-detail-summary li {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.article-detail-summary span {
    font-size: 0.85rem;
    color: rgba(248, 250, 252, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.article-detail-summary strong {
    font-size: 1rem;
    color: #f8fafc;
}

.article-detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(16px, 3vw, 32px);
}

.article-detail-meta-grid article {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-manual-links li + li {
    margin-top: 6px;
}

.article-detail-page .panel h2,
.article-detail-page .panel h3 {
    margin-top: 0;
}

.empty-state-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
    align-items: center;
    justify-content: center;
    min-height: 260px;
}

@media (max-width: 960px) {
    .article-detail-actions {
        width: 100%;
        align-items: stretch;
    }

    .article-detail-actions .btn,
    .article-cta .btn {
        width: 100%;
    }
}

.metrics-grid {
    display: grid;
    gap: 18px;
}

.metrics-grid--two {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.metric-card {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.theme-streaming .metric-card {
    background: rgba(15, 23, 42, 0.65);
    border-color: rgba(148, 163, 184, 0.35);
}

.metric-card h3 {
    margin-top: 0;
}

.metric-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metric-list__item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.metric-list__item--empty {
    text-align: center;
    color: var(--color-muted);
    justify-content: center;
}

.theme-streaming .metric-list__item--empty {
    color: rgba(226, 232, 240, 0.75);
}

.metric-badge {
    background: rgba(37, 99, 235, 0.15);
    color: var(--color-primary);
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
}

.search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.search-bar input[type="text"] {
    flex: 1;
    min-width: 220px;
    padding: 12px 14px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    font-size: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.btn:focus {
    outline: 3px solid rgba(37, 99, 235, 0.25);
}

.btn--primary, .btn {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.btn--secondary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-primary);
    box-shadow: none;
}

.btn--danger {
    background: var(--color-error);
    color: #fff;
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.35);
}

.btn--danger:hover {
    background: #b91c1c;
}

.btn--ghost {
    background: rgba(255, 255, 255, 0.15);
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: none;
}

.theme-streaming .btn--ghost {
    color: #f8fafc;
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.3);
}

.muted {
    color: var(--color-muted);
    font-size: 0.95rem;
}

.theme-streaming .muted {
    color: rgba(226, 232, 240, 0.7);
}

.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-weight: 500;
}

.alert--success {
    background: rgba(22, 163, 74, 0.15);
    color: var(--color-success);
}

.alert--error {
    background: rgba(220, 38, 38, 0.15);
    color: var(--color-error);
}

.alert--info {
    background: rgba(37, 99, 235, 0.15);
    color: var(--color-primary);
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.book-rail {
    position: relative;
}

.book-rail__items {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 260px;
    gap: 24px;
    overflow-x: auto;
    padding: 8px 4px 12px;
    scroll-snap-type: x proximity;
    justify-content: flex-start;
}

.book-rail__items > * {
    scroll-snap-align: start;
}

.book-tile {
    background: rgba(15, 23, 42, 0.85);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    display: flex;
    flex-direction: column;
    min-height: 320px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

body:not(.theme-streaming) .book-tile {
    background: #fdfdff;
    border-color: var(--color-border);
}

.book-tile:hover,
.book-tile:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(248, 250, 252, 0.6);
}

.book-tile:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

.book-tile form,
.book-tile button,
.book-tile .btn {
    cursor: default;
}

.book-tile__cover {
    width: calc(100% - 36px);
    margin: 18px 18px 0;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: rgba(15, 23, 42, 0.65);
    position: relative;
}

.book-tile__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.book-tile__meta-summary {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: flex;
    justify-content: flex-end;
}

.book-tile__meta-summary .badge {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.book-tile__body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.book-tile__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.book-tile__meta {
    margin: 0;
    color: rgba(226, 232, 240, 0.85);
    font-size: 0.9rem;
}

body:not(.theme-streaming) .book-tile__meta {
    color: var(--color-muted);
}

.loan-info {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-secondary);
}

.loan-info strong {
    font-weight: 600;
}

.book-tile__form {
    margin-top: auto;
}

.book-tile--loan {
    min-height: 280px;
}


.book-tile--loan .book-tile__body {
    border-top: none;
}

.loan-due.is-overdue {
    color: var(--color-error);
}

.book-card {
    background: #fdfdff;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    padding: 0 0 16px;
    gap: 12px;
    min-height: 100%;
}

.book-card__cover {
    background: #eef2ff;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-card__cover img {
    max-height: 180px;
    width: auto;
    object-fit: contain;
}

.book-card__meta {
    color: var(--color-muted);
    margin: 0;
}

.book-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1000;
    backdrop-filter: blur(6px);
}

.book-detail-overlay.is-visible {
    display: flex;
}

.book-detail {
    background: linear-gradient(135deg, #0f172a, #0b1120);
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 25px 80px rgba(2, 6, 23, 0.65);
    width: min(960px, 100%);
    color: #f8fafc;
    padding: 32px;
    position: relative;
    display: grid;
    grid-template-columns: minmax(180px, 220px) 1fr;
    gap: 24px;
}

.book-detail__cover {
    border-radius: 16px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.28);
    min-height: 260px;
}

.book-detail__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.book-detail__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: #f8fafc;
    font-size: 1.75rem;
    cursor: pointer;
}

.book-detail__info {
    display: flex;
    flex-direction: column;
}

@media (max-width: 760px) {
    .book-detail {
        grid-template-columns: 1fr;
    }

    .book-detail__cover {
        max-width: 220px;
        margin: 8px auto 0;
        width: 100%;
        aspect-ratio: 2 / 3;
        min-height: 0;
    }
}

.book-detail__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    color: rgba(248, 250, 252, 0.7);
    margin: 0 0 8px;
}

.book-detail__title {
    margin: 0 0 4px;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.book-detail__authors {
    margin: 0 0 16px;
    color: rgba(248, 250, 252, 0.8);
}

.book-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 18px;
    color: rgba(226, 232, 240, 0.8);
}

.book-detail__meta .badge {
    align-self: flex-start;
}

.book-detail__loan-note {
    margin: 4px 0 12px;
    font-size: 0.95rem;
    color: var(--color-secondary);
    display: none;
}

.book-detail__loan-note.is-visible {
    display: block;
}

.book-detail__description {
    margin: 0;
    line-height: 1.6;
    color: rgba(241, 245, 249, 0.9);
}

.book-detail__actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.book-card__actions form {
    margin: 0;
}

.book-card__actions .btn {
    width: 100%;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge--success {
    background: rgba(22, 163, 74, 0.15);
    color: var(--color-success);
}

.badge--muted {
    background: rgba(107, 114, 128, 0.15);
    color: var(--color-muted);
}

.loan-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.loan-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.loan-card__cover {
    width: 90px;
    height: 120px;
    background: #eef2ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.loan-card__content {
    flex: 1;
    min-width: 220px;
}

.loan-card__meta {
    margin: 4px 0;
    color: var(--color-muted);
}

.loan-card__dates {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 0;
}

.loan-card__due {
    font-weight: 600;
}

.loan-card__due.is-overdue {
    color: var(--color-error);
}

.loan-card__actions form {
    margin: 0;
}

.library-card-panel {
    padding: 0;
    background: none;
    box-shadow: none;
}

.library-card {
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 40%, #4338ca 100%);
    color: #fff;
    border-radius: 20px;
    padding: 20px 24px;
    box-shadow: 0 20px 45px rgba(11, 102, 194, 0.35);
    position: relative;
    overflow: hidden;
    width: clamp(240px, 38vw, 340px);
    aspect-ratio: 85.6 / 54;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.library-card::after {
    content: '';
    position: absolute;
    inset: -40% auto auto -40%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.35), transparent 60%);
    transform: rotate(15deg);
    pointer-events: none;
}

.library-card__identity {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.library-card__name {
    margin: 0;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.library-card__code {
    font-size: clamp(1.5rem, 4vw, 2rem);
    letter-spacing: 0.28em;
    margin: 0;
    font-weight: 700;
}

.library-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;
    width: 100%;
}

.library-card__qr {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

.library-card__qr img {
    width: min(120px, 45%);
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

.library-card--hero {
    flex: 1;
    max-width: none;
}

.btn--small {
    padding: 8px 14px;
    font-size: 0.85rem;
    border-radius: 14px;
}

.hero-highlight {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.hero-highlight span {
    background: rgba(15, 23, 42, 0.25);
    padding: 6px 16px;
    border-radius: 999px;
    font-weight: 600;
}

.hero-tools {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    flex-wrap: wrap;
    align-items: stretch;
}

.hero-layout {
    display: grid;
    gap: 24px;
    margin-top: 24px;
}

.hero-layout__column {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hero-layout__column--card {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

@media (min-width: 992px) {
    .hero-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


.hero-search {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 0;
    padding: 0;
}

.hero-search__fields {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.35);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.hero-search__hint {
    margin: 0;
}

.hero-search input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(2, 6, 23, 0.45);
    color: #f8fafc;
}

.hero-search__fields .btn,
.hero-search__fields .btn--ghost {
    margin: 0;
    flex-shrink: 0;
}

.hero-search input::placeholder {
    color: rgba(248, 250, 252, 0.6);
}

.barcode-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.1);
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    border: 1px dashed rgba(148, 163, 184, 0.5);
}

.card-management-help {
    margin-bottom: 16px;
}

.table-wrapper {
    overflow-x: auto;
}

.admin-book-actions__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
}

.status-pill--active {
    background: rgba(34, 197, 94, 0.15);
    color: var(--color-success);
}

.status-pill--inactive {
    background: rgba(148, 163, 184, 0.2);
    color: var(--color-muted);
}

.status-pill--warning {
    background: rgba(249, 115, 22, 0.2);
    color: #ea580c;
}

.status-pill--muted {
    background: rgba(148, 163, 184, 0.25);
    color: var(--color-muted);
}

.table-row--inactive {
    opacity: 0.8;
}

.admin-book-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.table-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-filter {
    max-width: 100%;
}

.history-filter__row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.history-filter__row input[type="text"] {
    flex: 1;
    min-width: 220px;
}

.history-selected {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    padding: 16px 20px;
    background: #f8fafc;
    margin-bottom: 24px;
}

.stacked-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    margin-bottom: 24px;
}

.stacked-form.form-two-column {
    max-width: 100%;
}

.form-two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px 24px;
}

.form-two-column .form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field--checkbox {
    grid-column: 1 / -1;
}

.form-field--checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-image-preview {
    width: 100%;
    max-width: 260px;
    border-radius: 16px;
    margin-top: 8px;
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.2);
}

.stacked-form input[type="text"],
.stacked-form input[type="number"],
.stacked-form input[type="email"],
.stacked-form select,
.stacked-form textarea {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    font-size: 1rem;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.inline-form input[type="text"] {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.loan-table-book {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

header nav a {
    color: inherit;
    font-weight: 600;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

main table {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}

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

table th {
    background: #f8fafc;
    font-weight: 600;
}

table tr:last-child td {
    border-bottom: none;
}

@media (max-width: 960px) {
    body.container-fluid {
        padding: 14px 10px;
    }

    .login-panel {
        padding: 18px;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        align-items: flex-start;
    }

    .header-nav {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .hero-tools {
        flex-direction: column;
    }

    .library-card--hero {
        width: 100%;
    }

    .hero-search,
    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-search .btn,
    .hero-search .btn--ghost {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .book-rail__items {
        grid-auto-columns: minmax(220px, 80%);
    }

    .hero-highlight {
        flex-direction: column;
    }

}

@media (max-width: 640px) {
    .loan-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .book-card__cover {
        min-height: 180px;
    }

}

.mobile-scanner-layout {
    background: radial-gradient(circle at top, #020617 0%, #0f172a 60%, #000 100%);
    color: var(--color-text);
    min-height: 100vh;
    margin: 0;
    padding: 16px;
}

.mobile-scanner-header,
.mobile-scanner-main {
    width: min(960px, calc(100% - 24px));
    margin: 0 auto;
}

.mobile-scanner-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-top: 16px;
}

.mobile-scanner-main {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.scanner-panel {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 24px;
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.scanner-status {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scanner-video-wrapper {
    background: rgba(2, 6, 23, 0.6);
    border-radius: 18px;
    border: 1px dashed rgba(148, 163, 184, 0.4);
    padding: 12px;
    text-align: center;
}

.scanner-video-wrapper video {
    width: 100%;
    border-radius: 12px;
    max-height: 280px;
    background: #000;
}

.scanner-status__text {
    margin: 8px 0 0;
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.8);
}

.scanner-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.scanner-targets {
    display: inline-flex;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.scanner-targets label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
}

.scanner-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.scanner-log {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scanner-log__item {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 12px 16px;
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.scanner-log__item.is-success {
    border-color: rgba(34, 197, 94, 0.5);
}

.scanner-log__item.is-error {
    border-color: rgba(239, 68, 68, 0.5);
}

.scanner-log__item p {
    margin: 0;
}

.scanner-log__details {
    color: rgba(226, 232, 240, 0.8);
    font-size: 0.85rem;
}

.scanner-loans {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 24px;
    padding: 24px;
}

.scanner-loans__header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.loan-pill-list {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.loan-pill {
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    padding: 12px 16px;
    background: rgba(2, 6, 23, 0.5);
}

.loan-pill--overdue {
    border-color: rgba(239, 68, 68, 0.6);
}

.loan-pill--empty {
    text-align: center;
    color: rgba(226, 232, 240, 0.6);
    font-style: italic;
}

.loan-pill__title {
    margin: 0 0 4px;
    font-weight: 600;
}

.loan-pill__meta {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.8);
}

@media (max-width: 640px) {
    .scanner-panel {
        padding: 16px;
    }

    .mobile-scanner-header {
        flex-direction: column;
    }
}

/* Artikeldetail pagina */
body.article-page {
    margin: 0;
    background: #020617;
    color: #0f172a;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.article-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
    color: #fff;
    padding: 64px 24px;
}

.article-hero__wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
    align-items: center;
}

.article-hero__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 640px;
}

.article-hero__eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    opacity: 0.8;
}

.article-hero__media {
    margin: 0;
    background: rgba(15, 23, 42, 0.35);
    padding: 16px;
    border-radius: 24px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
}

.article-hero__media img {
    width: 100%;
    border-radius: 18px;
    object-fit: cover;
    max-height: 360px;
}

.article-hero__description {
    margin: 0;
    max-width: 720px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.article-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-weight: 600;
}

.article-page__container {
    max-width: 1200px;
    margin: -80px auto 0;
    padding: 0 24px 64px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.article-panel {
    background: #fff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.15);
}

.article-panel h2 {
    margin-top: 0;
}

.article-panel__note {
    font-size: 0.9rem;
    color: #475569;
}

.qr-hero .header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.qr-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
    align-items: center;
}

.qr-panel__code {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.qr-panel__code img {
    width: 100%;
    max-width: 260px;
    height: auto;
}

.qr-panel__code p {
    margin: 0;
    color: var(--color-muted);
}

.qr-panel__details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qr-panel__cover {
    width: 100%;
    max-width: 320px;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.qr-panel__details .article-property-list {
    margin-top: 0;
}

.article-properties {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 0;
}

.article-properties div {
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
}

.article-properties dt {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 4px;
    color: #64748b;
}

.article-properties dd {
    margin: 0;
    font-weight: 600;
}

.article-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 600;
    color: #1d4ed8;
}

.form-hint {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: #64748b;
}

.form-hint code {
    background: rgba(148, 163, 184, 0.2);
    padding: 2px 6px;
    border-radius: 6px;
}

.article-property-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9rem;
}

.article-property-list li {
    margin: 0;
}

.article-property-list strong {
    margin-right: 4px;
}

/* QR kaart */
body.qr-card-page {
    margin: 0;
    padding: 32px;
    background: #020617;
    color: #fff;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.qr-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.qr-card-header__actions {
    display: flex;
    gap: 12px;
}

.qr-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    background: #fff;
    color: #0f172a;
    border-radius: 32px;
    padding: 32px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
}

.qr-card__code {
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-card__code img {
    width: 280px;
    height: 280px;
    border-radius: 24px;
    background: #fff;
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

.qr-card__info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qr-card__eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    color: #94a3b8;
}

.qr-card__info h2 {
    margin: 0;
}

@media (max-width: 640px) {
    .article-hero {
        padding: 48px 16px;
    }

    .article-page__container {
        padding: 0 16px 48px;
        margin-top: -60px;
    }
}

@media (max-width: 900px) {
    body.with-toolbar {
        padding-top: 132px;
    }

    .app-toolbar .d-flex.flex-wrap {
        row-gap: 10px;
    }

    .app-toolbar__search {
        order: 3;
        width: 100%;
        min-width: 100%;
    }

    .app-toolbar__search .form-control,
    .app-toolbar__search .btn,
    .app-toolbar .btn-danger {
        min-height: 42px;
    }

    .app-toolbar__avatar {
        width: 42px;
        height: 42px;
    }
}

.dashboard-page .panel {
    background: #fff;
}

.dashboard-page .book-tile {
    background: #fff;
}

.calendar-legend {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.legend-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    color: #fff;
}

.legend-pill--loan { background: #ef4444; }
.legend-pill--reservation { background: #2563eb; }

.month-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.month-calendar__head {
    font-weight: 600;
    color: var(--color-muted);
    text-align: center;
    font-size: 0.85rem;
}

.month-calendar__cell {
    min-height: 72px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 6px;
    background: #fff;
}

.month-calendar__cell.is-empty {
    background: #f8fafc;
}

.month-calendar__day {
    font-size: 0.85rem;
    font-weight: 600;
}

.month-calendar__event {
    display: block;
    height: 8px;
    border-radius: 999px;
    margin-top: 6px;
}

.month-calendar__event.is-loan { background: #ef4444; }
.month-calendar__event.is-reservation { background: #2563eb; }

.reserve-modal .month-calendar__cell {
    min-height: 56px;
}

.reserve-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
}

.reserve-form__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.9rem;
    color: rgba(248, 250, 252, 0.88);
}

.reserve-form__field input[type="date"],
.reserve-form__field input[type="month"] {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.45);
    color: #f8fafc;
    border-radius: 10px;
    min-height: 40px;
    padding: 0 10px;
    font: inherit;
}

.reserve-form__field input[type="date"]::-webkit-calendar-picker-indicator,
.reserve-form__field input[type="month"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.4);
    cursor: pointer;
}

.reserve-form__field input:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22);
}

.reserve-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.reserve-modal .calendar-legend {
    margin-bottom: 14px;
}

.reserve-modal .legend-pill {
    font-size: 0.78rem;
    font-weight: 600;
}

.reserve-modal .month-calendar {
    gap: 6px;
}

.reserve-modal .month-calendar__head {
    color: rgba(248, 250, 252, 0.9);
    background: rgba(30, 41, 59, 0.55);
    border-radius: 8px;
    padding: 5px 4px;
}

.reserve-modal .month-calendar__cell {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.25);
    min-height: 64px;
}

.reserve-modal .month-calendar__cell.is-empty {
    background: rgba(15, 23, 42, 0.3);
    border-style: dashed;
}

.reserve-modal .month-calendar__day {
    color: #e2e8f0;
}

.reserve-modal .month-calendar__cell.has-loan {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.22), rgba(15, 23, 42, 0.72));
}

.reserve-modal .month-calendar__cell.has-reservation {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.24), rgba(15, 23, 42, 0.72));
}

.reserve-modal .month-calendar__cell.has-loan-and-reservation {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.2) 0%, rgba(37, 99, 235, 0.22) 65%, rgba(15, 23, 42, 0.72) 100%);
}

@media (max-width: 760px) {
    .reserve-calendar-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

.reservation-calendar-filter {
    margin-bottom: 1rem;
}

.reservation-calendar-filter label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text);
    font-weight: 500;
}

.reservation-calendar-filter input[type="month"] {
    min-height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: #fff;
    color: var(--color-text);
    padding: 0 12px;
    font: inherit;
}

.reservation-calendar-filter input[type="month"]::-webkit-calendar-picker-indicator {
    filter: none;
}

.reservation-calendar-filter input[type="month"]:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.reservation-calendar-page .month-calendar__cell.has-events {
    cursor: help;
}

.theme-streaming .reservation-calendar-filter label {
    color: #e2e8f0;
}

.theme-streaming .reservation-calendar-filter input[type="month"] {
    background: rgba(15, 23, 42, 0.78);
    color: #f8fafc;
    border-color: rgba(148, 163, 184, 0.45);
}

.has-tooltip {
    position: relative;
}

.has-tooltip:hover::after,
.has-tooltip:focus-visible::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 8px);
    background: rgba(15, 23, 42, 0.96);
    color: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.78rem;
    line-height: 1.35;
    white-space: pre-line;
    min-width: 220px;
    max-width: 320px;
    z-index: 30;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.32);
    pointer-events: none;
}

.month-calendar__event.has-tooltip:hover::after,
.month-calendar__event.has-tooltip:focus-visible::after {
    left: 0;
    transform: none;
    bottom: calc(100% + 6px);
}

.has-tooltip:hover::before,
.has-tooltip:focus-visible::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 2px);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.96) transparent transparent transparent;
    z-index: 31;
}

.month-calendar__event.has-tooltip:hover::before,
.month-calendar__event.has-tooltip:focus-visible::before {
    left: 10px;
    transform: none;
}
