:root {
    --bg: #f4f6f8;
    --panel: #ffffff;
    --ink: #16202e;
    --muted: #64748b;
    --line: #dbe2ea;
    --primary: #0f766e;
    --primary-dark: #0b5f59;
    --secondary: #1d4ed8;
    --danger: #b42318;
    --warning: #b45309;
    --success-bg: #ecfdf5;
    --success-line: #a7f3d0;
    --error-bg: #fff1f2;
    --error-line: #fecdd3;
    --shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

body.modal-open {
    overflow: hidden;
}

[hidden] {
    display: none !important;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
    padding: 0 32px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
}

.brand {
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-links a,
.status-tabs a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.nav-links a:hover,
.status-tabs a:hover,
.status-tabs a.active {
    background: #e8f1ff;
    color: var(--secondary);
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.narrow-shell {
    width: min(900px, calc(100% - 32px));
}

.intro-band,
.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
}

.intro-band h1,
.section-heading h1 {
    max-width: 760px;
    margin: 6px 0 0;
    font-size: 42px;
    line-height: 1.08;
}

.section-heading h1 {
    font-size: 34px;
}

.eyebrow {
    margin: 0;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    border-color: var(--line);
    background: #ffffff;
    color: var(--ink);
}

.btn-secondary:hover {
    border-color: #bfd0e0;
    background: #f8fafc;
}

.btn-danger {
    background: #fff1f2;
    color: var(--danger);
    border-color: #fecdd3;
}

.btn-danger:hover {
    background: #ffe4e6;
}

.notice {
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 700;
}

.notice p {
    margin: 0;
}

.notice p + p {
    margin-top: 8px;
}

.notice-success {
    background: var(--success-bg);
    border-color: var(--success-line);
    color: #047857;
}

.notice-error {
    background: var(--error-bg);
    border-color: var(--error-line);
    color: #be123c;
}

.notice-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.login-shell {
    width: min(520px, calc(100% - 32px));
}

.login-heading {
    display: block;
}

.login-form label + label,
.login-form .form-actions {
    margin-top: 16px;
}

.login-form .form-actions {
    justify-content: stretch;
}

.login-form .btn {
    width: 100%;
}

.captcha-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 10px;
}

.text-captcha {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #94a3b8;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--ink);
    font-size: 22px;
    user-select: none;
}

.display-page {
    min-height: 100vh;
    overflow: hidden;
    background: #eaeaea;
}

.display-page .display-topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 30;
    min-height: 68px;
    border-bottom: 0;
    background: rgba(18, 24, 33, 0.42);
    color: #ffffff;
    backdrop-filter: blur(12px);
}

.display-page .brand,
.display-page .nav-links a {
    color: #ffffff;
}

.display-page .nav-links a:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.display-shell {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.display-page .container {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1000px;
    height: 600px;
    transform: translate(-50%, -50%);
    overflow: visible;
    background: #f5f5f5;
    box-shadow: 0 30px 50px #dbdbdb;
}

.display-page .slide {
    position: relative;
    width: 100%;
    height: 100%;
}

.display-page .container .slide .item {
    position: absolute;
    top: 50%;
    width: 200px;
    height: 300px;
    display: inline-block;
    overflow: hidden;
    border-radius: 20px;
    background-color: #1f2937;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: 0 30px 50px #505050;
    transform: translate(0, -50%);
    transition: 0.5s;
}

.display-page .slide .item:nth-child(1),
.display-page .slide .item:nth-child(2),
.display-page .exhibition-slider.is-single .slide .item:only-child {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    background-color: #111827;
    background-size: contain;
    transform: translate(0, 0);
}

.display-page .slide .item:nth-child(1)::before,
.display-page .slide .item:nth-child(2)::before,
.display-page .exhibition-slider.is-single .slide .item:only-child::before {
    content: none;
}

.display-page .slide .item:nth-child(2) .content,
.display-page .exhibition-slider.is-single .slide .item:only-child .content {
    display: block;
}

.display-page .slide .item:nth-child(3) {
    left: 50%;
}

.display-page .slide .item:nth-child(4) {
    left: calc(50% + 220px);
}

.display-page .slide .item:nth-child(5) {
    left: calc(50% + 440px);
}

.display-page .slide .item:nth-child(n + 6) {
    left: calc(50% + 440px);
}

.display-page .item .content {
    position: absolute;
    top: 50%;
    left: 100px;
    z-index: 2;
    width: 300px;
    display: none;
    color: #eee;
    text-align: left;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-shadow: none;
    transform: translate(0, -50%);
}

.display-page .content .eyebrow {
    display: none;
}

.display-page .content .name {
    font-size: 40px;
    font-weight: bold;
    line-height: 1.12;
    text-transform: uppercase;
    opacity: 0;
    animation: animate 1s ease-in-out 1 forwards;
}

.display-page .content .description {
    margin-top: 10px;
    margin-bottom: 20px;
    color: #eee;
    line-height: normal;
    opacity: 0;
    animation: animate 1s ease-in-out 0.3s 1 forwards;
}

.display-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #dbeafe;
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    animation: animate 1s ease-in-out 0.45s 1 forwards;
}

