/* ==========================================================================
   FELIZ.HEALTH - Admin Dashboard Custom Styles
   ========================================================================== */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --navbar-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    overflow-x: hidden;
}

/* ==========================================================================
   Sidebar Styles
   ========================================================================== */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar-header h4 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.sidebar-header i {
    color: #ff6b6b;
    margin-right: 8px;
}

.sidebar-menu {
    list-style: none;
    padding: 15px 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: #ff6b6b;
}

.sidebar-menu a.active {
    background: rgba(255,255,255,0.15);
    color: white;
    border-left-color: #ff6b6b;
    font-weight: 500;
}

.sidebar-menu a i {
    width: 25px;
    margin-right: 10px;
}

.submenu {
    list-style: none;
    padding-left: 0;
    background: rgba(0,0,0,0.15);
}

.submenu li a {
    padding-left: 45px;
    font-size: 0.9rem;
}

.menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 15px 20px;
}

.dropdown-toggle .fa-chevron-down {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown-toggle[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Top Navbar */
.top-navbar {
    background: white;
    height: var(--navbar-height);
    padding: 0 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-toggle {
    font-size: 1.3rem;
    color: var(--secondary-color);
    padding: 8px 12px;
}

.sidebar-toggle:hover {
    color: var(--primary-color);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-right .btn-link {
    color: var(--secondary-color);
    text-decoration: none;
}

.navbar-right .btn-link:hover {
    color: var(--primary-color);
}

/* Content Wrapper */
.content-wrapper {
    padding: 30px;
}

.content-header {
    margin-bottom: 30px;
}

.content-header h2 {
    margin-bottom: 5px;
    color: #333;
    font-weight: 600;
}

/* ==========================================================================
   Cards & Components
   ========================================================================== */

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-header {
    background: white;
    border-bottom: 2px solid var(--light-bg);
    padding: 15px 20px;
    font-weight: 600;
}

.card-header h5 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

.card-header i {
    margin-right: 8px;
    color: var(--primary-color);
}

.card-body {
    padding: 20px;
}

/* Stats Cards */
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.stat-icon.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-icon.bg-warning {
    background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
}

.stat-icon.bg-info {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.stat-content h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #333;
}

.stat-content p {
    margin: 0;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Activity Items */
.activity-item {
    display: flex;
    align-items: start;
    gap: 15px;
    padding: 15px;
    border-left: 3px solid var(--light-bg);
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: var(--light-bg);
    border-left-color: var(--primary-color);
}

.activity-item i {
    font-size: 1.3rem;
    margin-top: 3px;
}

.activity-content {
    flex: 1;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.form-control, .form-select {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.15);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-responsive {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.table {
    margin-bottom: 0;
}

.table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.table thead th {
    border: none;
    padding: 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(102,126,234,0.05);
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-weight: bold;
}

.status-badge.inactive {
    background-color: #fee;
    color: var(--danger-color);
}

.status-badge.active {
    background-color: #efe;
    color: var(--success-color);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-success {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
    color: #333;
}

.btn-info {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

/* ==========================================================================
   Modals
   ========================================================================== */

.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 20px 25px;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-title {
    font-weight: 600;
    font-size: 1.2rem;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #f0f0f0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-wrapper {
        padding: 20px 15px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-primary-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge-custom {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.85rem;
}

/* Multi-select styling */
.form-check {
    padding: 8px 0;
}

.form-check-label {
    margin-left: 5px;
}

/* File upload styling */
.file-upload-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.file-upload-wrapper label {
    display: block;
    margin-bottom: 8px;
}

/* Dynamic diagnostic list */
.diagnostic-options {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.diagnostic-options h6 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

/* Document upload section */
.document-upload-item {
    background: var(--light-bg);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 3px solid var(--primary-color);
}

.document-upload-item:last-child {
    margin-bottom: 0;
}

/* Page title */
.page-title {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-bg);
}

.page-title h2 {
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
}

.page-title .breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}
