/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0D57A4;
    --secondary-color: #6C757D;
    --success-color: #28A745;
    --danger-color: #DC3545;
    --warning-color: #FFC107;
    --dark-color: #212529;
    --light-color: #F8F9FA;
    --border-color: #DEE2E6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0D57A4 0%, #084580 100%);
    min-height: 100vh;
    color: var(--dark-color);
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-box {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-hover);
    animation: slideIn 0.5s ease;
}

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

.login-logo {
    text-align: center;
    margin-bottom: 10px;
}

.login-logo img {
    max-width: 150px;
    height: auto;
}

.login-box h1 {
    font-size: 2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
}

.login-box h2 {
    font-size: 1.2rem;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 30px;
    font-weight: normal;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--secondary-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tab-btn:hover:not(.active) {
    background: var(--light-color);
}

/* Navbar */
.navbar {
    background: white;
    padding: 15px 30px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 5px;
}

.nav-links a {
    padding: 10px 20px;
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--primary-color);
    color: white;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 5px;
    transition: var(--transition);
}

.notification-icon:hover {
    transform: scale(1.1);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.notification-panel {
    position: fixed;
    right: -350px;
    top: 70px;
    width: 350px;
    background: white;
    box-shadow: var(--shadow-hover);
    border-radius: 12px;
    padding: 20px;
    transition: right 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 999;
}

.notification-panel.active {
    right: 20px;
}

.notification-panel h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
}

.notification-item {
    padding: 15px;
    background: var(--light-color);
    border-radius: 8px;
    margin-bottom: 10px;
    animation: fadeIn 0.3s ease;
}

.notification-item p {
    margin-bottom: 8px;
}

.no-notifications {
    text-align: center;
    color: var(--secondary-color);
    padding: 20px;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    background: white;
    min-height: calc(100vh - 70px);
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    color: var(--dark-color);
    font-size: 2rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    color: var(--dark-color);
    font-size: 2rem;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    padding: 10px;
    background: var(--light-color);
    border-radius: 12px;
}

.filter-tab {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid transparent;
    background: white;
    color: var(--secondary-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.filter-tab:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
}

.filter-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
}

.filter-tab.active .filter-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #667eea 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-card h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
}

/* Sections */
.section {
    margin-bottom: 40px;
}

.section h2 {
    margin-bottom: 20px;
    color: var(--dark-color);
    font-size: 1.5rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table thead {
    background: var(--primary-color);
    color: white;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--light-color);
}

.data-table tbody tr.completed-row {
    opacity: 0.6;
    background-color: rgba(40, 167, 69, 0.05);
}

.data-table tbody tr.completed-row td strong {
    text-decoration: line-through;
    color: var(--secondary-color);
}

.data-table tbody tr.completed-row .badge {
    opacity: 0.7;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--secondary-color);
    font-style: italic;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: capitalize;
}

.badge-high {
    background: #FFE5E5;
    color: var(--danger-color);
}

.badge-low {
    background: #E3F2FD;
    color: var(--primary-color);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #3a7bc8;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 5px 10px;
    font-size: 0.9rem;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Checkbox */
.task-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.task-checkbox:hover {
    border-color: #084580;
    box-shadow: 0 0 0 3px rgba(13, 87, 164, 0.1);
}

.task-checkbox:checked {
    background: var(--success-color);
    border-color: var(--success-color);
}

.task-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-hover);
    animation: modalSlide 0.3s ease;
}

.modal-large {
    max-width: 800px;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h2 {
    color: var(--dark-color);
    font-size: 1.5rem;
}

.close {
    font-size: 2rem;
    color: var(--secondary-color);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.close:hover {
    color: var(--danger-color);
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

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

    .notification-panel.active {
        right: 10px;
        left: 10px;
        width: auto;
    }

    .data-table {
        font-size: 0.9rem;
    }

    .data-table th,
    .data-table td {
        padding: 10px;
    }

    .filter-tabs {
        flex-direction: column;
        gap: 8px;
    }

    .filter-tab {
        width: 100%;
    }
}

/* Admin Overview Cards */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.overview-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: var(--transition);
}

.overview-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.overview-card h3 {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.overview-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 10px 0;
}

.overview-card small {
    color: var(--secondary-color);
    font-size: 0.85rem;
}

/* Checklist Styles */
.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 0;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--light-color);
    border-radius: 8px;
    transition: var(--transition);
}

