:root {
    --library-primary: #4f46e5;
    --library-primary-dark: #3730a3;
    --library-primary-soft: #eef2ff;
    --library-accent: #7c3aed;
    --library-blue: #2563eb;
    --library-bg: #f5f7fb;
    --library-surface: #ffffff;
    --library-surface-soft: #f8faff;
    --library-border: #e2e8f0;
    --library-text: #172033;
    --library-text-soft: #334155;
    --library-muted: #64748b;
    --library-success: #198754;
    --library-danger: #dc3545;
    --library-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 52%, #2563eb 100%);
    --library-gradient-soft: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 52%, #eff6ff 100%);
    --library-radius-sm: 10px;
    --library-radius-md: 14px;
    --library-radius-lg: 20px;
    --library-shadow-sm: 0 2px 12px rgba(15, 23, 42, .045);
    --library-shadow-md: 0 12px 32px rgba(15, 23, 42, .08);
    --library-shadow-lg: 0 20px 50px rgba(15, 23, 42, .12);
}

/* =========================================================
   GLOBAL
========================================================= */

html {
    scroll-behavior: smooth;
}

body {
    background: var(--library-bg);
    color: var(--library-text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.6;
}

a {
    text-decoration: none;
}

.container {
    max-width: 1200px;
}




/* =========================================================
   BUTTONS
========================================================= */

.btn {
    border-radius: 11px;
    font-weight: 600;
    transition: all .18s ease;
}

.btn-primary {
    background: var(--library-primary);
    border-color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--library-primary-dark);
    border-color: var(--library-primary-dark);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: #ffffff;
    border-color: #d8d4ff;
}

.btn-outline-primary:hover {
    background: var(--library-primary);
    border-color: #ffffff;
}

/* =========================================================
   CARDS
========================================================= */

.library-card {
    background: var(--library-surface);
    border: 1px solid var(--library-border);
    border-radius: var(--library-radius-lg);
    box-shadow: var(--library-shadow-sm);
}

.library-card-hover {
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.library-card-hover:hover {
    transform: translateY(-3px);
    box-shadow: var(--library-shadow-md);
    border-color: #dedcff;
}

/* =========================================================
   ADMIN
========================================================= */

.admin-shell {
    min-height: calc(100vh - 70px);
}

.admin-sidebar {
    position: sticky;
    top: 90px;
}

.admin-sidebar-card {
    background: var(--library-surface);
    border: 1px solid var(--library-border);
    border-radius: var(--library-radius-lg);
    box-shadow: var(--library-shadow-sm);
    padding: 10px;
}

.admin-sidebar-title {
    padding: 14px 14px 10px;
    color: var(--library-muted);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.admin-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 11px;

    padding: 11px 13px;

    border-radius: 11px;

    color: #626575;
    font-weight: 600;

    transition: .18s ease;
}

.admin-menu-item:hover {
    background: rgba(255,255,255,.15);
    color: #ffffff;
}

.admin-menu-item.active {
    background: var(--library-primary);
    color: #fff;
    box-shadow: 0 5px 14px rgba(91, 76, 226, .22);
}

.admin-menu-icon {
    width: 23px;
    text-align: center;
}

/* =========================================================
   PAGE HEADER
========================================================= */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;

    margin-bottom: 24px;
}

.page-title {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -.5px;
}

.page-subtitle {
    margin: 4px 0 0;
    color: var(--library-muted);
    font-size: .9rem;
}

/* =========================================================
   STAT CARDS
========================================================= */

.stat-card-modern {
    position: relative;
    overflow: hidden;

    background: var(--library-surface);
    border: 1px solid var(--library-border);
    border-radius: var(--library-radius-lg);

    padding: 20px;

    box-shadow: var(--library-shadow-sm);

    transition: .2s ease;
}

.stat-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--library-shadow-md);
}

.stat-icon {
    width: 44px;
    height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: rgba(255,255,255,.15);
    color: #ffffff;

    font-size: 20px;
}

.stat-label {
    margin-top: 16px;

    color: var(--library-muted);
    font-size: .82rem;
    font-weight: 600;
}

.stat-value {
    margin-top: 2px;

    font-size: 1.85rem;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.7px;
}

/* =========================================================
   TABLE
========================================================= */

.library-table {
    margin-bottom: 0;
}

.library-table thead th {
    border-bottom: 1px solid var(--library-border);
    color: var(--library-muted);

    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.library-table tbody td {
    padding-top: 15px;
    padding-bottom: 15px;
    border-color: #f0f0f4;
    vertical-align: middle;
}

.library-table tbody tr {
    transition: background .15s ease;
}

.library-table tbody tr:hover {
    background: #fafaff;
}

/* =========================================================
   BADGES
========================================================= */

.badge {
    border-radius: 8px;
    padding: 6px 9px;
    font-weight: 600;
}

/* =========================================================
   FORM
========================================================= */

.form-control,
.form-select {
    border-color: var(--library-border);
    border-radius: 11px;
    padding: 10px 13px;
}

.form-control:focus,
.form-select:focus {
    border-color: #b9b3ff;
    box-shadow: 0 0 0 .2rem rgba(91, 76, 226, .10);
}

/* =========================================================
   ALERT
========================================================= */

.alert {
    border: 0;
    border-radius: 14px;
}

/* =========================================================
   FOOTER
========================================================= */

.library-footer {
    background: var(--library-gradient-dark);
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    
}

.library-footer-logo {
    height: 52px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
    margin-right: 12px;
}

.library-footer-title {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    color: #212529;
}

.library-footer-subtitle {
    color: rgba(255,255,255,.75);
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 2px;
}

.library-footer-copy {
    color: rgba(255,255,255,.85);
    font-size: 0.85rem;
    color: #495057;
}

.library-footer-small {
    color: rgba(255,255,255,.65);
    font-size: 0.75rem;
    color: #868e96;
    margin-top: 4px;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 991.98px) {

    .admin-sidebar {
        position: static;
    }

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

@media (max-width: 575.98px) {

    .page-title {
        font-size: 1.3rem;
    }

    .stat-value {
        font-size: 1.55rem;
    }

    .library-navbar .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

   MOBILE RESPONSIVE
   ========================================================= */

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 767.98px) {

    .library-hero {
        padding: 38px 16px 42px;
        overflow: hidden;
    }

    .library-hero .container {
        width: 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .hero-badge {
        font-size: .72rem;
        padding: 6px 10px;
        margin-bottom: 16px;
    }

    .hero-title {
        font-size: clamp(2.35rem, 10vw, 3.25rem);
        line-height: 1.02;
        letter-spacing: -1.8px;
        margin-bottom: 24px;
        max-width: 100%;
        white-space: normal;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .hero-actions .btn {
        width: 100%;
        min-height: 48px;
        padding: 10px 12px;
        font-size: .86rem;
    }

    .search-panel {
        margin-top: 30px;
        padding: 18px;
        border-radius: 18px;
        max-width: 100%;
        overflow: hidden;
    }

    .search-panel .form-control,
    .search-panel .form-select,
    .search-btn {
        min-height: 48px;
        font-size: .9rem;
        max-width: 100%;
    }

    .catalog-section {
        padding: 42px 16px 55px;
    }

    .catalog-section .container {
        width: 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .section-title {
        font-size: 1.45rem;
    }

    .book-card {
        border-radius: 15px !important;
    }

    .book-card .card-body {
        padding: 13px !important;
    }

    .book-title {
        font-size: .88rem;
    }

    .book-author {
        font-size: .76rem;
        margin-bottom: 14px;
    }

    .book-btn {
        font-size: .75rem;
        padding: 8px 9px;
    }

    .book-category {
        font-size: .66rem;
        padding: 4px 7px;
    }
}

@media (max-width: 420px) {

    .library-hero {
        padding-left: 14px;
        padding-right: 14px;
    }

    .hero-title {
        font-size: 2.35rem;
    }

    .hero-actions {
        grid-template-columns: 1fr;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .search-panel {
        padding: 15px;
    }

    .search-panel .row > div {
        width: 100%;
    }

    .search-btn {
        margin-top: 2px;
    }

    .catalog-section {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* =========================================================
   PUSTAKATA ADMIN DASHBOARD UI/UX
   2026-08-20
   Gradient + Animation + Consistent Color System
========================================================= */

.admin-dashboard {
    position: relative;
}

/* =========================================================
   DASHBOARD HEADER
========================================================= */

.dashboard-page-header {
    position: relative;
    padding: 8px 0 4px;
}

.dashboard-eyebrow,
.dashboard-section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--library-primary-dark);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.dashboard-eyebrow::before,
.dashboard-section-eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--library-primary);
    box-shadow: 0 0 0 5px rgba(99,102,241,.10);
}

.dashboard-page-header .page-title {
    margin-top: 7px;
    font-size: clamp(1.65rem, 2.5vw, 2.15rem);
    background: var(--library-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.dashboard-page-header .page-subtitle {
    max-width: 680px;
}

/* =========================================================
   PRIMARY BUTTON
========================================================= */

.dashboard-primary-btn,
.dashboard-secondary-btn {
    position: relative;
    overflow: hidden;
    border: 0;
    color: #fff !important;
    background: var(--library-gradient);
    box-shadow: 0 10px 24px rgba(99,102,241,.20);
}

.dashboard-primary-btn {
    min-height: 46px;
    padding: 10px 17px;
}

.dashboard-primary-btn:hover,
.dashboard-secondary-btn:hover {
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(99,102,241,.28);
}

.dashboard-primary-btn::before,
.dashboard-secondary-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        transparent 20%,
        rgba(255,255,255,.22) 50%,
        transparent 80%
    );
    transform: translateX(-120%);
    transition: transform .55s ease;
}

.dashboard-primary-btn:hover::before,
.dashboard-secondary-btn:hover::before {
    transform: translateX(120%);
}

.dashboard-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-right: 5px;
    border-radius: 7px;
    background: rgba(255,255,255,.16);
    font-size: 1rem;
    line-height: 1;
}

/* =========================================================
   STAT CARDS
========================================================= */

.dashboard-stat-card {
    min-height: 185px;
    border: 0;
    color: #fff;
    box-shadow: 0 12px 30px rgba(30,41,59,.10);
    animation: dashboardFadeUp .55s ease both;
}

.dashboard-stat-card:nth-child(1) {
    animation-delay: .05s;
}

.dashboard-stat-card:nth-child(2) {
    animation-delay: .10s;
}

.dashboard-stat-card:nth-child(3) {
    animation-delay: .15s;
}

.dashboard-stat-card:nth-child(4) {
    animation-delay: .20s;
}

.dashboard-stat-card::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    right: -60px;
    bottom: -70px;
    border-radius: 50%;
    background: rgba(255,255,255,.10);
    transition: transform .35s ease;
}

.dashboard-stat-card:hover::after {
    transform: scale(1.35);
}

.dashboard-stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 38px rgba(30,41,59,.16);
}

.dashboard-stat-indigo {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 55%, #818cf8 100%);
}

.dashboard-stat-violet {
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 52%, #a78bfa 100%);
}

.dashboard-stat-blue {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 52%, #60a5fa 100%);
}

.dashboard-stat-card .stat-card-top {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-stat-card .stat-icon {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
    animation: dashboardIconFloat 3.5s ease-in-out infinite;
}

.dashboard-stat-card .stat-label {
    position: relative;
    z-index: 2;
    margin-top: 18px;
    color: rgba(255,255,255,.82);
}

.dashboard-stat-card .stat-value {
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: clamp(1.8rem, 3vw, 2.25rem);
}

.stat-description {
    position: relative;
    z-index: 2;
    margin-top: 5px;
    color: rgba(255,255,255,.70);
    font-size: .78rem;
}

/* =========================================================
   POPULAR CARD
========================================================= */

.dashboard-popular-card {
    overflow: hidden;
    border: 1px solid rgba(226,232,240,.90);
    box-shadow: 0 12px 32px rgba(15,23,42,.06);
    animation: dashboardFadeUp .65s ease .25s both;
}

.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--library-border);
    background:
        linear-gradient(
            135deg,
            rgba(99,102,241,.055),
            rgba(139,92,246,.025),
            rgba(59,130,246,.045)
        );
}

.dashboard-section-title {
    margin: 6px 0 0;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -.25px;
}

.dashboard-section-description {
    margin: 4px 0 0;
    color: var(--library-muted);
    font-size: .82rem;
}

/* =========================================================
   TABLE
========================================================= */

.dashboard-table-wrapper {
    padding: 0 18px 8px;
}

.dashboard-table {
    margin-bottom: 0;
}

.dashboard-table thead th {
    padding-top: 17px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--library-border);
}

