/* Hero Section */
.hero-section {
    background-color: #f8f9fa;
    padding: 2rem 0;
    margin-bottom: 1.5rem;
}

.hero-section h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.hero-section .lead {
    font-size: 1rem;
    color: #6c757d;
}

/* Card Styles */
.card {
    width: 100%;
    height: 300px;
    margin: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: white;
}

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

.card-body {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

/* Button Styles */
.btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.9rem;
}

/* Form Controls */
.form-control,
.form-select {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
}

.input-group-text {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-left: none;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

/* Profile Section */
.profile-btn {
    color: white !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 0.375rem 0.75rem !important;
    font-weight: 500 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 0.5rem !important;
    transition: all 0.2s ease !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.profile-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Navbar profile picture - must stay small */
.navbar .profile-pic,
.user-section .profile-pic,
.profile-btn .profile-pic {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    display: block !important;
    max-width: 28px !important;
    max-height: 28px !important;
}

.navbar .profile-pic-placeholder,
.user-section .profile-pic-placeholder,
.profile-btn .profile-pic-placeholder {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    color: white !important;
    font-size: 14px !important;
    line-height: 1 !important;
    text-align: center !important;
    max-width: 28px !important;
    max-height: 28px !important;
}

.navbar .profile-pic-placeholder i,
.user-section .profile-pic-placeholder i,
.profile-btn .profile-pic-placeholder i {
    font-size: 14px !important;
    color: white !important;
    display: block !important;
    line-height: 1 !important;
}
.profile-pic-placeholder i:before {
    content: "\f007" !important;
    /* Fallback for Font Awesome user icon */
}

/* Dropdown Menu Styles */
.dropdown-menu {
    background-color: #ffffff !important;
    border-radius: 0.25rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    margin-top: 0.5rem !important;
}

.dropdown-item {
    padding: 0.5rem 1rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.dropdown-item:hover {
    background-color: #f8f9fa !important;
}

.dropdown-item i {
    color: #6c757d !important;
    width: 16px !important;
    text-align: center !important;
}

/* Container Spacing */
.container {
    max-width: 1140px;
    padding: 0 15px;
}

.py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

/* Modal Styles - using Bootstrap defaults; no global width override */

.modal-header {
    padding: 1rem;
}

.modal-body {
    padding: 1rem;
}

.modal-footer {
    padding: 0.75rem;
}

/* Footer */
.footer {
    padding: 1rem 0;
    font-size: 0.9rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 1.5rem 0;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 10px;
    }
}

/* Navigation Bar Styles */
.main-nav {
    padding: 0 1rem !important;
    background-color: #198754 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    z-index: 1000 !important;
}

.nav-logo {
    width: 36px !important;
    height: 36px !important;
    margin-right: 8px !important;
    object-fit: contain !important;
}

.navbar-brand {
    display: flex !important;
    align-items: center !important;
    color: white !important;
    font-weight: 500 !important;
    font-size: 1.4rem !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    height: 40px !important;
}

.brand-text {
    font-family: 'Pacifico', cursive !important;
    font-size: 22px !important;
    color: white !important;
    line-height: 1.2 !important;
    letter-spacing: 0.5px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    white-space: nowrap !important;
}

.container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
}

.navbar-collapse {
    display: flex !important;
    width: 100% !important;
}

.navbar-collapse-inner {
    display: flex !important;
    justify-content: space-between !important;
    width: 100% !important;
    position: relative !important;
}

.navbar-nav {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    height: 40px !important;
}

.navbar-nav.center-nav {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1 !important;
    margin-top: 0 !important;
    padding-top: 2px !important;
    display: flex;
    flex-wrap: nowrap;
}

.navbar-nav.center-nav .nav-item {
    white-space: nowrap;
}

.navbar-nav.center-nav .nav-link {
    padding: 0.5rem 0.75rem;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 0.5rem 1rem !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease !important;
    border-radius: 0.25rem !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
    height: 36px !important;
}

.navbar-nav .nav-link.active {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.navbar-nav .nav-link:hover:not(.active) {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* User Section on right side */
.user-section {
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    z-index: 2 !important;
}

.nav-link i {
    margin-right: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.9rem !important;
}

/* Search and Filter */
.form-select {
    border-radius: 0.375rem;
}

/* Plant Details */
.list-unstyled li {
    margin-bottom: 0.25rem;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Request Button */
.request-info-btn {
    width: 100%;
    margin-top: 0.5rem;
}

/* Text Styles */
.text-muted {
    font-size: 0.85rem;
}

/* Card styling */
.card.admin-plant-card,
.card.user-plant-card {
    position: relative;
    overflow: hidden;
    height: 270px;
    transition: all 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background-color: white;
}

/* Card body takes full height */
.card-body {
    padding: 0 !important;
    position: relative;
    height: 100%;
}

/* Plant main view should be fully visible */
.plant-main-view {
    position: relative;
    z-index: 1;
    height: 100%;
    width: 100%;
}

/* Plant header should be minimal */
.plant-header {
    padding: 0.5rem;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Plant image container */
.plant-image-container {
    position: relative;
    height: 230px;
    overflow: hidden;
    min-height: 230px;
}

/* Plant image should completely fill its container */
.plant-main-photo {
    width: 100%;
    height: 230px;
    object-fit: cover;
    object-position: center;
}

/* No photo placeholder */
.no-photo-placeholder {
    width: 100%;
    height: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.no-photo-placeholder i {
    font-size: 2rem;
    color: #adb5bd;
    margin-bottom: 0.5rem;
}

.no-photo-placeholder p {
    margin: 0;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Details panel */
.plant-details-panel {
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: rgba(25, 135, 84, 0.95);
    transition: all 0.3s ease;
    z-index: 2;
    overflow-y: auto;
    color: white !important;
    max-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Show details when the card has the show-details class */
.admin-plant-card.show-details .plant-details-panel {
    right: 0;
    height: 100%;
    overflow-y: auto;
}

.user-plant-card.show-details .plant-details-panel {
    right: 0;
    height: 100%;
    overflow-y: auto;
}

/* Info Section within Details Panel */
.plant-details-panel .info-section {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow-y: visible;
    padding-left: 0.8rem !important;
    padding-right: 1rem !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

.plant-details-panel h6,
.plant-details-panel p,
.plant-details-panel label,
.plant-details-panel span {
    color: white !important;
}

.plant-details-panel .info-section label {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Make links visible on dark background */
.plant-details-panel a {
    color: white !important;
    text-decoration: underline;
}

.plant-details-panel a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Ensure consistent spacing */
.plant-details-panel .p-3 {
    padding: 1.3rem !important;
}

/* Add extra left padding for admin plant details content */
.admin-plant-card .plant-details-panel .p-3 {
    padding-left: 1.5rem !important;
    padding-right: 1.3rem !important;
    padding-top: 1.3rem !important;
    padding-bottom: 1.3rem !important;
}

/* Grid layout - Base */
.row-cols-1.row-cols-md-4.g-4 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    padding: 1rem;
    width: 100%;
}

/* Plant item container */
.col.plant-item {
    display: block;
    width: 100%;
    height: auto;
    min-height: 250px;
}

/* Photo upload modal styles */
#currentPhoto {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

/* Ensure modal image preview maintains aspect ratio */
.modal .plant-image-container {
    height: 300px !important;
}

.modal .plant-main-photo {
    object-fit: contain;
}

/* Edit Plant modal width: make it wider for image upload */
#editPlantModal .modal-dialog {
    max-width: min(95vw, 1300px);
}

/* Edit Plant: nudge photo section right and enlarge preview */
#editPlantModal .row.g-3>.col-md-4:first-child {
    padding-left: 16px;
    /* move content a bit to the right */
}

#editPlantModal #edit_current_photo,
#editPlantModal #edit_no_photo {
    width: 100% !important;
    /* fill column width */
    height: 340px !important;
    /* tall, prominent preview */
    max-width: 100% !important;
    object-fit: cover !important;
    /* fill both sides nicely */
    box-sizing: border-box;
    /* include border/padding in width to avoid bleed */
}

/* Keep the placeholder centered only when visible (avoid overriding d-none) */
#editPlantModal #edit_no_photo:not(.d-none) {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Space the file input and action buttons slightly from the left edge */
#editPlantModal .row.g-3>.col-md-4:first-child .mt-3 {
    margin-left: 2px;
}

/* Ensure left column never visually bleeds under right column */
#editPlantModal .row.g-3>.col-md-4:first-child {
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .row-cols-1.row-cols-md-4.g-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .row-cols-1.row-cols-md-4.g-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    /* Main layout adjustments */
    .container-fluid {
        padding: 0.5rem !important;
    }

    /* Make the row a flex container on mobile */
    .container-fluid.py-5>.row {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Stack columns vertically on mobile - IMPORTANT */
    .row>.col-md-3,
    .row>.col-md-9 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
        display: block !important;
    }

    /* Show search bar first */
    .col-md-9 {
        order: 1 !important;
    }

    /* Hide desktop category filter on mobile */
    .col-md-3.d-none.d-md-block {
        display: none !important;
    }

    /* Make search bar appear before category */
    .col-md-9 .row.mb-4 {
        order: -1 !important;
    }

    /* Make plants grid appear last */
    .col-md-9 #plantsGrid {
        order: 3 !important;
    }

    /* Make col-md-9 a flex container too */
    .col-md-9 {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Category filter box - much more compact */
    .category-filter-box {
        position: static !important;
        margin-bottom: 0.5rem;
        padding: 0.5rem;
        display: block !important;
        width: 100% !important;
        border-width: 1px !important;
    }

    .filter-title {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
        display: flex !important;
        padding-bottom: 0.35rem;
        border-bottom-width: 1px !important;
    }

    /* Category grid - 4 columns on tablets, very compact */
    .category-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.35rem;
        padding: 0.15rem;
    }

    .category-icon-item {
        padding: 0.3rem 0.15rem;
    }

    .category-icon-item img,
    .icon-circle {
        width: 24px !important;
        height: 24px !important;
    }

    .category-icon-item span {
        font-size: 0.6rem;
        margin-top: 0.2rem;
    }

    /* Smaller action buttons in category filter */
    .category-filter-box .icon-square-btn {
        width: 28px !important;
        height: 28px !important;
    }

    .category-filter-box .icon-square-btn i {
        font-size: 0.8rem !important;
    }

    /* Keep search beside category filter on mobile - don't change layout */
    .row.mb-4 {
        margin-bottom: 1rem !important;
    }

    .row.mb-4>.col-md-6 {
        margin-bottom: 0.75rem;
    }

    .search-controls-container {
        text-align: left !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem;
    }

    .search-controls-container .btn {
        width: 100% !important;
        margin: 0 !important;
    }

    /* Plant grid - single column on mobile */
    .row-cols-1.row-cols-md-4.g-4 {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        padding: 0.5rem;
    }

    /* Plant cards - smaller on mobile */
    .admin-plant-card,
    .user-plant-card {
        height: 200px;
        min-height: 200px;
    }

    .plant-image-container {
        height: 160px;
        min-height: 160px;
    }

    .plant-main-photo {
        height: 160px;
    }

    .no-photo-placeholder {
        height: 160px;
    }

    .plant-header {
        padding: 0.4rem !important;
    }

    .plant-header .card-title {
        font-size: 0.9rem !important;
    }

    /* Marquee adjustments - much smaller on tablets */
    .marquee-container {
        height: 80px;
    }

    .marquee-img {
        height: 80px;
        width: 120px;
    }

    /* Navbar adjustments */
    .main-nav {
        height: 56px !important;
        padding: 0.5rem 0.75rem !important;
    }

    .main-nav .container-fluid {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 100% !important;
    }

    .navbar-brand {
        flex-shrink: 0 !important;
        margin-right: 0.5rem !important;
    }

    .nav-logo {
        width: 28px !important;
        height: 28px !important;
    }

    .brand-text {
        font-size: 16px !important;
    }

    /* Hide hamburger menu on mobile */
    .navbar-toggler {
        display: none !important;
    }

    /* Show navbar content without collapse - keep on same line */
    .navbar-collapse {
        display: flex !important;
        flex-basis: auto !important;
        flex-grow: 1 !important;
        align-items: center !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .navbar-collapse-inner {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 0 !important;
        margin: 0 !important;
    }

    /* Hide center nav on mobile (Home/Dashboard/Plant Guide links) */
    .navbar-nav.mx-auto {
        display: none !important;
    }

    /* User section - show horizontally on mobile, aligned to right */
    .user-section {
        margin-left: auto !important;
        margin-top: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        width: auto !important;
        gap: 0.5rem !important;
        justify-content: flex-end !important;
        flex-shrink: 0 !important;
    }

    /* Menu and Profile dropdowns on mobile - compact side by side */
    .user-section .dropdown {
        flex: 0 0 auto !important;
    }

    .user-section .menu-btn,
    .user-section .profile-btn {
        width: auto !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 0.4rem 0.6rem !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        color: white !important;
        font-size: 0.85rem !important;
        white-space: nowrap !important;
        min-width: 70px !important;
        box-shadow: none !important;
    }

    /* Hide menu text, show only icon */
    .user-section .menu-btn {
        padding: 0.4rem 0.5rem !important;
        min-width: 40px !important;
        background: transparent !important;
        border: none !important;
    }

    .user-section .menu-btn .fa-bars {
        margin-right: 0 !important;
    }

    /* Compact profile button - hide text on mobile */
    .user-section .profile-btn span {
        display: none !important;
    }

    .user-section .profile-btn {
        padding: 0.4rem 0.5rem !important;
        min-width: 40px !important;
        background: transparent !important;
        border: none !important;
    }

    .user-section .profile-btn .profile-pic,
    .user-section .profile-btn .profile-pic-placeholder {
        margin-right: 0 !important;
        width: 24px !important;
        height: 24px !important;
    }

    .user-section .dropdown-menu {
        position: absolute !important;
        width: auto !important;
        min-width: 180px !important;
    }

    /* Splash page adjustments */
    .splash-page h1 {
        font-size: 1.75rem;
    }

    .splash-page .lead {
        font-size: 1rem;
    }

    .splash-content {
        padding: 1.5rem;
        margin: 0 1rem;
    }
}

/* Mobile phones (576px and below) */
@media (max-width: 576px) {

    /* Even more compact layout */
    .container-fluid {
        padding: 0.25rem !important;
    }

    /* Category filter - 4 columns on small phones, ultra compact */
    .category-filter-box {
        padding: 0.4rem;
        margin-bottom: 0.4rem;
    }

    .filter-title {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
        padding-bottom: 0.3rem;
    }

    .category-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.3rem;
        padding: 0.15rem;
    }

    .category-icon-item {
        padding: 0.25rem 0.1rem;
    }

    .category-icon-item img,
    .icon-circle {
        width: 20px !important;
        height: 20px !important;
    }

    .category-icon-item span {
        font-size: 0.55rem;
        margin-top: 0.15rem;
    }

    /* Smaller action buttons */
    .category-filter-box .icon-square-btn {
        width: 26px !important;
        height: 26px !important;
    }

    .category-filter-box .icon-square-btn i {
        font-size: 0.75rem !important;
    }

    /* Plant grid spacing */
    .row-cols-1.row-cols-md-4.g-4 {
        gap: 0.75rem;
        padding: 0.25rem;
    }

    /* Plant cards - even smaller on phones */
    .admin-plant-card,
    .user-plant-card {
        height: 180px;
        min-height: 180px;
    }

    .plant-image-container {
        height: 140px;
        min-height: 140px;
    }

    .plant-main-photo {
        height: 140px;
    }

    .no-photo-placeholder {
        height: 140px;
    }

    .plant-header {
        padding: 0.35rem !important;
    }

    .plant-header .card-title {
        font-size: 0.85rem !important;
    }

    /* Navbar */
    .main-nav {
        padding: 0.4rem 0.5rem !important;
        height: 50px !important;
    }

    .brand-text {
        font-size: 14px !important;
    }

    .nav-logo {
        width: 24px !important;
        height: 24px !important;
        margin-right: 6px !important;
    }

    /* Menu and profile buttons - even more compact */
    .user-section {
        gap: 0.4rem !important;
    }

    .user-section .menu-btn,
    .user-section .profile-btn {
        padding: 0.35rem 0.45rem !important;
        min-width: 36px !important;
        background: transparent !important;
        border: none !important;
    }

    .user-section .menu-btn i,
    .user-section .profile-btn i {
        font-size: 0.85rem !important;
    }

    .user-section .profile-btn .profile-pic,
    .user-section .profile-btn .profile-pic-placeholder {
        width: 22px !important;
        height: 22px !important;
    }

    /* Search input */
    .form-control {
        font-size: 16px !important;
        /* Prevents zoom on iOS */
    }

    /* Buttons */
    .btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }

    /* Marquee - much smaller on phones */
    .marquee-container {
        height: 60px;
    }

    .marquee-img {
        height: 60px;
        width: 90px;
    }

    /* Splash page */
    .splash-page h1 {
        font-size: 1.5rem;
    }

    .splash-page .lead {
        font-size: 0.9rem;
    }

    .splash-content {
        padding: 1rem;
    }

    .scroll-down-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Extra small devices (400px and below) */
@media (max-width: 400px) {

    /* Ultra compact category filter */
    .category-filter-box {
        padding: 0.35rem;
        margin-bottom: 0.35rem;
    }

    .filter-title {
        font-size: 0.75rem;
        margin-bottom: 0.35rem;
        padding-bottom: 0.25rem;
    }

    /* Ultra compact category grid - 3 columns */
    .category-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.25rem;
        padding: 0.1rem;
    }

    .category-icon-item {
        padding: 0.2rem 0.05rem;
    }

    .category-icon-item img,
    .icon-circle {
        width: 18px !important;
        height: 18px !important;
    }

    .category-icon-item span {
        font-size: 0.5rem;
        margin-top: 0.1rem;
    }

    /* Even smaller action buttons */
    .category-filter-box .icon-square-btn {
        width: 24px !important;
        height: 24px !important;
    }

    .category-filter-box .icon-square-btn i {
        font-size: 0.7rem !important;
    }

    /* Marquee - very small */
    .marquee-container {
        height: 50px;
    }

    .marquee-img {
        height: 50px;
        width: 75px;
    }

    /* Compact navbar */
    .brand-text {
        font-size: 14px !important;
    }

    .nav-logo {
        width: 24px !important;
        height: 24px !important;
        margin-right: 6px !important;
    }

    /* Smaller buttons */
    .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
}

/* Details panel text colors */
.plant-details-panel,
.plant-details-panel *:not(.btn):not(.fa):not(.fas) {
    color: white !important;
}

.plant-details-panel .details-header,
.plant-details-panel .details-header h6,
.plant-details-panel .back-to-main {
    color: white !important;
}

/* Target the text values directly */
.plant-details-panel .section-content p {
    color: white !important;
}

.plant-details-panel .section-content p::after {
    color: white !important;
}

/* Target the actual text content, not just the container */
.plant-details-panel .section-content p>span,
.plant-details-panel .section-content p>em,
.plant-details-panel .section-content p>strong,
.plant-details-panel .section-content p:not(:empty) {
    color: white !important;
}

/* Style the labels */
.plant-details-panel .section-content small.text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Ensure scientific name is styled correctly */
.plant-details-panel .section-content em {
    color: white !important;
    font-style: italic;
}

/* Target measurements specifically */
.plant-details-panel .measurements {
    color: white !important;
    margin-bottom: 15px;
}

.plant-details-panel .measurements ul {
    margin-bottom: 0;
    padding-left: 0;
}

.plant-details-panel .measurements ul li,
.plant-details-panel .measurements ul li * {
    color: white !important;
    margin-bottom: 5px;
}

/* Target the plant details panel content */
.plant-details-panel {
    background: rgba(25, 135, 84, 0.95);
}

/* Make ALL text elements white in the details panel */
.plant-details-panel,
.plant-details-panel *,
.plant-details-panel .section-content,
.plant-details-panel .section-content *,
.plant-details-panel .info-section,
.plant-details-panel .info-section * {
    color: white !important;
}

/* Specifically target the category, code, and scientific name */
.plant-details-panel .info-section p,
.plant-details-panel .info-section strong,
.plant-details-panel .info-section em,
.plant-details-panel .category-text,
.plant-details-panel .code-text,
.plant-details-panel .scientific-name {
    color: white !important;
}

/* Target the labels before the values */
.plant-details-panel .info-section label,
.plant-details-panel .info-section .label {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Ensure all spans and text nodes are white */
.plant-details-panel span,
.plant-details-panel .text-dark,
.plant-details-panel .text-body {
    color: white !important;
}

/* Override any Bootstrap text colors */
.plant-details-panel .text-muted,
.plant-details-panel .text-black,
.plant-details-panel .text-dark {
    color: white !important;
}

.plant-details-panel .value-text {
    color: white !important;
}

/* Admin control buttons styling */
.plant-details-panel .admin-controls {
    padding: 1rem !important;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.plant-details-panel .admin-controls .btn {
    width: 100%;
    padding: 0.5rem;
    color: white;
    border: 2px solid rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s ease;
}

.plant-details-panel .manage-photo-btn {
    background-color: rgba(20, 115, 71, 0.95) !important;
    color: white !important;
}

.plant-details-panel .delete-plant-btn {
    background-color: rgba(220, 53, 69, 0.95) !important;
    color: white !important;
}

/* Hover states */
.plant-details-panel .manage-photo-btn:hover {
    background-color: rgba(20, 115, 71, 1) !important;
    border-color: rgba(0, 0, 0, 0.3) !important;
}

.plant-details-panel .delete-plant-btn:hover {
    background-color: rgba(220, 53, 69, 1) !important;
    border-color: rgba(0, 0, 0, 0.3) !important;
}

/* Remove border from details header - more specific selector */
.plant-details-panel .details-header.border-bottom {
    border-bottom: none !important;
}

/* Also target the Bootstrap class directly */
.plant-details-panel .border-bottom {
    border-bottom: 0 !important;
}

/* Admin Plant Details: back button left, icons center, title right corner */
.admin-plant-card .plant-details-panel .details-header {
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    padding: 18px 12px 12px 12px !important;
    min-height: 60px !important;
}

.admin-plant-card .plant-details-panel .details-header .back-to-main {
    position: absolute !important;
    left: 28px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10 !important;
}

.admin-plant-card .plant-details-panel .details-header>div {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    z-index: 5 !important;
}

.admin-plant-card .plant-details-panel .details-header h6 {
    position: absolute !important;
    right: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 5 !important;
    margin: 0 !important;
}

/* Custom RFQ Modal Styles */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.custom-modal-overlay.show {
    display: flex !important;
}

.custom-modal-container {
    background: white;
    border-radius: 0.5rem;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.custom-modal-header {
    padding: 1rem 1.5rem;
    background: #198754;
    color: white;
    border-radius: 0.5rem 0.5rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-modal-header h5 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.custom-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.custom-modal-close:hover {
    opacity: 1;
}

.custom-modal-body {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
}

.custom-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* RFQ Modal responsive adjustments */
@media (max-width: 768px) {
    .custom-modal-container {
        max-width: 95%;
        max-height: 85vh;
    }
    
    .custom-modal-header {
        padding: 0.75rem 1rem;
    }
    
    .custom-modal-header h5 {
        font-size: 1rem;
    }
    
    .custom-modal-body {
        padding: 1rem;
    }
    
    .custom-modal-footer {
        padding: 0.75rem 1rem;
        flex-direction: column;
    }
    
    .custom-modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .custom-modal-overlay {
        padding: 0.5rem;
    }
    
    .custom-modal-container {
        max-width: 100%;
        max-height: 95vh;
    }
    
    .custom-modal-header {
        padding: 0.5rem 0.75rem;
    }
    
    .custom-modal-header h5 {
        font-size: 0.9rem;
    }
    
    .custom-modal-body {
        padding: 0.75rem;
    }
    
    .custom-modal-body table {
        font-size: 0.75rem;
    }
    
    .custom-modal-body .table th,
    .custom-modal-body .table td {
        padding: 0.4rem 0.3rem;
    }
}

/* Ensure modals work on all screen sizes */
.modal-dialog {
    margin: 1rem auto;
}

@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-content {
        border-radius: 0.5rem;
    }
    
    .modal-header,
    .modal-footer {
        padding: 0.75rem;
    }
    
    .modal-body {
        padding: 0.75rem;
    }
    
    .modal-title {
        font-size: 1rem;
    }
}

/* Touch-friendly buttons */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }
    
    .btn-sm {
        min-height: 38px;
        padding: 0.4rem 0.75rem;
    }
}

/* Ensure forms are touch-friendly */
@media (max-width: 768px) {
    .form-control,
    .form-select {
        min-height: 44px;
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
    
    textarea.form-control {
        min-height: 100px;
    }
}

/* Fix for horizontal scrolling issues */
body {
    overflow-x: hidden;
}

.container {
    overflow-x: hidden;
}

/* Don't hide overflow on container-fluid in navbar - it clips dropdowns */
.main-nav .container-fluid {
    overflow: visible;
}

/* Ensure images don't cause overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive tables */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 600px;
    }
}

/* Fix notification dropdown on mobile */
@media (max-width: 768px) {
    .notification-dropdown {
        position: fixed !important;
        top: 56px !important;
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        border-radius: 8px;
    }
    
    .notification-header {
        padding: 10px 12px;
        border-radius: 6px 6px 0 0;
    }
    
    .notification-header h6 {
        font-size: 0.85rem;
    }
    
    .mark-all-read,
    .delete-all-notifications {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    .notification-item {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .notification-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .notification-title {
        font-size: 0.8rem;
    }
    
    .notification-message {
        font-size: 0.7rem;
        line-height: 1.3;
    }
    
    .notification-time {
        font-size: 0.65rem;
    }
    
    .notification-list {
        max-height: 250px;
        scroll-behavior: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    .notification-footer {
        padding: 8px 12px;
    }
    
    .notification-footer a {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .notification-dropdown {
        top: 50px !important;
        right: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 280px !important;
        max-width: 280px !important;
    }
    
    .notification-header {
        padding: 8px 10px;
    }
    
    .notification-header h6 {
        font-size: 0.8rem;
    }
    
    .mark-all-read,
    .delete-all-notifications {
        font-size: 0.75rem;
        padding: 3px 6px;
    }
    
    .notification-item {
        padding: 8px 10px;
        gap: 8px;
    }
    
    .notification-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .notification-title {
        font-size: 0.75rem;
    }
    
    .notification-message {
        font-size: 0.65rem;
        line-height: 1.2;
    }
    
    .notification-time {
        font-size: 0.6rem;
    }
    
    .notification-list {
        max-height: 200px;
        scroll-behavior: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    .notification-footer {
        padding: 6px 10px;
    }
    
    .notification-footer a {
        font-size: 0.75rem;
    }
}mportant;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    z-index: 10 !important;
    font-size: 0.9rem !important;
}

/* Icon colors and styling in header */
.admin-plant-card .plant-details-panel .details-header .edit-plant-btn {
    color: #fff !important;
    font-size: 1rem !important;
    padding: 0.25rem !important;
    background: transparent !important;
}

/* Category Filter Box Styles */
.category-filter-box {
    background: #fff;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e0e0e0;
}

.filter-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #198754;
}

.category-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-start;
}

.category-icon-item {
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 0 0 auto;
    max-width: 80px;
    position: relative;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 8px;
}

.category-icon-item:hover {
    background-color: rgba(25, 135, 84, 0.1);
}

.category-icon-item:hover .category-img {
    filter: brightness(0) saturate(100%);
}

.category-img {
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
    filter: brightness(0) saturate(100%) invert(32%) sepia(98%) saturate(1124%) hue-rotate(127deg) brightness(96%) contrast(106%);
    margin-bottom: 0.25rem;
}

.category-icon-item span {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.category-icon-item:hover span {
    color: #000;
}

.category-icon-item.active {
    background-color: rgba(25, 135, 84, 0.15);
    border: 2px solid #198754;
}

.category-icon-item.active .category-img {
    filter: brightness(0) saturate(100%);
}

.category-icon-item.active span {
    color: #198754;
    font-weight: 600;
}

.icon-circle {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 2px solid #198754;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
    color: #198754;
}

.icon-circle.active {
    background-color: #198754;
    color: #fff;
}

/* Square icon buttons for header actions (Add/Delete Category) */
.icon-square-btn {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    line-height: 1 !important;
}

.icon-square-btn i {
    font-size: 0.95rem !important;
}
    border: none !important;
}

.admin-plant-card .plant-details-panel .details-header .delete-plant-btn {
    color: #dc3545 !important;
    font-size: 1rem !important;
    padding: 0.25rem !important;
    background: transparent !important;
    border: none !important;
}

/* Fix delete icon appearance */
.admin-plant-card .plant-details-panel .details-header .delete-plant-btn i {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    color: #dc3545 !important;
}

/* Hover effects for header icons */
.admin-plant-card .plant-details-panel .details-header .btn:hover {
    opacity: 0.85;
    transform: scale(1.1);
}

/* Make icons consistent size */
.admin-plant-card .plant-details-panel .details-header .btn i {
    font-size: 1rem !important;
}

/* Override any white color inheritance for delete icon */
.admin-plant-card .plant-details-panel .details-header .delete-plant-btn i.fa-trash {
    color: #dc3545 !important;
}

/* Style the back button */
.plant-details-panel .back-to-main {
    padding: 0.25rem;
    border: none;
    background: transparent;
    color: white !important;
}

.plant-details-panel .back-to-main:hover {
    transform: translateX(-2px);
    transition: transform 0.2s ease;
}

.plant-details-panel .back-to-main i {
    font-size: 1.2rem;
}

/* Add these styles if they're not already present */
.profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    text-decoration: none;
    padding: 5px 10px;
}

.profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-pic-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #147347;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.dropdown-menu {
    min-width: 200px;
    padding: 8px;
}

.dropdown-item {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.moving-image {
    width: auto;
    height: 150px;
    max-width: 100%;
    margin: 0 auto;
    display: block;
    position: relative;
    z-index: 1;
}

.search-item {
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-item:hover {
    background-color: #f0f0f0;
}

#searchResults {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}

::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 10px !important;
}

::-webkit-scrollbar-thumb {
    background: #198754 !important;
    border-radius: 10px !important;
    transition: all 0.3s ease !important;
}

::-webkit-scrollbar-thumb:hover {
    background: #146c43 !important;
}

/* Ensure plant images display correctly */
.plant-image-container {
    position: relative;
    height: 230px;
    overflow: hidden;
    min-height: 230px;
}

/* Reusable confirmation modal sizing and styles for Home page */
#homeConfirmModal .modal-dialog {
    max-width: 420px;
}

#homeConfirmModal .modal-header {
    background: #198754;
    color: #fff;
}

#homeConfirmModal .modal-body .warn-icon {
    font-size: 2rem;
    color: #dc3545;
}

