/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 25%, #4338ca 50%, #6366f1 100%);
    min-height: 100vh;
    color: #1a202c;
    line-height: 1.6;
    font-feature-settings: 'cv01', 'cv02', 'cv03', 'cv04';
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.95) 0%, rgba(55, 48, 163, 0.95) 50%, rgba(67, 56, 202, 0.95) 100%);
    backdrop-filter: blur(20px);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 32px rgba(30, 58, 138, 0.25);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.03em;
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

/* Hamburger Menu */
.hamburger-menu {
    background: none;
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.hamburger-menu.active {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
}

.nav-brand span {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-logo {
    height: 40px;
    width: auto;
    margin-right: 1rem;
    filter: brightness(0) invert(1);
}

.nav-brand i {
    margin-right: 0.5rem;
    color: #ffffff;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.user-menu span {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    letter-spacing: -0.01em;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 50%, #8b5cf6 100%);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 14px rgba(67, 56, 202, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #3730a3 0%, #4338ca 50%, #7c3aed 100%);
    box-shadow: 0 8px 25px rgba(67, 56, 202, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #1a202c;
    border: 1px solid rgba(26, 32, 44, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 101, 101, 0.4);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    position: relative;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    align-items: center;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.08), 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(99, 102, 241, 0.12), 0 8px 16px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.8rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

/* Total Deliverables - Blue/Purple gradient */
.stat-icon:not(.high-priority):not(.in-progress):not(.completed) {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.stat-icon:not(.high-priority):not(.in-progress):not(.completed):hover {
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}

/* High Priority - Red/Orange gradient */
.stat-icon.high-priority {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 50%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.stat-icon.high-priority:hover {
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
}

/* In Progress - Yellow/Orange gradient */
.stat-icon.in-progress {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.25);
}

.stat-icon.in-progress:hover {
    box-shadow: 0 6px 16px rgba(251, 191, 36, 0.35);
}

/* Completed - Green gradient */
.stat-icon.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.stat-icon.completed:hover {
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

/* Icon specific animations */
.stat-icon .fa-clipboard-list {
    animation: pulse-subtle 2s ease-in-out infinite;
}

.stat-icon .fa-exclamation-triangle {
    animation: shake-subtle 1.5s ease-in-out infinite;
}

.stat-icon .fa-spinner {
    animation: spin 2s linear infinite;
}

.stat-icon .fa-check-circle {
    animation: bounce-subtle 2s ease-in-out infinite;
}

/* Keyframes for subtle animations */
@keyframes pulse-subtle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake-subtle {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-1px); }
    75% { transform: translateX(1px); }
}

@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Timeline Remarks Styles */
.remarks-timeline-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.timeline-header h4 {
    margin: 0;
    font-size: 1rem;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-summary {
    font-size: 0.875rem;
    color: #6c757d;
    font-style: italic;
}

.timeline-content {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.timeline-item {
    display: flex;
    margin-bottom: 1rem;
    position: relative;
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 2rem;
    bottom: -1rem;
    width: 2px;
    background: #dee2e6;
}

.timeline-item:last-child:before {
    display: none;
}

.timeline-marker {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 0.75rem;
    font-weight: bold;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.timeline-marker.general {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.timeline-marker.engineering {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.timeline-marker.qa {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

.timeline-content-item {
    flex: 1;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.timeline-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: #6c757d;
}

.timeline-author {
    font-weight: 600;
    color: #495057;
}

.timeline-date {
    font-style: italic;
}

.timeline-text {
    font-size: 0.875rem;
    line-height: 1.4;
    color: #212529;
    white-space: pre-wrap;
}

/* Add Remark Styles */
.add-remark-container {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
}

.remark-input-group {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: start;
}

.remark-type-select {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.875rem;
    background: white;
    min-width: 120px;
}

.remark-input {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

.remark-input:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
    background: transparent;
}

.btn-outline-primary:hover {
    color: white;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}

/* Timeline Empty State */
.timeline-empty {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .remark-input-group {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .timeline-content {
        max-height: 150px;
    }
}

/* Remarks Tooltip for Table View */
.remarks-cell {
    position: relative;
    cursor: pointer;
    color: #007bff;
    text-decoration: underline;
}

.remarks-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 300px;
    max-width: 400px;
    padding: 1rem;
    display: none;
    margin-top: 0.5rem;
}

.remarks-tooltip:before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #dee2e6;
}

.remarks-tooltip:after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid white;
}

.tooltip-header {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tooltip-timeline {
    max-height: 200px;
    overflow-y: auto;
}

.tooltip-timeline-item {
    display: flex;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}

.tooltip-timeline-item:last-child {
    margin-bottom: 0;
}

.tooltip-marker {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    font-size: 0.6rem;
    font-weight: bold;
    flex-shrink: 0;
}

.tooltip-marker.general {
    background: #6c757d;
    color: white;
}

.tooltip-marker.engineering {
    background: #007bff;
    color: white;
}

.tooltip-marker.qa {
    background: #28a745;
    color: white;
}

.tooltip-content {
    flex: 1;
}

.tooltip-meta {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
}

.tooltip-text {
    color: #212529;
    line-height: 1.3;
}

.tooltip-date {
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Remarks cell needs relative positioning for tooltip */
.remarks-cell {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.remarks-cell:hover {
    background-color: #f8f9fa;
}

/* Click behavior - show tooltip */
.remarks-tooltip.show {
    display: block !important;
}

/* ========================================
   REMARKS SIDEBAR STYLES
   ======================================== */

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9998;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

.remarks-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    z-index: 9999;
    transition: right 0.3s ease-in-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.remarks-sidebar.open {
    right: 0;
}

.sidebar-content {
    background: white;
    height: 100%;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.sidebar-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.deliverable-info {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.deliverable-info h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.deliverable-info p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
}

.timeline-stats {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.add-remark-section {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background: white;
}

.add-remark-section h5 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remark-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.remark-type-select {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
}

.remark-textarea {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.remark-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.timeline-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.timeline-section h5 {
    margin: 0;
    padding: 1rem 1.5rem 0.5rem;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #e9ecef;
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.timeline-container {
    flex: 1;
    padding: 1rem 1.5rem 1.5rem;
    background: #fafbfc;
}

.timeline-loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
}

.sidebar-timeline-item {
    display: flex;
    margin-bottom: 1.5rem;
    position: relative;
}

.sidebar-timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 2.5rem;
    bottom: -1.5rem;
    width: 2px;
    background: linear-gradient(to bottom, #e9ecef, #f8f9fa);
}

.sidebar-timeline-marker {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.sidebar-timeline-marker.general {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.sidebar-timeline-marker.engineering {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.sidebar-timeline-marker.qa {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

.sidebar-timeline-content {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.sidebar-timeline-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f3f4;
}

.sidebar-timeline-author {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.sidebar-timeline-date {
    font-size: 0.8rem;
    color: #6c757d;
}

.sidebar-timeline-text {
    color: #212529;
    line-height: 1.5;
    font-size: 0.9rem;
}

.timeline-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
    font-style: italic;
}

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

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .remarks-sidebar {
        width: 100vw;
        right: -100vw;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-content h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #333;
}

.stat-content p {
    color: #666;
    font-size: 0.85rem;
    margin: 0;
}

/* Controls */
.controls {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.08), 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.search-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    position: relative;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.search-box input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    font-size: 0.9rem;
    min-width: 140px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.filter-select:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: rgba(255, 255, 255, 1);
}

/* Modern Table */
.modern-table-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 12px 48px rgba(99, 102, 241, 0.1), 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.table-controls-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.table-controls-right {
    display: flex;
    gap: 0.5rem;
}

.checkbox-container {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 18px;
    width: 18px;
    background-color: white;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: #6366f1;
}

.checkbox-container input:checked ~ .checkmark {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: #6366f1;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.entries-count {
    font-size: 0.875rem;
    color: #6b7280;
}

.table-action-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.table-action-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.table-action-btn.delete {
    color: #dc2626;
    border-color: #fca5a5;
}

.table-action-btn.delete:hover {
    background: #fef2f2;
    border-color: #f87171;
}

.modern-data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
    table-layout: fixed;
}

/* Scrollable table container */
.table-scroll-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 70vh;
    border-radius: 12px;
}

.table-scroll-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-scroll-container::-webkit-scrollbar-track {
    background: rgba(99, 102, 241, 0.1);
    border-radius: 4px;
}

.table-scroll-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 4px;
}

.table-scroll-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4338ca 0%, #7c3aed 100%);
}

.modern-data-table th {
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 50%, #8b5cf6 100%);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding: 0.5rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    color: white;
    cursor: pointer;
    user-select: none;
    position: sticky;
    top: 0;
    letter-spacing: -0.01em;
    box-shadow: 0 2px 8px rgba(67, 56, 202, 0.15);
    z-index: 10;
}

.modern-data-table th:hover {
    background: linear-gradient(135deg, #3730a3 0%, #4338ca 50%, #7c3aed 100%);
    box-shadow: 0 4px 12px rgba(67, 56, 202, 0.2);
}

.th-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sort-icon {
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.modern-data-table th:hover .sort-icon {
    opacity: 0.7;
}

.modern-data-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    vertical-align: middle;
    font-size: 0.875rem;
    color: #1a202c;
    font-weight: 500;
}

.modern-data-table tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.6);
}

.modern-data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.01);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.modern-data-table tbody tr.selected {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
}

/* Column specific styling */
.checkbox-col {
    width: 4%;
}

.no-col {
    width: 5%;
}

.project-col {
    width: 10%;
}

.item-scope-col {
    width: 20%;
}

.priority-col {
    width: 8%;
}

.status-col {
    width: 10%;
}

.dates-col {
    width: 15%;
}

.owner-col {
    width: 16%;
}

.remark-col {
    width: 12%;
}

.actions-col {
    width: 10%;
    min-width: 120px;
}

.color-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .slider {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(20px);
}

.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    font-size: 0.875rem;
    color: #6b7280;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #6b7280;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-number {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
}

.page-number.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.show-entries {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.entries-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.875rem;
    background: white;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Priority badges */
.priority-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.priority-critical {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
}

.priority-high {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
}

.priority-medium {
    background: linear-gradient(135deg, #ecc94b 0%, #d69e2e 100%);
    color: #1a202c;
}

.priority-low {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    color: white;
}

/* Status badges */
.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.status-not-started {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    color: #4a5568;
}

.status-planning {
    background: linear-gradient(135deg, #bee3f8 0%, #90cdf4 100%);
    color: #2c5282;
}

.status-development {
    background: linear-gradient(135deg, #fef5e7 0%, #fed7aa 100%);
    color: #c05621;
}

.status-testing {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    color: #22543d;
}

.status-completed {
    background: linear-gradient(135deg, #e6fffa 0%, #b2f5ea 100%);
    color: #234e52;
}

/* Deployment status */
.deployment-status {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.deployment-item {
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

.deployment-pending {
    background-color: #f8f9fa;
    color: #6c757d;
}

.deployment-progress {
    background-color: #fff3cd;
    color: #856404;
}

.deployment-completed {
    background-color: #d4edda;
    color: #155724;
}

.deployment-failed {
    background-color: #f8d7da;
    color: #721c24;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: nowrap;
}

.btn-sm {
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
    min-width: auto;
    flex-shrink: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    margin: 1% auto;
    padding: 0;
    border-radius: 16px;
    width: 95%;
    max-width: 600px;
    max-height: 98vh;
    overflow-y: auto;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-large {
    max-width: none !important;
    width: 98vw !important;
    max-height: 98vh !important;
    margin: 1vh auto !important;
}

.modal-header {
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 50%, #8b5cf6 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 24px 24px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    box-shadow: 0 4px 16px rgba(67, 56, 202, 0.2);
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
}

.close:hover {
    opacity: 1;
}

/* Forms */
form {
    padding: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 2rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group.half-width {
    grid-column: span 2;
}

/* Large modal specific improvements */
.modal-large .form-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 2.5rem;
}

.modal-large .form-group.full-width {
    grid-column: 1 / -1;
}

.modal-large .form-group.half-width {
    grid-column: span 2;
}

.modal-large .form-group.quarter-width {
    grid-column: span 1;
}

.modal-large .form-group.sixth-width {
    grid-column: span 1;
}

.modal-large .form-group.third-width {
    grid-column: span 2;
}

/* Form section styling */
.form-section-title {
    grid-column: 1 / -1;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4338ca;
    margin: 0.5rem 0 0.3rem 0;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.form-section-title i {
    color: #6366f1;
    font-size: 0.85rem;
}

/* Compact form elements */
.modal-large .form-group {
    margin-bottom: 0.5rem;
}

.modal-large .form-group label {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.modal-large .form-group input,
.modal-large .form-group select,
.modal-large .form-group textarea {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    height: auto;
}

.modal-large .form-group textarea {
    min-height: 50px;
    resize: vertical;
}

form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.form-grid {
    flex: 1;
    min-height: 0;
}

/* Standard modal form layout fixes */
.modal-content form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.modal-content .form-group {
    flex-shrink: 0;
}

.form-actions {
    border-top: 1px solid #eee;
    padding: 0.8rem 1.5rem;
    margin: 0;
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
    background: #f8f9fa;
    border-radius: 0 0 16px 16px;
    flex-shrink: 0;
}

.modal-large .form-actions {
    padding: 0.8rem 1.5rem;
}

.modal-large .form-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Enhanced dropdown styling */
.form-group select option {
    padding: 0.5rem;
    color: #1a202c;
}

.form-group select option:disabled {
    color: #9ca3af;
    font-style: italic;
}

.login-info {
    background-color: #e9ecef;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Enhanced Google OAuth Styles */
.google-only-login {
    text-align: center;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    margin: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.login-description {
    margin-bottom: 2.5rem;
    padding: 0 1rem;
}

.login-description p {
    color: #475569;
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-weight: 500;
    line-height: 1.6;
}

.login-description i {
    color: #10b981;
    font-size: 1.2rem;
    padding: 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
}

.btn-google {
    background: linear-gradient(135deg, #db4437 0%, #c23321 100%);
    color: white;
    border: none;
    padding: 1.25rem 2.5rem;
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: all 0.3s ease;
    font-weight: 600;
    margin: 0 auto 2.5rem auto;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(219, 68, 55, 0.3);
    position: relative;
    overflow: hidden;
    max-width: 300px;
}

.btn-google::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-google:hover::before {
    left: 100%;
}

.btn-google.btn-large {
    padding: 1.5rem 3rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.btn-google:hover {
    background: linear-gradient(135deg, #c23321 0%, #a02b1f 100%);
    text-decoration: none;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(219, 68, 55, 0.5);
}

.btn-google i {
    font-size: 1.3rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.login-benefits {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.login-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.login-benefits li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.login-benefits li:hover {
    color: #334155;
    transform: translateX(4px);
}

.login-benefits i {
    color: #10b981;
    font-size: 1rem;
    padding: 0.4rem;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 50%;
    min-width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Enhanced Modal Styles */
.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.9);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 2rem 2.5rem;
    border-bottom: none;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header .close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-header .close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive Design for Sign-in */
@media (max-width: 768px) {
    .google-only-login {
        padding: 2rem 1.5rem;
        margin: 0.5rem;
    }
    
    .login-description p {
        font-size: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-google {
        padding: 1rem 2rem;
        font-size: 1rem;
        max-width: none;
        width: 100%;
    }
    
    .btn-google.btn-large {
        padding: 1.25rem 2.5rem;
        font-size: 1.1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header {
        padding: 1.5rem 2rem;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-header .close {
        top: 1rem;
        right: 1.5rem;
        width: 2rem;
        height: 2rem;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .google-only-login {
        padding: 1.5rem 1rem;
        margin: 0.25rem;
    }
    
    .login-benefits {
        padding: 1rem;
    }
    
    .login-benefits li {
        font-size: 0.9rem;
        padding: 0.5rem 0;
    }
    
    /* Modal improvements for mobile */
    .modal-content {
        margin: 0.5vh auto;
        width: 98%;
        max-height: 99vh;
        border-radius: 12px;
    }
    
    .modal-large {
        max-width: none !important;
        width: 98vw !important;
        max-height: 99vh !important;
        margin: 0.5vh auto !important;
        border-radius: 12px !important;
        overflow-y: auto !important;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
        border-radius: 16px 16px 0 0;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    /* Form responsive adjustments */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .modal-large .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .form-group.full-width,
    .form-group.half-width,
    .form-group.quarter-width {
        grid-column: 1;
    }
    
    /* Standard modals on mobile */
    .modal-content {
        margin: 2% auto;
        width: 96%;
        max-height: 96vh;
        border-radius: 12px;
    }
    
    .modal-content form {
        padding: 0.5rem;
    }
    
    .modal-content .form-group {
        margin-bottom: 1rem;
    }
}

/* Desktop breakpoint for maximum screen usage */
@media (min-width: 769px) {
    /* Standard modal improvements on desktop */
    .modal-content:not(.modal-large) {
        max-width: 600px;
        max-height: 90vh;
        margin: 5vh auto;
    }
    
    .modal-content:not(.modal-large) form {
        padding: 1.5rem;
    }
    
    .modal-content:not(.modal-large) .form-group {
        margin-bottom: 1.5rem;
    }
    
    .modal-large {
        max-width: none !important;
        width: 98vw !important;
        max-height: 96vh !important;
        margin: 2vh auto !important;
        overflow-y: auto !important;
        display: flex;
        flex-direction: column;
    }
    
    .modal-large .modal-header {
        padding: 1rem 2rem;
        flex-shrink: 0;
    }
    
    .modal-large form {
        flex: 1;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }
    
    .modal-large .form-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 1rem;
        padding: 1.5rem;
        flex: 1;
        overflow-y: auto;
        min-height: 0;
    }
    
    .modal-large .form-actions {
        flex-shrink: 0;
    }
}

/* Tablet breakpoint */
@media (max-width: 768px) and (min-width: 481px) {
    .modal-large {
        max-width: none !important;
        width: 96vw !important;
        max-height: 98vh !important;
        margin: 1vh auto !important;
        overflow-y: auto !important;
    }
    
    .form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .modal-large .form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        padding: 2rem;
    }
    
    .form-group.quarter-width {
        grid-column: span 1;
    }
    
    .form-group.half-width {
        grid-column: span 2;
    }
    
    .form-group.full-width {
        grid-column: 1 / -1;
    }
}

/* Additional Animation Effects */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.google-only-login {
    animation: slideInUp 0.5s ease-out;
}

.login-benefits li {
    animation: slideInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.login-benefits li:nth-child(1) { animation-delay: 0.1s; }
.login-benefits li:nth-child(2) { animation-delay: 0.2s; }
.login-benefits li:nth-child(3) { animation-delay: 0.3s; }

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 1.1rem;
}

.loading i {
    margin-right: 0.5rem;
}

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

@keyframes slideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-filters {
        flex-direction: column;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

/* Alert messages */
.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: -400px;
    width: 400px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(20px);
    box-shadow: 8px 0 32px rgba(99, 102, 241, 0.1);
    border-right: 1px solid rgba(99, 102, 241, 0.2);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 50%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(67, 56, 202, 0.2);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.sidebar-content {
    padding: 1.5rem;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(99, 102, 241, 0.1);
}

.sidebar-section-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4338ca;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-add-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.sidebar-add-btn:hover {
    background: linear-gradient(135deg, #4338ca 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.sidebar-subsection {
    margin: 1rem 0;
    padding-left: 1rem;
}

.sidebar-subsection h5 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6366f1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-list {
    max-height: 200px;
    overflow-y: auto;
}

.sidebar-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 250, 252, 0.8) 100%);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sidebar-list-item:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateX(4px);
}

.sidebar-list-item .item-info {
    flex: 1;
}

.sidebar-list-item .item-name {
    font-weight: 500;
    color: #1a202c;
    margin-bottom: 0.2rem;
}

.sidebar-list-item .item-meta {
    font-size: 0.8rem;
    color: #6b7280;
}

.sidebar-list-item .item-actions {
    display: flex;
    gap: 0.5rem;
}

.sidebar-item-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.sidebar-item-btn:hover {
    color: #4338ca;
    background: rgba(99, 102, 241, 0.1);
}

.sidebar-item-btn.delete:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}



/* Main content adjustment when sidebar is open */
.main-content.sidebar-open {
    margin-left: 400px;
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: 320px;
        left: -320px;
    }
    
    .main-content.sidebar-open {
        margin-left: 0;
        transform: translateX(320px);
    }
    
    .nav-container {
        padding: 0 1rem;
    }
}

/* Empty state for sidebar lists */
.sidebar-list-empty {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
    border: 1px dashed rgba(99, 102, 241, 0.2);
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .sidebar-overlay.active {
        display: block;
    }
}