:root {
    --accent: #272ba0;
    --accent-light: #eef2ff;
    --accent-dark: #1d217a;
    --accent-mid: #3940c6;
    --bg-page: #f3f6fb;
    --bg-surface: #f8fafc;
    --border: rgba(15, 23, 42, 0.08);
    --border-md: rgba(15, 23, 42, 0.14);
    --text-primary: #18202f;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
}

body {
    background: var(--bg-page);
}

body.mobile-menu-open {
    overflow: hidden;
}

.perpus-admin .main {
    min-height: calc(100vh - 150px);
}

.logo {
    gap: 12px;
    justify-content: center !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
}

.perpus-logo-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0.06));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 22px;
    flex-shrink: 0;
}

.header h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
}

.header {
    justify-content: space-between;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-md);
    border-radius: 10px;
    background: var(--bg-white);
    color: var(--text-secondary);
    flex-shrink: 0;
    cursor: pointer;
}

.mobile-toggle:hover,
.mobile-toggle:focus {
    background: var(--accent-light);
    color: var(--accent);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid var(--accent-light);
}

#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
    backdrop-filter: blur(2px);
}

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

.section-kicker {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.section-title {
    margin: 0 0 6px;
    font-size: 22px;
}

.section-copy,
.login-subtitle,
.helper-list,
.login-search-card p {
    color: var(--text-secondary);
}

.page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.toolbar-card,
.content-card,
.dashboard-card,
.public-table-card,
.public-login-card,
.login-search-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.toolbar-card,
.content-card,
.dashboard-card,
.public-table-card,
.public-login-card,
.login-search-card {
    padding: 24px;
}

.toolbar-card {
    margin-bottom: 18px;
}

.toolbar-card form,
.toolbar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.toolbar-card .form-control {
    min-width: 240px;
}

.table-shell {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-white);
}

.visitor-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.visitor-form-full,
.visitor-form-actions {
    grid-column: 1 / -1;
}

.visitor-notes {
    min-height: 110px;
}

.visitor-suggestion-wrap {
    margin-top: -6px;
}

.visitor-suggestion-list {
    display: grid;
    gap: 8px;
}

.visitor-suggestion-item {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f9fbff;
    text-align: left;
    color: var(--text-primary);
}

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

.visitor-suggestion-item span {
    color: var(--text-secondary);
    font-size: 12px;
}

.visitor-suggestion-item:hover,
.visitor-suggestion-item:focus {
    border-color: var(--border-md);
    background: var(--accent-light);
}

.visitor-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.visitor-summary-card {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.visitor-summary-card span {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 6px;
}

.visitor-summary-card strong {
    color: var(--text-primary);
    font-size: 28px;
    line-height: 1;
}

.visitor-report-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 18px;
    margin-bottom: 18px;
}

.visitor-chart {
    min-height: 320px;
}

.about-license-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: var(--shadow-sm);
}

.about-license-card h3 {
    margin: 0 0 12px;
    color: var(--text-primary);
}

.about-license-card p {
    margin: 0 0 10px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.visitor-filter-form-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.visitor-filter-form-compact .visitor-filter-item {
    margin-bottom: 0;
    min-width: 0;
    flex: 0 0 160px;
}

.visitor-filter-form-compact .visitor-filter-keyword {
    flex: 1 1 280px;
}

.visitor-filter-form-compact .form-control {
    min-width: 0;
    height: 42px;
    border-radius: 12px;
}

.visitor-filter-form-compact .visitor-filter-button {
    height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    white-space: nowrap;
}

.table {
    margin-bottom: 0;
}

.table > thead > tr > td,
.table > thead > tr > th {
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--border-md);
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background: #fcfdff;
}

.table-striped > tbody > tr:hover {
    background: var(--accent-light);
}

.thumb {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.quick-link {
    display: block;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-white);
    color: var(--text-secondary);
}

.quick-link:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.quick-link strong {
    display: block;
    margin: 10px 0 6px;
    color: var(--text-primary);
    font-size: 15px;
}