#homeConfirmModal .btn-cancel {
    background: #e9ecef;
    color: #6c757d;
    border: none;
}

.plant-main-photo {
    width: 100%;
    height: 230px;
    object-fit: cover;
    object-position: center;
    max-height: 100%;
    margin: 0;
    padding: 0;
}

.admin-plant-card,
.user-plant-card {
    height: 270px;
    min-height: 270px;
    display: flex;
    flex-direction: column;
}

/* Plant Selection Mode - IMPORTANT STYLES */
.plant-selection-mode .selection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.05);
    display: block;
    z-index: 50;
}

.plant-selection-mode .selection-checkbox {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid #198754;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
    transition: all 0.2s ease;
}

.plant-selection-mode .selection-checkbox i {
    color: transparent;
    font-size: 16px;
    transition: all 0.2s ease;
}

.plant-selection-mode .admin-plant-card,
.plant-selection-mode .user-plant-card {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Selected card styles */
.plant-selection-mode .admin-plant-card.selected,
.plant-selection-mode .user-plant-card.selected {
    box-shadow: 0 0 0 2px #198754, 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.plant-selection-mode .admin-plant-card.selected .selection-overlay,
.plant-selection-mode .user-plant-card.selected .selection-overlay {
    background-color: rgba(25, 135, 84, 0.1);
}

.plant-selection-mode .admin-plant-card.selected .selection-checkbox,
.plant-selection-mode .user-plant-card.selected .selection-checkbox {
    background-color: #198754;
}

.plant-selection-mode .admin-plant-card.selected .selection-checkbox i,
.plant-selection-mode .user-plant-card.selected .selection-checkbox i {
    color: white;
}

/* Prevent detail panels from showing in selection mode */
.plant-selection-mode .admin-plant-card .plant-details-panel,
.plant-selection-mode .user-plant-card .plant-details-panel {
    display: none !important;
}

/* Selection bar styles */
.selection-bar {
    background-color: #198754;
    color: white;
    padding: 15px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.selection-bar h5 {
    margin-bottom: 5px;
    font-weight: 600;
}

/* Loading overlay styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-container {
    text-align: center;
}

/* Marquee Container */
.marquee-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
    padding: 0;
    margin: 0;
    border-bottom: 1px solid #dee2e6;
    position: relative;
    top: 0;
    left: 0;
}

.marquee {
    width: 100%;
    height: 100%;
    display: flex;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.marquee-content {
    display: flex;
    animation: scroll 40s linear infinite;
    gap: 0;
    padding: 0;
    flex-shrink: 0;
}

.marquee-img {
    height: 200px;
    width: 300px;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.3s ease;
    padding: 0;
}

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

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

.marquee:hover .marquee-content {
    animation-play-state: paused;
}

/* Splash Page */
.splash-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(25, 135, 84, 0.4);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.8s ease-in-out;
    margin: 0;
    padding: 0;
}

.splash-page.hidden {
    transform: translateY(-100%);
}

.splash-content {
    background: rgba(255, 255, 255, 0.15);
    padding: 2rem;
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.splash-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.splash-page h1 {
    color: white;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.splash-page p {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.scroll-down-btn {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border: 2px solid white;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    margin-top: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.scroll-down-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scroll-down-btn i {
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Make the main content visible behind splash page */
.main-content {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Category Filter Styles */
.category-filter-box {
    background: white;
    border: 2px solid #198754;
    border-radius: 8px;
    padding: 1.5rem;
    position: sticky;
    top: 20px;
}

.filter-title {
    color: #198754;
    font-size: 1.1rem;
    border-bottom: 2px solid #198754;
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 0.5rem;
}

.category-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    text-align: center;
}

.category-icon-item img {
    width: 24px;
    height: 24px;
    margin-bottom: 0.5rem;
    object-fit: contain;
}

.icon-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
}

.icon-circle.active {
    background: #198754;
    color: white;
}

.category-icon-item span {
    font-size: 0.8rem;
    color: #6c757d;
    display: block;
    text-align: center;
}

.category-icon-item:hover {
    background: #e8f5e9;
    transform: translateY(-2px);
}

.category-icon-item.active {
    background: rgba(25, 135, 84, 0.1);
    border: 1px solid #198754;
}

.category-icon-item.active span {
    color: #198754;
    font-weight: 500;
}

/* Small square icon buttons used in Category Filter header (Add/Delete) */
.icon-square-btn {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    line-height: 1 !important;
}

.icon-square-btn i {
    font-size: 0.95rem !important;
}

.category-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.category-icon-item:hover .category-img {
    transform: scale(1.1);
}

/* RFQ Form Styles */
.table-no-border,
.table-no-border td,
.table-no-border th {
    border: none !important;
}

.center {
    text-align: center;
}

.section {
    margin-top: 20px;
    margin-bottom: 20px;
}

#rfqFormContainer {
    padding: 20px 30px;
    border: 1px solid #eee;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 15px;
}

#rfqFormContainer h2 {
    font-size: 24px;
    margin-bottom: 5px;
    text-align: center;
    margin-top: 10px;
}

#rfqFormContainer h3 {
    font-size: 18px;
    font-weight: normal;
    text-align: center;
    margin-bottom: 25px;
    color: #555;
}

#rfqFormContainer h4 {
    font-size: 16px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

#rfqFormContainer .section {
    margin-bottom: 20px;
}

#rfqFormContainer .center {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

#rfqFormContainer .table-bordered {
    border: 1px solid #333;
}

#rfqFormContainer .table-bordered th,
#rfqFormContainer .table-bordered td {
    border: 1px solid #333;
    padding: 8px;
    vertical-align: middle;
}

