/* =====================================================
   Modern Lifestyle Theme - Global Overrides & Enhancements
   ===================================================== */

/* Override Bootstrap & Default Styles */

body {
    background-color: #f5f7fa !important;
}

/* Users Search - Grid Layout with 4 items per row on desktop */

.users-list-container {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1.5rem !important;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    padding: 1rem calc(50vw - 50%) !important;
}

/* List view - one item per row */
.users-list-container[style*="display:flex"] {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: auto !important;
    gap: 1rem !important;
}

@media (min-width: 1400px) {
    .users-list-container {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .users-list-container {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .users-list-container {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .users-list-container {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .users-list-container[style*="display:flex"] {
        display: flex !important;
        flex-direction: column !important;
    }
}

@media (max-width: 767px) {
    .users-list-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .users-list-container[style*="display:flex"] {
        display: flex !important;
        flex-direction: column !important;
    }
}

@media (max-width: 480px) {
    .users-list-container {
        grid-template-columns: 1fr !important;
    }
    
    .users-list-container[style*="display:flex"] {
        display: flex !important;
        flex-direction: column !important;
    }
}

/* List view styles */

.user-list-item {
    width: 100% !important;
}

@media (max-width: 768px) {
    .user-list-item {
        flex-direction: column !important;
    }
    
    .user-list-item > div:first-child {
        width: 100% !important;
        height: 200px !important;
    }
}

.content-block {
    background: white !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
    border: none !important;
    margin: 1.5rem 0 !important;
}

.card {
    border-radius: 16px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important;
}

/* Forms */

.form-control {
    border-radius: 8px !important;
    border: 1px solid #e8eaed !important;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease !important;
}

.form-control:focus {
    border-color: #4fc3f7 !important;
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.1) !important;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
    border-radius: 8px !important;
    border: 1px solid #e8eaed !important;
}

/* Buttons */

.btn {
    border-radius: 50px !important;
    padding: 0.7rem 1.5rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.btn-primary,
.btn_border {
    background-color: #4fc3f7 !important;
    color: white !important;
}

.btn-primary:hover,
.btn_border:hover {
    background-color: #0288d1 !important;
    box-shadow: 0 4px 16px rgba(79, 195, 247, 0.4) !important;
}

.btn-secondary {
    background-color: #26a69a !important;
    color: white !important;
}

.btn-secondary:hover {
    background-color: #1f8f83 !important;
}

.btn-outline-primary {
    border: 2px solid #4fc3f7 !important;
    color: #4fc3f7 !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background-color: #4fc3f7 !important;
    color: white !important;
}

/* Badges & Pills */

.badge {
    border-radius: 50px !important;
    padding: 0.35rem 0.75rem !important;
    font-weight: 600 !important;
}

.badge-primary {
    background-color: rgba(79, 195, 247, 0.15) !important;
    color: #4fc3f7 !important;
}

.badge-success {
    background-color: rgba(76, 175, 80, 0.15) !important;
    color: #4caf50 !important;
}

/* User Cards & Preview */

.user-card {
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease !important;
}

.user-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-4px) !important;
}

.user-card-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.user-card-body {
    padding: 1.5rem;
}

.user-card-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.user-card-info {
    font-size: 0.875rem;
    color: #666;
}

.user-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #999;
}

/* List & Grid Layouts */

.users-list,
.items-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
    padding: 1.5rem 0 !important;
}

@media (max-width: 768px) {
    .users-list,
    .items-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
        gap: 1rem !important;
    }
}

@media (max-width: 480px) {
    .users-list,
    .items-list {
        grid-template-columns: 1fr !important;
    }
}

.list-item {
    background: white !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease !important;
}

.list-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-2px) !important;
}

/* Headers & Navigation */

.page-header {
    border-bottom: 2px solid #f0f0f0 !important;
    padding: 1rem 0 !important;
    margin-bottom: 2rem !important;
}

.page-header h1 {
    color: #333 !important;
    font-weight: 600 !important;
}

.navbar {
    background: white !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    padding: 1rem 0 !important;
}

.navbar-brand {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #4fc3f7 !important;
}

.nav-link {
    color: #333 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

.nav-link:hover,
.nav-link.active {
    color: #4fc3f7 !important;
    background: rgba(79, 195, 247, 0.1) !important;
}

/* Spacing */

.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }

.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2rem !important; }

.p-1 { padding: 0.5rem !important; }
.p-2 { padding: 1rem !important; }
.p-3 { padding: 1.5rem !important; }
.p-4 { padding: 2rem !important; }

/* Utilities */

.d-flex {
    display: flex !important;
}

.gap-1 { gap: 0.5rem !important; }
.gap-2 { gap: 1rem !important; }
.gap-3 { gap: 1.5rem !important; }

.align-items-center {
    align-items: center !important;
}

.justify-content-center {
    justify-content: center !important;
}

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

.text-center { text-align: center !important; }
.text-secondary { color: #666 !important; }
.text-light { color: #999 !important; }

/* Status Indicators */

.status-online,
.online-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #4caf50;
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

.status-offline {
    background-color: #999;
    animation: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

/* Pagination */

.pagination {
    display: flex !important;
    gap: 0.5rem !important;
    justify-content: center !important;
    margin: 2rem 0 !important;
}

.page-link {
    padding: 0.5rem 0.75rem !important;
    border-radius: 8px !important;
    border: 1px solid #e8eaed !important;
    color: #333 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.page-link:hover,
.page-link.active {
    background-color: #4fc3f7 !important;
    color: white !important;
    border-color: #4fc3f7 !important;
}

/* Animations */

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

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Responsive Design */

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.5rem !important;
    }

    .user-card-image {
        height: 220px !important;
    }

    .btn {
        padding: 0.6rem 1.25rem !important;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 13px !important;
    }

    .page-header h1 {
        font-size: 1.25rem !important;
    }

    .user-card-image {
        height: 180px !important;
    }

    .btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
    }

    .d-flex {
        flex-direction: column !important;
    }
}