.checklist-item:hover {
    background: #e9ecef;
}

.checklist-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.checklist-item label {
    flex: 1;
    cursor: pointer;
    font-size: 1rem;
    margin: 0;
    transition: var(--transition);
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.btn:active {
    animation: pulse 0.3s ease;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid var(--primary-color);
    position: relative;
}

.toast.critical {
    border-left-color: var(--danger-color);
    background: #fff5f5;
}

.toast.high {
    border-left-color: var(--warning-color);
    background: #fffbf0;
}

.toast.medium {
    border-left-color: var(--primary-color);
    background: #f0f7ff;
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast.critical .toast-icon {
    color: var(--danger-color);
}

.toast.high .toast-icon {
    color: var(--warning-color);
}

.toast.medium .toast-icon {
    color: var(--primary-color);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--dark-color);
}

.toast-message {
    font-size: 13px;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.toast-meta {
    font-size: 11px;
    color: var(--secondary-color);
    opacity: 0.7;
}

.toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.hiding {
    animation: slideOutRight 0.3s ease forwards;
}

/* AI Chat Widget */
.chat-widget-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(13, 87, 164, 0.95), rgba(8, 69, 128, 0.95));
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(13, 87, 164, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    z-index: 9998;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-widget-button:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 40px rgba(13, 87, 164, 0.5);
    background: linear-gradient(135deg, rgba(13, 87, 164, 1), rgba(8, 69, 128, 1));
}

.chat-widget-button.minimized {
    display: flex;
}

.chat-widget-button.expanded {
    display: none;
}

.chat-widget-container {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 420px;
    height: 620px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    display: none;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-widget-container.open {
    display: flex;
}

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

.chat-widget-header {
    background: linear-gradient(135deg, rgba(13, 87, 164, 0.9), rgba(8, 69, 128, 0.9));
    backdrop-filter: blur(10px);
    color: white;
    padding: 20px 24px;
    border-radius: 24px 24px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.chat-widget-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 17px;
    letter-spacing: 0.3px;
}

.chat-widget-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 10px;
    line-height: 1;
    border-radius: 8px;
    opacity: 0.9;
    transition: all 0.2s ease;
}

.chat-widget-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.chat-widget-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: transparent;
}

.chat-message {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    animation: messageSlideIn 0.3s ease;
}

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

.chat-message.user {
    align-items: flex-end;
}

.chat-message.agent {
    align-items: flex-start;
}