.dashboard-table tbody tr {
    transition:
        transform .18s ease,
        background-color .18s ease,
        box-shadow .18s ease;
}

.dashboard-table tbody tr:hover {
    background: linear-gradient(
        90deg,
        rgba(99,102,241,.035),
        rgba(139,92,246,.025)
    );
    transform: translateX(3px);
}

.dashboard-book-title {
    max-width: 520px;
    overflow: hidden;
    color: var(--library-text);
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-download-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 5px 9px;
    border-radius: 9px;
    background: var(--library-primary-soft);
    color: var(--library-primary-dark);
    font-size: .8rem;
    font-weight: 800;
}

.dashboard-badge-published {
    background: rgba(25,135,84,.10);
    color: #087443;
}

.dashboard-badge-draft {
    background: rgba(100,116,139,.11);
    color: #475569;
}

/* =========================================================
   SOFT GLOW
========================================================= */

.stat-card-glow {
    position: absolute;
    top: -55px;
    right: -45px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255,255,255,.10);
    filter: blur(2px);
    pointer-events: none;
}

/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes dashboardFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dashboardIconFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

/* =========================================================
   ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .dashboard-stat-card,
    .dashboard-popular-card,
    .dashboard-stat-card .stat-icon {
        animation: none !important;
    }

    .dashboard-stat-card,
    .dashboard-table tbody tr,
    .dashboard-primary-btn,
    .dashboard-secondary-btn {
        transition: none !important;
    }
}

/* =========================================================
   RESPONSIVE DASHBOARD
========================================================= */

@media (max-width: 767.98px) {

    .dashboard-page-header {
        padding-top: 2px;
    }

    .dashboard-primary-btn {
        width: 100%;
        justify-content: center;
    }

    .dashboard-stat-card {
        min-height: 165px;
        padding: 17px !important;
    }

    .dashboard-card-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 19px;
    }

    .dashboard-secondary-btn {
        width: 100%;
    }

    .dashboard-table-wrapper {
        padding-left: 10px;
        padding-right: 10px;
    }

    .dashboard-book-title {
        max-width: 190px;
    }
}

@media (max-width: 420px) {

    .dashboard-stat-card {
        min-height: 150px;
    }

    .dashboard-stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 17px;
    }

    .dashboard-stat-card .stat-label {
        margin-top: 13px;
        font-size: .75rem;
    }

    .dashboard-stat-card .stat-value {
        font-size: 1.55rem;
    }

    .stat-description {
        font-size: .7rem;
    }

    .dashboard-table {
        font-size: .82rem;
    }
}


/* =========================================================
   PUSTAKATA BUTTON SYSTEM
   Global UI/UX Color Correction
   2026-08-20
========================================================= */

/* PRIMARY
   Untuk: Tambah, Simpan, Aksi utama
--------------------------------------------------------- */

.btn-primary {
    color: #ffffff !important;
    background: var(--library-gradient) !important;
    border: 0 !important;
    box-shadow: 0 7px 18px rgba(99,102,241,.18);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #4338ca 0%,
        #6d28d9 50%,
        #2563eb 100%
    ) !important;
    border: 0 !important;
    box-shadow: 0 10px 24px rgba(99,102,241,.25);
    transform: translateY(-1px);
}


/* OUTLINE PRIMARY
   Untuk: Edit, Detail, navigasi sekunder
--------------------------------------------------------- */

.btn-outline-primary {
    color: #4f46e5 !important;
    background: #ffffff !important;
    border: 1px solid #c7d2fe !important;
    box-shadow: 0 3px 10px rgba(79,70,229,.06);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #4f46e5,
        #7c3aed
    ) !important;
    border-color: transparent !important;
    box-shadow: 0 8px 18px rgba(79,70,229,.20);
    transform: translateY(-1px);
}


/* OUTLINE SECONDARY
   Untuk: Kembali, Batal, aksi netral
--------------------------------------------------------- */

.btn-outline-secondary {
    color: #475569 !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    color: #ffffff !important;
    background: #475569 !important;
    border-color: #475569 !important;
    transform: translateY(-1px);
}


/* SUCCESS
   Untuk: Terbit, Aktif, Konfirmasi
--------------------------------------------------------- */

.btn-success {
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #059669,
        #10b981
    ) !important;
    border: 0 !important;
    box-shadow: 0 6px 16px rgba(16,185,129,.16);
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #047857,
        #059669
    ) !important;
    transform: translateY(-1px);
}


/* WARNING
   Untuk: Status/peringatan
--------------------------------------------------------- */

.btn-warning {
    color: #78350f !important;
    background: linear-gradient(
        135deg,
        #fbbf24,
        #f59e0b
    ) !important;
    border: 0 !important;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #d97706,
        #f59e0b
    ) !important;
}


/* DANGER
   Untuk: Hapus
--------------------------------------------------------- */

.btn-danger {
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #dc2626,
        #ef4444
    ) !important;
    border: 0 !important;
    box-shadow: 0 6px 16px rgba(239,68,68,.14);
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #b91c1c,
        #dc2626
    ) !important;
    transform: translateY(-1px);
}


/* LIGHT
   Untuk aksi ringan di atas background terang
--------------------------------------------------------- */

.btn-light {
    color: #334155 !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

.btn-light:hover,
.btn-light:focus,
.btn-light:active {
    color: #1e293b !important;
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}


/* GENERAL BUTTON BEHAVIOR
--------------------------------------------------------- */

.admin-dashboard .btn,
.admin-shell .btn {
    min-height: 38px;
    font-weight: 650;
    letter-spacing: -.1px;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        background .18s ease,
        color .18s ease;
}

.admin-dashboard .btn-sm,
.admin-shell .btn-sm {
    min-height: 34px;
    padding: 6px 11px;
    border-radius: 9px;
    font-size: .78rem;
}


/* BUTTON FOCUS
--------------------------------------------------------- */

.admin-dashboard .btn:focus-visible,
.admin-shell .btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(99,102,241,.16),
        0 5px 14px rgba(15,23,42,.08);
}


