:root {
    /* Premium Color Palette */
    --primary: #4F7CF7;
    --primary-hover: #3F63D8;
    --secondary: #16A98C;
    --dark-bg: #F7FAFF;
    --dark-card: #FFFFFF;
    --light-bg: #F4F7FB;
    --light-card: #FFFFFF;

    --text-main: #243247;
    --text-muted: #6B7890;
    --text-light: #243247;
    --sidebar-border: #DDE6F3;
    --sidebar-active: #EAF1FF;
    --book-title: #08377e;

    --danger: #EF4444;
    --warning: #F59E0B;

    /* Spacing & Radii */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Font Size */
    --book-title: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Authentication */
.library-auth-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(79, 124, 247, 0.12), transparent 32rem),
        linear-gradient(135deg, #F7FAFF 0%, #EEF4FB 100%);
}

.library-auth-shell {
    width: min(1180px, calc(100% - 2rem));
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(380px, 1.1fr);
    align-items: center;
    gap: 2rem;
    margin: 0 auto;
    padding: 2rem 0;
}

.library-auth-panel,
.library-auth-card {
    border: 1px solid #DDE6F3;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-lg);
}

.library-auth-panel {
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
    border-radius: 22px;
    padding: 2rem;
}

.library-auth-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(36, 50, 71, 0.78), rgba(36, 50, 71, 0.88)),
        url("https://images.unsplash.com/photo-1524995997946-a1c2e315a42f?auto=format&fit=crop&w=1200&q=82");
    background-position: center;
    background-size: cover;
}

.library-auth-panel > * {
    position: relative;
    z-index: 1;
}

.library-auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    text-decoration: none;
}

.library-auth-brand__mark {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
}

.library-auth-brand__mark img,
.library-auth-brand__mark svg {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.library-auth-brand strong,
.library-auth-brand small {
    display: block;
}

.library-auth-brand strong {
    font-size: 1.1rem;
    line-height: 1.15;
}

.library-auth-brand small {
    margin-top: 0.15rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.8rem;
    font-weight: 800;
}

.library-auth-panel__content {
    max-width: 34rem;
    margin-top: 1rem;
}

.library-auth-kicker,
.library-auth-heading span {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.library-auth-kicker {
    padding: 0.45rem 0.75rem;
    background: rgba(255, 255, 255, 0.14);
    color: #DBEAFE;
}

.library-auth-panel h1 {
    margin-top: 1rem;
    color: white;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.02;
}

.library-auth-panel p {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1rem;
}

.library-auth-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.library-auth-meta span {
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.78rem;
    font-weight: 800;
}

.library-auth-card {
    max-height: calc(100vh - 4rem);
    overflow: auto;
    border-radius: 22px;
}

.library-auth-card__top {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.25rem 0;
}

.library-auth-card__top a {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 900;
    text-decoration: none;
    transition: var(--transition);
}

.library-auth-card__top a:hover {
    background: #EAF1FF;
    color: var(--primary-hover);
}

.library-auth-card__body {
    padding: 1rem 2rem 2rem;
}

.library-auth-form {
    width: min(100%, 30rem);
    margin: 0 auto;
}

.library-auth-form--wide {
    width: min(100%, 43rem);
}

.library-auth-heading {
    margin-bottom: 1.25rem;
}

.library-auth-heading span {
    padding: 0.35rem 0.65rem;
    background: #EAF1FF;
    color: var(--primary-hover);
}

.library-auth-heading h2 {
    margin-top: 0.75rem;
    color: var(--text-main);
    font-size: clamp(1.85rem, 4vw, 2.45rem);
    line-height: 1.08;
}

.library-auth-heading p {
    margin-top: 0.55rem;
    color: var(--text-muted);
    font-size: 0.96rem;
    font-weight: 600;
}

.library-auth-status {
    margin-bottom: 1rem;
}

.library-auth-passkey {
    margin-bottom: 1rem;
}

.library-auth-fields {
    display: grid;
    gap: 1rem;
}

.library-auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.library-auth-field,
.library-auth-file {
    display: grid;
    gap: 0.45rem;
}

.library-auth-field span,
.library-auth-file > span {
    color: var(--text-main);
    font-size: 0.86rem;
    font-weight: 900;
}

.library-auth-field input,
.library-auth-field select,
.library-auth-file input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #CAD8EF;
    border-radius: 10px;
    background: #FFFFFF;
    color: var(--text-main);
    font: inherit;
    font-size: 0.95rem;
    outline: none;
    padding: 0.75rem 0.9rem;
    transition: var(--transition);
}

.library-auth-field select {
    cursor: pointer;
}

.library-auth-file input {
    padding: 0.65rem 0.85rem;
}

.library-auth-field input:focus,
.library-auth-field select:focus,
.library-auth-file input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 124, 247, 0.12);
}

.library-auth-field small,
.library-auth-file small.is-error {
    color: var(--danger);
    font-size: 0.78rem;
    font-weight: 800;
}

.library-auth-file small {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.library-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 800;
}

.library-auth-row a,
.library-auth-switch a {
    color: var(--primary-hover);
    font-weight: 900;
    text-decoration: none;
}

.library-auth-row a:hover,
.library-auth-switch a:hover {
    text-decoration: underline;
}

.library-auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
}

.library-auth-check input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
}

.library-auth-submit {
    min-height: 50px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    box-shadow: 0 12px 22px rgba(79, 124, 247, 0.26);
    color: white;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    transition: var(--transition);
}

.library-auth-submit:hover {
    background: var(--primary-hover);
}

.library-auth-switch {
    margin-top: 1.25rem;
    color: var(--text-muted);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.library-auth-section {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.35rem;
    padding-top: 1rem;
    border-top: 1px solid #E3EAF5;
}

.library-auth-section:first-of-type {
    margin-top: 0;
}

.library-auth-section div {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: max-content;
}

.library-auth-section div span {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #EAF1FF;
    color: var(--primary-hover);
    font-size: 0.78rem;
    font-weight: 900;
}

.library-auth-section strong {
    color: var(--text-main);
    font-size: 0.95rem;
}

.library-auth-section p {
    max-width: 24rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-align: right;
}

/* UPT Library Landing Page */
.library-home-body {
    background: #F5F8FC;
}

.library-home-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid #DDE6F3;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
}

.library-home-header__inner,
.library-home-hero__content,
.library-home-band,
.library-home-section,
.library-home-feature,
.library-home-cta,
.library-home-footer {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.library-home-header__inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.library-home-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
    text-decoration: none;
}

.library-home-brand__mark {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #D7E3FF;
    border-radius: 10px;
    background: #EAF1FF;
    color: var(--primary-hover);
}

.library-home-brand__mark svg {
    width: 23px;
    height: 23px;
}

.library-home-brand__mark img,
.sidebar-logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.25rem;
}

.library-home-brand strong,
.library-home-brand small {
    display: block;
}

.library-home-brand strong {
    font-size: 1rem;
    line-height: 1.1;
}

.library-home-brand small {
    margin-top: 0.15rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
}

.library-home-nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.library-home-nav a {
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 800;
    text-decoration: none;
    transition: var(--transition);
}

.library-home-nav a:hover {
    background: #EAF1FF;
    color: var(--primary-hover);
}

.library-home-nav a.active {
    background: #EAF1FF;
    color: var(--primary-hover);
}

.library-home-nav__button {
    border: 1px solid #CBD5E1;
    background: white;
    color: var(--text-main) !important;
}

.library-home-hero {
    position: relative;
    min-height:520px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #0F172A;
}

.library-home-hero__media {
    position: absolute;
    inset: 0;
    background-image: url("https://images.unsplash.com/photo-1521587760476-6c12a4b040da?auto=format&fit=crop&w=1800&q=82");
    background-size: cover;
    background-position: center;
}

.library-home-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 18, 32, 0.58);
}

.library-home-hero__content {
    position: relative;
    z-index: 1;
    color: white;
    padding: 5rem 0 6rem;
}