#rfqFormContainer .table-bordered th {
    background-color: #f5f5f5;
}

#rfqFormContainer .table-no-border,
#rfqFormContainer .table-no-border td {
    border: none;
    padding: 5px;
}

#rfqFormContainer p {
    margin-bottom: 10px;
}

/* Styles for Request Pages */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
}

.empty-state i {
    display: block;
    margin: 0 auto 1rem;
}

.empty-state h5 {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 0;
}

/* Card Styles for Request Pages */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1rem 1.25rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-header h5 {
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

.table-light {
    background-color: #f8f9fa;
}

.table thead th {
    font-weight: 600;
    border-bottom-width: 1px;
    vertical-align: bottom;
    padding: 0.75rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

/* RFQ Modal styles */
#rfqFormModal .modal-dialog {
    max-width: 95%;
    width: 95%;
    margin: 0.5rem auto;
}

#rfqFormModal .modal-content {
    height: auto;
    padding: 0;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

#rfqFormModal .modal-body {
    max-height: 85vh;
    overflow-y: auto;
    padding: 1rem;
    overflow-x: hidden;
    /* Prevent horizontal scrolling */
}

/* Improve table scrolling */
#rfqFormModal .table-bordered {
    width: 100%;
    table-layout: fixed;
    /* Use fixed layout for better control */
}

