:root {
  --uganda-green: #007200;
  --uganda-yellow: #FFD600;
  --uganda-red: #DC143C;
}

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

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

.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.15);
}

.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.bg-primary {
    background-color: var(--uganda-green) !important;
}

.bg-success {
    background-color: var(--uganda-green) !important;
}

.bg-warning {
    background-color: var(--uganda-yellow) !important;
    color: #000;
}

.bg-info {
    background-color: var(--uganda-red) !important;
}

.text-primary {
    color: var(--uganda-green) !important;
}

.text-warning {
    color: var(--uganda-yellow) !important;
}

.text-danger {
    color: var(--uganda-red) !important;
}

/* Custom styles for Uganda theme */
.uganda-green {
    background-color: var(--uganda-green) !important;
    color: white;
}

.uganda-yellow {
    background-color: var(--uganda-yellow) !important;
    color: #000;
}

.uganda-red {
    background-color: var(--uganda-red) !important;
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 0.75rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Animation for page transitions */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Custom alert styles */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Footer styling */
footer {
    margin-top: auto;
}

/* Dashboard specific styles */
.dashboard-stats .card {
    height: 120px;
    display: flex;
    align-items: center;
}

.dashboard-stats .card i {
    font-size: 2rem;
}

/* Form enhancements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: #495057;
}

.input-group-text {
    background-color: #e9ecef;
    border-color: #ced4da;
}

/* Table enhancements */
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.table th {
    border-bottom: 2px solid #dee2e6;
}

/* Button group styling */
.btn-group-sm > .btn, .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

/* Custom badge styles */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Image styling */
.img-thumbnail {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Card header styling */
.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    background-color: rgba(0, 0, 0, 0.03);
}

/* Mobile Money specific styles */
.mobile-money-provider {
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.3s;
}

.mobile-money-provider:hover {
    border-color: var(--uganda-green);
    box-shadow: 0 0.5rem 1rem rgba(0, 114, 0, 0.15);
}

.mobile-money-provider.active {
    border-color: var(--uganda-green);
    background-color: rgba(0, 114, 0, 0.05);
}

/* Payment status indicators */
.payment-status-pending {
    background-color: #ffc107;
    color: #000;
}

.payment-status-completed {
    background-color: #28a745;
    color: white;
}

.payment-status-failed {
    background-color: #dc3545;
    color: white;
}

/* REVENUE WIDGET STYLES */
.border-success {
    border-color: #28a745 !important;
}

.border-primary {
    border-color: #007bff !important;
}

.border-info {
    border-color: #17a2b8 !important;
}

.border-dark {
    border-color: #343a40 !important;
}

.progress {
    border-radius: 0.5rem;
}

.progress-bar {
    transition: width 1s ease-in-out;
}

/* Chart container */
.chart-container {
    position: relative;
    height: 200px;
    width: 100%;
}
/* static/css/style.css */

/* ... existing styles ... */

/* Responsive Table Styles */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
    font-weight: 600;
}

.table tbody + tbody {
    border-top: 2px solid #dee2e6;
}

.table-sm th,
.table-sm td {
    padding: 0.3rem;
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
}

.table-bordered thead th,
.table-bordered thead td {
    border-bottom-width: 2px;
}