.library-home-kicker {
    display: inline-flex;
    margin-bottom: 0.85rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #DDEBFF;
    font-size: 0.99rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.library-home-hero h1 {
    max-width: 1120px;
    color: white;
    font-size: clamp(2.25rem, 4vw, 4.25rem);
    line-height: 1.02;
    letter-spacing: 0;
    white-space: nowrap;
}

.library-home-hero p {
    max-width: 720px;
    margin-top: 1.25rem;
    color: #E4ECF8;
    font-size: 1.15rem;
}

.library-home-hero__actions,
.library-home-feature__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 3.25rem;
}

.library-home-band {
    position: relative;
    z-index: 2;
    margin-top: -54px;
}

.library-home-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #DDE6F3;
    border-radius: 14px;
    background: white;
    box-shadow: 0 18px 48px rgb(36 50 71 / 0.14);
}

.library-home-stats div {
    padding: 1.15rem;
    border-right: 1px solid #E3EAF5;
}

.library-home-stats div:last-child {
    border-right: none;
}

.library-home-stats strong,
.library-home-stats span {
    display: block;
}

.library-home-stats strong {
    color: var(--text-main);
    font-size: 1rem;
}

.library-home-stats span {
    margin-top: 0.3rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.library-home-section,
.library-home-feature,
.library-home-cta {
    padding: 5rem 0;
}

.library-home-section__header {
    max-width: 720px;
    margin-bottom: 2rem;
}

.library-home-section__header span {
    display: inline-flex;
    margin-bottom: 0.65rem;
    color: var(--primary-hover);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.library-home-section h2,
.library-home-feature h2,
.library-home-cta h2 {
    max-width: 780px;
    font-size: clamp(2rem, 4vw, 2rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.library-home-section__header p,
.library-home-feature p {
    margin-top: 0.9rem;
    color: var(--text-muted);
    font-size: 1rem;
}

.library-home-service-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.library-home-service-grid article,
.library-home-info-grid article,
.library-home-collection-panel {
    border: 1px solid #E3EAF5;
    border-radius: 12px;
    background: white;
    box-shadow: var(--shadow-sm);
}

.library-home-service-grid article {
    min-height: 250px;
    padding: 1.25rem;
}

.library-home-service-grid article span {
    display: inline-flex;
    margin-bottom: 1.2rem;
    color: var(--primary-hover);
    font-size: 0.82rem;
    font-weight: 900;
}

.library-home-service-grid article h3 {
    margin-bottom: 0.65rem;
    font-size: 1.15rem;
}

.library-home-service-grid article p,
.library-home-info-grid p,
.library-home-info-grid li,
.library-home-info-grid dd {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.library-home-feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 2rem;
    align-items: center;
}

.library-home-feature .library-home-kicker {
    background: #EAF1FF;
    color: var(--primary-hover);
}

.library-home-collection-panel {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
}

.library-home-collection-panel div {
    padding: 1rem;
    border: 1px solid #E3EAF5;
    border-radius: 8px;
    background: #F8FBFF;
}

.library-home-collection-panel strong,
.library-home-collection-panel span,
.library-home-collection-panel small {
    display: block;
}

.library-home-collection-panel strong {
    color: var(--primary-hover);
    font-size: 0.85rem;
}

.library-home-collection-panel span {
    margin-top: 0.25rem;
    color: var(--text-main);
    font-weight: 800;
}

.library-home-collection-panel small {
    margin-top: 0.15rem;
    color: var(--text-muted);
    font-weight: 700;
}

.library-home-section--muted {
    width: 100%;
    max-width: none;
    padding: 5rem max(1rem, calc((100% - 1180px) / 2));
    background: #ECF2F9;
}

.library-home-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.library-home-info-grid article {
    padding: 1.4rem;
}

.library-home-info-grid h2 {
    margin-bottom: 1rem;
    font-size: 1.35rem;
}

.library-home-info-grid dl,
.library-home-info-grid ul {
    display: grid;
    gap: 0.75rem;
}

.library-home-info-grid dt {
    color: var(--text-main);
    font-weight: 900;
}

.library-home-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.library-home-cta .library-home-kicker {
    background: #EAF1FF;
    color: var(--primary-hover);
}

.library-home-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 0;
    border-top: 1px solid #DDE6F3;
}

.library-home-footer strong,
.library-home-footer span {
    display: block;
}

.library-home-footer span {
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.library-home-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.library-home-footer a {
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
}

/* Public OPAC Layout */
.public-opac-body {
    background: #F5F8FC;
}

.public-opac-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.public-opac-hero__inner,
.public-opac-main {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.public-opac-hero {
    position: relative;
    min-height: 430px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid #DDE6F3;
    background: #0F172A;
}

.public-opac-hero__media {
    position: absolute;
    inset: 0;
    background-image: url("https://images.unsplash.com/photo-1507842217343-583bb7270b66?auto=format&fit=crop&w=1800&q=82");
    background-size: cover;
    background-position: center 48%;
}

.library-hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: libraryHeroFade 18s infinite;
}

.library-hero-slide:nth-child(1) {
    opacity: 1;
    animation-delay: 0s;
}

.library-hero-slide:nth-child(2) {
    animation-delay: 6s;
}

.library-hero-slide:nth-child(3) {
    animation-delay: 12s;
}

.public-opac-hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 18, 32, 0.78), rgba(10, 18, 32, 0.5)),
        rgba(10, 18, 32, 0.18);
}

.public-opac-hero__inner {
    position: relative;
    z-index: 1;
    padding: 3.5rem 0 4.5rem;
    color: white;
}

.public-opac-hero span {
    display: inline-flex;
    margin-bottom: 0.85rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #DDEBFF;
    font-size: 0.99rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.public-opac-hero h1 {
    max-width: 1120px;
    color: white;
    font-size: clamp(2.1rem, 3.6vw, 3.85rem);
    line-height: 1.04;
    letter-spacing: 0;
    white-space: nowrap;
}

.public-opac-hero p {
    max-width: 720px;
    margin-top: 1rem;
    color: #E4ECF8;
    font-size: 1.15rem;
}

.public-opac-main {
    position: relative;
    z-index: 2;
    flex: 1;
    margin-top: -78px;
    padding: 0 0 3rem;
}

.public-opac-main > div > div:first-child[style*="text-align: center"] {
    display: none;
}

.public-opac-main .card {
    border: 1px solid #E3EAF5;
    box-shadow: var(--shadow-sm);
}

.public-opac-main .card:hover {
    transform: none;
    box-shadow: var(--shadow-md);
}

.opac-search-simple {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    gap: 0.75rem;
    align-items: center;
}

.opac-search-simple .form-control {
    min-height: 48px;
    background: white;
}

.opac-search-section,
.opac-showcase-section,
.opac-search-results-section {
    margin-bottom: 2rem;
}

.opac-search-section {
    padding: 1.5rem;
    border: 1px solid #E3EAF5;
    border-radius: 14px;
    background: white;
    box-shadow: 0 18px 44px rgb(36 50 71 / 0.14);
}

.opac-section-heading {
    margin-bottom: 1rem;
}

.opac-section-heading--row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.opac-section-heading span {
    display: inline-flex;
    margin-bottom: 0.35rem;
    color: var(--primary-hover);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.opac-section-heading h2 {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2.2rem);
    line-height: 1.1;
}

.opac-section-heading p {
    max-width: 680px;
    margin: 0.45rem 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.opac-showcase-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 200px));
    gap: 4rem;
    justify-content: center;
}