/* Remove horizontal scrolling for table section */
#rfqFormModal .section:has(.table-bordered) {
    max-width: 100%;
    margin-bottom: 1rem;
    overflow-x: visible;
    /* Prevent horizontal scrolling */
}

#rfqFormModal .center {
    text-align: center;
    margin-bottom: 1rem;
}

#rfqFormModal .center h2 {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

#rfqFormModal .center h3 {
    font-size: 1.1rem;
    font-weight: normal;
}

#rfqFormModal .section {
    margin-bottom: 1rem;
}

#rfqFormModal .section h4 {
    font-size: 1.1rem;
    font-weight: bold;
    border-bottom: 1px solid #343a40;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

#rfqFormModal table.table {
    width: 100%;
    table-layout: fixed;
}

/* More balanced column widths */
#rfqFormModal .table th:nth-child(1) {
    width: 5%;
}

/* Item No. */
#rfqFormModal .table th:nth-child(2) {
    width: 5%;
}

/* Qty */
#rfqFormModal .table th:nth-child(3) {
    width: 20%;
}

/* Plant Name */
#rfqFormModal .table th:nth-child(4) {
    width: 10%;
}

/* Plant Code */
#rfqFormModal .table th:nth-child(5) {
    width: 7%;
}

/* Height */
#rfqFormModal .table th:nth-child(6) {
    width: 7%;
}

