/* Import Google Fonts - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-green: #4dab25; /* Hijau utama */
    --dark-green: #024d52;   /* Hijau toska gelap */
    --light-grey: #f4f7f6;   /* Background abu-abu muda */
    --text-dark: #333;       /* Warna teks gelap */
    --text-medium: #555;     /* Warna teks sedang */
    --text-light: #777;      /* Warna teks ringan */
    --border-color: #e0e0e0; /* Warna border */
    --card-bg: #ffffff;      /* Background kartu */
    --shadow-light: 0 4px 10px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 8px 20px rgba(0, 0, 0, 0.1);

    /* Warna tambahan untuk ikon/kartu */
    --blue-gradient-start: #5b9bd8;
    --blue-gradient-end: #3471c6;
    --purple-gradient-start: #a367e0;
    --purple-gradient-end: #7b4397;
    --orange-gradient-start: #ffb74d;
    --orange-gradient-end: #ffa000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--light-grey);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Section */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--card-bg);
    box-shadow: var(--shadow-light);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
        font-size: 24px;
    color: #333;
    margin-right: 15px;
    text-decoration: none;
}
.header-left .back-btn {
    font-size: 24px;
    color: #333;
    margin-right: 15px;
    text-decoration: none;
}
.profile-icon i {
    font-size: 40px;
    color: var(--primary-green);
}

.user-info p {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
}

.user-info #username {
    font-weight: 600;
    color: var(--dark-green);
}

.role-text {
    font-size: 12px;
    color: var(--text-medium);
    display: flex;
    align-items: center;
    gap: 5px;
}

.role-text .verified-icon {
    font-size: 10px;
    color: var(--primary-green); /* Warna hijau untuk icon verified */
}

.header-right i {
    font-size: 24px;
    color: var(--text-medium);
    margin-left: 15px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.header-right i:hover {
    color: var(--primary-green);
}

.header-right a {
    color: inherit; /* Pastikan link menggunakan warna icon */
    text-decoration: none;
}

/* Main Content Area */
.main-content-area {
    flex-grow: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 90px; /* Space for fixed navigation */
}

/* Hero Card (Kader Overview) */
.hero-card {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow-medium);
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
}

.hero-card h2 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 15px;
    opacity: 0.8;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.overview-item h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.overview-item p {
    font-size: 13px;
    opacity: 0.9;
}

.action-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    align-self: flex-start;
    margin-top: auto;
}

.action-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: white;
}


/* Function Cards */
.function-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* Disesuaikan untuk 3-4 kolom */
    gap: 15px;
    text-align: center;
}

.function-card {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.function-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.function-card .card-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    color: white;
    margin-bottom: 10px;
}

/* Warna untuk ikon kartu fungsi */
.function-card .card-icon-wrapper.green {
    background: linear-gradient(45deg, #7ad85b, var(--primary-green));
}
.function-card .card-icon-wrapper.blue {
    background: linear-gradient(45deg, var(--blue-gradient-start), var(--blue-gradient-end));
}
.function-card .card-icon-wrapper.purple {
    background: linear-gradient(45deg, var(--purple-gradient-start), var(--purple-gradient-end));
}
.function-card .card-icon-wrapper.orange {
    background: linear-gradient(45deg, var(--orange-gradient-start), var(--orange-gradient-end));
}
/* Tambahkan lebih banyak warna sesuai kebutuhan */


.function-card p {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0;
}

.function-card .icon-link {
    text-decoration: none;
    color: inherit;
}


/* Bottom Navigation (nav1) */
.nav1 {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    overflow: hidden;
}

.nav-content1 {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    list-style: none;
}

.nav-list1 {
    flex: 1;
    text-align: center;
}

.link-item1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    color: var(--text-medium);
    text-decoration: none;
    transition: color 0.3s ease;
}

.link-item1:hover {
    color: var(--primary-green);
}

.link-item1.active1 {
    color: var(--primary-green);
    font-weight: 600;
}

.link-icon1 {
    font-size: 22px;
    margin-bottom: 4px;
}

