/* ============================================
   Ikimina - Mobile-First CSS
   Clean, Modern, Responsive Design
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --primary-color: #0d6efd;
    --primary-dark: #0a58ca;
    --primary-light: #e7f0fe;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-light: #adb5bd;
    
    --border-radius: 12px;
    --box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --box-shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.12);
    
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 80px; /* Space for mobile nav */
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

/* ---------- Mobile-First Container ---------- */
.container {
    width: 100%;
    padding-right: var(--spacing-md);
    padding-left: var(--spacing-md);
    margin-right: auto;
    margin-left: auto;
}

/* ---------- Cards ---------- */
.card {
    background: var(--card-bg);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    margin-bottom: var(--spacing-md);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--box-shadow-hover);
}

.card-header {
    background: transparent;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-weight: 600;
}

.card-body {
    padding: var(--spacing-lg);
}

.card-footer {
    background: transparent;
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* ---------- Cards with Gradient Accent ---------- */
.card-accent-top {
    border-top: 4px solid var(--primary-color);
}

.card-accent-success {
    border-top: 4px solid var(--success-color);
}

.card-accent-warning {
    border-top: 4px solid var(--warning-color);
}

.card-accent-danger {
    border-top: 4px solid var(--danger-color);
}

/* ---------- Buttons ---------- */
.btn {
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.95rem;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-success {
    background: var(--success-color);
    color: white;
}
.btn-success:hover {
    background: #157347;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}
.btn-danger:hover {
    background: #bb2d3b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}
.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 0.2rem 1rem;
    font-size: 0.5rem;
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.form-control {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    font-size: 1rem;
    background: white;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15);
    outline: none;
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-valid {
    border-color: var(--success-color);
}

.form-select {
    border-radius: 10px;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid #e9ecef;
    font-size: 1rem;
    background-color: white;
}

/* ---------- Navigation ---------- */
.navbar {
    padding: 0.8rem 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    background: white !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.navbar-brand img {
    height: 32px;
    margin-right: 8px;
}

.nav-link {
    font-weight: 500;
    padding: 0.6rem 1rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: var(--bg-color);
}

/* Mobile Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 0.5rem 0;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    flex: 1;
}

.bottom-nav-item .icon {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.bottom-nav-item.active {
    color: var(--primary-color);
}

.bottom-nav-item:hover {
    background: var(--bg-color);
}

/* ---------- Badges ---------- */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.75rem;
}

/* ---------- Progress Bars ---------- */
.progress {
    height: 8px;
    border-radius: 50px;
    background: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    border-radius: 50px;
    transition: width 0.6s ease;
}

/* ---------- Alerts ---------- */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: var(--spacing-md) var(--spacing-lg);
}

.alert-success {
    background: #d1e7dd;
    color: #0a3622;
}

.alert-danger {
    background: #f8d7da;
    color: #58151c;
}

.alert-warning {
    background: #fff3cd;
    color: #664d03;
}

.alert-info {
    background: #cff4fc;
    color: #055160;
}

/* ---------- Grid & Layout ---------- */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -12px;
    margin-left: -12px;
}

.col, .col-6, .col-12, .col-md-4, .col-md-6, .col-md-8 {
    padding-right: 12px;
    padding-left: 12px;
    flex: 0 0 100%;
    max-width: 100%;
}

.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

/* ---------- Stats Cards ---------- */
.stat-card {
    text-align: center;
    padding: var(--spacing-lg);
}

.stat-card .icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.stat-card .label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ---------- Group Selection Cards ---------- */
.group-card {
    cursor: pointer;
    padding: var(--spacing-lg);
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.group-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
}

.group-card .icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

/* ---------- Contribution List ---------- */
.contribution-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid #f1f3f5;
}

.contribution-item:last-child {
    border-bottom: none;
}

.contribution-item .month {
    font-weight: 500;
}

.contribution-item .amount {
    font-weight: 600;
    color: var(--primary-color);
}

/* ---------- Toast Notifications ---------- */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    max-width: 90%;
}

.toast {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-hover);
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    animation: slideDown 0.3s ease;
}

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

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-secondary); }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }
.p-5 { padding: var(--spacing-xl); }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-column { flex-direction: column; }
.gap-2 { gap: var(--spacing-sm); }
.gap-3 { gap: var(--spacing-md); }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: var(--border-radius); }
.shadow { box-shadow: var(--box-shadow); }

/* ---------- Responsive Breakpoints ---------- */

