/* Base styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1f2e;
    color: #e1e4e8;
}

.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #1a1f2e;
}

/* Header styles */
.dashboard-header {
    background-color: #2a3142;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logo {
    height: 40px;
    width: auto;
}

.header-right {
    display: flex;
    align-items: center;
}

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

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #e1e4e8;
}

.user-title {
    font-size: 0.9rem;
    color: #a0aec0;
}

.user-avatar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar .avatar-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.user-avatar i {
    color: #a0aec0;
    font-size: 0.8rem;
}

/* Dropdown menu styles */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #2a3142;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    min-width: 150px;
    display: none;
    z-index: 1000;
    margin-top: 0.5rem;
}

.user-dropdown.show {
    display: block;
}

.dropdown-item {
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    background: none;
    color: #e1e4e8;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #3a4155;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

/* Stats Bar styles */
.stats-bar {
    background-color: #2a3142;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.date-widget {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.date-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #a0aec0;
    text-align: center;
}

.date-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.date-nav {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #a0aec0;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.date-nav:hover {
    background-color: #3a4155;
}

.current-date {
    font-size: 1.2rem;
    font-weight: 600;
    min-width: 200px;
    text-align: center;
    color: #e1e4e8;
}

.visits-widget {
    display: flex;
    gap: 2rem;
}

.visit-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.stat-circle.blue { background-color: #3498db; }
.stat-circle.orange { background-color: #f39c12; }
.stat-circle.green { background-color: #2ecc71; }

.stat-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: #e1e4e8;
}

.stat-label {
    color: #a0aec0;
    font-size: 0.9rem;
}

.add-patient-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-patient-btn:hover {
    background-color: #2980b9;
}

/* Dashboard Content styles */
.dashboard-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    flex: 1;
    background-color: #1a1f2e;
}

.dashboard-column {
    background-color: #2a3142;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.column-header {
    padding: 1rem;
    border-bottom: 1px solid #3a4155;
}

.column-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #e1e4e8;
}

.column-content {
    padding: 1rem;
    flex: 1;
    background-color: #2a3142;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .visits-widget {
        flex-direction: column;
        gap: 1rem;
    }

    .date-widget {
        justify-content: center;
    }
}

/* Records Dashboard styles */
.records-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    border-bottom: 1px solid #3a4155;
    margin-bottom: 1rem;
}

.tab-button {
    background: none;
    border: none;
    color: #a0aec0;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.tab-button:hover {
    background-color: #3a4155;
    color: #e1e4e8;
}

.tab-button.active {
    background-color: #3498db;
    color: white;
}

.records-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.5rem;
    overflow-y: auto;
    max-height: calc(100vh - 400px);
}

.record-card {
    background-color: #2a3142;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    cursor: pointer;
}

.record-card:hover {
    background-color: #3a4155;
    transform: translateX(4px);
}

.record-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.patient-name {
    font-weight: 600;
    color: #e1e4e8;
    font-size: 1rem;
}

.visit-datetime {
    color: #a0aec0;
    font-size: 0.9rem;
}

