/* Modern CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Global Styles */
:root {
    /* Colors */
    --primary-color: #4361ee;
    --primary-dark: #2b4cc7;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --text-primary: #2b2d42;
    --text-secondary: #6c757d;
    --light-bg: #f8f9fa;
    --dark-bg: #212529;
    --white: #ffffff;

    /* Modern Gradients */
    --gradient-primary: linear-gradient(135deg, #4361ee 0%, #3f37c9 100%);
    --gradient-secondary: linear-gradient(135deg, #4895ef 0%, #4361ee 100%);
    --gradient-dark: linear-gradient(135deg, #2b2d42 0%, #1a1b2e 100%);
    --gradient-overlay: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7));

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-size-base: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 3rem;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;

    /* Border Radius */
    --border-radius-sm: 0.25rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 1rem;

    /* Transitions */
    --transition-base: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

/* Modern Typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--light-bg);
}

/* Enhanced Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: var(--spacing-sm) 0;
    transition: var(--transition-base);
}

.navbar.scrolled {
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
    height: 40px;
    transition: var(--transition-base);
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition-base);
    padding: var(--spacing-xs) var(--spacing-sm);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-base);
}

.nav-link:hover::after {
    width: 100%;
}

/* Modern Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: var(--border-radius-md);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

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

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

/* Modern Cards */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: var(--transition-base);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
}

/* Modern Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

.animate-slide-in {
    animation: slideIn 0.6s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Modern Section Styles */
.section {
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%234361ee' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: 0;
}

.section-content {
    position: relative;
    z-index: 1;
}

/* Modern Hero Section */
.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--gradient-primary);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-overlay);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    margin-bottom: var(--spacing-lg);
}

/* Modern Footer */
footer {
    background: var(--gradient-dark);
    color: var(--white);
    padding: var(--spacing-xl) 0;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

footer a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition-base);
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--white);
    transition: var(--transition-base);
}

footer a:hover::after {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --font-size-3xl: 2.5rem;
        --font-size-2xl: 2rem;
        --font-size-xl: 1.75rem;
        --font-size-lg: 1.5rem;
    }

    .navbar {
        padding: var(--spacing-xs) 0;
    }

    .navbar-brand img {
        height: 30px;
    }

    .section {
        padding: var(--spacing-lg) 0;
    }

    .hero-section {
        min-height: 60vh;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-gradient {
    background: var(--gradient-primary);
}

.border-gradient {
    border-image: var(--gradient-primary) 1;
}

/* Glass Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-lg);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}

/* Modern Table Design */
.table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.table thead {
    background: var(--gradient-primary);
    color: white;
}

/* Enhanced Status Badges */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Service Categories */
.service-category {
    text-align: center;
    padding: 20px;
    margin-bottom: 30px;
}

.service-category i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Appointments */
.appointment-card {
    border-left: 5px solid var(--primary-color);
}

.appointment-card.pending {
    border-left-color: var(--secondary-color);
}

.appointment-card.completed {
    border-left-color: var(--primary-color);
}

.appointment-card.cancelled {
    border-left-color: var(--accent-color);
}

/* Forms */
/* Modern Form Elements */
.form-control {
    border-radius: 12px;
    padding: 1rem;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.15);
}

/* Footer */
footer {
    background: var(--dark-bg);
    color: white;
    padding: 4rem 0;
}

footer a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--secondary-color);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

/* Advanced Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.float-animation {
    animation: float 4s ease-in-out infinite;
}

/* Custom Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Inventory Module Styles */
.inventory-sidebar {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    height: 100%;
    position: sticky;
    top: 100px;
}

.inventory-sidebar .nav-link {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 0.5rem;
    transition: var(--transition-base);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.inventory-sidebar .nav-link:hover,
.inventory-sidebar .nav-link.active {
    background: var(--gradient-primary);
    color: var(--white);
    transform: translateX(5px);
}

.inventory-sidebar .nav-link i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.inventory-card {
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition-base);
    border: none;
    overflow: hidden;
}

.inventory-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.inventory-card .card-body {
    padding: 1.5rem;
}

.inventory-card .card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.inventory-card .card-text {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0;
}

.inventory-card .card-icon {
    font-size: 2.5rem;
    opacity: 0.2;
    position: absolute;
    bottom: 1rem;
    right: 1rem;
}

.inventory-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.inventory-table {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.inventory-table thead th {
    background: var(--gradient-primary);
    color: var(--white);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 1rem;
    border: none;
}

.inventory-table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.inventory-table tbody tr:last-child td {
    border-bottom: none;
}

.inventory-table tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.inventory-status {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.inventory-status.in-stock {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.inventory-status.low-stock {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.inventory-status.out-of-stock {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.inventory-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.inventory-action-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

.inventory-action-btn.edit:hover {
    background-color: #28a745;
}

.inventory-action-btn.delete:hover {
    background-color: #dc3545;
}

.inventory-search {
    position: relative;
    margin-bottom: 1.5rem;
}

.inventory-search .form-control {
    padding-left: 3rem;
    height: 50px;
    border-radius: 25px;
}

.inventory-search i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.inventory-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.inventory-filter .btn {
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '›';
    font-size: 1.2rem;
    line-height: 1;
    vertical-align: middle;
}

.inventory-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.inventory-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0;
}

.inventory-detail-actions {
    display: flex;
    gap: 1rem;
}

.inventory-form-section {
    margin-bottom: 2rem;
}

.inventory-form-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .inventory-sidebar {
        position: static;
        margin-bottom: 2rem;
    }

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dashboard Cards */
.dashboard-card {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dashboard-card .card-body {
    padding: 1.5rem;
}

.dashboard-card .card-title {
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.dashboard-card .card-text {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0;
}

/* Custom Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

.display-1 { font-size: var(--font-size-3xl); }
.display-2 { font-size: calc(var(--font-size-3xl) * 0.9); }
.display-3 { font-size: calc(var(--font-size-3xl) * 0.8); }
.display-4 { font-size: calc(var(--font-size-3xl) * 0.7); }
.display-5 { font-size: calc(var(--font-size-3xl) * 0.6); }
.display-6 { font-size: calc(var(--font-size-3xl) * 0.5); }

/* Section Spacing */
section {
    padding: var(--spacing-xl) 0;
}

@media (max-width: 768px) {
    section {
        padding: var(--spacing-lg) 0;
    }
}

/* Utility Classes */
.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.border-primary { border-color: var(--primary-color) !important; }