/* PREVENT WHITE-ON-WHITE BUTTONS
--------------------------------------------------------- */

.admin-dashboard .btn-outline-primary,
.admin-shell .btn-outline-primary,
.admin-dashboard .btn-outline-secondary,
.admin-shell .btn-outline-secondary {
    text-shadow: none;
}


/* MOBILE
--------------------------------------------------------- */

@media (max-width: 575.98px) {

    .admin-dashboard .btn,
    .admin-shell .btn {
        min-height: 40px;
    }

    .admin-dashboard .btn-sm,
    .admin-shell .btn-sm {
        min-height: 34px;
    }
}


/* =========================================================
   PUSTAKATA ADMIN UI/UX — ACTION BUTTON SYSTEM
   2026-08-20
========================================================= */

:root {
    --admin-indigo: #4f46e5;
    --admin-indigo-dark: #4338ca;
    --admin-violet: #7c3aed;
    --admin-blue: #2563eb;
    --admin-emerald: #059669;
    --admin-emerald-dark: #047857;
    --admin-red: #dc2626;
    --admin-red-dark: #b91c1c;
    --admin-slate: #64748b;
}





   ADMIN MENU — PROPORTIONAL COLORS
========================================================= */

.admin-menu-item {
    position: relative;

    color: #475569 !important;

    background: transparent;

    border: 1px solid transparent;

    transition:
        color .18s ease,
        background .18s ease,
        transform .18s ease,
        box-shadow .18s ease;
}

.admin-menu-item:hover {
    color: var(--admin-indigo) !important;

    background:
        linear-gradient(
            135deg,
            #eef2ff,
            #f5f3ff
        );

    transform: translateX(2px);
}

.admin-menu-item.active {
    color: #ffffff !important;

    background:
        linear-gradient(
            135deg,
            var(--admin-indigo),
            var(--admin-violet)
        ) !important;

    border-color: transparent;

    box-shadow:
        0 8px 20px rgba(79,70,229,.22);
}

.admin-menu-item.active .admin-menu-icon {
    color: #ffffff;
}


/* =========================================================
   ADMIN DASHBOARD — POLISHED SURFACES
========================================================= */

.admin-dashboard {
    animation: adminDashboardEnter .45s ease both;
}

@keyframes adminDashboardEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    border: 0 !important;

    background:
        linear-gradient(
            135deg,
            var(--admin-indigo),
            var(--admin-violet)
        ) !important;

    box-shadow:
        0 8px 22px rgba(79,70,229,.20);
}

.dashboard-primary-btn:hover {
    background:
        linear-gradient(
            135deg,
            var(--admin-indigo-dark),
            #6d28d9
        ) !important;

    transform: translateY(-2px);

    box-shadow:
        0 12px 28px rgba(79,70,229,.28);
}

.dashboard-stat-card {
    animation: dashboardCardEnter .5s ease both;
}

.dashboard-stat-card:nth-child(2) {
    animation-delay: .05s;
}

.dashboard-stat-card:nth-child(3) {
    animation-delay: .10s;
}

.dashboard-stat-card:nth-child(4) {
    animation-delay: .15s;
}

@keyframes dashboardCardEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767.98px) {


    .library-logout-btn {
        width: 38px;
        height: 38px;
    }

}



/* =========================================================
   UI ACTION BUTTONS
   PUSTAKATA ADMIN DESIGN SYSTEM
========================================================= */

.ui-action-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    min-width: 38px;
    min-height: 36px;
    padding: 7px 10px;

    border: 1px solid transparent;
    border-radius: 10px;

    font-size: .8rem;
    font-weight: 700;
    line-height: 1;

    text-decoration: none;

    cursor: pointer;

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        background .18s ease,
        border-color .18s ease,
        color .18s ease;
}

.ui-action-btn:hover {
    transform: translateY(-2px);
}

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

.ui-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 18px;
    height: 18px;

    font-size: 15px;
    line-height: 1;
}

.ui-action-label {
    line-height: 1;
}

/* EDIT */

.ui-action-edit {
    color: #4338ca;
    background: #eef2ff;
    border-color: #c7d2fe;
}

.ui-action-edit:hover,
.ui-action-edit:focus {
    color: #ffffff;
    background: linear-gradient(
        135deg,
        #6366f1 0%,
        #4f46e5 55%,
        #4338ca 100%
    );
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(79, 70, 229, .24);
}

/* DELETE */

.ui-action-delete {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

.ui-action-delete:hover,
.ui-action-delete:focus {
    color: #ffffff;
    background: linear-gradient(
        135deg,
        #ef4444 0%,
        #dc2626 100%
    );
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(220, 38, 38, .20);
}

/* SAVE */

.ui-action-save {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.ui-action-save:hover,
.ui-action-save:focus {
    color: #ffffff;
    background: linear-gradient(
        135deg,
        #10b981 0%,
        #059669 100%
    );
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(5, 150, 105, .20);
}

/* STATUS TOGGLE */

.ui-action-status {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}

.ui-action-status:hover,
.ui-action-status:focus {
    color: #ffffff;
    background: linear-gradient(
        135deg,
        #f59e0b 0%,
        #d97706 100%
    );
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(217, 119, 6, .20);
}

/* ACTION GROUP */

.ui-action-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

/* TABLE ACTION COLUMN */

.library-table .ui-action-btn {
    vertical-align: middle;
}

/* MOBILE */

@media (max-width: 575.98px) {

    .ui-action-btn {
        width: 36px;
        min-width: 36px;
        height: 36px;
        padding: 0;
    }

    .ui-action-label {
        display: none;
    }

    .ui-action-icon {
        font-size: 15px;
    }

}




/* =========================================================
   DASHBOARD STAT CARD - CONSISTENT GRADIENT SYSTEM
========================================================= */

.dashboard-stat-card {
    position: relative;
    overflow: hidden;

    color: #ffffff;

    border: 0;

    box-shadow:
        0 12px 30px rgba(30,41,59,.10);

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.dashboard-stat-card::before {
    content: "";
    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(255,255,255,.20),
            transparent 42%
        );

    pointer-events: none;
}

.dashboard-stat-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 18px 38px rgba(30,41,59,.16);
}

.dashboard-stat-indigo {
    background: linear-gradient(
        135deg,
        #6366f1 0%,
        #4f46e5 55%,
        #4338ca 100%
    );
}

.dashboard-stat-violet {
    background: linear-gradient(
        135deg,
        #8b5cf6 0%,
        #7c3aed 55%,
        #6d28d9 100%
    );
}

.dashboard-stat-blue {
    background: linear-gradient(
        135deg,
        #3b82f6 0%,
        #2563eb 55%,
        #1d4ed8 100%
    );
}

.dashboard-stat-card .stat-label {
    color: rgba(255,255,255,.78);
}

.dashboard-stat-card .stat-value {
    color: #ffffff;
}

.dashboard-stat-card .stat-description {
    color: rgba(255,255,255,.68);
}

.dashboard-stat-card .stat-icon {
    position: relative;
    z-index: 1;

    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.16);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.12);
}


/* =========================================================
   DASHBOARD MOTION
========================================================= */

@keyframes dashboardFadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dashboardGlow {
    0%,
    100% {
        opacity: .35;
        transform: scale(1);
    }

    50% {
        opacity: .65;
        transform: scale(1.08);
    }
}

.admin-dashboard .dashboard-page-header {
    animation: dashboardFadeUp .45s ease both;
}

.admin-dashboard .dashboard-stat-card {
    animation: dashboardFadeUp .5s ease both;
}

.admin-dashboard .dashboard-stat-card:nth-child(1) {
    animation-delay: .04s;
}

.admin-dashboard .dashboard-stat-card:nth-child(2) {
    animation-delay: .08s;
}

.admin-dashboard .dashboard-stat-card:nth-child(3) {
    animation-delay: .12s;
}

.admin-dashboard .dashboard-stat-card:nth-child(4) {
    animation-delay: .16s;
}

.dashboard-stat-glow {
    position: absolute;

    width: 130px;
    height: 130px;

    right: -55px;
    top: -55px;

    border-radius: 50%;

    background: rgba(255,255,255,.12);

    filter: blur(2px);

    animation: dashboardGlow 4s ease-in-out infinite;
}

.dashboard-popular-card {
    animation: dashboardFadeUp .55s ease .20s both;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

}


/* =========================================================
   FOOTER COLOR CONSISTENCY
========================================================= */

.library-footer {
    background: linear-gradient(
        135deg,
        #312e81 0%,
        #4338ca 45%,
        #1e3a8a 100%
    );

    color: #ffffff;
}

.library-footer-title {
    color: #ffffff;
}

.library-footer-subtitle {
    color: rgba(255,255,255,.72);
}

.library-footer-copy {
    color: rgba(255,255,255,.86);
}

.library-footer-small {
    color: rgba(255,255,255,.62);
}



/* =========================================================
   PUSTAKATA — MODERN CLEAN DESIGN SYSTEM
   Version: 2026-08-20
   Purpose: Global visual refresh / elegant clean UI
========================================================= */