/* Spread */
#rfqFormModal .table th:nth-child(7) {
    width: 7%;
}

/* Spacing */
#rfqFormModal .table th:nth-child(8) {
    width: 15%;
}

/* Remarks */
#rfqFormModal .table th:nth-child(9) {
    width: 8%;
}

/* Unit Price */
#rfqFormModal .table th:nth-child(10) {
    width: 8%;
}

/* Total Price */
#rfqFormModal .table th:nth-child(11) {
    width: 8%;
}

/* Availability */

#rfqFormModal table td {
    white-space: normal;
    overflow: visible;
    text-overflow: ellipsis;
    /* Add ellipsis for overflow text */
    vertical-align: middle;
    font-size: 0.9rem;
    /* Slightly larger font for better readability */
    padding: 0.75rem 0.5rem;
    word-break: break-word;
    /* Allow words to break to prevent overflow */
}

/* Improve wrapping for all cells */
#rfqFormModal table td {
    white-space: normal;
    word-wrap: break-word;
}

/* Compact card spacing */
#rfqFormModal .card {
    margin-bottom: 1rem;
}

#rfqFormModal .card-body {
    padding: 1rem;
}

/* Better spacing for vendor info table */
#rfqFormModal .table-no-border td {
    border: none;
    padding: 0.5rem 0.75rem;
}

