/* Jasper Heart Clinic - Main Stylesheet */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --purple-color: #6f42c1;
    --purple-light: #f8f0ff;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

/* Dashboard Cards */
.dashboard-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    background: white;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.dashboard-card .card-body {
    padding: 1.5rem;
}

.dashboard-card .card-icon {
    font-size: 2.5rem;
    opacity: 0.5;
    float: right;
}

.dashboard-card .card-title {
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.dashboard-card .card-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--dark-color);
}

.dashboard-card .card-footer {
    background: transparent;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 0.75rem 1.5rem;
}

/* Color variants for dashboard cards */
.card-primary { border-left: 4px solid var(--primary-color); }
.card-success { border-left: 4px solid var(--success-color); }
.card-danger { border-left: 4px solid var(--danger-color); }
.card-warning { border-left: 4px solid var(--warning-color); }
.card-info { border-left: 4px solid var(--info-color); }
.card-purple { border-left: 4px solid var(--purple-color); }

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
}

.navbar-brand i {
    margin-right: 8px;
}

/* Sidebar */
.sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sidebar .nav-link {
    color: var(--dark-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    background: var(--primary-color);
    color: white;
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Tables */
.table-responsive {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.table thead th {
    background: var(--light-color);
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background: rgba(0,123,255,0.05);
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: #0069d9;
    border-color: #0062cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

/* Status Badges */
.badge-status {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Badge Colors */
.badge-purple {
    background: var(--purple-color);
    color: white;
}

/* Appointment Cards */
.appointment-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.appointment-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.appointment-card .appointment-time {
    font-weight: 600;
    color: var(--primary-color);
}

.appointment-card .appointment-patient {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Blog Cards */
.blog-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.blog-card .blog-image {
    height: 200px;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
}

.blog-card .blog-body {
    padding: 1.5rem;
}

.blog-card .blog-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.blog-card .blog-meta {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

/* Product/Medication Cards */
.product-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.product-card .product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.product-card .product-name {
    font-weight: 500;
    margin: 0.5rem 0;
}

.product-card .product-stock {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

/* Login/Register */
.auth-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
}

.auth-card .auth-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.auth-card .auth-subtitle {
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

/* Quick Login Buttons */
.quick-login-btn {
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 10px 15px;
    margin: 5px 0;
    text-align: left;
    border: 2px solid transparent;
    cursor: pointer;
}

.quick-login-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.quick-login-btn .badge {
    float: right;
    margin-top: 2px;
}

.quick-login-btn .role-icon {
    width: 30px;
    display: inline-block;
    text-align: center;
}

/* Quick Login Color Variants */
.quick-login-btn.admin {
    border-color: var(--danger-color);
    background: #fff5f5;
}
.quick-login-btn.admin:hover {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

.quick-login-btn.management {
    border-color: var(--primary-color);
    background: #f0f7ff;
}
.quick-login-btn.management:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.quick-login-btn.sales {
    border-color: var(--purple-color);
    background: var(--purple-light);
}
.quick-login-btn.sales:hover {
    background: var(--purple-color);
    color: white;
    border-color: var(--purple-color);
}

.quick-login-btn.doctor {
    border-color: var(--info-color);
    background: #f0f9ff;
}
.quick-login-btn.doctor:hover {
    background: var(--info-color);
    color: white;
    border-color: var(--info-color);
}

.quick-login-btn.patient {
    border-color: var(--success-color);
    background: #f0fff4;
}
.quick-login-btn.patient:hover {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

/* POS Styles */
.pos-item {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.pos-item:hover {
    border-color: var(--primary-color);
    transform: scale(1.02);
}
.pos-item.selected {
    border-color: var(--success-color);
    background: #f0fff4;
}

.pos-cart-item {
    border-bottom: 1px solid #eee;
    padding: 8px 0;
}

.pos-total {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Barcode Scanner */
.barcode-scanner-active {
    border: 3px solid var(--success-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(40,167,69,0.25) !important;
}

.barcode-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
}

.barcode-notification .alert {
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    animation: slideInRight 0.5s ease;
}

/* Receipt Styles */
.receipt-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    max-width: 400px;
    margin: 0 auto;
}

.receipt-box .receipt-header {
    text-align: center;
    border-bottom: 2px dashed #333;
    padding-bottom: 10px;
}

.receipt-box .receipt-items {
    padding: 10px 0;
}

.receipt-box .receipt-total {
    border-top: 2px dashed #333;
    padding-top: 10px;
    text-align: right;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-purple {
    color: var(--purple-color);
}

.bg-purple {
    background: var(--purple-color);
}

.bg-purple-light {
    background: var(--purple-light);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-bottom: 1rem;
    }
    
    .dashboard-card .card-value {
        font-size: 1.5rem;
    }
    
    .auth-card {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .barcode-notification {
        min-width: auto;
        width: 90%;
        right: 5%;
        bottom: 10px;
    }
    
    .receipt-box {
        max-width: 100%;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Quick Login Role Variants */
.quick-login-btn.laboratory {
    border-color: var(--info-color);
    background: #f0f9ff;
}
.quick-login-btn.laboratory:hover {
    background: var(--info-color);
    color: white;
    border-color: var(--info-color);
}

.quick-login-btn.accountant {
    border-color: var(--success-color);
    background: #f0fff4;
}
.quick-login-btn.accountant:hover {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.quick-login-btn.pharmacy {
    border-color: var(--warning-color);
    background: #fffcf0;
}
.quick-login-btn.pharmacy:hover {
    background: var(--warning-color);
    color: white;
    border-color: var(--warning-color);
}

/* Badge Colors for Staff */
.badge-purple {
    background: #6f42c1;
    color: white;
}