/* Reset and Base Styles */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    overflow-x: hidden;
}

/* Layout */
.wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

/* Sidebar Styling */
.sidebar {
    width: 250px;
    background: var(--sidebar-bg, #00001c);
    color: var(--sidebar-text, white);
    min-width: 250px;
    max-width: 250px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: all 0.3s;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.sidebar-header img {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* Sidebar Navigation Links */
.sidebar .nav-link {
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    background-color: #009e1e;
    color: white;
    box-shadow: inset 4px 0 0 white;
    font-weight: 500;
}

.sidebar li.active {
    background-color: rgba(0, 158, 30, 0.1);
}

.sidebar .nav-link.active i {
    color: white;
}

/* Sidebar Layout */
.d-flex.flex-column {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.nav.flex-column {
    flex: 1;
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

/* Profile Card Styling */
.profile-card {
    padding: 0.5rem 1rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.profile-img-container {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-email {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.375rem 0;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.profile-link:hover {
    color: #ffffff;
    text-decoration: none;
}

.profile-link i {
    width: 20px;
    text-align: center;
}

/* Chat Styling */
.chat-container {
    max-height: 600px;
    overflow-y: auto;
    padding: 1rem;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    max-width: 80%;
    margin: 0.5rem 0;
}

.chat-message.incoming {
    align-self: flex-start;
}

.chat-message.outgoing {
    align-self: flex-end;
}

.message-metadata {
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.message-bubble {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    position: relative;
    word-wrap: break-word;
}

.incoming .message-bubble {
    background-color: #f0f2f5;
    border-bottom-left-radius: 0.25rem;
}

.outgoing .message-bubble {
    background-color: #0084ff;
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.outgoing .message-metadata {
    text-align: right;
}

/* Calendar Styling */
.fc {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.fc .fc-toolbar-title {
    font-size: 1.5em;
    font-weight: 600;
}

.fc .fc-button-primary {
    background-color: #007bff;
    border-color: #0056b3;
}

.fc .fc-button-primary:hover {
    background-color: #0056b3;
    border-color: #004085;
}

.fc .fc-day-today {
    background-color: #f8f9fa !important;
}

.fc-event {
    border: none;
    padding: 2px 4px;
    margin: 1px 0;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85em;
}

.fc-event:hover {
    opacity: 0.9;
}

/* Calendar Container */
.calendar-container {
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
}

/* Calendar Header */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Appointment Status Colors */
.appointment-status-scheduled { 
    background-color: #ffa500 !important;
    color: #fff;
}
.appointment-status-confirmed { 
    background-color: #007bff !important;
    color: #fff;
}
.appointment-status-completed { 
    background-color: #28a745 !important;
    color: #fff;
}
.appointment-status-cancelled { 
    background-color: #dc3545 !important;
    color: #fff;
}
.appointment-status-no_show { 
    background-color: #6c757d !important;
    color: #fff;
}

.sidebar-header {
    padding: 20px;
    background: #141519;
}

.sidebar-header h3 {
    color: #fff;
    margin: 0;
    font-size: 1.5rem;
}

.sidebar .components {
    padding: 20px 0;
}

.sidebar ul li a {
    padding: 10px 20px;
    display: block;
    color: #a9a9b9;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar ul li a:hover,
.sidebar ul li.active a {
    color: #fff;
    background: #141519;
}

.sidebar ul li a i {
    margin-right: 10px;
}

/* Main Content Area */
#content {
    flex: 1;
    padding: 20px;
    background: var(--bg-primary, #f8f9fa);
    min-height: 100vh;
    width: calc(100% - 250px); /* Account for sidebar width */
    margin-left: 250px; /* Match sidebar width */
    transition: background-color 0.3s ease;
}

.main-content {
    padding-right: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Stats Cards */
.stat-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.icon-shape {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-shape i {
    font-size: 1.5rem;
}

/* Activity Feed */
.activity-feed {
    padding: 10px 0;
}

.activity-item {
    display: flex;
    align-items: start;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

/* Progress bars */
.metric-item {
    margin-bottom: 1rem;
}

.progress {
    height: 8px;
    border-radius: 4px;
}

/* Calendar */
.calendar-wrapper {
    min-height: 600px;
}

/* Right Sidebar */
.right-sidebar {
    background: #fff;
    border-left: 1px solid #eee;
    padding: 20px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .sidebar {
        margin-left: -250px;
    }
    
    .sidebar.active {
        margin-left: 0;
    }
    
    .right-sidebar {
        border-left: none;
        border-top: 1px solid #eee;
        margin-top: 20px;
        padding-top: 20px;
    }
}