/* Tablets and small desktops */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
        padding-right: var(--spacing-lg);
        padding-left: var(--spacing-lg);
    }
    
    .col-md-4 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
    
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .col-md-8 {
        flex: 0 0 66.666%;
        max-width: 66.666%;
    }
    
    body {
        padding-bottom: 0; /* No bottom nav on larger screens */
    }
    
    .bottom-nav {
        display: none;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* Desktops */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

/* Large desktops */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* ---------- Dark Mode (Optional) ---------- */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a2e;
        --card-bg: #16213e;
        --text-primary: #e8e8e8;
        --text-secondary: #a8a8b8;
        --box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    }
    
    .navbar {
        background: #16213e !important;
    }
    
    .form-control {
        background: #1a1a2e;
        border-color: #2a2a4e;
        color: white;
    }
    
    .form-control:focus {
        border-color: var(--primary-color);
    }
    
    .bottom-nav {
        background: #16213e;
    }
    
    .contribution-item {
        border-color: #2a2a4e;
    }
    
    .card {
        background: #16213e;
    }
}








/* ============================================
   SUPER SIMPLE NAVBAR
   ============================================ */

.navbar {
    padding: 0.8rem 0;
    background: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.navbar-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: #212529;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    color: #0d6efd;
    font-size: 1.3rem;
}

/* Desktop Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-link {
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    color: #6c757d;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: #f8f9fa;
    color: #212529;
}

.nav-link i {
    font-size: 0.9rem;
}

.nav-link.logout {
    color: #dc3545;
}

.nav-link.logout:hover {
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
}

.nav-link.register {
    background: #0d6efd;
    color: white !important;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
}

.nav-link.register:hover {
    background: #0a58ca;
    color: white !important;
}

/* User Badge */
.user-badge {
    padding: 0.4rem 0.8rem;
    color: #212529;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.user-badge i {
    color: #0d6efd;
    font-size: 1.1rem;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: 0.3rem;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #212529;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    padding: 1rem;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    flex-direction: column;
    gap: 0.3rem;
}

.mobile-menu.open {
    display: flex;
}

.mobile-link {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: #6c757d;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.mobile-link:hover {
    background: #f8f9fa;
    color: #212529;
}

.mobile-link i {
    width: 20px;
    color: #6c757d;
}

.mobile-link.logout {
    color: #dc3545;
}

.mobile-link.logout:hover {
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
}

.mobile-link.register {
    background: #0d6efd;
    color: white !important;
    justify-content: center;
    border-radius: 50px;
    margin-top: 0.3rem;
}

.mobile-link.register:hover {
    background: #0a58ca;
    color: white !important;
}

.mobile-user {
    padding: 0.7rem 1rem;
    color: #212529;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    margin-top: 0.3rem;
    padding-top: 0.8rem;
}

.mobile-user i {
    color: #0d6efd;
    font-size: 1.2rem;
}

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
}

@media (min-width: 769px) {
    .mobile-menu {
        display: none !important;
    }
}

/* ============================================
   DARK MODE
   ============================================ */

@media (prefers-color-scheme: dark) {
    .navbar {
        background: #16213e;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .navbar-brand {
        color: #e8e8e8;
    }
    
    .nav-link {
        color: #a8a8b8;
    }
    
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.05);
        color: #e8e8e8;
    }
    
    .user-badge {
        color: #e8e8e8;
    }
    
    .mobile-toggle span {
        background: #e8e8e8;
    }
    
    .mobile-menu {
        background: #16213e;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .mobile-link {
        color: #a8a8b8;
    }
    
    .mobile-link:hover {
        background: rgba(255, 255, 255, 0.05);
        color: #e8e8e8;
    }
    
    .mobile-user {
        color: #e8e8e8;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }
}




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

.table-container {
    overflow-x: auto;
    margin: 0 -1rem;
    padding: 0 1rem;
}

.table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
}

.table thead th {
    background: var(--bg-color);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.8rem 1rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
    text-align: left;
}

.table tbody td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    vertical-align: middle;
    color: var(--text-primary);
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(13, 110, 253, 0.03);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table .text-end {
    text-align: right;
}

.table .text-center {
    text-align: center;
}

.table .text-muted {
    color: var(--text-secondary);
}

/* Table card wrapper */
.table-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: var(--spacing-lg);
}

.table-card .table-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.table-card .table-header h5 {
    margin-bottom: 0;
    font-weight: 600;
}

.table-card .table-header .badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
}

.table-card .table-body {
    padding: 0;
    overflow-x: auto;
}

