/* Public catalogue scoped styles; public frontend SMP Batik Surakarta */
.kt,.kt-book-detail{font-family:inherit;color:#334155;font-size:15px;line-height:1.7;min-width:0;text-align:left}
.kt :where(h2,h3,p,dl,dd),.kt-book-detail :where(h2,h3,p,dl,dd){margin:0}

/* Header & Container Adjustment */
#public-content:has(.kt-stats) .public-page-header{padding-bottom:60px}
.public-reading-layout.kt{padding-top:0!important;padding-bottom:64px!important}
.public-reading-layout.kt.kt-choice-layout,
.public-reading-layout.kt:has(.kt-libraries){padding-top:40px!important}
@media(min-width:768px){
  .public-reading-layout.kt.kt-choice-layout,
  .public-reading-layout.kt:has(.kt-libraries){padding-top:48px!important}
}

/* Accessibility & Utility */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.kt-section-title{font-size:18px;line-height:1.35;font-weight:800;color:#0f172a;letter-spacing:-.01em}

/* Statistics Counter Cards */
.kt-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-top:-38px!important;margin-bottom:24px!important;position:relative;z-index:10}
.kt-stat{position:relative;display:flex;flex-direction:column;justify-content:center;min-width:0;min-height:80px;padding:14px 16px 14px 68px;border:1px solid #e2e8f0;border-radius:14px;background:#fff;box-shadow:0 10px 25px -5px rgba(18,134,60,.08),0 4px 10px -2px rgba(15,23,42,.03);transition:transform .2s cubic-bezier(.16,1,.3,1),box-shadow .2s,border-color .2s}
.kt-stat:hover{transform:translateY(-2px);border-color:#cbd5e1;box-shadow:0 14px 28px -4px rgba(18,134,60,.12),0 6px 14px -2px rgba(15,23,42,.06)}
.kt-stats dt{font-size:12px;font-weight:600;color:#64748b;line-height:1.35}
.kt-stats dd{order:-1;font-size:24px;font-weight:800;line-height:1.2;color:#0f172a;letter-spacing:-.02em;font-variant-numeric:tabular-nums;margin-bottom:2px}
.kt-stat-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:12px;background:#ecfdf5;color:#047857;border:1px solid rgba(4,120,87,.12)}
.kt-stat-icon svg{width:22px;height:22px}
.kt-stat-0 .kt-stat-icon{background:#ecfdf5;color:#047857;border-color:rgba(4,120,87,.15)}
.kt-stat-1 .kt-stat-icon{background:#f0f9ff;color:#0284c7;border-color:rgba(2,132,199,.15)}
.kt-stat-2 .kt-stat-icon{background:#f0fdfa;color:#0d9488;border-color:rgba(13,148,136,.15)}
.kt-stat-3 .kt-stat-icon{background:#fffbeb;color:#d97706;border-color:rgba(217,119,6,.15)}
.kt-stat-4 .kt-stat-icon{background:#f8fafc;color:#475569;border-color:rgba(71,85,105,.15)}

/* Search & Filter Form */
.kt-search{margin-bottom:28px;padding:22px 26px;background:#fff;border:1px solid #e2e8f0;border-radius:18px;box-shadow:0 4px 20px -2px rgba(15,23,42,.04),0 2px 6px -1px rgba(15,23,42,.02)}
.kt-search-header{display:flex;align-items:center;gap:12px;margin-bottom:18px;padding-bottom:16px;border-bottom:1px solid #f1f5f9}
.kt-search-badge{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:10px;background:#ecfdf5;color:#047857;border:1px solid rgba(4,120,87,.15);flex-shrink:0}
.kt-search-badge svg{width:19px;height:19px}
.kt-search-sub{font-size:13px;color:#64748b;margin-top:2px}
.kt-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:end}
.kt-field{min-width:0}
.kt-field label{display:block;margin-bottom:6px;font-size:12px;font-weight:700;color:#334155}
.kt-field input,.kt-field select{display:block;width:100%;min-width:0;min-height:42px;padding:8px 12px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;font:inherit;font-size:13.5px;line-height:1.5;color:#0f172a;transition:border-color .15s,box-shadow .15s}
.kt-field select{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right 12px center;background-repeat:no-repeat;background-size:16px 16px;padding-right:36px;cursor:pointer}
.kt-input-wrap{position:relative;display:flex;align-items:center}
.kt-input-icon{position:absolute;left:12px;width:16px;height:16px;color:#94a3b8;pointer-events:none}
.kt-input-wrap input{padding-left:36px}
.kt-field input::placeholder{color:#94a3b8}
.kt-field input:focus,.kt-field select:focus{border-color:#12863c;outline:0;box-shadow:0 0 0 3px rgba(18,134,60,.12)}
.kt-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;padding-top:16px;margin-top:16px;border-top:1px solid #f1f5f9}
.kt-actions button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:8px 18px;border-radius:9px;font:inherit;font-size:13px;font-weight:700;line-height:1.5;cursor:pointer;transition:all .15s}
.kt-actions button svg{width:15px;height:15px;flex-shrink:0}
.kt-primary{background:#12863c;color:#fff;border:1px solid #12863c;box-shadow:0 2px 6px rgba(18,134,60,.25)}
.kt-primary:hover{background:#0b4824;border-color:#0b4824;box-shadow:0 4px 10px rgba(18,134,60,.35);transform:translateY(-1px)}
.kt-reset{background:#f8fafc;color:#475569;border:1px solid #cbd5e1}
.kt-reset:hover{background:#f1f5f9;color:#0f172a;border-color:#94a3b8}
.kt :focus-visible,.kt-book-detail :focus-visible{outline:2px solid #12863c;outline-offset:2px}

/* Results Header */
.kt-info{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:18px}
.kt-info .kt-section-title{font-size:19px;font-weight:800;color:#0f172a}
.kt-info-count{display:inline-flex;align-items:center;gap:8px;padding:5px 12px;border-radius:9999px;background:#fff;border:1px solid #e2e8f0;font-size:12px;color:#475569;box-shadow:0 1px 3px rgba(15,23,42,.04);font-variant-numeric:tabular-nums}
.kt-info-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#12863c}
.kt-info-count strong{color:#0f172a}

/* Books Grid & Cards */
.kt-books{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:20px}
.kt-book{display:flex;flex-direction:column;min-width:0;overflow:hidden;border:1px solid #e2e8f0;border-radius:14px;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.03);transition:all .25s cubic-bezier(.16,1,.3,1)}
.kt-book:hover{transform:translateY(-4px);box-shadow:0 12px 24px -4px rgba(15,23,42,.08),0 4px 8px -2px rgba(15,23,42,.03);border-color:#cbd5e1}

/* Book Cover Presentation */
.kt-cover{position:relative;display:flex;align-items:center;justify-content:center;aspect-ratio:3/4;min-width:0;background:linear-gradient(180deg,#f8fafc 0%,#f1f5f9 100%);padding:14px;overflow:hidden}
.kt-cover img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 4px 8px rgba(15,23,42,.12));border-radius:4px;transition:transform .25s ease}
.kt-book:hover .kt-cover img{transform:scale(1.03)}
.kt-no-cover{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:100%;height:100%;padding:12px;border:1.5px dashed #cbd5e1;border-radius:8px;background:#fff;color:#94a3b8;text-align:center;box-shadow:0 2px 6px rgba(15,23,42,.04)}
.kt-no-cover svg{width:32px;height:32px;stroke-width:1.5;color:#12863c;opacity:.5}
.kt-no-cover span{font-size:11px;font-weight:500;line-height:1.3;color:#64748b}

/* Book Card Body */
.kt-book-body{display:flex;flex:1;flex-direction:column;align-items:flex-start;gap:6px;padding:14px}
.kt-stock{display:inline-flex;align-items:center;gap:5px;padding:2px 8px;border-radius:9999px;font-size:11px;font-weight:600;background:#ecfdf5;color:#047857;border:1px solid #d1fae5}
.kt-stock-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:currentColor}
.kt-unavailable{background:#fef2f2;color:#b91c1c;border-color:#fee2e2}
.kt-book h3{font-size:14px;font-weight:700;line-height:1.45;color:#0f172a;margin:2px 0 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.9em}
.kt-author{font-size:12px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}
.kt-book-code{display:flex;align-items:center;gap:4px;font-size:11px;color:#94a3b8;font-variant-numeric:tabular-nums}
.kt-code-sep{opacity:.5}

/* Book Detail Button */
.kt-detail{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:100%;min-height:36px;margin-top:auto;padding:6px 12px;border-radius:8px;font-size:12px;font-weight:700;color:#12863c;background:#f0fdf4;border:1px solid #bbf7d0;text-decoration:none!important;transition:all .15s ease}
.kt-detail svg{width:14px;height:14px;flex-shrink:0;transition:transform .15s ease}
.kt-detail:hover{background:#12863c;color:#fff;border-color:#12863c;box-shadow:0 2px 8px rgba(18,134,60,.25)}
.kt-detail:hover svg{transform:translateX(2px)}

/* Empty state & Pagination */
.kt-empty{padding:36px 20px;text-align:center;color:#64748b;background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;font-size:14px;line-height:1.7}
.kt-pagination{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;margin-top:32px}
.kt-pagination button{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;padding:6px 10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#334155;font:inherit;font-size:13px;font-weight:500;cursor:pointer;transition:all .15s}
.kt-pagination button:hover:not(:disabled){background:#f1f5f9;border-color:#94a3b8}
.kt-pagination button[aria-current=page]{background:#166534;border-color:#166534;color:#fff;font-weight:700}
.kt-pagination button:disabled{color:#94a3b8;background:#f8fafc;border-color:#e2e8f0;cursor:default}

/* Book Detail View & Modal */
.kt-back{display:inline-flex;align-items:center;gap:6px;margin-bottom:20px;font-size:14px;font-weight:600;color:#166534;text-decoration:none}
.kt-back:hover{text-decoration:underline}
.kt-detail-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:28px;align-items:start}
.kt-detail-sidebar{display:flex;flex-direction:column;gap:14px;min-width:0}
.kt-detail-cover{border-radius:12px;border:1px solid #e2e8f0;background:linear-gradient(180deg,#f8fafc 0%,#f1f5f9 100%)}
.kt-detail-cover img{max-height:280px;filter:drop-shadow(0 6px 14px rgba(15,23,42,.15))}
.kt-detail-stock{display:flex;flex-direction:column;align-items:center;gap:4px;padding:12px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc;text-align:center}
.kt-stock-pill{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:#047857}
.kt-stock-empty .kt-stock-pill{color:#b91c1c}
.kt-stock-total{font-size:11px;color:#64748b}

/* Detail Content & Bibliografi */
.kt-detail-content{min-width:0;overflow-wrap:anywhere}
.kt-category-pill{display:inline-block;padding:3px 10px;border-radius:6px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;background:#f0fdf4;color:#166534;border:1px solid #bbf7d0;margin-bottom:8px}
.kt-detail-content h2{font-size:22px;font-weight:800;line-height:1.35;color:#0f172a;margin-bottom:6px}
.kt-secondary{font-size:13px;color:#64748b;margin-bottom:6px!important;font-style:italic}
.kt-detail-author{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:500;color:#475569;margin-bottom:18px!important}
.kt-detail-author svg{width:16px;height:16px;flex-shrink:0;color:#64748b}

/* Bibliografi Table Card */
.kt-biblio-card{border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;background:#fff;margin-top:8px}
.kt-biblio-title{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:#475569;padding:10px 16px;background:#f8fafc;border-bottom:1px solid #e2e8f0;margin:0}
.kt-bibliography{margin:0}
.kt-bibliography>div{display:grid;grid-template-columns:140px minmax(0,1fr);gap:16px;padding:9px 16px;border-bottom:1px solid #f1f5f9;font-size:13px;line-height:1.5}
.kt-bibliography>div:last-child{border-bottom:0}
.kt-bibliography dt{font-weight:600;color:#64748b}
.kt-bibliography dd{font-weight:500;color:#0f172a;min-width:0}

/* Ringkasan */
.kt-summary{margin-top:24px;padding:20px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px}
.kt-summary-header{display:flex;align-items:center;gap:8px;margin-bottom:8px;color:#166534}
.kt-summary-header svg{width:18px;height:18px;flex-shrink:0}
.kt-summary h3{font-size:15px;font-weight:700;color:#073c21;margin:0}
.kt-summary p{font-size:14px;line-height:1.75;color:#334155;white-space:normal}

/* Modal Dialog */
.kt-modal{padding:0}
html:has(.kt-dialog[open]){overflow:hidden}
.kt-dialog{position:fixed;inset:0;width:820px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 48px);margin:auto;padding:0;border:0;border-radius:16px;background:#fff;color:#334155;font-family:inherit;box-shadow:0 24px 64px rgba(15,23,42,.24);overflow:hidden}
.kt-dialog[open]{display:flex;flex-direction:column}
.kt-dialog::backdrop{background:rgba(15,23,42,.6);backdrop-filter:blur(3px)}
.kt-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-shrink:0;padding:14px 20px;border-bottom:1px solid #e2e8f0;background:#f8fafc}
.kt-dialog-header h2{display:flex;align-items:center;gap:8px;margin:0;color:#0f172a;font-size:16px;font-weight:700;line-height:1.4}
.kt-dialog-header h2 svg{width:18px;height:18px;color:#166534}
.kt-dialog-header form{margin:0}
.kt-dialog-header button{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border:1px solid #e2e8f0;border-radius:8px;background:#fff;color:#64748b;cursor:pointer;transition:all .15s}
.kt-dialog-header button:hover{background:#fee2e2;color:#b91c1c;border-color:#fecaca}
.kt-dialog-header svg{width:18px;height:18px}
.kt-dialog :focus-visible{outline:2px solid #166534;outline-offset:2px}
.kt-dialog-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:24px;line-height:1.7;text-align:left}
.kt-dialog-body>a{color:#166534;text-decoration:underline}

/* Library Partners Grid */
.kt-choice-header{margin-bottom:28px}
.kt-choice-header .kt-section-title{font-size:22px;line-height:1.3;font-weight:800;color:#0f172a;letter-spacing:-.01em;margin-bottom:6px}
.kt-choice-desc{font-size:14px;color:#64748b;line-height:1.6;margin:0}

.kt-libraries{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin-top:0}
.kt-library{display:flex;flex-direction:column;gap:12px;min-width:0;padding:24px;border:1px solid #e2e8f0;border-radius:16px;background:#fff;color:#166534;text-decoration:none;box-shadow:0 1px 3px rgba(15,23,42,.04);transition:all .2s cubic-bezier(.16,1,.3,1)}
.kt-library:hover{border-color:#12863c;box-shadow:0 12px 28px -4px rgba(18,134,60,.12),0 4px 10px -2px rgba(15,23,42,.04);background:#fff;transform:translateY(-3px)}
.kt-library-logo{display:flex;align-items:center;justify-content:flex-start;height:64px;margin-bottom:4px}
.kt-library-logo img{display:block;max-width:140px;max-height:56px;width:auto;height:auto;object-fit:contain;object-position:left center}
.kt-library-logo svg{width:42px;height:42px;color:#12863c;padding:8px;border-radius:12px;background:#ecfdf5;border:1px solid rgba(18,134,60,.15)}
.kt-library-title{min-height:2.8em;font-size:16px;font-weight:700;line-height:1.45;overflow-wrap:anywhere;color:#0f172a;transition:color .15s}
.kt-library:hover .kt-library-title{color:#12863c}
.kt-library-description{font-size:13.5px;font-weight:400;line-height:1.6;color:#64748b}
.kt-library-action{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:42px;margin-top:auto;padding-top:14px;border-top:1px solid #f1f5f9;font-size:13.5px;font-weight:700;line-height:1.5;color:#12863c;transition:color .15s}
.kt-library:hover .kt-library-action{color:#0b4824}
.kt-library-action>span{font-size:18px;line-height:1;display:inline-block;transition:transform .2s ease}
.kt-library:hover .kt-library-action>span{transform:translateX(4px)}

/* Responsive Media Queries */
@media(max-width:1100px){.kt-books{grid-template-columns:repeat(4,minmax(0,1fr))}.kt-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:601px) and (max-width:820px){
  .kt-stats{grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
  .kt-stat:nth-child(1),.kt-stat:nth-child(2),.kt-stat:nth-child(3){grid-column:span 2}
  .kt-stat:nth-child(4),.kt-stat:nth-child(5){grid-column:span 3}
}
@media(max-width:820px){.kt-books{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.kt-detail-layout{grid-template-columns:180px minmax(0,1fr);gap:20px}.kt-libraries{grid-template-columns:1fr}}
@media(max-width:600px){
  .kt-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .kt-stat:last-child:nth-child(odd){grid-column:1/-1}
  .kt-stat{padding-left:56px;padding-right:12px;min-height:72px}
  .kt-stat-icon{left:10px;width:36px;height:36px}
  .kt-stat-icon svg{width:18px;height:18px}
  .kt-stats dd{font-size:20px}
  .kt-search{padding:18px 14px}
  .kt-search-header{flex-direction:column;align-items:flex-start;gap:10px}
  .kt-filters{grid-template-columns:minmax(0,1fr)}
  .kt-actions button{flex:1}
  .kt-books{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .kt-book-body{padding:10px}
  .kt-cover{padding:10px}
  .kt-book h3{font-size:13px}
  .kt-dialog{max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px);border-radius:12px}
  .kt-dialog-header{padding:12px 16px}
  .kt-dialog-body{padding:16px}
  .kt-info{align-items:flex-start;flex-direction:column}
  .kt-detail-layout{grid-template-columns:minmax(0,1fr)}
  .kt-detail-sidebar{max-width:200px;width:100%;margin-inline:auto}
  .kt-detail-content h2{font-size:19px}
  .kt-bibliography>div{grid-template-columns:100px minmax(0,1fr);gap:10px;padding:8px 12px}
}
@media(max-width:359px){.kt-books{grid-template-columns:minmax(0,1fr)}.kt-stats{grid-template-columns:minmax(0,1fr)}}
