html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: #f7f4ef;
  color: #28231f;
}

:root { --book-primary: #71523b; --book-dark: #34251b; --book-soft: #eee5da; }
.dashboard-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:1.5rem; margin-bottom:1.5rem; }
.dashboard-heading h1 { margin:.15rem 0 .35rem; font-size:clamp(2.2rem,5vw,3.4rem); font-weight:780; letter-spacing:-.05em; }
.dashboard-heading p { margin:0; color:#74695f; }
.dashboard-actions { display:flex; gap:.6rem; }
.dashboard-kpis { display:grid; grid-template-columns:repeat(4,1fr); gap:1rem; margin-bottom:1rem; }
.dashboard-kpi { display:flex; flex-direction:column; min-height:145px; padding:1.2rem; border:1px solid #e3d9d0; border-radius:17px; background:white; color:inherit; text-decoration:none; box-shadow:0 6px 22px rgba(52,37,27,.035); transition:transform .15s ease,box-shadow .15s ease; }
.dashboard-kpi:hover { color:inherit; transform:translateY(-2px); box-shadow:0 12px 28px rgba(52,37,27,.09); }
.dashboard-kpi span { color:#74695f; font-weight:700; }
.dashboard-kpi strong { margin:auto 0 0; color:var(--book-dark); font-size:2.45rem; line-height:1; }
.dashboard-kpi small { margin-top:.35rem; color:#8a7e74; }
.dashboard-kpi.is-positive { border-top:4px solid #568262; }
.dashboard-kpi.is-warning { border-top:4px solid #c23d34; background:#fff9f8; }
.dashboard-kpi.is-warning small { color:#a52d25; font-weight:700; }
.dashboard-alerts { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:.7rem; margin-bottom:1rem; }
.dashboard-alerts a { display:grid; grid-template-columns:auto 1fr; align-items:center; gap:.15rem .75rem; padding:.8rem 1rem; border:1px solid #e5b5af; border-radius:13px; background:#fff9f8; color:inherit; text-decoration:none; }
.dashboard-alerts strong { grid-row:1 / 3; color:#a52d25; font-size:1.75rem; }
.dashboard-alerts span { font-weight:700; }
.dashboard-alerts b { color:#a52d25; font-size:.72rem; }
.dashboard-grid { display:grid; grid-template-columns:1.35fr 1fr; gap:1rem; margin-bottom:1rem; }
.dashboard-grid-wide { grid-template-columns:1.1fr 1fr; }
.dashboard-panel { min-width:0; padding:1.25rem; border:1px solid #e3d9d0; border-radius:18px; background:white; box-shadow:0 6px 22px rgba(52,37,27,.025); }
.dashboard-panel-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.dashboard-panel-heading h2 { margin:.15rem 0 0; font-size:1.35rem; }
.dashboard-panel-heading>a { color:var(--book-primary); font-size:.82rem; font-weight:700; text-decoration:none; }
.reading-stats,.copy-status-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:.55rem; }
.reading-stats div,.copy-status-grid div { display:flex; flex-direction:column; padding:.75rem; border-radius:11px; background:#faf7f3; }
.reading-stats span,.copy-status-grid span { color:#74695f; font-size:.74rem; }
.reading-stats strong,.copy-status-grid strong { margin-top:.2rem; color:var(--book-dark); font-size:1.65rem; }
.reading-stats .is-current { background:#f5ead5; }
.reading-stats .is-complete { background:#e9f2eb; }
.reading-bar { display:flex; height:9px; margin-top:1rem; overflow:hidden; border-radius:999px; background:#eee8e2; }
.reading-bar i { background:#bfa993; }
.reading-bar i.is-current { background:#d89b36; }
.reading-bar i.is-complete { background:#568262; }
.reading-bar i.is-abandoned { background:#967a70; }
.recent-books,.movement-list { display:grid; gap:.45rem; }
.recent-books>a,.movement-list>a { display:grid; align-items:center; gap:.75rem; padding:.55rem; border-radius:11px; color:inherit; text-decoration:none; }
.recent-books>a { grid-template-columns:42px 1fr; }
.recent-books>a:hover,.movement-list>a:hover { background:#faf7f3; }
.recent-book-cover { display:grid; place-items:center; width:42px; height:58px; overflow:hidden; border-radius:4px; background:linear-gradient(145deg,#72523c,#3d2c20); color:#e9ded3; font-size:.5rem; letter-spacing:.1em; }
.recent-book-cover img { width:100%; height:100%; object-fit:cover; }
.recent-books>a>span:last-child { display:flex; flex-direction:column; min-width:0; }
.recent-books strong,.movement-list strong { overflow:hidden; font-size:.86rem; text-overflow:ellipsis; white-space:nowrap; }
.recent-books small,.movement-list small { overflow:hidden; color:#74695f; font-size:.73rem; text-overflow:ellipsis; white-space:nowrap; }
.recent-books em,.movement-list em { color:#9a8e84; font-size:.68rem; font-style:normal; }
.movement-list>a { grid-template-columns:32px 1fr auto; border-left:3px solid transparent; }
.movement-list>a.is-overdue { border-left-color:#c23d34; background:#fff9f8; }
.movement-kind { display:grid; place-items:center; width:32px; height:32px; border-radius:50%; background:#f5ead5; color:#9a6418; font-weight:800; }
.movement-kind.is-return { background:#e9f2eb; color:#3f704b; }
.movement-list>a>span:nth-child(2),.movement-list em { display:flex; flex-direction:column; min-width:0; }
.movement-list em { align-items:flex-end; }
.dashboard-rankings { margin-bottom:1rem; }
.ranking-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:1.25rem; }
.ranking-block h3 { margin:0 0 .85rem; font-size:1rem; }
.ranking-row { margin-bottom:.65rem; }
.ranking-row>span { display:flex; justify-content:space-between; gap:.5rem; margin-bottom:.25rem; }
.ranking-row b { overflow:hidden; font-size:.75rem; text-overflow:ellipsis; white-space:nowrap; }
.ranking-row small { color:#81766d; }
.ranking-row>i { display:block; height:5px; overflow:hidden; border-radius:999px; background:#eee8e2; }
.ranking-row>i>b { display:block; height:100%; border-radius:999px; background:var(--book-primary); }
.dashboard-empty { margin:1rem 0; color:#887d74; font-size:.85rem; }
.navbar { min-height: 68px; }
.navbar-brand { display:flex; align-items:center; gap:.65rem; font-weight:750; color:var(--book-dark); }
.brand-mark { display:grid; place-items:center; width:42px; height:42px; flex:none; }
.brand-mark img { display:block; width:100%; height:100%; object-fit:contain; }
.brand-mark-login { width:82px; height:82px; margin-inline:auto; }
.nav-link { color:#64584e; font-weight:600; }
.nav-link:hover { color:var(--book-primary); }
.app-container { padding-top:2rem; }
.btn-primary { --bs-btn-bg:var(--book-primary); --bs-btn-border-color:var(--book-primary); --bs-btn-hover-bg:#5c422f; --bs-btn-hover-border-color:#5c422f; }
.btn-outline-primary { --bs-btn-color:var(--book-primary); --bs-btn-border-color:#b9a38f; --bs-btn-hover-bg:var(--book-primary); --bs-btn-hover-border-color:var(--book-primary); }
.page-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:1.5rem; margin-bottom:1.5rem; }
.page-heading h1 { margin:.15rem 0 .35rem; font-size:clamp(2rem,5vw,3rem); font-weight:760; letter-spacing:-.04em; }
.page-heading p { color:#74695f; max-width:650px; margin:0; }
.eyebrow,.location-kind { color:var(--book-primary); font-size:.74rem; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.location-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; margin-bottom:1.5rem; }
.location-stats div { background:white; border:1px solid #e7ded5; border-radius:14px; padding:1rem 1.25rem; display:flex; align-items:baseline; gap:.65rem; }
.location-stats strong { font-size:1.65rem; color:var(--book-dark); }
.location-stats span { color:#81766d; }
.room-card { background:white; border:1px solid #e3d9d0; border-radius:18px; padding:1.25rem; box-shadow:0 8px 30px rgba(52,37,27,.04); margin-bottom:1.25rem; }
.room-header,.bookcase-header { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; }
.room-header { margin-bottom:1.25rem; }
.room-header h2 { margin:.15rem 0 0; font-size:1.5rem; }
.action-group { display:flex; flex-wrap:wrap; gap:.45rem; }
.bookcase-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:1rem; }
.bookcase-card { border:1px solid #e5ddd5; border-radius:14px; background:#fcfbf9; padding:1rem; }
.bookcase-header h3 { font-size:1.05rem; margin:.45rem 0 0; }
.code-badge { background:var(--book-soft); color:var(--book-primary); border-radius:6px; padding:.2rem .45rem; font-size:.72rem; font-weight:800; letter-spacing:.06em; }
.shelf-list { margin:1rem 0; display:grid; gap:.5rem; }
.shelf-row { display:flex; align-items:center; gap:.75rem; background:white; border:1px solid #ede6df; border-radius:10px; padding:.65rem .55rem .65rem .75rem; }
.shelf-symbol { color:var(--book-primary); font-size:1.25rem; }
.shelf-info { display:flex; flex-direction:column; min-width:0; flex:1; }
.shelf-info strong { font-size:.92rem; }
.shelf-info span,.shelf-info small { color:#847970; font-size:.75rem; }
.shelf-info small { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.shelf-empty,.inline-empty { color:#887d74; background:#faf8f5; border:1px dashed #d9cdc2; border-radius:10px; padding:1rem; text-align:center; }
.empty-state { padding:4rem 1rem; background:white; border:1px dashed #d5c7ba; border-radius:18px; text-align:center; }
.empty-state-icon { display:grid; place-items:center; min-height:64px; }
.empty-state-icon img { width:64px; height:64px; object-fit:contain; }
.modal-content { border:0; border-radius:16px; box-shadow:0 20px 60px rgba(30,20,12,.2); }
.modal-context { display:block; color:var(--book-primary); font-size:.75rem; font-weight:700; margin-bottom:.15rem; }
.form-hint { color:#81766d; font-size:.8rem; margin:.8rem 0 0; }
.form-control:focus { border-color:#a58368; box-shadow:0 0 0 .2rem rgba(113,82,59,.15); }
.compact-heading { align-items:center; }
.catalog-search { display:grid; grid-template-columns:minmax(260px,1fr) minmax(220px,320px) auto auto; gap:.65rem; padding:1rem; background:white; border:1px solid #e3d9d0; border-radius:16px; margin-bottom:1rem; }
.catalog-summary { color:#74695f; margin:1rem 0; }
.catalog-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:1rem; }
.book-card { display:flex; min-height:190px; overflow:hidden; color:inherit; text-decoration:none; background:white; border:1px solid #e3d9d0; border-radius:16px; box-shadow:0 6px 22px rgba(52,37,27,.035); transition:transform .15s ease,box-shadow .15s ease; }
.book-card:hover { color:inherit; transform:translateY(-2px); box-shadow:0 12px 28px rgba(52,37,27,.09); }
.book-cover,.detail-cover { display:grid; place-items:center; overflow:hidden; background:linear-gradient(145deg,#72523c,#3d2c20); color:#e9ded3; font:700 .72rem Georgia,serif; letter-spacing:.16em; }
.book-cover { width:105px; flex:none; }
.book-cover>img,.detail-cover>img { width:100%; height:100%; object-fit:cover; }
.cover-logo { display:grid; place-items:center; width:100%; height:100%; padding:16%; }
.cover-logo img,.cover-placeholder img,.cover-logo-image { width:100%; height:100%; object-fit:contain; }
.book-card-body { position:relative; flex:1; min-width:0; padding:1rem 1rem 2.6rem; }
.book-card h2 { font-size:1.1rem; line-height:1.25; margin:0 0 .3rem; }
.book-subtitle,.book-author { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.book-subtitle { color:#74695f; margin:0 0 .4rem; font-size:.85rem; }
.book-author { color:var(--book-primary); font-weight:650; margin:0 0 .7rem; }
.book-meta { display:flex; flex-direction:column; color:#81766d; font-size:.73rem; }
.book-location { margin-top:.7rem; color:#5d5148; font-size:.76rem; line-height:1.3; }
.copy-badge { position:absolute; bottom:.8rem; right:.9rem; padding:.22rem .5rem; border-radius:999px; background:var(--book-soft); color:var(--book-primary); font-size:.7rem; font-weight:750; }
.catalog-pagination { margin-top:1.5rem; }
.page-link { color:var(--book-primary); }
.book-form { max-width:1050px; margin:0 auto; }
.form-section { background:white; border:1px solid #e3d9d0; border-radius:18px; padding:1.4rem; margin-bottom:1rem; }
.copy-section { border-color:#cdb9a7; }
.form-section-heading { display:flex; gap:1rem; align-items:flex-start; margin-bottom:1.3rem; }
.form-section-heading>span { display:grid; place-items:center; flex:none; width:36px; height:36px; border-radius:50%; background:var(--book-soft); color:var(--book-primary); font-weight:800; }
.form-section-heading h2 { font-size:1.2rem; margin:0 0 .15rem; }
.form-section-heading p { color:#81766d; margin:0; font-size:.85rem; }
.form-actions { position:sticky; bottom:.7rem; z-index:5; display:flex; justify-content:flex-end; gap:.65rem; padding:.8rem; margin-top:1rem; border:1px solid #e2d8cf; border-radius:14px; background:rgba(255,255,255,.94); backdrop-filter:blur(8px); }
.detail-actions { display:flex; justify-content:space-between; margin-bottom:1rem; }
.book-detail { display:grid; grid-template-columns:220px 1fr; gap:2rem; padding:1.5rem; background:white; border:1px solid #e3d9d0; border-radius:20px; }
.detail-cover { width:220px; height:325px; border-radius:10px; box-shadow:0 12px 26px rgba(30,20,12,.15); }
.detail-content h1 { margin:.25rem 0; font-size:clamp(2rem,5vw,3.5rem); line-height:1.02; letter-spacing:-.045em; }
.detail-subtitle { color:#74695f; font-size:1.12rem; }
.detail-authors { color:var(--book-primary); font-weight:700; font-size:1.08rem; }
.detail-facts { display:grid; grid-template-columns:repeat(auto-fit,minmax(125px,1fr)); gap:.7rem; margin:1.3rem 0; }
.detail-facts div { display:flex; flex-direction:column; padding:.7rem; border-radius:10px; background:#faf7f3; }
.detail-facts span { color:#81766d; font-size:.7rem; text-transform:uppercase; letter-spacing:.07em; }
.detail-facts strong { font-size:.9rem; }
.category-line { color:#5d5148; }
.description { margin-top:1.5rem; }
.description h2 { font-size:1.1rem; }
.description p { white-space:pre-line; color:#5d5148; }
.copies-panel { margin-top:1rem; padding:1.4rem; background:white; border:1px solid #e3d9d0; border-radius:18px; }
.copies-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:1rem; }
.copies-heading h2 { margin:.15rem 0 0; font-size:1.4rem; }
.copies-heading-actions,.copy-actions { display:flex; align-items:center; flex-wrap:wrap; gap:.55rem; }
.copy-count { display:grid; place-items:center; width:40px; height:40px; border-radius:50%; background:var(--book-primary); color:white; font-weight:800; }
.copy-row { display:grid; gap:.5rem; padding:1rem; border:1px solid #ece4dc; border-radius:12px; margin-top:.65rem; }
.copy-row>div:first-child { display:flex; flex-wrap:wrap; align-items:center; gap:.7rem; }
.inventory-code { padding:.2rem .5rem; border-radius:6px; background:var(--book-soft); color:var(--book-primary); font:700 .72rem monospace; }
.copy-properties { display:flex; flex-wrap:wrap; gap:.4rem; }
.copy-properties span { padding:.22rem .5rem; background:#f7f4ef; border-radius:999px; color:#6d6258; font-size:.72rem; }
.copy-row small,.copy-row p { color:#81766d; margin:0; }
.copy-actions { justify-content:flex-end; padding-top:.35rem; border-top:1px solid #f0e9e2; }
.copy-actions form { margin:0; }
.isbn-lookup-card { max-width:780px; margin-left:auto; margin-right:auto; }
.cover-placeholder { display:grid; place-items:center; min-height:180px; padding:18%; border-radius:10px; background:linear-gradient(145deg,#72523c,#3d2c20); }
.search-overlay { position:fixed; inset:0; z-index:2000; display:none; place-items:center; padding:1rem; background:rgba(35,27,21,.58); backdrop-filter:blur(3px); }
.search-overlay.is-visible { display:grid; }
.search-overlay-card { width:min(92vw,430px); padding:2rem 1.5rem; border-radius:18px; background:white; box-shadow:0 24px 70px rgba(30,20,12,.28); text-align:center; }
.search-overlay-spinner { width:3rem; height:3rem; margin-bottom:1.15rem; color:var(--book-primary); }
.search-overlay-card h2 { margin:0 0 .55rem; color:var(--book-dark); font-size:1.35rem; }
.search-overlay-card p { margin:0 0 .35rem; color:#5d5148; }
.search-overlay-card small { color:#81766d; }
.network-status { position:fixed; right:1rem; bottom:1rem; z-index:2100; max-width:min(420px,calc(100vw - 2rem)); padding:.8rem 1rem; border-radius:12px; color:white; box-shadow:0 10px 35px rgba(30,20,12,.22); font-size:.88rem; }
.network-status.is-offline { background:#9b4c28; }
.network-status.is-online { background:#39734d; }
.install-pwa-button { position:fixed; right:1rem; bottom:1rem; z-index:1050; box-shadow:0 8px 28px rgba(30,20,12,.2); }
.pending-acquisitions { display:grid; gap:.75rem; }
.pending-acquisition-card { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1rem 1.15rem; border:1px solid #e3d9d0; border-radius:14px; background:white; }
.pending-acquisition-card h2 { margin:.45rem 0 .2rem; font-size:1.1rem; }
.pending-acquisition-card p,.pending-acquisition-card small { margin:0; color:#74695f; }
.pending-actions { display:flex; gap:.5rem; flex:none; }
body.search-in-progress { overflow:hidden; }
.bibliographic-search-card { max-width:980px; margin-left:auto; margin-right:auto; }
.bibliographic-summary { margin:1.25rem 0 .75rem; color:#74695f; }
.bibliographic-results { display:grid; grid-template-columns:repeat(auto-fill,minmax(420px,1fr)); gap:1rem; }
.bibliographic-result { display:grid; grid-template-columns:130px 1fr; min-height:250px; overflow:hidden; background:white; border:1px solid #e3d9d0; border-radius:16px; box-shadow:0 6px 22px rgba(52,37,27,.035); }
.result-cover { display:grid; place-items:center; min-height:220px; overflow:hidden; background:linear-gradient(145deg,#72523c,#3d2c20); color:#e9ded3; font:700 2rem Georgia,serif; }
.result-cover>img { width:100%; height:100%; object-fit:cover; }
.result-content { display:flex; flex-direction:column; align-items:flex-start; padding:1rem; min-width:0; }
.result-content h2 { margin:.45rem 0 .2rem; font-size:1.15rem; line-height:1.25; }
.result-subtitle { margin:0 0 .35rem; color:#74695f; font-size:.85rem; }
.result-authors { margin:0 0 .7rem; color:var(--book-primary); font-weight:700; }
.result-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.45rem; width:100%; margin-bottom:.8rem; }
.result-facts span { display:flex; flex-direction:column; min-width:0; padding:.45rem .55rem; border-radius:8px; background:#faf7f3; }
.result-facts small { color:#81766d; font-size:.65rem; text-transform:uppercase; letter-spacing:.05em; }
.result-facts strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.78rem; }
.result-content form { margin-top:auto; width:100%; }
.result-content form .btn { width:100%; }
.manual-search-fallback { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-top:1rem; padding:1rem 1.2rem; border:1px dashed #cdb9a7; border-radius:14px; background:#fcfaf7; }
.bibliographic-empty { margin-top:1rem; }
.loan-stats { display:grid; grid-template-columns:repeat(2,minmax(150px,240px)); gap:1rem; margin-bottom:1rem; }
.loan-stats div { display:flex; align-items:baseline; gap:.6rem; padding:1rem 1.2rem; border:1px solid #e3d9d0; border-radius:14px; background:white; }
.loan-stats strong { font-size:1.65rem; color:var(--book-dark); }
.loan-stats span { color:#74695f; }
.loan-stats .is-warning { border-color:#e5aaa6; background:#fff7f6; }
.loan-stats .is-warning strong { color:#a52d25; }
.loan-search { display:grid; grid-template-columns:minmax(260px,1fr) auto auto auto; align-items:center; gap:.7rem; padding:1rem; margin-bottom:1rem; border:1px solid #e3d9d0; border-radius:16px; background:white; }
.loan-list { display:grid; gap:.75rem; }
.loan-row { display:grid; grid-template-columns:minmax(260px,1.6fr) minmax(270px,1fr) auto; align-items:center; gap:1rem; padding:1rem; border:1px solid #e3d9d0; border-radius:14px; background:white; }
.loan-row.is-overdue { border-left:5px solid #c33d34; }
.loan-row.is-returned { opacity:.78; }
.loan-main { display:flex; align-items:flex-start; gap:.8rem; min-width:0; }
.loan-main a { color:var(--book-dark); text-decoration:none; }
.loan-main p,.loan-notes { margin:.2rem 0 0; color:#74695f; font-size:.82rem; }
.loan-dates { display:flex; flex-wrap:wrap; gap:.6rem; }
.loan-dates span { display:flex; flex-direction:column; padding:.45rem .6rem; border-radius:8px; background:#faf7f3; }
.loan-dates small { color:#81766d; font-size:.65rem; text-transform:uppercase; letter-spacing:.05em; }
.loan-dates strong { font-size:.8rem; }
.loan-actions { display:flex; align-items:center; justify-content:flex-end; gap:.55rem; }
.loan-actions form { display:flex; gap:.45rem; margin:0; }
.loan-actions input[type=date] { width:145px; }
.loan-notes { grid-column:1 / -1; }
.loan-book-card h2 { margin:.65rem 0 .2rem; }
.loan-book-card p { margin:0; color:#74695f; }
.shelf-hero { display:flex; align-items:center; gap:1.5rem; padding:1.5rem; border:1px solid #e3d9d0; border-radius:18px; background:white; }
.shelf-hero h1 { margin:.2rem 0 .55rem; font-size:clamp(2rem,5vw,3rem); letter-spacing:-.04em; }
.shelf-hero p { margin:.7rem 0 0; color:#74695f; }
.shelf-qr-preview { flex:none; width:150px; height:150px; padding:.5rem; border:1px solid #e5ddd5; border-radius:12px; background:white; }
.shelf-qr-preview img { width:100%; height:100%; }
.shelf-code-line { display:flex; align-items:center; gap:.55rem; }
.shelf-code-line span,.shelf-code-line strong { padding:.3rem .6rem; border-radius:7px; background:#f5f0ea; color:var(--book-primary); font-size:.8rem; }
.shelf-code-line strong { background:var(--book-primary); color:white; }
.shelf-copy-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(330px,1fr)); gap:.8rem; margin-top:1rem; }
.shelf-copy-card { display:grid; grid-template-columns:75px 1fr; min-height:116px; overflow:hidden; border:1px solid #e3d9d0; border-radius:13px; background:white; }
.shelf-copy-cover { display:grid; place-items:center; overflow:hidden; background:linear-gradient(145deg,#72523c,#3d2c20); color:#e9ded3; text-decoration:none; font:700 .6rem Georgia,serif; letter-spacing:.12em; }
.shelf-copy-cover img { width:100%; height:100%; object-fit:cover; }
.shelf-copy-content { padding:.75rem; min-width:0; }
.shelf-copy-content h2 { margin:.4rem 0 .15rem; font-size:1rem; line-height:1.2; }
.shelf-copy-content h2 a { color:var(--book-dark); text-decoration:none; }
.shelf-copy-content p { margin:0 0 .45rem; overflow:hidden; color:var(--book-primary); font-size:.78rem; text-overflow:ellipsis; white-space:nowrap; }
.shelf-empty-page { margin-top:1rem; }
.labels-body { margin:0; background:#ece8e3; color:#221d19; }
.labels-toolbar { position:sticky; top:0; z-index:5; display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.8rem 1rem; border-bottom:1px solid #d8d0c8; background:rgba(255,255,255,.95); }
.labels-toolbar>div { display:flex; flex-direction:column; text-align:center; }
.labels-toolbar small { color:#74695f; }
.labels-sheet { display:grid; grid-template-columns:repeat(2,90mm); justify-content:center; gap:8mm; padding:12mm; }
.shelf-label { display:grid; grid-template-columns:48mm 1fr; width:90mm; height:60mm; overflow:hidden; border:1px dashed #b8aea5; border-radius:3mm; background:white; break-inside:avoid; }
.shelf-label-qr { display:grid; place-items:center; padding:5mm; }
.shelf-label-qr img { width:38mm; height:38mm; }
.shelf-label-info { display:flex; flex-direction:column; justify-content:center; min-width:0; padding:4mm 4mm 4mm 0; }
.shelf-label-brand { margin-bottom:2mm; color:var(--book-primary); font-size:7pt; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.shelf-label-info small { overflow:hidden; color:#6f655d; font-size:7pt; text-overflow:ellipsis; white-space:nowrap; }
.shelf-label-info h1 { margin:1mm 0 0; overflow:hidden; font-size:10pt; line-height:1.1; text-overflow:ellipsis; white-space:nowrap; }
.shelf-label-info h2 { margin:1mm 0 2mm; font-size:14pt; line-height:1.05; }
.shelf-label-codes { display:flex; align-items:center; gap:1.5mm; }
.shelf-label-codes span,.shelf-label-codes strong { padding:1mm 1.5mm; border-radius:1mm; background:#eee8e2; color:#5c422f; font-size:7pt; }
.shelf-label-codes strong { background:#71523b; color:white; }
.shelf-label-info p { margin:2mm 0 0; color:#6f655d; font-size:7pt; }

@media print {
  @page { size:A4 portrait; margin:10mm; }
  .labels-body { background:white; }
  .labels-toolbar { display:none !important; }
  .labels-sheet { grid-template-columns:repeat(2,90mm); gap:8mm 6mm; padding:0; }
  .shelf-label { border:1px dashed #999; }
}

@media (max-width: 767.98px) {
  .install-pwa-button { right:.75rem; bottom:.75rem; }
  .pending-acquisition-card { align-items:stretch; flex-direction:column; }
  .pending-actions { display:grid; grid-template-columns:1fr 1fr; }
  .dashboard-heading { align-items:stretch; flex-direction:column; }
  .dashboard-actions { display:grid; grid-template-columns:1fr 1fr; }
  .dashboard-kpis { grid-template-columns:1fr 1fr; gap:.55rem; }
  .dashboard-kpi { min-height:120px; padding:.9rem; }
  .dashboard-kpi strong { font-size:2rem; }
  .dashboard-grid,.dashboard-grid-wide { grid-template-columns:1fr; }
  .reading-stats,.copy-status-grid { grid-template-columns:1fr 1fr; }
  .ranking-grid { grid-template-columns:1fr 1fr; }
  .app-container { padding-top:1.25rem; }
  .page-heading { align-items:stretch; flex-direction:column; }
  .page-heading .btn { width:100%; }
  .location-stats { gap:.5rem; }
  .location-stats div { flex-direction:column; gap:0; padding:.75rem; }
  .location-stats strong { font-size:1.4rem; }
  .location-stats span { font-size:.75rem; }
  .room-card { padding:1rem; }
  .room-header { flex-direction:column; }
  .action-group { width:100%; }
  .action-group .btn { flex:1; }
  .bookcase-grid { grid-template-columns:1fr; }
  .catalog-search { grid-template-columns:1fr; }
  .catalog-search .btn { width:100%; }
  .catalog-grid { grid-template-columns:1fr; }
  .book-card { min-height:175px; }
  .book-cover { width:92px; }
  .form-section { padding:1rem; }
  .form-actions { justify-content:stretch; }
  .form-actions .btn { flex:1; }
  .book-detail { grid-template-columns:1fr; gap:1.25rem; padding:1rem; }
  .detail-cover { width:150px; height:220px; justify-self:center; }
  .detail-content h1 { font-size:2rem; }
  .copies-heading { align-items:flex-start; gap:.75rem; }
  .copies-heading-actions { justify-content:flex-end; }
  .copies-heading-actions .btn { width:100%; }
  .copy-actions { justify-content:stretch; }
  .copy-actions a,.copy-actions form,.copy-actions button { width:100%; }
  .bibliographic-results { grid-template-columns:1fr; }
  .bibliographic-result { grid-template-columns:95px 1fr; min-height:230px; }
  .result-facts { grid-template-columns:1fr; }
  .manual-search-fallback { align-items:stretch; flex-direction:column; }
  .manual-search-fallback .btn { width:100%; }
  .loan-stats { grid-template-columns:1fr 1fr; gap:.5rem; }
  .loan-stats div { flex-direction:column; gap:0; padding:.75rem; }
  .loan-search,.loan-row { grid-template-columns:1fr; }
  .loan-search .btn { width:100%; }
  .loan-actions { align-items:stretch; flex-direction:column; }
  .loan-actions form { width:100%; flex-direction:column; }
  .loan-actions input[type=date],.loan-actions button { width:100%; }
  .shelf-page-actions { gap:.5rem; }
  .shelf-page-actions .btn { flex:1; }
  .shelf-hero { align-items:flex-start; }
  .shelf-qr-preview { width:100px; height:100px; }
  .shelf-copy-list { grid-template-columns:1fr; }
  .labels-toolbar>div { display:none; }
  .labels-sheet { grid-template-columns:90mm; padding:8mm; }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
