:root {
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: 'Outfit', sans-serif;
    --color-bg: #f8fafc;
    --color-primary: #1e3a8a;
    --color-secondary: #0f172a;
    --color-accent: #fbbf24;
    --color-card-bg: #ffffff;
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-premium: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: #334155;
    line-height: 1.6;
    padding-bottom: 5rem;
}

/* Navbar */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    padding: 1.2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.navbar-brand img {
    height: 40px;
}

.navbar-brand h1 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    color: #334155;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-back-home:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Hero Banner */
.detail-hero {
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1541339907198-e08756dedf3f?q=80&w=1470&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    padding: 4.5rem 4rem 3.5rem;
    color: white;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.detail-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.95) 0%, rgba(15, 23, 42, 0.9) 100%);
    z-index: 1;
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

.detail-hero-meta {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-accent);
    letter-spacing: 1.5px;
    margin-bottom: 0.8rem;
}

.detail-hero-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 850;
    line-height: 1.25;
    letter-spacing: -0.5px;
    max-width: 950px;
}

/* Detail Layout Container */
.detail-container {
    max-width: 1200px;
    margin: 2.5rem auto 0;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 2rem;
}

.detail-card {
    background: white;
    border-radius: 20px;
    padding: 2.2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-premium);
    margin-bottom: 2rem;
}

.card-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 1.2rem;
    margin-bottom: 1.5rem;
}

.card-title-inner {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-title-inner i {
    color: var(--color-primary);
}

/* Abstract / Description Box */
.description-box {
    font-size: 0.98rem;
    color: #475569;
    line-height: 1.7;
    white-space: pre-line;
}

/* Metadata Table */
.meta-table {
    width: 100%;
    border-collapse: collapse;
}

.meta-table tr {
    border-bottom: 1px solid #f1f5f9;
}

.meta-table tr:last-child {
    border-bottom: none;
}

.meta-table td {
    padding: 14px 18px;
    font-size: 0.95rem;
}

.meta-label {
    font-weight: 700;
    color: #475569;
    width: 30%;
    background-color: #f8fafc;
}

.meta-value {
    color: #0f172a;
    font-weight: 500;
}

/* Right Sidebar Blocks */
.sidebar-block {
    background: white;
    border-radius: 20px;
    padding: 1.8rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-premium);
    margin-bottom: 1.5rem;
}

.sidebar-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #0f172a;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.sidebar-title i {
    color: var(--color-primary);
}

.file-name-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 1.2rem;
    word-break: break-all;
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-sidebar-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    width: 100%;
}

.btn-preview {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15);
}

.btn-preview:hover {
    background: #1e40af;
    transform: translateY(-1px);
}

.btn-download {
    background: #10b981;
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.btn-download:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    pointer-events: none;
}

/* Relationship Styles */
.relation-box {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    color: #991b1b;
}

.relation-box a {
    color: #b91c1c;
    font-weight: 700;
    text-decoration: none;
    display: block;
    margin-top: 4px;
}

.relation-box a:hover {
    text-decoration: underline;
}

.relation-empty {
    font-size: 0.85rem;
    color: #94a3b8;
    font-style: italic;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.status-berlaku {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-dicabut {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Modal Preview */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 1000px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScale {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 1.2rem 2rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}

.btn-close-modal {
    background: #e2e8f0;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    transition: background 0.2s;
}

.btn-close-modal:hover {
    background: #cbd5e1;
    color: #0f172a;
}

.modal-body {
    flex: 1;
    background: #525659;
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 992px) {
    .detail-container {
        grid-template-columns: 1fr;
    }
    .navbar {
        padding: 1rem 2rem;
    }
    .detail-hero {
        padding: 3rem 2rem;
    }
    .detail-hero-title {
        font-size: 1.75rem;
    }
}
