/* General Styles */
body {
    background-color: #f8f9fa;
}

/* Card Styles */
.card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* Button Styles */
.btn {
    border-radius: 4px;
    padding: 8px 16px;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Form Styles */
.form-control {
    border-radius: 4px;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Table Styles */
.table {
    margin-bottom: 0;
    width: 100%;
    table-layout: fixed;
}

.table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 0.75rem;
    text-align: left;
}

.table td {
    vertical-align: middle;
    padding: 0.75rem;
    text-align: left;
}

/* Dashboard Table Styles */
.dashboard .table {
    width: 100%;
    table-layout: fixed;
}

.dashboard .table th,
.dashboard .table td {
    padding: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dashboard column widths */
.dashboard .table th:nth-child(1),
.dashboard .table td:nth-child(1) { width: 25%; }
.dashboard .table th:nth-child(2),
.dashboard .table td:nth-child(2) { width: 25%; }
.dashboard .table th:nth-child(3),
.dashboard .table td:nth-child(3) { width: 25%; }
.dashboard .table th:nth-child(4),
.dashboard .table td:nth-child(4) { width: 25%; }

/* Scrollable Table Styles */
.table-container {
    height: 100%;
    padding: 1rem;
}

.table-wrapper {
    height: 300px !important;
    overflow-y: auto !important;
    background-color: white !important; 
}

.table thead {
    display: table;
    width: 100%;
    position: sticky !important; 
    top: 0;
    z-index: 1;
    background-color: #f8f9fa;
}

/* Column widths */
.table th:nth-child(1),
.table td:nth-child(1) { width: 15% !important; }
.table th:nth-child(2),
.table td:nth-child(2) { width: 10% !important; }
.table th:nth-child(3),
.table td:nth-child(3) { width: 15% !important; }
.table th:nth-child(4),
.table td:nth-child(4) { width: 35% !important; }
.table th:nth-child(5),
.table td:nth-child(5) { width: 15% !important; }
.table th:nth-child(6),
.table td:nth-child(6) { width: 10% !important; }

/* Navigation Styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
}

/* Alert Styles */
.alert {
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Dashboard Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
}

.welcome-card h2 {
    margin-bottom: 0.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        margin-bottom: 0;
    }
}

/* Revenue History Table Styles */
.revenue-table {
    width: 100%;          /* Ensure the table takes the full width */
    table-layout: fixed;  /* Use fixed layout */
    border-collapse: collapse; /* Optional: for cleaner borders */
}

/* Override general thead/tbody display for revenue-table */
.revenue-table thead {
    display: table-header-group; /* Default thead display */
    width: auto; /* Reset width */
    position: static; /* Reset position */
}

.revenue-table tbody {
    display: table-row-group; /* Default tbody display */
    width: auto; /* Reset width */
}

.revenue-table tbody tr {
    display: table-row; /* Default tr display */
    width: auto; /* Reset width */
}

.revenue-table th,
.revenue-table td {
    width: 20%;           /* Distribute width evenly across 5 columns */
    padding: 0.75rem;     /* Standard padding */
    white-space: nowrap;  /* Prevent text wrapping */
    overflow: hidden;     /* Hide overflow */
    text-overflow: ellipsis; /* Add ellipsis for overflow */
    vertical-align: middle; /* Align content vertically */
}

/* Default header alignment to center */
.revenue-table th {
    text-align: center;    /* Center headers by default */
    vertical-align: middle; /* Ensure vertical alignment is consistent */
}

/* Left-align the first three headers (Date, Category, Description) */
.revenue-table thead th:nth-child(1),
.revenue-table thead th:nth-child(2),
.revenue-table thead th:nth-child(3) {
    text-align: left;
}

/* Data cell default alignment */
.revenue-table td {
    text-align: left;     /* Align data cells left by default */
    vertical-align: middle; /* Ensure vertical alignment is consistent */
}

/* Specific alignments from the original HTML */
/* Amount column (Header remains centered, Data cell is right-aligned) */
.revenue-table td.text-end {
    text-align: right !important; /* Keep data cell right-aligned */
}

.revenue-table td.text-left {
    text-align: left !important; /* Keep data cell left-aligned */
}

/* Actions column (Header remains centered, Data cell is centered) */
.revenue-table td.text-center {
    text-align: center !important; /* Keep data cell center-aligned */
}

/* Categories Page Table Styles */
.categories-table th:last-child {
    text-align: center;
} 