/* Modern custom shadow utility */
.shadow-custom {
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.3s ease;
}

.shadow-custom:hover {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12), 0 6px 15px rgba(0, 0, 0, 0.05);
}

/* Modern body styling with improved background */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #334155;
    line-height: 1.6;
    font-size: 15px;
}

/* Enhanced Modern Production Detail Snippet Styles */
.modern-production-detail {
    padding: 2.5rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(25px);
    border-radius: 28px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.08), 
        0 12px 40px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.7);
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modern Calendar Styles */
.modern-calendar-container {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(25px);
    border-radius: 28px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.08), 
        0 12px 40px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.7);
    padding: 2rem;
    margin: 1rem 0;
    animation: slideInUp 0.6s ease-out;
}

.modern-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.modern-calendar-header h3 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.025em;
}

.modern-calendar-nav {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #475569;
    border: 2px solid rgba(203, 213, 225, 0.6);
    border-radius: 16px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(148, 163, 184, 0.15);
    backdrop-filter: blur(8px);
    text-decoration: none;
}

.modern-calendar-nav:hover {
    background: rgba(241, 245, 249, 0.9);
    backdrop-filter: blur(15px);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(148, 163, 184, 0.25);
    color: #334155;
}

.modern-calendar-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 8px;
    margin-bottom: 1rem;
    table-layout: fixed;
}

.modern-calendar-table th {
    padding: 1rem;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #475569;
    text-align: center;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.1);
}

.modern-calendar-table td {
    vertical-align: top;
    height: 120px;
    max-height: 120px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 0.75rem;
    font-size: 0.8rem;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.modern-calendar-table td:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(148, 163, 184, 0.15);
}

.calendar-day-number {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: #334155;
}

/* Today's Date Highlighting */
.calendar-today {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
    position: relative;
    overflow: visible;
    animation: todayPulse 2s infinite ease-in-out;
    border: 2px solid rgba(59, 130, 246, 0.4) !important;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3), 0 4px 15px rgba(148, 163, 184, 0.15) !important;
}

.calendar-today .calendar-day-number {
    color: white !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.calendar-today::before {
    content: '🌟';
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    animation: todayStarSpin 3s linear infinite;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
    z-index: 10;
}

@keyframes todayPulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.3), 0 4px 15px rgba(148, 163, 184, 0.15);
    }
    50% {
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.5), 0 6px 20px rgba(148, 163, 184, 0.25);
    }
}

@keyframes todayStarSpin {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1); }
    75% { transform: rotate(270deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Tomorrow's Date Highlighting */
.calendar-tomorrow {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    position: relative;
    animation: tomorrowGlow 3s infinite ease-in-out;
    border: 2px solid rgba(16, 185, 129, 0.4) !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2), 0 4px 15px rgba(148, 163, 184, 0.15) !important;
}

.calendar-tomorrow .calendar-day-number {
    color: white !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.calendar-tomorrow::before {
    content: '⚡';
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    animation: tomorrowBounce 2s infinite ease-in-out;
    box-shadow: 0 2px 8px rgba(34, 211, 238, 0.4);
    z-index: 10;
}

@keyframes tomorrowGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.2), 0 4px 15px rgba(148, 163, 184, 0.15);
    }
    50% {
        box-shadow: 0 0 30px rgba(16, 185, 129, 0.4), 0 6px 20px rgba(148, 163, 184, 0.25);
    }
}

@keyframes tomorrowBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(-5deg); }
    50% { transform: translateY(-6px) rotate(0deg); }
    75% { transform: translateY(-3px) rotate(5deg); }
}

.modern-calendar-filters {
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.08);
}

.modern-calendar-filters label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modern-calendar-filters label:hover {
    color: #334155;
}

.modern-calendar-filters input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.modern-calendar-filters input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
}

/* Modern Statistics Styles */
.stats-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 140px;
}

.stats-filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin: 0;
}

.modern-select, .modern-input {
    appearance: none;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(203, 213, 225, 0.6);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 6px rgba(148, 163, 184, 0.08);
}

