/* Custom styles for Clinic App - New Theme */
:root {
    --primary-color: #00C9A7;
    --primary-bg: #E6FAF6;
    --secondary-color: #8E9BB3;
    --text-dark: #333333;
    --bg-color: #F3F6FD;
    --card-bg: #FFFFFF;
    --sidebar-width: 260px;
    --font-heading: 'Poppins', sans-serif;
    --border-radius: 12px;
}

body {
    background-color: var(--bg-color);
    font-family: 'Open Sans', sans-serif;
    /* Fallback */
    color: var(--text-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
}

/* Utils */
.text-primary-theme {
    color: var(--primary-color) !important;
}

.bg-primary-theme {
    background-color: var(--primary-color) !important;
}

.text-secondary-theme {
    color: var(--secondary-color) !important;
}

/* Card Styles */
.card {
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--card-bg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    margin-bottom: 20px;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Sidebar Styling */
.sidebar-wrapper {
    width: var(--sidebar-width);
    background-color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
}

/* Sidebar Nav Items */
.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    color: #6c757d;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 0 25px 25px 0;
    /* Rounded on right side */
    margin-bottom: 5px;
    margin-right: 15px;
    /* Spacing from right edge */
    transition: all 0.3s;
}

.sidebar-nav .nav-link:hover {
    background-color: rgba(0, 201, 167, 0.1);
    color: var(--primary-color);
}

.sidebar-nav .nav-link.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 201, 167, 0.3);
}

.sidebar-nav .nav-link i {
    width: 24px;
    margin-right: 10px;
}

/* Admin Profile in Sidebar */
.admin-profile-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(0, 201, 167, 0.2);
    padding: 3px;
    margin-bottom: 10px;
}

/* Header */
.top-header {
    background-color: transparent;
    padding-bottom: 20px;
}

.search-bar {
    background: white;
    border-radius: 30px;
    padding: 8px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 400px;
}

.search-bar input {
    border: none;
    outline: none;
    width: 100%;
    margin-left: 10px;
}

/* Dashboard Specifics */
.stat-card-title {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.stat-card-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.chart-container {
    position: relative;
    height: 300px;
}

.appointment-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.appointment-item:last-child {
    border-bottom: none;
}

.appointment-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #eee;
    margin-right: 15px;
    object-fit: cover;
}

/* Login Page Styles */
body.login-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-card {
    max-width: 450px;
    width: 100%;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    background: white;
    border: none;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(0, 201, 167, 0.2);
    padding: 3px;
}

.login-card .form-control {
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    background-color: #f9f9f9;
}

.login-card .form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
    background-color: white;
}

.btn-login {
    padding: 0.8rem;
    border-radius: 10px;
    font-weight: 600;
    background-color: var(--primary-color);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background-color: #00b395;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 201, 167, 0.3);
}

/* Bootstrap Overrides for Theme Consistency */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #00b395;
    /* Darker shade */
    border-color: #00b395;
}

.text-primary {
    color: var(--primary-color) !important;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 201, 167, 0.25);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 201, 167, 0.25);
}

.app-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 2rem;
    margin: -2rem -2rem 2rem -2rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Force expanded slots if contentHeight is large, these will stretch */
.fc-timegrid-slot {
    height: 3em !important;
    /* Ensure minimum visual height per slot */
}

/* Cleaner event look */
.fc-event {
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Mobile Responsive Styles */

/* Sidebar Transition for all screens */
.sidebar-wrapper {
    transition: all 0.3s;
}

.main-content {
    transition: all 0.3s;
}

/* Toggle State (Active on mobile means visible) */
.sidebar-wrapper.active {
    left: 0 !important;
    /* Force visible */
}

/* Desktop Toggled State (Collapsed) - Optional, but keeping for future */
.sidebar-wrapper.toggled {
    margin-left: -260px;
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    /* Below sidebar (1000) */
}

.mobile-overlay.active {
    display: block;
}

/* SMALL SCREENS (< 768px) */
@media (max-width: 768px) {

    /* Sidebar hidden by default */
    .sidebar-wrapper {
        left: -260px;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 1rem;
        /* Smaller padding */
    }

    /* Header Adjustments */
    .app-header {
        margin: -1rem -1rem 1rem -1rem;
        padding: 1rem;
        flex-direction: column;
        /* Stack details if needed, or keep row with adjustments */
        align-items: flex-start !important;
        gap: 15px;
    }

    .app-header .d-flex {
        /* Remove force full width logic that caused spread */
        /* width: 100%; */
    }

    /* Search Bar Mobile */
    .search-bar {
        width: 100%;
        max-width: 100%;
        margin: 10px 0 !important;
    }

    /* Banner Height */
    .banner-container {
        height: 200px !important;
    }

    /* Font Sizes */
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Login Card */
    .login-card {
        padding: 1.5rem;
    }

    /* Calendar Mobile Adjustments */
    .fc-toolbar-title {
        font-size: 1rem !important;
        /* Smaller title */
    }

    .fc-button {
        padding: 0.2rem 0.5rem !important;
        /* Smaller buttons */
        font-size: 0.8rem !important;
    }

    .fc .fc-toolbar {
        flex-wrap: nowrap;
        /* Prevent wrapping if possible */
        gap: 5px;
        margin-bottom: 1rem !important;
    }

    /* Smaller Icons in buttons (arrows) */
    .fc-icon {
        font-size: 1rem !important;
    }
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    left: 25px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
}

.my-float {
    margin-top: 16px;
}