:root {
    --portal-primary: #da0e0e;
    --portal-white: #ffffff;
    --portal-black: #000000;
    --portal-soft: #fff4f4;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #ffffff 0%, #fffafa 100%);
    color: #1f2937;
}

.btn {
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-danger {
    background: linear-gradient(135deg, #b80c0c, var(--portal-primary));
    border-color: #b80c0c;
    box-shadow: 0 8px 18px rgba(218, 14, 14, 0.28);
}

.btn-danger:hover,
.btn-danger:focus {
    background: linear-gradient(135deg, #a10b0b, #c50d0d);
    border-color: #a10b0b;
    box-shadow: 0 10px 22px rgba(218, 14, 14, 0.35);
}

.btn-outline-danger {
    border-color: rgba(218, 14, 14, 0.5);
    color: #b80c0c;
    background: rgba(255, 255, 255, 0.7);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
    color: #ffffff;
    background: var(--portal-primary);
    border-color: var(--portal-primary);
    box-shadow: 0 8px 18px rgba(218, 14, 14, 0.25);
}

.site-header .navbar {
    background: var(--portal-white);
    border-bottom: 1px solid #f1d7d7;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.top-strip {
    height: 6px;
    background: linear-gradient(90deg, #990000, var(--portal-primary));
}

.brand-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.18;
}

.brand-text strong {
    color: #111827;
    font-size: 1rem;
}

.brand-text small {
    color: var(--portal-primary);
    font-size: 0.8rem;
    font-weight: 600;
}

.navbar-nav .nav-link {
    font-weight: 700;
    font-size: 0.95rem;
    color: #303030;
    padding: 0.75rem 0.85rem;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover,
.navbar-nav .dropdown-item:active {
    color: var(--portal-primary);
}

.dropdown-menu {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.hero-slide {
    min-height: clamp(260px, 56.25vw, 620px);
    background:
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.2), transparent 45%),
        linear-gradient(120deg, #8f0000, var(--portal-primary));
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.1));
}

.hero .carousel-indicators {
    margin-bottom: 1rem;
}

.info-section {
    background-color: var(--portal-soft);
}

.info-card {
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.info-card-image {
    width: 100%;
    height: 210px;
    object-fit: cover;
    object-position: center;
}

.info-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 0.75rem 1.5rem rgba(218, 14, 14, 0.16) !important;
}

.page-banner {
    position: relative;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.page-banner::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--portal-primary);
}

.page-banner h1,
.page-banner .h2 {
    color: #0f172a !important;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin-bottom: 0.55rem !important;
}

.page-banner p {
    color: #64748b !important;
    margin-bottom: 0 !important;
    max-width: 78ch;
}

.page-richtext {
    color: #1f2937;
    line-height: 1.75;
}

.page-richtext h1,
.page-richtext h2,
.page-richtext h3,
.page-richtext h4 {
    margin-bottom: 0.8rem;
    color: #111827;
}

.page-richtext p {
    margin-bottom: 0.95rem;
}

.page-richtext ul,
.page-richtext ol {
    padding-left: 1.2rem;
    margin-bottom: 1rem;
}

.site-footer {
    background-color: var(--portal-black);
}

.footer-title {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 0.9rem;
}

.footer-subtitle {
    color: #f3f4f6;
    font-weight: 600;
    margin-bottom: 0.65rem;
}

.footer-text {
    color: #d1d5db;
}

.footer-list li {
    margin-bottom: 0.5rem;
    color: #d1d5db;
}

.footer-link {
    color: #f9fafb;
    text-decoration: none;
}

.footer-link:hover {
    color: #ffadad;
}

.footer-muted {
    color: #9ca3af;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-page {
    background: linear-gradient(135deg, #2b0a0a 0%, #da0e0e 45%, #ffffff 100%);
}

.auth-shell {
    min-height: 100vh;
}

.auth-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
}

.auth-header {
    padding: 2rem 2rem 1rem;
}

.auth-body {
    padding: 1rem 2rem 2rem;
}

.auth-logo {
    width: 84px;
    height: 84px;
    object-fit: contain;
}

.admin-body {
    background: #0f172a;
}

.admin-layout {
    height: 100vh;
    display: flex;
    overflow: hidden;
}

.admin-sidebar {
    width: 290px;
    height: 100vh;
    background: #0f172a;
    color: #cbd5e1;
    padding: 0.9rem;
    border-right: 1px solid rgba(148, 163, 184, 0.2);
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #ffffff;
    padding: 0.35rem 0.45rem;
    border-radius: 10px;
}

.sidebar-brand strong {
    display: block;
    font-size: 0.94rem;
    font-weight: 700;
}

.sidebar-brand small {
    color: #94a3b8;
    font-size: 0.73rem;
}

.sidebar-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.sidebar-link,
.sidebar-toggle {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border: 0;
    background: transparent;
    color: #cbd5e1;
    text-decoration: none;
    padding: 0.6rem 0.72rem;
    border-radius: 8px;
    font-weight: 500;
    text-align: left;
    gap: 0.4rem;
    font-size: 0.92rem;
}

.sidebar-toggle {
    justify-content: space-between;
}

.sidebar-toggle > span {
    display: inline-flex;
    align-items: center;
}

.sidebar-link:hover,
.sidebar-toggle:hover {
    color: #ffffff;
    background: rgba(148, 163, 184, 0.14);
}

.sidebar-link.active {
    color: #ffffff;
    background: #da0e0e;
    box-shadow: 0 6px 14px rgba(218, 14, 14, 0.28);
}

.sidebar-submenu {
    margin: 0.3rem 0 0.35rem 0.35rem;
    padding-left: 0.55rem;
    border-left: 1px solid rgba(148, 163, 184, 0.28);
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    color: #94a3b8;
    text-decoration: none;
    padding: 0.44rem 0.64rem;
    border-radius: 7px;
    font-size: 0.88rem;
    text-align: left;
}

.sidebar-sublink:hover,
.sidebar-sublink.active {
    color: #ffffff;
    background: rgba(148, 163, 184, 0.14);
}

.sidebar-logout {
    color: #fca5a5;
}

.admin-main {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    background: #f8fafc;
}

.admin-topbar {
    height: 72px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 1025;
}

.admin-user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.admin-user-name {
    font-weight: 700;
    color: #111827;
}

.admin-user-role {
    font-size: 0.82rem;
    color: #6b7280;
}

.admin-content {
    padding: 1.25rem;
}

.admin-content-plain {
    padding: 0.25rem 0.1rem;
}

.admin-panel-placeholder {
    min-height: 230px;
    border: 1px dashed #d1d5db;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #6b7280;
    background: #fafafa;
    text-align: center;
}

.admin-panel-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.6rem;
    display: block;
}