.quick-desc {
    display: block;
}

.quick-link .glyphicon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 18px;
}

.dashboard-card {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.slip-login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 16px;
    background:
        radial-gradient(circle at top left, rgba(82, 114, 255, 0.22) 0, transparent 30%),
        radial-gradient(circle at bottom left, rgba(35, 62, 180, 0.26) 0, transparent 34%),
        linear-gradient(115deg, #09101f 0%, #0d1730 44%, #111f46 100%);
}

.slip-login-page::before,
.slip-login-page::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    opacity: .8;
    filter: blur(8px);
}

.slip-login-page::before {
    width: 480px;
    height: 480px;
    top: -170px;
    right: -140px;
    background: rgba(66, 107, 255, 0.16);
}

.slip-login-page::after {
    width: 420px;
    height: 420px;
    bottom: -170px;
    left: -120px;
    background: rgba(19, 42, 128, 0.22);
}

.login-wrap {
    width: 100%;
    max-width: 1180px;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.62fr);
    gap: 20px;
    align-items: stretch;
}

.login-search-panel,
.login-panel {
    min-width: 0;
}

.login-search-panel {
    display: flex;
}

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.perpus-login-logo {
    width: 92px;
    height: 92px;
    margin: 0 auto;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(49, 86, 224, 0.18) 0%, rgba(17, 29, 64, 0.9) 100%);
    border: 1px solid rgba(103, 135, 255, 0.45);
    color: #9db8ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 700;
    box-shadow: 0 18px 36px rgba(6, 14, 40, 0.4);
}

.login-card {
    background: linear-gradient(180deg, rgba(12, 20, 42, 0.94) 0%, rgba(9, 17, 35, 0.98) 100%);
    border: 1px solid rgba(95, 124, 231, 0.3);
    padding: 28px 24px;
    border-radius: 24px;
    box-shadow: 0 34px 80px rgba(5, 10, 29, 0.55);
}

.login-card-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.login-card-header {
    margin-bottom: 18px;
    text-align: center;
}

.login-card-header h2 {
    margin: 0 0 8px;
    font-size: 24px;
    color: #f8fbff;
}

.login-card-header p {
    margin: 0;
    color: rgba(209, 220, 255, 0.7);
    font-size: 14px;
    line-height: 1.6;
}

.perpus-login-image {
    display: block;
    max-width: 100%;
    max-height: 72px;
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    filter: saturate(0) brightness(1.8);
}

.perpus-login-image-wrap {
    width: 88px;
    min-height: 88px;
    margin: 0 auto;
    padding: 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(49, 86, 224, 0.18) 0%, rgba(17, 29, 64, 0.9) 100%);
    border: 1px solid rgba(103, 135, 255, 0.45);
    box-shadow: 0 18px 36px rgba(6, 14, 40, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-field + .form-field {
    margin-top: 12px;
}

.form-field label {
    display: block;
    margin-bottom: 6px;
    color: #eef3ff;
    font-size: 13px;
    font-weight: 600;
}

.input-wrap {
    border: 1px solid rgba(92, 118, 208, 0.24);
    border-radius: 16px;
    background: rgba(20, 30, 56, 0.9);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.input-wrap:focus-within {
    border-color: rgba(128, 157, 255, 0.7);
    box-shadow: 0 0 0 4px rgba(66, 107, 255, 0.12);
}

.input-wrap input {
    width: 100%;
    height: 48px;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0 14px;
    color: #f7faff;
    font-size: 14px;
}

.input-wrap input::placeholder {
    color: rgba(198, 210, 241, 0.55);
}

.btn-login {
    width: 100%;
    height: 48px;
    margin-top: 18px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #4068ff 0%, #2b44c7 100%);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 18px 34px rgba(43, 68, 199, 0.34);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.btn-login:hover,
.btn-login:focus {
    transform: translateY(-1px);
    box-shadow: 0 20px 34px rgba(39,43,160,0.28);
}

.btn-login:active {
    transform: translateY(0);
}

.login-links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    font-size: 12px;
}

.login-links a {
    color: #8ca9ff;
    font-weight: 500;
}

.login-card .alert {
    margin-bottom: 16px;
    border-radius: 14px;
    border: 1px solid rgba(114, 138, 232, 0.22);
    background: rgba(34, 49, 93, 0.84);
    color: #d9e3ff;
}

.login-search-card {
    width: 100%;
    margin-top: 0;
    background:
        linear-gradient(180deg, rgba(4, 10, 24, 0.2) 0%, rgba(4, 10, 24, 0.48) 100%),
        linear-gradient(115deg, rgba(12, 21, 44, 0.92) 0%, rgba(13, 23, 48, 0.84) 46%, rgba(14, 31, 77, 0.92) 100%);
    border: 1px solid rgba(94, 120, 214, 0.18);
    box-shadow: 0 34px 80px rgba(5, 10, 29, 0.52);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    padding: 26px 26px 20px;
    overflow: hidden;
    position: relative;
}

.login-search-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.05) 0, rgba(255,255,255,0.05) 1px, transparent 1px, transparent 17%),
        linear-gradient(180deg, transparent 0%, rgba(6, 13, 33, 0.18) 100%);
    opacity: .2;
    pointer-events: none;
}