.display-meta span + span::before {
    content: "/";
    margin-right: 8px;
    color: rgba(255, 255, 255, 0.62);
}

.display-actions {
    display: block;
    opacity: 0;
    animation: animate 1s ease-in-out 0.6s 1 forwards;
}

.display-actions button {
    min-height: auto;
    padding: 10px 20px;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    color: #111111;
    font-weight: 400;
}

.display-actions button:hover {
    background: #ababab;
    color: #ffffff;
}

@keyframes animate {
    from {
        opacity: 0;
        transform: translate(0, 100px);
        filter: blur(33px);
    }

    to {
        opacity: 1;
        transform: translate(0);
        filter: blur(0);
    }
}

.display-page .button {
    position: absolute;
    bottom: 20px;
    z-index: 5;
    width: 100%;
    text-align: center;
}

.display-page .button button {
    width: 40px;
    height: 35px;
    margin: 0 5px;
    border: 1px solid #000000;
    border-radius: 8px;
    background: #ffffff;
    color: #111111;
    cursor: pointer;
    font-size: 16px;
    font-weight: 400;
    transition: 0.3s;
}

.display-page .button button:hover {
    background: #ababab;
    color: #ffffff;
}

.display-counter {
    position: fixed;
    right: 26px;
    bottom: 24px;
    z-index: 20;
    display: grid;
    gap: 2px;
    min-width: 132px;
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(17, 24, 39, 0.68);
    color: #ffffff;
    backdrop-filter: blur(12px);
}

.display-counter span {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.display-counter small {
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.display-message {
    width: min(720px, calc(100% - 32px));
    margin: 120px auto 0;
}

.display-message .btn {
    margin-top: 22px;
}

.pdf-display-tile {
    position: absolute;
    inset: 50% auto auto 50%;
    z-index: 1;
    width: 120px;
    height: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--secondary);
    font-size: 24px;
    font-weight: 800;
    transform: translate(-50%, -50%);
}

.empty-state {
    padding: 44px;
    border: 1px dashed #b6c2d2;
    border-radius: 8px;
    background: #ffffff;
    text-align: center;
}

.empty-state h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.empty-state p {
    max-width: 560px;
    margin: 0 auto;
    color: var(--muted);
    line-height: 1.6;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.poster-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.poster-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #e5edf5;
    color: var(--ink);
    overflow: hidden;
}

.poster-cover img,
.preview-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdf-tile,
.preview-tile strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: var(--secondary);
    font-weight: 800;
}

.poster-body {
    padding: 18px;
}

