/* Custom styles for Jamuhuri Property Billing System */

:root {
    /* Custom color variables to complement Bootstrap dark theme */
    --jamuhuri-primary: #0d6efd;
    --jamuhuri-success: #198754;
    --jamuhuri-warning: #ffc107;
    --jamuhuri-danger: #dc3545;
    --jamuhuri-info: #0dcaf0;
}

/* Body and general layout */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navigation enhancements */
.navbar-brand {
    font-weight: 600;
}

.nav-link.active {
    font-weight: 500;
}

/* Card enhancements */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(255, 255, 255, 0.125);
}

.card-header {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.125);
}

/* Dashboard metric cards */
.card.bg-primary,
.card.bg-success,
.card.bg-danger,
.card.bg-warning,
.card.bg-info {
    border: none;
}

/* Form enhancements */
.form-control,
.form-select {
    background: var(--bs-dark);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--bs-light);
}

.form-control:focus,
.form-select:focus {
    background: var(--bs-dark);
    border-color: var(--bs-primary);
    color: var(--bs-light);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Button enhancements */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
}

.btn-primary {
    background: var(--jamuhuri-primary);
    border-color: var(--jamuhuri-primary);
}

/* Table enhancements */
.table {
    color: var(--bs-light);
}

.table-responsive {
    border-radius: 0.375rem;
}

/* Badge enhancements */
.badge {
    font-weight: 500;
}

/* Alert enhancements */
.alert {
    border: none;
    border-radius: 0.5rem;
}

.alert-success {
    background: rgba(25, 135, 84, 0.1);
    color: #75b798;
    border-left: 4px solid var(--jamuhuri-success);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #ea868f;
    border-left: 4px solid var(--jamuhuri-danger);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffda6a;
    border-left: 4px solid var(--jamuhuri-warning);
}

.alert-info {
    background: rgba(13, 202, 240, 0.1);
    color: #6edff6;
    border-left: 4px solid var(--jamuhuri-info);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Chart containers */
.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h5 {
        font-size: 1.1rem;
    }
}

/* Extra small devices */
@media (max-width: 576px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 0.25rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .alert,
    footer {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        break-inside: avoid;
    }
    
    .card-header {
        background: #f8f9fa !important;
        color: #000 !important;
    }
    
    body {
        color: #000 !important;
        background: #fff !important;
    }
}

/* Custom animations */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* Status indicators */
.status-active {
    color: var(--jamuhuri-success);
}

.status-inactive {
    color: var(--jamuhuri-danger);
}

.status-pending {
    color: var(--jamuhuri-warning);
}

/* Custom spacing utilities */
.mb-half {
    margin-bottom: 0.5rem !important;
}

.mt-half {
    margin-top: 0.5rem !important;
}

/* Focus states for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--bs-light);
    }
    
    .btn {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .fade-in {
        animation: none;
    }
    
    * {
        transition: none !important;
        animation: none !important;
    }
}
