/* ============================================================
   global.css — E-PerpusJen
   Letakkan di: public/css/global.css
   Panggil via: <link rel="stylesheet" href="{{ asset('css/global.css') }}">
   ============================================================ */

/* ── Cursor ── */
* { cursor: none !important; }
#ep-cursor-outer {
    position: fixed; width: 36px; height: 36px; border-radius: 50%;
    border: 2px solid #2e9cae; pointer-events: none; z-index: 99999;
    transition: transform 0.18s ease; transform: translate(-50%, -50%);
}
#ep-cursor-dot {
    position: fixed; width: 8px; height: 8px; border-radius: 50%;
    background: #2e9cae; pointer-events: none; z-index: 99999;
    transform: translate(-50%, -50%);
}
#ep-cursor-book {
    position: fixed; font-size: 16px; pointer-events: none;
    z-index: 99999; transform: translate(-50%, -50%); line-height: 1;
}

/* ── Bounce keyframe ── */
@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30%            { transform: translateY(-6px); }
}

/* ── CSS Variables ── */
:root {
    --primary:       #2e9cae;
    --primary-dark:  #1e7d8f;
    --primary-light: #4cb8c9;
    --accent:        #f59e0b;
    --bg-main:       #f0fafb;
    --text-main:     #0e2b35;
    --text-muted:    #4b7481;
    --card-bg:       #ffffff;
    --border:        #b7e6ec;
    --shadow:        0 4px 24px rgba(46, 156, 174, 0.12);
    --shadow-hover:  0 8px 40px rgba(46, 156, 174, 0.22);
}

/* ── Base ── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

/* ── Animated Background ── */
.bg-animated {
    position: fixed; inset: 0; z-index: -1; overflow: hidden;
    background: linear-gradient(135deg, #f0fafb 0%, #e8f7f9 50%, #f5fbfc 100%);
}
.bg-orb {
    position: absolute; border-radius: 50%;
    filter: blur(80px); opacity: 0.4;
    animation: float 8s ease-in-out infinite;
}
.bg-orb-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(46,156,174,0.3), transparent);
    top: -200px; right: -100px;
}
.bg-orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(76,184,201,0.2), transparent);
    bottom: 100px; left: -150px; animation-delay: 3s;
}
.bg-orb-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(245,158,11,0.15), transparent);
    top: 50%; right: 20%; animation-delay: 5s;
}

.bg-floating-item {
    position: absolute; opacity: 0; font-size: 1.5rem;
    pointer-events: none;
    animation: libraryFloat linear infinite;
    user-select: none;
}
@keyframes libraryFloat {
    0%   { transform: translateY(110vh) rotate(0deg) scale(0.8); opacity: 0; }
    5%   { opacity: 0.12; }
    90%  { opacity: 0.12; }
    100% { transform: translateY(-15vh) rotate(360deg) scale(1.1); opacity: 0; }
}

/* ── Navbar ── */
.navbar {
    backdrop-filter: blur(20px);
    background: rgba(240, 250, 251, 0.92);
    border-bottom: 1px solid rgba(183, 230, 236, 0.5);
    transition: all 0.3s ease;
}
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow);
}
.nav-link {
    position: relative; color: var(--text-main);
    font-weight: 500; font-size: 0.9rem;
    transition: color 0.3s ease; padding: 0.5rem 0;
}
.nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--primary);
    transition: width 0.3s ease; border-radius: 2px;
}
.nav-link:hover,
.nav-link.active { color: var(--primary); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* ── Nav Cart Button ── */
.nav-cart-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; font-weight: 600; padding: 0.65rem 1.5rem;
    border-radius: 10px; transition: all 0.3s ease; font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(46, 156, 174, 0.3);
    border: none; cursor: pointer; position: relative;
    font-family: 'Plus Jakarta Sans', sans-serif;
    text-decoration: none;
}
.nav-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 156, 174, 0.45);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
}
.nav-cart-badge {
    display: none; position: absolute; top: -7px; right: -7px;
    min-width: 18px; height: 18px; padding: 0 4px;
    background: #ef4444; color: white; border-radius: 99px;
    font-size: 10px; font-weight: 800;
    align-items: center; justify-content: center;
    border: 2px solid white;
    animation: badgePop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Cards ── */
.card-book {
    background: var(--card-bg); border-radius: 16px; overflow: hidden;
    box-shadow: var(--shadow); transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(183, 230, 236, 0.3);
}
.card-book:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(46, 156, 174, 0.3);
}
.card-book .cover-wrapper {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, #e8f7f9, #d9f2f5);
    aspect-ratio: 3 / 4;
}
.card-book .cover-wrapper img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.card-book:hover .cover-wrapper img { transform: scale(1.05); }