.modern-select:focus, .modern-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.modern-select:hover, .modern-input:hover {
    border-color: rgba(148, 163, 184, 0.8);
    background: rgba(255, 255, 255, 0.95);
}

.modern-stats-chart-container {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 1.5rem;
    box-shadow: 0 8px 32px rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.8);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.modern-stats-legend {
    margin-top: 1.5rem;
}

.modern-legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.modern-legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modern-legend-item:hover {
    background: rgba(241, 245, 249, 0.8);
    transform: translateY(-1px);
}

.modern-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modern-legend-label {
    font-weight: 500;
    color: #334155;
    font-size: 0.9rem;
    flex: 1;
}

.modern-legend-count {
    font-weight: 700;
    color: #6b7280;
    font-size: 0.85rem;
}

/* Responsive adjustments for statistics */
@media (max-width: 768px) {
    .modern-calendar-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .stats-filter-group {
        min-width: auto;
    }
    
    .modern-legend-grid {
        grid-template-columns: 1fr;
    }
    
    .modern-stats-chart-container {
        padding: 1rem;
    }
}

.calendar-event-item {
    background-color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.3rem;
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
    position: relative;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.calendar-event-item:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.calendar-yiddish-event {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    color: #495057;
    border-left: 3px solid #6c757d;
}

.modern-production-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4, #10b981);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.production-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 3px solid transparent;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.15)) bottom;
    background-size: 100% 3px;
    background-repeat: no-repeat;
    position: relative;
}

.production-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    background: linear-gradient(135deg, #1e293b 0%, #3b82f6 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.production-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
}

.production-id {
    font-size: 1rem;
    font-weight: 700;
    color: #475569;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    border: 2px solid rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
    transition: all 0.3s ease;
}

.production-id:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.25);
}

.production-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.7) 100%);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.06),
        0 4px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.info-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 8px 30px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.85) 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

.info-card:hover::before {
    opacity: 1;
}

.info-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.8rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-label::before {
    content: '';
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    word-wrap: break-word;
    line-height: 1.5;
}

.clickable-card {
    cursor: pointer;
}

.clickable-card:hover {
    border-color: rgba(59, 130, 246, 0.5) !important;
}

.status-form-inline, .reassign-form-inline {
    margin-top: 0.5rem;
}

.status-form-inline select, .reassign-form-inline select {
    width: 100%;
    margin-bottom: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}


.product-tag {
    display: inline-block;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-right: 0.6rem;
    margin-bottom: 0.6rem;
    border: 2px solid rgba(30, 64, 175, 0.2);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.product-tag:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.25);
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
}

.product-tag:hover::before {
    left: 100%;
}

.modern-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.modern-status-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.modern-status-badge:hover::before {
    transform: translateX(100%);
}

.modern-status-badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1e293b;
    margin: 3rem 0 2rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.section-title.danger {
    color: #dc2626;
}

.section-title::before {
    content: '';
    width: 6px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
    border-radius: 3px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.section-title.danger::before {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.3), transparent);
    border-radius: 1px;
}

.activity-section {
    margin-bottom: 2.5rem;
}

.timeline-container {
    position: relative;
    padding-left: 0;
}

.timeline-item {
    margin-bottom: 2.5rem;
    position: relative;
    animation: fadeInUp 0.5s ease-out;
}

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

.comment-item {
    display: flex;
    flex-direction: column;
}

.comment-item[data-role="client"] {
    align-items: flex-end;
}

.comment-item[data-role="admin"], 
.comment-item[data-role="superadmin"] {
    align-items: flex-start;
}

.comment-bubble {
    max-width: 80%;
    padding: 2rem;
    border-radius: 24px;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.12),
        0 6px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.comment-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.comment-bubble:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.18),
        0 8px 30px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.comment-bubble:hover::before {
    opacity: 1;
}