.public-landing-page {
    display: block;
    min-height: 100vh;
    padding: 18px;
}

.public-topbar {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto 18px;
    position: relative;
    z-index: 1;
}

.public-topbar-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 18px;
    border-radius: 22px;
    border: 1px solid rgba(94, 120, 214, 0.18);
    background: rgba(8, 15, 34, 0.82);
    box-shadow: 0 22px 48px rgba(5, 10, 29, 0.34);
    backdrop-filter: blur(14px);
}

.public-topbar-brand {
    min-width: 0;
}

.public-topbar-brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
}

.public-topbar-brand-link:hover,
.public-topbar-brand-link:focus {
    color: inherit;
    text-decoration: none;
}

.public-topbar-logo {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(49, 86, 224, 0.18) 0%, rgba(17, 29, 64, 0.9) 100%);
    border: 1px solid rgba(103, 135, 255, 0.35);
    color: #9db8ff;
    font-size: 18px;
    font-weight: 700;
    overflow: hidden;
}

.public-topbar-logo-image {
    width: auto;
    min-width: 46px;
    max-width: 180px;
    flex: 0 1 auto;
    padding: 6px 12px;
    justify-content: flex-start;
}

.public-topbar-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.public-topbar-copy strong {
    color: #f8fbff;
    font-size: 16px;
    line-height: 1.1;
}

.public-topbar-copy small {
    color: rgba(209, 220, 255, 0.7);
    font-size: 12px;
    line-height: 1.3;
}

.public-topbar-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.public-topbar-nav a {
    color: rgba(220, 230, 255, 0.82);
    font-weight: 600;
    font-size: 14px;
}

.public-topbar-login {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 8px;
    flex-wrap: nowrap;
}

.public-topbar-login input {
    width: 180px;
    height: 42px;
    border: 1px solid rgba(92, 118, 208, 0.24);
    border-radius: 14px;
    background: rgba(20, 30, 56, 0.9);
    padding: 0 14px;
    color: #f7faff;
    font-size: 14px;
    outline: 0;
}

.public-topbar-login select {
    width: 150px;
    height: 42px;
    border: 1px solid rgba(92, 118, 208, 0.24);
    border-radius: 14px;
    background: rgba(20, 30, 56, 0.9);
    padding: 0 14px;
    color: #f7faff;
    font-size: 14px;
    outline: 0;
}

.public-topbar-login select:focus {
    border-color: rgba(128, 157, 255, 0.7);
    box-shadow: 0 0 0 4px rgba(66, 107, 255, 0.12);
}