.opac-showcase-card {
    min-width: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 0.5rem;
    padding: 0.65rem;
    border: 1px solid #E3EAF5;
    border-radius: 12px;
    background: white;
    color: var(--text-main);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.opac-showcase-card:hover {
    border-color: #CAD8EF;
    box-shadow: var(--shadow-md);
}

.opac-showcase-card__cover {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #DDE6F3;
    border-radius: 9px;
    background: #F8FBFF;
    color: #94A3B8;
    overflow: hidden;
}

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

.opac-showcase-card__body {
    display: block;
    min-width: 0;
}

.opac-showcase-card__body strong,
.opac-showcase-card__body small,
.opac-showcase-card__body em {
    display: block;
}

.opac-showcase-card__body strong {
    color: var(--text-main);
    font-size: 0.86rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.opac-showcase-card__body small {
    margin-top: 0.22rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.opac-showcase-card__body em {
    margin-top: 0.25rem;
    color: var(--primary-hover);
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 800;
}

.opac-showcase-card__status {
    justify-self: flex-start;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: #DFF8EF;
    color: #08775F;
    font-size: 0.68rem;
    font-weight: 900;
}

.opac-showcase-empty {
    grid-column: 1 / -1;
    padding: 1.5rem;
    border: 1px dashed #CAD8EF;
    border-radius: 12px;
    background: #F8FBFF;
    color: var(--text-muted);
    text-align: center;
    font-weight: 700;
}

.opac-advanced-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #E3EAF5;
}

.opac-advanced-filters__actions {
    display: flex;
    align-items: flex-end;
}

.opac-advanced-filters__actions .btn {
    width: 100%;
}

.opac-result-summary,
.opac-facet-bar,
.opac-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.opac-result-summary span,
.opac-facet-bar button,
.opac-result-tags span {
    padding: 0.3rem 0.625rem;
    border-radius: 999px;
    background: #F1F5F9;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.opac-facet-bar button {
    border: 1px solid #E3EAF5;
    cursor: pointer;
    transition: var(--transition);
}

.opac-facet-bar button:hover {
    border-color: var(--primary);
    background: var(--sidebar-active);
    color: var(--primary-hover);
}

.opac-facet-bar strong {
    color: var(--primary-hover);
}

.opac-result-list {
    display: grid;
    gap: 1rem;
}

.opac-result-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #E3EAF5;
    border-radius: 12px;
    background: white;
    box-shadow: var(--shadow-sm);
}

.opac-result-cover {
    aspect-ratio: 2 / 3;
    border: 1px solid #DDE6F3;
    border-radius: 8px;
    background: #F8FBFF;
    color: #94A3B8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.opac-result-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.opac-result-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.opac-result-heading a {
    color: var(--text-main);
    font-size: 1.12rem;
    font-weight: 900;
    text-decoration: none;
}

.opac-result-heading p {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.opac-metadata {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.opac-metadata dt {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.opac-metadata dd {
    margin-top: 0.15rem;
    color: var(--text-main);
    font-size: 0.86rem;
    font-weight: 800;
}

.opac-result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.opac-citation-box {
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid #DDE6F3;
    border-radius: var(--radius-md);
    background: #F8FBFF;
}

.opac-citation-box span {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.opac-citation-box p {
    margin: 0.35rem 0 0;
    color: var(--book-title);
    font-weight: 600;
}

.library-logo-setting {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 1rem;
    border: 1px solid #E3EAF5;
    border-radius: var(--radius-md);
    background: #F8FBFF;
}

.library-logo-setting__preview {
    width: 84px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #D7E3FF;
    border-radius: 16px;
    background: white;
    color: var(--primary-hover);
    overflow: hidden;
}

.library-logo-setting__preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

.library-logo-setting strong,
.library-logo-setting span {
    display: block;
}

.library-logo-setting strong {
    color: var(--text-main);
    font-size: 1.05rem;
    line-height: 1.2;
}

.library-logo-setting span {
    margin: 0.2rem 0 0.75rem;
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.clearance-check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.clearance-check-grid div {
    padding: 1rem;
    border: 1px solid #E3EAF5;
    border-radius: var(--radius-sm);
    background: #F8FBFF;
}

.clearance-check-grid .is-ok {
    border-color: #A7F3D0;
    background: #ECFDF5;
}

.clearance-check-grid .is-blocked {
    border-color: #FECACA;
    background: #FEF2F2;
}

.clearance-check-grid .is-warning {
    border-color: #FDE68A;
    background: #FFFBEB;
}

.clearance-check-grid span {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.clearance-check-grid strong {
    display: block;
    margin-top: 0.3rem;
    font-size: 1.2rem;
}

.clearance-message-list {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
    color: #991B1B;
    font-weight: 700;
}

.clearance-ready {
    margin-top: 1rem;
    padding: 0.875rem 1rem;
    border: 1px solid #A7F3D0;
    border-radius: var(--radius-sm);
    background: #ECFDF5;
    color: #065F46;
    font-weight: 800;
}

.clearance-review-panel {
    margin-top: 1.5rem;
}

.clearance-letter-print {
    margin-top: 1.5rem;
}

.clearance-letter {
    max-width: 780px;
    margin: 0 auto;
    padding: 1.8rem 2rem 2.25rem;
    border: 1px solid #CBD5E1;
    background: white;
    color: #111827;
    font-family: "Times New Roman", Times, serif;
    font-size: 1rem;
    line-height: 1.35;
}

.clearance-letter__head {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 92px;
    align-items: center;
    gap: 1.25rem;
    text-align: center;
}

.clearance-letter__logo {
    width: 92px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clearance-letter__logo img {
    width: 78px;
    height: 78px;
    object-fit: contain;
}

.clearance-letter__head strong,
.clearance-letter__head span {
    display: block;
}

.clearance-letter__head strong {
    color: #000;
    font-weight: 900;
    line-height: 1.15;
    text-transform: uppercase;
}

.clearance-letter__foundation {
    font-size: 1.14rem;
}

.clearance-letter__institution {
    font-size: 1rem;
}

.clearance-letter__unit {
    font-size: 0.92rem;
}

.clearance-letter__head span {
    margin-top: 0.15rem;
    color: #000;
    font-size: 0.72rem;
    line-height: 1.2;
}

.clearance-letter__rule {
    margin: 0.85rem 0 1.55rem;
    border-top: 2px solid #111827;
}

.clearance-letter__title {
    margin-bottom: 2.2rem;
    text-align: center;
}

.clearance-letter h2 {
    display: inline-block;
    margin: 0;
    color: #000;
    font-size: 1.12rem;
    line-height: 1.15;
    text-decoration: underline;
    text-transform: uppercase;
}

.clearance-letter__title p {
    margin: 0.2rem 0 0;
    color: #000;
    text-align: center;
}

.clearance-letter p {
    margin: 1rem 1.5rem 0;
    color: #000;
}

.clearance-letter table {
    margin: 1rem 1.5rem 1.6rem;
    border-collapse: collapse;
}

.clearance-letter td {
    padding: 0.12rem 0.45rem 0.12rem 0;
    color: #000;
    vertical-align: top;
}

.clearance-letter__identity td:first-child {
    width: 180px;
}

.clearance-letter__identity td:nth-child(2) {
    width: 12px;
}

.clearance-letter__sign {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    margin: 1.6rem 1.5rem 0 1.5rem;
}

.clearance-letter__signature {
    min-width: 220px;
    color: #000;
    text-align: left;
}

.clearance-letter__sign strong {
    display: block;
    margin-top: 0.45rem;
    color: #000;
    font-weight: 900;
    text-decoration: underline;
}

.clearance-letter__sign span,
.clearance-letter__sign small {
    display: block;
    color: #000;
}

.clearance-letter__qr {
    width: 118px;
    margin: 1.1rem 0 0.55rem;
    text-align: center;
}

.clearance-letter__qr svg {
    width: 92px;
    height: 92px;
    display: block;
    margin: 0 auto 0.35rem;
}

.clearance-letter__qr small {
    display: block;
    color: #111827;
    font-family: Inter, sans-serif;
    font-size: 0.58rem;
    line-height: 1.25;
    text-align: center;
}

.clearance-verify-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(16, 185, 129, 0.08)),
        #F3F7FC;
}

.clearance-verify-card {
    width: min(920px, 100%);
    padding: 0;
    border: 1px solid #DDE6F3;
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.clearance-verify-card__brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid #E3EAF5;
    background: #FFFFFF;
}

.clearance-verify-card__brand img {
    width: 62px;
    height: 62px;
    object-fit: contain;
}

.clearance-verify-card__brand strong,
.clearance-verify-card__brand span,
.clearance-verify-card__brand small {
    display: block;
}

.clearance-verify-card__brand strong {
    color: #152238;
    font-size: 1.12rem;
    font-weight: 900;
}

.clearance-verify-card__brand span {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.88rem;
}

.clearance-verify-card__brand small {
    margin-top: 0.15rem;
    color: #64748B;
    font-size: 0.82rem;
    font-weight: 700;
}

.clearance-verify-card__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.6rem 1.5rem;
    background: linear-gradient(135deg, #F8FBFF, #EEF6FF);
    border-bottom: 1px solid #DDE6F3;
}

.clearance-verify-card__status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: #D1FAE5;
    color: #065F46;
    font-weight: 900;
    font-size: 0.82rem;
}

.clearance-verify-card__status span {
    display: inline-grid;
    place-items: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 999px;
    background: #059669;
    color: #FFFFFF;
    font-size: 0.78rem;
}

.clearance-verify-card__status--invalid {
    background: #FEE2E2;
    color: #991B1B;
}

.clearance-verify-card__status--invalid span {
    background: #DC2626;
}

.clearance-verify-card h1 {
    margin: 0.8rem 0 0;
    color: #0F172A;
    font-size: clamp(1.75rem, 3vw, 2.55rem);
    letter-spacing: 0;
}

.clearance-verify-card__hero p {
    max-width: 660px;
    margin: 0.5rem 0 0;
    color: #53657D;
    font-weight: 600;
    line-height: 1.65;
}

.clearance-verify-card__stamp {
    width: 118px;
    height: 118px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    align-content: center;
    border: 2px solid #10B981;
    border-radius: 999px;
    color: #047857;
    background: rgba(209, 250, 229, 0.55);
    text-align: center;
    transform: rotate(-4deg);
}

.clearance-verify-card__stamp span,
.clearance-verify-card__stamp strong {
    display: block;
}

.clearance-verify-card__stamp span {
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.clearance-verify-card__stamp strong {
    margin-top: 0.2rem;
    font-size: 1.25rem;
    font-weight: 900;
}

.clearance-verify-card__stamp--invalid {
    border-color: #EF4444;
    background: rgba(254, 226, 226, 0.7);
    color: #991B1B;
}

.clearance-verify-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 1.5rem;
}

.clearance-verify-grid div {
    padding: 0.875rem;
    border: 1px solid #E3EAF5;
    border-radius: 10px;
    background: #F8FBFF;
}

.clearance-verify-grid dt {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.clearance-verify-grid dd {
    margin-top: 0.25rem;
    color: #152238;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.clearance-verify-card__notice {
    margin: 0 1.5rem 1.5rem;
    padding: 1rem;
    border: 1px solid #C7D2FE;
    border-radius: 12px;
    background: #EEF2FF;
}

.clearance-verify-card__notice strong {
    display: block;
    color: #1E3A8A;
    font-size: 0.9rem;
    font-weight: 900;
}

.clearance-verify-card__notice p {
    margin: 0.35rem 0 0;
    color: #44546A;
    line-height: 1.6;
}

.clearance-verify-card__notice--invalid {
    border-color: #FECACA;
    background: #FFF1F2;
}

.clearance-verify-card__notice--invalid strong {
    color: #991B1B;
}

.clearance-verify-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0 1.5rem 1.5rem;
}

.clearance-verify-card__footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #E3EAF5;
    background: #FAFCFF;
    color: #64748B;
    font-size: 0.82rem;
    font-weight: 700;
}


/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    min-width: 280px;
    background-color: var(--dark-bg);
    color: var(--text-light);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 8px 0 24px rgb(36 50 71 / 0.05);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                min-width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
}

.sidebar.collapsed {
    width: 72px;
    min-width: 72px;
    padding: 1.5rem 0.75rem;
}

.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .sidebar-section-title,
.sidebar.collapsed .sidebar-footer-content,
.sidebar.collapsed .sidebar-group-chevron,
.sidebar.collapsed .sidebar-group-content {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.15s ease;
}

.sidebar.collapsed .sidebar-section-title {
    height: 0;
    margin: 0;
    padding: 0;
}

.sidebar-logo-text,
.nav-text,
.sidebar-section-title,
.sidebar-footer-content {
    opacity: 1;
    transition: opacity 0.2s ease 0.1s;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 48px;
}

/* Toggle Button */
.sidebar-toggle {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 0.875rem;
    background: white;
    border: 1px solid var(--sidebar-border);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    padding: 0;
}

.sidebar-toggle:hover {
    background: var(--sidebar-active);
}

.sidebar-toggle svg {
    transition: transform 0.3s ease;
}

.sidebar-logo {
    min-height: 48px;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-logo-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
    background: var(--sidebar-active);
    border: 1px solid #D7E3FF;
    border-radius: 0.875rem;
}

.sidebar-logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    line-height: 1.1;
}

.sidebar-logo-text small {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0.875rem;
    transition: var(--transition);
    font-weight: 500;
    overflow: hidden;
    white-space: nowrap;
}

.nav-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.sidebar-group {
    display: grid;
    gap: 0.35rem;
}

.sidebar-group summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0.875rem;
    border-radius: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 800;
    list-style: none;
    transition: var(--transition);
}

.sidebar-group summary::-webkit-details-marker {
    display: none;
}

.sidebar-group summary:hover,
.sidebar-group[open] summary {
    background: #F8FBFF;
    color: var(--primary-hover);
}

.sidebar-group-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-group-chevron {
    margin-left: auto;
    color: #9AA8BD;
    font-size: 1.25rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.sidebar-group[open] .sidebar-group-chevron {
    transform: rotate(90deg);
}

.sidebar-group-content {
    display: grid;
    gap: 0.25rem;
    padding: 0.15rem 0 0.35rem 0.85rem;
    border-left: 1px solid #E3EAF5;
    margin-left: 1.45rem;
}

.sidebar-group-content .nav-item {
    min-height: 38px;
    padding: 0.55rem 0.75rem;
    border-radius: 0.7rem;
    font-size: 0.88rem;
}

.nav-dot {
    width: 0.42rem;
    height: 0.42rem;
    flex-shrink: 0;
    border-radius: 999px;
    background: #CAD8EF;
}

.nav-item.active .nav-dot {
    background: var(--primary);
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.875rem;
}

.sidebar.collapsed .sidebar-group summary {
    justify-content: center;
    padding: 0.875rem;
}

.sidebar.collapsed .sidebar-group-content {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
}

.sidebar.collapsed .sidebar-logo {
    display: none;
}

.sidebar.collapsed .sidebar-action {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar-section-title {
    margin: 1.25rem 0 0.375rem;
    padding: 0 0.875rem;
    color: #8390A5;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-item:hover,
.nav-item.active {
    background-color: var(--sidebar-active);
    color: var(--primary-hover);
}

.nav-item.active {
    box-shadow: inset 3px 0 0 var(--primary);
    font-weight: 700;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--sidebar-border);
}

.sidebar-action {
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    padding: 0.75rem 0.875rem;
    border: 1px solid var(--sidebar-border);
    border-radius: 0.875rem;
    background: white;
    color: var(--text-main);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    transition: var(--transition);
}

.sidebar-action:hover {
    border-color: #CAD8EF;
    background: var(--sidebar-active);
    color: var(--primary-hover);
}

.sidebar-action-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content.expanded {
    margin-left: 72px;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--light-card);
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid #E3EAF5;
    box-shadow: var(--shadow-sm);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.topbar-notifications {
    position: relative;
}

.topbar-notifications summary {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #D8E2F1;
    border-radius: var(--radius-md);
    background: #F8FAFC;
    color: var(--text-main);
    cursor: pointer;
    list-style: none;
}

.topbar-notifications summary::-webkit-details-marker {
    display: none;
}

.topbar-notifications__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.topbar-notifications__badge {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 21px;
    height: 21px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #EF4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
}

.topbar-notifications__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 80;
    width: min(330px, calc(100vw - 2rem));
    padding: 0.65rem;
    border: 1px solid #D8E2F1;
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.topbar-notifications__header {
    padding: 0.55rem 0.65rem 0.7rem;
    border-bottom: 1px solid #E2E8F0;
}

.topbar-notifications__header strong,
.topbar-notifications__header small {
    display: block;
}

.topbar-notifications__header small {
    margin-top: 0.2rem;
    color: var(--text-muted);
}

.topbar-notifications__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0.65rem;
    border-bottom: 1px solid #F1F5F9;
    color: var(--text-main);
    text-decoration: none;
}

.topbar-notifications__item:last-child {
    border-bottom: 0;
}

.topbar-notifications__item span {
    font-size: 0.9rem;
    font-weight: 600;
}

.topbar-notifications__item strong {
    min-width: 32px;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    text-align: center;
    font-size: 0.8rem;
}

.topbar-notifications__item.is-danger strong {
    background: #FEE2E2;
    color: #991B1B;
}

.topbar-notifications__item.is-warning strong {
    background: #FEF3C7;
    color: #92400E;
}

.topbar-notifications__item.is-success strong {
    background: #D1FAE5;
    color: #065F46;
}

.topbar-notifications__item.is-info strong {
    background: #DBEAFE;
    color: #1D4ED8;
}

.topbar-notifications__empty {
    padding: 1rem 0.65rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Cards & Containers */
.card {
    background: var(--light-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

/* Typography */
h1, h2, h3, h4 {
    color: #1E293B;
    font-weight: 700;
    line-height: 1.2;
}

.page-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 12px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background-color: #E2E8F0;
    color: #1E293B;
}

.btn-secondary:hover {
    background-color: #CBD5E1;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #334155;
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #CBD5E1;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background-color: #F8FAFC;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-sm);
    background: #F8FAFC;
    margin-bottom: 0.75rem;
}

.settings-toggle-row span {
    display: grid;
    gap: 0.2rem;
}

.settings-toggle-row small {
    color: var(--text-muted);
    line-height: 1.4;
}

.settings-toggle-row input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    flex: 0 0 auto;
}

.repository-list {
    display: grid;
    gap: 1rem;
}

.repository-search-form {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 170px auto auto;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1.2rem;
}

.repository-search-form__input {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 54px;
    padding: 0 1rem;
    border: 1px solid #CBD5E1;
    border-radius: var(--radius-md);
    background: #FFFFFF;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.8);
    transition: var(--transition);
}

.repository-search-form__input:focus-within,
.repository-search-form select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.repository-search-form__input span {
    color: var(--text-muted);
    font-size: 1.15rem;
    font-weight: 800;
}

.repository-search-form input,
.repository-search-form select {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-weight: 600;
}

.repository-search-form input::placeholder {
    color: #64748B;
    font-weight: 500;
}

.repository-search-form select {
    min-height: 54px;
    padding: 0 2.5rem 0 1rem;
    border: 1px solid #CBD5E1;
    border-radius: var(--radius-md);
    background: #FFFFFF;
    cursor: pointer;
}

.repository-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-sm);
    background: #F8FAFC;
}

.repository-item h3 {
    margin: 0.6rem 0 0.45rem;
}

.repository-item h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.repository-item h3 a:hover {
    color: var(--primary);
}

.repository-item p {
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0 0 0.8rem;
}

.repository-item dl,
.repository-detail dl {
    margin: 0;
}

.repository-item dl {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.repository-item dt {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.repository-item dd {
    margin: 0.15rem 0 0;
    font-weight: 700;
}

.repository-detail__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.repository-back-link {
    display: inline-flex;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 800;
    margin-bottom: 1rem;
}

.repository-back-link:hover {
    color: var(--primary);
}

.repository-detail__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.repository-detail__main {
    display: grid;
    gap: 1rem;
}

.repository-detail__main section,
.repository-detail__aside {
    padding: 1rem;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-sm);
    background: #F8FAFC;
}

.repository-detail__main h3,
.repository-detail__aside h3 {
    margin: 0 0 0.5rem;
}

.repository-detail__main p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin: 0;
}

.repository-detail__aside {
    align-self: start;
    background: #FFFFFF;
}

.repository-detail__aside dl {
    display: grid;
    gap: 0.75rem;
}

.repository-detail__aside div {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #E2E8F0;
}

.repository-detail__aside div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.repository-detail__aside dt {
    color: var(--text-muted);
    font-size: .83rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.repository-detail__aside dd {
    margin: 0.2rem 0 0;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.45;
    font-size: .8rem;
}

.repository-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.repository-keywords span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: #EAF1FF;
    color: var(--primary-hover);
    font-weight: 800;
}

.repository-citation {
    padding-left: 1rem;
    border-left: 4px solid var(--primary);
}

.repository-documents {
    display: grid;
    gap: 0.75rem;
}

.repository-document {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-sm);
    background: #FFFFFF;
}

