/* =========================================================
   ADMIN.CSS - MIN 5 LAMPUNG UTARA
   ---------------------------------------------------------
   01. RESET & GLOBAL
   02. LOGIN ADMIN
   03. HEADER & CONTAINER ADMIN
   04. DASHBOARD ADMIN
   05. HALAMAN / FORM ADMIN
   06. STRUKTUR
   07. KEGIATAN
   08. GALERI
   09. PESAN MASUK & DETAIL PESAN
   10. SIDEBAR ADMIN (untuk halaman pesan)
   11. RESPONSIVE
   ========================================================= */

/* =========================================================
   01. RESET & GLOBAL
   ========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    min-height: 100vh;
    font-family: Arial, sans-serif;
    color: #334155;
    background: linear-gradient(135deg, #f0fdf4, #ffffff, #ecfdf5);
}

button,
input,
textarea,
select { font-family: inherit; }

a { -webkit-tap-highlight-color: transparent; }

/* =========================================================
   02. LOGIN ADMIN
   Halaman: admin/login.php
   PENTING: bagian ini dipertahankan agar login admin tidak rusak.
   ========================================================= */
.admin-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.admin-login-card {
    width: 100%;
    max-width: 430px;
    padding: 40px;
    background: #ffffff;
    border: 1px solid #dcfce7;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.10);
}

.admin-logo {
    margin-bottom: 20px;
    text-align: center;
}

.admin-logo img {
    width: 85px;
    height: 85px;
    object-fit: contain;
}

.admin-login-card h1 {
    margin-bottom: 8px;
    color: #14532d;
    font-size: 30px;
    text-align: center;
}

.admin-subtitle {
    margin-bottom: 30px;
    color: #64748b;
    font-size: 14px;
    text-align: center;
}

/* Form login memakai .form-group, berbeda dari .admin-form-group. */
.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 13px 15px;
    color: #334155;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    transition: 0.3s;
}

.form-group input:focus {
    border-color: #15803d;
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.10);
}

.admin-login-card button {
    width: 100%;
    padding: 13px;
    color: #ffffff;
    background: #15803d;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.admin-login-card button:hover {
    background: #166534;
    transform: translateY(-1px);
}

.back-home {
    display: block;
    margin-top: 20px;
    color: #15803d;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
}

.back-home:hover { text-decoration: underline; }

/* =========================================================
   03. HEADER & CONTAINER ADMIN
   Dipakai dashboard dan halaman admin model header.
   ========================================================= */