/* ── Badge Status ── */
.badge-status {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 50px;
    font-size: 0.7rem; font-weight: 600; letter-spacing: 0.03em;
}
.badge-tersedia       { background: rgba(34, 197, 94, 0.12); color: #15803d; }
.badge-tidak-tersedia { background: rgba(239, 68, 68, 0.1);  color: #dc2626; }

/* ── Buttons ── */
.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; font-weight: 600; padding: 0.65rem 1.5rem;
    border-radius: 10px; transition: all 0.3s ease; font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(46, 156, 174, 0.3);
    border: none; cursor: pointer; text-decoration: none;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 156, 174, 0.45);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
}
.btn-secondary {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; color: var(--primary); font-weight: 600;
    padding: 0.65rem 1.5rem; border-radius: 10px;
    border: 2px solid var(--primary);
    transition: all 0.3s ease; font-size: 0.9rem;
    cursor: pointer; text-decoration: none;
}
.btn-secondary:hover {
    background: var(--primary); color: white;
    transform: translateY(-2px);
}
.btn-accent {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white; font-weight: 600; padding: 0.65rem 1.5rem;
    border-radius: 10px; transition: all 0.3s ease; font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    border: none; cursor: pointer; text-decoration: none;
}
.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

/* ── Section ── */
.section-tag {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(46, 156, 174, 0.1); color: var(--primary-dark);
    font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; padding: 5px 14px; border-radius: 50px;
    border: 1px solid rgba(46, 156, 174, 0.2); margin-bottom: 12px;
}
.section-title {
    font-family: 'Fraunces', serif; font-size: 2.2rem;
    font-weight: 700; color: var(--text-main); line-height: 1.2;
}
.section-subtitle { color: var(--text-muted); font-size: 1rem; margin-top: 8px; }

/* ── Search ── */
.search-wrapper { position: relative; }
.search-input {
    width: 100%; padding: 0.85rem 1.2rem 0.85rem 3.5rem;
    border-radius: 14px; border: 2px solid var(--border);
    background: white; font-size: 0.95rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all 0.3s ease; outline: none; color: var(--text-main);
}
.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(46, 156, 174, 0.12);
}
.search-icon {
    position: absolute; left: 1.1rem; top: 50%;
    transform: translateY(-50%); color: var(--text-muted);
}
.search-dropdown {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: white; border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border); z-index: 100; overflow: hidden;
}

