/* ============================================================
   HOUSING COMMUNITY ACCOUNTS - STYLESHEET
   Modern, Professional, Mobile-Responsive Design
   ============================================================ */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation Bar */
.navbar {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5f8d 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.navbar-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-menu {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,0.2);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: white;
    font-size: 0.9rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.card h2 {
    color: #1e3a5f;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.card h3 {
    color: #2c5f8d;
    margin: 1.5rem 0 1rem 0;
    font-size: 1.1rem;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.stat-card.stat-blue .stat-icon { background: #e3f2fd; }
.stat-card.stat-green .stat-icon { background: #e8f5e9; }
.stat-card.stat-red .stat-icon { background: #ffebee; }
.stat-card.stat-orange .stat-icon { background: #fff3e0; }

.stat-info h3 {
    font-size: 1.8rem;
    color: #1e3a5f;
    margin: 0;
}

.stat-info p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3a5f, #2c5f8d);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(30, 58, 95, 0.3);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

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

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

/* Action Buttons */
.action-buttons, .report-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

/* Forms */
.form-horizontal, .form-vertical {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: #1e3a5f;
}

.form-group input[readonly] {
    background: #f8f9fa;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

.form-section {
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.help-text {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.suggestion-box {
    background: #e8f4f8;
    border-left: 4px solid #17a2b8;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 5px;
}

/* Month Selection Grid */
.months-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.month-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.month-check {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.month-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.month-check select {
    flex: 1;
    padding: 0.5rem;
}

.month-amount input {
    width: 120px;
    padding: 0.5rem;
}

.total-display {
    background: #fff3cd;
    border: 2px solid #ffc107;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    text-align: center;
    font-size: 1.1rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th, .table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table-sm th, .table-sm td {
    padding: 0.5rem;
    font-size: 0.9rem;
}

.total-row {
    background: #e8f4f8 !important;
    font-weight: bold;
}

.inactive-row {
    opacity: 0.5;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-secondary {
    background: #6c757d;
    color: white;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

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

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

/* Text Utilities */
.text-muted {
    color: #6c757d;
}

.text-danger {
    color: #dc3545;
}

.text-success {
    color: #28a745;
}

/* Grid System */
.row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.col-md-6 {
    grid-column: span 1;
}

.col-md-5 {
    grid-column: span 1;
}

.col-md-7 {
    grid-column: span 1;
}

@media (min-width: 768px) {
    .row {
        grid-template-columns: repeat(12, 1fr);
    }
    .col-md-6 {
        grid-column: span 6;
    }
    .col-md-5 {
        grid-column: span 5;
    }
    .col-md-7 {
        grid-column: span 7;
    }
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5f8d 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: #1e3a5f;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #6c757d;
    font-size: 0.9rem;
}

.login-form {
    margin-bottom: 1.5rem;
}

.login-footer {
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
}

.login-footer p {
    margin: 0.5rem 0;
}

/* Financial Summary */
.financial-summary {
    display: grid;
    gap: 2rem;
}

.summary-section {
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    padding: 1.5rem;
}

.summary-section h3 {
    color: #1e3a5f;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .navbar-menu {
        width: 100%;
        flex-direction: column;
    }
    
    .nav-link {
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .months-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons, .report-buttons {
        grid-template-columns: 1fr;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table th, .table td {
        padding: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .navbar {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    body {
        background: white;
    }
}

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

.card, .stat-card {
    animation: fadeIn 0.5s ease-out;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