/* Compact row spacing */
#rfqFormModal .row.mb-4 {
    margin-bottom: 1rem !important;
}

#rfqFormModal .row.mb-3 {
    margin-bottom: 0.75rem !important;
}

#rfqFormModal table th {
    text-align: center;
    vertical-align: middle;
    font-size: 0.85rem;
    /* Slightly smaller font for better fit */
    padding: 0.4rem;
    position: sticky;
    top: 0;
    background: #f5f5f5;
    z-index: 10;
}

#rfqFormModal .form-control {
    box-sizing: border-box;
    width: 100%;
    border-radius: 0.2rem;
    padding: 0.25rem 0.4rem;
    /* Smaller padding for better fit */
    font-size: 0.85rem;
    /* Smaller font size */
}

#rfqFormModal input[type="number"] {
    -moz-appearance: textfield;
}

#rfqFormModal input[type="number"]::-webkit-outer-spin-button,
#rfqFormModal input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Make modal more responsive on smaller screens */
@media (max-width: 1200px) {
    #rfqFormModal .modal-dialog {
        max-width: 95%;
        width: auto;
    }

    #rfqFormModal table td,
    #rfqFormModal table th {
        font-size: 0.75rem;
        padding: 0.3rem;
    }
}

@media (max-width: 768px) {

    #rfqFormModal .table th,
    #rfqFormModal .table td {
        font-size: 0.7rem;
        padding: 0.25rem;
    }

    #rfqFormModal .form-control {
        padding: 0.2rem;
        font-size: 0.7rem;
    }

    #rfqFormModal .modal-body {
        padding: 0.75rem;
    }
}

