/* ========================================================
   GAYA TAMPILAN (CSS) - KELURAHAN BOJONG NANGKA
   ======================================================== */
:root {
    --primary: #007bff; --success: #28a745; --warning: #ffc107; --danger: #dc3545; --dark: #343a40; --light: #f8f9fa;
}
body { font-family: 'Segoe UI', Arial, sans-serif; margin: 0; padding: 0; background-color: #f1f3f6; color: #333; }
.hidden { display: none !important; }

/* KARTU LOGIN & DAFTAR */
.auth-wrapper { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    min-height: 100vh; 
    background: linear-gradient(135deg, #f3f4f7 0%, #e2e5ed 100%);
}

.auth-card { 
    background: #ffffff; 
    padding: 40px 35px; 
    border-radius: 16px; 
    box-shadow: 0 10px 30px rgba(111, 66, 193, 0.08), 0 1px 3px rgba(0,0,0,0.02); 
    width: 100%; 
    max-width: 420px; 
    box-sizing: border-box;
}

/* Identitas Kelurahan di atas Form */
.auth-logo-container {
    text-align: center;
    margin-bottom: 25px;
}

.auth-logo-img {
    height: 65px;
    width: auto;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.auth-logo-container h2 {
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    color: #2d3748;
    letter-spacing: 0.5px;
}

.auth-logo-container p {
    font-size: 13px;
    margin: 4px 0 0 0;
    color: #718096;
}

/* Pilihan Tab */
.auth-tabs { 
    display: flex; 
    background: #f1f3f9;
    padding: 5px;
    border-radius: 8px;
    margin-bottom: 25px; 
}

.tab-btn { 
    flex: 1; 
    padding: 10px; 
    background: none; 
    border: none; 
    font-weight: 600; 
    cursor: pointer; 
    color: #718096; 
    font-size: 13px; 
    border-radius: 6px;
    transition: all 0.2s ease;
}

.tab-btn.active { 
    color: #6f42c1; 
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* FORM INPUT MODERN */
.form-group { margin-bottom: 18px; }
.form-group label { 
    display: block; 
    margin-bottom: 6px; 
    font-weight: 600; 
    font-size: 13px; 
    color: #4a5568;
}

.form-group input, .form-group select, .form-group textarea { 
    width: 100%; 
    padding: 12px 14px; 
    border: 1.5px solid #e2e8f0; 
    border-radius: 8px; 
    box-sizing: border-box; 
    font-size: 14px;
    background-color: #f8fafc;
    transition: all 0.2s ease;
    color: #333;
}

/* Efek Fokus Menyala saat Input Diklik */
.form-group input:focus { 
    outline: none;
    border-color: #6f42c1;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.15);
}

/* TOMBOL DENGAN GRADASI WARNA */
.btn-auth { 
    width: 100%; 
    padding: 13px; 
    color: white; 
    border: none; 
    border-radius: 8px; 
    font-weight: bold; 
    font-size: 14px;
    cursor: pointer; 
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.btn-auth:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.btn-purple-gradient { background: linear-gradient(135deg, #7952b3, #6f42c1); }
.btn-dark-gradient { background: linear-gradient(135deg, #495057, #343a40); }
.btn-success-gradient { background: linear-gradient(135deg, #2ea44f, #28a745); }

.auth-footer { 
    text-align: center; 
    margin-top: 20px; 
    font-size: 13px; 
    color: #718096;
}

.auth-footer a {
    color: #6f42c1;
    text-decoration: none;
    font-weight: 600;
}
.auth-footer a:hover {
    text-decoration: underline;
}
/* NAVIGATION BAR */
header { background: #6f42c1; /* <-- Ganti bagian ini ke kode warna ungu murni / purple */
    color: white; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 30px;}
header.admin-header { background: var(--dark); }
header .logo { font-size: 20px; font-weight: bold; }
header nav ul { list-style: none; display: flex; margin: 0; padding: 0; gap: 20px; }
header nav a { color: white; text-decoration: none; font-weight: 500; cursor: pointer; padding: 5px 10px; border-radius: 4px; }
header nav a.active, header nav a:hover { background: rgba(255,255,255,0.2); }
.logout-area a { color: white; text-decoration: none; font-weight: bold; cursor: pointer; }
header .logo { 
    font-size: 20px; 
    font-weight: bold; 
    display: flex;         /* Membuat teks dan logo sejajar */
    align-items: center;   /* Membuat teks dan logo pas di tengah secara vertikal */
    gap: 10px;             /* Memberikan jarak antara logo dan teks */
}

/* Tambahkan class baru ini di bawahnya untuk mengatur ukuran gambar logo */
.logo-img {
    height: 40px;          /* Mengatur tinggi logo agar proporsional dengan header */
    width: auto;           /* Lebar akan menyesuaikan otomatis agar gambar tidak gepeng */
}

/* AREA KONTEN */
main { padding: 30px; max-width: 1200px; margin: auto; }
.card { background: white; padding: 20px; border-radius: 6px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); margin-bottom: 20px; }
.hero { background: linear-gradient(135deg, #e0eafc, #cfdef3); padding: 40px; border-radius: 8px; text-align: center; margin-bottom: 30px; }

/* TABEL */
.table-responsive { background: white; border-radius: 6px; overflow-x: auto; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
table { width: 100%; border-collapse: collapse; text-align: left; }
table th, table td { padding: 12px; border-bottom: 1px solid #ddd; }
table th { background-color: #f1f3f6; }

/* STATUS BADGES & STATS */
.status { padding: 5px 10px; border-radius: 4px; font-size: 12px; font-weight: bold; display: inline-block; }
.status.pending { background: #ffeeba; color: #856404; }
.status.selesai { background: #d4edda; color: #155724; }
.status.ditolak { background: #f8d7da; color: #721c24; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.stat-card { color: white; padding: 25px; border-radius: 8px; text-align: center; }
.stat-card h3 { margin: 0; font-size: 36px; }
.stat-card.blue { background: var(--primary); }
.stat-card.yellow { background: var(--warning); color: #333; }
.stat-card.green { background: var(--success); }
.stat-card.red { background: var(--danger); }

.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.news-card { background: white; padding: 20px; border-radius: 6px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); border-left: 4px solid var(--primary); }

.btn-action-approve { background: var(--success); color: white; border: none; padding: 5px 10px; border-radius: 3px; cursor: pointer; }
.btn-action-reject { background: var(--danger); color: white; border: none; padding: 5px 10px; border-radius: 3px; cursor: pointer; }

/* ========================================================
   GAYA TAMPILAN SUBMENU SYARAT (ACCORDION)
   ======================================================== */
.syarat-submenu {
    background: white;
    margin-bottom: 12px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
    border-left: 4px solid #6f42c1; /* Warna ungu serasi dengan header */
}

.syarat-submenu summary {
    padding: 15px 20px;
    font-weight: 600;
    cursor: pointer;
    background: #ffffff;
    outline: none;
    user-select: none;
    transition: background 0.2s ease;
}

.syarat-submenu summary:hover {
    background: #f1f3f6; /* Efek abu-abu tipis saat kursor di atas menu */
}

.syarat-submenu[open] summary {
    background: #f1f3f6;
    border-bottom: 1px solid #ddd;
}

.syarat-konten {
    padding: 15px 25px;
    background: #fefefe;
    line-height: 1.6;
}

.syarat-konten ul {
    margin: 0;
    padding-left: 20px;
}

.syarat-konten li {
    margin-bottom: 8px;
    color: #444;
}

/* ========================================================
   GAYA KHUSUS DASHBOARD WARGA & HEROPAGE
   ======================================================== */

/* Hero Banner Beranda Warga */
/* Hero Banner Beranda Warga */
.hero-banner-warga {
    background: linear-gradient(135deg, #52279b 0%, #6f42c1 50%, #8c52ff 100%) !important;
    color: #ffffff !important;
    padding: 35px 25px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(111, 66, 193, 0.2);
}

.hero-banner-warga h1 {
    margin: 12px 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    color: #ffffff !important;
}

.hero-banner-warga p {
    margin: 0;
    opacity: 0.9;
    font-size: 15px;
    line-height: 1.6;
    color: #ffffff !important;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Kartu Akses Layanan Cepat */
.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
}

.shortcut-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.25s ease;
}

.shortcut-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.shortcut-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.shortcut-title {
    display: block;
    color: var(--dark);
    font-size: 15px;
    font-weight: 700;
}

.shortcut-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* Berita Terkini Grid */
.news-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.news-card-item {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.news-card-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.news-card-bar {
    height: 6px;
    background: var(--primary);
}

.news-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.news-badge {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
}

.news-title {
    margin: 0 0 10px 0;
    color: var(--dark);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.news-excerpt {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    flex-grow: 1;
}

/* ========================================================
   FIX TEKS & KONTRAS DI MENU BERANDA WARGA
   ======================================================== */

/* 1. Judul Seksi (Akses Layanan Cepat & Pengumuman) */
#v-w-beranda h3 {
    color: #1e1b4b !important; /* Warna ungu tua gelap tajam */
}

/* 2. Kartu Shortcut Aksi Cepat */
.shortcut-card .shortcut-title {
    color: #1e1b4b !important; /* Judul shortcut hitam/ungu tua */
    font-weight: 700;
}

.shortcut-card .shortcut-desc {
    color: #4b5563 !important; /* Deskripsi shortcut abu-abu gelap */
}

/* 3. Kartu Pengumuman / Berita Terkini */
.news-card-item .news-title {
    color: #111827 !important; /* Judul berita hitam gelap jelas */
    font-weight: 700;
}

.news-card-item .news-excerpt {
    color: #374151 !important; /* Isi ringkasan berita abu-abu gelap */
}

/* Badges Pengumuman & Teks Diperbarui */
.news-badge {
    background: #f3e8ff !important;
    color: #6b21a8 !important;
}

#v-w-beranda span {
    color: #6f42c1; /* Warna teks penunjuk waktu/keterangan */
}

/* ========================================================
   FIX TEKS HERO SECTION (BERANDA WARGA)
   ======================================================== */

/* Mengubah Judul Utama "Selamat Datang..." */
#v-w-beranda .hero h1,
#v-w-beranda .hero-title,
.hero h1 {
    color: #1e1b4b !important; /* Warna ungu sangat gelap/hampir hitam */
    font-weight: 800;
}

/* Mengubah Teks Deskripsi "Urus surat keterangan..." */
#v-w-beranda .hero p,
#v-w-beranda .hero-subtitle,
.hero p {
    color: #374151 !important; /* Warna abu-abu gelap yang kontras */
    font-weight: 500;
}

/* Mengubah Kapsul "PORTAL LAYANAN RESMI" jika warnanya pudar */
.badge-portal,
.hero .badge {
    background: #e9d8fd !important;
    color: #5521b5 !important;
    font-weight: 600;
}

/* ========================================================
   GAYA TAMPILAN MENU PROFIL (VISI, MISI, & STRUKTUR)
   ======================================================== */

.profil-header {
    margin-bottom: 25px;
}

.profil-header h2 {
    color: #1e1b4b;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
}

.profil-header p {
    color: #6b7280;
    margin: 0;
    font-size: 14px;
}

/* Grid Visi Misi */
.visi-misi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.card-visi, .card-misi {
    background: #ffffff;
    border-radius: 14px;
    padding: 25px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.05);
    border-top: 5px solid #6f42c1; /* Aksensuasi warna ungu utama */
}

.icon-box {
    font-size: 32px;
    margin-bottom: 10px;
}

.card-visi h3, .card-misi h3 {
    color: #52279b;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 700;
}

.card-visi p {
    color: #374151;
    font-style: italic;
    line-height: 1.6;
    font-size: 14px;
}

.card-misi ul {
    margin: 0;
    padding-left: 20px;
    color: #374151;
    line-height: 1.7;
    font-size: 14px;
}

.card-misi li {
    margin-bottom: 8px;
}

/* Gambar Struktur Organisasi */
.struktur-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 25px;
    border: 1px solid #e5e7eb;
}

.struktur-card h3 {
    color: #1e1b4b;
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 18px;
}

.struktur-card .text-muted {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 20px;
}

.image-wrapper {
    text-align: center;
    background: #f9fafb;
    padding: 15px;
    border-radius: 10px;
    border: 1px dashed #d1d5db;
}

.img-struktur {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

#kertas-surat .logo-box img {
    width: 75px !important;
    max-width: 75px !important;
    height: auto !important;
}