/* ============================================================
 * ETD Repository - Modern OPAC Styles
 * ============================================================ */

/* ----- Override default SLiMS template chrome on ETD pages ----- */
.result-search-etd .c-header {
    min-height: 0;
    background: linear-gradient(135deg, #0a3956 0%, #0f4c75 100%);
}

.result-search-etd .c-header .mask {
    background: transparent;
}

.result-search-etd .c-header .navbar {
    padding-top: 18px;
    padding-bottom: 18px;
}

.result-search-etd .pb-5 {
    padding-bottom: 0 !important;
}

/* ----- Brand logo override ----- */
.navbar-brand .brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    object-fit: contain;
}

/* ----- Page wrapper ----- */
.etd-page {
    color: #2c3e50;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8fafc;
    min-height: calc(100vh - 200px);
    padding-bottom: 64px;
    display: block !important;
    width: 100%;
}

.etd-page section,
.etd-page .container {
    display: block;
    width: 100%;
}

.etd-page .container {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

/* ============================================================
 * HERO
 * ============================================================ */
.etd-hero {
    position: relative;
    background:
        radial-gradient(ellipse at top right, rgba(190, 227, 248, 0.18) 0%, transparent 55%),
        linear-gradient(135deg, #0a3956 0%, #0f4c75 55%, #1b6ca0 100%);
    color: #fff;
    padding: 56px 16px 110px;
    margin-top: 0;
    margin-bottom: -56px;
    text-align: center;
    overflow: hidden;
}

.etd-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 30%, rgba(255, 255, 255, 0.08) 1px, transparent 1.5px),
        radial-gradient(circle at 85% 70%, rgba(255, 255, 255, 0.08) 1px, transparent 1.5px);
    background-size: 40px 40px;
    pointer-events: none;
}

.etd-hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 80px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, #f8fafc 100%);
    pointer-events: none;
}

.etd-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 880px;
    margin: 0 auto;
}

.etd-hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.etd-hero-title {
    font-size: 44px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 14px;
    color: #fff;
}

.etd-hero-sub {
    font-size: 17px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
    max-width: 700px;
    margin: 0 auto 32px;
}

/* ----- Search ----- */
.etd-search {
    max-width: 720px;
    margin: 0 auto 42px;
}

.etd-search-input-wrap {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    padding: 6px 6px 6px 22px;
    transition: box-shadow 0.2s;
}

.etd-search-input-wrap:focus-within {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.etd-search-input-wrap > i {
    color: #94a3b8;
    font-size: 18px;
    margin-right: 14px;
}

.etd-search-input-wrap input {
    flex: 1;
    border: 0;
    outline: 0;
    padding: 16px 0;
    font-size: 16px;
    color: #1e293b;
    background: transparent;
}

.etd-search-input-wrap input::placeholder {
    color: #94a3b8;
}

.etd-search-btn {
    background: #0f4c75;
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 12px 26px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.etd-search-btn:hover {
    background: #0a3956;
}

/* ----- Stats ----- */
.etd-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    max-width: 760px;
    margin: 0 auto;
}

.etd-stat {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 18px 12px;
}

.etd-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 6px;
}

.etd-stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 640px) {
    .etd-hero-title { font-size: 30px; }
    .etd-hero-sub { font-size: 15px; }
    .etd-stats { grid-template-columns: repeat(2, 1fr); }
    .etd-search-btn { padding: 10px 18px; font-size: 14px; }
}

/* ============================================================
 * TOOLBAR / FILTERS
 * ============================================================ */
.etd-toolbar {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 22px 26px;
    margin: 0 auto 28px;
    box-shadow: 0 8px 24px rgba(15, 76, 117, 0.08);
    z-index: 5;
}

.etd-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.etd-filter-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 160px;
}

.etd-filter-group label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 6px;
}

.etd-filter-group select {
    background: #f1f5f9;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.15s;
}

.etd-filter-group select:hover {
    background: #e2e8f0;
}

.etd-filter-group select:focus {
    outline: 0;
    background: #fff;
    border-color: #3282b8;
    box-shadow: 0 0 0 3px rgba(50, 130, 184, 0.15);
}

.etd-filter-reset {
    color: #ef4444;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fef2f2;
    transition: background 0.15s;
}