.table-borderless th,
.table-borderless td,
.table-borderless thead th,
.table-borderless tbody + tbody {
    border: 0;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

.table-hover tbody tr:hover {
    color: #212529;
    background-color: rgba(0, 0, 0, 0.075);
}

.table-primary,
.table-primary > th,
.table-primary > td {
    background-color: #b8daff;
}

.table-hover .table-primary:hover {
    background-color: #9fcdff;
}

.table-hover .table-primary:hover > td,
.table-hover .table-primary:hover > th {
    background-color: #9fcdff;
}

.table-secondary,
.table-secondary > th,
.table-secondary > td {
    background-color: #d6d8db;
}

.table-hover .table-secondary:hover {
    background-color: #c8cbcf;
}

.table-hover .table-secondary:hover > td,
.table-hover .table-secondary:hover > th {
    background-color: #c8cbcf;
}

.table-success,
.table-success > th,
.table-success > td {
    background-color: #c3e6cb;
}

.table-hover .table-success:hover {
    background-color: #b1dfbb;
}

.table-hover .table-success:hover > td,
.table-hover .table-success:hover > th {
    background-color: #b1dfbb;
}

.table-info,
.table-info > th,
.table-info > td {
    background-color: #bee5eb;
}

.table-hover .table-info:hover {
    background-color: #abdde5;
}

.table-hover .table-info:hover > td,
.table-hover .table-info:hover > th {
    background-color: #abdde5;
}

.table-warning,
.table-warning > th,
.table-warning > td {
    background-color: #ffeeba;
}

.table-hover .table-warning:hover {
    background-color: #ffe8a1;
}

.table-hover .table-warning:hover > td,
.table-hover .table-warning:hover > th {
    background-color: #ffe8a1;
}

.table-danger,
.table-danger > th,
.table-danger > td {
    background-color: #f5c6cb;
}

.table-hover .table-danger:hover {
    background-color: #f1b0b7;
}

.table-hover .table-danger:hover > td,
.table-hover .table-danger:hover > th {
    background-color: #f1b0b7;
}

.table-light,
.table-light > th,
.table-light > td {
    background-color: #fdfdfe;
}

.table-hover .table-light:hover {
    background-color: #ececf6;
}

.table-hover .table-light:hover > td,
.table-hover .table-light:hover > th {
    background-color: #ececf6;
}

.table-dark,
.table-dark > th,
.table-dark > td {
    background-color: #c6c8ca;
}

.table-hover .table-dark:hover {
    background-color: #b9bbbe;
}

.table-hover .table-dark:hover > td,
.table-hover .table-dark:hover > th {
    background-color: #b9bbbe;
}

.table-active,
.table-active > th,
.table-active > td {
    background-color: rgba(0, 0, 0, 0.075);
}

.table-hover .table-active:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

.table-hover .table-active:hover > td,
.table-hover .table-active:hover > th {
    background-color: rgba(0, 0, 0, 0.075);
}

/* Mobile/Tablet Responsive Tables */
@media (max-width: 768px) {
    .table-responsive {
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Stack table rows on mobile */
    .table-mobile-stack thead {
        display: none;
    }
    
    .table-mobile-stack tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        background-color: #fff;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    }
    
    .table-mobile-stack tbody tr td {
        display: block;
        text-align: right;
        padding: 0.5rem;
        border-bottom: 1px solid #dee2e6;
    }
    
    .table-mobile-stack tbody tr td:last-child {
        border-bottom: none;
    }
    
    .table-mobile-stack tbody tr td:before {
        content: attr(data-label) ": ";
        float: left;
        font-weight: bold;
        text-transform: uppercase;
        color: #495057;
    }
    
    .table-mobile-stack tbody tr td.actions:before {
        content: "Actions: ";
    }
    
    /* Hide action buttons on mobile for better spacing */
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .table-mobile-stack .badge {
        font-size: 0.75rem;
    }
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 576px) {
    .table th,
    .table td {
        padding: 0.4rem;
        font-size: 0.8125rem;
    }
    
    .table-mobile-stack tbody tr td:before {
        font-size: 0.8125rem;
    }
    
    .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
    
    .table-mobile-stack .badge {
        font-size: 0.7rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 992px) {
    .table th,
    .table td {
        padding: 0.6rem;
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.8125rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .table th,
    .table td {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .table th,
    .table td {
        padding: 0.75rem;
        font-size: 1rem;
    }
}

/* Table Header Enhancements */
.table thead th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
}

/* Table Row Hover Effects */
.table-hover tbody tr:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.2s ease-in-out;
}

/* Badge Improvements */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Action Button Group Styling */
.btn-group-sm > .btn, .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

/* Card Body Padding Adjustments */
.card-body {
    padding: 1.25rem;
}

@media (max-width: 768px) {
    .card-body {
        padding: 0.75rem;
    }
}

/* Pagination Responsive */
.pagination {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .pagination .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .pagination .page-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.8125rem;
    }
}

/* Form Control Responsive */
.form-control {
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.375rem;
}

@media (max-width: 768px) {
    .form-control {
        padding: 0.3rem 0.6rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .form-control {
        padding: 0.25rem 0.5rem;
        font-size: 0.8125rem;
    }
}

/* Input Group Responsive */
.input-group > .form-control,
.input-group > .form-select {
    min-height: calc(1.5em + 0.75rem + 2px);
}

@media (max-width: 768px) {
    .input-group > .form-control,
    .input-group > .form-select {
        min-height: calc(1.5em + 0.6rem + 2px);
    }
}

@media (max-width: 576px) {
    .input-group > .form-control,
    .input-group > .form-select {
        min-height: calc(1.5em + 0.5rem + 2px);
    }
}

/* Card Header Responsive */
.card-header {
    padding: 1rem 1.25rem;
}

@media (max-width: 768px) {
    .card-header {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 576px) {
    .card-header {
        padding: 0.5rem 0.75rem;
    }
}

/* Table Cell Alignment */
.table th.text-right,
.table td.text-right {
    text-align: right;
}

.table th.text-center,
.table td.text-center {
    text-align: center;
}

.table th.text-left,
.table td.text-left {
    text-align: left;
}

/* Responsive Utility Classes */
.d-table-cell {
    display: table-cell;
}

.d-table-row {
    display: table-row;
}

@media (max-width: 768px) {
    .d-table-cell,
    .d-table-row {
        display: block;
    }
}

/* Table Scroll Indicator */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* No Wrap for Important Columns */
.nowrap {
    white-space: nowrap;
}

/* Truncate Long Text */
.truncate {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .truncate {
        max-width: 100px;
    }
}

@media (max-width: 576px) {
    .truncate {
        max-width: 80px;
    }
}
/* Add to your CSS file */
.turnstile-widget {
    margin: 15px 0;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .cf-turnstile iframe {
        filter: invert(1) hue-rotate(180deg);
    }
}