.poster-body h2,
.admin-card h2 {
    margin: 6px 0 8px;
    font-size: 20px;
    line-height: 1.25;
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.meta-line span {
    color: #475569;
}

.poster-description {
    margin: 14px 0 0;
    color: #475569;
    line-height: 1.6;
}

.poster-actions,
.form-actions,
.admin-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.panel-form {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.form-grid,
.upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.panel-form label {
    display: grid;
    gap: 8px;
    color: var(--ink);
    font-weight: 800;
}

.panel-form label + label,
.panel-form .upload-grid {
    margin-top: 16px;
}

.panel-form span {
    font-size: 14px;
}

.panel-form input,
.panel-form textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font-weight: 500;
}

.panel-form input {
    min-height: 44px;
    padding: 10px 12px;
}

.panel-form textarea {
    resize: vertical;
    min-height: 120px;
    padding: 12px;
    line-height: 1.5;
}

.panel-form input:focus,
.panel-form textarea:focus {
    outline: 3px solid rgba(15, 118, 110, 0.18);
    border-color: var(--primary);
}

.upload-box {
    padding: 16px;
    border: 1px dashed #94a3b8;
    border-radius: 8px;
    background: #f8fafc;
}

.upload-box small {
    color: var(--muted);
    font-weight: 600;
    line-height: 1.5;
}

.local-preview {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.local-preview img {
    width: 100%;
    height: 100%;
    max-height: 280px;
    object-fit: contain;
}

.dashboard-heading {
    align-items: center;
}

.status-tabs {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.summary-item {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.summary-item span {
    display: block;
    font-size: 34px;
    font-weight: 800;
    color: var(--secondary);
}

.summary-item p {
    margin: 4px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.admin-list {
    display: grid;
    gap: 18px;
}

.admin-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.admin-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.status-pending {
    background: #fff7ed;
    color: var(--warning);
}

.status-published {
    background: #ecfdf5;
    color: #047857;
}

.status-rejected {
    background: #fff1f2;
    color: var(--danger);
}

.admin-actions form {
    margin: 0;
}

.admin-preview-grid {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
}

.preview-tile {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #e5edf5;
    color: var(--ink);
}

.preview-tile span {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}

.portrait-tile {
    aspect-ratio: 3 / 4;
}

.landscape-tile {
    aspect-ratio: 4 / 3;
}

.preview-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.preview-dialog {
    width: min(1080px, 100%);
    max-height: calc(100vh - 48px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.preview-header h2 {
    margin: 0;
    font-size: 18px;
}

.icon-button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font-weight: 800;
}

.icon-button:hover {
    background: #f1f5f9;
}

.preview-frame {
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 18px;
    background: #0f172a;
}

.preview-frame img {
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 150px);
    object-fit: contain;
}

.preview-frame iframe {
    width: 100%;
    height: calc(100vh - 150px);
    min-height: 480px;
    border: 0;
    background: #ffffff;
}

@media (max-width: 900px) {
    .display-page .display-topbar {
        min-height: 64px;
        align-items: center;
        flex-direction: row;
        padding: 12px 16px;
    }

    .display-page .nav-links {
        justify-content: flex-end;
    }

    .display-page .container {
        width: calc(100vw - 24px);
        height: calc(100vh - 120px);
        min-height: 430px;
        transform: translate(-50%, -45%);
    }

    .display-page .container .slide .item {
        top: auto;
        bottom: 76px;
        width: 140px;
        height: 210px;
        transform: none;
    }

    .display-page .slide .item:nth-child(1),
    .display-page .slide .item:nth-child(2),
    .display-page .exhibition-slider.is-single .slide .item:only-child {
        top: 0;
        bottom: auto;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        transform: translate(0, 0);
    }

    .display-page .slide .item:nth-child(3) {
        left: calc(100% - 316px);
    }

    .display-page .slide .item:nth-child(4) {
        left: calc(100% - 164px);
    }

    .display-page .slide .item:nth-child(n + 5) {
        left: calc(100% - 164px);
    }

    .display-page .item .content {
        left: 36px;
        width: min(360px, calc(100% - 72px));
    }

    .display-page .content .name {
        font-size: 34px;
    }

    .topbar,
    .intro-band,
    .section-heading,
    .dashboard-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar {
        min-height: auto;
        padding: 16px;
    }

    .nav-links {
        justify-content: flex-start;
    }

    .intro-band h1,
    .section-heading h1 {
        font-size: 30px;
    }

    .admin-card {
        grid-template-columns: 1fr;
    }

    .admin-preview-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .display-page .display-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .display-page .container {
        height: calc(100vh - 150px);
        min-height: 420px;
        transform: translate(-50%, -42%);
    }

    .display-page .container .slide .item {
        bottom: 72px;
        width: 104px;
        height: 148px;
        border-radius: 14px;
    }

    .display-page .slide .item:nth-child(1),
    .display-page .slide .item:nth-child(2),
    .display-page .exhibition-slider.is-single .slide .item:only-child {
        top: 0;
        bottom: auto;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        transform: translate(0, 0);
    }

    .display-page .slide .item:nth-child(3) {
        left: 18px;
    }

    .display-page .slide .item:nth-child(4) {
        left: 132px;
    }

    .display-page .slide .item:nth-child(n + 5) {
        left: 246px;
    }

    .display-page .item .content {
        top: 38%;
        left: 22px;
        width: calc(100% - 44px);
    }

    .display-page .content .name {
        font-size: 28px;
    }

    .display-page .content .description {
        max-height: 96px;
        overflow: hidden;
    }

    .display-actions button {
        min-height: 38px;
        padding: 9px 12px;
        width: 100%; /* Tombol "See More" mengambil lebar penuh */
    }

    .display-counter {
        display: none;
    }

    .page-shell,
    .narrow-shell {
        width: min(100% - 24px, 1180px);
        padding-top: 20px;
    }

    .form-grid,
    .upload-grid,
    .summary-grid,
    .captcha-row,
    .admin-preview-grid {
        grid-template-columns: 1fr;
    }

    .panel-form {
        padding: 18px;
    }

    .poster-actions,
    .form-actions,
    .admin-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn,
    .admin-actions form {
        width: 100%;
    }

    .preview-modal {
        padding: 12px;
    }

    .preview-frame {
        min-height: 360px;
        padding: 10px;
    }
}


/* =========================================================
   FIX TAMPILAN DISPLAY SLIDER
   Tempelkan bagian ini di paling bawah assets/css/style.css
   agar tampilan database mengikuti referensi slider.
   ========================================================= */

.display-page {
    background: #eaeaea;
    overflow: hidden;
}

.display-shell {
    min-height: 100vh;
    overflow: hidden;
}

.display-page .container {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(1000px, calc(100vw - 32px));
    height: min(600px, calc(100vh - 32px));
    transform: translate(-50%, -50%);
    overflow: hidden;
    background: #f5f5f5;
    box-shadow: 0 30px 50px #dbdbdb;
}

.display-page .slide {
    position: relative;
    width: 100%;
    height: 100%;
}

.display-page .container .slide .item {
    position: absolute;
    top: 50%;
    width: 200px;
    height: 300px;
    display: inline-block;
    overflow: hidden;
    border-radius: 20px;
    background-color: #1f2937;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: 0 30px 50px #505050;
    transform: translate(0, -50%);
    transition: 0.5s;
}

.display-page .slide .item:nth-child(1),
.display-page .slide .item:nth-child(2),
.display-page .exhibition-slider.is-single .slide .item:only-child {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    transform: translate(0, 0);
    background-size: cover;
}

.display-page .slide .item:nth-child(1)::after,
.display-page .slide .item:nth-child(2)::after,
.display-page .exhibition-slider.is-single .slide .item:only-child::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(0,0,0,.62), rgba(0,0,0,.18) 42%, rgba(0,0,0,0));
    pointer-events: none;
}

.display-page .slide .item:nth-child(2) .content,
.display-page .exhibition-slider.is-single .slide .item:only-child .content {
    display: block;
}

.display-page .slide .item:nth-child(3) {
    left: 50%;
}

.display-page .slide .item:nth-child(4) {
    left: calc(50% + 220px);
}

.display-page .slide .item:nth-child(5) {
    left: calc(50% + 440px);
}

.display-page .slide .item:nth-child(n + 6) {
    left: calc(50% + 440px);
    opacity: 0;
}

.display-page .item .content {
    position: absolute;
    top: 50%;
    left: 100px;
    z-index: 2;
    width: min(360px, calc(100% - 140px));
    display: none;
    color: #eee;
    text-align: left;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    transform: translate(0, -50%);
}

.display-page .content .name {
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 800;
    line-height: 1.08;
    text-transform: uppercase;
    opacity: 0;
    text-shadow: 0 8px 24px rgba(0,0,0,.45);
    animation: animate 1s ease-in-out 1 forwards;
}

.display-page .content .description {
    margin-top: 12px;
    margin-bottom: 20px;
    color: #f8fafc;
    line-height: 1.5;
    opacity: 0;
    text-shadow: 0 5px 18px rgba(0,0,0,.45);
    animation: animate 1s ease-in-out 0.3s 1 forwards;
}

.display-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 0;
    background: #ffffff;
    color: #111111;
    font-weight: 600;
    opacity: 1;
}

.display-actions button:hover {
    background: #ababab;
    color: #ffffff;
}

.display-page .button {
    position: absolute;
    bottom: 20px;
    z-index: 6;
    width: 100%;
    text-align: center;
}

.display-page .button button {
    width: 40px;
    height: 35px;
    margin: 0 5px;
    border: 1px solid #000;
    border-radius: 8px;
    background: #fff;
    color: #111;
    font-size: 16px;
    transition: .3s;
}

.display-page .button button:hover {
    background: #ababab;
    color: #fff;
}

@media (max-width: 900px) {
    .display-page .container {
        width: calc(100vw - 24px);
        height: calc(100vh - 80px);
    }

    .display-page .container .slide .item {
        bottom: 76px;
        top: auto;
        width: 140px;
        height: 210px;
        transform: none;
    }

    .display-page .slide .item:nth-child(1),
    .display-page .slide .item:nth-child(2),
    .display-page .exhibition-slider.is-single .slide .item:only-child {
        top: 0;
        bottom: auto;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .display-page .slide .item:nth-child(3) {
        left: calc(100% - 316px);
    }

    .display-page .slide .item:nth-child(4) {
        left: calc(100% - 164px);
    }

    .display-page .slide .item:nth-child(n + 5) {
        left: calc(100% - 164px);
        opacity: 0;
    }

    .display-page .item .content {
        left: 36px;
        width: min(360px, calc(100% - 72px));
    }
}

@media (max-width: 640px) {
    .display-page .container {
        height: calc(100vh - 32px);
    }

    .display-page .container .slide .item {
        bottom: 72px;
        width: 104px;
        height: 148px;
        border-radius: 14px;
    }

    .display-page .slide .item:nth-child(3) {
        left: 18px;
    }

    .display-page .slide .item:nth-child(4) {
        left: 132px;
    }

    .display-page .slide .item:nth-child(n + 5) {
        left: 246px;
        opacity: 0;
    }

    .display-page .item .content {
        top: 32%; /* Sesuaikan posisi vertikal konten */
        left: 22px;
        width: calc(100% - 44px);
        padding-right: 0; /* Hapus padding kanan karena kartu portrait disembunyikan */
    }

    .display-page .content .description {
        max-height: 96px;
        overflow: hidden;
    }

    /* Sembunyikan kartu portrait pada layar sangat kecil untuk memberikan ruang pada konten utama */
    .display-page .slide .item:nth-child(2) .portrait-display-card,
    .display-page .exhibition-slider.is-single .slide .item:only-child .portrait-display-card {
        display: none;
    }
}

/* ===== Display fix: landscape as background + portrait poster visible ===== */
.display-page .slide .item:nth-child(1)::after,
.display-page .slide .item:nth-child(2)::after,
.display-page .exhibition-slider.is-single .slide .item:only-child::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.42) 42%, rgba(0, 0, 0, 0.18) 100%);
    pointer-events: none;
}

