/* Main Styles */

* {
    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: 20px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #2c3e50, #4a6491);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.logo i {
    font-size: 2.5rem;
    color: #3498db;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

nav a:hover, nav a.active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.card-info h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.card-count {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

/* Quick Actions */
.quick-actions {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.quick-actions h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.action-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-decoration: none;
    color: #495057;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: translateY(-3px);
}

.action-btn i {
    font-size: 2rem;
}

/* Tables */
.recent-bookings {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.recent-bookings h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #2c3e50;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: #2c3e50;
    color: white;
}

table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table tbody tr:hover {
    background-color: #f5f5f5;
}

.status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.payment-status {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.payment-status.paid {
    background: #d4edda;
    color: #155724;
}

.payment-status.unpaid {
    background: #f8d7da;
    color: #721c24;
}

.payment-status.partial {
    background: #fff3cd;
    color: #856404;
}

/* Form Styles */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
}

.print-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #2c3e50;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Service Row */
.service-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: flex-end;
}

.btn-remove-service {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-remove-service:hover {
    background: #c0392b;
}

/* Button Styles */
.btn-primary, .btn-secondary {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.btn-small {
    padding: 5px 10px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-small:hover {
    background: #2980b9;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Bill Styles */
.bill-container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.bill-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #3498db;
}

.clinic-info {
    flex: 1;
}

.clinic-info h2 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.clinic-info p {
    color: #666;
    margin-bottom: 3px;
    font-size: 0.9rem;
}

.bill-title {
    text-align: right;
}

.bill-title h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.bill-number, .bill-date {
    font-weight: 600;
    color: #666;
}

.patient-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
}

.info-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #3498db;
}

.info-section p {
    margin-bottom: 8px;
    color: #555;
}

.services-table {
    margin-bottom: 30px;
}

.services-table table {
    width: 100%;
    border-collapse: collapse;
}

.services-table th {
    background: #2c3e50;
    color: white;
    padding: 15px;
    text-align: left;
}

.services-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
}

.services-table tr:nth-child(even) {
    background: #f9f9f9;
}

.bill-summary {
    margin-bottom: 30px;
}

.summary-details {
    max-width: 400px;
    margin-left: auto;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.summary-row.total {
    border-top: 2px solid #2c3e50;
    border-bottom: none;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 1.2rem;
}

.bill-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px dashed #ddd;
}

.terms ul {
    list-style: none;
    padding-left: 0;
}

.terms li {
    margin-bottom: 5px;
    color: #666;
    font-size: 0.9rem;
}

.signature {
    text-align: center;
}

.signature-line {
    width: 200px;
    height: 1px;
    background: #333;
    margin: 20px auto;
}

.thank-you {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
    color: #666;
}

/* Thermal Print Styles */
.thermal-format {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.2;
    padding: 10px;
    background: white;
}

.thermal-content {
    max-width: 80mm;
    margin: 0 auto;
}

.thermal-header {
    text-align: center;
    margin-bottom: 10px;
}

.thermal-details, .thermal-items, .thermal-summary {
    margin-bottom: 10px;
}

.thermal-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.thermal-row.header {
    font-weight: bold;
    border-bottom: 1px dashed #000;
    padding-bottom: 2px;
    margin-bottom: 5px;
}

.thermal-row.total {
    border-top: 1px dashed #000;
    padding-top: 5px;
    margin-top: 5px;
    font-weight: bold;
}

.thermal-footer {
    text-align: center;
    margin-top: 15px;
    font-size: 10px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #666;
    margin-top: 30px;
    border-top: 1px solid #ddd;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .service-row {
        flex-direction: column;
    }
    
    .bill-header {
        flex-direction: column;
        text-align: center;
    }
    
    .bill-title {
        text-align: center;
        margin-top: 20px;
    }
    
    .bill-footer {
        flex-direction: column;
        gap: 30px;
    }
    
    .print-options {
        flex-direction: column;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card, .form-section, .bill-container {
    animation: fadeIn 0.5s ease-out;
}