.admin-stat-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
}

.admin-stat-label {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.3rem;
}

.admin-stat-card strong {
    font-size: 1.6rem;
    color: #111827;
}

.admin-info-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    background: #ffffff;
}

.admin-info-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px dashed #e5e7eb;
    padding: 0.55rem 0;
    color: #374151;
}

.admin-info-list li:last-child {
    border-bottom: 0;
}

.struktur-item-card {
    border-radius: 12px;
    overflow: hidden;
}

.struktur-foto {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
}

.wysiwyg-editor {
    min-height: 320px;
    background: #ffffff;
}

.ql-toolbar.ql-snow {
    border-radius: 10px 10px 0 0;
    border-color: #d1d5db;
}

.ql-container.ql-snow {
    border-radius: 0 0 10px 10px;
    border-color: #d1d5db;
    min-height: 280px;
    font-size: 0.95rem;
}

/* Informasi form: keep WYSIWYG flow stable so it never overlaps next fields */
.informasi-editor {
    min-height: 0;
}

#informasiEditor.ql-container {
    height: auto;
    min-height: 340px;
}

#informasiEditor .ql-editor {
    min-height: 280px;
}

.informasi-main-photo-field {
    position: relative;
    z-index: 1;
    margin-top: 0.5rem;
}

.modal-content {
    border-radius: 14px;
}

.modal-title {
    font-weight: 700;
    color: #111827;
}

.admin-table-wrap {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.75rem 0.85rem;
}

table.admin-table {
    margin-bottom: 0 !important;
    min-width: 700px;
}

table.admin-table thead th {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    white-space: nowrap;
}

table.admin-table td {
    color: #0f172a;
    font-size: 0.92rem;
    vertical-align: middle;
}

/* Keep action column compact across all admin DataTables */
table.admin-table th:last-child,
table.admin-table td:last-child {
    width: 1%;
    white-space: nowrap;
}

table.admin-table td:last-child .btn {
    margin-right: 0.3rem;
}

table.admin-table td:last-child .btn:last-child {
    margin-right: 0;
}

table.admin-table > :not(caption) > * > * {
    padding: 0.75rem 0.85rem;
    border-color: #eef2f7;
}

table.admin-table tbody tr:hover {
    background: #f8fafc;
}

.admin-content .dataTables_wrapper .dataTables_length,
.admin-content .dataTables_wrapper .dataTables_filter {
    margin-bottom: 0.75rem;
}

.admin-content .dataTables_wrapper .dataTables_filter input,
.admin-content .dataTables_wrapper .dataTables_length select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.32rem 0.55rem;
    background: #ffffff;
}

.admin-content .dataTables_wrapper .dataTables_info {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #64748b;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        padding-top: 0.8rem;
    }

    .admin-layout {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .admin-sidebar {
        width: 100%;
        border-right: 0;
        height: auto;
        overflow: visible;
    }

    .sidebar-close {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .admin-sidebar.is-open .sidebar-close {
        opacity: 1;
        pointer-events: auto;
    }

    table.admin-table {
        min-width: 620px;
    }
}

@media (max-width: 576px) {
    .hero-slide {
        min-height: 240px;
    }

    .brand-logo {
        width: 50px;
        height: 50px;
    }

    .brand-text strong {
        font-size: 0.9rem;
    }

    .auth-header,
    .auth-body {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    table.admin-table {
        min-width: 560px;
    }

    .admin-content .dataTables_wrapper .dataTables_length,
    .admin-content .dataTables_wrapper .dataTables_filter,
    .admin-content .dataTables_wrapper .dataTables_info,
    .admin-content .dataTables_wrapper .dataTables_paginate {
        text-align: left;
        float: none;
    }
}