.display-page .portrait-display-card {
    display: none;
}

.display-page .slide .item:nth-child(2) .portrait-display-card,
.display-page .exhibition-slider.is-single .slide .item:only-child .portrait-display-card {
    position: absolute;
    top: 50%;
    right: 72px;
    z-index: 3;
    width: 270px;
    height: 390px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 10px solid rgba(255, 255, 255, 0.92);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.42);
    transform: translateY(-50%);
    animation: portraitIn 0.9s ease-in-out 0.2s both;
}

.display-page .portrait-display-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #111827;
}

.display-page .portrait-pdf-button {
    width: 100%;
    height: 100%;
    border: 0;
    background: #ffffff;
    color: #1d4ed8;
    font-size: 22px;
    font-weight: 900;
}

.display-page .item .content {
    z-index: 4;
    left: 70px;
    width: 380px;
}

.display-page .content .description {
    max-width: 360px;
}

@keyframes portraitIn {
    from {
        opacity: 0;
        transform: translate(80px, -50%) scale(0.92);
        filter: blur(14px);
    }
    to {
        opacity: 1;
        transform: translate(0, -50%) scale(1);
        filter: blur(0);
    }
}

@media (max-width: 900px) {
    .display-page .slide .item:nth-child(2) .portrait-display-card,
    .display-page .exhibition-slider.is-single .slide .item:only-child .portrait-display-card {
        right: 28px;
        width: 210px;
        height: 305px;
        border-width: 8px;
    }

    .display-page .item .content {
        left: 36px;
        width: calc(100% - 310px);
    }
}