.repository-document__icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 8px;
    background: #FEE2E2;
    color: #991B1B;
    font-size: 0.74rem;
    font-weight: 900;
}

.repository-document strong,
.repository-document span,
.repository-document small {
    display: block;
}

.repository-document span {
    color: var(--text-secondary);
    margin-top: 0.12rem;
}

.repository-document small {
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.repository-document--empty .repository-document__icon {
    background: #E2E8F0;
    color: var(--text-muted);
}

.repository-detail__aside a {
    color: var(--primary-hover);
    font-weight: 800;
    text-decoration: none;
}

.repository-actions {
    display: grid;
    gap: 0.65rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E2E8F0;
}

.repository-action-buttons {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.25rem;
    width: 100%;
}

.repository-action-buttons .btn {
    grid-column: span 6 / span 6;
    width: 100%;
    max-width: none;
    border-radius: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.repository-access-note {
    border-color: #BFDBFE !important;
    background: #EFF6FF !important;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid #E2E8F0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th, .table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #E2E8F0;
}

.table th {
    background-color: #F8FAFC;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

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

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: #F1F5F9;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: #D1FAE5; color: #065F46; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-danger { background: #FEE2E2; color: #991B1B; }

/* Livewire / Bootstrap Pagination */
.d-flex { display: flex; }
.d-none { display: none; }
.flex-fill { flex: 1 1 auto; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }
.align-items-center { align-items: center; }
.small { font-size: 0.875rem; }
.text-muted { color: var(--text-muted); }
.fw-semibold { font-weight: 600; }

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-item {
    display: inline-flex;
}

.page-link {
    min-width: 2.25rem;
    min-height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    border: 1px solid #CBD5E1;
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text-main);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.page-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #EEF2FF;
}

.page-item.active .page-link {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.page-item.disabled .page-link,
.page-link:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    background: #F8FAFC;
    color: var(--text-muted);
}

nav[role="navigation"],
nav:has(.pagination) {
    width: 100%;
}

nav:has(.pagination) > .d-none {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

nav:has(.pagination) > .d-flex.d-sm-none {
    display: none;
}

.library-pagination {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.library-pagination__summary {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.library-pagination__summary span {
    color: var(--text-main);
    font-weight: 700;
}

.library-pagination__links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.library-pagination__link {
    min-width: 2.25rem;
    min-height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    border: 1px solid #CBD5E1;
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text-main);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.library-pagination__link:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #EEF2FF;
}

.library-pagination__link.is-active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.library-pagination__link.is-disabled,
.library-pagination__link:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    background: #F8FAFC;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .library-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .library-pagination__links {
        justify-content: flex-start;
    }
}

/* Grid System */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.gap-6 { gap: 1.5rem; }
.mt-6 { margin-top: 1.5rem; }

/* Books Grid */
.book-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.book-cover {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    background-color: #E2E8F0;
}

.book-title {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.book-author {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.25rem;
}

.catalog-grid .book-card {
    padding: 0.875rem !important;
}

.catalog-grid .book-cover {
    max-height: 210px;
    margin-bottom: 0.75rem;
}

.catalog-grid .book-title {
    font-size: 1rem;
    line-height: 1.35;
}

.catalog-grid .book-author {
    font-size: 0.8125rem;
    margin-bottom: 0.75rem;
}

.ddc-suggestion-panel {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #D7E3FF;
    border-radius: var(--radius-md);
    background: #F8FBFF;
}

.ddc-suggestion-panel__header h4 {
    margin-bottom: 0.25rem;
}

.ddc-suggestion-panel__header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.ddc-suggestion-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.ddc-suggestion-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    width: 100%;
    padding: 0.875rem;
    border: 1px solid #DDE6F3;
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-main);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.ddc-suggestion-item:hover {
    border-color: var(--primary);
    background: var(--sidebar-active);
}

.ddc-suggestion-code {
    min-width: 4rem;
    display: inline-flex;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: white;
    font-weight: 800;
}

.ddc-suggestion-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ddc-suggestion-body small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dashboard-hero--panel {
    padding: 1.5rem;
    border: 1px solid #DDE6F3;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(79, 124, 247, 0.1), rgba(22, 169, 140, 0.08)),
        var(--light-card);
    box-shadow: var(--shadow-sm);
}

.dashboard-eyebrow {
    display: inline-flex;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    background: white;
    color: var(--primary-hover);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dashboard-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.dashboard-hero__meta span {
    padding: 0.35rem 0.625rem;
    border: 1px solid #DDE6F3;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 700;
}

.dashboard-hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
}

.dashboard-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-stat-grid--inside {
    margin-top: 0;
}

.dashboard-stat {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-height: 104px;
    padding: 1rem;
    border: 1px solid #E3EAF5;
    border-radius: var(--radius-lg);
    background: var(--light-card);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.dashboard-stat:hover {
    box-shadow: var(--shadow-md);
}

.dashboard-stat__icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 0.9rem;
    background: #EAF1FF;
    color: var(--primary-hover);
    font-weight: 900;
}

.dashboard-stat__icon.is-success {
    background: #DFF8EF;
    color: #08775F;
}

.dashboard-stat__icon.is-info {
    background: #E7F2FF;
    color: #1D5FDB;
}

.dashboard-stat__icon.is-danger {
    background: #FEE2E2;
    color: #B91C1C;
}

.dashboard-stat__icon.is-muted {
    background: #EEF2F7;
    color: #526178;
}

.dashboard-stat span,
.dashboard-mini-stats span {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dashboard-stat strong {
    display: block;
    margin-top: 0.35rem;
    color: var(--text-main);
    font-size: 2rem;
    line-height: 1;
}

.dashboard-stat.is-warning strong {
    color: var(--danger);
}

.dashboard-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.dashboard-chart-card {
    min-height: 280px;
}

.dashboard-chart-card--academic {
    margin-top: 1rem;
}

.dashboard-accordion {
    min-height: auto;
    padding: 0;
}

.dashboard-accordion--stats {
    margin-top: 1.5rem;
}

.dashboard-accordion__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    list-style: none;
    padding: 1.25rem;
    transition: var(--transition);
}

.dashboard-accordion__summary::-webkit-details-marker {
    display: none;
}

.dashboard-accordion__summary:hover {
    background: #F8FBFF;
}

.dashboard-accordion__summary h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 1.05rem;
}

.dashboard-accordion__summary p {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
}

.dashboard-accordion__meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: max-content;
}