.etd-filter-reset:hover {
    background: #fee2e2;
    color: #ef4444;
    text-decoration: none;
}

.etd-result-info {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 14px;
}

.etd-result-info strong {
    color: #0f4c75;
    font-size: 16px;
}

/* ============================================================
 * CARD GRID
 * ============================================================ */
.etd-results {
    margin-top: 12px;
}

.etd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.etd-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(15, 76, 117, 0.06);
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.etd-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(15, 76, 117, 0.12);
    border-color: #cbd5e1;
}

.etd-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
}

.etd-card-head .badge {
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.etd-year, .etd-lang {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.etd-year i, .etd-lang i {
    margin-right: 4px;
}

.etd-card-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 12px;
}

.etd-card-title a {
    color: #1e293b;
    text-decoration: none;
}

.etd-card-title a:hover {
    color: #0f4c75;
    text-decoration: none;
}

.etd-card-author {
    font-size: 14px;
    color: #475569;
    margin-bottom: 6px;
}

.etd-card-author i {
    color: #94a3b8;
    margin-right: 6px;
}

.etd-card-author strong {
    color: #0f4c75;
}

.etd-meta-sep {
    margin: 0 6px;
    color: #cbd5e1;
}

.etd-nim {
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 13px;
    color: #64748b;
}

.etd-card-program {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

.etd-card-program i {
    color: #3282b8;
    margin-right: 6px;
}

.etd-card-snippet {
    font-size: 13px;
    line-height: 1.6;
    color: #475569;
    margin: 0 0 14px;
    flex: 1;
}

.etd-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.etd-tag {
    background: #eff6ff;
    color: #1e40af;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #dbeafe;
}

.etd-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.etd-card-link {
    color: #0f4c75;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.15s;
}

.etd-card-link:hover {
    color: #0a3956;
    text-decoration: none;
    gap: 10px;
}

.etd-card-views {
    font-size: 12px;
    color: #94a3b8;
}

.etd-card-views i {
    margin-right: 4px;
}

/* ============================================================
 * EMPTY STATE
 * ============================================================ */
.etd-empty {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
}

.etd-empty-icon {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.etd-empty h3 {
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 8px;
}

/* ============================================================
 * PAGINATION
 * ============================================================ */
.etd-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.etd-pagination-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.15s;
}

.etd-pagination-item:hover {
    background: #f1f5f9;
    color: #0f4c75;
    border-color: #cbd5e1;
    text-decoration: none;
}

.etd-pagination-item.is-current {
    background: #0f4c75;
    color: #fff;
    border-color: #0f4c75;
    cursor: default;
}

.etd-pagination-item.is-current:hover {
    background: #0f4c75;
    color: #fff;
}

.etd-pagination-dots {
    color: #94a3b8;
    padding: 0 6px;
    align-self: center;
}

/* ============================================================
 * DETAIL PAGE
 * ============================================================ */
.etd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 24px 0 16px;
    font-size: 13px;
    color: #64748b;
}

.etd-breadcrumb a {
    color: #475569;
    text-decoration: none;
}

.etd-breadcrumb a:hover {
    color: #0f4c75;
    text-decoration: none;
}

.etd-breadcrumb i.fa-chevron-right {
    font-size: 10px;
    color: #cbd5e1;
}

.etd-breadcrumb span {
    color: #94a3b8;
}

.etd-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    align-items: start;
    margin-bottom: 60px;
}

@media (max-width: 900px) {
    .etd-detail-grid { grid-template-columns: 1fr; }
}

.etd-detail-main {
    background: #fff;
    border-radius: 16px;
    padding: 36px;
    box-shadow: 0 2px 8px rgba(15, 76, 117, 0.06);
}

.etd-detail-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}

.etd-detail-title {
    font-size: 30px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f172a;
    margin: 0 0 18px;
}

.etd-detail-author {
    font-size: 16px;
    color: #475569;
    margin-bottom: 18px;
}

.etd-detail-author i {
    color: #94a3b8;
    margin-right: 8px;
}

.etd-detail-author strong {
    color: #0f4c75;
}

.etd-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.etd-section {
    margin-bottom: 32px;
}