/* ── Chatbot ── */
.chatbot-fab {
    position: fixed; bottom: 24px; right: 24px; z-index: 500;
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 6px 24px rgba(46, 156, 174, 0.45);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border: none;
}
.chatbot-fab:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 10px 32px rgba(46, 156, 174, 0.55);
}
.chatbot-panel {
    position: fixed; bottom: 82px; right: 24px; z-index: 499;
    width: 380px; height: 480px; background: white; border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18); border: 1px solid var(--border);
    display: flex; flex-direction: column; overflow: hidden;
    transform: scale(0.8) translateY(20px); opacity: 0; pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom right;
}
.chatbot-panel.open {
    transform: scale(1) translateY(0);
    opacity: 1; pointer-events: all;
}
.chatbot-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 1rem 1.2rem; color: white;
}
.chatbot-messages {
    flex: 1; overflow-y: auto; padding: 1rem;
    display: flex; flex-direction: column; gap: 12px; background: #f8fdfe;
}
.chatbot-messages::-webkit-scrollbar { width: 4px; }
.chatbot-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.msg-bot { display: flex; align-items: flex-start; gap: 10px; }
.msg-bot-bubble {
    background: white; border: 1px solid var(--border);
    border-radius: 14px 14px 14px 4px;
    padding: 10px 14px; font-size: 0.875rem; line-height: 1.5;
    color: var(--text-main); max-width: 85%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.msg-user { display: flex; justify-content: flex-end; }
.msg-user-bubble {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; border-radius: 14px 14px 4px 14px;
    padding: 10px 14px; font-size: 0.875rem; line-height: 1.5; max-width: 85%;
}
.chatbot-input-area {
    padding: 0.8rem; border-top: 1px solid var(--border);
    background: white; display: flex; gap: 8px;
}
.chatbot-input {
    flex: 1; padding: 0.6rem 1rem; border-radius: 10px;
    border: 1.5px solid var(--border);
    font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.875rem;
    outline: none; transition: border-color 0.3s;
}
.chatbot-input:focus { border-color: var(--primary); }
.chatbot-send {
    width: 38px; height: 38px; background: var(--primary);
    border: none; border-radius: 10px; color: white; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 0.3s;
}
.chatbot-send:hover { background: var(--primary-dark); }

/* ── Appear animation ── */
.appear { opacity: 0; transform: translateY(20px); transition: all 0.6s ease; }
.appear.visible { opacity: 1; transform: translateY(0); }

/* ── Pagination ── */
.pagination-wrapper { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.perpus-pagination {
    display: flex; align-items: center; gap: 6px;
    flex-wrap: wrap; justify-content: center;
    padding: 6px; background: white; border-radius: 18px;
    border: 1px solid rgba(183, 230, 236, 0.5);
    box-shadow: 0 4px 20px rgba(46, 156, 174, 0.10);
}
.page-btn {
    min-width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 6px; border-radius: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.875rem;
    font-weight: 600; color: var(--primary-dark);
    background: transparent; border: 1.5px solid transparent;
    cursor: pointer; text-decoration: none;
    transition: background 0.22s, color 0.22s, border-color 0.22s, transform 0.18s, box-shadow 0.22s;
    user-select: none; position: relative; overflow: hidden;
}
.page-btn:not(.page-active):not(.disabled):hover {
    background: rgba(46, 156, 174, 0.10);
    border-color: rgba(46, 156, 174, 0.25);
    color: var(--primary); transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(46, 156, 174, 0.18);
}
.page-btn.page-active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; border-color: transparent;
    box-shadow: 0 4px 14px rgba(46, 156, 174, 0.40);
    cursor: default; transform: scale(1.08);
}
.page-btn.page-active::after {
    content: ''; position: absolute; inset: 0;
    border-radius: inherit; background: rgba(255, 255, 255, 0.15);
    animation: pageActiveGlow 2.5s ease-in-out infinite;
}
@keyframes pageActiveGlow { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
.page-btn.page-nav {
    background: rgba(46, 156, 174, 0.06);
    border-color: rgba(183, 230, 236, 0.7);
    color: var(--primary);
}
.page-btn.page-nav:not(.disabled):hover {
    background: rgba(46, 156, 174, 0.14);
    border-color: var(--primary); color: var(--primary-dark);
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 12px rgba(46, 156, 174, 0.20);
}
.page-btn.page-nav.disabled {
    opacity: 0.35; cursor: not-allowed;
    background: rgba(183, 230, 236, 0.15);
}
.page-ellipsis {
    min-width: 32px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1rem; color: var(--text-muted);
    letter-spacing: 2px; pointer-events: none; user-select: none;
}
.perpus-pagination .page-btn,
.perpus-pagination .page-ellipsis { animation: pageItemIn 0.35s ease both; }
.perpus-pagination .page-btn:nth-child(1) { animation-delay: 0.00s; }
.perpus-pagination .page-btn:nth-child(2) { animation-delay: 0.04s; }
.perpus-pagination .page-btn:nth-child(3) { animation-delay: 0.08s; }
.perpus-pagination .page-btn:nth-child(4) { animation-delay: 0.12s; }
.perpus-pagination .page-btn:nth-child(5) { animation-delay: 0.16s; }
.perpus-pagination .page-btn:nth-child(6) { animation-delay: 0.20s; }
.perpus-pagination .page-btn:nth-child(7) { animation-delay: 0.24s; }
.perpus-pagination .page-btn:nth-child(8) { animation-delay: 0.28s; }
.perpus-pagination .page-btn:nth-child(9) { animation-delay: 0.32s; }
@keyframes pageItemIn {
    from { opacity: 0; transform: translateY(8px) scale(0.92); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Toast (Laravel session) ── */
.toast {
    position: fixed; top: 90px; right: 24px; z-index: 9999;
    padding: 14px 20px; border-radius: 12px;
    font-size: 0.9rem; font-weight: 500;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.4s ease-out; min-width: 280px;
}
.toast-success { background: #f0fdf4; border-left: 4px solid #22c55e; color: #166534; }
.toast-error   { background: #fef2f2; border-left: 4px solid #ef4444; color: #dc2626; }

/* ── Form ── */
.form-input {
    width: 100%; padding: 0.75rem 1rem; border-radius: 10px;
    border: 2px solid var(--border);
    font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.9rem;
    color: var(--text-main); background: white; outline: none; transition: all 0.3s ease;
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(46, 156, 174, 0.1);
}
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-main); margin-bottom: 6px; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .section-title { font-size: 1.75rem; }
    .chatbot-panel { width: calc(100vw - 48px); height: 420px; right: 24px; }
}
@media (max-width: 480px) {
    .page-btn { min-width: 36px; height: 36px; font-size: 0.8rem; border-radius: 8px; }
    .perpus-pagination { gap: 4px; padding: 4px; border-radius: 14px; }
}

/* ============================================================
   CART SYSTEM
   ============================================================ */
@keyframes badgePop     { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes cartItemIn   { from { opacity: 0; transform: translateX(14px) scale(0.95); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes cartItemOut  { to { opacity: 0; transform: translateX(14px); max-height: 0; padding: 0; margin: 0; overflow: hidden; } }
@keyframes toastSlide   { from { opacity: 0; transform: translateY(8px) scale(0.92); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastFade    { from { opacity: 1; } to { opacity: 0; transform: translateY(6px); } }
@keyframes floatBtnIn   { from { transform: scale(0) translateY(20px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }

/* Modal konfirmasi hapus */
@keyframes modalIn    { from { opacity: 0; transform: scale(0.92) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }

.cart-modal-backdrop {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(14, 43, 53, 0.5); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; padding: 20px;
    animation: backdropIn 0.2s ease;
}
.cart-modal-box {
    background: white; border-radius: 20px; padding: 28px;
    max-width: 360px; width: 100%;
    box-shadow: 0 24px 64px rgba(14, 43, 53, 0.2);
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}
.cart-modal-icon {
    width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 16px;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    display: flex; align-items: center; justify-content: center;
}
.cart-modal-title {
    font-size: 1.1rem; font-weight: 800; color: #0e2b35;
    margin-bottom: 8px; font-family: 'Plus Jakarta Sans', sans-serif;
}
.cart-modal-desc {
    font-size: 0.85rem; color: #4b7481; line-height: 1.6;
    margin-bottom: 20px; font-family: 'Plus Jakarta Sans', sans-serif;
}
.cart-modal-actions { display: flex; gap: 10px; }
.cart-modal-cancel {
    flex: 1; padding: 10px; border-radius: 10px;
    border: 2px solid #e2e8f0; background: white; color: #4b7481;
    font-size: 13px; font-weight: 700; cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif; transition: all 0.2s;
}
.cart-modal-cancel:hover { border-color: #2e9cae; color: #2e9cae; }
.cart-modal-confirm {
    flex: 1; padding: 10px; border-radius: 10px; border: none;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white; font-size: 13px; font-weight: 800; cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3); transition: all 0.2s;
}
.cart-modal-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Cart dropdown */
#cartDropdown {
    display: none; position: fixed; z-index: 1050;
    width: 360px; max-width: calc(100vw - 32px);
    background: white; border-radius: 20px;
    border: 1px solid rgba(183, 230, 236, 0.6);
    box-shadow: 0 20px 60px rgba(46, 156, 174, 0.18);
    overflow: hidden;
    transform: translateY(-10px) scale(0.97); opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}
/* Bridge gap hover antara button dan dropdown */
#cartDropdown::before {
    content: ''; position: absolute; top: -12px; left: 0; right: 0;
    height: 12px; background: transparent;
}

.cart-drop-item {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 10px; border-radius: 12px;
    border: 1px solid rgba(183, 230, 236, 0.5); background: #fafffe;
    animation: cartItemIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: border-color 0.2s, background 0.2s;
}
.cart-drop-item:hover { border-color: rgba(46, 156, 174, 0.3); background: #f0fafb; }
.cart-item-cover {
    width: 38px; height: 52px; border-radius: 7px; object-fit: cover;
    border: 1px solid rgba(183, 230, 236, 0.5); flex-shrink: 0;
}
.cart-item-cover-ph {
    width: 38px; height: 52px; border-radius: 7px;
    background: linear-gradient(135deg, #e8f7f9, #b7e6ec); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.cart-rm-btn {
    width: 26px; height: 26px; border-radius: 7px;
    border: none; background: transparent; color: #b0c4cc;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; flex-shrink: 0;
}
.cart-rm-btn:hover { background: #fee2e2; color: #ef4444; }

/* Pinjam button */
.btn-pinjam-cart {
    display: flex; align-items: center; justify-content: center; gap: 5px;
    width: 100%; padding: 8px; border-radius: 9px;
    background: linear-gradient(135deg, #2e9cae, #1e7d8f);
    color: white; font-size: 11px; font-weight: 700;
    border: none; cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.btn-pinjam-cart:hover { transform: translateY(-2px); box-shadow: 0 5px 16px rgba(46, 156, 174, 0.35); }
.btn-pinjam-cart:active { transform: scale(0.95); }
.btn-pinjam-cart.in-cart {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 3px 12px rgba(5, 150, 105, 0.25);
}

/* Floating cart button */
#floatCartBtn {
    display: none; position: fixed; bottom: 96px; right: 24px; z-index: 490;
    align-items: center; gap: 8px; padding: 12px 18px; border-radius: 100px;
    background: linear-gradient(135deg, #2e9cae, #1e7d8f);
    color: white; border: none; cursor: pointer;
    font-weight: 800; font-size: 13px;
    box-shadow: 0 8px 32px rgba(46, 156, 174, 0.45);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Plus Jakarta Sans', sans-serif;
}
#floatCartBtn:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 12px 40px rgba(46, 156, 174, 0.55); }

#dropCartItems::-webkit-scrollbar       { width: 4px; }
#dropCartItems::-webkit-scrollbar-track  { background: transparent; }
#dropCartItems::-webkit-scrollbar-thumb  { background: #b7e6ec; border-radius: 4px; }

/* Mobile: cart as bottom sheet */
@media (max-width: 767px) {
    #cartDropdown {
        position: fixed !important;
        top: auto !important; bottom: 0 !important;
        left: 0 !important; right: 0 !important;
        width: 100% !important; max-width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        max-height: 85vh; overflow-y: auto;
        transform: translateY(100%) !important;
        opacity: 1 !important;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    #cartDropdown.mobile-open { transform: translateY(0) !important; }

    #cartMobileBackdrop {
        display: none; position: fixed; inset: 0;
        background: rgba(14, 43, 53, 0.45); backdrop-filter: blur(2px);
        z-index: 1049;
    }
    #cartMobileBackdrop.active { display: block; }

    #cartDragHandle { display: flex; justify-content: center; padding: 10px 0 4px; }
    #cartDragHandle span { width: 40px; height: 4px; background: #d1e8ec; border-radius: 99px; display: block; }
}
@media (min-width: 768px) {
    #cartDragHandle        { display: none; }
    #cartMobileBackdrop    { display: none !important; }
}

/* ============================================================
   FLATPICKR OVERRIDES — form.blade.php
   ============================================================ */
.flatpickr-calendar {
    font-family: inherit;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid #cce8ef;
}
.flatpickr-months .flatpickr-month,
.flatpickr-weekdays,
span.flatpickr-weekday {
    background: #0e7490 !important;
    color: #fff !important;
    fill: #fff !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year { color: #fff !important; }
.flatpickr-current-month .flatpickr-monthDropdown-months:hover,
.flatpickr-current-month .numInputWrapper:hover { background: rgba(255, 255, 255, 0.15) !important; }

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
    background: #0e7490 !important;
    border-color: #0e7490 !important;
    color: #fff !important;
}
.flatpickr-day.today { border-color: #0e7490 !important; }
.flatpickr-day:hover {
    background: #e0f7fa !important;
    border-color: #e0f7fa !important;
}
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: #cbd5e1 !important;
    cursor: not-allowed;
}
.flatpickr-time {
    border-top: 1px solid #e0f2f7 !important;
    height: 48px !important;
}
.flatpickr-time input,
.flatpickr-time .flatpickr-am-pm {
    font-size: 15px !important;
    font-weight: 500 !important;
}
.flatpickr-time input:hover,
.flatpickr-time .flatpickr-am-pm:hover,
.flatpickr-time input:focus,
.flatpickr-time .flatpickr-am-pm:focus { background: #e0f7fa !important; }
.numInputWrapper:hover { background: #e0f7fa !important; }
.numInputWrapper span.arrowUp:after   { border-bottom-color: #0e7490 !important; }
.numInputWrapper span.arrowDown:after { border-top-color: #0e7490 !important; }

/* Date input wrapper */
.date-input-wrapper { position: relative; }
.date-input-wrapper .date-icon {
    position: absolute; left: 12px; top: 50%;
    transform: translateY(-50%); color: #6daab8;
    pointer-events: none; z-index: 5;
    display: flex; align-items: center;
}
.date-input-wrapper input.form-input {
    padding-left: 2.5rem !important;
    cursor: pointer !important;
    background: #fff !important;
}

/* Sembunyikan native mobile picker — gunakan custom UI */
.flatpickr-mobile { display: none !important; }

@media (max-width: 640px) {
    .flatpickr-calendar {
        width: 92vw !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-left: 0 !important;
    }
    .flatpickr-day {
        height: 36px !important;
        line-height: 36px !important;
        max-width: 36px !important;
    }
    .flatpickr-time { height: 52px !important; }
    .flatpickr-time input { font-size: 16px !important; }
}

/* ============================================================
   CART FORM — cart-form.blade.php
   ============================================================ */
.form-book-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 14px;
    border: 1px solid rgba(183, 230, 236, 0.5); background: #fafffe;
    animation: formBookIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    transition: border-color 0.2s, background 0.2s;
}
.form-book-item:hover {
    border-color: rgba(46, 156, 174, 0.3);
    background: #f0fafb;
}
@keyframes formBookIn {
    from { opacity: 0; transform: translateY(10px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.form-book-num {
    width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
    background: linear-gradient(135deg, #2e9cae, #1e7d8f);
    color: white; font-size: 11px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.form-book-cover {
    width: 44px; height: 60px; border-radius: 8px; object-fit: cover;
    border: 1px solid rgba(183, 230, 236, 0.5); flex-shrink: 0;
}
.form-book-cover-ph {
    width: 44px; height: 60px; border-radius: 8px;
    background: linear-gradient(135deg, #e8f7f9, #b7e6ec);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.form-book-rm {
    width: 28px; height: 28px; border-radius: 8px; border: none;
    background: transparent; color: #b0c4cc; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; margin-left: auto; flex-shrink: 0;
}
.form-book-rm:hover { background: #fee2e2; color: #ef4444; }
.success-ring { width:80px; height:80px; filter:drop-shadow(0 8px 24px rgba(46,156,174,0.35)); }
.success-svg  { width:80px; height:80px; }
.success-circle-bg { fill:none; stroke:#e8f7f9; stroke-width:4; }
.success-circle {
    fill:none; stroke:#2e9cae; stroke-width:4; stroke-linecap:round;
    stroke-dasharray:226; stroke-dashoffset:226;
    animation:drawCircle 0.7s cubic-bezier(0.4,0,0.2,1) 0.2s forwards;
    transform-origin:center; transform:rotate(-90deg);
}
.success-check {
    fill:none; stroke:#2e9cae; stroke-width:4;
    stroke-linecap:round; stroke-linejoin:round;
    stroke-dasharray:60; stroke-dashoffset:60;
    animation:drawCheck 0.45s ease 0.85s forwards;
}
@keyframes drawCircle { to { stroke-dashoffset:0; } }
@keyframes drawCheck  { to { stroke-dashoffset:0; } }
.sukses-book-item { animation:suксesItemIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both; }
@keyframes suксesItemIn {
    from { opacity:0; transform:translateX(-10px); }
    to   { opacity:1; transform:translateX(0); }
}