/* Doctor Appointment Booking System - Main Stylesheet */

/* ===== BASE STYLES ===== */
:root {
    --primary: #007bff;
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
    --white: #ffffff;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-success {
    background-color: var(--success);
    border-color: var(--success);
}

.btn-danger {
    background-color: var(--danger);
    border-color: var(--danger);
}

.btn-warning {
    background-color: var(--warning);
    border-color: var(--warning);
}

.btn-info {
    background-color: var(--info);
    border-color: var(--info);
}

/* ===== LAYOUT ===== */
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

.main-content {
    padding: 20px;
    margin-left: 0;
    transition: var(--transition);
}

@media (min-width: 768px) {
    .main-content {
        margin-left: 250px;
    }
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
    color: white;
    z-index: 1000;
    overflow-y: auto;
    transition: var(--transition);
    transform: translateX(-100%);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    padding: 20px 15px;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    font-size: 1.2rem;
    margin: 0;
    color: white;
}

.sidebar-menu {
    padding: 15px 0;
}

.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--primary);
}

.sidebar-menu i {
    width: 25px;
    font-size: 16px;
    margin-right: 10px;
}

/* ===== NAVBAR ===== */
.navbar {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar-brand {
    font-weight: 600;
    color: var(--dark);
}

.navbar-toggler {
    border: none;
    background: transparent;
    font-size: 1.25rem;
    color: var(--dark);
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

/* ===== CARDS ===== */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    transition: var(--transition);
    background-color: white;
}

.card:hover {
    box-shadow: var(--box-shadow-lg);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--gray-light);
    padding: 15px 20px;
    font-weight: 600;
    color: var(--dark);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark);
}

/* ===== STATS CARDS ===== */
.stats-card {
    text-align: center;
    padding: 20px;
    border-radius: var(--border-radius);
    color: white;
    margin-bottom: 20px;
}

.stats-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.stats-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stats-card p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.stats-card.admin { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stats-card.doctor { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.stats-card.patient { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.stats-card.staff { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.stats-card.appointment { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.stats-card.payment { background: linear-gradient(135deg, #30cfd0 0%, #330867 100%); }

/* ===== TABLES ===== */
.table-responsive {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table {
    margin-bottom: 0;
    background-color: white;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: var(--dark);
    padding: 12px 15px;
}

.table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.badge {
    padding: 5px 10px;
    font-weight: 500;
    border-radius: 20px;
    font-size: 0.8rem;
}

.badge-success { background-color: var(--success); }
.badge-warning { background-color: var(--warning); color: #212529; }
.badge-danger { background-color: var(--danger); }
.badge-info { background-color: var(--info); }
.badge-primary { background-color: var(--primary); }

/* ===== FORMS ===== */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
}

/* ===== ALERTS ===== */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* ===== DASHBOARD WIDGETS ===== */
.dashboard-widget {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    height: 100%;
}

.widget-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark);
    border-bottom: 1px solid var(--gray-light);
    padding-bottom: 10px;
}

.widget-content {
    font-size: 0.9rem;
}

/* ===== LOGIN PAGE ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.login-header h2 {
    font-weight: 600;
    margin: 0;
}

.login-body {
    padding: 30px;
}

.login-footer {
    padding: 20px;
    text-align: center;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.role-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.role-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.role-btn:hover,
.role-btn.active {
    border-color: var(--primary);
    background-color: rgba(0, 123, 255, 0.1);
}

.role-btn i {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

/* ===== PUBLIC PAGES ===== */
.public-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.public-header h1 {
    font-weight: 700;
    margin-bottom: 20px;
}

.public-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

.public-navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.public-content {
    padding: 60px 0;
}

.doctor-card {
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}

.doctor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.doctor-img {
    height: 200px;
    overflow: hidden;
}

.doctor-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.doctor-card:hover .doctor-img img {
    transform: scale(1.05);
}

.doctor-info {
    padding: 20px;
}

.doctor-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark);
}

.doctor-specialization {
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--dark);
    color: white;
    padding: 30px 0;
    margin-top: 60px;
}

.footer h5 {
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer ul li a {
    color: rgba(255, 255, 255, 0.8);
}

.footer ul li a:hover {
    color: white;
    text-decoration: none;
}

.copyright {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 15px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 767.98px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .navbar {
        padding: 10px 15px;
    }
    
    .stats-card h3 {
        font-size: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .public-header {
        padding: 40px 0;
    }
    
    .public-header h1 {
        font-size: 1.8rem;
    }
    
    .public-content {
        padding: 40px 0;
    }
}

@media (max-width: 575.98px) {
    .card-body {
        padding: 15px;
    }
    
    .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .login-body {
        padding: 20px;
    }
    
    .role-selector {
        flex-direction: column;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .sidebar,
    .navbar,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}