/* Fix for print version */
@media print {
    body * {
        visibility: hidden;
    }

    #rfqFormContainer,
    #rfqFormContainer * {
        visibility: visible;
    }

    #rfqFormContainer {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 40px;
    }
}

/* Additional RFQ Form Improvements */
.rfq-form-container {
    padding: 15px;
}

.rfq-form-container .section {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.rfq-form-container .vendor-info td {
    padding: 3px;
}

.rfq-form-container .rfq-details p,
.rfq-form-container .buyer-info p {
    margin-bottom: 5px;
}

.rfq-form-container .total-section {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
}

.rfq-form-container .table-responsive {
    margin-bottom: 20px;
    padding-bottom: 0;
    border-bottom: none;
}

.rfq-form-container .terms-conditions {
    border-bottom: none;
}

.rfq-form-container .terms-conditions ol {
    padding-left: 20px;
}

.rfq-form-container .terms-conditions li {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.rfq-form-container .vendor-instructions p {
    font-size: 0.9rem;
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .rfq-form-container {
        padding: 10px;
    }

    .rfq-form-container h2 {
        font-size: 1.2rem;
    }

    .rfq-form-container h3 {
        font-size: 1rem;
    }

    .rfq-form-container h4 {
        font-size: 0.9rem;
    }

    .rfq-form-container p,
    .rfq-form-container .terms-conditions li {
        font-size: 0.8rem;
    }
}

/* Editable measurements in plant details */
.editable-measurement {
    background-color: #fff !important;
    color: #000 !important;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    width: 100%;
    font-weight: normal;
}

.editable-measurement:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.1);
    background-color: #fff !important;
    color: #000 !important;
    border-color: rgba(0, 0, 0, 0.3);
}

/* Layout for measurement rows */
.plant-details-panel .measurements li {
    margin: 0;
    padding: 2px 0;
}

.plant-details-panel .measurements ul {
    margin-bottom: 0;
    padding-left: 0;
}

/* Input group styling for measurements */
.measurement-input-group {
    width: 55%;
    margin-top: 2px;
    margin-bottom: 2px;
}

/* Login prompt for guests */
.login-prompt {
    margin-top: 1rem;
    padding: 0.5rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    text-align: center;
}

.login-prompt a {
    color: #fff;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
}

.login-prompt a:hover {
    color: #f8f9fa;
    text-decoration: underline;
}

.login-prompt i {
    margin-right: 5px;
}

/* Selected plants counter */
.selected-plants-counter {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #343a40;
    color: white;
    padding: 10px 15px;
    border-radius: 50px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    z-index: 1030;
    /* Lower than modal z-index (1050) */
    transition: background-color 0.3s ease;
}

.selected-plants-counter.has-items {
    background-color: #28a745;
}

.selected-plants-counter .count {
    font-weight: bold;
    margin: 0 5px;
}

.selected-plants-counter .view-btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 50px;
    padding: 3px 10px;
    margin-left: 10px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.selected-plants-counter .view-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.measurements li small.text-muted,
.measurements li label.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.measurements li {
    padding: 3px 0;
    margin-bottom: 0;
}

.plant-details-panel .measurements ul {
    margin-bottom: 0;
    padding-left: 0;
}

/* Plant action button (Add/Remove) */
.plant-action-btn {
    width: auto;
    margin-top: 0;
    transition: all 0.3s ease;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: nowrap;
}

.plant-action-btn[data-action="add"] {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.plant-action-btn[data-action="add"]:hover {
    background-color: #218838;
    border-color: #1e7e34;
    color: white;
}

.plant-action-btn[data-action="remove"] {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.plant-action-btn[data-action="remove"]:hover {
    background-color: #c82333;
    border-color: #bd2130;
    color: white;
}

.plant-action-btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.plant-action-btn i {
    margin-right: 5px;
}

.selected-plants-counter .clear-btn {
    background-color: #dc3545;
    border: none;
    color: white;
    border-radius: 50px;
    padding: 3px 10px;
    margin-left: 5px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.selected-plants-counter .clear-btn:hover {
    background-color: #c82333;
}

.selected-plants-counter .clear-btn i {
    margin: 0;
    color: white !important;
}

/* Style the delete button in the modal with red background and white icon */
.modal-remove-plant {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.modal-remove-plant i.fas.fa-trash {
    color: white !important;
}

.modal-remove-plant:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
}

/* Make the request form modal extra wide */
.extra-wide-modal {
    max-width: 95% !important;
    width: 95% !important;
}

@media (min-width: 1400px) {
    .extra-wide-modal {
        max-width: 1400px !important;
        width: 95% !important;
    }
}

/* Modal table columns should have appropriate widths */
#modalSelectedPlantsTable th:nth-child(1) {
    width: 25%;
}

/* Plant Name */
#modalSelectedPlantsTable th:nth-child(2) {
    width: 10%;
}

/* Code */
#modalSelectedPlantsTable th:nth-child(3) {
    width: 10%;
}