/* Striped tables */
.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(0, 0, 0, 0.02);
}

.table-striped tbody tr:nth-of-type(odd):hover {
    background: rgba(13, 110, 253, 0.04);
}

/* Responsive table */
@media (max-width: 768px) {
    .table-container {
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .table-card .table-header {
        padding: 0.8rem 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   BUTTONS - ENHANCED
   ============================================ */

/* Base button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.5;
}

.btn:active {
    transform: scale(0.96);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Primary button */
.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.3);
}

/* Success button */
.btn-success {
    background: var(--success-color);
    color: white;
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.2);
}

.btn-success:hover {
    background: #157347;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(25, 135, 84, 0.3);
}

/* Danger button */
.btn-danger {
    background: var(--danger-color);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.btn-danger:hover {
    background: #bb2d3b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.3);
}

/* Warning button */
.btn-warning {
    background: var(--warning-color);
    color: #000;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.btn-warning:hover {
    background: #e6ae00;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.3);
}

/* Info button */
.btn-info {
    background: var(--info-color);
    color: #000;
    box-shadow: 0 2px 8px rgba(13, 202, 240, 0.2);
}

.btn-info:hover {
    background: #0ba8cc;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(13, 202, 240, 0.3);
}

/* Secondary button */
.btn-secondary {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}

.btn-secondary:hover {
    background: #5a6268;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(108, 117, 125, 0.3);
}

/* Outline buttons */
.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.2);
}

.btn-outline-success {
    background: transparent;
    color: var(--success-color);
    border: 2px solid var(--success-color);
}

.btn-outline-success:hover {
    background: var(--success-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(25, 135, 84, 0.2);
}

.btn-outline-danger {
    background: transparent;
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.2);
}

.btn-outline-warning {
    background: transparent;
    color: var(--warning-color);
    border: 2px solid var(--warning-color);
}

.btn-outline-warning:hover {
    background: var(--warning-color);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.2);
}

/* Button sizes */
.btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    border-radius: 6px;
}

.btn-lg {
    padding: 0.7rem 2rem;
    font-size: 1rem;
    border-radius: 10px;
}

.btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
}

/* Button with icon */
.btn i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.btn-sm i {
    font-size: 0.75rem;
}

.btn:hover i {
    transform: translateY(-2px);
}

.btn-danger:hover i,
.btn-success:hover i,
.btn-primary:hover i {
    transform: translateY(-2px);
}

/* Button group */
.btn-group {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.btn-group .btn {
    border-radius: 6px;
}

/* Action buttons in tables */
.btn-action {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 4px;
    min-width: 60px;
}

.btn-action i {
    font-size: 0.7rem;
}

/* Floating action buttons */
.btn-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 0;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(13, 110, 253, 0.4);
    z-index: 100;
}

.btn-float:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 30px rgba(13, 110, 253, 0.5);
}

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