.public-topbar-login input:focus {
    border-color: rgba(128, 157, 255, 0.7);
    box-shadow: 0 0 0 4px rgba(66, 107, 255, 0.12);
}

.public-topbar-login input::placeholder {
    color: rgba(198, 210, 241, 0.55);
}

.public-topbar-login button {
    height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #4068ff 0%, #2b44c7 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 14px 28px rgba(43, 68, 199, 0.28);
}

.public-reader-status {
    justify-content: flex-end;
    color: rgba(220, 230, 255, 0.9);
}

.public-reader-greeting {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    background: rgba(20, 30, 56, 0.9);
    border: 1px solid rgba(92, 118, 208, 0.24);
    font-size: 13px;
    font-weight: 600;
}

.public-reader-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 14px;
    background: rgba(220, 77, 93, 0.12);
    border: 1px solid rgba(220, 77, 93, 0.26);
    color: #ffd2d8;
    font-weight: 700;
    text-decoration: none;
}

.public-reader-logout:hover,
.public-reader-logout:focus {
    color: #fff1f4;
    text-decoration: none;
}

.public-topbar-flash,
.public-topbar > .alert,
.public-topbar > .alert-error {
    max-width: 1380px;
    margin: 10px auto 0;
}

.public-page-shell {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.public-page-shell .login-search-card {
    min-height: 0;
}

.login-search-card > * {
    position: relative;
    z-index: 1;
}

.login-search-hero {
    padding: 0 0 24px;
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.hero-brand-logo {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(83, 114, 255, 0.28) 0%, rgba(24, 40, 92, 0.95) 100%);
    border: 1px solid rgba(113, 141, 255, 0.34);
    color: #bed0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    box-shadow: 0 16px 34px rgba(6, 14, 40, 0.34);
}

.hero-brand-logo-image {
    padding: 10px;
}

.hero-brand-image {
    width: auto;
    max-width: 100%;
    max-height: 100%;
    height: auto;
    object-fit: contain;
}

.hero-brand-copy-wrap {
    min-width: 0;
}

.search-brand-title {
    margin: 0 0 4px;
    color: #fff;
    font-size: 16px;
    line-height: 1.1;
    font-weight: 700;
}

.search-brand-copy {
    margin: 0;
    color: rgba(210, 220, 245, 0.72);
    font-size: 11px;
    line-height: 1.5;
}

.login-search-hero .section-kicker {
    margin-bottom: 18px;
    background: transparent;
    border: 1px solid rgba(102, 130, 229, 0.38);
    color: #8fa8ff;
}

.search-hero-heading {
    margin: 0;
    max-width: none;
    color: #f8fbff;
    font-size: 36px;
    line-height: 1.02;
    font-weight: 700;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.search-hero-heading span {
    color: #6f93ff;
}

.search-hero-text {
    max-width: 620px;
    margin: 12px 0 0;
    color: rgba(220, 229, 251, 0.74);
    font-size: 15px;
    line-height: 1.7;
}

.login-search-form-box {
    padding: 12px;
    border-radius: 22px;
    background: rgba(10, 18, 38, 0.82);
    border: 1px solid rgba(92, 118, 208, 0.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 20px 46px rgba(6, 14, 40, 0.28);
}

.login-search-form-box h3 {
    margin: 0 0 8px;
    color: #eef3ff;
    font-size: 19px;
}

.login-search-form-box > p {
    margin: 0 0 16px;
    color: rgba(210, 220, 245, 0.72);
    font-size: 12px;
}

.search-results {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(92, 118, 208, 0.2);
}

.search-results-head h4,
.search-empty-state h5,
.search-book-body h5 {
    margin: 0;
    color: #eef3ff;
}

.search-results-head p,
.search-empty-state p,
.search-book-body p {
    margin: 6px 0 0;
    color: rgba(210, 220, 245, 0.7);
    font-size: 13px;
    line-height: 1.6;
}

.search-results-list {
    margin-top: 14px;
    display: grid;
    gap: 12px;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
}

.search-book-item {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 14px;
    border: 1px solid rgba(92, 118, 208, 0.18);
    border-radius: 16px;
    background: rgba(16, 25, 48, 0.82);
}

.search-book-cover .thumb {
    width: 62px;
    height: 82px;
    border-radius: 12px;
}

.search-book-code {
    display: inline-flex;
    margin-bottom: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(58, 89, 208, 0.18);
    color: #9fb5ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.search-book-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.search-book-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(58, 89, 208, 0.18);
    color: #9fb5ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.search-book-badge.muted {
    background: rgba(148, 163, 184, 0.16);
    color: rgba(210, 220, 245, 0.66);
}

.search-book-link {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4973ff 0%, #2f4fcf 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.search-book-link:hover,
.search-book-link:focus {
    color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(43, 68, 199, 0.28);
}

.search-results-loading,
.search-results-error,
.search-empty-state {
    padding: 16px;
    border-radius: 14px;
    background: rgba(16, 25, 48, 0.82);
    color: rgba(210, 220, 245, 0.74);
    font-size: 13px;
}

.search-results-error {
    color: #ffd1d1;
    background: rgba(87, 28, 42, 0.76);
}

.public-search-form {
    display: flex;
    gap: 12px;
    margin-top: 0;
    max-width: none;
    padding: 0;
}

.public-search-form input {
    flex: 1;
    height: 56px;
    padding: 0 16px;
    border: 1px solid rgba(92, 118, 208, 0.22);
    border-radius: 20px;
    font-size: 14px;
    background: rgba(18, 27, 50, 0.92);
    color: #f7faff;
}

.public-search-form button {
    height: 56px;
    min-width: 142px;
    padding: 0 20px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, #4973ff 0%, #2f4fcf 100%);
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    font-size: 14px;
    box-shadow: 0 18px 34px rgba(43, 68, 199, 0.32);
}

.public-search-form input::placeholder {
    color: rgba(198, 210, 241, 0.54);
}

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}

.catalog-link-row {
    margin-top: 12px;
}

.catalog-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid rgba(92, 118, 208, 0.26);
    background: rgba(19, 30, 57, 0.84);
    color: #d9e4ff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.catalog-link-button:hover,
.catalog-link-button:focus {
    color: #fff;
    text-decoration: none;
    background: rgba(37, 55, 108, 0.84);
}

.search-tags span {
    color: rgba(210, 220, 245, 0.76);
    font-size: 13px;
}

.search-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(19, 30, 57, 0.84);
    border: 1px solid rgba(92, 118, 208, 0.22);
    color: #c8d6ff;
    font-size: 13px;
    text-decoration: none;
}

.search-tags a:hover {
    background: rgba(37, 55, 108, 0.84);
    color: #fff;
}

.hero-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(92, 118, 208, 0.16);
}

.hero-feature-item {
    padding: 0 18px;
}

.hero-feature-item:first-child {
    padding-left: 0;
}

.hero-feature-item + .hero-feature-item {
    border-left: 1px solid rgba(92, 118, 208, 0.16);
}

.hero-feature-item strong {
    display: block;
    margin-bottom: 10px;
    color: #f2f6ff;
    font-size: 14px;
    font-weight: 700;
}

.hero-feature-item span {
    display: block;
    color: rgba(210, 220, 245, 0.7);
    font-size: 12px;
    line-height: 1.7;
}

.public-shell {
    background: var(--bg-page);
}

.public-katalog-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(82, 114, 255, 0.18) 0, transparent 22%),
        linear-gradient(180deg, #0b1226 0%, #111f46 320px, var(--bg-page) 321px, var(--bg-page) 100%);
}

