/* ==========================================================================
   HELP DESK - SDN CIPINANG BESAR UTARA 08 | FILE GAYA UTAMA
   ========================================================================== */

/* === 1. FONDASI & VARIABLE DESAIN === */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --primary-gradient: linear-gradient(to right, #3b82f6, #60a5fa);
    --background-gradient: linear-gradient(to bottom right, #f0f9ff, #f3f4f6);
    --card-bg: white;
    --text-dark: #1f2937;
    --text-medium: #4b5563;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --font-family: 'Poppins', sans-serif;
    --chat-admin-bg: #dbeafe;
    --chat-user-bg: #f3f4f6;
}

/* === 2. GAYA DASAR & LAYOUT GLOBAL === */
body {
    font-family: var(--font-family);
    background-color: #f3f4f6;
    background-image: var(--background-gradient);
    color: var(--text-dark);
    min-height: 100vh;
    margin: 0;
}
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem;
}
.card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 1.25rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid white;
    margin-top: 2rem;
}
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    margin-top: 2rem;
}

/* === 3. HEADER & NAVIGASI (DESKTOP & MOBILE) === */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.3rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}
.logo span {
    font-weight: 500;
    color: var(--primary-color);
}
/* Navigasi Desktop */
header nav.desktop-nav a {
    margin-left: 1rem;
    text-decoration: none;
    color: var(--text-medium);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    transition: all 0.2s ease;
}
header nav.desktop-nav a:hover {
    background-color: #e0e7ff;
    color: var(--primary-color);
}
header nav.desktop-nav a.nav-admin {
    background: var(--primary-color);
    color: white !important;
}
header nav.desktop-nav a.nav-admin:hover {
    background: var(--primary-hover);
}
/* Navigasi Mobile (Hamburger) */
.hamburger-btn {
    display: none; background: none; border: none; cursor: pointer;
    padding: 0.5rem; color: var(--text-dark);
}
.mobile-nav {
    position: fixed; top: 0; right: 0; width: 280px; height: 100%;
    background: linear-gradient(to bottom, white, #f8fafc);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 2000; transform: translateX(100%); transition: transform 0.3s ease-in-out;
    display: flex; flex-direction: column; padding: 0; border-left: 1px solid var(--border-color);
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem; border-bottom: 1px solid var(--border-color); }
.mobile-nav-title { margin: 0; font-size: 1.125rem; font-weight: 600; }
.close-btn { background: none; border: none; cursor: pointer; position: static; color: var(--text-light); }
.mobile-nav-links { padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.mobile-nav-links a { display: flex; align-items: center; gap: 1rem; padding: 0.875rem 1rem; border-radius: 0.5rem; color: var(--text-dark); text-decoration: none; font-weight: 500; transition: all 0.2s ease-in-out; }
.mobile-nav-links a:hover { background-color: #eff6ff; color: var(--primary-color); transform: translateX(5px); }
.mobile-nav-links a svg { width: 20px; height: 20px; }
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 1999; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.overlay.active { opacity: 1; visibility: visible; }

/* === 4. TOMBOL (BUTTONS) & ELEMEN INTERAKTIF === */
/* Aturan Tombol Global */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: white;
    background: var(--primary-gradient, linear-gradient(to right, #3b82f6, #60a5fa));
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.btn svg {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
}
/* Varian Tombol */
form .btn { width: 100%; }
.btn.btn-secondary { background: #e5e7eb; color: var(--text-dark); }
.btn.btn-secondary:hover { background: #d1d5db; color: var(--text-dark); box-shadow: none; transform: none; }
/* Status Loading & Disabled */
.btn:disabled { cursor: wait !important; background: var(--primary-hover); opacity: 0.8; transform: none; box-shadow: none; }
.send-btn:disabled { cursor: wait !important; background-color: var(--primary-hover); transform: none; }
.hidden { display: none !important; }
.animate-spin { animation: spin 1s linear infinite; width: 20px; height: 20px; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* === 5. FORMULIR & INPUT === */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--text-medium); margin-bottom: 0.5rem; }
.form-group input, .form-group select, .form-group textarea {
    display: block; width: 100%; box-sizing: border-box; border-radius: 0.5rem;
    border: 1px solid var(--border-color); padding: 0.75rem 1rem;
    box-shadow: var(--shadow-sm); transition: all 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
select:disabled { background-color: #f3f4f6; cursor: not-allowed; }

/* === 6. HALAMAN PUBLIK (INDEX, LACAK, BUAT TIKET, LIHAT TIKET) === */
/* Halaman Index */
/* === DESAIN ULANG INDEX PAGE (RESPONSIVE DESKTOP & MOBILE) === */

.hero { text-align: center; padding: 1.5rem 0; }
.hero-logo { width: 100px; height: auto; margin: 0 auto 1rem; }
.hero-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.4rem; }
.hero-subtitle { font-size: 1.125rem; color: var(--text-light); max-width: 600px; margin: 0 auto 0; }

/* Wadah untuk daftar kartu - SEKARANG MENGGUNAKAN GRID */
.action-list {
    display: grid; /* Menggunakan Grid Layout */
    grid-template-columns: 1fr; /* Default 1 kolom untuk mobile */
    gap: 1.5rem;
    max-width: 900px; /* Lebar maksimal disesuaikan */
    margin: 1rem auto 0;
}

/* Desain Kartu Aksi yang Disempurnakan */
.action-card-slim {
    display: flex;
    flex-direction: column; /* Default tumpuk vertikal untuk mobile */
    text-align: center; /* Default rata tengah untuk mobile */
    background: white;
    padding: 2rem;
    border-radius: 1.25rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease-in-out;
}
.action-card-slim:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

/* Konten di dalam kartu */
.card-content {
    flex-grow: 1; /* Mendorong tombol ke bawah */
}
.card-title-slim {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}
.card-description-slim {
    margin: 0 0 0.2rem 0;
    color: var(--text-light);
    line-height: 1.2;
}

.card-action { margin-left: 1rem; }
/* Tombol Aksi */
.card-action .btn {
    width: 80%; /* Default full-width untuk mobile */
    justify-content: center;
}
.card-action .btn span { margin-right: 0.5rem; }
.card-action .btn svg { margin: 0; transition: transform 0.2s ease; }
.action-card-slim:hover .card-action .btn svg {
    transform: translateX(4px);
}
/* Halaman Lacak */
.laporan-list { display: flex; flex-direction: column; gap: 1rem; }
.laporan-item { display: grid; grid-template-columns: 120px 1fr 100px 30px; align-items: center; gap: 1rem; padding: 1rem 1.5rem; background-color: #f9fafb; border: 1px solid var(--border-color); border-radius: 0.75rem; text-decoration: none; color: inherit; transition: all 0.2s ease-in-out; }
.laporan-item:hover { border-color: var(--primary-color); box-shadow: var(--shadow-md); transform: translateY(-3px); background-color: white; }
.laporan-item .status { font-weight: 500; font-size: 0.875rem; display: flex; align-items: center; }
.laporan-item .date { text-align: right; color: var(--text-light); }
.laporan-item .action { text-align: right; color: var(--text-light); }
/* Halaman Lihat Tiket (Publik) */
.ticket-header { padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); }
.ticket-title-final { font-size: 1.5rem; font-weight: 600; line-height: 1.4; margin-bottom: 1rem; }
.ticket-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.625rem; border-radius: 99px; font-size: 0.75rem; font-weight: 500; }
.badge svg { width: 12px; height: 12px; }
.status-badge { color: white; }
.category-badge { background-color: #e5e7eb; color: var(--text-medium); }
.id-badge { background-color: #e0e7ff; color: #4338ca; }
.nisn-badge { background-color: #f0fdf4; color: #166534; }
.chat-container { display: flex; flex-direction: column; gap: 1rem; }
.chat-bubble { padding: 0.4rem 1.2rem; border-radius: 1.25rem; max-width: 80%; line-height: 1.5; }
.chat-bubble .meta { font-size: 0.75rem; color: var(--text-light); margin-top: 0.5rem; font-weight: 500; }
.user-reply {
    background-color: var(--chat-admin-bg); /* Warna biru untuk pengguna */
    color: #1e40af; /* Teks lebih gelap agar kontras */
    border-bottom-right-radius: 0.25rem;
    align-self: flex-end; /* Pindahkan ke KANAN */
}
.admin-reply {
    background-color: var(--chat-user-bg); /* Warna abu-abu untuk admin */
    border-bottom-left-radius: 0.25rem;
    align-self: flex-start; /* Pindahkan ke KIRI */
}
.reply-form-container { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); }
.input-wrapper { display: flex; align-items: flex-end; gap: 0.75rem; background-color: #f9fafb; border: 1px solid var(--border-color); border-radius: 1.5rem; padding: 0.5rem 0.75rem; transition: all 0.2s ease; }
.input-wrapper:focus-within { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
.reply-form-new textarea { flex: 1; border: none; background: transparent; padding: 0.5rem; resize: none; font-size: 0.9375rem; line-height: 1.5; max-height: 200px; overflow-y: auto; }
.reply-form-new textarea:focus { outline: none; }
.send-btn { width: 48px; height: 48px; border-radius: 50%; background-color: var(--primary-color); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; flex-shrink: 0; }
.send-btn:hover { background-color: var(--primary-hover); transform: scale(1.05); }
.message-banner { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem; border-radius: 0.75rem; margin-bottom: 1.5rem; }
.message-banner.success { background-color: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.message-banner.info { background-color: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; }
.message-banner svg { width: 24px; height: 24px; flex-shrink: 0; }
.message-banner strong { display: block; margin-bottom: 0.25rem; font-weight: 600; }

/* === 7. HALAMAN ADMIN (DASHBOARD, BALAS TIKET, KATEGORI) === */
/* Header Halaman Admin */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
.page-title { font-size: 1.5rem; font-weight: 600; }
.back-link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-medium); text-decoration: none; font-weight: 500; padding: 0.625rem 1.25rem; border-radius: 0.5rem; background-color: white; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); transition: all 0.2s ease; }
.back-link:hover { background-color: var(--secondary-color); color: var(--primary-color); border-color: var(--primary-color); }
/* Dashboard: Kontrol */
.dashboard-controls { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; background-color: white; padding: 1rem; border-radius: 1rem; border: 1px solid var(--border-color); box-shadow: var(--shadow-md); }
.dashboard-controls input[type="text"], .dashboard-controls select { height: 44px; box-sizing: border-box; border: 1px solid var(--border-color); border-radius: 0.5rem; background-color: #f9fafb; padding: 0 1rem; transition: all 0.2s ease; }
.dashboard-controls input[type="text"]:focus, .dashboard-controls select:focus { background-color: white; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); outline: none; }
.search-form { position: relative; flex-grow: 1; min-width: 250px; }
.search-form svg { position: absolute; left: 0.875rem; top: 50%; transform: translateY(-50%); color: var(--text-light); width: 18px; height: 18px; }
.search-form input { width: 100%; padding-left: 2.75rem; border-radius: 99px; }
.filters { display: flex; align-items: center; gap: 0.75rem; }
.filters .btn.btn-secondary { height: 44px; padding: 0 1.25rem; }
.filters .btn span { display: none; }
/* Dashboard: Tabel */
.table-wrapper { overflow-x: auto; background: white; border-radius: 1rem; box-shadow: var(--shadow-md); }
.admin-table { width: 100%; }
.admin-table td, .admin-table th { padding: 1rem 1.5rem; text-align: left; border-bottom: 1px solid var(--border-color); }
.admin-table th { font-weight: 600; color: var(--text-light); }
.admin-table tr:last-child td { border-bottom: none; }
.status-badge-table { display: inline-block; padding: 0.25rem 0.625rem; border-radius: 99px; font-size: 0.75rem; font-weight: 500; text-transform: capitalize; }
/* --- KODE BARU (BERLAKU UNTUK SEMUA) --- */
.status-badge-table.status-baru,
.status-badge.status-baru { background-color: #fef3c7; color: #b45309; }

.status-badge-table.status-dibalas-admin,
.status-badge.status-dibalas-admin { background-color: #dbeafe; color: #2563eb; }

.status-badge-table.status-dibalas-wali,
.status-badge.status-dibalas-wali { background-color: #d1fae5; color: #059669; }

.status-badge-table.status-ditutup,
.status-badge.status-ditutup { background-color: #e5e7eb; color: #4b5563; }
.action-cell { text-align: right; white-space: nowrap; }
.action-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 0.5rem; border: none; cursor: pointer; transition: all 0.2s ease; margin-left: 0.25rem; }
.action-btn svg { width: 16px; height: 16px; }
.action-btn.btn-view { background-color: #eff6ff; color: #3b82f6; }
.action-btn.btn-view:hover { background-color: #dbeafe; }
.action-btn.btn-delete { background-color: #fee2e2; color: #ef4444; }
.action-btn.btn-delete:hover { background-color: #fecaca; }
/* Dashboard: Pagination */
/* GAYA UNTUK PAGINATION BARU YANG CERDAS */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Agar responsif di HP */
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 0.625rem 1rem;
    min-width: 40px; /* Lebar minimal untuk nomor halaman */
    box-sizing: border-box;
    text-align: center;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-medium);
    background-color: white;
    border: 1px solid var(--border-color);
    font-weight: 500;
    transition: all 0.2s ease;
}
.pagination a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.pagination a.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    cursor: default;
    box-shadow: var(--shadow-sm);
}
.pagination span.disabled {
    color: #d1d5db;
    cursor: not-allowed;
}
.pagination span.ellipsis {
    border: none;
    background: none;
    padding: 0.625rem 0.25rem;
}
/* Halaman Balas Tiket (Admin) */
.ticket-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; align-items: flex-start; }
.card-title { font-size: 1.25rem; font-weight: 600; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 0.5rem; }
.status-update-form select { height: 46px; box-sizing: border-box; padding: 0.75rem 1rem; }
.status-update-form .btn.btn-secondary { width: 46px; height: 46px; padding: 0; }
.sidebar-info-section { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border-color); }
.sidebar-title { font-size: 0.875rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.info-item { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.875rem; }
.info-item svg { width: 16px; height: 16px; color: var(--text-light); margin-top: 3px; flex-shrink: 0; }
.info-label { display: block; font-size: 0.8125rem; color: var(--text-light); }
.info-value { display: block; font-size: 0.9375rem; font-weight: 500; color: var(--text-dark); word-break: break-all; }

/* === 8. RESPONSIVE DESIGN BREAKPOINTS === */
@media (max-width: 1024px) {
    .ticket-layout { grid-template-columns: 1fr; }
    .info-sidebar { grid-row-start: 1; }
}
@media (max-width: 768px) {
    .card { padding: 1.5rem; }
    header .container { flex-direction: row; }
    .desktop-nav { display: none; }
    .hamburger-btn { display: block; }
    .action-list { max-width: 100%; }
    .action-card-slim { flex-direction: column; text-align: center; padding: 2rem 1.5rem; }
    .card-action { margin-left: 0; margin-top: 1rem; width: 100%; }
    .card-action .btn {justify-content: center; }
    .laporan-item { grid-template-columns: 1fr auto; gap: 0.5rem; }
    .laporan-item .status { grid-column: 1 / 2; }
    .laporan-item .title { grid-column: 1 / 2; margin-top: 0.25rem; }
    .laporan-item .action { grid-column: 2 / 3; grid-row: 1 / 3; display: flex; align-items: center; }
    .filters .btn span { display: none; }
}

/* ========================================================== */
/* KUNCI PERBAIKAN: MEDIA QUERY UNTUK LAYAR LEBAR (LAPTOP) */
/* ========================================================== */
@media (min-width: 768px) {
    /* Ubah grid menjadi 2 kolom */
    .action-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    /* Ubah layout kartu menjadi horizontal */
    .action-card-slim {
        flex-direction: row;
        text-align: left; /* Teks rata kiri */
        align-items: center;
        padding: 2.5rem;
    }

    .card-description-slim {
        margin-bottom: 0; /* Hapus margin bawah deskripsi */
    }
    
    .card-action {
        margin-left: 2rem; /* Beri jarak antara konten dan tombol */
        flex-shrink: 0; /* Mencegah tombol mengecil */
    }

    /* Tombol tidak lagi full-width di desktop */
    .card-action .btn {
        width: auto;
    }
}

/* === DESAIN ULANG HALAMAN CEK TIKET === */

/* Wrapper utama untuk memusatkan konten secara vertikal & horizontal */
.search-hero-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh; /* Minimal 50% tinggi layar */
    padding: 2rem 0;
}

/* Kartu pencarian utama */
.search-box-card {
    width: 100%;
    max-width: 600px; /* Batasi lebar agar fokus */
    background: white;
    padding: 3rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

/* Ikon besar di atas judul */
.search-icon-wrapper {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: linear-gradient(to bottom right, #eff6ff, #e0e7ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}
.search-icon-wrapper svg {
    width: 32px;
    height: 32px;
}

/* Judul dan subjudul */
.search-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
}
.search-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    margin: 0 0 2rem 0;
}

/* Form pencarian inline */
.search-form-inline {
    display: flex;
    gap: 0.75rem;
}

/* Grup input dengan ikon di dalamnya */
.input-group-search {
    position: relative;
    flex-grow: 1; /* Mengisi ruang yang tersedia */
}
.input-group-search .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    width: 20px;
}
.input-group-search input {
    width: 100%;
    height: 52px; /* Dibuat lebih besar dan tinggi */
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    padding: 0 1rem 0 3rem; /* Padding untuk ikon */
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.2s ease;
}
.input-group-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Tombol pencarian */
.btn-search {
    height: 52px; /* Sama tinggi dengan input */
    flex-shrink: 0; /* Mencegah tombol mengecil */
}
.btn-search span {
    display: none; /* Sembunyikan teks di HP */
}
/* Tampilkan teks di layar lebih besar */
@media (min-width: 640px) {
    .btn-search span {
        display: inline-block;
        margin-left: 0.5rem;
    }
}


/* Link aksi alternatif */
.alternative-action {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}
.alternative-action a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}
.alternative-action a:hover {
    text-decoration: underline;
}

/* === DESAIN ULANG HALAMAN LACAK === */

/* Pesan error di bawah form pencarian */
.error-message-inline {
    color: #b91c1c; /* Merah tua */
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 1rem;
}

/* Kartu untuk menampilkan hasil */
.result-card {
    margin-top: 0; /* Hapus margin atas default karena sudah ada jarak dari hero */
}
.result-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.result-title strong {
    color: var(--primary-color);
}

/* Tampilan jika hasil tidak ditemukan (Empty State) */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    background-color: #f9fafb;
    border-radius: 0.75rem;
}
.empty-state svg {
    width: 48px;
    height: 48px;
    color: var(--text-light);
    margin: 0 auto 1rem;
}
.empty-state .font-semibold {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.empty-state p {
    color: var(--text-light);
    margin: 0;
}

/* Penyesuaian kecil untuk daftar laporan di halaman ini */
.laporan-item .status .status-badge-table {
    width: 100%;
    text-align: center;
}

/* ... (di dalam CSS halaman Cek Tiket / Lacak) ... */

/* GANTI ATURAN INI (jika ada) ATAU TAMBAHKAN */
.input-group-search {
    position: relative;
    flex-grow: 1; /* Biarkan input mengisi ruang */
    display: flex; /* Tambahkan ini agar input di dalamnya bisa 100% */
}

/* GANTI ATURAN INI (jika ada) ATAU TAMBAHKAN */
.input-group-search input {
    width: 100%; /* Input mengisi 100% dari pembungkusnya */
    height: 52px;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    padding: 0 1rem 0 3rem;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* === DESAIN ULANG FORM PENCARIAN (TOMBOL DI BAWAH) === */

/* Wadah form utama */
.search-form-stacked {
    display: flex;
    flex-direction: column; /* Menumpuk elemen secara vertikal */
    gap: 1rem; /* Jarak antara input dan tombol */
}

/* Penyesuaian untuk input group agar full-width */
.search-form-stacked .input-group-search {
    width: 100%;
}

/* Pastikan tombol di dalam form ini selalu full-width */
.search-form-stacked .btn {
    width: 100%;
}

/* Penyesuaian kecil untuk input dan tombol agar terlihat serasi */
.search-form-stacked input,
.search-form-stacked .btn {
    height: 52px; /* Pastikan tingginya sama */
    font-size: 1rem;
}

/* Teks di dalam tombol sekarang bisa selalu terlihat */
.search-form-stacked .btn span {
    display: inline-block;
    margin-left: 0.5rem;
}

/* === 9. LAYOUT DASHBOARD ADMIN BARU (VERSI ELEGAN) === */
.admin-body {
    display: flex;
    background-color: #f8fafc; /* Latar belakang lebih cerah */
}

/* Sidebar Navigasi yang Disempurnakan */
.admin-sidebar {
    width: 250px; /* Sedikit lebih ramping */
    background: #1f2937; /* Abu-abu sangat gelap */
    color: #9ca3af;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    flex-shrink: 0;
    border-right: 1px solid var(--border-color);
    transition: width 0.3s ease;
}
.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid #374151;
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 600;
}
.sidebar-logo-img {
    width: 32px;
    height: 32px;
}

.sidebar-nav {
    flex-grow: 1;
    padding: 1rem;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    border-radius: 0.5rem;
    color: #d1d5db; /* Teks lebih cerah */
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}
.sidebar-nav a:hover {
    background-color: #374151; /* Hover lebih lembut */
    color: white;
}
.sidebar-nav a.active {
    background: var(--primary-gradient); /* Gradien untuk link aktif */
    color: white;
    box-shadow: var(--shadow-md);
}
.sidebar-nav a svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid #374151;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}
.user-info {
    display: flex;
    flex-direction: column;
}
.user-name {
    color: white;
    font-weight: 500;
    line-height: 1.2;
}
.user-role {
    font-size: 0.75rem;
    color: #9ca3af;
}
.logout-btn {
    color: #9ca3af;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}
.logout-btn:hover {
    background-color: #374151;
    color: white;
}


/* Konten Utama Admin (JARAK DIPERBAIKI) */
.admin-main-content {
    flex-grow: 1;
    margin-left: 250px; /* Lebar yang sama dengan sidebar */
    width: calc(100% - 250px); /* Kalkulasi lebar */
}
.admin-container {
    padding: 1.5rem; /* Padding internal konten */
    max-width: 100%;
}

/* Header Konten Baru */
.admin-content-header {
    background: white;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.content-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}
.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.breadcrumb span {
    color: var(--text-light);
}
.breadcrumb svg {
    width: 16px;
    height: 16px;
    color: var(--text-light);
}

/* Responsive Sidebar (Disederhanakan) */
@media (max-width: 1024px) {
    .admin-sidebar {
        /* Untuk sekarang, kita sembunyikan saja di HP */
        display: none;
    }
    .admin-main-content {
        margin-left: 0;
        width: 100%;
    }
}

.dashboard-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.6rem;
    margin-bottom: 1rem;
}
.stat-card {
    background: white; padding: 1.1rem; border-radius: 1rem; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    display: flex; align-items: center; gap: 1rem;
}
.stat-card .icon {
    width: 48px; height: 48px; border-radius: 99px;
    display: flex; align-items: center; justify-content: center;
}
.stat-card .icon.blue { background: #dbeafe; color: #2563eb; }
.stat-card .icon.green { background: #d1fae5; color: #059669; }
.stat-card .icon.gray { background: #e5e7eb; color: #4b5563; }
.stat-card .value { font-size: 2rem; font-weight: 700; }
.stat-card .label { font-size: 0.875rem; color: var(--text-light); }

/* === 10. GAYA HALAMAN MANAJEMEN SISWA (MODAL, DLL) === */

/* Penyesuaian header halaman */
.header-actions {
    display: flex;
    gap: 0.75rem;
}
.header-actions .btn, .header-actions .btn-secondary {
    padding: 0.625rem 1.25rem;
}
.page-subtitle {
    margin-top: 0.25rem;
    font-size: 0.9375rem;
    color: var(--text-light);
}

/* Gaya Modal (Pop-up) */
.modal-overlay {
    display: none; /* Awalnya tersembunyi */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    backdrop-filter: blur(5px);
}
.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    animation: modal-fade-in 0.3s ease-out;
}
@keyframes modal-fade-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 1.5rem;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
.modal-actions .btn, .modal-actions .btn-secondary {
    width: auto; /* Tombol di modal tidak full-width */
}

/* Gaya untuk Modal Impor */
.import-instructions {
    background-color: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-medium);
}
.import-instructions ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}
.import-instructions code {
    background-color: #e5e7eb;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: monospace;
}
.input-file {
    font-size: 0.875rem;
    color: var(--text-medium);
}
/* Style untuk message banner error */
.message-banner.error {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* === 11. GAYA HALAMAN MANAJEMEN KATEGORI (ACCORDION) === */

.accordion-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}
.accordion-item.active {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background-color: white;
    border: none;
    cursor: pointer;
    border-radius: 0.75rem;
    font-family: var(--font-family);
    transition: background-color 0.3s ease;
}
.accordion-item.active .accordion-header {
    background-color: #f9fafb;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.accordion-header .header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark);
}
.accordion-header .header-content svg {
    color: var(--primary-color);
}
.accordion-header .header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.chevron-icon {
    color: var(--text-light);
    transition: transform 0.3s ease;
}
.accordion-item.active .chevron-icon {
    transform: rotate(180deg);
}

.action-btn-cat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
}
.action-btn-cat.btn-delete { color: var(--text-light); }
.action-btn-cat.btn-delete:hover { background-color: #fee2e2; color: #ef4444; }

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}
.subcategory-list {
    list-style: none;
    margin: 0;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
}
.subcategory-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.subcategory-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.action-btn-cat.btn-delete-sub {
    width: 24px;
    height: 24px;
    color: var(--text-light);
}
.action-btn-cat.btn-delete-sub:hover {
    background-color: #fee2e2;
    color: #ef4444;
}

/* Indikator "Sudah Dibaca" di Dashboard Admin */
/* GANTI BLOK INI */
/* Indikator "Sudah Dibaca" sebagai Badge Kecil */
.read-indicator-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem; /* Dibuat sangat kecil */
    margin-left: 0.5rem;
    border-radius: 99px;
    font-size: 0.6875rem; /* 11px */
    font-weight: 500;
    line-height: 1.5;
    background-color: #d1fae5; /* Hijau muda */
    color: #059669; /* Hijau tua */
    vertical-align: middle; /* Agar sejajar dengan badge status */
}
.read-indicator-badge svg {
    width: 12px;
    height: 12px;
}

/* === 12. DESAIN ULANG HALAMAN MANAJEMEN SISWA === */

/* Header Kartu yang Fleksibel */
.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.card-title-large {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}
.data-count {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}
.header-actions-flex {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Form Pencarian di dalam Header Kartu */
.search-form-table {
    position: relative;
}
.search-form-table svg {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    width: 18px;
}
.search-form-table input {
    height: 44px;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    padding: 0 1rem 0 2.75rem;
    width: 250px; /* Lebar default */
    transition: all 0.2s ease;
}
.search-form-table input:focus {
    width: 300px; /* Melebar saat fokus */
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    outline: none;
}

/* Tabel yang Lebih Elegan */
.elegant-table {
    font-size: 0.9375rem; /* Ukuran font lebih kecil */
}
.elegant-table th {
    font-size: 0.8125rem; /* Ukuran font header tabel lebih kecil */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.5rem;
}
.elegant-table td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
}
.elegant-table .sub-text {
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.wali-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Agar sejajar atas */
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.mt-6 { margin-top: 1.5rem; }


/* === 13. DESAIN ULANG DASHBOARD WALI (RESPONSIVE FIX) === */

/* Latar belakang abu-abu lembut */
.wali-dashboard-bg { background: #f8fafc; }
.wali-container { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }
.wali-dashboard-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 2rem; }
.wali-laporan-list { display: grid; gap: 1.5rem; }

/* Desain Kartu Laporan yang sekarang adalah Link */
.laporan-card-link {
    display: grid;
    grid-template-columns: 60px 1fr auto; /* No | Info | Aksi */
    align-items: center;
    gap: 1.5rem;
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}
.laporan-card-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

/* Kolom Nomor Urut */
.laporan-card-nomor {
    font-size: 2rem;
    font-weight: 700;
    color: #cbd5e1; /* Warna lebih lembut */
    text-align: center;
    transition: color 0.3s ease;
}
.laporan-card-link:hover .laporan-card-nomor {
    color: var(--primary-color);
}

/* Kolom Info Tengah */
.laporan-card-info { line-height: 1.4; }
.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.laporan-card-tanggal { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; color: var(--text-light); }
.laporan-card-tanggal svg { width: 14px; height: 14px; }
.laporan-card-judul { font-size: 1.125rem; font-weight: 600; margin: 0; color: var(--text-dark); }
.laporan-card-id { font-size: 0.875rem; color: var(--text-light); margin: 0.25rem 0 0 0; font-family: monospace; }

/* Kolom Aksi Kanan */
.laporan-card-aksi {
    padding-left: 1.5rem;
    border-left: 1px solid var(--border-color);
    color: var(--text-light);
    transition: all 0.3s ease;
}
.laporan-card-aksi svg { transition: transform 0.3s ease; }
.laporan-card-link:hover .laporan-card-aksi {
    color: var(--primary-color);
}
.laporan-card-link:hover .laporan-card-aksi svg {
    transform: translateX(5px);
}

/* === RESPONSIVE UNTUK HP (PERBAIKAN UTAMA) === */
@media (max-width: 768px) {
    .laporan-card-link {
        grid-template-columns: 1fr; /* Hanya 1 kolom */
        gap: 0.5rem;
        padding: 1.25rem;
        position: relative; /* Diperlukan untuk panah absolut */
    }
    .laporan-card-nomor {
        display: none; /* Nomor tetap disembunyikan di HP untuk kebersihan */
    }
    .info-header {
        flex-direction: column; /* Tumpuk tanggal & status */
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    .laporan-card-aksi {
        /* Tombol panah sekarang berada di pojok kanan atas */
        position: absolute;
        top: 1.25rem;
        right: 1.25rem;
        border: none;
        padding: 0;
    }
}