.dashboard-accordion__meta span,
.dashboard-accordion__meta strong {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 900;
}

.dashboard-accordion__meta span {
    padding: 0.35rem 0.65rem;
    background: #EAF1FF;
    color: var(--primary-hover);
}

.dashboard-accordion__meta span.is-warning {
    background: #FEF3C7;
    color: #92400E;
}

.dashboard-accordion__meta span.is-success {
    background: #D1FAE5;
    color: #065F46;
}

.dashboard-accordion__meta strong {
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    background: #EEF2F7;
    color: var(--text-main);
}

.dashboard-accordion__meta strong::after {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: var(--transition);
}

.dashboard-accordion[open] .dashboard-accordion__meta strong::after {
    transform: rotate(225deg) translateY(-1px);
}

.dashboard-accordion[open] .dashboard-accordion__summary {
    border-bottom: 1px solid #E3EAF5;
    background: #F8FBFF;
}

.dashboard-accordion[open] .dashboard-accordion__meta strong {
    background: var(--primary);
    color: white;
}

.dashboard-accordion[open] .dashboard-accordion__meta strong {
    font-size: 0;
}

.dashboard-accordion[open] .dashboard-accordion__meta strong::before {
    content: "Tutup";
    font-size: 0.75rem;
}

.dashboard-accordion__content {
    padding: 1.25rem;
}