.public-katalog-page .login-search-card {
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(9, 16, 36, 0.92) 0%, rgba(17, 28, 62, 0.9) 34%, rgba(31, 42, 78, 0.78) 54%, rgba(245, 247, 255, 0.08) 100%),
        linear-gradient(115deg, rgba(12, 21, 44, 0.92) 0%, rgba(13, 23, 48, 0.84) 46%, rgba(14, 31, 77, 0.92) 100%);
}

.public-anggota-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(82, 114, 255, 0.18) 0, transparent 22%),
        linear-gradient(180deg, #0b1226 0%, #111f46 340px, var(--bg-page) 341px, var(--bg-page) 100%);
}

.app-navbar {
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    box-shadow: var(--shadow-sm);
}

.app-navbar .container {
    width: auto;
}

.app-navbar .navbar-brand {
    color: var(--accent) !important;
}

.app-navbar .nav > li > a {
    border-radius: var(--radius-md);
}

.app-navbar .nav > li.active > a,
.app-navbar .nav > li > a:hover {
    background: var(--accent-light) !important;
    color: var(--accent) !important;
}

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

.anggota-shell {
    padding-top: 34px;
    padding-bottom: 40px;
}

.katalog-shell {
    padding-top: 18px;
    padding-bottom: 28px;
}

