/* General Styling with CSS Variables for Theming */
:root, body.theme-blue {
    --color-primary: #007bff; /* Biru */
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-secondary: #6c757d;
    --color-light: #f8f9fa;
    --color-dark: #343a49;
    --color-text: #212529;
    --color-background: #f0f2f5;
    --color-card-background: #ffffff;
    --color-border: #dee2e6;
}

body.theme-green {
    --color-primary: #198754; /* Hijau */
}

body.theme-orange {
    --color-primary: #fd7e14; /* Oranye */
}

body.theme-dark {
    --color-primary: #0d6efd;
    --color-success: #198754;
    --color-danger: #dc3545;
    --color-secondary: #6c757d;
    --color-light: #343a40;
    --color-dark: #f8f9fa;
    --color-text: #f8f9fa;
    --color-background: #212529;
    --color-card-background: #343a40;
    --color-border: #495057;
}

/* --- Base Styles --- */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    padding-bottom: 80px; 
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    padding: 15px;
}

h2 {
    color: var(--color-dark);
    text-align: center;
    margin-bottom: 20px;
}

hr {
    border: 0;
    height: 1px;
    background-color: var(--color-border);
    margin: 20px 0;
}

/* --- Dashboard --- */
.dashboard-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: auto;
    min-height: 200px;
    gap: 15px;
}

.menu-button {
    flex: 1;
    padding: 30px;
    border-radius: 12px;
    color: white;
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}
.menu-button:active {
    transform: scale(0.95);
}
.menu-button.tarik { background-color: var(--color-danger); }
.menu-button.setor { background-color: var(--color-success); }


/* --- General Components --- */
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}
.form-control {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    box-sizing: border-box;
    background-color: var(--color-card-background);
    color: var(--color-text);
    font-size: 1em;
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1em;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
}
.btn-primary { background-color: var(--color-primary); }
.btn-success { background-color: var(--color-success); }
.btn-danger { background-color: var(--color-danger); }
.btn-secondary { background-color: var(--color-secondary); color: white; }

.info-box, .warning-box {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid transparent;
}
.info-box.success { background-color: #d4edda; border-color: #c3e6cb; color: #155724; }
.info-box.info { background-color: #d1ecf1; border-color: #bee5eb; color: #0c5460; }
.info-box.danger { background-color: #f8d7da; border-color: #f5c6cb; color: #721c24; }
.warning-box { background-color: #fff3cd; border-color: #ffeeba; color: #856404; }


/* --- Data Tables --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: var(--color-card-background);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}
.data-table th, .data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}
.data-table thead th {
    background-color: var(--color-light);
    font-weight: 600;
}
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.action-buttons a {
    color: white;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 0.9em;
}
.btn-edit { background-color: var(--color-primary); }
.btn-delete { background-color: var(--color-danger); }

/* --- Choice/Option Pages --- */
.choice-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.choice-button {
    background-color: var(--color-card-background);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-size: 1.1em;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid var(--color-border);
}
.choice-button i {
    margin-right: 10px;
    color: var(--color-primary);
}

/* --- Transaction List --- */
.transaksi-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.transaksi-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-card-background);
    padding: 15px;
    border-bottom: 1px solid var(--color-border);
}
.transaksi-item:first-child { border-top-left-radius: 8px; border-top-right-radius: 8px; }
.transaksi-item:last-child { border-bottom: none; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
.transaksi-item .detail {
    font-size: 0.85em;
    color: #6c757d;
}
.transaksi-item .jumlah {
    font-weight: bold;
    font-size: 1.1em;
}
.setor-color { color: var(--color-success); }
.tarik-color { color: var(--color-danger); }

/* --- Bottom Navigation --- */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-card-background);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    color: #888;
    flex: 1;
}
.nav-item i {
    font-size: 1.5em;
    margin-bottom: 4px;
}
.nav-item span {
    font-size: 0.75em;
}
.nav-item.active {
    color: var(--color-primary);
}

/* --- Modal --- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.5); 
}
.modal-content {
    background-color: var(--color-card-background);
    margin: 30% auto;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.modal-header h2 { text-align: left; margin: 0; }
.close-button {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close-button:hover, .close-button:focus { color: var(--color-text); }

/* Page Actions Layouts */
.page-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.page-actions-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

/* Specific Card Styles */
.profile-info-card {
    background-color: var(--color-card-background);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.profile-info-card p {
    margin: 8px 0;
}

.divider-text {
    text-align: center;
    margin: 25px 0 15px 0;
    color: #888;
}