:root {
    /* Core palette */
    --pk-primary: #0f766e;
    --pk-primary-dark: #115e59;
    --pk-primary-light: #14b8a6;

    --pk-blue: #2563eb;
    --pk-blue-dark: #1d4ed8;

    --pk-success: #059669;
    --pk-warning: #d97706;
    --pk-danger: #dc2626;

    /* Surfaces */
    --pk-bg: #f6f8fb;
    --pk-surface: #ffffff;
    --pk-surface-soft: #f8fafc;
    --pk-surface-hover: #f1f5f9;

    /* Typography */
    --pk-text: #172033;
    --pk-text-secondary: #475569;
    --pk-text-muted: #64748b;

    /* Borders */
    --pk-border: #e2e8f0;
    --pk-border-soft: rgba(148, 163, 184, .18);

    /* Shadows */
    --pk-shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
    --pk-shadow-sm: 0 4px 14px rgba(15, 23, 42, .06);
    --pk-shadow-md: 0 10px 30px rgba(15, 23, 42, .09);
    --pk-shadow-lg: 0 18px 45px rgba(15, 23, 42, .12);

    /* Radius */
    --pk-radius-sm: 10px;
    --pk-radius-md: 14px;
    --pk-radius-lg: 18px;
    --pk-radius-xl: 22px;

    /* Motion */
    --pk-ease: cubic-bezier(.22, 1, .36, 1);
    --pk-transition: .25s var(--pk-ease);
}


/* =========================================================
   GLOBAL FOUNDATION
========================================================= */

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(
            circle at 0% 0%,
            rgba(20, 184, 166, .035),
            transparent 30%
        ),
        radial-gradient(
            circle at 100% 20%,
            rgba(37, 99, 235, .025),
            transparent 28%
        ),
        var(--pk-bg);

    color: var(--pk-text);

    transition:
        background-color .3s ease,
        color .3s ease;
}


/* =========================================================
   GLOBAL SELECTION
========================================================= */

::selection {
    color: #ffffff;
    background: var(--pk-primary);
}


/* =========================================================
   LINKS
========================================================= */

a {
    transition:
        color var(--pk-transition),
        background var(--pk-transition),
        border-color var(--pk-transition),
        transform var(--pk-transition),
        box-shadow var(--pk-transition);
}


/* =========================================================
   NAVBAR
========================================================= */




/* =========================================================
   BUTTON SYSTEM
========================================================= */

.btn {
    border-radius: 11px;

    font-weight: 600;

    transition:
        transform var(--pk-transition),
        box-shadow var(--pk-transition),
        background var(--pk-transition),
        border-color var(--pk-transition),
        color var(--pk-transition);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0) scale(.98);
}

.btn-primary,
.dashboard-primary-btn {
    border-color: transparent !important;

    background:
        linear-gradient(
            135deg,
            var(--pk-primary),
            var(--pk-primary-light)
        ) !important;

    box-shadow:
        0 7px 18px rgba(15,118,110,.18);
}

.btn-primary:hover,
.btn-primary:focus,
.dashboard-primary-btn:hover {
    background:
        linear-gradient(
            135deg,
            var(--pk-primary-dark),
            var(--pk-primary)
        ) !important;

    box-shadow:
        0 12px 26px rgba(15,118,110,.26);
}

.btn-outline-primary {
    color: var(--pk-primary) !important;

    border-color: rgba(15,118,110,.35) !important;

    background: #ffffff;
}

.btn-outline-primary:hover {
    color: #ffffff !important;

    border-color: var(--pk-primary) !important;

    background: var(--pk-primary) !important;

    box-shadow:
        0 8px 20px rgba(15,118,110,.16);
}

.btn-outline-secondary {
    color: var(--pk-text-secondary) !important;

    border-color: var(--pk-border) !important;

    background: #ffffff;
}

.btn-outline-secondary:hover {
    color: var(--pk-text) !important;

    background: var(--pk-surface-hover);

    border-color: #cbd5e1 !important;
}


/* =========================================================
   CARDS — CLEAN GLASS SURFACE
========================================================= */

.card {
    border: 1px solid var(--pk-border-soft) !important;

    border-radius: var(--pk-radius-lg) !important;

    background:
        rgba(255,255,255,.94) !important;

    box-shadow:
        var(--pk-shadow-sm);

    transition:
        transform .3s var(--pk-ease),
        box-shadow .3s var(--pk-ease),
        border-color .3s ease;
}

.card:hover {
    border-color:
        rgba(15,118,110,.14) !important;

    box-shadow:
        var(--pk-shadow-md);
}

.card .card-body {
    position: relative;
}


/* =========================================================
   DASHBOARD STAT CARDS
========================================================= */

.dashboard-stat-card {
    border-radius: var(--pk-radius-xl) !important;

    overflow: hidden;

    box-shadow:
        0 12px 30px rgba(15,23,42,.09) !important;

    transition:
        transform .35s var(--pk-ease),
        box-shadow .35s var(--pk-ease);
}

.dashboard-stat-card:hover {
    transform:
        translateY(-6px)
        scale(1.008);

    box-shadow:
        0 20px 42px rgba(15,23,42,.15) !important;
}

.dashboard-stat-indigo,
.dashboard-stat-violet,
.dashboard-stat-blue {
    background:
        linear-gradient(
            135deg,
            #0f766e,
            #0d9488 52%,
            #2563eb
        ) !important;
}


/* =========================================================
   ADMIN SIDEBAR
========================================================= */

.admin-sidebar-card {
    position: relative;

    overflow: hidden;

    border:
        1px solid var(--pk-border-soft) !important;

    border-radius:
        var(--pk-radius-xl) !important;

    background:
        rgba(255,255,255,.94) !important;

    box-shadow:
        var(--pk-shadow-md);

    transition:
        box-shadow .3s ease,
        transform .3s var(--pk-ease);
}

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

.admin-sidebar-header {
    position: relative;

    padding: 24px 22px 20px;

    background:
        linear-gradient(
            135deg,
            #0f766e,
            #0d9488 58%,
            #2563eb
        ) !important;

    color: #ffffff;
}

.admin-sidebar-header::after {
    content: "";

    position: absolute;

    width: 120px;
    height: 120px;

    right: -50px;
    top: -60px;

    border-radius: 50%;

    background:
        rgba(255,255,255,.10);

    animation:
        pkSoftFloat 6s ease-in-out infinite;
}

.admin-sidebar-eyebrow {
    color: rgba(255,255,255,.68) !important;

    letter-spacing: .12em;
}

.admin-sidebar-title {
    color: #ffffff !important;
    background: linear-gradient(
            135deg,
            var(--pk-primary),
            #0d9488
        ) !important;
    font-weight: 750;
}


/* =========================================================
   ADMIN MENU
========================================================= */

.admin-sidebar-nav {
    padding: 12px;
}

.admin-menu-item {
    position: relative;

    display: flex;
    align-items: center;
    gap: 11px;

    min-height: 46px;

    margin: 3px 0;

    padding: 10px 12px;

    border-radius: 12px !important;

    color: var(--pk-text-secondary) !important;

    transition:
        color var(--pk-transition),
        background var(--pk-transition),
        transform var(--pk-transition),
        box-shadow var(--pk-transition);
}

.admin-menu-item:hover {
    color: var(--pk-primary) !important;

    background:
        linear-gradient(
            90deg,
            rgba(20,184,166,.08),
            rgba(37,99,235,.035)
        ) !important;

    transform:
        translateX(4px);
}

.admin-menu-item.active {
    color: #ffffff !important;

    background:
        linear-gradient(
            135deg,
            var(--pk-primary),
            #0d9488
        ) !important;

    box-shadow:
        0 8px 20px rgba(15,118,110,.20);

    transform:
        translateX(3px);
}

.admin-menu-item.active::before {
    content: "";

    position: absolute;

    left: -1px;
    top: 9px;
    bottom: 9px;

    width: 3px;

    border-radius: 0 4px 4px 0;

    background: #ffffff;
}

.admin-menu-icon {
    transition:
        transform var(--pk-transition);
}

.admin-menu-item:hover .admin-menu-icon {
    transform:
        scale(1.08)
        rotate(-2deg);
}

.admin-menu-item.active .admin-menu-icon {
    color: #ffffff !important;
}

.admin-menu-divider {
    height: 1px;

    margin: 12px 4px;

    background:
        var(--pk-border);
}


/* =========================================================
   FORMS
========================================================= */

.form-control,
.form-select {
    min-height: 43px;

    color: var(--pk-text) !important;

    border:
        1px solid var(--pk-border) !important;

    border-radius:
        11px !important;

    background:
        #ffffff !important;

    box-shadow:
        var(--pk-shadow-xs);

    transition:
        border-color var(--pk-transition),
        box-shadow var(--pk-transition),
        transform var(--pk-transition);
}

.form-control:hover,
.form-select:hover {
    border-color:
        #cbd5e1 !important;
}

.form-control:focus,
.form-select:focus {
    border-color:
        var(--pk-primary) !important;

    box-shadow:
        0 0 0 4px rgba(15,118,110,.10) !important;

    transform:
        translateY(-1px);
}

.form-control::placeholder {
    color:
        #94a3b8;
}


/* =========================================================
   SEARCH / FILTER AREA
========================================================= */

form.row.g-2,
form.row.g-3 {
    position: relative;
}


/* =========================================================
   TABLE
========================================================= */

.table {
    color: var(--pk-text);
}

