/* ===== Base Styles ===== */
:root {
    --primary-color: #e91e63; /* Pink color */
    --primary-dark: #c2185b;
    --primary-light: #f8bbd9;
    --secondary-color: #7b1fa2;
    --accent-color: #ff4081;
    --text-dark: #333333;
    --text-light: #666666;
    --text-white: #ffffff;
    --bg-light: #f9f9f9;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
    --info-color: #2196f3;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-heavy: 0 8px 24px rgba(0, 0, 0, 0.12);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-sm: 4px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

.section-title {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* ===== Buttons ===== */
.btn-primary, .btn-secondary, .btn-login {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-login {
    background-color: var(--primary-color);
    color: var(--text-white);
    padding: 8px 20px;
    border-radius: 20px;
}

.btn-login:hover {
    background-color: var(--primary-dark);
}

/* ===== Navigation ===== */
.navbar {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    height: 40px;
    width: auto;
}

.clinic-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-menu li a {
        color: var(--text-dark) !important;
        font-weight: 500;
        padding: 15px 20px;
        display: block;
        border-bottom: 1px solid var(--border-color);
        transition: all 0.3s ease;
    }
	.nav-menu li:last-child a {
        border-bottom: none;
    }

.nav-menu li a:hover,
    .nav-menu li a.active {
        background-color: var(--primary-light);
        color: var(--primary-color) !important;
        padding-left: 30px;
    }

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* ===== Hero Section ===== */
.hero {
    padding: 150px 0 80px;
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
    text-align: right;
}

.hero-image img {
    max-width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-heavy);
}

/* ===== Features Section ===== */
.features {
    padding: 80px 0;
    background-color: var(--bg-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.feature-link {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.feature-link:hover {
    gap: 10px;
}

/* ===== Modules Tabs ===== */
.modules {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 12px 24px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.tab-btn:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
}

.tab-content {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.tab-pane ul {
    list-style: none;
}

.tab-pane li {
    margin-bottom: 10px;
    padding-left: 30px;
    position: relative;
}

.tab-pane li i {
    position: absolute;
    left: 0;
    top: 5px;
    color: var(--success-color);
}

/* ===== CTA Section ===== */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    text-align: center;
    color: var(--text-white);
}

.cta h2 {
    color: var(--text-white);
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta .btn-primary {
    background-color: var(--text-white);
    color: var(--primary-color);
}

.cta .btn-primary:hover {
    background-color: var(--bg-light);
}

.cta .btn-secondary {
    background-color: transparent;
    color: var(--text-white);
    border-color: var(--text-white);
}

.cta .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ===== Footer ===== */
.footer {
    position: relative;
    z-index: 1;
    margin-left: 260px; /* Match sidebar width */
    width: calc(100% - 260px);
    background-color: #2c2c2c;
    color: #cccccc;
    padding: 60px 0 5px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(1px, 1fr));
    gap: 40px;
    margin-bottom: 5px;
}

.footer-col h4 {
    color: var(--text-white);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-logo {
    height: 60px;
    margin-bottom: 15px;
}

.footer-col p {
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #cccccc;
}

.footer-col ul li a:hover {
    color: var(--text-white);
}

.footer-col i {
    margin-right: 10px;
    color: var(--primary-light);
    width: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 0.9rem;
    color: #999;
}

/* ===== Dashboard Layout ===== */
.dashboard {
    min-height: 100vh;
    position: relative;
    display: flex;
}

.sidebar {
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.sidebar-logo {
    height: 40px;
    margin-bottom: 10px;
}

.sidebar-clinic-name {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.user-profile {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 15px;
    font-weight: 600;
    border: 3px solid white;
    box-shadow: var(--shadow);
}

.user-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.user-role {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    background-color: var(--primary-light);
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-title {
    padding: 0 20px 10px;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 600;
    letter-spacing: 1px;
}

.menu-items {
    list-style: none;
    margin-bottom: 20px;
}

.menu-item {
    margin-bottom: 5px;
}

.menu-item a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-dark);
    transition: var(--transition);
    text-decoration: none;
}

.menu-item a:hover, .menu-item a.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

.menu-icon {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: 200px;
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background-color: var(--bg-white);
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 99;
}

.mobile-toggle-sidebar {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

.topbar-content {
    flex: 1;
}

.topbar .header {
    background: none;
    box-shadow: none;
    position: static;
    padding: 0;
}

.topbar .header-content {
    padding: 0;
}

.content-area {
    flex: 1;
    padding-bottom: 80px; /* Space for footer */
    background-color: #f5f5f5;
}

.main-content-simple {
    min-height: calc(100vh - 150px);
}

/* ===== Dashboard Content Styles ===== */
.dashboard-content {
    padding: 30px;
}

.welcome-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-text h2 {
    color: white;
    margin-bottom: 10px;
}

.welcome-text p {
    opacity: 0.9;
    margin-bottom: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.pink {
    background-color: var(--primary-color);
}

.stat-icon.purple {
    background-color: var(--secondary-color);
}

.stat-icon.blue {
    background-color: var(--info-color);
}

.stat-icon.green {
    background-color: var(--success-color);
}

.stat-info h3 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.quick-actions {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    margin-bottom: 0;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
}

.action-button:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.action-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.action-button span {
    font-weight: 500;
    color: var(--text-dark);
}

.recent-activity {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.activity-list {
    list-style: none;
}

.activity-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.activity-content h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.activity-content p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--text-light);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.module-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.module-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.module-card h3 {
    margin-bottom: 10px;
}

.module-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.module-features {
    list-style: none;
    margin-bottom: 20px;
}

.module-features li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.module-features li:before {
    content: '?';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-image {
        text-align: center;
    }
    
    .hero-buttons, .cta-buttons {
        justify-content: center;
    }
    
    /* Dashboard Responsive */
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background-color: var(--bg-white) !important;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-heavy);
        padding: 20px 0;
        gap: 0;
        z-index: 1000;
        border-top: 2px solid var(--primary-color);
    }
    
    .nav-menu.active {
        left: 0;
        background-color: var(--bg-white) !important;
    }
	.nav-menu li {
        width: 100%;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .tab-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    /* Dashboard Responsive */
    .dashboard-content {
        padding: 20px;
    }
    
    .welcome-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    .content-area {
        padding: 20px;
    }
    
    .topbar {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero {
        padding: 120px 0 60px;
    }
    
    .features, .modules, .cta {
        padding: 60px 0;
    }
    
    /* Dashboard Responsive */
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
	/* ===== MOBILE SIDEBAR FIXES ===== */

/* Mobile toggle button */
 .mobile-toggle-sidebar {
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        font-size: 1.5rem;
        padding: 8px 12px;
        border-radius: 4px;
        cursor: pointer;
        margin-right: 10px;
    }
	.mobile-toggle-sidebar:hover {
        background: rgba(255, 255, 255, 0.3);
    }
}

@media (max-width: 992px) {
    .mobile-toggle-sidebar {
        display: block;
    }
    
    /* Sidebar mobile positioning */
    .sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 1000;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    /* Main content adjustment */
    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }
    
    /* Topbar fix */
    .topbar {
        position: sticky;
        top: 0;
        z-index: 999;
        background: white;
    }
}

/* Sidebar overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    display: none;
}

.sidebar.active ~ .sidebar-overlay {
    display: block;
}

/* Prevent body scroll when sidebar is open */
body.sidebar-open {
    overflow: hidden;
}

/* ===== FIX FOR EXISTING MEDIA QUERIES ===== */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }
	
	.footer {
        margin-left: 0;
        width: 100%;
        padding: 40px 0 5px;
    }
    
    .mobile-toggle-sidebar {
        display: block;
    }
}

@media (max-width: 768px) {
    /* Ensure topbar doesn't overlap sidebar */
    .topbar {
        position: sticky;
        top: 0;
        z-index: 998;
    }
    
    /* Better mobile navigation */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background-color: var(--bg-white);
        width: 100%;
        text-align: center;
        transition: 0.3s ease;
        box-shadow: var(--shadow);
        padding: 20px 0;
        gap: 20px;
        z-index: 1000;
    }
    
 }