@media (max-width: 576px) {
    .btn {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
    
    .btn-sm {
        padding: 0.2rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .btn-group {
        gap: 0.2rem;
    }
    
    .btn-float {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

/* ============================================
   DARK MODE - TABLES & BUTTONS
   ============================================ */

@media (prefers-color-scheme: dark) {
    .table thead th {
        background: rgba(255, 255, 255, 0.03);
        color: var(--text-secondary);
        border-bottom-color: rgba(255, 255, 255, 0.05);
    }
    
    .table tbody td {
        border-bottom-color: rgba(255, 255, 255, 0.04);
        color: var(--text-primary);
    }
    
    .table tbody tr:hover {
        background: rgba(255, 255, 255, 0.03);
    }
    
    .table-striped tbody tr:nth-of-type(odd) {
        background: rgba(255, 255, 255, 0.02);
    }
    
    .table-striped tbody tr:nth-of-type(odd):hover {
        background: rgba(255, 255, 255, 0.04);
    }
    
    .table-card {
        background: var(--card-bg);
    }
    
    .table-card .table-header {
        border-bottom-color: rgba(255, 255, 255, 0.05);
    }
    
    /* Dark mode buttons */
    .btn-secondary {
        background: #4a4a5a;
    }
    
    .btn-secondary:hover {
        background: #3a3a4a;
    }
    
    .btn-outline-primary {
        border-color: var(--primary-color);
        color: var(--primary-color);
    }
    
    .btn-outline-primary:hover {
        background: var(--primary-color);
        color: white;
    }
    
    .btn-outline-success {
        border-color: var(--success-color);
        color: var(--success-color);
    }
    
    .btn-outline-success:hover {
        background: var(--success-color);
        color: white;
    }
    
    .btn-outline-danger {
        border-color: var(--danger-color);
        color: var(--danger-color);
    }
    
    .btn-outline-danger:hover {
        background: var(--danger-color);
        color: white;
    }
}



/* ============================================
   MOBILE PWA OPTIMIZATIONS
   ============================================ */

/* Mobile-first adjustments for PWA */
@media (max-width: 576px) {
    /* Smaller headings for mobile */
    h1 { font-size: 1.4rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
    h4 { font-size: 1rem; }
    h5 { font-size: 0.9rem; }
    h6 { font-size: 0.85rem; }
    
    /* Body text */
    body {
        font-size: 0.9rem;
        padding-bottom: 70px;
    }
    
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    /* Card adjustments */
    .card {
        border-radius: 10px;
        margin-bottom: 0.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Stat cards - mobile */
    .stat-card {
        padding: 0.8rem 0.5rem;
    }
    
    .stat-card .icon {
        font-size: 1.6rem;
    }
    
    .stat-card .value {
        font-size: 1.2rem;
    }
    
    .stat-card .label {
        font-size: 0.65rem;
    }
    
    /* Financial summary - mobile */
    .financial-summary .h4 {
        font-size: 1rem !important;
    }
    
    .financial-summary .text-muted.small {
        font-size: 0.6rem;
    }
    
    .financial-summary .col-6,
    .financial-summary .col-3 {
        padding: 0.25rem;
    }
    
    .financial-summary .card-body {
        padding: 0.75rem 0.5rem;
    }
    
    /* Alerts - mobile */
    .alert {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
        border-radius: 8px;
    }
    
    .alert .badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }
    
    /* Buttons - mobile */
    .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        border-radius: 8px;
    }
    
    .btn-sm {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .btn-lg {
        font-size: 0.9rem;
        padding: 0.5rem 1.2rem;
    }
    
    .btn-block {
        padding: 0.5rem;
    }
    
    /* Tables - mobile */
    .table {
        font-size: 0.75rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.4rem 0.5rem;
    }
    
    /* Forms - mobile */
    .form-control {
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
    }
    
    .form-label {
        font-size: 0.8rem;
    }
    
    .form-select {
        font-size: 0.85rem;
        padding: 0.5rem 2rem 0.5rem 0.8rem;
    }
    
    /* Badges - mobile */
    .badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.5rem;
    }
    
    /* Progress bar - mobile */
    .progress {
        height: 5px;
    }
    
    /* Welcome section - mobile */
    .welcome-section h2 {
        font-size: 1.1rem;
    }
    
    .welcome-section .text-muted {
        font-size: 0.75rem;
    }
    
    /* Quick action buttons - mobile */
    .quick-actions .btn {
        padding: 0.6rem 0.3rem;
        font-size: 0.75rem;
    }
    
    .quick-actions .btn i {
        font-size: 0.8rem;
    }
    
    /* Bottom nav - mobile */
    .bottom-nav {
        padding: 0.3rem 0;
    }
    
    .bottom-nav-item {
        font-size: 0.55rem;
        padding: 0.15rem 0.3rem;
    }
    
    .bottom-nav-item .icon {
        font-size: 1.2rem;
    }
    
    /* Toast notifications - mobile */
    .toast-container {
        top: 0.5rem;
        right: 0.5rem;
        max-width: 95%;
    }
    
    .toast {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Extra small phones */
@media (max-width: 400px) {
    .stat-card .value {
        font-size: 1rem;
    }
    
    .stat-card .icon {
        font-size: 1.3rem;
    }
    
    .financial-summary .h4 {
        font-size: 0.85rem !important;
    }
    
    .btn {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    .table {
        font-size: 0.65rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.3rem 0.4rem;
    }
}

/* PWA safe area for notched phones */
@supports (padding: max(0px)) {
    .bottom-nav {
        padding-bottom: max(0.3rem, env(safe-area-inset-bottom));
    }
    
    .container {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
}

/* Touch-friendly targets (minimum 44px) */
@media (max-width: 768px) {
    .btn,
    .nav-link,
    .mobile-link,
    .bottom-nav-item,
    .form-control,
    .form-select {
        min-height: 44px;
    }
    
    .btn-sm {
        min-height: 32px;
    }
}


/* ============================================
   DROPDOWN MENU - 3 DOTS
   ============================================ */

.dropdown-toggle::after {
    display: none;
}

.dropdown-toggle {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.dropdown-toggle:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.dropdown-toggle:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    padding: 0.4rem;
    min-width: 180px;
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-item:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.dropdown-item i {
    width: 18px;
    font-size: 0.9rem;
}

.dropdown-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545 !important;
}

.dropdown-item.text-warning:hover {
    background: rgba(255, 193, 7, 0.08);
    color: #e6ae00 !important;
}

.dropdown-item.text-success:hover {
    background: rgba(25, 135, 84, 0.08);
    color: #157347 !important;
}

.dropdown-divider {
    border-color: rgba(0, 0, 0, 0.05);
    margin: 0.3rem 0;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .dropdown-menu {
        background: var(--card-bg);
        border-color: rgba(255, 255, 255, 0.05);
    }
    
    .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .dropdown-divider {
        border-color: rgba(255, 255, 255, 0.05);
    }
}



/* Fine Statistics Cards */
.fine-stat-card {
    padding: 1rem 0.5rem;
    text-align: center;
    border-radius: 10px;
    transition: all 0.3s ease;
}
.fine-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}
.fine-stat-card .fine-value {
    font-size: 1.3rem;
    font-weight: 700;
}
.fine-stat-card .fine-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin-top: 0.2rem;
}
.fine-stat-card .fine-icon {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}
.fine-stat-card.bg-danger-light { background: rgba(220, 53, 69, 0.08); }
.fine-stat-card.bg-success-light { background: rgba(25, 135, 84, 0.08); }
.fine-stat-card.bg-warning-light { background: rgba(255, 193, 7, 0.08); }
.fine-stat-card.bg-info-light { background: rgba(13, 202, 240, 0.08); }

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .fine-stat-card.bg-danger-light { background: rgba(220, 53, 69, 0.15); }
    .fine-stat-card.bg-success-light { background: rgba(25, 135, 84, 0.15); }
    .fine-stat-card.bg-warning-light { background: rgba(255, 193, 7, 0.15); }
    .fine-stat-card.bg-info-light { background: rgba(13, 202, 240, 0.15); }
}


/* Language form - prevent any extra spacing */
.lang-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.lang-form button {
    width: 100%;
}

/* Language dropdown - ensure it stays on top */
.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
    z-index: 9999;
    padding: 4px;
}

.lang-dropdown.show {
    display: block;
}

.lang-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: #212529;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.lang-option:hover {
    background: #f8f9fa;
    color: #0d6efd;
}

.lang-option.active {
    background: #0d6efd;
    color: white;
}

.lang-option.active:hover {
    background: #0b5ed7;
}

/* Mobile language buttons */
.mobile-lang-switcher {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 8px;
}

.mobile-lang-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: transparent;
    color: #212529;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.mobile-lang-btn:hover {
    background: #f8f9fa;
}

.mobile-lang-btn.active {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}


/* ============================================ */
/* LANGUAGE SWITCHER - CLEAN DROPDOWN */
/* ============================================ */
.language-switcher {
    position: relative;
    display: inline-block;
    margin-right: 15px;
}

.lang-btn {
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 0.85rem;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
    font-family: inherit;
}

.lang-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.lang-btn i {
    font-size: 0.75rem;
    color: #6b7280;
}

.lang-btn .fa-chevron-down {
    font-size: 0.6rem;
    margin-left: 2px;
    color: #9ca3af;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    min-width: 140px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: none;
    z-index: 9999;
    padding: 4px;
}

.lang-dropdown.show {
    display: block;
}

.lang-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.lang-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: #374151;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s;
    font-family: inherit;
}

.lang-option:hover {
    background: #f3f4f6;
}

.lang-option.active {
    background: #eff6ff;
    color: #2563eb;
}

.lang-option.active:hover {
    background: #dbeafe;
}

/* Mobile Language Switcher */
.mobile-lang-switcher {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 8px;
}

.mobile-lang-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: transparent;
    color: #374151;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    font-family: inherit;
}

.mobile-lang-btn:hover {
    background: #f9fafb;
}

.mobile-lang-btn.active {
    background: #eff6ff;
    color: #2563eb;
    border-color: #2563eb;
}

/* Responsive */
@media (max-width: 768px) {
    .language-switcher {
        margin-right: 8px;
    }
    
    .lang-btn {
        padding: 3px 10px;
        font-size: 0.8rem;
    }
    
    .lang-btn i {
        font-size: 0.7rem;
    }
}