.comment-bubble-admin {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.12) 0%, rgba(29, 78, 216, 0.06) 100%);
    border-left: 5px solid #3b82f6;
    box-shadow: 
        0 12px 40px rgba(59, 130, 246, 0.15),
        0 6px 20px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.comment-bubble-admin::before {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.comment-bubble-client {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.06) 100%);
    border-left: 5px solid #10b981;
    box-shadow: 
        0 12px 40px rgba(16, 185, 129, 0.15),
        0 6px 20px rgba(16, 185, 129, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.comment-bubble-client::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.commenter-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.comment-timestamp {
    font-size: 0.85rem;
    color: #64748b;
    opacity: 0.9;
    font-weight: 500;
}

.comment-internal-badge {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: #dc2626;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid rgba(239, 68, 68, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.comment-content {
    line-height: 1.7;
    white-space: pre-wrap;
    color: #374151;
    font-size: 1rem;
    font-weight: 500;
}

.comment-attachment {
    margin-top: 1.5rem;
}

.attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(29, 78, 216, 0.08) 100%);
    border-radius: 16px;
    border: 2px solid rgba(59, 130, 246, 0.25);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.attachment-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.attachment-link:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(29, 78, 216, 0.12) 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.4);
}

.attachment-link:hover::before {
    left: 100%;
}