@media (max-width: 640px) {
    .display-page .slide .item:nth-child(2) .portrait-display-card,
    .display-page .exhibition-slider.is-single .slide .item:only-child .portrait-display-card {
        top: auto;
        right: 18px;
        bottom: 92px;
        width: 120px;
        height: 170px;
        border-width: 5px;
        transform: none;
    }

    .display-page .item .content {
        top: 32%;
        left: 22px;
        width: calc(100% - 44px); /* Konten mengambil lebar penuh */
        padding-right: 0; /* Hapus padding kanan karena kartu portrait disembunyikan */
    }

    /* Sembunyikan kartu portrait pada layar sangat kecil untuk memberikan ruang pada konten utama */
    .display-page .slide .item:nth-child(2) .portrait-display-card,
    .display-page .exhibition-slider.is-single .slide .item:only-child .portrait-display-card {
        display: none;
    }
}

/* ===== FIX: portrait ikut antri sebagai thumbnail/card, landscape tetap background ===== */
.display-page .portrait-display-card {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
}

/* Item kecil/antrian: yang terlihat adalah file portrait, bukan landscape. */
.display-page .container .slide .item .portrait-display-card {
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: inherit;
    transform: none;
    animation: none;
}

.display-page .container .slide .item .portrait-display-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #111827;
}