.katalog-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    padding: 0 6px;
}

.katalog-brand {
    color: #f8fbff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.katalog-brand:hover,
.katalog-brand:focus {
    color: #f8fbff;
    text-decoration: none;
}

.katalog-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(11, 18, 38, 0.18);
    border: 1px solid rgba(94, 120, 214, 0.1);
}

.katalog-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    color: rgba(221, 230, 255, 0.76);
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
}

.katalog-nav a:hover,
.katalog-nav a:focus {
    color: #fff;
    text-decoration: none;
    background: rgba(52, 79, 185, 0.28);
}

.katalog-nav a.active {
    background: linear-gradient(135deg, rgba(73, 115, 255, 0.95) 0%, rgba(47, 79, 207, 0.95) 100%);
    color: #fff;
}

.katalog-hero {
    display: block;
    margin-bottom: 14px;
}

.katalog-hero-copy,
.katalog-hero-tools,
.katalog-section {
    border-radius: 22px;
    border: 1px solid rgba(94, 120, 214, 0.12);
    box-shadow: 0 10px 24px rgba(7, 16, 44, 0.08);
}

.katalog-hero-copy {
    padding: 30px 32px;
    background: linear-gradient(135deg, rgba(15, 25, 56, 0.96) 0%, rgba(23, 39, 86, 0.92) 100%);
}

.katalog-search-box,
.anggota-search-box {
    margin-bottom: 14px;
}

.katalog-hero-copy .section-kicker {
    background: rgba(76, 105, 214, 0.16);
    color: #9ab1ff;
    font-size: 10px;
    padding: 4px 10px;
}

.katalog-hero-copy h1 {
    margin: 0;
    max-width: 640px;
    color: #f8fbff;
    font-size: 30px;
    line-height: 1.22;
    letter-spacing: -0.03em;
}

.katalog-hero-copy p {
    margin: 16px 0 0;
    max-width: 520px;
    color: rgba(219, 228, 250, 0.78);
    font-size: 14px;
    line-height: 1.78;
}

.katalog-search-input {
    display: contents;
}

.katalog-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.katalog-section {
    padding: 26px 28px 30px;
    background: linear-gradient(180deg, rgba(255,255,255,0.985) 0%, rgba(247, 250, 255, 0.98) 100%);
}

.katalog-section-head {
    margin-bottom: 22px;
}

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

.katalog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: var(--shadow-sm);
}

.katalog-card-cover {
    margin-bottom: 10px;
}

.katalog-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.katalog-card-cover .thumb {
    width: 100%;
    height: 188px;
    border-radius: 14px;
}

.katalog-card-top {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.katalog-card h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.45;
    font-weight: 600;
}

.katalog-card p {
    margin: 7px 0 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.58;
}

.katalog-card-actions {
    margin-top: auto;
    padding-top: 12px;
}

.katalog-card-note {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 11px;
}

