/* General Styling */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

.container {
    width: 90%;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

h2 {
    color: #333;
    border-bottom: 2px solid #007BFF;
    padding-bottom: 10px;
}

/* Navbar */
.navbar {
    background-color: #007BFF;
    color: white;
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.navbar a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
}
.navbar a.brand {
    font-size: 1.5em;
    font-weight: bold;
}
.navbar .nav-links a:hover {
    background-color: #0056b3;
    border-radius: 4px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    color: white;
    background-color: #007BFF;
}
.btn-success { background-color: #28a745; }
.btn-warning { background-color: #ffc107; }
.btn-danger { background-color: #dc3545; }
.btn-secondary { background-color: #6c757d; }
.btn:hover { opacity: 0.9; }

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.table th, .table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}
.table th {
    background-color: #007BFF;
    color: white;
}
.table tr:nth-child(even) {
    background-color: #f2f2f2;
}
.table tr:hover {
    background-color: #ddd;
}
.table img {
    border-radius: 5px;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Important */
}
textarea.form-control {
    resize: vertical;
}

/* Login Page */
.login-body {
    background-color: #007BFF;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}
.login-container {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    width: 350px;
}
.login-container h2 {
    text-align: center;
    margin-bottom: 20px;
}
.login-container input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
.login-container button {
    width: 100%;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}
.alert-danger { color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; }
.alert-success { color: #155724; background-color: #d4edda; border-color: #c3e6cb; }
.alert-warning { color: #856404; background-color: #fff3cd; border-color: #ffeeba; }

/* Styling Halaman Home */
.home-title {
    text-align: center;
    margin-bottom: 30px;
}

.home-title p {
    font-size: 1.1em;
    color: #666;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.card-header {
    background-color: #007BFF;
    color: white;
    padding: 15px;
    font-size: 1.2em;
}

.card-body {
    padding: 15px;
}

.card-body p {
    color: #555;
    line-height: 1.6;
}

.card-body strong {
    color: #333;
}

.card-image-container {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 15px;
}

.card-image-container div {
    flex: 1;
    text-align: center;
}

.card-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #ddd;
}

/* === Gaya dari home.html === */
header { 
    background:#004085; 
    color:white; 
    padding:15px 5%; 
    display:flex; 
    justify-content:space-between; 
    align-items:center; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
header h2 { 
    margin:0; 
}
header .btn-header { 
    background:#28a745; 
    color:white; 
    border:none; 
    padding:8px 15px; 
    border-radius:5px; 
    cursor:pointer; 
    text-decoration:none;
    font-size: 14px;
}
header .btn-header:hover { 
    background:#218838; 
}

main { 
    padding:20px 5%; 
}
main h3 { 
    margin-top:30px; 
    margin-bottom: 15px;
    color:#004085; 
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.grid { 
    display:grid; 
    grid-template-columns:repeat(auto-fill, minmax(250px, 1fr)); 
    gap:20px; 
    margin-top:15px; 
}
.card {
  border-radius:12px;
  padding:20px;
  background:white;
  box-shadow:0 4px 8px rgba(0,0,0,0.08);
  transition:transform 0.2s, box-shadow 0.2s;
  border: 1px solid #eee;
}
.card:hover { 
    transform:translateY(-5px); 
    box-shadow:0 8px 16px rgba(0,0,0,0.12); 
}
.card h4 { 
    margin:0 0 10px; 
    color:#333; 
}
.card p { 
    margin:0 0 15px; 
    font-size:14px; 
    color:#555; 
}
.card a {
  text-decoration:none; 
  color:white; 
  background:#007bff; 
  padding:8px 14px; 
  border-radius:6px;
  font-size:14px;
  display: inline-block;
}
.card a:hover { 
    background:#0056b3; 
}

form {
    margin-top: 10px;
}
form input, form button {
  padding:12px; 
  margin:5px 5px 5px 0; 
  border:1px solid #ccc; 
  border-radius:6px;
  font-size: 14px;
}
form button { 
    background:#28a745; 
    color:white; 
    cursor:pointer; 
    border:none; 
}
form button:hover { 
    background:#218838; 
}

.chart-container {
    max-width:450px; 
    margin-top:20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

/* Link kembali di halaman login */
.link-kembali {
    display: block;
    text-align: center;
    margin-top: 10px;
    text-decoration: none;
    color: #007bff;
}
.link-kembali:hover {
    text-decoration: underline;
}

/* Halaman Detail */
.detail-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.detail-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}
.detail-info { flex: 1; min-width: 300px; }
.detail-images { flex: 1; min-width: 300px; }
.detail-images img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
}

/* === Gaya Halaman Detail Baru === */
.detail-page-container {
    max-width: 1100px;
    margin: 20px auto;
}

.detail-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #004085;
}

.detail-header h1 {
    font-size: 2.5em;
    color: #004085;
    margin: 0;
}

.detail-header p {
    font-size: 1.2em;
    color: #555;
    margin-top: 5px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.detail-text-content h3, .detail-image-gallery h3 {
    font-size: 1.5em;
    color: #004085;
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.detail-text-content .icon {
    margin-right: 10px;
}

.detail-text-content h4 {
    color: #333;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.detail-text-content p {
    color: #444;
    line-height: 1.7;
}

.detail-text-content hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

.detail-image-gallery figure {
    margin: 0 0 25px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.detail-image-gallery img {
    width: 100%;
    display: block;
    height: auto;
}

.detail-image-gallery figcaption {
    background-color: #f8f9fa;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    color: #333;
    border-top: 1px solid #ddd;
}

.detail-footer {
    text-align: center;
    margin-top: 40px;
}

/* Penyesuaian untuk layar kecil (Responsive) */
@media (max-width: 800px) {
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .detail-header h1 {
        font-size: 2em;
    }
}

.keuangan {
    font-size: 1.2em;
    font-weight: bold;
}
.pemasukan {
    color: #28a745; /* Hijau */
}
.pengeluaran {
    color: #dc3545; /* Merah */
}

/* === Gaya untuk Pagination === */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.page-item {
    margin: 0;
}
.page-link {
    color: #007BFF;
    padding: 12px 18px;
    text-decoration: none;
    background: #fff;
    border-left: 1px solid #dee2e6;
    transition: background-color 0.2s;
}
.page-item:first-child .page-link {
    border-left: none;
}
.page-link:hover {
    background-color: #e9ecef;
}
.page-item.active .page-link {
    background-color: #007BFF;
    color: white;
    font-weight: bold;
    cursor: default;
}
.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
}