/* Item background utama pertama disembunyikan agar mengikuti pola referensi. */
.display-page .slide .item:nth-child(1) .portrait-display-card {
    display: none;
}

/* Item aktif: landscape tetap background, portrait tampil besar di kanan. */
.display-page .slide .item:nth-child(2) .portrait-display-card,
.display-page .exhibition-slider.is-single .slide .item:only-child .portrait-display-card {
    inset: auto 72px auto auto;
    top: 50%;
    width: 270px;
    height: 390px;
    border: 10px solid rgba(255, 255, 255, 0.92);
    border-radius: 18px;
    transform: translateY(-50%);
    animation: portraitIn 0.9s ease-in-out 0.2s both;
}

.display-page .slide .item:nth-child(2) .portrait-display-card img,
.display-page .exhibition-slider.is-single .slide .item:only-child .portrait-display-card img {
    object-fit: contain;
}

/* Item antrian portrait di kanan harus tetap terlihat di atas background thumbnail. */
.display-page .slide .item:nth-child(3) .portrait-display-card,
.display-page .slide .item:nth-child(4) .portrait-display-card,
.display-page .slide .item:nth-child(5) .portrait-display-card {
    display: flex;
}

@media (max-width: 900px) {
    .display-page .slide .item:nth-child(2) .portrait-display-card,
    .display-page .exhibition-slider.is-single .slide .item:only-child .portrait-display-card {
        inset: auto 28px auto auto;
        top: 50%;
        width: 210px;
        height: 305px;
        border-width: 8px;
        transform: translateY(-50%);
    }
}

@media (max-width: 640px) {
    .display-page .slide .item:nth-child(2) .portrait-display-card,
    .display-page .exhibition-slider.is-single .slide .item:only-child .portrait-display-card {
        top: auto;
        right: 18px;
        bottom: 92px;
        width: 120px;
        height: 170px;
        border-width: 5px;
        transform: none;
    }
}