.dashboard-panel__header p {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
}

.dashboard-bar-chart {
    display: grid;
    gap: 0.875rem;
}

.dashboard-bar-chart__row {
    display: grid;
    grid-template-columns: minmax(104px, 0.8fr) minmax(120px, 1.8fr) minmax(44px, auto);
    align-items: center;
    gap: 0.75rem;
}

.dashboard-bar-chart__label {
    min-width: 0;
    color: var(--text-main);
    font-size: 0.875rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-bar-chart__track {
    height: 0.8rem;
    overflow: hidden;
    border-radius: 999px;
    background: #EDF3FB;
    box-shadow: inset 0 0 0 1px rgba(105, 127, 159, 0.12);
}

.dashboard-bar-chart__track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4D76F6 0%, #64C3A6 100%);
}

.dashboard-bar-chart__row strong {
    color: var(--text-main);
    font-size: 0.875rem;
    text-align: right;
}

.dashboard-service-mini {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.dashboard-service-mini a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid #E3EAF5;
    border-radius: var(--radius-sm);
    background: #F8FBFF;
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.dashboard-service-mini a:hover {
    border-color: #CAD8EF;
    background: white;
}

.dashboard-service-mini a.is-warning {
    border-color: #FED7D7;
    background: #FFF7F7;
}

.dashboard-service-mini span {
    min-width: 0;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.dashboard-service-mini strong {
    color: var(--text-main);
    font-size: 1.05rem;
    line-height: 1;
}

.dashboard-service-mini a.is-warning strong {
    color: var(--danger);
}

.dashboard-service-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.dashboard-service-summary--compact {
    gap: 0.6rem;
    margin-top: 1rem;
}

.dashboard-service-summary a {
    display: block;
    padding: 0.875rem;
    border: 1px solid #E3EAF5;
    border-radius: var(--radius-sm);
    background: #F8FBFF;
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.dashboard-service-summary--compact a {
    padding: 0.7rem 0.75rem;
    background: #FFFFFF;
}

.dashboard-service-summary a:hover {
    border-color: #CAD8EF;
    background: white;
}

.dashboard-service-summary span {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-service-summary strong {
    display: block;
    margin-top: 0.35rem;
    color: var(--text-main);
    font-size: 1.5rem;
}

.dashboard-service-summary--compact strong {
    font-size: 1.15rem;
}

.dashboard-list {
    display: grid;
    gap: 0.75rem;
}

.dashboard-list__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem;
    border: 1px solid #E3EAF5;
    border-radius: var(--radius-sm);
    background: #F8FBFF;
    transition: var(--transition);
}

.dashboard-list__row:hover {
    border-color: #CAD8EF;
    background: white;
}

.dashboard-list__row span {
    min-width: 0;
    color: var(--text-main);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-list__row small {
    display: block;
    margin-top: 0.125rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-list__row strong {
    flex-shrink: 0;
    color: var(--primary-hover);
    font-size: 0.875rem;
}

.dashboard-empty {
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: var(--light-bg);
    color: var(--text-muted);
    text-align: center;
}

.library-toast-stack {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1200;
    display: grid;
    gap: 0.75rem;
    width: min(380px, calc(100vw - 2rem));
    pointer-events: none;
}

.library-toast {
    display: grid;
    grid-template-columns: 0.35rem minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
    overflow: hidden;
    border: 1px solid #DDE6F3;
    border-radius: 12px;
    background: white;
    color: var(--text-main);
    box-shadow: 0 18px 42px rgb(36 50 71 / 0.16);
    pointer-events: auto;
    animation: libraryToastIn 0.22s ease-out both;
}

.library-toast.is-hiding {
    animation: libraryToastOut 0.18s ease-in both;
}

.library-toast__bar {
    align-self: stretch;
    background: var(--secondary);
}

.library-toast--error .library-toast__bar {
    background: var(--danger);
}

.library-toast__content {
    min-width: 0;
    padding: 0.85rem 0;
}

.library-toast__content strong,
.library-toast__content span {
    display: block;
}

.library-toast__content strong {
    font-size: 0.86rem;
    line-height: 1.2;
}

.library-toast__content span {
    margin-top: 0.18rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.35;
}

.library-toast__close {
    width: 32px;
    height: 32px;
    margin-right: 0.55rem;
    border: 0;
    border-radius: 8px;
    background: #F1F5F9;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.library-toast__close:hover {
    background: #E3EAF5;
    color: var(--text-main);
}

.library-modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 280px;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgb(15 23 42 / 0.48);
    backdrop-filter: blur(4px);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed ~ .main-content .library-modal-backdrop {
    left: 72px;
}

.library-modal {
    width: min(760px, 100%);
    max-height: min(86vh, 820px);
    overflow: auto;
    border: 1px solid #DDE6F3;
    border-radius: 14px;
    background: white;
    box-shadow: 0 26px 70px rgb(15 23 42 / 0.26);
    padding: 1.25rem;
}

.library-modal--wide {
    width: min(1040px, calc(100vw - 320px));
}

.library-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.library-modal__header h3 {
    margin: 0;
}

.library-modal__header p {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.library-modal__close {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 0;
    border-radius: 9px;
    background: #F1F5F9;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.library-modal__close:hover {
    background: #E3EAF5;
    color: var(--text-main);
}

.library-modal__actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.library-pdf-frame {
    width: 100%;
    height: min(68vh, 760px);
    border: 1px solid #DDE6F3;
    border-radius: 10px;
    background: #F8FBFF;
}

.dashboard-action-list {
    display: grid;
    gap: 0.75rem;
}

.dashboard-action-list a {
    padding: 0.875rem;
    border: 1px solid #E3EAF5;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-weight: 700;
    text-decoration: none;
    background: #F8FBFF;
    transition: var(--transition);
}

.dashboard-action-list a:hover {
    border-color: var(--primary);
    color: var(--primary-hover);
    background: var(--sidebar-active);
}

.dashboard-mini-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.dashboard-mini-stats div {
    padding: 1rem;
    border: 1px solid #E3EAF5;
    border-radius: var(--radius-sm);
    background: #F8FBFF;
}

.dashboard-mini-stats strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.5rem;
}

.member-summary {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: stretch;
}

.member-summary__content {
    display: grid;
    gap: 1rem;
}

.member-summary__photo {
    width: 112px;
    min-height: 144px;
    border: 1px solid #DDE6F3;
    border-radius: var(--radius-md);
    background: #F8FBFF;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-summary__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-summary__photo span {
    color: var(--primary-hover);
    font-size: 1.75rem;
    font-weight: 800;
}

.member-photo-form {
    padding: 1rem;
    border: 1px solid #E3EAF5;
    border-radius: var(--radius-sm);
    background: #F8FBFF;
}

.member-photo-form > div {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
}

.member-photo-form small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.scan-input-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
}

.circulation-member-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    margin: -0.25rem 0 1.25rem;
    border: 1px solid #DDE6F3;
    border-radius: var(--radius-sm);
    background: #F8FBFF;
}

.circulation-member-card small {
    display: block;
    margin-top: 0.125rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
}

.circulation-return-panel {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E3EAF5;
}

.circulation-return-panel h3 {
    margin-bottom: 0.25rem;
}

.circulation-return-panel p {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.item-suggestion-list {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.item-suggestion {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #DDE6F3;
    border-radius: var(--radius-sm);
    background: #F8FBFF;
    color: var(--text-main);
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: var(--transition);
}

.item-suggestion:hover:not(:disabled) {
    border-color: var(--primary);
    background: var(--sidebar-active);
}

.item-suggestion:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.item-suggestion strong,
.item-suggestion small {
    display: block;
}

.item-suggestion small {
    margin-top: 0.15rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
}

.item-suggestion em {
    flex-shrink: 0;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 800;
}

.item-suggestion em.is-available {
    background: #D1FAE5;
    color: #065F46;
}

.item-suggestion em.is-unavailable {
    background: #FEE2E2;
    color: #991B1B;
}

.member-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 180px;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.user-management-card {
    padding: 1.25rem;
}

.user-management-toolbar {
    grid-template-columns: minmax(320px, 1fr) 160px 160px;
    align-items: center;
    margin-bottom: 1.15rem;
}

.user-management-toolbar .form-control {
    min-height: 44px;
    padding-block: 0.6rem;
}

.user-management-table th,
.user-management-table td {
    padding: 0.9rem 1rem;
    vertical-align: middle;
}

.user-management-table th {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
}

.user-management-table tbody tr {
    background: #FFFFFF;
}

.user-management-table tbody tr:hover {
    background: #F8FBFF;
}

.user-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 250px;
}

.user-identity__avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: #EAF1FF;
    color: var(--primary-hover);
    font-weight: 900;
}

.user-identity strong,
.user-identity small,
.user-identity em {
    display: block;
}

.user-identity strong {
    color: #0F213D;
    font-size: 0.96rem;
}

.user-identity small {
    margin-top: 0.1rem;
    color: #5B6B84;
    font-size: 0.76rem;
    font-weight: 700;
}

.user-identity em {
    margin-top: 0.05rem;
    color: #7B8AA1;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 700;
}

.user-role-pill {
    display: inline-flex;
    padding: 0.32rem 0.65rem;
    border-radius: 999px;
    background: #F1F5F9;
    color: #26364D;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.user-activity {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-activity span {
    width: fit-content;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: #F8FAFC;
    color: #5B6B84;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
}

.btn-compact {
    min-height: 34px;
    padding: 0.42rem 0.68rem;
    border-radius: 0.65rem;
    font-size: 0.78rem;
    white-space: nowrap;
}

.user-form-modal {
    width: min(760px, calc(100vw - 2rem));
}

.user-form-modal__form .form-group {
    margin-bottom: 1rem;
}

.user-form-modal__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid #DDE6F3;
    border-radius: 0.8rem;
    background: #F8FBFF;
    color: #24364F;
    font-weight: 800;
}

.user-form-modal__toggle input {
    width: 1rem;
    height: 1rem;
}

.donation-item-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.donation-item-form .form-group {
    margin-bottom: 0;
}

.donation-item-form__wide {
    grid-column: span 2;
}

.member-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 220px;
}

.member-row__photo {
    width: 44px;
    height: 56px;
    flex-shrink: 0;
    border: 1px solid #DDE6F3;
    border-radius: 0.5rem;
    background: #F8FBFF;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-row__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-row__photo span {
    color: var(--primary-hover);
    font-size: 0.875rem;
    font-weight: 800;
}

.table td small {
    display: block;
    margin-top: 0.125rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.library-card-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.library-card-panel__header h3 {
    margin: 0 0 0.25rem;
}

.library-card-panel__header p {
    margin: 0;
    color: var(--text-muted);
}

.library-card-print-area {
    display: flex;
    justify-content: flex-start;
}

.library-member-card {
    width: min(100%, 520px);
    aspect-ratio: 1.586 / 1;
    border-radius: 18px;
    overflow: hidden;
    color: #172033;
    background:
        linear-gradient(135deg, rgba(79, 124, 247, 0.14), transparent 38%),
        linear-gradient(160deg, #FFFFFF 0%, #F3F8FF 100%);
    border: 1px solid #D7E3FF;
    box-shadow: 0 18px 42px rgb(36 50 71 / 0.14);
    padding: 1.25rem;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 1rem;
}

.library-member-card__top,
.library-member-card__body,
.library-member-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.library-member-card__top span,
.library-member-card__identity span,
.library-member-card__meta span {
    display: block;
    color: #66758F;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.library-member-card__top strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1;
}

.library-member-card__top small {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #DFF8EF;
    color: #08775F;
    font-weight: 800;
}

.library-member-card__body {
    align-items: stretch;
    justify-content: flex-start;
}

.library-member-card__photo {
    width: 112px;
    border-radius: 14px;
    border: 1px solid #DDE6F3;
    background: #F8FBFF;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.library-member-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.library-member-card__photo span {
    color: var(--primary-hover);
    font-size: 2rem;
    font-weight: 900;
}

.library-member-card__identity {
    min-width: 0;
    flex: 1;
}

.library-member-card__identity h4 {
    margin: 0.25rem 0 0.85rem;
    font-size: 1.5rem;
    overflow-wrap: anywhere;
}

.library-member-card__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.library-member-card__meta strong {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.library-member-card__footer {
    align-items: flex-end;
}

.library-member-card__qr {
    width: 58px;
    height: 58px;
    padding: 0.25rem;
    border-radius: 8px;
    background: white;
    border: 1px solid #E3EAF5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.library-member-card__qr svg {
    width: 100%;
    height: 100%;
    display: block;
}

.library-member-card__footer > span {
    color: #526178;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.dashboard-panel {
    min-height: 224px;
}

.report-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr)) auto;
    align-items: center;
}

.report-filter .form-control {
    min-width: 140px;
    background: white;
}

.dashboard-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dashboard-panel__header h3 {
    margin: 0;
}

.dashboard-panel__header span {
    flex-shrink: 0;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    background: var(--sidebar-active);
    color: var(--primary-hover);
    font-size: 0.75rem;
    font-weight: 800;
}

.dashboard-status {
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem !important;
    text-transform: capitalize;
}

.dashboard-status--borrowed {
    background: #FEF3C7;
    color: #92400E !important;
}

.dashboard-status--returned {
    background: #D1FAE5;
    color: #065F46 !important;
}

.dashboard-status--overdue {
    background: #FEE2E2;
    color: #991B1B !important;
}

.dashboard-status--pending {
    background: #FEF3C7;
    color: #92400E !important;
}

.dashboard-status--active {
    background: #D1FAE5;
    color: #065F46 !important;
}

.dashboard-status--suspended {
    background: #FEE2E2;
    color: #991B1B !important;
}

.dashboard-status--inactive {
    background: #E5E7EB;
    color: #374151 !important;
}

.label-preview-panel {
    overflow: hidden;
}

.label-print-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    align-items: start;
}