/* Quantity */
#modalSelectedPlantsTable th:nth-child(4) {
    width: 15%;
}

/* Height */
#modalSelectedPlantsTable th:nth-child(5) {
    width: 15%;
}

/* Spread */
#modalSelectedPlantsTable th:nth-child(6) {
    width: 15%;
}

/* Spacing */
#modalSelectedPlantsTable th:nth-child(7) {
    width: 10%;
}

/* Actions */

/ *========================================MOBILE RESPONSIVE STYLES========================================*/
/* Tablets and below (768px) */
@media (max-width: 768px) {

    /* Marquee - much smaller */
    .marquee-container {
        height: 80px !important;
    }

    .marquee-img {
        height: 80px !important;
        width: 120px !important;
    }

    /* Main layout adjustments */
    .container-fluid.py-5 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    /* Stack columns vertically on mobile */
    .row>.col-md-3,
    .row>.col-md-9 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        display: block !important;
    }

    /* Category filter - much more compact */
    .category-filter-box {
        position: static !important;
        margin-bottom: 0.5rem !important;
        padding: 0.5rem !important;
        border-width: 1px !important;
    }

    .filter-title {
        font-size: 0.85rem !important;
        margin-bottom: 0.5rem !important;
        padding-bottom: 0.35rem !important;
    }

    .category-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.35rem !important;
        padding: 0.15rem !important;
    }

    .category-icon-item {
        padding: 0.3rem 0.15rem !important;
    }

    .category-icon-item img,
    .icon-circle {
        width: 24px !important;
        height: 24px !important;
    }

    .category-icon-item span {
        font-size: 0.6rem !important;
        margin-top: 0.2rem !important;
    }

    .category-filter-box .icon-square-btn {
        width: 28px !important;
        height: 28px !important;
    }

    .category-filter-box .icon-square-btn i {
        font-size: 0.8rem !important;
    }

    /* Search and controls */
    .row.mb-4 {
        margin-bottom: 0.75rem !important;
    }

    .row.mb-4>.col-md-6 {
        margin-bottom: 0.5rem !important;
    }

    .search-controls-container {
        text-align: left !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .search-controls-container .btn {
        width: 100% !important;
        margin: 0 !important;
    }

    /* Plant grid - single column */
    .row-cols-1.row-cols-md-4.g-4 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0.5rem !important;
    }

    /* Navbar adjustments */
    .main-nav {
        height: 56px !important;
        padding: 0.5rem 0.75rem !important;
    }

    .main-nav .container-fluid {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .navbar-brand {
        flex-shrink: 0 !important;
    }

    .nav-logo {
        width: 28px !important;
        height: 28px !important;
    }

    .brand-text {
        font-size: 16px !important;
    }

    .navbar-toggler {
        display: none !important;
    }

    .navbar-collapse {
        display: flex !important;
        flex-basis: auto !important;
        flex-grow: 1 !important;
        align-items: center !important;
    }

    .navbar-collapse-inner {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        justify-content: flex-end !important;
    }

    .navbar-nav.center-nav {
        display: none !important;
    }

    .user-section {
        margin-left: auto !important;
        display: flex !important;
        flex-direction: row !important;
        gap: 0.5rem !important;
    }

    .user-section .dropdown {
        flex: 0 0 auto !important;
    }

    .user-section .menu-btn,
    .user-section .profile-btn {
        padding: 0.4rem 0.5rem !important;
        min-width: 40px !important;
        font-size: 0.85rem !important;
    }

    .user-section .profile-btn span {
        display: none !important;
    }

    .user-section .profile-btn .profile-pic,
    .user-section .profile-btn .profile-pic-placeholder {
        width: 24px !important;
        height: 24px !important;
    }
}

/* Mobile phones (576px and below) */
@media (max-width: 576px) {

    /* Marquee - much smaller */
    .marquee-container {
        height: 60px !important;
    }

    .marquee-img {
        height: 60px !important;
        width: 90px !important;
    }

    /* Category filter - ultra compact */
    .category-filter-box {
        padding: 0.4rem !important;
        margin-bottom: 0.4rem !important;
    }

    .filter-title {
        font-size: 0.8rem !important;
        margin-bottom: 0.4rem !important;
        padding-bottom: 0.3rem !important;
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.3rem !important;
        padding: 0.15rem !important;
    }

    .category-icon-item {
        padding: 0.25rem 0.1rem !important;
    }

    .category-icon-item img,
    .icon-circle {
        width: 20px !important;
        height: 20px !important;
    }

    .category-icon-item span {
        font-size: 0.55rem !important;
        margin-top: 0.15rem !important;
    }

    .category-filter-box .icon-square-btn {
        width: 26px !important;
        height: 26px !important;
    }

    .category-filter-box .icon-square-btn i {
        font-size: 0.75rem !important;
    }

    /* Navbar */
    .main-nav {
        padding: 0.4rem 0.5rem !important;
        height: 50px !important;
    }

    .brand-text {
        font-size: 14px !important;
    }

    .nav-logo {
        width: 24px !important;
        height: 24px !important;
    }

    .user-section {
        gap: 0.4rem !important;
    }

    .user-section .menu-btn,
    .user-section .profile-btn {
        padding: 0.35rem 0.45rem !important;
        min-width: 36px !important;
    }

    .user-section .profile-btn .profile-pic,
    .user-section .profile-btn .profile-pic-placeholder {
        width: 22px !important;
        height: 22px !important;
    }
}

/* Extra small devices (400px and below) */
@media (max-width: 400px) {

    /* Marquee - very small */
    .marquee-container {
        height: 50px !important;
    }

    .marquee-img {
        height: 50px !important;
        width: 75px !important;
    }

    /* Category filter - minimal */
    .category-filter-box {
        padding: 0.35rem !important;
        margin-bottom: 0.35rem !important;
    }

    .filter-title {
        font-size: 0.75rem !important;
        margin-bottom: 0.35rem !important;
        padding-bottom: 0.25rem !important;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.25rem !important;
        padding: 0.1rem !important;
    }

    .category-icon-item {
        padding: 0.2rem 0.05rem !important;
    }

    .category-icon-item img,
    .icon-circle {
        width: 18px !important;
        height: 18px !important;
    }

    .category-icon-item span {
        font-size: 0.5rem !important;
        margin-top: 0.1rem !important;
    }

    .category-filter-box .icon-square-btn {
        width: 24px !important;
        height: 24px !important;
    }

    .category-filter-box .icon-square-btn i {
        font-size: 0.7rem !important;
    }
}


/* Category Filter Box Styles */
.category-filter-box {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
 