:root {
    --primary: #2c7be5;
    --bg-light: #f9fbfd;
    --text-dark: #12263f;
    --white: #ffffff;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    display: flex; /* Creates sidebar side-by-side with main content */
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 240px;
    background: var(--white);
    border-right: 1px solid #e3ebf6;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.logo { font-size: 1.5rem; font-weight: bold; color: var(--primary); margin-bottom: 30px; }

nav a {
    text-decoration: none;
    color: #6e84a3;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 5px;
    display: block;
}

nav a.active, nav a:hover { background: #e3ebf6; color: var(--primary); }

/* Main Content Area */
.main-container { flex: 1; display: flex; flex-direction: column; }

header {
    background: var(--white);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e3ebf6;
}

header input { padding: 10px; border-radius: 5px; border: 1px solid #ddd; width: 300px; }

/* Grid for Stats */
.content { padding: 30px; }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0.75rem 1.5rem rgba(18,38,63,.03);
}

.border-alert { border-left: 5px solid #e63757; }

.number { font-size: 1.8rem; font-weight: bold; color: var(--text-dark); }

/* Table Styling */
.patient-table { background: var(--white); padding: 20px; border-radius: 10px; }

.table-wrapper { overflow-x: auto; } /* Makes table scrollable on mobile */

table { width: 100%; border-collapse: collapse; margin-top: 15px; }

th, td { text-align: left; padding: 12px; border-bottom: 1px solid #e3ebf6; }

.status { padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; }
.confirm { background: #d2f4ea; color: #02a8b5; }
.pending { background: #fdf2d5; color: #9c7d12; }

/* Responsive Adjustments */
@media (max-width: 768px) {
    body { flex-direction: column; }
    .sidebar { width: 100%; height: auto; }
    header input { width: 100%; margin-right: 10px; }
}