/* HealthTrack Dashboard CSS */
:root {
    --teal: #20b2aa;
    --green: #4caf50;
    --blue: #2196f3;
    --light-blue: #64b5f6;
    --bg: #f6fbfc;
    --card-bg: #ffffff;
    --shadow: 0 2px 8px rgba(32, 178, 170, 0.08);
    --font-main: 'Segoe UI', Arial, sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-main);
    background: var(--bg);
    color: #222;
}

.dashboard-container {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--teal);
    color: #fff;
    padding: 2rem 1rem;
    min-height: 100vh;
    box-shadow: var(--shadow);
}
.sidebar nav ul {
    list-style: none;
    padding: 0;
}
.sidebar nav ul li {
    margin-bottom: 1.5rem;
}
.sidebar nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    transition: color 0.2s;
}
.sidebar nav ul li a:hover {
    color: var(--light-blue);
}

.main-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
}
.profile-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.profile-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--teal);
}
.profile-name {
    font-weight: 600;
    font-size: 1.2rem;
    color: black;
}
.para{
    color: black;
}
.tab{
    color: black;
}
.notifications {
    font-size: 1.5rem;
    color: var(--teal);
    cursor: pointer;
}

main {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.health-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.card.metric-card {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: box-shadow 0.2s;
}
.card.metric-card:hover {
    box-shadow: 0 4px 16px rgba(32, 178, 170, 0.15);
}
.metric-icon {
    font-size: 2.5rem;
}
.card h3 {
    margin: 0 0 0.3rem 0;
    font-size: 1.1rem;
    color: var(--teal);
}
.card p {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 500;
}

.appointments-section h2,
.prescriptions-section h2,
.profile-section h2 {
    color: var(--blue);
    margin-bottom: 1rem;
}

.appointments-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    border-radius: 0.7rem;
    overflow: hidden;
}
.appointments-table th,
.appointments-table td {
    padding: 0.8rem 1rem;
    text-align: left;
    font-size: 1rem;
}
.appointments-table th {
    background: var(--light-blue);
    color: #fff;
}
.appointments-table tr:nth-child(even) {
    background: #f0f8fa;
}
.appointments-table tr:nth-child(odd) {
    background: #fff;
}

.prescription-list {
    list-style: none;
    padding: 0;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    border-radius: 0.7rem;
    margin: 0;
}
.prescription-list li {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e0f7fa;
    font-size: 1rem;
}
.prescription-list li:last-child {
    border-bottom: none;
}
.prescription-list strong {
    color: var(--green);
}
.prescription-list span {
    color: #555;
    font-size: 0.95rem;
}

.profile-details {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    border-radius: 0.7rem;
    padding: 1.5rem;
    font-size: 1rem;
    color: #333;
}
.profile-details p {
    margin: 0.5rem 0;
}

/* Responsive Design */
@media (max-width: 900px) {
    .dashboard-container {
        grid-template-columns: 70px 1fr;
    }
    .sidebar {
        padding: 1rem 0.5rem;
    }
    .sidebar nav ul li a {
        font-size: 0.95rem;
        gap: 0.3rem;
    }
    .profile-img {
        width: 36px;
        height: 36px;
    }
    main {
        padding: 1rem;
    }
}
@media (max-width: 600px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        box-shadow: 0 2px 8px rgba(32, 178, 170, 0.12);
    }
    .sidebar nav ul {
        display: flex;
        flex-direction: row;
        gap: 1.2rem;
    }
    .main-content {
        margin-top: 60px;
    }
}

/* Accessibility */
:focus {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
    body {
        background: #1a2226;
        color: #eee;
    }
    .sidebar {
        background: #174c4f;
    }
    .main-content, .card, .appointments-table, .prescription-list, .profile-details {
        background: #232b2f;
        color: #eee;
    }
    .appointments-table th {
        background: #174c4f;
        color: #fff;
    }
}