.table thead th {
    padding-top: 13px;
    padding-bottom: 13px;

    color: var(--pk-text-muted);

    font-size: .76rem;
    font-weight: 750;

    text-transform: uppercase;
    letter-spacing: .055em;

    border-bottom:
        1px solid var(--pk-border) !important;
}

.table tbody tr {
    transition:
        background var(--pk-transition),
        transform var(--pk-transition),
        box-shadow var(--pk-transition);
}

.table tbody tr:hover {
    background:
        rgba(15,118,110,.025);
}

.table tbody td {
    border-color:
        rgba(226,232,240,.72);

    vertical-align: middle;
}


/* =========================================================
   BADGES
========================================================= */

.badge {
    border-radius: 999px !important;

    padding:
        .42em .72em !important;

    font-weight: 650;
}


/* =========================================================
   ACTION BUTTONS
========================================================= */

.ui-action-btn {
    border-radius: 10px !important;

    transition:
        transform var(--pk-transition),
        box-shadow var(--pk-transition),
        background var(--pk-transition),
        border-color var(--pk-transition);
}

.ui-action-btn:hover {
    transform:
        translateY(-2px)
        scale(1.015);

    box-shadow:
        0 7px 16px rgba(15,23,42,.10);
}

.ui-action-btn:active {
    transform:
        scale(.96);
}

.ui-action-icon {
    transition:
        transform .25s var(--pk-ease);
}

.ui-action-btn:hover .ui-action-icon {
    transform:
        scale(1.12);
}

.ui-action-edit:hover {
    box-shadow:
        0 8px 18px rgba(37,99,235,.15);
}

.ui-action-delete:hover {
    box-shadow:
        0 8px 18px rgba(220,38,38,.16);
}

.ui-action-status:hover {
    box-shadow:
        0 8px 18px rgba(15,118,110,.16);
}


/* =========================================================
   ALERTS
========================================================= */

.alert {
    border-radius:
        var(--pk-radius-md) !important;

    border:
        1px solid transparent;

    box-shadow:
        var(--pk-shadow-xs);

    animation:
        pkFadeSlide .4s var(--pk-ease) both;
}


/* =========================================================
   PAGINATION
========================================================= */

.pagination {
    gap: 5px;
}

.pagination .page-link {
    min-width: 38px;
    min-height: 38px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px !important;

    border:
        1px solid var(--pk-border) !important;

    color:
        var(--pk-text-secondary);

    background:
        #ffffff;

    box-shadow:
        var(--pk-shadow-xs);

    transition:
        transform var(--pk-transition),
        background var(--pk-transition),
        color var(--pk-transition),
        box-shadow var(--pk-transition);
}

.pagination .page-link:hover {
    color:
        var(--pk-primary);

    background:
        #f0fdfa;

    transform:
        translateY(-2px);

    box-shadow:
        0 6px 14px rgba(15,118,110,.10);
}

.pagination .active .page-link {
    color: #ffffff !important;

    border-color:
        var(--pk-primary) !important;

    background:
        var(--pk-primary) !important;

    box-shadow:
        0 7px 16px rgba(15,118,110,.18);
}


/* =========================================================
   ADMIN MAIN CONTENT
========================================================= */

.admin-main-content {
    animation:
        pkPageEnter .45s var(--pk-ease) both;
}

.admin-main-content > * {
    animation:
        pkContentReveal .5s var(--pk-ease) both;
}


/* =========================================================
   PAGE HEADINGS
========================================================= */

.admin-main-content h1,
.admin-main-content h2,
.admin-main-content h3 {
    color: var(--pk-text);

    letter-spacing: -.02em;
}

.admin-main-content h3 {
    font-weight: 750;
}


/* =========================================================
   FOOTER
========================================================= */

.library-footer {
    background:
        linear-gradient(
            135deg,
            #0f172a,
            #134e4a 58%,
            #1e3a8a
        ) !important;

    box-shadow:
        0 -8px 30px rgba(15,23,42,.06);
}


/* =========================================================
   GLOBAL MICRO INTERACTIONS
========================================================= */

.admin-shell .container {
    animation:
        pkPageEnter .45s var(--pk-ease) both;
}

.admin-shell .card,
.admin-shell .admin-sidebar-card {
    will-change: transform;
}

.admin-shell .card:hover {
    transform:
        translateY(-2px);
}


/* =========================================================
   KEYFRAMES
========================================================= */

@keyframes pkPageEnter {
    from {
        opacity: 0;
        transform:
            translateY(12px);
    }

    to {
        opacity: 1;
        transform:
            translateY(0);
    }
}

@keyframes pkContentReveal {
    from {
        opacity: 0;
        transform:
            translateY(8px);
    }

    to {
        opacity: 1;
        transform:
            translateY(0);
    }
}

@keyframes pkFadeSlide {
    from {
        opacity: 0;
        transform:
            translateY(-6px);
    }

    to {
        opacity: 1;
        transform:
            translateY(0);
    }
}

@keyframes pkSoftFloat {
    0%,
    100% {
        transform:
            translate3d(0,0,0)
            scale(1);
    }

    50% {
        transform:
            translate3d(-8px,8px,0)
            scale(1.08);
    }
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 991.98px) {

    .admin-sidebar-card {
        border-radius:
            var(--pk-radius-lg) !important;
    }

    .admin-main-content {
        margin-top: 4px;
    }

}

@media (max-width: 767.98px) {

    .card {
        border-radius:
            15px !important;
    }

    .admin-sidebar-card {
        border-radius:
            16px !important;
    }

    .admin-menu-item:hover {
        transform:
            translateX(2px);
    }

    .table-responsive {
        border-radius:
            13px;
    }

}

@media (max-width: 575.98px) {

    .btn {
        border-radius:
            10px;
    }

    .pagination {
        gap: 3px;
    }

    .pagination .page-link {
        min-width: 34px;
        min-height: 34px;
    }

    .admin-main-content > * {
        animation-duration:
            .35s;
    }

}


/* =========================================================
   ACCESSIBILITY — REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

}


/* =========================================================
   PUSTAKATA — CANONICAL BUTTON SYSTEM
   2026-08-22
   Single final authority for Bootstrap button classes.
   Do not duplicate these rules elsewhere.
========================================================= */

.btn {
    border-radius: 11px;
    font-weight: 600;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        background .18s ease,
        border-color .18s ease,
        color .18s ease;
}

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

.btn:active {
    transform: translateY(0) scale(.98);
}


/* PRIMARY — Tambah / Simpan / Aksi utama */
.btn-primary {
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #4f46e5 0%,
        #7c3aed 50%,
        #2563eb 100%
    ) !important;
    border: 0 !important;
    box-shadow: 0 7px 18px rgba(79,70,229,.18);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #4338ca 0%,
        #6d28d9 50%,
        #1d4ed8 100%
    ) !important;
    border: 0 !important;
    box-shadow: 0 10px 24px rgba(79,70,229,.25);
}


/* OUTLINE PRIMARY — Edit / aksi sekunder */
.btn-outline-primary {
    color: #4f46e5 !important;
    background: #ffffff !important;
    border: 1px solid #c7d2fe !important;
    box-shadow: 0 3px 10px rgba(79,70,229,.06);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #4f46e5,
        #7c3aed
    ) !important;
    border-color: transparent !important;
    box-shadow: 0 8px 18px rgba(79,70,229,.20);
}


/* OUTLINE SECONDARY — Kembali / Reset / Batal */
.btn-outline-secondary {
    color: #475569 !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    color: #ffffff !important;
    background: #475569 !important;
    border-color: #475569 !important;
}


/* SUCCESS — Aktif / Terbit / Konfirmasi */
.btn-success {
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #059669,
        #10b981
    ) !important;
    border: 0 !important;
    box-shadow: 0 6px 16px rgba(16,185,129,.16);
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #047857,
        #059669
    ) !important;
    border: 0 !important;
}


/* WARNING — Status / peringatan */
.btn-warning {
    color: #78350f !important;
    background: linear-gradient(
        135deg,
        #fbbf24,
        #f59e0b
    ) !important;
    border: 0 !important;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #d97706,
        #f59e0b
    ) !important;
    border: 0 !important;
}


/* DANGER — Hapus */
.btn-danger {
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #dc2626,
        #ef4444
    ) !important;
    border: 0 !important;
    box-shadow: 0 6px 16px rgba(239,68,68,.14);
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #b91c1c,
        #dc2626
    ) !important;
    border: 0 !important;
}


/* LIGHT — aksi ringan */
.btn-light {
    color: #334155 !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
}

.btn-light:hover,
.btn-light:focus,
.btn-light:active {
    color: #1e293b !important;
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}


/* ADMIN BUTTON DIMENSIONS */
.admin-dashboard .btn,
.admin-shell .btn {
    min-height: 38px;
    font-weight: 650;
    letter-spacing: -.1px;
}

.admin-dashboard .btn-sm,
.admin-shell .btn-sm {
    min-height: 34px;
    padding: 6px 11px;
    border-radius: 9px;
    font-size: .78rem;
}


/* ACCESSIBILITY */
.admin-dashboard .btn:focus-visible,
.admin-shell .btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(79,70,229,.16),
        0 5px 14px rgba(15,23,42,.08);
}