.chat-message-content {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: 16px;
    line-height: 1.6;
    font-size: 14px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.chat-message.user .chat-message-content {
    background: linear-gradient(135deg, rgba(13, 87, 164, 0.95), rgba(8, 69, 128, 0.95));
    color: white;
    border-bottom-right-radius: 6px;
    box-shadow: 0 4px 16px rgba(13, 87, 164, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chat-message.agent .chat-message-content {
    background: rgba(255, 255, 255, 0.7);
    color: var(--dark-color);
    border-bottom-left-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.chat-message-time {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.5);
    margin-top: 6px;
    opacity: 0.8;
    font-weight: 500;
}

.chat-widget-input-container {
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0 0 24px 24px;
    display: flex;
    gap: 12px;
}

.chat-widget-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(13, 87, 164, 0.2);
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.chat-widget-input:focus {
    border-color: rgba(13, 87, 164, 0.5);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(13, 87, 164, 0.1);
}

.chat-widget-send {
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(13, 87, 164, 0.95), rgba(8, 69, 128, 0.95));
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(13, 87, 164, 0.3);
}

.chat-widget-send:hover {
    background: linear-gradient(135deg, rgba(13, 87, 164, 1), rgba(8, 69, 128, 1));
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(13, 87, 164, 0.4);
}

.chat-widget-send:disabled {
    background: rgba(108, 117, 125, 0.5);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.chat-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.chat-loading-dots {
    display: flex;
    gap: 4px;
}

.chat-loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: bounce 1.4s infinite ease-in-out both;
}

.chat-loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.chat-loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Project Detail Page */
.breadcrumb {
    margin-bottom: 24px;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s;
}

.breadcrumb a:hover {
    opacity: 0.7;
}

.project-detail-header {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-header-content h1 {
    margin: 0 0 16px 0;
    font-size: 32px;
    color: var(--dark-color);
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    font-size: 14px;
}

.project-status {
    padding: 6px 12px;
    background: rgba(13, 87, 164, 0.1);
    color: var(--primary-color);
    border-radius: 6px;
    font-weight: 500;
}

.project-client,
.project-due {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--secondary-color);
}

.project-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.project-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.project-card h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: var(--dark-color);
}

.project-card p {
    margin: 0;
    color: var(--secondary-color);
    line-height: 1.6;
}

/* Project Updates Section */
.project-updates-section {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 32px;
}

.update-form-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 2px dashed #dee2e6;
}

.update-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 12px;
}

.update-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 87, 164, 0.1);
}

.updates-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.update-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.update-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.update-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #1a5490);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.update-content {
    flex: 1;
}

.update-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.update-header strong {
    color: var(--dark-color);
    font-size: 15px;
}

.update-time {
    color: var(--secondary-color);
    font-size: 13px;
}

.update-text {
    color: var(--dark-color);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.project-tasks-section {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--light-color);
}

.section-header h2 {
    margin: 0;
    font-size: 24px;
    color: var(--dark-color);
}

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.task-card {
    background: var(--light-color);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.task-card:hover {
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

.task-card.completed {
    opacity: 0.7;
    border-left-color: var(--success-color);
}

.task-card.completed h3 {
    text-decoration: line-through;
    color: var(--secondary-color);
}

.task-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.task-checkbox {
    position: relative;
    flex-shrink: 0;
}

.task-checkbox input[type="checkbox"] {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.task-checkbox input[type="checkbox"]:checked {
    background: var(--success-color);
    border-color: var(--success-color);
}

.task-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.task-card-header h3 {
    margin: 0;
    flex: 1;
    font-size: 16px;
    color: var(--dark-color);
    line-height: 1.4;
}

.task-description {
    color: var(--secondary-color);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.task-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
}

.task-assignee,
.task-due {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--secondary-color);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(13, 87, 164, 0.1);
    color: var(--primary-color);
}

.empty-state-card {
    text-align: center;
    padding: 64px 32px;
    background: var(--light-color);
    border-radius: 12px;
    border: 2px dashed var(--border-color);
}

.empty-state-card svg {
    margin-bottom: 16px;
}

.empty-state-card h3 {
    margin: 0 0 8px 0;
    color: var(--dark-color);
    font-size: 20px;
}

.empty-state-card p {
    color: var(--secondary-color);
    margin-bottom: 24px;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.2s;
}

.project-link:hover {
    opacity: 0.7;
}

.project-link strong {
    font-weight: 600;
}

.btn-checklist {
    background: rgba(13, 87, 164, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(13, 87, 164, 0.2);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 12px;
    display: inline-block;
    font-weight: 500;
}

.btn-checklist:hover {
    background: rgba(13, 87, 164, 0.2);
    border-color: rgba(13, 87, 164, 0.3);
}

.checklist-items {
    padding: 20px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--light-color);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: var(--transition);
}

.checklist-item:hover {
    background: #e9ecef;
}

.checklist-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checklist-checkbox:checked {
    background: var(--success-color);
    border-color: var(--success-color);
}

.checklist-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checklist-item label {
    flex: 1;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.2s;
    user-select: none;
}
