/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f8f9fa;
    padding-bottom: 70px;
    font-size: 13px;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
}

.login-card .logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-card .logo h2 {
    color: #333;
    font-weight: 700;
    font-size: 24px;
}

.login-card .logo p {
    color: #666;
    font-size: 14px;
}

/* Cards & Containers */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 12px;
}

.card-header {
    background: white;
    border-bottom: 1px solid #f0f0f0;
    padding: 10px 15px;
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
    font-size: 14px;
}

/* Compact Household Items */
.household-item {
    background: white;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border-left: 3px solid #ffc107;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.household-item:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.household-item.completed {
    border-left-color: #28a745;
}

.household-item .name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.household-item .details {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.household-item .badge-status {
    float: right;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.badge-pending {
    background: #fff3cd;
    color: #856404;
}

.badge-completed {
    background: #d4edda;
    color: #155724;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-around;
    padding: 4px 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #999;
    text-decoration: none;
    font-size: 10px;
    padding: 4px 12px;
    border-radius: 6px;
    transition: all 0.3s;
}

.bottom-nav a i {
    font-size: 18px;
    margin-bottom: 1px;
}

.bottom-nav a.active {
    color: #667eea;
    background: #f0f2ff;
}

.bottom-nav a:hover {
    color: #667eea;
    text-decoration: none;
}

/* Stats - Compact */
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 12px 10px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 10px;
    border-left: 3px solid #667eea;
}

.stat-card .number {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.stat-card .label {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

.stat-card.completed {
    border-left-color: #28a745;
}

.stat-card.pending {
    border-left-color: #ffc107;
}

.stat-card.total {
    border-left-color: #17a2b8;
}

/* Search Box with Clear Button */
.search-box {
    position: relative;
    margin-bottom: 12px;
}

.search-box input {
    padding-left: 35px;
    padding-right: 35px;
    border-radius: 20px;
    border: 2px solid #e0e0e0;
    height: 38px;
    font-size: 14px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
}

.search-box .clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    display: none;
    font-size: 16px;
}

.search-box .clear-btn.visible {
    display: block;
}

.search-box .clear-btn:hover {
    color: #333;
}

/* Forms - Compact */
.form-container {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.form-control {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 8px 12px;
    font-size: 14px;
    height: 40px;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.15rem rgba(102, 126, 234, 0.1);
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

/* Buttons - Compact */
.btn {
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    border-color: #667eea;
}

.btn-primary:hover {
    background: #5a6fd6;
    border-color: #5a6fd6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-lg {
    padding: 10px 20px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* Tables - Compact */
.table-responsive {
    border-radius: 8px;
    overflow-x: auto;
}

.table {
    margin-bottom: 0;
    font-size: 12px;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #666;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 8px 6px;
}

.table td {
    vertical-align: middle;
    font-size: 12px;
    padding: 6px 6px;
}

/* Pagination - Compact */
.pagination {
    margin: 10px 0 5px;
}

.pagination .page-link {
    padding: 4px 10px;
    font-size: 12px;
}

/* Progress Bar */
.progress-custom {
    height: 6px;
    border-radius: 8px;
    background: #e9ecef;
    margin: 8px 0;
}

.progress-custom .progress-bar {
    border-radius: 8px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.6s ease;
    font-size: 10px;
    line-height: 6px;
}

/* Quick Actions */
.quick-action {
    background: white;
    border-radius: 10px;
    padding: 15px 10px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.3s;
    cursor: pointer;
    margin-bottom: 10px;
}

.quick-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.quick-action i {
    font-size: 28px;
    color: #667eea;
    margin-bottom: 5px;
}

.quick-action .title {
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.quick-action .desc {
    font-size: 11px;
    color: #666;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 30px 15px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.upload-area i {
    font-size: 36px;
    color: #667eea;
    margin-bottom: 10px;
}

.upload-area .text {
    color: #666;
    font-size: 13px;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 12px;
    font-size: 13px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .login-card {
        padding: 25px 20px;
    }
    
    .stat-card .number {
        font-size: 20px;
    }
    
    .household-item {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .household-item .name {
        font-size: 13px;
    }
    
    .bottom-nav a {
        font-size: 9px;
        padding: 3px 8px;
    }
    
    .bottom-nav a i {
        font-size: 16px;
    }
    
    .btn-lg {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .form-control {
        font-size: 13px;
        height: 36px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-overlay.show {
    display: flex;
}

.spinner-border {
    width: 2rem;
    height: 2rem;
}



/* Additional styles for admin dashboard */
.card-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 14px;
}

.card-header i {
    margin-right: 8px;
}

/* Modal improvements */
.modal-content {
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.modal-header {
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.modal-footer {
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* Table row hover */
.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Badge improvements */
.badge {
    font-weight: 500;
    padding: 4px 10px;
    font-size: 11px;
}

/* Alert improvements */
.alert {
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 13px;
}

/* Progress bar text */
.progress-bar {
    font-size: 11px;
    line-height: 20px;
    font-weight: 600;
}