.link-text1 {
    font-size: 11px;
    white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-header {
        padding: 10px 15px;
    }
    .profile-icon i {
        font-size: 35px;
    }
    .user-info p {
        font-size: 14px;
    }
    .role-text {
        font-size: 11px;
    }
    .header-right i {
        font-size: 22px;
        margin-left: 10px;
    }
    .main-content-area {
        padding: 15px;
        gap: 15px;
    }
    .hero-card {
        padding: 20px;
        min-height: 160px;
    }
    .hero-card h2 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    .overview-item h3 {
        font-size: 28px;
    }
    .overview-item p {
        font-size: 12px;
    }
    .action-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
    .function-cards-container {
        grid-template-columns: repeat(2, 1fr); /* Force 2 columns on smaller screens */
        gap: 10px;
    }
    .function-card {
        padding: 15px;
    }
    .function-card .card-icon-wrapper {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    .function-card p {
        font-size: 13px;
    }
    .nav-content1 {
        padding: 8px 0;
    }
    .link-icon1 {
        font-size: 20px;
    }
    .link-text1 {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .main-header {
        border-radius: 0;
    }
    .main-content-area {
        padding: 10px;
        gap: 10px;
    }
    .hero-card {
        border-radius: 10px;
        padding: 18px;
    }
    .nav1 {
        border-radius: 0;
    }
}
/* --- Styling Tambahan KHUSUS untuk Halaman Lapor Ibu Hamil --- */

/* Mengubah background area utama hanya di halaman yang memiliki class 'lapor-bumil-page' */
.main-content-area.lapor-bumil-page {
    background-color: #f0f2f5; /* Contoh warna abu-abu muda */
    padding: 25px; /* Sedikit padding agar tidak terlalu mepet */
    min-height: calc(100vh - 100px); /* Menyesuaikan tinggi halaman */
    /* Pastikan tinggi ini tidak mengganggu layout di halaman dashboard */
}

/* Mengubah background untuk kartu form utama */
.form-card { /* Class baru untuk kartu form */
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px; /* Lebih membulat */
    box-shadow: 0 8px 20px rgba(0,0,0,0.1); /* Shadow yang lebih lembut */
    margin-bottom: 20px;
    max-width: 800px; /* Batasi lebar form agar tidak terlalu lebar di layar besar */
    margin-left: auto; /* Pusatkan form */
    margin-right: auto; /* Pusatkan form */
}

/* Header di dalam form card */
.form-card h2 {
    color: #34495e; /* Warna judul yang lebih gelap */
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

/* Pesan sukses/error */
.form-card .alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}
.form-card .alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.form-card .alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Gaya untuk setiap group input */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
    display: block; /* Agar label berada di baris sendiri */
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 1rem;
    color: #495057;
    box-sizing: border-box; /* Agar padding tidak menambah lebar */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="date"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.form-group input[type="file"] {
    padding: 5px; /* Sesuaikan padding untuk input file */
    border: 1px solid #ced4da;
    border-radius: 8px;
    background-color: #fff; /* Pastikan background putih untuk input file */
}

/* Input readonly */
.form-group input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* Text info di bawah input */
.form-text.text-muted {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
    display: block;
}

/* Tanda required */
.required::after {
    content: " *";
    color: #dc3545; /* Warna merah */
    margin-left: 3px;
}

/* Tombol aksi form */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}
.form-actions button {
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
/* Re-define tombol agar tidak tergantung pada kelas dashboard */
.form-actions .btn-primary {
    background-color: #28a745; /* Hijau */
    color: white;
    border: none;
}
.form-actions .btn-primary:hover {
    background-color: #218838;
    transform: translateY(-2px);
}
.form-actions .btn-secondary {
    background-color: #6c757d; /* Abu-abu */
    color: white;
    border: none;
}
.form-actions .btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

/* Gaya khusus untuk tombol Ambil Koordinat */
.btn-ambil-koordinat {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s ease;
}
.btn-ambil-koordinat:hover {
    background-color: #0056b3;
}
.btn-ambil-koordinat i {
    margin-right: 5px;
}

/* Tambahan: Responsive design untuk form card */
@media (max-width: 768px) {
    .form-card {
        padding: 20px;

    }
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    .form-actions button {
        width: 100%;
    }
}
       .form-card {
            background-color: #fff;
            padding: 25px;
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.05);
            margin-bottom: 20px;
        }
        .form-group {
            margin-bottom: 15px;
        }
        .form-group label {
            display: block;
            margin-bottom: 5px;
            font-weight: 500;
            color: #333;
        }
        .form-group input[type="date"],
        .form-group input[type="time"],
        .form-group input[type="text"],
        .form-group textarea {
            width: 100%;
            padding: 10px;
            border: 1px solid #ced4da;
            border-radius: 8px;
            box-sizing: border-box;
        }
        .form-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 20px;
        }
        .btn-primary {
            background-color: #007bff;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }
        .btn-primary:hover {
            background-color: #0056b3;
        }
        .btn-secondary {
            background-color: #6c757d;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }
        .btn-secondary:hover {
            background-color: #5a6268;
        }
        .btn-danger {
            background-color: #dc3545;
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }
        .btn-danger:hover {
            background-color: #c82333;
        }
        .btn-info {
            background-color: #17a2b8;
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }
        .btn-info:hover {
            background-color: #138496;
        }

        /* Table Styling */
        .table-responsive {
            margin-top: 0px;
        }
        .data-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 15px;
            font-size: 0.95em;
        }
        .data-table th, .data-table td {
            padding: 12px 15px;
            border: 1px solid #e9ecef;
            text-align: left;
        }
        .data-table th {
            background-color: #f8f9fa;
            font-weight: 600;
            color: #495057;
            text-transform: uppercase;
        }
        .data-table tbody tr:nth-child(even) {
            background-color: #fbfbfb;
        }
        .data-table tbody tr:hover {
            background-color: #f1f1f1;
        }
        .data-table .action-buttons {
            gap: 8px;
            justify-content: center; /* Center buttons within cell */
        }
        .data-table .action-buttons a, .data-table .action-buttons button {
             /* Adjust padding for smaller buttons in table */
            padding: 6px 10px;
            font-size: 0.85em;
        }

        /* Modal Styling */
        .modal-overlay {
            display: none; /* Hidden by default */
            position: fixed; /* Stay in place */
            z-index: 1000; /* Sit on top */
            left: 0;
            top: 0;
            width: 100%; /* Full width */
            height: 100%; /* Full height */
            overflow: auto; /* Enable scroll if needed */
            background-color: rgba(0,0,0,0.5); /* Black w/ opacity */
            display: flex; /* Use flexbox to center content */
            justify-content: center;
            align-items: center;
        }

        .modal-content {
            background-color: #fefefe;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.3);
            width: 90%;
            max-width: 600px; /* Adjust modal width */
            position: relative;
            animation-name: animatetop;
            animation-duration: 0.4s;
        }

        @keyframes animatetop {
            from {top: -300px; opacity: 0}
            to {top: 0; opacity: 1}
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #eee;
            padding-bottom: 15px;
            margin-bottom: 20px;
        }

        .modal-header h3 {
            margin: 0;
            color: #333;
            font-size: 1.5rem;
        }

        .modal-close-btn {
            color: #aaa;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
        }

        .modal-close-btn:hover,
        .modal-close-btn:focus {
            color: black;
            text-decoration: none;
        }

        .alert {
            padding: 15px;
            margin-bottom: 20px;
            border-radius: 5px;
            font-size: 0.9em;
        }

        .alert-success {
            background-color: #d4edda;
            color: #155724;
            border-color: #c3e6cb;
        }

        .alert-danger {
            background-color: #f8d7da;
            color: #721c24;
            border-color: #f5c6cb;
        }
        
        /* Required field indicator */
        label.required::after {
            content: " *";
            color: red;
        }