* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.5s ease-in;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 10px;
    color: #667eea;
    font-size: 28px;
    font-weight: bold;
}

.login-box h2 i {
    margin-right: 10px;
    font-size: 24px;
}

.tagline {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
    font-style: italic;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.input-group input {
    padding-left: 40px;
}

.form-group input:focus {
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.5);
}

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

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #667eea;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: #5a67d8;
    transform: translateY(-2px);
}

/* Receipt button */
.btn-receipt {
    background: #e64a19;
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-receipt:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}
.btn-receipt i { font-size: 0.95rem; }

.message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

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

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar h2 {
    margin-bottom: 30px;
    text-align: center;
}

.user-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.user-info h3 {
    margin-bottom: 5px;
}

.balance {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li {
    margin-bottom: 10px;
}

.sidebar nav ul li a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
    background: rgba(255, 255, 255, 0.2);
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
}

header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Mobile menu hidden by default, shown via media query */
.mobile-menu {
    display: none;
}

header h1 {
    color: #333;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.card h3 {
    color: #666;
    font-size: 16px;
    margin-bottom: 10px;
}

.card p {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

/* Table Styles */
.table-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8f9fa;
}

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

th {
    font-weight: 600;
    color: #495057;
}

tbody tr:hover {
    background: #f8f9fa;
}

/* Filters */
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filters select,
.filters input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

/* Recent Transactions */
.recent-transactions {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.recent-transactions h3 {
    margin-bottom: 20px;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* compact sidebar */
    .sidebar {
        width: 70px;
        padding: 10px;
    }
    
    .sidebar h2,
    .user-info h3,
    .user-info p,
    .balance h4 {
        display: none;
    }
    
    .main-content {
        margin-left: 70px;
        padding: 20px;
    }
    
    .sidebar nav ul li a {
        padding: 10px;
        text-align: center;
    }
    
    .sidebar nav ul li a span {
        display: none;
    }

    /* Mobile menu button in header */
    header {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .mobile-menu {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: #667eea;
        border-radius: 6px;
        color: white;
        font-size: 20px;
        border: none;
        cursor: pointer;
    }
}

/* Small screens: hide sidebar and use off-canvas */
@media (max-width: 600px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 240px;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 1001;
        padding: 20px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* show full sidebar content when open on mobile */
    .sidebar.open h2,
    .sidebar.open .user-info h3,
    .sidebar.open .user-info p,
    .sidebar.open .balance h4 {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    /* overlay when sidebar open */
    .overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
    }

    .overlay.active {
        display: block;
    }

    /* Responsive table -> card style */
    .table-container table thead {
        display: none;
    }

    .table-container table,
    .table-container table tbody,
    .table-container table tr,
    .table-container table td {
        display: block;
        width: 100%;
    }

    .table-container table tr {
        margin-bottom: 15px;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 12px;
        background: white;
    }

    .table-container table td {
        display: flex;
        justify-content: space-between;
        padding: 8px 10px;
        border: none;
        text-align: left;
    }

    .table-container table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #495057;
        margin-right: 10px;
        width: 45%;
        flex-shrink: 0;
    }

    .transaction-description {
        max-width: 60%;
    }
}

/* Additional Styles for New Features */

/* Transaction Items */
.transaction-item {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.transaction-type {
    font-weight: bold;
    color: #333;
}

.transaction-date {
    color: #666;
    font-size: 14px;
}

.transaction-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transaction-amount {
    font-weight: bold;
    font-size: 18px;
}

.transaction-amount.positive {
    color: #28a745;
}

.transaction-amount.negative {
    color: #dc3545;
}

.transaction-description {
    color: #666;
    max-width: 50%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* No Data Message */
.no-data {
    text-align: center;
    color: #666;
    padding: 20px;
    font-style: italic;
}

/* File Upload Styling */
input[type="file"] {
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 5px;
    width: 100%;
    cursor: pointer;
}

input[type="file"]:hover {
    border-color: #667eea;
}

/* Badges for notifications */
.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 10px;
    background: #dc3545;
    color: white;
    margin-left: 5px;
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.info {
    background: #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
    color: #666;
}
.close-modal:hover {
    color: #333;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



