/* === GENERAL STYLING === */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --background-color: #eef2f5;
    --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    color: var(--dark-color);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 25px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

h1, h2 {
    color: var(--dark-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

/* === NAVIGATION === */
nav {
    background-color: var(--light-color);
    padding: 10px 15px;
    border-radius: 5px;
    margin: 20px 0;
    display: flex;
    gap: 15px;
}

nav a {
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

nav a:hover, nav a.active {
    background-color: #ddd;
    text-decoration: none;
}

/* === DASHBOARD === */
.dashboard-info {
    display: flex;
    gap: 25px;
    margin-top: 25px;
}

.saldo-box, .status-box {
    flex: 1;
    padding: 25px;
    border-radius: 8px;
    color: #fff;
}

.saldo-box {
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
}

.saldo-box h1 {
    font-size: 3rem;
    color: #fff;
    margin: 0;
}

.status-box {
    background: linear-gradient(45deg, var(--secondary-color), #495057);
}

.status-box h2 {
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.5);
    padding-bottom: 10px;
}

.status-box ul {
    list-style: none;
    padding: 0;
}

.status-box li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.status-box li:last-child {
    border-bottom: none;
}

/* === FORMS (Pemasukan, Pengeluaran, Filter) === */
form label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: bold;
}

form input[type="text"],
form input[type="password"],
form input[type="number"],
form input[type="date"],
form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 16px;
}

form button {
    margin-top: 25px;
}

.filter-form {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 25px;
    background-color: var(--light-color);
    padding: 20px;
    border-radius: 8px;
}

.filter-form div {
    flex: 1;
}

.filter-form label {
    margin-top: 0;
}

.filter-form button {
    margin-top: 0;
}

/* === REPORT TABLE === */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

table thead th {
    background-color: var(--dark-color);
    color: #fff;
    font-weight: bold;
}

table tbody tr:nth-child(even) {
    background-color: var(--light-color);
}

table tbody tr:hover {
    background-color: #e2e6ea;
}

table tfoot th {
    text-align: right;
    font-size: 1.1em;
}
table tfoot tr:first-child th {
    text-align: center;
}
table tfoot tr:first-child th:first-child{
    text-align: right;
}

table tfoot th:nth-child(2), table tfoot th:nth-child(3){
    text-align: left;
}

/* === MESSAGES === */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px; 
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    margin-bottom: 15px;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 12px; 
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* === MODERN LOGIN REDESIGN (Khusus Admin) === */
.login-container {
    width: 95%;
    max-width: 450px;
    margin: 8vh auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-top: 5px solid var(--primary-color);
}

.login-container h2 {
    margin-bottom: 10px;
    font-size: 1.8rem;
    color: var(--dark-color);
}

.login-subtitle {
    color: var(--secondary-color);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: block;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 14px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: border-color 0.3s ease;
}

.login-container input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-login {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    margin-top: 10px;
    border-radius: 10px;
    background: linear-gradient(to right, var(--primary-color), #0056b3);
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }

    .dashboard-info {
        flex-direction: column;
    }

    nav {
        flex-direction: column;
        align-items: stretch;
    }
    
    nav a {
        text-align: center;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .saldo-box h1 {
        font-size: 2.5rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 20px;
        margin: 5vh auto;
    }
}