.comment-actions {
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.unread-indicator {
    color: #dc2626;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-text {
    background: none;
    border: none;
    color: #3b82f6;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    transition: color 0.3s ease;
}

.btn-text:hover {
    color: #1d4ed8;
}

.edit-form {
    margin-top: 1rem;
    padding: 1.5rem;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.log-item {
    padding: 1rem 1.5rem;
    background: rgba(241, 245, 249, 0.6);
    border-radius: 12px;
    border-left: 4px solid #64748b;
}

.log-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.log-timestamp {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.log-message {
    color: #374151;
    font-size: 0.9rem;
}

.status-change-old {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-weight: 500;
}

.status-change-new {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-weight: 500;
}

.emergency-item {
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.5s ease-out;
}

.emergency-alert-card {
    background: linear-gradient(145deg, #fef2f2 0%, #fee2e2 50%, #fecaca 100%);
    border: 3px solid #fecaca;
    border-left: 8px solid #dc2626;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 
        0 12px 40px rgba(220, 38, 38, 0.2),
        0 6px 20px rgba(220, 38, 38, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.emergency-alert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #dc2626, #ef4444, #f87171);
    background-size: 200% 100%;
    animation: emergencyPulse 2s ease-in-out infinite;
}

@keyframes emergencyPulse {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.emergency-alert-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(220, 38, 38, 0.25),
        0 8px 30px rgba(220, 38, 38, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.emergency-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.emergency-icon {
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
    60% { transform: translateY(-3px); }
}

.emergency-title {
    font-weight: 800;
    color: #dc2626;
    font-size: 1.2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.emergency-timestamp {
    font-size: 0.85rem;
    color: #64748b;
    margin-left: auto;
    font-weight: 500;
}

.emergency-details > div {
    margin-bottom: 0.75rem;
}

.emergency-message {
    background: rgba(254, 242, 242, 0.8);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(254, 202, 202, 0.6);
}

.emergency-status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.emergency-status-badge.status-open {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.emergency-status-badge.status-accepted {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fed7aa;
}

.emergency-status-badge.status-closed {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.emergency-timeline {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.5rem;
}

.emergency-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-text {
    font-size: 1.1rem;
    font-weight: 500;
}

.mark-all-read-form {
    margin-top: 2rem;
    text-align: center;
}

.btn-mark-read-modern {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #475569;
    border: 2px solid rgba(203, 213, 225, 0.6);
    border-radius: 16px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(148, 163, 184, 0.15);
    backdrop-filter: blur(8px);
}

.btn-mark-read-modern:hover {
    background: rgba(241, 245, 249, 0.9);
    backdrop-filter: blur(15px);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(148, 163, 184, 0.25);
    border-color: rgba(203, 213, 225, 0.8);
    color: #1e293b;
}

.add-comment-section, .action-section, .danger-section {
    margin-bottom: 2rem;
}

.comment-form, .reassign-form, .status-form, .delete-form {
    background: linear-gradient(145deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.6) 100%);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    border: 2px solid rgba(226, 232, 240, 0.4);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.comment-form:hover, .reassign-form:hover, .status-form:hover, .delete-form:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.8) 100%);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.modern-textarea {
    width: 100%;
    padding: 1.5rem;
    border: 3px solid rgba(226, 232, 240, 0.6);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    backdrop-filter: blur(15px);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.7;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    resize: vertical;
    min-height: 140px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.modern-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.15),
        0 8px 25px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    background: linear-gradient(145deg, rgba(255, 255, 255, 1) 0%, rgba(248, 250, 252, 0.95) 100%);
    transform: translateY(-2px);
}

.modern-textarea::placeholder {
    color: #9ca3af;
    font-style: italic;
    font-weight: 500;
}

.file-upload-section {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 12px;
    border: 2px dashed rgba(226, 232, 240, 0.6);
    transition: all 0.3s ease;
}

.file-upload-section:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(59, 130, 246, 0.4);
}

.file-upload-label {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(145deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.file-upload-label:hover {
    background: linear-gradient(145deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.file-upload-input {
    display: none;
}

.file-name-display {
    margin-left: 1rem;
    color: #64748b;
    font-weight: 500;
    font-size: 0.95rem;
}

.modern-select, .modern-input {
    padding: 1rem 1.5rem;
    border: 3px solid rgba(226, 232, 240, 0.6);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    backdrop-filter: blur(15px);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #374151;
    font-weight: 500;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.modern-select:focus, .modern-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.15),
        0 8px 25px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    background: linear-gradient(145deg, rgba(255, 255, 255, 1) 0%, rgba(248, 250, 252, 0.95) 100%);
    transform: translateY(-2px);
}

.form-check-modern {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

.form-check-modern .form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.form-check-modern .form-check-label {
    font-size: 0.9rem;
    color: #374151;
    font-weight: 500;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group-inline {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-group-inline .modern-select {
    flex: 1;
    min-width: 200px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.025em;
}

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

.btn-modern:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

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

.btn-modern:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-modern.btn-primary {
    background: linear-gradient(135deg, #9fa1a5 0%, #8a8c90 50%, #75777b 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-modern.btn-primary:hover {
    background: linear-gradient(135deg, #8a8c90 0%, #75777b 50%, #60626a 100%);
    box-shadow: 
        0 12px 35px rgba(159, 161, 165, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-modern.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #047857 50%, #065f46 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-modern.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #065f46 50%, #064e3b 100%);
    box-shadow: 
        0 12px 35px rgba(16, 185, 129, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-modern.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-modern.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 50%, #92400e 100%);
    box-shadow: 
        0 12px 35px rgba(245, 158, 11, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-modern.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-modern.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
    box-shadow: 
        0 12px 35px rgba(239, 68, 68, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-modern.btn-secondary {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    color: #475569;
    border: 2px solid rgba(203, 213, 225, 0.6);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.btn-modern.btn-secondary:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%);
    color: #1e293b;
    box-shadow: 
        0 12px 35px rgba(148, 163, 184, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.btn-modern.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 20px;
    font-weight: 800;
}

.action-buttons {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modern-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

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

.modern-modal {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px);
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.6);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid rgba(226, 232, 240, 0.4);
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.8) 100%);
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.modal-body {
    padding: 2rem;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem 2rem;
    border-top: 2px solid rgba(226, 232, 240, 0.4);
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.8) 100%);
}

.inline-form {
    display: inline;
}

/* Enhanced Responsive design for production detail */
@media (max-width: 768px) {
    .modern-production-detail {
        padding: 2rem;
        border-radius: 20px;
        margin: 0.5rem;
    }
    
    .production-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding-bottom: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .production-title {
        font-size: 1.8rem;
    }
    
    .production-info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .info-card {
        padding: 1.5rem;
    }
    
    .comment-bubble {
        max-width: 95%;
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.4rem;
        margin: 2.5rem 0 1.5rem 0;
    }
    
    .form-group-inline {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .form-group-inline .modern-select {
        min-width: unset;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-modern.btn-large {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        width: 100%;
    }
    
    .modern-textarea {
        min-height: 120px;
        padding: 1.25rem;
    }
    
    .modern-select, .modern-input {
        padding: 0.875rem 1.25rem;
    }
    
    .comment-form, .reassign-form, .status-form, .delete-form {
        padding: 1.5rem;
    }
}
    
    .modern-modal {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .modal-header, .modal-body, .modal-footer {
        padding: 1rem 1.5rem;
    }
    
    .date-input-group {
        gap: 1rem;
    }
}

html {
    overflow-x: hidden !important;
}

/* Modern badge styling */
body .badge {
    padding: 0.4rem 0.75rem !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #333 !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* Modern button base styling with frosted glass */
.btn {
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 0 4px 14px rgba(148, 163, 184, 0.15);
    backdrop-filter: blur(8px);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(148, 163, 184, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, #9fa1a5 0%, #8a8c90 100%);
    color: white;
    border: 1px solid rgba(203, 213, 225, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #8a8c90 0%, #75777b 100%);
    color: white;
    border-color: rgba(148, 163, 184, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    color: white;
}

/* Modern comment bubble styles with enhanced frosted glass */
.comment-bubble {
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(148, 163, 184, 0.12), 0 4px 16px rgba(148, 163, 184, 0.06);
    backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.comment-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(148, 163, 184, 0.18), 0 6px 20px rgba(148, 163, 184, 0.10);
}

.comment-bubble-client {
    background: linear-gradient(135deg, rgba(236, 253, 245, 0.9) 0%, rgba(209, 250, 229, 0.9) 100%);
    border-left: 4px solid #10b981;
}

.comment-bubble-admin {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%);
    border-left: 4px solid #64748b;
}

.comment-header {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.comment-content {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #475569;
}

.comment-timestamp {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 400;
}

.comment-internal-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Modern Mark All as Read button with frosted glass effect */
.btn-mark-read {
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.5);
    color: #334155;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.025em;
    box-shadow: 0 4px 14px rgba(148, 163, 184, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-mark-read:hover {
    background: rgba(241, 245, 249, 0.9);
    backdrop-filter: blur(15px);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(148, 163, 184, 0.25);
    border-color: rgba(203, 213, 225, 0.8);
    color: #1e293b;
}

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

.btn-mark-read:hover:before {
    left: 100%;
}

/* Modern form styling with frosted glass */
.form-control {
    border-radius: 12px;
    border: 2px solid rgba(226, 232, 240, 0.6);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.form-control:focus {
    border-color: rgba(100, 116, 139, 0.6);
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.form-select {
    border-radius: 12px;
    border: 2px solid rgba(226, 232, 240, 0.6);
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: rgba(100, 116, 139, 0.6);
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.1);
}

/* Modern table styling with frosted glass */
table {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

table th {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%);
    color: #1e293b;
    font-weight: 600;
    padding: 1rem;
    border-bottom: 2px solid rgba(226, 232, 240, 0.6);
}

table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(241, 245, 249, 0.6);
    transition: background-color 0.2s ease;
}

table tr:hover td {
    background-color: rgba(100, 116, 139, 0.04);
}

/* Modern reading pane/modal with enhanced frosted glass */
.reading-pane {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(25px) !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 50px rgba(148, 163, 184, 0.15), 0 12px 25px rgba(148, 163, 184, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

.reading-overlay {
    background: rgba(15, 23, 42, 0.4) !important;
    backdrop-filter: blur(12px) !important;
}

/* Modern sidebar styling with frosted glass */
.admin-sidebar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%) !important;
    backdrop-filter: blur(20px) !important;
    border-right: 1px solid rgba(226, 232, 240, 0.6) !important;
    box-shadow: 2px 0 20px rgba(148, 163, 184, 0.08) !important;
}

.admin-sidebar a,
.admin-sidebar button {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    border-radius: 10px !important;
    transition: all 0.3s ease !important;
    border: 1px solid rgba(226, 232, 240, 0.4) !important;
}

.admin-sidebar a:hover,
.admin-sidebar button:hover,
.admin-sidebar a.active,
.admin-sidebar button.active {
    background: rgba(241, 245, 249, 0.9) !important;
    backdrop-filter: blur(15px) !important;
    color: #1e293b !important;
    transform: translateX(4px) !important;
    box-shadow: 0 4px 12px rgba(148, 163, 184, 0.2) !important;
    border-color: rgba(203, 213, 225, 0.8) !important;
}

/* Emergency alert modern styling */
.emergency-alert {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-left: 4px solid #ef4444;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Modern status badges with frosted glass */
.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.8rem;
    border: 1px solid rgba(226, 232, 240, 0.4);
    backdrop-filter: blur(10px);
    background: rgba(248, 250, 252, 0.8);
    color: #334155;
}

/* Global responsive improvements */
@media (max-width: 768px) {
    /* Ensure content fits mobile screens */
    * {
        box-sizing: border-box;
    }
    
    /* Make sure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Improve button touch targets */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Modern comment bubbles on mobile */
    .comment-bubble {
        max-width: 85% !important;
        padding: 0.8rem 1rem !important;
    }
    
    .comment-header {
        font-size: 0.85rem;
    }
    
    .comment-content {
        font-size: 0.9rem;
    }
    
    /* Better spacing for mobile */
    .container,
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Improve readability on mobile */
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.1rem; }
    h4 { font-size: 1rem; }
    
    /* Make modals mobile-friendly */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    /* Mobile reading pane adjustments */
    .reading-pane {
        width: 95% !important;
        height: 95% !important;
        max-height: 95% !important;
        margin: 0.5rem !important;
        border-radius: 12px !important;
    }
    
    /* IMPROVED: Better table responsive design with horizontal scroll */
    table {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    
    /* Create table container for horizontal scrolling */
    .table-responsive-mobile {
        overflow-x: auto;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        max-height: 400px;
        overflow-y: auto;
        position: relative;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
    }
    
    .table-responsive-mobile table {
        min-width: 800px;
        margin: 0;
        width: auto;
    }
    
    /* Sticky table headers with frosted glass */
    .table-responsive-mobile thead th {
        position: sticky;
        top: 0;
        background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.95) 100%);
        z-index: 10;
        border-bottom: 2px solid rgba(226, 232, 240, 0.6);
        backdrop-filter: blur(10px);
    }
    
    /* Better mobile table cell sizing */
    .table-responsive-mobile th,
    .table-responsive-mobile td {
        padding: 0.5rem;
        font-size: 0.8rem;
        white-space: nowrap;
        min-width: 80px;
    }
    
    /* Specific column width improvements */
    .table-responsive-mobile th:nth-child(1),
    .table-responsive-mobile td:nth-child(1) { min-width: 60px; } /* ID */
    .table-responsive-mobile th:nth-child(2),
    .table-responsive-mobile td:nth-child(2) { min-width: 150px; } /* Product/Name */
    .table-responsive-mobile th:nth-child(3),
    .table-responsive-mobile td:nth-child(3) { min-width: 120px; } /* Client */
    .table-responsive-mobile th:nth-child(4),
    .table-responsive-mobile td:nth-child(4) { min-width: 180px; } /* Dates */
    .table-responsive-mobile th:nth-child(5),
    .table-responsive-mobile td:nth-child(5) { min-width: 120px; } /* Status */
    .table-responsive-mobile th:nth-child(6),
    .table-responsive-mobile td:nth-child(6) { min-width: 100px; } /* Assigned */
    .table-responsive-mobile th:nth-child(7),
    .table-responsive-mobile td:nth-child(7) { min-width: 130px; } /* Created */
    .table-responsive-mobile th:nth-child(8),
    .table-responsive-mobile td:nth-child(8) { min-width: 120px; } /* Actions */
    .table-responsive-mobile th:nth-child(9),
    .table-responsive-mobile td:nth-child(9) { min-width: 80px; } /* Messages */
    
    /* Mobile-friendly mark read button */
    .btn-mark-read {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
}

/* Tablet responsive improvements */
@media (max-width: 1024px) and (min-width: 769px) {
    .btn {
        padding: 0.6rem 1.2rem;
    }
    
    .comment-bubble {
        max-width: 80% !important;
    }
    
    .reading-pane {
        width: 90% !important;
        height: 85% !important;
    }
    
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.2rem; }
}

/* Modern scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.8);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

/* Enhanced focus states for accessibility with frosted glass */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.2);
    border-color: rgba(100, 116, 139, 0.6);
}

/* Improved link styling with modern colors */
a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #475569;
    text-decoration: underline;
}

/* Loading state animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Improved card styling */
.card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

/* Modern notification styling */
.notification {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #0ea5e9;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.notification.success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-left-color: #22c55e;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

.notification.warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-left-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.notification.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-left-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

/* Jewish Holiday Date Picker Enhancement Styles */
.holiday-indicator-container {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    display: flex;
    gap: 2px;
    pointer-events: none;
    z-index: 10;
}

.holiday-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #8B4513;
    position: relative;
    cursor: help;
    pointer-events: auto;
    animation: holidayPulse 2s infinite ease-in-out;
    box-shadow: 0 2px 4px rgba(139, 69, 19, 0.3);
}

@keyframes holidayPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.holiday-dot:hover {
    transform: scale(1.2);
    background-color: #A0522D;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.5);
}

.holiday-tooltip {
    position: absolute;
    bottom: 20px;
    right: 0;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    max-width: 200px;
    word-wrap: break-word;
    white-space: normal;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
    pointer-events: none;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.2s ease;
}

.holiday-dot:hover .holiday-tooltip {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
}

.holiday-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

/* Enhanced date input styling to accommodate holiday indicators */
input[type="date"] {
    position: relative;
    padding-right: 50px; /* Make space for the holiday indicator */
}

/* Enhanced Holiday Date Picker - Calendar Integration Styles */
.jewish-holiday-date-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.jewish-holiday-date-wrapper input[type="date"] {
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Holiday indicator styles for when date input has focus */
.jewish-holiday-date-wrapper input[type="date"]:focus + .holiday-indicator-container + .holiday-calendar-overlay {
    display: block;
    opacity: 1;
    animation: calendarSlideIn 0.3s ease-out;
}

.holiday-calendar-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 1rem;
    margin-top: 4px;
    display: none;
    opacity: 0;
    max-width: 320px;
    pointer-events: auto;
}

.holiday-info-panel {
    font-size: 0.875rem;
    color: #475569;
}

.holiday-info-panel .current-selection {
    background: #f1f5f9;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border-left: 3px solid #3b82f6;
}

.holiday-info-panel .holiday-list {
    background: #fef7ed;
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid #8B4513;
}

.holiday-info-panel .holiday-item {
    margin: 0.25rem 0;
    font-weight: 500;
    color: #8B4513;
}

.holiday-info-panel .no-holiday {
    color: #64748b;
    font-style: italic;
}

@keyframes calendarSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced holiday indicator with pulsing effect for holiday dates */
.jewish-holiday-date-wrapper[data-has-holiday="true"] input[type="date"] {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(254, 247, 237, 0.6) 50%, 
        rgba(255, 255, 255, 1) 100%);
    border-color: rgba(139, 69, 19, 0.3);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.jewish-holiday-date-wrapper[data-has-holiday="true"] input[type="date"]:focus {
    border-color: rgba(139, 69, 19, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.2);
}

/* Holiday indicator dot with enhanced visibility */
.jewish-holiday-date-wrapper[data-has-holiday="true"] .holiday-dot {
    animation: holidayPulse 2s infinite ease-in-out, holidayGlow 3s infinite ease-in-out;
}

@keyframes holidayGlow {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(139, 69, 19, 0.3), 0 0 8px rgba(139, 69, 19, 0.2);
    }
    50% {
        box-shadow: 0 2px 8px rgba(139, 69, 19, 0.5), 0 0 16px rgba(139, 69, 19, 0.4);
    }
}

/* Date input pseudo-element indicator for holiday dates */
.jewish-holiday-date-wrapper[data-has-holiday="true"] input[type="date"]::before {
    content: "⭐";
    position: absolute;
    right: 35px;
    top: 50%;
    transform: translateY(-50%);
    color: #8B4513;
    font-size: 0.8rem;
    z-index: 2;
    pointer-events: none;
    opacity: 0.7;
    animation: starTwinkle 2s infinite ease-in-out;
}

@keyframes starTwinkle {
    0%, 100% {
        opacity: 0.7;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-50%) scale(1.1);
    }
}
}