/* MOBILE */
@media (max-width: 575.98px) {

    .admin-dashboard .btn,
    .admin-shell .btn {
        min-height: 40px;
    }

    .admin-dashboard .btn-sm,
    .admin-shell .btn-sm {
        min-height: 34px;
    }

    .btn {
        border-radius: 10px;
    }
}


/* =========================================================
   END CANONICAL BUTTON SYSTEM
========================================================= */

/* =========================================================
   PUSTAKATA ANALYTICS
========================================================= */

.analytics-page {
    animation: adminDashboardEnter .35s ease both;
}

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

.analytics-eyebrow {
    margin-bottom: 6px;
    color: var(--library-primary);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .12em;
}

.analytics-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 112px;
    padding: 18px;
    border: 1px solid var(--library-border);
    border-radius: 18px;
    background: var(--library-surface);
    box-shadow: var(--library-shadow-sm);
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.analytics-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--library-shadow-md);
}

.analytics-stat-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 800;
}

.analytics-icon-primary {
    color: #4338ca;
    background: #eef2ff;
}

.analytics-icon-blue {
    color: #1d4ed8;
    background: #eff6ff;
}

.analytics-icon-success {
    color: #047857;
    background: #ecfdf5;
}

.analytics-icon-warning {
    color: #b45309;
    background: #fffbeb;
}

.analytics-stat-label {
    color: var(--library-muted);
    font-size: .75rem;
    font-weight: 650;
}

.analytics-stat-value {
    margin-top: 2px;
    color: var(--library-text);
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.15;
}

.analytics-mini-badge {
    padding: 6px 10px;
    border-radius: 999px;
    color: #4338ca;
    background: #eef2ff;
    font-size: .68rem;
    font-weight: 750;
}

.analytics-book-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #eef2f7;
}

.analytics-book-row:last-child {
    border-bottom: 0;
}

.analytics-book-rank {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: #4338ca;
    background: #eef2ff;
    font-size: .75rem;
    font-weight: 800;
}

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

.analytics-book-title {
    overflow: hidden;
    color: var(--library-text);
    font-size: .82rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analytics-book-count {
    flex: 0 0 auto;
    color: var(--library-muted);
    font-size: .75rem;
    font-weight: 750;
}

.analytics-progress {
    height: 6px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2f7;
}

.analytics-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: var(--library-gradient);
}

.analytics-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 11px 0;
    border-bottom: 1px solid #eef2f7;
    color: var(--library-muted);
    font-size: .8rem;
}

.analytics-summary-item:last-child {
    border-bottom: 0;
}

.analytics-summary-item strong {
    color: var(--library-text);
    font-weight: 800;
}

.analytics-big-number {
    color: var(--library-primary-dark);
    font-size: 2.5rem;
    font-weight: 850;
    line-height: 1;
}

.analytics-empty {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    text-align: center;
    color: var(--library-muted);
}

.analytics-empty-icon {
    margin-bottom: 5px;
    font-size: 2rem;
}

.analytics-note {
    padding: 13px 16px;
    border: 1px solid #e0e7ff;
    border-radius: 13px;
    color: #475569;
    background: #f8faff;
    font-size: .75rem;
    line-height: 1.6;
}

@media (max-width: 575.98px) {
    .analytics-header {
        flex-direction: column;
    }

    .analytics-header .btn {
        width: 100%;
    }

    .analytics-stat-card {
        min-height: 98px;
        padding: 14px;
    }

    .analytics-stat-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .analytics-stat-value {
        font-size: 1.25rem;
    }
}

/* =========================================================
   END PUSTAKATA ANALYTICS
========================================================= */


/* =========================================================
   PUSTAKATA — USER NAVBAR CHIP
========================================================= */

.library-user {
    min-height: 40px;
    padding: 5px 10px 5px 6px;
    border-radius: 12px;
    color: rgba(255,255,255,.96) !important;
    transition:
        background .2s ease,
        transform .2s ease;
}

.library-user:hover {
    background: rgba(255,255,255,.12);
    transform: translateY(-1px);
}

.library-user-avatar {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.22);
    color: #ffffff;
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.library-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.library-user-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ffffff;
    font-size: .82rem;
    font-weight: 750;
}

.library-user-role {
    margin-top: 3px;
    color: rgba(255,255,255,.70);
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .15px;
}

@media (max-width: 767.98px) {
    .library-user {
        display: none !important;
    }
}

/* =========================================================
   ADMIN SIDEBAR — MODERN THEME
========================================================= */

