/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #850a0a 0%, #e70a0a 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* User Header */
.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-info strong {
    color: #333;
}

.user-role {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.btn-logout {
    background: #dc3545;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

/* Tab Navigation */
.tabs {
    display: flex;
    margin-bottom: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.tab {
    flex: 1;
    padding: 15px 20px;
    text-align: center;
    text-decoration: none;
    color: #333370;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab:hover {
    background: #f8f9fa;
    color: #333;
}

.tab.active {
    background: linear-gradient(135deg, #751515 0%, #b91818 100%);
    color: white;
    border-bottom-color: #ffffff;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-form h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.login-form p {
    color: #666;
    margin-bottom: 30px;
}

.btn-full {
    width: 100%;
}

.login-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.login-footer p {
    font-size: 14px;
    color: #666;
}

/* Alert Styles */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Header */
h1 {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

/* Form Styles */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e90606;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #ad2929 0%, #ff0000 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 17, 17, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-edit {
    background: #237e38;
    color: white;
    padding: 6px 12px;
    font-size: 14px;
    margin-right: 5px;
}

.btn-edit:hover {
    background: #2a9241;
}

.btn-delete {
    background: #dc3545;
    color: white;
    padding: 6px 12px;
    font-size: 14px;
}

.btn-delete:hover {
    background: #c82333;
}

/* Table Styles */
.table-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

thead {
    background: linear-gradient(135deg, #831313 0%, #eb3434 100%);
    color: white;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

.income {
    color: #2a8f41;
    font-weight: 600;
}

.expense {
    color: #dc3545;
    font-weight: 600;
}

.balance {
    color: #400fc5;
    font-weight: 600;
}

.actions {
    white-space: nowrap;
}

/* Summary Styles */
.summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 20px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 200px;
}

.summary-item .label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.summary-item .value {
    font-size: 24px;
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .summary {
        flex-direction: column;
        align-items: stretch;
    }
    
    .summary-item {
        min-width: auto;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 10px 8px;
    }
    
    .actions {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    .btn-edit, .btn-delete {
        padding: 8px 16px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2em;
    }
    
    .form-container, .table-container {
        padding: 20px;
    }
    
    .summary-item .value {
        font-size: 20px;
    }
}