.etd-section:last-child {
    margin-bottom: 0;
}

.etd-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

.etd-abstract {
    font-size: 15px;
    line-height: 1.75;
    color: #334155;
    text-align: justify;
}

/* ----- Meta list ----- */
.etd-meta {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 12px 24px;
    margin: 0;
}

.etd-meta dt {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 2px;
}

.etd-meta dd {
    margin: 0;
    color: #1e293b;
    font-size: 15px;
}

.etd-people {
    list-style: none;
    padding: 0;
    margin: 0;
}

.etd-people li {
    padding: 4px 0;
}

.etd-people i {
    color: #3282b8;
    margin-right: 8px;
    width: 14px;
}

@media (max-width: 600px) {
    .etd-meta { grid-template-columns: 1fr; gap: 4px 0; }
    .etd-meta dt { padding-top: 12px; }
    .etd-detail-main { padding: 24px; }
    .etd-detail-title { font-size: 24px; }
}

/* ============================================================
 * SIDEBAR
 * ============================================================ */
.etd-detail-side {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.etd-action-card {
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 2px 8px rgba(15, 76, 117, 0.06);
}

.etd-action-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 16px;
}

.etd-action-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    border-radius: 12px;
    border: 0;
    font-weight: 600;
    font-family: inherit;
    text-align: left;
    text-decoration: none;
    margin-bottom: 10px;
    transition: all 0.15s;
    cursor: pointer;
}

.etd-action-btn:last-child { margin-bottom: 0; }

.etd-action-btn:hover {
    text-decoration: none;
    transform: translateX(2px);
}

.etd-action-btn > i {
    font-size: 22px;
    width: 28px;
    text-align: center;
}

.etd-action-btn span {
    flex: 1;
    font-size: 15px;
    line-height: 1.2;
}

.etd-action-btn small {
    display: block;
    font-size: 11px;
    font-weight: 500;
    margin-top: 2px;
    opacity: 0.85;
}

.etd-action-bab1 {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.etd-action-bab1:hover {
    background: #e0f2fe;
    color: #0369a1;
}

.etd-action-fulltext {
    background: linear-gradient(135deg, #0f4c75 0%, #3282b8 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(15, 76, 117, 0.25);
}

.etd-action-fulltext:hover {
    color: #fff;
    box-shadow: 0 6px 16px rgba(15, 76, 117, 0.35);
}

.etd-action-locked {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.etd-action-locked:hover {
    background: #fde68a;
    color: #92400e;
}

.etd-action-contact {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

.etd-action-contact:hover,
.etd-action-contact:focus {
    background: #ffedd5;
    color: #9a3412;
    outline: none;
}

.etd-action-info {
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 10px;
    font-size: 13px;
    color: #64748b;
    text-align: center;
}

.etd-action-info i {
    margin-right: 6px;
}

.etd-admin-link {
    display: block;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
    text-align: center;
}

.etd-admin-link:hover {
    color: #0f4c75;
    text-decoration: none;
}

.etd-access-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.etd-access-modal.is-visible {
    display: flex;
}

.etd-access-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.etd-access-modal-dialog {
    position: relative;
    width: min(100%, 480px);
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.etd-access-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.etd-access-modal-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: #fff7ed;
    color: #ea580c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 18px;
}

.etd-access-modal h2 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}

.etd-access-modal p {
    margin: 0 0 12px;
    color: #475569;
    line-height: 1.65;
    font-size: 14px;
}

.etd-access-modal-note {
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.etd-access-modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

/* ----- Stats card ----- */
.etd-stats-card {
    background: #fff;
    border-radius: 16px;
    padding: 18px 22px;
    box-shadow: 0 2px 8px rgba(15, 76, 117, 0.06);
}

.etd-stats-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.etd-stats-item:last-child { border-bottom: 0; }

.etd-stats-item > i {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #3282b8;
    border-radius: 10px;
    font-size: 14px;
}

.etd-stats-num {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.etd-stats-num.etd-stats-date {
    font-size: 14px;
}

.etd-stats-lbl {
    font-size: 12px;
    color: #94a3b8;
}

.etd-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    justify-content: center;
}

.etd-back-link:hover {
    color: #0f4c75;
    text-decoration: none;
}