.record-status {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.record-status.completed {
    background-color: #2ecc71;
    color: white;
}

.record-status.pending {
    background-color: #f39c12;
    color: white;
}

.record-status.awaiting {
    background-color: #3498db;
    color: white;
}

.record-status.billed {
    background-color: #9b59b6;
    color: white;
}

/* Hide records based on filter */
.record-card.hidden {
    display: none;
}

/* Calendar Timeline styles */
.timeline-container {
    height: 600px;
    overflow-y: auto;
    padding: 1rem;
    position: relative;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.timeline-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.timeline {
    position: relative;
    padding-left: 60px;
    height: 2400px; /* 24 hours * 100px per hour */
}

/* Remove scrollbar-related styles */
.timeline-scroll-controls,
.scroll-button,
.scroll-track,
.scroll-thumb {
    display: none;
}

.appointment-status.completed {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #2ecc71;
    display: flex;
    align-items: center;
    justify-content: center;
}

.appointment-status.completed i {
    color: white;
    font-size: 0.8rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: repeating-linear-gradient(
            to bottom,
            #3498db 0,
            #3498db 4px,
            transparent 4px,
            transparent 8px
    );
}

.hour-marker {
    position: absolute;
    left: 0;
    width: 45px;
    text-align: right;
    color: #a0aec0;
    font-size: 0.9rem;
    padding: 0.5rem;
    transform: translateY(-50%);
}

/* Position each hour marker */
.hour-marker[data-hour="0"] { top: 0%; }
.hour-marker[data-hour="1"] { top: 4.17%; }
.hour-marker[data-hour="2"] { top: 8.33%; }
.hour-marker[data-hour="3"] { top: 12.5%; }
.hour-marker[data-hour="4"] { top: 16.67%; }
.hour-marker[data-hour="5"] { top: 20.83%; }
.hour-marker[data-hour="6"] { top: 25%; }
.hour-marker[data-hour="7"] { top: 29.17%; }
.hour-marker[data-hour="8"] { top: 33.33%; }
.hour-marker[data-hour="9"] { top: 37.5%; }
.hour-marker[data-hour="10"] { top: 41.67%; }
.hour-marker[data-hour="11"] { top: 45.83%; }
.hour-marker[data-hour="12"] { top: 50%; }
.hour-marker[data-hour="13"] { top: 54.17%; }
.hour-marker[data-hour="14"] { top: 58.33%; }
.hour-marker[data-hour="15"] { top: 62.5%; }
.hour-marker[data-hour="16"] { top: 66.67%; }
.hour-marker[data-hour="17"] { top: 70.83%; }
.hour-marker[data-hour="18"] { top: 75%; }
.hour-marker[data-hour="19"] { top: 79.17%; }
.hour-marker[data-hour="20"] { top: 83.33%; }
.hour-marker[data-hour="21"] { top: 87.5%; }
.hour-marker[data-hour="22"] { top: 91.67%; }
.hour-marker[data-hour="23"] { top: 95.83%; }
.hour-marker[data-hour="24"] { top: 100%; }

/* Update appointment card positioning */
.appointment-card {
    position: absolute;
    left: 60px;
    right: 20px;
    background-color: #2a3142;
    border-radius: 8px;
    padding: 0.8rem;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    height: 60px; /* Fixed height for appointment cards */
}

.appointment-card:hover {
    background-color: #3a4155;
    transform: translateX(4px);
}

/* Calculate positions for appointment cards based on 24-hour period */
.appointment-card[data-hour="10"] { top: 41.67%; }
.appointment-card[data-hour="14"] { top: 58.33%; }
.appointment-card[data-hour="15"] { top: 62.5%; }

/* Add JavaScript to dynamically position cards based on minutes */
.appointment-card[data-minute="30"] { top: calc(var(--hour) * 4.17% + 2.08%); }
.appointment-card[data-minute="15"] { top: calc(var(--hour) * 4.17% + 1.04%); }
.appointment-card[data-minute="45"] { top: calc(var(--hour) * 4.17% + 3.13%); }

.appointment-time {
    min-width: 80px;
    color: #3498db;
    font-weight: 600;
    font-size: 0.9rem;
}

.appointment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.appointment-name {
    font-weight: 600;
    color: #e1e4e8;
    font-size: 1rem;
}

.appointment-complaint {
    color: #a0aec0;
    font-size: 0.9rem;
}

.appointment-status {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
}

.appointment-status.completed {
    color: #2ecc71;
}

/* Announcements styles */
.announcements-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.announcement-card {
    background-color: #2a3142;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s;
}

.announcement-card:hover {
    background-color: #3a4155;
    transform: translateX(4px);
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.announcement-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #e1e4e8;
}

.time-away {
    background-color: #3498db;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.announcement-description {
    color: #a0aec0;
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.announcement-link {
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.announcement-link:hover {
    color: #2980b9;
}