/* ===== Final mobile responsive overrides ===== */
@media (max-width: 768px) {
    .topbar {
        gap: 12px;
        padding: 14px;
    }

    .brand {
        font-size: 18px;
    }

    .nav-links,
    .status-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
        gap: 8px;
    }

    .nav-links a,
    .status-tabs a {
        width: 100%;
        min-height: 40px;
        padding: 9px 10px;
        text-align: center;
        white-space: normal;
    }

    .page-shell,
    .narrow-shell,
    .login-shell {
        width: 100%;
        padding: 20px 14px 40px;
    }

    .intro-band,
    .section-heading {
        gap: 12px;
        margin-bottom: 20px;
        padding: 18px 0;
    }

    .intro-band h1,
    .section-heading h1 {
        font-size: 28px;
        line-height: 1.14;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .summary-grid,
    .form-grid,
    .upload-grid,
    .captcha-row {
        grid-template-columns: 1fr;
    }

    .panel-form,
    .admin-card,
    .summary-item {
        padding: 16px;
    }

    .admin-card {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .admin-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-preview-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .poster-actions,
    .form-actions,
    .admin-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn,
    .admin-actions form {
        width: 100%;
    }

    .preview-modal {
        padding: 10px;
    }

    .preview-dialog {
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
    }

    .preview-header {
        align-items: flex-start;
    }

    .preview-frame {
        min-height: 0;
        height: calc(100vh - 96px);
        height: calc(100dvh - 96px);
        padding: 10px;
    }

    .preview-frame iframe {
        height: 100%;
        min-height: 0;
    }
}

@media (max-width: 640px) {
    .display-page,
    .display-shell {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .display-page .container {
        inset: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        transform: none;
        box-shadow: none;
    }

    .display-page .container .slide .item {
        display: none;
    }

    .display-page .slide .item:nth-child(1),
    .display-page .slide .item:nth-child(2),
    .display-page .exhibition-slider.is-single .slide .item:only-child {
        top: 0;
        left: 0;
        bottom: auto;
        width: 100%;
        height: 100%;
        display: block;
        border-radius: 0;
        transform: none;
    }

    .display-page .slide .item:nth-child(1)::after,
    .display-page .slide .item:nth-child(2)::after,
    .display-page .exhibition-slider.is-single .slide .item:only-child::after {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.34) 0%, rgba(0, 0, 0, 0.28) 36%, rgba(0, 0, 0, 0.84) 100%);
    }

    .display-page .slide .item:nth-child(n + 3) {
        display: none;
    }

    .display-page .slide .item:nth-child(2) .portrait-display-card,
    .display-page .exhibition-slider.is-single .slide .item:only-child .portrait-display-card {
        inset: 24px auto auto 50%;
        width: 126px;
        height: 178px;
        display: flex;
        border-width: 5px;
        border-radius: 14px;
        transform: translateX(-50%);
        animation: none;
    }

    .display-page .item .content {
        top: auto;
        left: 16px;
        bottom: 82px;
        width: calc(100% - 32px);
        max-width: none;
        transform: none;
    }

    .display-page .content .name {
        font-size: 24px;
        line-height: 1.14;
    }

    .display-page .content .description {
        max-width: none;
        max-height: 72px;
        margin-top: 8px;
        margin-bottom: 12px;
        overflow: auto;
        font-size: 14px;
        line-height: 1.45;
    }

    .display-actions button {
        width: 100%;
        min-height: 40px;
    }

    .display-page .button {
        bottom: 18px;
    }

    .display-page .button button {
        width: 42px;
        height: 38px;
    }
}

@media (max-width: 420px) {
    .intro-band h1,
    .section-heading h1 {
        font-size: 25px;
    }

    .admin-preview-grid {
        grid-template-columns: 1fr;
    }

    .display-page .slide .item:nth-child(2) .portrait-display-card,
    .display-page .exhibition-slider.is-single .slide .item:only-child .portrait-display-card {
        top: 18px;
        width: 108px;
        height: 154px;
    }

    .display-page .item .content {
        left: 14px;
        bottom: 76px;
        width: calc(100% - 28px);
    }

    .display-page .content .name {
        font-size: 22px;
    }

    .display-page .content .description {
        max-height: 62px;
    }
}

@media (max-width: 640px) and (max-height: 560px) {
    .display-page .slide .item:nth-child(2) .portrait-display-card,
    .display-page .exhibition-slider.is-single .slide .item:only-child .portrait-display-card {
        display: none;
    }

    .display-page .item .content {
        bottom: 72px;
    }
}
