.kanban-column {
    min-width: 300px;
    max-width: 350px;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.column-header {
    padding: 1rem;
    border-radius: 0.75rem 0.75rem 0 0;
}

.card-list-container {
    max-height: calc(100% - 64px);
    overflow-y: auto;
    padding: 0.75rem;
    flex-grow: 1;
    scrollbar-width: thin;
    scrollbar-color: #9ca3af #f3f4f6;
}

.kanban-card {
    transition: all 0.1s ease;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid;
    position: relative;
}

.admin-card {
    cursor: default;
    /* Changed from pointer to allow text selection */
}

.detail-text {
    font-size: 0.75rem;
    color: #4b5563;
}

.detail-text-label {
    font-weight: 500;
    color: #9ca3af;
    margin-right: 4px;
}

.note-textarea {
    resize: vertical;
    min-height: 60px;
    font-size: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid #d1d5db;
}

.last-note-display {
    white-space: normal;
    word-break: break-word;
}

.dropdown-menu-content {
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.dropdown-item:hover {
    background-color: #f3f4f6;
    cursor: pointer;
}

.whatsapp-btn {
    background-color: #25D366;
    border-radius: 50%;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

.date-input-small {
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    width: 140px;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

summary {
    cursor: pointer;
}

.dropdown-option-item {
    padding: 8px 12px;
    cursor: pointer;
}

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

.create-new-option {
    color: #1d4ed8;
    font-weight: 500;
}

#main-header {
    transition: transform 0.4s ease-in-out;
    transform: translateY(0);
}

body.header-collapsed #main-header {
    transform: translateY(-100%);
}

#main-content {
    transition: padding-top 0.4s ease-in-out;
    padding-top: 110px;
}

body.header-collapsed #main-content {
    padding-top: 0px;
}

@media (max-width: 768px) {
    #main-content {
        padding-top: 143px;
    }
}

.kanban-card.z-index-active {
    z-index: 50;
}

/* style.css (file ke aakhir mein add karein) */

/* Body ko poori screen height do aur Flexbox ka sahi istemaal karo */
body {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main content ko bachi hui saari jagah do */
#main-content {
    flex-grow: 1;
    /* Yeh zaroori hai taaki andar ka content overflow na ho */
    overflow: hidden;
}

/* Footer ko apni jagah fix karo */
#product-nav-bar {
    flex-shrink: 0;
    /* Isse footer shrink nahi hoga */
}

/* Admin Editable Fields Styling */
.admin-editable {
    border-bottom: 1px dashed transparent;
    transition: all 0.2s;
    cursor: text;
}

.admin-editable:hover {
    background-color: #fffbeb;
    /* Light Yellow */
    border-bottom-color: #d97706;
    color: #b45309;
}

.editing-input {
    width: 100%;
    padding: 2px 4px;
    border: 1px solid #3b82f6;
    border-radius: 4px;
    font-size: inherit;
    font-weight: inherit;
    background-color: #fff;
    outline: none;
}

.editing-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.5);
}

/* --- HEADER TOGGLE ANIMATION --- */

/* Header Transition */
#main-header {
    transition: transform 0.4s ease-in-out;
    transform: translateY(0);
}

/* Jab body par 'header-collapsed' class ho, to header upar chhup jaye */
body.header-collapsed #main-header {
    transform: translateY(-100%);
}

/* Content Padding Transition */
#main-content {
    transition: padding-top 0.4s ease-in-out;
    /* Default padding jo abhi hai (e.g., 110px ya jo bhi aapne set kiya ho) */
}

/* Jab header gayab ho, to content upar chala jaye */
body.header-collapsed #main-content {
    padding-top: 10px !important;
    /* Thoda gap rakha hai taaki chipak na jaye */
}

/* --- FOOTER TOGGLE ANIMATION --- */

#product-nav-bar {
    transition: all 0.4s ease-in-out;
    max-height: 80px;
    /* Footer ki anumanit height */
    opacity: 1;
    overflow: hidden;
    /* Chhupne par content na dikhe */
}

/* Jab body par 'footer-collapsed' class ho */
body.footer-collapsed #product-nav-bar {
    max-height: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
}

/* Disabled Save Button Style */
#save-all-btn:disabled {
    background-color: #9ca3af;
    /* Gray */
    cursor: not-allowed;
    opacity: 0.7;
}

/* --- GLOBAL SCROLLBAR STYLES --- */
.custom-scrollbar::-webkit-scrollbar {
    width: 10px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #e5e7eb;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ============================================ */
/* HALF-SCREEN PANEL STYLES (ADMIN ONLY)       */
/* ============================================ */

/* Panel Base Styles */
#halfScreenPanel {
    max-width: 50vw;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Panel Active State (Slides In) */
#halfScreenPanel.active {
    transform: translateX(0) !important;
}

/* Panel Content Scrollable Area */
#panelContent {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #9ca3af #e5e7eb;
    -webkit-overflow-scrolling: touch;
}

/* Mobile Responsive - Full Screen on Small Devices */
@media (max-width: 768px) {
    #halfScreenPanel {
        width: 100% !important;
        max-width: 100vw;
    }
}

/* Smooth Slide Animation */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0.8;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.panel-slide-in {
    animation: slideInRight 0.3s ease-out;
}

/* Panel Header Styling */
#panelHeader {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

/* Overlay Fade In */
#panelOverlay.active {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Dull / muted style for admin read-only columns */
.admin-read-only-dull {
    background-color: #f9fafb !important; /* Muted gray background */
    color: #9ca3af !important; /* Muted gray text color */
}

/* ============================================ */
/* SEARCH HISTORY FEATURE STYLES                */
/* ============================================ */

#searchHistoryBtn {
    transition: all 0.2s ease;
}

#searchHistoryBtn:hover {
    color: #2563eb;
    transform: translateY(-50%) scale(1.1);
}

.search-history-dropdown {
    position: absolute;
    right: 0;
    top: 45px;
    width: 280px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    padding: 0.75rem 0;
    z-index: 100;
    max-height: 320px;
    overflow-y: auto;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top right;
}

.search-history-dropdown.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.95);
}

.search-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem 0.5rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 0.25rem;
}

.search-history-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-history-clear-all {
    font-size: 0.7rem;
    font-weight: 600;
    color: #ef4444;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.search-history-clear-all:hover {
    background-color: #fef2f2;
    text-decoration: underline;
}

.search-history-list {
    display: flex;
    flex-direction: column;
}

.search-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.search-history-item-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-grow: 1;
}

.search-history-item-icon {
    color: #9ca3af;
    font-size: 0.75rem;
    transition: color 0.2s;
}

.search-history-item:hover .search-history-item-icon {
    color: #3b82f6;
}

.search-history-item-text {
    font-size: 0.825rem;
    font-weight: 700;
    color: #374151;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.search-history-item-delete {
    opacity: 0;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-history-item:hover .search-history-item-delete {
    opacity: 1;
}

.search-history-item-delete:hover {
    color: #ef4444;
    background-color: #f3f4f6;
}

.search-history-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}