.search-book-link-disabled {
    background: linear-gradient(135deg, #eef2f8 0%, #dde5f1 100%);
    color: #67768b;
    cursor: default;
    pointer-events: none;
    box-shadow: none;
}

.anggota-hero {
    display: block;
    margin-bottom: 14px;
}

.anggota-hero-copy,
.anggota-hero-card,
.anggota-section {
    border-radius: 28px;
    border: 1px solid rgba(94, 120, 214, 0.18);
    box-shadow: 0 24px 60px rgba(7, 16, 44, 0.16);
}

.anggota-hero-copy {
    padding: 34px;
    background: linear-gradient(135deg, rgba(11, 18, 38, 0.98) 0%, rgba(17, 31, 70, 0.95) 100%);
}

.anggota-hero-copy .section-kicker {
    background: rgba(76, 105, 214, 0.16);
    color: #9ab1ff;
}

.anggota-hero-copy h1 {
    margin: 0;
    max-width: 700px;
    color: #f8fbff;
    font-size: 42px;
    line-height: 1.08;
}

.anggota-hero-copy p {
    margin: 16px 0 0;
    max-width: 620px;
    color: rgba(219, 228, 250, 0.74);
    font-size: 16px;
    line-height: 1.8;
}

.anggota-search-input {
    display: contents;
}

.anggota-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.anggota-section {
    padding: 28px;
    background: rgba(255,255,255,0.98);
}

.anggota-section-head {
    margin-bottom: 24px;
}

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

.anggota-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: var(--shadow-sm);
}

.anggota-card-photo img {
    width: 92px;
    height: 110px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.anggota-card-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-bottom: 10px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.anggota-card h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
    line-height: 1.3;
}

.anggota-meta {
    margin: 14px 0 0;
}

.anggota-meta > div + div {
    margin-top: 10px;
}