.admin-header {
    width: 100%;
    min-height: 80px;
    padding: 15px 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.admin-header-left,
.admin-header-right {
    display: flex;
    align-items: center;
}

.admin-header-left { gap: 15px; }
.admin-header-right { gap: 15px; }

.admin-header-logo {
    width: 55px;
    height: 55px;
    object-fit: contain;
}

.admin-header-left h1 {
    margin: 0;
    color: #14532d;
    font-size: 22px;
}

.admin-header-left p {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 13px;
}

.admin-header-right span {
    color: #475569;
    font-size: 14px;
    font-weight: 600;
}

.admin-header-right a,
.admin-header-logout {
    padding: 9px 18px;
    color: #ffffff;
    background: #dc2626;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
}

.admin-header-right a:hover,
.admin-header-logout:hover { background: #b91c1c; }

.admin-container {
    min-height: calc(100vh - 80px);
    padding: 50px 7%;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 55%, #ecfdf5 100%);
}

/* =========================================================
   04. DASHBOARD ADMIN
   Halaman: dashboard.php
   ========================================================= */
.admin-welcome {
    max-width: 1100px;
    margin: 0 auto 30px;
    padding: 30px;
    background: linear-gradient(135deg, #14532d, #15803d);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(21, 128, 61, 0.15);
}

.admin-welcome-label {
    display: block;
    margin-bottom: 8px;
    color: #bbf7d0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.admin-welcome h2 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 27px;
}

.admin-welcome p {
    max-width: 650px;
    margin: 0;
    color: #dcfce7;
    font-size: 14px;
    line-height: 1.7;
}

.admin-menu-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.admin-menu-card {
    position: relative;
    min-height: 190px;
    padding: 25px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    color: inherit;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    text-decoration: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: 0.25s;
}

.admin-menu-card:hover {
    border-color: #86efac;
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(21, 128, 61, 0.12);
}

.admin-menu-icon {
    width: 55px;
    height: 55px;
    min-width: 55px;
    flex: 0 0 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0fdf4;
    border-radius: 12px;
    font-size: 27px;
}

.admin-menu-content { flex: 1; }

.admin-menu-card h3,
.admin-menu-content h3 {
    margin: 3px 0 9px;
    color: #14532d;
    font-size: 18px;
}

.admin-menu-card p,
.admin-menu-content p {
    margin: 0 0 18px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.admin-menu-content p strong { color: #15803d; }

.admin-menu-action {
    display: inline-block;
    color: #15803d;
    font-size: 12px;
    font-weight: 700;
}

.admin-message-card { position: relative; }

.dashboard-message-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    min-width: 25px;
    height: 25px;
    padding: 0 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #dc2626;
    border: 3px solid #ffffff;
    border-radius: 20px;
    box-sizing: content-box;
    font-size: 11px;
    font-weight: 700;
}

.admin-footer-link {
    max-width: 1100px;
    margin: 30px auto 0;
    text-align: center;
}

.admin-footer-link a {
    color: #15803d;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.admin-footer-link a:hover { text-decoration: underline; }

/* =========================================================
   05. HALAMAN / FORM ADMIN
   Profil, edit struktur, edit kegiatan, edit galeri, dll.
   ========================================================= */
.admin-page-top,
.admin-page-header {
    max-width: 1000px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.admin-page-top h2,
.admin-page-header h1 {
    margin: 0 0 6px;
    color: #14532d;
    font-size: 28px;
}

.admin-page-top p,
.admin-page-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.admin-back-button {
    padding: 10px 18px;
    color: #15803d;
    background: #ffffff;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    transition: 0.3s;
}

.admin-back-button:hover { background: #f0fdf4; }

.admin-alert {
    max-width: 1000px;
    margin: 0 auto 20px;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
}

.admin-alert.success {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #86efac;
}

.admin-alert.error {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

.admin-form-card {
    max-width: 1000px;
    margin: 0 auto;
    padding: 35px;
    background: #ffffff;
    border: 1px solid #dcfce7;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.admin-form-group { margin-bottom: 22px; }

.admin-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #14532d;
    font-size: 14px;
    font-weight: 700;
}

.admin-form-group input[type="text"],
.admin-form-group input[type="email"],
.admin-form-group input[type="password"],
.admin-form-group input[type="date"],
.admin-form-group input[type="number"],
.admin-form-group select,
.admin-form-group textarea {
    width: 100%;
    padding: 12px 14px;
    color: #334155;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    transition: 0.3s;
}

.admin-form-group textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.7;
}

.admin-form-group input:focus,
.admin-form-group select:focus,
.admin-form-group textarea:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.10);
}

.admin-form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    background: #f0fdf4;
    border: 1px dashed #86efac;
    border-radius: 8px;
    font-size: 13px;
}

.admin-form-group small {
    display: block;
    margin-top: 7px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

.admin-current-image {
    margin: 20px 0 25px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.admin-current-image p {
    margin: 0 0 12px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}

.admin-current-image img {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
    border: 1px solid #dcfce7;
    border-radius: 10px;
}

.admin-save-button {
    width: 100%;
    min-height: 48px;
    padding: 12px 20px;
    color: #ffffff;
    background: #15803d;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.admin-save-button:hover {
    background: #166534;
    transform: translateY(-1px);
}

.admin-section-title {
    margin: 0 0 22px;
    color: #14532d;
    font-size: 20px;
}

.admin-list-card { margin-top: 25px; }

.admin-empty {
    padding: 30px;
    color: #64748b;
    background: #f8fafc;
    border-radius: 10px;
    text-align: center;
}

.admin-edit-button,
.admin-delete-button {
    padding: 8px 13px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
}

.admin-edit-button { color: #166534; background: #dcfce7; }
.admin-edit-button:hover { background: #bbf7d0; }
.admin-delete-button { color: #b91c1c; background: #fee2e2; }
.admin-delete-button:hover { background: #fecaca; }

/* =========================================================
   06. STRUKTUR ADMIN
   Halaman: struktur.php / edit_struktur.php
   ========================================================= */
.structure-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.structure-item {
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.structure-photo {
    width: 75px;
    height: 75px;
    min-width: 75px;
    overflow: hidden;
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 10px;
}

.structure-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.structure-no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.structure-info { flex: 1; }
.structure-info h4 { margin: 0 0 5px; color: #14532d; font-size: 16px; }
.structure-info p { margin: 0 0 6px; color: #475569; font-size: 14px; }
.structure-info span { color: #94a3b8; font-size: 12px; }

.structure-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =========================================================
   07. KEGIATAN ADMIN
   Halaman: kegiatan.php / edit_kegiatan.php
   ========================================================= */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.activity-photo {
    width: 110px;
    height: 80px;
    min-width: 110px;
    overflow: hidden;
    background: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 10px;
}

.activity-photo img { width: 100%; height: 100%; object-fit: cover; }

.activity-no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.activity-info { flex: 1; }
.activity-info h4 { margin: 0 0 5px; color: #14532d; font-size: 16px; }
.activity-info p { margin: 7px 0; color: #64748b; font-size: 13px; line-height: 1.6; }
.activity-info span { color: #94a3b8; font-size: 12px; }
.activity-date { display: inline-block; margin-bottom: 3px; color: #15803d; font-size: 12px; font-weight: 700; }

/* =========================================================
   08. GALERI ADMIN
   Halaman: galeri.php / edit_galeri.php
   ========================================================= */
.admin-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.admin-gallery-item {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: 0.3s;
}

.admin-gallery-item:hover {
    border-color: #86efac;
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(21, 128, 61, 0.10);
}

.admin-gallery-image {
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: #f1f5f9;
}

.admin-gallery-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.4s;
}

.admin-gallery-item:hover .admin-gallery-image img { transform: scale(1.04); }

.admin-gallery-content { padding: 17px; }
.admin-gallery-content h4 { margin: 0 0 7px; color: #14532d; font-size: 15px; }
.admin-gallery-content p { margin: 0 0 10px; color: #64748b; font-size: 12px; line-height: 1.6; }
.admin-gallery-content > span { display: block; margin-bottom: 14px; color: #94a3b8; font-size: 11px; }

.admin-gallery-actions { display: flex; gap: 8px; }
.admin-gallery-actions .admin-edit-button,
.admin-gallery-actions .admin-delete-button { flex: 1; text-align: center; }

.gallery-upload-preview {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.gallery-preview-item {
    height: 110px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.gallery-preview-item img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* =========================================================
   09. PESAN MASUK & DETAIL PESAN
   Halaman: pesan.php / detail_pesan.php
   ========================================================= */
.message-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    margin-left: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #dc2626;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.message-summary {
    max-width: 1000px;
    margin: 0 auto 25px;
}

.message-summary > div {
    width: 180px;
    padding: 22px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

.message-summary strong { display: block; color: #15803d; font-size: 30px; }
.message-summary span { color: #64748b; font-size: 13px; }

.message-list {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-item {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: 0.2s;
}

.message-item:hover { border-color: #86efac; box-shadow: 0 5px 18px rgba(0, 0, 0, 0.05); }
.message-item.message-new { background: #f0fdf4; border-left: 4px solid #15803d; }
.message-main { flex: 1; min-width: 0; }

.message-top {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.message-top h3 { margin-bottom: 4px; color: #14532d; font-size: 16px; }
.message-email { color: #64748b; font-size: 12px; overflow-wrap: anywhere; }
.message-status { padding: 5px 9px; color: #166534; background: #dcfce7; border-radius: 20px; font-size: 11px; font-weight: 700; }
.message-preview { margin-bottom: 10px; color: #475569; font-size: 14px; line-height: 1.6; }
.message-date { color: #94a3b8; font-size: 11px; }

.message-actions { display: flex; align-items: center; gap: 8px; }
.message-actions form { margin: 0; }

.message-open,
.message-delete {
    padding: 9px 14px;
    display: inline-block;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.message-open { color: #ffffff; background: #15803d; border: 1px solid #15803d; }
.message-open:hover { background: #166534; }
.message-delete { color: #dc2626; background: #ffffff; border: 1px solid #fecaca; }
.message-delete:hover { color: #ffffff; background: #dc2626; }

.message-empty {
    padding: 60px 20px;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    text-align: center;
}

.message-empty span { display: block; margin-bottom: 12px; font-size: 45px; }
.message-empty h3 { margin-bottom: 8px; color: #14532d; }
.message-empty p { color: #64748b; }

.message-detail {
    max-width: 850px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.message-detail-header {
    padding-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.message-detail-header span,
.message-detail-info span,
.message-content > span { display: block; margin-bottom: 6px; color: #94a3b8; font-size: 12px; }

.message-detail-header h2 { color: #14532d; }
.message-read-status { padding: 6px 12px !important; color: #166534 !important; background: #dcfce7; border-radius: 20px; font-weight: 700; }

.message-detail-info {
    padding: 22px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.message-detail-info strong { color: #334155; font-size: 14px; overflow-wrap: anywhere; }
.message-content { padding: 25px 0; }
.message-content p { color: #475569; line-height: 1.8; overflow-wrap: anywhere; }

.message-reply {
    padding: 11px 18px;
    display: inline-block;
    color: #ffffff;
    background: #15803d;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.message-reply:hover { background: #166534; }

/* =========================================================
   10. SIDEBAR ADMIN
   Dipakai oleh pesan.php dan detail_pesan.php versi sidebar.
   Tidak mengubah dashboard model header.
   ========================================================= */
.admin-layout {
    min-height: 100vh;
    display: flex;
    background: #f8fafc;
}

.admin-sidebar {
    width: 250px;
    min-width: 250px;
    min-height: 100vh;
    padding: 28px 20px;
    background: #14532d;
}

.admin-brand {
    padding: 0 10px 25px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.admin-brand h2 { color: #ffffff; font-size: 24px; }
.admin-brand span { color: #bbf7d0; font-size: 12px; }

.admin-menu {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.admin-menu a {
    padding: 11px 13px;
    display: flex;
    align-items: center;
    color: #dcfce7;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
}

.admin-menu a:hover,
.admin-menu a.active { color: #14532d; background: #ffffff; }
.admin-menu a.logout-link { margin-top: 12px; color: #fecaca; }
.admin-menu a.logout-link:hover { color: #ffffff; background: #dc2626; }

.admin-content {
    width: calc(100% - 250px);
    min-width: 0;
    padding: 40px;
}

/* =========================================================
   11. RESPONSIVE
   ========================================================= */
@media (max-width: 1000px) {
    .admin-menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-upload-preview { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 800px) {
    .admin-layout { display: block; }
    .admin-sidebar {
        width: 100%;
        min-width: 0;
        min-height: auto;
        padding: 20px;
    }
    .admin-menu { display: grid; grid-template-columns: repeat(2, 1fr); }
    .admin-content { width: 100%; padding: 30px 20px; }
}

@media (max-width: 700px) {
    .admin-header {
        padding: 15px 5%;
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    .admin-header-left,
    .admin-header-right { justify-content: center; }
    .admin-container { padding: 40px 5%; }
    .admin-menu-grid { grid-template-columns: 1fr; }
    .admin-menu-card { min-height: auto; }
    .admin-welcome { padding: 25px 20px; }
    .admin-welcome h2 { font-size: 22px; }

    .message-item { align-items: stretch; flex-direction: column; }
    .message-actions { width: 100%; }
    .message-open,
    .message-actions form,
    .message-delete { flex: 1; }
    .message-delete { width: 100%; }
    .message-detail-info { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .admin-page-top,
    .admin-page-header { align-items: flex-start; flex-direction: column; }
    .admin-back-button { width: 100%; text-align: center; }
    .admin-form-card { padding: 25px 20px; }

    .structure-item,
    .activity-item { align-items: flex-start; flex-wrap: wrap; }
    .structure-info { min-width: calc(100% - 100px); }
    .activity-info { min-width: calc(100% - 130px); }
    .structure-actions,
    .activity-item .structure-actions { width: 100%; }
    .admin-edit-button,
    .admin-delete-button { flex: 1; text-align: center; }

    .admin-gallery-grid { grid-template-columns: 1fr; }
    .gallery-upload-preview { grid-template-columns: repeat(2, 1fr); }
    .admin-gallery-image { height: 220px; }

    .message-detail-header { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 500px) {
    /* Login admin tetap memiliki aturan responsif sendiri. */
    .admin-login-container { padding: 20px; }
    .admin-login-card { padding: 30px 22px; }
    .admin-login-card h1 { font-size: 26px; }
}

@media (max-width: 450px) {
    .admin-header-left { flex-direction: column; text-align: center; }
    .admin-header-right { flex-direction: column; }
    .admin-header-right a { width: 100%; text-align: center; }
    .admin-menu-card { padding: 20px; }
    .admin-menu { grid-template-columns: 1fr; }
}

/* =========================================================
   10. PPDB ADMIN
   Halaman: ppdb.php & detail_ppdb.php
   ========================================================= */


/* =========================================================
   PPDB - STATISTIK
   ========================================================= */

.admin-ppdb-stats {
    margin: 25px 0;

    display: grid;
    grid-template-columns: repeat(4, 1fr);

    gap: 15px;
}

.admin-ppdb-stat {
    padding: 22px;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 12px;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.04);
}

.admin-ppdb-stat span {
    display: block;

    margin-bottom: 8px;

    color: #64748b;

    font-size: 12px;
}

.admin-ppdb-stat strong {
    color: #0f172a;

    font-size: 27px;
}

.admin-ppdb-stat.waiting {
    border-left: 4px solid #eab308;
}

.admin-ppdb-stat.accepted {
    border-left: 4px solid #16a34a;
}

.admin-ppdb-stat.rejected {
    border-left: 4px solid #dc2626;
}


/* =========================================================
   PPDB - FILTER
   ========================================================= */

.admin-ppdb-filter {
    margin-bottom: 20px;

    display: flex;
    flex-wrap: wrap;

    gap: 8px;
}

.admin-ppdb-filter a {
    padding: 9px 15px;

    color: #475569;
    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 7px;

    font-size: 12px;
    font-weight: 600;

    text-decoration: none;

    transition: 0.3s;
}

.admin-ppdb-filter a:hover,
.admin-ppdb-filter a.active {
    color: #ffffff;
    background: #15803d;

    border-color: #15803d;
}


/* =========================================================
   PPDB - DAFTAR
   ========================================================= */

.admin-ppdb-list {
    display: grid;

    gap: 12px;
}

.admin-ppdb-item {
    padding: 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 12px;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.03);
}

.admin-ppdb-main {
    min-width: 0;
}

.admin-ppdb-number {
    margin-bottom: 5px;

    color: #15803d;

    font-size: 11px;
    font-weight: 700;
}

.admin-ppdb-main h3 {
    margin-bottom: 8px;

    color: #0f172a;

    font-size: 17px;
}

.admin-ppdb-meta {
    display: flex;
    flex-wrap: wrap;

    gap: 7px 18px;

    color: #64748b;

    font-size: 11px;
}

.admin-ppdb-side {
    display: flex;
    align-items: center;

    gap: 12px;

    flex-shrink: 0;
}


/* =========================================================
   PPDB - BADGE STATUS
   ========================================================= */

.admin-ppdb-badge {
    padding: 6px 10px;

    border-radius: 20px;

    font-size: 10px;
    font-weight: 700;
}

.admin-ppdb-badge.waiting {
    color: #854d0e;
    background: #fef3c7;
}

.admin-ppdb-badge.accepted {
    color: #166534;
    background: #dcfce7;
}

.admin-ppdb-badge.rejected {
    color: #991b1b;
    background: #fee2e2;
}

.admin-ppdb-detail-button {
    padding: 9px 13px;

    color: #ffffff;
    background: #15803d;

    border-radius: 7px;

    font-size: 11px;
    font-weight: 700;

    text-decoration: none;

    transition: 0.3s;
}

.admin-ppdb-detail-button:hover {
    background: #166534;
}


/* =========================================================
   PPDB - EMPTY
   ========================================================= */

.admin-ppdb-empty {
    padding: 50px 20px;

    text-align: center;

    color: #64748b;
    background: #ffffff;

    border: 1px dashed #cbd5e1;
    border-radius: 12px;
}

.admin-ppdb-empty h3 {
    margin-bottom: 6px;

    color: #334155;
}


/* =========================================================
   PPDB - DETAIL
   ========================================================= */

.admin-ppdb-back {
    display: inline-block;

    margin-bottom: 20px;

    color: #15803d;

    font-size: 12px;
    font-weight: 700;

    text-decoration: none;
}

.admin-ppdb-back:hover {
    text-decoration: underline;
}

.admin-ppdb-alert {
    margin-bottom: 20px;
    padding: 13px 16px;

    color: #166534;
    background: #dcfce7;

    border: 1px solid #86efac;
    border-radius: 8px;

    font-size: 12px;
}

.admin-ppdb-detail-header {
    margin-bottom: 20px;
    padding: 25px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.admin-ppdb-detail-header > div > span {
    color: #15803d;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.admin-ppdb-detail-header h1 {
    margin: 5px 0;

    color: #14532d;

    font-size: 25px;
}

.admin-ppdb-detail-header p {
    color: #64748b;

    font-size: 12px;
}


/* =========================================================
   PPDB - KONTROL STATUS
   ========================================================= */

.admin-ppdb-status-control {
    margin-bottom: 20px;
    padding: 22px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.admin-ppdb-status-control h2 {
    margin-bottom: 4px;

    color: #334155;

    font-size: 16px;
}

.admin-ppdb-status-control p {
    color: #64748b;

    font-size: 11px;
}

.admin-ppdb-status-buttons {
    display: flex;

    gap: 8px;
}

.admin-ppdb-status-buttons button {
    padding: 9px 14px;

    border-radius: 7px;

    font-family: inherit;
    font-size: 11px;
    font-weight: 700;

    cursor: pointer;

    transition: 0.3s;
}

.admin-ppdb-status-buttons button.waiting {
    color: #854d0e;
    background: #fefce8;

    border: 1px solid #fde68a;
}

.admin-ppdb-status-buttons button.accepted {
    color: #166534;
    background: #f0fdf4;

    border: 1px solid #86efac;
}

.admin-ppdb-status-buttons button.rejected {
    color: #991b1b;
    background: #fef2f2;

    border: 1px solid #fecaca;
}

.admin-ppdb-status-buttons button:hover {
    transform: translateY(-1px);
}


/* =========================================================
   PPDB - DETAIL CARD
   ========================================================= */

.admin-ppdb-detail-card {
    margin-bottom: 20px;
    padding: 25px;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.admin-ppdb-detail-card h2 {
    margin-bottom: 18px;
    padding-bottom: 10px;

    color: #14532d;

    border-bottom: 1px solid #e2e8f0;

    font-size: 17px;
}

.admin-ppdb-detail-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;
}

.admin-ppdb-detail-grid > div {
    padding: 14px;

    background: #f8fafc;

    border-radius: 8px;

    min-width: 0;
}

.admin-ppdb-detail-grid > div.full {
    grid-column: 1 / -1;
}

.admin-ppdb-detail-grid span {
    display: block;

    margin-bottom: 5px;

    color: #94a3b8;

    font-size: 10px;
}

.admin-ppdb-detail-grid strong {
    display: block;

    color: #334155;

    font-size: 12px;
    line-height: 1.6;

    overflow-wrap: anywhere;
}


/* =========================================================
   PPDB ADMIN - RESPONSIVE
   ========================================================= */

@media (max-width: 800px) {

    .admin-ppdb-stats {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .admin-ppdb-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-ppdb-side {
        width: 100%;

        justify-content: space-between;
    }

    .admin-ppdb-status-control {
        align-items: flex-start;
        flex-direction: column;
    }

}


@media (max-width: 600px) {

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

    .admin-ppdb-detail-header {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .admin-ppdb-detail-grid > div.full {
        grid-column: auto;
    }

    .admin-ppdb-status-buttons {
        width: 100%;

        flex-direction: column;
    }

    .admin-ppdb-status-buttons form,
    .admin-ppdb-status-buttons button {
        width: 100%;
    }

}

/* =========================================================
   PPDB ADMIN - MENU NAVIGASI HEADER
   Halaman: ppdb.php & detail_ppdb.php
   ========================================================= */

.admin-header nav {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* TOMBOL MENU */

.admin-header nav a {
    min-height: 40px;
    padding: 9px 15px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #475569;
    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 8px;

    font-size: 12px;
    font-weight: 700;

    text-decoration: none;

    box-sizing: border-box;

    transition:
        background 0.3s,
        color 0.3s,
        border-color 0.3s,
        transform 0.3s;
}


/* HOVER */

.admin-header nav a:hover {
    color: #15803d;
    background: #f0fdf4;

    border-color: #86efac;

    transform: translateY(-1px);
}


/* =========================================================
   MENU AKTIF
   ========================================================= */

.admin-header nav a.active {
    color: #ffffff;
    background: #15803d;

    border-color: #15803d;

    box-shadow:
        0 4px 12px rgba(21, 128, 61, 0.18);
}


/* HOVER MENU AKTIF */

.admin-header nav a.active:hover {
    color: #ffffff;
    background: #166534;

    border-color: #166534;
}


/* =========================================================
   LOGOUT
   Tombol terakhir pada menu
   ========================================================= */

.admin-header nav a:last-child {
    color: #dc2626;
    background: #ffffff;

    border-color: #fecaca;
}


/* HOVER LOGOUT */

.admin-header nav a:last-child:hover {
    color: #ffffff;
    background: #dc2626;

    border-color: #dc2626;

    box-shadow:
        0 4px 12px rgba(220, 38, 38, 0.18);
}


/* =========================================================
   RESPONSIVE MENU PPDB ADMIN
   ========================================================= */

@media (max-width: 700px) {

    .admin-header nav {
        width: 100%;

        margin-top: 15px;

        display: grid;
        grid-template-columns: repeat(3, 1fr);

        gap: 7px;
    }

    .admin-header nav a {
        width: 100%;

        padding: 9px 8px;

        font-size: 11px;
    }

}


@media (max-width: 450px) {

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

}

/* =========================================================
   PPDB ADMIN - PENCARIAN
   ========================================================= */

.admin-ppdb-search {
    margin-bottom: 15px;
}

.admin-ppdb-search-box {
    display: flex;
    align-items: center;

    gap: 8px;
}


/* =========================================================
   INPUT PENCARIAN
   ========================================================= */

.admin-ppdb-search-box input[type="text"] {
    min-width: 0;
    min-height: 44px;

    padding: 10px 14px;

    flex: 1;

    color: #334155;
    background: #ffffff;

    border: 1px solid #cbd5e1;
    border-radius: 8px;

    outline: none;

    font-family: inherit;
    font-size: 12px;

    box-sizing: border-box;

    transition: 0.3s;
}

.admin-ppdb-search-box input[type="text"]::placeholder {
    color: #94a3b8;
}

.admin-ppdb-search-box input[type="text"]:focus {
    border-color: #15803d;

    box-shadow:
        0 0 0 3px rgba(21, 128, 61, 0.10);
}


/* =========================================================
   TOMBOL CARI & RESET
   ========================================================= */

.admin-ppdb-search-box button,
.admin-ppdb-search-box a {
    min-height: 44px;

    padding: 10px 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;

    text-decoration: none;

    box-sizing: border-box;

    cursor: pointer;

    transition: 0.3s;
}


/* TOMBOL CARI */

.admin-ppdb-search-box button {
    color: #ffffff;
    background: #15803d;

    border: 1px solid #15803d;
}

.admin-ppdb-search-box button:hover {
    background: #166534;

    border-color: #166534;

    transform: translateY(-1px);
}


/* TOMBOL RESET */

.admin-ppdb-search-box a {
    color: #64748b;
    background: #ffffff;

    border: 1px solid #cbd5e1;
}

.admin-ppdb-search-box a:hover {
    color: #334155;
    background: #f8fafc;

    border-color: #94a3b8;
}


/* =========================================================
   INFORMASI HASIL PENCARIAN
   ========================================================= */

.admin-ppdb-search-result {
    margin-bottom: 15px;

    padding: 11px 14px;

    color: #64748b;
    background: #f8fafc;

    border: 1px solid #e2e8f0;
    border-radius: 8px;

    font-size: 11px;
}

.admin-ppdb-search-result strong {
    color: #15803d;
}


/* =========================================================
   RESPONSIVE PENCARIAN PPDB
   ========================================================= */

@media (max-width: 600px) {

    .admin-ppdb-search-box {
        flex-wrap: wrap;
    }

    .admin-ppdb-search-box input[type="text"] {
        width: 100%;

        flex-basis: 100%;
    }

    .admin-ppdb-search-box button,
    .admin-ppdb-search-box a {
        flex: 1;
    }

}

/* =========================================================
   PPDB ADMIN - DOKUMEN PENDAFTARAN
   ========================================================= */

.admin-ppdb-document-description {
    margin: -5px 0 20px;

    color: #64748b;

    font-size: 12px;
    line-height: 1.7;
}


/* LIST DOKUMEN */

.admin-ppdb-documents {
    display: grid;
    gap: 12px;
}


/* ITEM */

.admin-ppdb-document-item {
    padding: 15px;

    display: flex;
    align-items: center;
    gap: 14px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;
    border-radius: 9px;
}


/* ICON */

.admin-ppdb-document-icon {
    width: 50px;
    height: 50px;

    flex: 0 0 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #15803d;
    background: #dcfce7;

    border: 1px solid #bbf7d0;
    border-radius: 8px;

    font-size: 11px;
    font-weight: 800;
}


/* INFORMASI */

.admin-ppdb-document-content {
    min-width: 0;

    flex: 1;
}


.admin-ppdb-document-content span {
    display: block;

    margin-bottom: 4px;

    color: #64748b;

    font-size: 10px;
    font-weight: 600;
}


.admin-ppdb-document-content strong {
    display: block;

    color: #334155;

    font-size: 12px;
    font-weight: 700;
}


.admin-ppdb-document-content strong.missing {
    color: #dc2626;
}


/* TOMBOL LIHAT */

.admin-ppdb-document-button {
    min-height: 38px;

    padding: 9px 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #ffffff;
    background: #15803d;

    border: 1px solid #15803d;
    border-radius: 7px;

    font-size: 11px;
    font-weight: 700;

    text-decoration: none;

    box-sizing: border-box;

    transition: 0.3s;
}


.admin-ppdb-document-button:hover {
    background: #166534;
    border-color: #166534;

    transform: translateY(-1px);
}


/* DOKUMEN TIDAK TERSEDIA */

.admin-ppdb-document-button.disabled {
    color: #94a3b8;
    background: #f1f5f9;

    border-color: #e2e8f0;

    cursor: not-allowed;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 600px) {

    .admin-ppdb-document-item {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .admin-ppdb-document-content {
        width: calc(100% - 65px);
    }

    .admin-ppdb-document-button {
        width: 100%;
    }

}

/* =========================================================
   PPDB ADMIN - HAPUS PENDAFTARAN
   ========================================================= */

.admin-ppdb-delete-section {
    margin-top: 20px;
    padding: 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    background: #fff7f7;

    border: 1px solid #fecaca;
    border-radius: 10px;
}


.admin-ppdb-delete-section h2 {
    margin: 0 0 6px;

    color: #991b1b;

    font-size: 15px;
    font-weight: 800;
}


.admin-ppdb-delete-section p {
    max-width: 600px;
    margin: 0;

    color: #64748b;

    font-size: 11px;
    line-height: 1.7;
}


/* TOMBOL HAPUS */

.admin-ppdb-delete-button {
    min-height: 42px;
    padding: 10px 17px;

    color: #ffffff;
    background: #dc2626;

    border: 1px solid #dc2626;
    border-radius: 8px;

    font-family: inherit;
    font-size: 11px;
    font-weight: 700;

    cursor: pointer;
    white-space: nowrap;

    transition: 0.3s;
}


.admin-ppdb-delete-button:hover {
    background: #b91c1c;
    border-color: #b91c1c;

    transform: translateY(-1px);

    box-shadow:
        0 4px 12px
        rgba(220, 38, 38, 0.18);
}


/* ERROR */

.admin-ppdb-error {
    color: #991b1b;
    background: #fef2f2;

    border-color: #fecaca;
}


/* RESPONSIVE */

@media (max-width: 650px) {

    .admin-ppdb-delete-section {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-ppdb-delete-section form {
        width: 100%;
    }

    .admin-ppdb-delete-button {
        width: 100%;
    }

}