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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.header h1 i {
    margin-right: 10px;
    color: #ffd700;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn:hover {
    background: rgba(255,255,255,0.3);
}

.tab-btn.active {
    background: white;
    color: #667eea;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    color: #2c3e50;
    font-size: 2rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-warning {
    background-color: #f39c12;
    color: white;
}

.btn-warning:hover {
    background-color: #d68910;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

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

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #3498db;
}

.stat-card h3 {
    color: #7f8c8d;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.stat-number.available {
    color: #27ae60;
}

.stat-number.occupied {
    color: #e74c3c;
}

/* Chart Section */
.chart-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.chart-section h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.department-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dept-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dept-name {
    width: 120px;
    font-weight: 500;
    color: #34495e;
}

.bar-container {
    flex: 1;
    background: #ecf0f1;
    border-radius: 10px;
    height: 30px;
    position: relative;
    overflow: hidden;
}

.bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.bar-text {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 500;
    color: #2c3e50;
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filters select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    font-size: 1rem;
}

/* Bed Grid */
.bed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.bed-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
}

.bed-card.occupied {
    border-left-color: #e74c3c;
}

.bed-card.maintenance {
    border-left-color: #f39c12;
}

.bed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.bed-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
}

.bed-status {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.bed-status.available {
    background: #d5f4e6;
    color: #27ae60;
}

.bed-status.occupied {
    background: #fadbd8;
    color: #e74c3c;
}

.bed-status.maintenance {
    background: #fdeaa7;
    color: #f39c12;
}

.bed-info {
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.bed-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Appointment Styles */
.appointment-queue {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.appointment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.appointment-item.urgent {
    border-left-color: #e74c3c;
}

.appointment-info {
    flex: 1;
}

.appointment-time {
    font-weight: bold;
    color: #2c3e50;
}

.appointment-patient {
    color: #7f8c8d;
}

.appointment-doctor {
    color: #3498db;
    font-size: 0.9rem;
}

.appointment-actions {
    display: flex;
    gap: 0.5rem;
}

/* Patient List */
.search-section {
    margin-bottom: 2rem;
}

.search-section input {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.patient-list {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.patient-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #ecf0f1;
}

.patient-item:last-child {
    border-bottom: none;
}

.patient-info {
    flex: 1;
}

.patient-name {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.patient-details {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.patient-actions {
    display: flex;
    gap: 0.5rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .nav-tabs {
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .bed-grid {
        grid-template-columns: 1fr;
    }
    
    .dept-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dept-name {
        width: auto;
        margin-bottom: 0.5rem;
    }
    
    .appointment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .patient-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.4rem;
    }
    
    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .bed-actions,
    .appointment-actions,
    .patient-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}