.admin-sidebar-card {
    position: relative;
    overflow: hidden;
    padding: 12px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 22px;
    box-shadow: var(--library-shadow-md);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.admin-sidebar-card::before {
    content: "";
    display: block;
    height: 4px;
    margin: -12px -12px 12px;
    background: var(--library-gradient);
}

.admin-sidebar-title {
    padding: 10px 12px 14px;
    color: var(--library-text);
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.admin-menu {
    gap: 5px;
}

.admin-menu-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 11px 13px;
    color: var(--library-text-soft);
    border: 1px solid transparent;
    border-radius: 13px;
    font-weight: 600;
    transition:
        transform .18s ease,
        background .18s ease,
        color .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

.admin-menu-item:hover {
    color: var(--library-primary-dark);
    background: var(--library-primary-soft);
    border-color: rgba(79, 70, 229, .08);
    transform: translateX(3px);
}

.admin-menu-item.active {
    color: #fff;
    background: var(--library-gradient);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(79, 70, 229, .22);
    transform: translateX(2px);
}

.admin-menu-item.active::after {
    content: "";
    position: absolute;
    right: 10px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    box-shadow: 0 0 0 4px rgba(255,255,255,.12);
}

.admin-menu-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    border-radius: 9px;
    background: #f1f5f9;
    font-size: 15px;
    transition: .18s ease;
}

.admin-menu-item:hover .admin-menu-icon {
    background: #fff;
}

.admin-menu-item.active .admin-menu-icon {
    background: rgba(255,255,255,.16);
}

@media (max-width: 991.98px) {
    .admin-sidebar-card {
        border-radius: 18px;
    }

    .admin-menu {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-menu-item {
        transform: none;
    }

    .admin-menu-item:hover,
    .admin-menu-item.active {
        transform: none;
    }
}

@media (max-width: 575.98px) {
    .admin-menu {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   STAT CARDS — COLOR SYSTEM
========================================================= */

.stat-card-modern {
    isolation: isolate;
}

.stat-card-modern::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .045;
    background: var(--stat-gradient);
    transition: opacity .25s ease;
}

.stat-card-modern::after {
    content: "";
    position: absolute;
    top: -45px;
    right: -45px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--stat-gradient);
    opacity: .10;
    transition: transform .3s ease, opacity .3s ease;
}

.stat-card-modern:hover::before {
    opacity: .08;
}

.stat-card-modern:hover::after {
    opacity: .16;
    transform: scale(1.15);
}

/* E-book — Indigo */
.stat-card-modern:has(.stat-icon-books) {
    --stat-gradient: linear-gradient(135deg, #4f46e5, #7c3aed);
}

/* Diterbitkan — Emerald */
.stat-card-modern:has(.stat-icon-published) {
    --stat-gradient: linear-gradient(135deg, #059669, #10b981);
}

/* Siswa — Blue */
.stat-card-modern:has(.stat-icon-students) {
    --stat-gradient: linear-gradient(135deg, #2563eb, #06b6d4);
}

/* Kategori — Amber */
.stat-card-modern:has(.stat-icon-category) {
    --stat-gradient: linear-gradient(135deg, #d97706, #f59e0b);
}

.stat-card-modern .stat-icon {
    position: relative;
    z-index: 1;
    color: #fff;
    background: var(--stat-gradient);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.stat-card-modern:hover .stat-icon {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .16);
}

.stat-card-modern .stat-label {
    position: relative;
    z-index: 1;
}

.stat-card-modern .stat-value {
    position: relative;
    z-index: 1;
}


/* =========================================================
   ADMIN TABLE — MODERN LIBRARY
========================================================= */

.library-table {
    border-collapse: separate;
    border-spacing: 0;
}

.library-table thead th {
    padding: 12px 14px;
    background: #f8fafc;
    border-top: 1px solid var(--library-border);
    border-bottom: 1px solid var(--library-border);
    color: var(--library-muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.library-table thead th:first-child {
    border-radius: 12px 0 0 12px;
}

.library-table thead th:last-child {
    border-radius: 0 12px 12px 0;
}

.library-table tbody tr {
    position: relative;
    transition:
        background .18s ease,
        transform .18s ease;
}

.library-table tbody tr:hover {
    background: #f8faff;
}

.library-table tbody td {
    padding: 16px 14px;
    border-bottom: 1px solid #edf0f5;
    color: var(--library-text-soft);
}

.library-table tbody tr:last-child td {
    border-bottom: 0;
}

.library-table tbody td:first-child {
    color: var(--library-text);
}

.library-table tbody td:last-child {
    color: var(--library-primary-dark);
    font-variant-numeric: tabular-nums;
}

/* Status */

.library-table .badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 0;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .01em;
}

.library-table .text-bg-success {
    color: #047857 !important;
    background: #ecfdf5 !important;
}

.library-table .text-bg-secondary {
    color: #475569 !important;
    background: #f1f5f9 !important;
}

/* Download number */

.library-table tbody td.text-end {
    font-size: .92rem;
}

.library-table tbody td.text-end::before {
    content: "↓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-right: 7px;
    border-radius: 7px;
    background: var(--library-primary-soft);
    color: var(--library-primary);
    font-size: .78rem;
    font-weight: 800;
}

/* Mobile */

@media (max-width: 575.98px) {

    .library-table thead th,
    .library-table tbody td {
        padding: 12px 10px;
    }

    .library-table thead th {
        font-size: .66rem;
    }

    .library-table tbody td.text-end::before {
        display: none;
    }
}


/* =========================================================
   ADMIN BUTTONS — PREMIUM
========================================================= */

.admin-shell .btn {
    position: relative;
    overflow: hidden;
    border-radius: 11px;
    font-weight: 700;
    letter-spacing: -.1px;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        background .18s ease,
        border-color .18s ease;
}

.admin-shell .btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent 20%,
        rgba(255,255,255,.22) 50%,
        transparent 80%
    );
    transform: translateX(-120%);
    transition: transform .45s ease;
}

.admin-shell .btn:hover::after {
    transform: translateX(120%);
}

.admin-shell .btn:hover {
    transform: translateY(-2px);
}

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

/* Primary */

.admin-shell .btn-primary {
    color: #fff;
    background: var(--library-gradient);
    border-color: transparent;
    box-shadow: 0 7px 18px rgba(79, 70, 229, .20);
}

.admin-shell .btn-primary:hover,
.admin-shell .btn-primary:focus {
    color: #fff;
    background: var(--library-gradient);
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(79, 70, 229, .30);
}

/* Outline */

.admin-shell .btn-outline-primary {
    color: var(--library-primary-dark);
    background: #fff;
    border-color: rgba(79, 70, 229, .25);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .04);
}

.admin-shell .btn-outline-primary:hover,
.admin-shell .btn-outline-primary:focus {
    color: #fff;
    background: var(--library-gradient);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(79, 70, 229, .22);
}

/* Small buttons */

.admin-shell .btn-sm {
    min-height: 36px;
    padding: 7px 12px;
    font-size: .78rem;
}


/* =========================================================
   DASHBOARD — SUBTLE MOTION
========================================================= */

@keyframes adminFadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes adminFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.admin-shell .page-header {
    animation: adminFadeUp .45s ease both;
}

.admin-shell .stat-card-modern {
    animation: adminFadeUp .5s ease both;
}

.admin-shell .stat-card-modern:nth-child(1) {
    animation-delay: .04s;
}

.admin-shell .stat-card-modern:nth-child(2) {
    animation-delay: .09s;
}

.admin-shell .stat-card-modern:nth-child(3) {
    animation-delay: .14s;
}

.admin-shell .stat-card-modern:nth-child(4) {
    animation-delay: .19s;
}

.admin-shell .library-card {
    animation: adminFadeUp .55s ease .22s both;
}

.admin-shell .library-table tbody tr {
    animation: adminFadeIn .35s ease both;
}

.admin-shell .library-table tbody tr:nth-child(1) {
    animation-delay: .28s;
}

.admin-shell .library-table tbody tr:nth-child(2) {
    animation-delay: .33s;
}

.admin-shell .library-table tbody tr:nth-child(3) {
    animation-delay: .38s;
}

.admin-shell .library-table tbody tr:nth-child(4) {
    animation-delay: .43s;
}

.admin-shell .library-table tbody tr:nth-child(5) {
    animation-delay: .48s;
}

/* Respect user's reduced-motion preference */

@media (prefers-reduced-motion: reduce) {

    .admin-shell *,
    .admin-shell *::before,
    .admin-shell *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}



/* =========================================================
   STAGE 7 — ADMIN VISUAL POLISH
========================================================= */

.admin-shell {
    position: relative;
}

.admin-shell::before {
    content: "";
    position: absolute;
    top: -80px;
    left: -120px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(99,102,241,.055);
    filter: blur(10px);
    pointer-events: none;
    z-index: 0;
}

.admin-sidebar,
.admin-shell > main {
    position: static;
    z-index: 1;
}


.page-title {
    background: var(--library-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.page-subtitle {
    color: var(--library-muted);
}

.stat-card-modern,
.stat-card {
    transition:
        transform .22s ease,
        box-shadow .22s ease,
        border-color .22s ease;
}

.stat-card-modern:hover,
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--library-shadow-lg);
}

.library-table {
    --bs-table-bg: transparent;
}

.library-table tbody tr {
    transition:
        background-color .18s ease,
        transform .18s ease;
}

.library-table tbody tr:hover {
    background: #f8faff;
}

@media (prefers-reduced-motion: reduce) {
    .admin-menu-item,
    .stat-card-modern,
    .stat-card,
    .library-table tbody tr {
        transition: none;
    }
}

/* =========================================================
   STAGE 8 — DASHBOARD VISUAL POLISH
========================================================= */

.page-header {
    position: relative;
    padding: 4px 2px 2px;
}

.page-header::after {
    content: "";
    display: block;
    width: 54px;
    height: 4px;
    margin-top: 12px;
    border-radius: 999px;
    background: var(--library-gradient);
}

.stat-card-modern {
    min-height: 155px;
    padding: 20px;
    isolation: isolate;
}

.stat-card-modern::before {
    content: "";
    position: absolute;
    top: -45px;
    right: -45px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: currentColor;
    opacity: .045;
    pointer-events: none;
    z-index: -1;
}

.stat-icon {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 20px;
    box-shadow: 0 6px 16px rgba(15,23,42,.08);
}

.stat-icon-books {
    background: #eef2ff;
    color: #4f46e5;
}

.stat-icon-published {
    background: #ecfdf5;
    color: #059669;
}

.stat-icon-students {
    background: #eff6ff;
    color: #2563eb;
}

.stat-icon-category {
    background: #f5f3ff;
    color: #7c3aed;
}

.stat-card-modern:hover .stat-icon {
    transform: scale(1.06) rotate(-2deg);
}

.stat-label {
    letter-spacing: .01em;
}

.stat-value {
    color: var(--library-text);
    font-variant-numeric: tabular-nums;
}

.library-card-hover {
    overflow: hidden;
}

.library-card-hover > .p-4 {
    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,.98),
            rgba(250,251,255,.98)
        );
}

.library-card-hover .h5 {
    color: var(--library-text);
    letter-spacing: -.2px;
}

.library-card-hover .btn {
    box-shadow: 0 4px 12px rgba(15,23,42,.05);
}

.library-card-hover .btn-primary {
    background: var(--library-gradient);
    border-color: transparent;
}

.library-card-hover .btn-primary:hover {
    box-shadow: 0 7px 18px rgba(79,70,229,.22);
}

.library-card-hover .btn-outline-primary {
    color: var(--library-primary-dark);
    border-color: #c7d2fe;
    background: #fff;
}

.library-card-hover .btn-outline-primary:hover {
    color: #fff;
    background: var(--library-primary);
    border-color: var(--library-primary);
}

@media (max-width: 575.98px) {

    .stat-card-modern {
        min-height: 140px;
        padding: 16px;
    }

    .stat-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .stat-value {
        font-size: 1.55rem;
    }

    .page-header::after {
        margin-top: 9px;
    }
}


/* =========================================================
   STAGE 9 — ANALYTICS VISUAL SYSTEM
========================================================= */

.analytics-page {
    position: relative;
}

.analytics-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.analytics-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    color: var(--library-primary);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .13em;
}

.analytics-eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--library-primary);
    box-shadow: 0 0 0 4px rgba(79,70,229,.10);
}

.analytics-header h1 {
    color: var(--library-text);
    letter-spacing: -.5px;
}

.analytics-stat-card {
    position: relative;
    overflow: hidden;
    min-height: 112px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    background: var(--library-surface);
    border: 1px solid var(--library-border);
    border-radius: var(--library-radius-lg);
    box-shadow: var(--library-shadow-sm);
    transition:
        transform .22s ease,
        box-shadow .22s ease,
        border-color .22s ease;
}

.analytics-stat-card::after {
    content: "";
    position: absolute;
    right: -35px;
    bottom: -45px;
    width: 115px;
    height: 115px;
    border-radius: 50%;
    background: currentColor;
    opacity: .045;
    pointer-events: none;
}

.analytics-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--library-shadow-md);
}

.analytics-stat-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 20px;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(15,23,42,.07);
    transition: transform .2s ease;
}

.analytics-stat-card:hover .analytics-stat-icon {
    transform: scale(1.06) rotate(-2deg);
}

.analytics-icon-primary {
    color: #4f46e5;
    background: #eef2ff;
}

.analytics-icon-blue {
    color: #2563eb;
    background: #eff6ff;
}

.analytics-icon-success {
    color: #059669;
    background: #ecfdf5;
}

.analytics-icon-warning {
    color: #d97706;
    background: #fffbeb;
}

.analytics-stat-label {
    color: var(--library-muted);
    font-size: .76rem;
    font-weight: 650;
}

.analytics-stat-value {
    margin-top: 2px;
    color: var(--library-text);
    font-size: 1.55rem;
    line-height: 1.2;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.5px;
}

.analytics-page .card {
    border: 1px solid var(--library-border) !important;
    box-shadow: var(--library-shadow-sm) !important;
    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,.99),
            rgba(250,251,255,.98)
        );
    transition:
        box-shadow .22s ease,
        transform .22s ease;
}

