/* ============================================================================
   BUDGET EXPENSE SYSTEM - STYLESHEET
   ============================================================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

/* ============================================================================
   NAVIGATION
   ============================================================================ */

.nav {
    background: white;
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav h1 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-links a {
    color: #666;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-links a:hover {
    background: #f0f0f0;
    color: #333;
}

.nav-links a.active {
    background: #667eea;
    color: white;
}

.btn-logout {
    background: #ef4444;
    color: white !important;
}

.btn-logout:hover {
    background: #dc2626 !important;
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.login-form {
    max-width: 400px;
    margin: 100px auto;
}

/* ============================================================================
   MESSAGES
   ============================================================================ */

.success-message {
    background: #d1fae5;
    color: #065f46;
    padding: 15px 20px;
    border-left: 4px solid #10b981;
    font-weight: 500;
}

.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 15px 20px;
    border-left: 4px solid #ef4444;
    font-weight: 500;
}

.error {
    color: #ef4444;
    margin-bottom: 15px;
    font-weight: 500;
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

h1, h2 { 
    color: #333; 
    margin-bottom: 20px; 
}

h2 {
    font-size: 20px;
    font-weight: 600;
}

/* ============================================================================
   FORMS
   ============================================================================ */

input, select, textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

button {
    background: #667eea;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

button:hover { 
    background: #5568d3; 
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

.btn-approve { 
    background: #10b981; 
}

.btn-approve:hover { 
    background: #059669; 
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-reject { 
    background: #ef4444; 
}

.btn-reject:hover { 
    background: #dc2626; 
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-delete { 
    background: #f59e0b; 
}

.btn-delete:hover { 
    background: #d97706; 
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-small { 
    padding: 6px 12px; 
    font-size: 12px; 
    margin-right: 5px; 
}

/* ============================================================================
   TABLES
   ============================================================================ */

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

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

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tbody tr {
    transition: background-color 0.2s;
}

tbody tr:hover {
    background: #f9fafb;
}

/* ============================================================================
   BADGES & STATUS
   ============================================================================ */

.status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-pending { 
    background: #fef3c7; 
    color: #92400e; 
}

.status-approved { 
    background: #d1fae5; 
    color: #065f46; 
}

.status-rejected { 
    background: #fee2e2; 
    color: #991b1b; 
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-user { 
    background: #dbeafe; 
    color: #1e40af; 
}

.badge-admin { 
    background: #fce7f3; 
    color: #9f1239; 
}

/* ============================================================================
   SUMMARY CARDS
   ============================================================================ */

.summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.summary-card h3 { 
    font-size: 14px; 
    opacity: 0.9; 
    margin-bottom: 8px; 
    font-weight: 500;
}

.summary-card .amount { 
    font-size: 28px; 
    font-weight: 700; 
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .nav {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .nav h1 {
        font-size: 20px;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-links a {
        width: 100%;
        text-align: center;
    }
    
    .card {
        padding: 20px;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px 4px;
    }
    
    .summary {
        grid-template-columns: 1fr;
    }
    
    .btn-small {
        padding: 4px 8px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .login-form {
        margin: 50px auto;
    }
    
    .summary-card .amount {
        font-size: 24px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    h2 {
        font-size: 18px;
    }
}