/* General Reset & Base */
body {
    background: #f7f7f7;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #222;
}

.container,
.main-content {
    margin-left: 210px; /* same as sidebar width */
    padding: 85px 24px 24px 24px;
    box-sizing: border-box;
    min-height: calc(100vh - 60px);
    background: #f7f7f7;
}
.full-width {
    width: 100%;
    margin-left: 0px !important;
}
h2, h3 {
    text-align: center;
    color: #3a3a3a;
    margin-top: 0;
}
.formContainer, .modal-content {
    margin: 0 auto;
    max-width: 450px;
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}
form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 auto;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    background: #fafafa;
    transition: border 0.2s;
}

input:focus, select:focus, textarea:focus {
    border-color: #007bff;
    outline: none;
}

button {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: #0056b3;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Top Navigation Bar --- */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 200;
    padding: 0 32px;
    box-sizing: border-box;
}

.app-title {
    font-size: 1.7em;
    color: #007bff;
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.user-profile {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
}

.profile-pic {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    border: 2px solid #007bff;
    background: #f7f7f7;
}

.profile-name {
    font-weight: 500;
    color: #333;
}

.profile-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 48px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    min-width: 120px;
    z-index: 300;
}

.profile-dropdown a {
    display: block;
    padding: 12px 18px;
    color: #333;
    text-decoration: none;
    font-size: 1em;
    transition: background 0.2s, color 0.2s;
}

.profile-dropdown a:hover {
    background: #f5f5f5;
    color: #007bff;
}

.user-profile:hover .profile-dropdown,
.user-profile:focus-within .profile-dropdown {
    display: block;
}

/* --- Sidebar Navigation --- */
.sidebar {
    position: fixed;
    top: 60px; /* adjust if your topbar is a different height */
    left: 0;
    width: 210px;
    height: calc(100% - 60px);
    background: #222;
    color: #fff;
    z-index: 100;
    overflow-y: auto;
    box-sizing: border-box;
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar nav ul li {
    margin: 0;
}

.sidebar nav ul li a {
    display: flex;
    align-items: center;
    color: #fff;
    padding: 14px 24px;
    text-decoration: none;
    font-size: 1.08em;
    transition: background 0.2s, color 0.2s;
    border-left: 4px solid transparent;
    gap: 12px;
}

.sidebar nav ul li a i {
    min-width: 20px;
    text-align: center;
    font-size: 1.1em;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
    background: #007bff;
    color: #fff;
    border-left: 4px solid #fff;
}

.main-content {
    margin-left: 210px;
    padding: 80px 24px 24px 24px;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Dashboard Cards */
.dashboard-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    margin-top: 24px;
}

.card {
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    padding: 20px 24px;
    min-width: 220px;
    flex: 1 1 220px;
    max-width: 320px;
}

.card h3 {
    margin-top: 0;
    color: #007bff;
    font-size: 1.2em;
    margin-bottom: 12px;
}

/* Appointments List */
ul {
    padding-left: 18px;
}

li {
    margin-bottom: 8px;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    color: #888;
    font-size: 0.95em;
}

hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 24px 0;
}

/* Modern Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin: 24px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    font-size: 1rem;
}

thead {
    background: #007bff;
    color: #fff;
}

th, td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

th {
    font-weight: 600;
    letter-spacing: 0.03em;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: #f5faff;
    transition: background 0.2s;
}

button.editServiceBtn, button.deleteServiceBtn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    font-size: 1.1em;
    color: #007bff;
    transition: color 0.2s;
    vertical-align: middle;
}

button.editServiceBtn:hover {
    color: #28a745;
}

button.deleteServiceBtn:hover {
    color: #dc3545;
}

/* Responsive */
@media (max-width: 700px) {
    .container {
        max-width: 98vw;
        padding: 16px 4vw;
    }
    .dashboard-cards {
        flex-direction: column;
        gap: 16px;
    }
    .card {
        max-width: 100%;
    }
}

/* Responsive Table */
@media (max-width: 900px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }
    thead {
        display: none;
    }
    tr {
        margin-bottom: 18px;
        border-radius: 8px;
        box-shadow: 0 1px 6px rgba(0,0,0,0.04);
        background: #fff;
        padding: 10px 0;
    }
    td {
        position: relative;
        padding-left: 50%;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        min-height: 38px;
    }
    td:last-child {
        border-bottom: none;
    }
    td:before {
        position: absolute;
        top: 14px;
        left: 16px;
        width: 45%;
        white-space: nowrap;
        font-weight: 600;
        color: #007bff;
        content: attr(data-label);
    }
}

/* Optional: Make action buttons larger on mobile */
@media (max-width: 600px) {
    button.editServiceBtn, button.deleteServiceBtn {
        font-size: 1.3em;
        padding: 10px 14px;
    }
    .topbar {
        padding: 0 10px;
    }
    .sidebar {
        display: none;
    }
    .container,
    .main-content {
        margin-left: 0;
        padding-top: 48px; /* if your topbar is 48px on mobile */
        padding-left: 2vw;
        padding-right: 2vw;
    }
    .topbar {
        height: 48px;
        padding: 0 4vw;
    }
    .profile-pic {
        width: 28px;
        height: 28px;
    }
}
/* If you want exactly the topbar height: */
@media (min-width: 601px) {
    .container,
    .main-content {
        padding-top: 75px; /* exactly the topbar height */
    }
}