.anggota-meta dt {
    margin: 0 0 3px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.anggota-meta dd {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.anggota-empty-state {
    background: var(--bg-surface);
    color: var(--text-secondary);
}

.public-login-card .btn-block {
    width: 100%;
}

.helper-list {
    margin: 18px 0 0;
    padding-left: 18px;
}

.helper-list li + li {
    margin-top: 8px;
}

.login-highlight {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--accent-light);
}

.login-highlight strong {
    display: block;
    margin-bottom: 4px;
    color: var(--accent);
}

.spacer-bottom {
    margin-bottom: 20px;
}

.compact-loan-grid {
    display: grid;
    grid-template-columns: 0.9fr 1fr 1.3fr;
    gap: 12px;
}

.compact-loan-block {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
}

.compact-loan-block + .compact-loan-block {
    margin-left: 0;
}

.compact-loan-block .compact-loan-item + .compact-loan-item {
    margin-top: 10px;
}

.compact-loan-item label {
    display: block;
    margin-bottom: 4px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
}

.compact-loan-item .form-control {
    height: 38px;
}

@media (max-width: 768px) {
    .header {
        padding: 12px 16px;
        gap: 12px;
    }

    .header-main {
        flex: 1;
        min-width: 0;
    }

    .header h2 {
        font-size: 15px;
        line-height: 1.3;
    }

    .mobile-toggle {
        display: inline-flex;
    }

    .user-info {
        gap: 8px !important;
    }

    .user-info span:first-child,
    .user-info span:nth-child(2) {
        display: none;
    }

    .toggle-btn {
        display: none !important;
    }

    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.2);
    }

    .main-content,
    .main-content.minimized {
        margin-left: 0 !important;
    }

    .content {
        padding: 16px;
    }

    .main {
        padding: 16px;
    }

    #sidebar-overlay {
        z-index: 998;
    }

    .toolbar-card form,
    .toolbar-row,
    .public-search-form,
    .login-links,
    .section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-card .form-control,
    .public-search-form button {
        width: 100%;
    }

    .visitor-form-grid,
    .visitor-report-grid {
        grid-template-columns: 1fr;
    }

    .visitor-suggestion-item {
        grid-template-columns: 1fr;
    }

    .visitor-filter-form-compact {
        flex-wrap: wrap;
    }

    .visitor-filter-form-compact .visitor-filter-item,
    .visitor-filter-form-compact .visitor-filter-keyword,
    .visitor-filter-form-compact .visitor-filter-button {
        flex: 1 1 100%;
    }

    .public-landing-page {
        padding: 12px;
    }

    .public-topbar-inner,
    .public-topbar-nav,
    .public-topbar-login {
        flex-direction: column;
        align-items: stretch;
    }

    .public-topbar-nav {
        gap: 10px;
        margin-left: 0;
    }

    .public-topbar-login {
        margin-left: 0;
        width: 100%;
    }

    .public-topbar-login input,
    .public-topbar-login select,
    .public-topbar-login button {
        width: 100%;
        height: 48px;
    }

    .login-wrap {
        max-width: 100%;
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .login-search-panel {
        order: 2;
    }

    .login-panel {
        order: 1;
    }

    .login-search-card {
        padding: 24px;
    }

    .login-search-hero {
        padding-bottom: 24px;
    }

    .hero-brand {
        margin-bottom: 28px;
    }

    .search-hero-heading {
        font-size: 32px;
        white-space: normal;
    }

    .login-search-form-box {
        padding: 20px;
    }

    .login-search-form-box h3 {
        font-size: 20px;
    }

    .search-tags {
        gap: 8px;
    }

    .public-search-form input,
    .public-search-form button,
    .btn-login,
    .input-wrap input {
        height: 52px;
    }

    .public-search-form input {
        font-size: 15px;
        padding: 0 16px;
    }

    .public-search-form button {
        min-width: 0;
        font-size: 16px;
    }

    .search-results-list {
        max-height: none;
    }

    .hero-feature-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .hero-feature-item,
    .hero-feature-item:first-child {
        padding: 0;
    }

    .hero-feature-item + .hero-feature-item {
        border-left: 0;
        padding-top: 14px;
        border-top: 1px solid rgba(92, 118, 208, 0.16);
    }

    .logo {
        min-height: 84px;
    }

    .sidebar .logo {
        justify-content: center !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .compact-loan-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .compact-loan-block .compact-loan-item + .compact-loan-item {
        margin-top: 12px;
    }

    .quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .quick-link {
        min-height: 132px;
        padding: 16px 12px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .quick-link strong {
        margin: 8px 0 0;
        font-size: 13px;
    }

    .quick-link .glyphicon {
        width: 46px;
        height: 46px;
        margin-bottom: 2px;
    }

    .quick-desc {
        display: none;
    }

    .anggota-hero {
        margin-bottom: 14px;
    }

    .katalog-hero {
        margin-bottom: 14px;
    }

    .katalog-topbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
    }

    .katalog-nav {
        width: 100%;
        justify-content: space-between;
        border-radius: 18px;
    }

    .katalog-nav a {
        flex: 1;
        padding: 0 10px;
        font-size: 12px;
    }

    .anggota-hero-copy,
    .anggota-section,
    .katalog-hero-copy,
    .katalog-section,
    .katalog-search-box,
    .anggota-search-box {
        border-radius: 22px;
    }

    .anggota-hero-copy,
    .anggota-section,
    .katalog-hero-copy,
    .katalog-section,
    .katalog-search-box,
    .anggota-search-box {
        padding: 22px;
    }

    .anggota-hero-copy h1,
    .katalog-hero-copy h1 {
        font-size: 28px;
    }

    .anggota-hero-copy p,
    .katalog-hero-copy p {
        font-size: 14px;
    }

    .anggota-search-input,
    .katalog-search-input {
        display: contents;
    }

    .anggota-hero-actions,
    .katalog-hero-actions {
        flex-direction: column;
    }

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

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

    .anggota-card {
        grid-template-columns: 74px minmax(0, 1fr);
        gap: 14px;
        padding: 16px;
    }

    .anggota-card-photo img {
        width: 74px;
        height: 92px;
        border-radius: 14px;
    }

}
