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

:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --border-color: #e5e7eb;
    --text-color: #374151;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: #f9fafb;
    line-height: 1.6;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.col {
    flex: 1;
    min-width: 250px;
}

.col-full {
    width: 100%;
}

.col-sidebar {
    width: 250px;
}

.col-content {
    flex: 1;
}

/* Header Navigation */
header {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
    list-style: none;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.user-menu {
    display: flex;
    gap: 15px;
    align-items: center;
}

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

.user-name {
    font-weight: 600;
    color: var(--dark-color);
}

.user-role {
    font-size: 12px;
    color: #9ca3af;
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: fit-content;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--primary-color);
    color: white;
}

/* Main Content */
.main-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.page-title {
    font-size: 28px;
    font-weight: bold;
    color: var(--dark-color);
}

.page-subtitle {
    font-size: 14px;
    color: #9ca3af;
    margin-top: 5px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 15px;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--dark-color);
}

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

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-left: 4px solid var(--primary-color);
}

.stat-card.info {
    border-left-color: var(--primary-color);
}

.stat-card.success {
    border-left-color: var(--secondary-color);
}

.stat-card.warning {
    border-left-color: var(--warning-color);
}

.stat-card.danger {
    border-left-color: var(--danger-color);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--dark-color);
}

.stat-label {
    font-size: 14px;
    color: #9ca3af;
    margin-top: 5px;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.table thead {
    background: var(--light-color);
}

.table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
}

.table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px; 
}

.table tbody tr:hover {
    background: var(--light-color);
}

.table-actions {
    display: flex;
    gap: 10px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: #dbeafe;
    color: var(--primary-color);
}

.badge-success {
    background: #dcfce7;
    color: var(--secondary-color);
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: var(--danger-color);
}

.badge-info {
    background: #e0e7ff;
    color: #3730a3;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border-left: 4px solid var(--secondary-color);
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: #dbeafe;
    color: #0c4a6e;
    border-left: 4px solid var(--primary-color);
}

.alert-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    opacity: 0.7;
}

.alert-close:hover {
    opacity: 1;
}

/* Search and Filter */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box input,
.search-box select {
    flex: 1;
    min-width: 200px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.modal-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--dark-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #9ca3af;
}

.modal-close:hover {
    color: var(--dark-color);
}

/* Authentication Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.auth-form {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.auth-title {
    text-align: center;
    margin-bottom: 30px;
}

.auth-title h1 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.auth-title p {
    color: #9ca3af;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Doctor Card */
.doctor-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.doctor-avatar {
    width: 100px;
    height: 100px;
    background: var(--light-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.doctor-info {
    flex: 1;
}

.doctor-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--dark-color);
}

.doctor-specialty {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 5px;
}

.doctor-location {
    color: #9ca3af;
    font-size: 14px;
    margin-top: 5px;
}

.doctor-contact {
    font-size: 14px;
    color: var(--text-color);
    margin-top: 10px;
}

.doctor-actions {
    display: flex;
    gap: 10px;
}

/* Appointment Card */
.appointment-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.appointment-doctor {
    font-size: 16px;
    font-weight: bold;
    color: var(--dark-color);
}

.appointment-status {
    display: inline-block;
}

.appointment-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.appointment-detail {
    font-size: 14px;
}

.appointment-detail-label {
    color: #9ca3af;
    font-weight: 600;
}

.appointment-detail-value {
    color: var(--dark-color);
    margin-top: 5px;
}

.appointment-reason {
    background: var(--light-color);
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
}

.appointment-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
    }

    .col-sidebar {
        width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-menu {
        flex-direction: column;
        gap: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .doctor-card {
        flex-direction: column;
        text-align: center;
    }

    .doctor-actions {
        justify-content: center;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .user-menu {
        width: 100%;
        justify-content: space-between;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.p-20 {
    padding: 20px;
}

.hidden {
    display: none;
}

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-10 {
    gap: 10px;
}

.w-full {
    width: 100%;
}