.book-barcode-label {
    width: 100%;
    min-height: 112px;
    padding: 0.5rem;
    border: 1px dashed #9AA8BD;
    border-radius: 6px;
    background: white;
    color: #111827;
    display: grid;
    gap: 0.25rem;
    break-inside: avoid;
}

.book-barcode-label__title {
    height: 2.2em;
    overflow: hidden;
    color: #111827;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.1;
}

.book-barcode-label__barcode {
    height: 42px;
}

.book-barcode-label__barcode svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: #111827;
}

.book-barcode-label__code {
    color: #111827;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-align: center;
}

.book-barcode-label__meta {
    color: #526178;
    font-size: 0.62rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.book-spine-label {
    width: 38mm;
    min-height: 72mm;
    padding: 5mm 3mm;
    border: 1px dashed #9AA8BD;
    border-radius: 4px;
    background: white;
    color: #111827;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5mm;
    text-align: center;
    break-inside: avoid;
}

.book-spine-label strong {
    color: #111827;
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.book-spine-label span {
    margin-top: 2mm;
    padding-top: 2mm;
    border-top: 1px solid #CBD5E1;
    color: #526178;
    font-size: 0.62rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes libraryToastIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes libraryToastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(-6px) scale(0.98); }
}

@keyframes libraryHeroFade {
    0%, 30% { opacity: 1; }
    38%, 92% { opacity: 0; }
    100% { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .library-auth-shell {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 1rem 0;
    }

    .library-auth-panel {
        min-height: 360px;
        padding: 1.25rem;
    }

    .library-auth-card {
        max-height: none;
    }

    .library-auth-card__body {
        padding: 1rem 1.25rem 1.5rem;
    }

    .library-auth-grid {
        grid-template-columns: 1fr;
    }

    .library-auth-section {
        align-items: stretch;
        flex-direction: column;
    }

    .library-auth-section p {
        max-width: none;
        text-align: left;
    }

    .library-home-header__inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 0.9rem 0;
    }

    .library-home-nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.15rem;
    }

    .library-home-hero {
        min-height: 560px;
    }

    .library-home-hero h1 {
        white-space: normal;
    }

    .public-opac-hero {
        min-height: 380px;
    }

    .public-opac-hero h1 {
        white-space: normal;
    }

    .public-opac-hero__inner {
        padding: 3rem 0 4rem;
    }

    .public-opac-main {
        margin-top: -48px;
    }

    .opac-section-heading--row {
        align-items: flex-start;
        flex-direction: column;
    }

    .opac-showcase-grid {
        grid-template-columns: repeat(2, minmax(0, 180px));
    }

    .opac-search-simple,
    .repository-search-form,
    .repository-detail__layout,
    .opac-advanced-filters,
    .opac-result-item,
    .opac-metadata {
        grid-template-columns: 1fr;
    }

    .library-home-hero__content {
        padding: 4rem 0 5rem;
    }

    .library-home-stats,
    .library-home-service-grid,
    .library-home-info-grid,
    .library-home-feature {
        grid-template-columns: 1fr;
    }

    .library-home-stats div {
        border-right: none;
        border-bottom: 1px solid #E3EAF5;
    }

    .library-home-stats div:last-child {
        border-bottom: none;
    }

    .library-home-section,
    .library-home-feature,
    .library-home-cta {
        padding: 3rem 0;
    }

    .library-home-section--muted {
        padding: 3rem 1rem;
    }

    .library-home-cta,
    .library-home-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        position: relative;
        padding: 1rem;
    }

    .sidebar.collapsed {
        width: 100%;
        min-width: 100%;
    }

    .sidebar-toggle {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .catalog-grid .book-cover {
        max-height: 190px;
    }

    .ddc-suggestion-list {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-hero__actions {
        justify-content: flex-start;
    }

    .dashboard-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-chart-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-service-mini,
    .dashboard-service-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-accordion__summary {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-accordion__meta {
        justify-content: flex-start;
        min-width: 0;
    }

    .dashboard-bar-chart__row {
        grid-template-columns: minmax(90px, 0.9fr) minmax(90px, 1.4fr) minmax(36px, auto);
    }

    .member-summary {
        grid-template-columns: 1fr;
    }

    .member-summary__photo {
        width: 96px;
        min-height: 120px;
    }

    .member-photo-form > div {
        grid-template-columns: 1fr;
    }

    .scan-input-group {
        grid-template-columns: 1fr;
    }

    .report-filter {
        grid-template-columns: 1fr;
    }

    .member-toolbar {
        grid-template-columns: 1fr;
    }

    .library-card-panel__header {
        align-items: stretch;
        flex-direction: column;
    }

    .library-member-card {
        aspect-ratio: auto;
    }

    .library-member-card__body,
    .library-member-card__footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .library-member-card__photo {
        width: 96px;
        min-height: 120px;
    }

    .library-member-card__qr {
        width: 72px;
        height: 72px;
    }

    .grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .library-toast-stack {
        top: 0.75rem;
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
    }

    .library-modal-backdrop {
        left: 0;
        align-items: flex-start;
        padding: 0.75rem;
        overflow: auto;
    }

    .library-modal {
        width: 100%;
        max-height: none;
    }

    .library-modal__actions {
        flex-direction: column-reverse;
    }

    .library-pdf-frame {
        height: 68vh;
    }
}

@media print {
    body * {
        visibility: hidden;
    }

    .library-card-print-area,
    .library-card-print-area *,
    .label-print-area,
    .label-print-area *,
    .clearance-letter-print,
    .clearance-letter-print * {
        visibility: visible;
    }

    .library-card-print-area {
        position: fixed;
        inset: 0;
        padding: 24px;
        background: white;
        align-items: flex-start;
    }

    .library-member-card {
        width: 86mm;
        height: 54mm;
        box-shadow: none;
        break-inside: avoid;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .label-print-area {
        position: absolute;
        inset: 0;
        display: grid;
        grid-template-columns: repeat(3, 62mm);
        gap: 4mm;
        align-items: start;
        padding: 8mm;
        background: white;
    }

    .clearance-letter-print {
        position: absolute;
        inset: 0;
        padding: 12mm;
        background: white;
    }

    .clearance-letter {
        max-width: none;
        border: none;
        padding: 0;
        box-shadow: none;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .book-barcode-label {
        width: 62mm;
        min-height: 32mm;
        box-shadow: none;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .book-spine-label {
        box-shadow: none;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}