.analytics-page .card:hover {
    box-shadow: var(--library-shadow-md) !important;
}

.analytics-mini-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--library-primary-dark);
    background: var(--library-primary-soft);
    font-size: .68rem;
    font-weight: 800;
}

.analytics-book-row {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 12px 0;
    border-bottom: 1px solid #eef2f7;
}

.analytics-book-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.analytics-book-rank {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--library-primary-dark);
    background: var(--library-primary-soft);
    font-size: .76rem;
    font-weight: 800;
}

.analytics-book-row:nth-child(2) .analytics-book-rank {
    color: #92400e;
    background: #fef3c7;
}

.analytics-book-row:nth-child(3) .analytics-book-rank {
    color: #475569;
    background: #f1f5f9;
}

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

.analytics-book-title {
    overflow: hidden;
    color: var(--library-text);
    font-size: .86rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analytics-book-count {
    flex: 0 0 auto;
    color: var(--library-primary-dark);
    font-size: .78rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.analytics-progress {
    height: 7px;
    margin-top: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2f7;
}

.analytics-progress-bar {
    height: 100%;
    min-width: 3%;
    border-radius: inherit;
    background: var(--library-gradient);
    box-shadow: 0 2px 8px rgba(79,70,229,.18);
    transition: width .5s ease;
}

.analytics-summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 11px 0;
    border-bottom: 1px solid #eef2f7;
    color: var(--library-muted);
    font-size: .82rem;
}

.analytics-summary-item:last-child {
    border-bottom: 0;
}

.analytics-summary-item strong {
    color: var(--library-text);
    font-size: .88rem;
    font-variant-numeric: tabular-nums;
}

.analytics-big-number {
    margin-bottom: 2px;
    color: var(--library-primary-dark);
    font-size: 2.55rem;
    line-height: 1.1;
    font-weight: 850;
    letter-spacing: -1.2px;
    font-variant-numeric: tabular-nums;
}

.analytics-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    gap: 5px;
    color: var(--library-muted);
    text-align: center;
}

.analytics-empty-icon {
    margin-bottom: 8px;
    font-size: 2rem;
}

.analytics-empty strong {
    color: var(--library-text);
}

.analytics-note {
    padding: 14px 16px;
    border: 1px solid #e0e7ff;
    border-radius: 14px;
    color: #475569;
    background: #f8faff;
    font-size: .78rem;
    line-height: 1.65;
}

.analytics-note strong {
    color: var(--library-primary-dark);
}

@media (max-width: 767.98px) {

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

    .analytics-header .btn {
        align-self: flex-start;
    }

    .analytics-stat-card {
        min-height: 100px;
        padding: 15px;
    }

    .analytics-stat-icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .analytics-stat-value {
        font-size: 1.35rem;
    }

    .analytics-big-number {
        font-size: 2.2rem;
    }
}

@media (max-width: 575.98px) {

    .analytics-book-title {
        white-space: normal;
    }

    .analytics-book-row {
        gap: 10px;
    }

    .analytics-book-rank {
        flex-basis: 28px;
        width: 28px;
        height: 28px;
    }
}


/* =========================================================
   STAGE 10 — NAVBAR & FOOTER MODERN THEME
========================================================= */



.library-footer {
    background: linear-gradient(135deg, #111827 0%, #1e1b4b 55%, #312e81 100%);
    color: rgba(255,255,255,.82);
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 -10px 35px rgba(15,23,42,.08);
}

.library-footer-title {
    color: #fff !important;
    font-weight: 800;
}

.library-footer-subtitle {
    color: rgba(255,255,255,.68) !important;
}

.library-footer-copy {
    color: rgba(255,255,255,.78) !important;
}

.library-footer-small {
    color: rgba(255,255,255,.52) !important;
}


/* =========================================================
   STAGE 11 — BUTTON MICRO INTERACTIONS
========================================================= */

.btn {
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background-color .2s ease,
        border-color .2s ease,
        color .2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0) scale(.98);
}

.btn-primary {
    box-shadow: 0 6px 18px rgba(79,70,229,.18);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    box-shadow: 0 10px 24px rgba(79,70,229,.28);
}

.btn-outline-primary {
    background: rgba(255,255,255,.72);
    box-shadow: 0 4px 14px rgba(79,70,229,.06);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus-visible {
    box-shadow: 0 8px 20px rgba(79,70,229,.14);
}

.btn-sm {
    border-radius: 10px;
}

.btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 .2rem rgba(79,70,229,.12),
        0 8px 20px rgba(79,70,229,.14);
}



/* =========================================================
   PUSTAKATA — NAVBAR FINAL OVERRIDE
   2026-08-23
   Purpose: single visual authority for active navbar
========================================================= */

.library-navbar {
    position: relative;
    z-index: 1000;

    background:
        linear-gradient(
            135deg,
            #0f766e 0%,
            #0b6470 48%,
            #2563eb 100%
        ) !important;

    border-bottom: 1px solid rgba(255,255,255,.12);

    box-shadow:
        0 8px 30px rgba(15,118,110,.14);

    transition:
        box-shadow .3s ease,
        background .3s ease;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.library-navbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
    pointer-events: none;
}

.library-navbar .container {
    min-height: 68px;
}

.library-brand {
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    letter-spacing: -.4px;
    gap: 10px;
    font-weight: 800;
    text-decoration: none;
}

.library-logo-img {
    width: 80px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,.12));
}

.library-navbar .nav-link {
    position: relative;
    color: rgba(255,255,255,.82) !important;
    padding: 9px 13px;
    font-weight: 600;
    border-radius: 10px;
    transition:
        color .2s ease,
        background .2s ease,
        transform .2s ease;
}

.library-navbar .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,.10);
    transform: translateY(-1px);
}

.library-navbar .nav-link.active {
    color: #ffffff !important;
    background: rgba(255,255,255,.15);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.08),
        0 4px 14px rgba(15,23,42,.08);
}

.library-navbar .nav-link.active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 3px;
    height: 2px;
    border-radius: 99px;
    background: rgba(255,255,255,.9);
}

.library-navbar .navbar-toggler {
    border-radius: 10px;
    padding: 7px 9px;
    background: rgba(255,255,255,.10);
}

.library-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 .2rem rgba(255,255,255,.18);
}

.library-navbar .navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

.library-navbar .btn-outline-secondary {
    color: #ffffff !important;
    border-color: rgba(255,255,255,.35) !important;
    background: rgba(255,255,255,.08);
}

.library-navbar .btn-outline-secondary:hover,
.library-navbar .btn-outline-secondary:focus {
    color: #115e59 !important;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15,23,42,.12);
    border-color: #ffffff !important;
}

/* =========================================================
   PUSTAKATA — ADMIN MOBILE TEXT FIX
   2026-08-23
========================================================= */

.admin-sidebar-title {
    white-space: nowrap;
    overflow: visible;
}

.library-logout-btn {
    width: auto !important;
    min-width: 38px;
    white-space: nowrap;
}

@media (max-width: 767.98px) {

    .library-user {
        display: inline-flex !important;
    }

    .library-logout-btn {
        width: auto !important;
        min-width: 38px;
        height: 38px;
        padding-left: 10px;
        padding-right: 10px;
        white-space: nowrap;
    }

    .admin-sidebar-title {
        white-space: nowrap;
        font-size: .72rem;
    }
}

/* =========================================================
   ANALYTICS — WEBSITE ACTIVITY CHART
   ========================================================= */

.analytics-chart {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
    min-height: 240px;
    padding: 20px 8px 0;
    border-bottom: 1px solid var(--library-border);
}

.analytics-chart-day {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.analytics-chart-bars {
    width: 100%;
    max-width: 72px;
    height: 170px;
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 5px;
    border-bottom: 1px solid var(--library-border);
}

.analytics-chart-bar {
    width: min(22px, 38%);
    min-height: 3px;
    border-radius: 6px 6px 0 0;
    transition: height .35s ease, transform .2s ease, opacity .2s ease;
    cursor: pointer;
}

.analytics-chart-bar:hover {
    transform: translateY(-3px);
    opacity: .82;
}

.analytics-chart-bar-views {
    background: var(--library-primary);
}

.analytics-chart-bar-visits {
    background: var(--library-accent);
}

.analytics-chart-label {
    margin-top: 10px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--library-text-soft);
    white-space: nowrap;
}

.analytics-chart-values {
    margin-top: 3px;
    font-size: .68rem;
    color: var(--library-muted);
    white-space: nowrap;
}

.analytics-chart-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 5px;
    border-radius: 50%;
    vertical-align: middle;
}

.analytics-chart-dot-views {
    background: var(--library-primary);
}

.analytics-chart-dot-visits {
    background: var(--library-accent);
}

@media (max-width: 575.98px) {
    .analytics-chart {
        gap: 4px;
        padding-left: 0;
        padding-right: 0;
    }

    .analytics-chart-bars {
        height: 145px;
        gap: 3px;
    }

    .analytics-chart-bar {
        width: 28%;
        border-radius: 4px 4px 0 0;
    }

    .analytics-chart-label {
        font-size: .68rem;
    }

    .analytics-chart-values {
        font-size: .6rem;
    }
}
