/* WhatsApp-Integrated CEO Dashboard Styles */

:root {
    --orange: #fc6d0b;
    --dark-blue: #0c1420;
    --blue: #146aff;
    --purple: #623def;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --dark-gray: #333333;
    --border-color: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Left Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, var(--dark-blue) 0%, #0a1120 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 1.5rem 1.5rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand h1 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    color: var(--white);
    transition: transform 0.3s;
}

.sidebar-brand:hover h1 {
    transform: scale(1.05);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0.25rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.sidebar-link:hover {
    background: linear-gradient(90deg, rgba(20, 106, 255, 0.2) 0%, rgba(98, 61, 239, 0.1) 100%);
    color: var(--white);
    border-left-color: var(--blue);
    transform: translateX(5px) translateZ(0);
    box-shadow: -2px 0 8px rgba(20, 106, 255, 0.3);
}

.sidebar-link:active {
    transform: translateX(3px);
}

.sidebar-icon {
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
    transition: transform 0.3s;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.sidebar-link:hover .sidebar-icon {
    transform: scale(1.2) translateZ(0);
}

.sidebar-text {
    font-size: 0.95rem;
    font-weight: 500;
}

.sidebar-footer {
    padding: 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-link-logout {
    color: rgba(255,255,255,0.7);
}

.sidebar-link-logout:hover {
    background: linear-gradient(90deg, rgba(252, 109, 11, 0.2) 0%, rgba(255, 0, 0, 0.1) 100%);
    border-left-color: var(--orange);
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(20, 106, 255, 0.3) 0%, rgba(98, 61, 239, 0.2) 100%);
    color: var(--white);
    border-left-color: var(--blue);
    font-weight: 600;
}

/* Main Content */
.main-content {
    padding: 2rem;
    min-height: 100vh;
}

.main-content-with-sidebar {
    margin-left: 260px;
    transition: margin-left 0.3s;
}

/* Dashboard Stats */
.dashboard-container h2 {
    color: var(--dark-blue);
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s;
}

.stat-card {
    cursor: pointer;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.stat-card:hover {
    transform: translateY(-5px) translateZ(0);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, var(--white) 0%, #fafafa 100%);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    color: var(--blue);
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--dark-gray);
    font-size: 0.9rem;
}

/* Tasks Page */
.tasks-container {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.tasks-header h2 {
    color: var(--dark-blue);
}

.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Date Range Navigation Buttons */
.date-range-nav-btn {
    background: var(--blue);
    color: var(--white);
    border: none;
    border-radius: 4px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.date-range-nav-btn:hover {
    background: #0d5dd8;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.date-range-nav-btn:active {
    transform: scale(0.95);
}

.filter-input,
.filter-select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.filter-input {
    flex: 1;
    min-width: 200px;
}

.filter-select {
    min-width: 150px;
}

/* Tasks Table */
.tasks-table-container {
    overflow-x: auto;
}

.tasks-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 14px;
}

.tasks-table th {
    background-color: var(--dark-blue);
    color: var(--white);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.tasks-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.tasks-table tr {
    transition: all 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.task-row {
    cursor: pointer;
}

.task-row:hover {
    background: linear-gradient(90deg, var(--light-gray) 0%, rgba(20, 106, 255, 0.1) 100%);
    transform: translateZ(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.task-row.completed {
    background-color: #e8f5e9;
}

.task-row.completed:hover {
    background: linear-gradient(90deg, #e8f5e9 0%, #c8e6c9 100%);
    transform: translateZ(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.task-row:active {
    background: linear-gradient(90deg, rgba(20, 106, 255, 0.15) 0%, rgba(98, 61, 239, 0.1) 100%);
}

.task-row.completed:active {
    background: linear-gradient(90deg, #c8e6c9 0%, #a5d6a7 100%);
}

.task-row.high-priority {
    background-color: #ffe0b7;
    color: var(--dark-gray);
}

.task-row.high-priority:hover {
    background: linear-gradient(90deg, #ffe0b7 0%, #ffd699 100%);
    transform: translateZ(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.task-row.high-priority:active {
    background: linear-gradient(90deg, #ffd699 0%, #ffcc80 100%);
}

.tasks-table td:last-child {
    cursor: default;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    display: inline-block;
}

.status-new { background-color: var(--blue); color: var(--white); }
.status-in-progress { background-color: var(--orange); color: var(--white); }
.status-done { background-color: var(--purple); color: var(--white); }
.status-delayed { background-color: #ff0000; color: var(--white); }

.priority-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    display: inline-block;
}

.priority-high { background-color: #ff0000; color: var(--white); }
.priority-medium { background-color: var(--orange); color: var(--white); }
.priority-low { background-color: var(--blue); color: var(--white); }

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: var(--light-gray);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--blue);
    transition: width 0.3s;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--blue);
    color: var(--white);
    position: relative;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
    transform: translateY(-2px) translateZ(0);
    box-shadow: 0 6px 20px rgba(20, 106, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--light-gray);
    color: var(--dark-gray);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--border-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-warning {
    background-color: #fc6d0b;
    color: var(--white);
    transition: all 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.btn-warning:hover {
    background-color: #e55d00;
    transform: translateY(-2px) translateZ(0);
    box-shadow: 0 6px 20px rgba(252, 109, 11, 0.4);
}

.btn-warning:active {
    transform: translateY(0);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-overlay {
    display: flex;
    position: fixed;
    z-index: 10002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 10px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 10003;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 8px 8px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: var(--dark-blue);
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-body {
    padding: 2rem;
}

.close {
    color: var(--dark-gray);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    background: none;
    border: none;
}

.close {
    transition: all 0.3s ease;
}

.close:hover {
    color: var(--orange);
    transform: rotate(90deg) scale(1.2);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(20, 106, 255, 0.1);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(20, 106, 255, 0.2);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Questions */
.questions-list {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.question-item {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.question-item:last-child {
    border-bottom: none;
}

/* Settings */
.settings-container {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.settings-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3 {
    color: var(--dark-blue);
    margin-bottom: 1.5rem;
}

/* Messages Page */
.messages-container {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 600px;
}

.messages-header {
    margin-bottom: 2rem;
}

.messages-header h2 {
    color: var(--dark-blue);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--dark-gray);
    font-size: 0.9rem;
    font-style: italic;
}

.messages-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    min-height: 500px;
}

.messages-list-panel {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    max-height: 600px;
}

.messages-list-header {
    padding: 1rem;
    background: var(--dark-blue);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.messages-list-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--light-gray);
}

.message-item {
    background: var(--white);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--blue);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.message-item:hover {
    transform: translateX(5px) translateZ(0);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-left-width: 6px;
}

.message-item.incoming {
    border-left-color: var(--blue);
}

.message-item.outgoing {
    border-left-color: var(--purple);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.message-from {
    font-weight: 600;
    color: var(--dark-blue);
}

.message-time {
    color: var(--dark-gray);
    font-size: 0.8rem;
}

.message-body {
    color: var(--dark-gray);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.message-task-link {
    font-size: 0.85rem;
    color: var(--purple);
    margin-top: 0.5rem;
    font-weight: 500;
}

.btn-link {
    background: none;
    border: none;
    color: var(--blue);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    text-decoration: underline;
}

.btn-link:hover {
    color: var(--purple);
}

.no-messages {
    text-align: center;
    color: var(--dark-gray);
    padding: 2rem;
    font-style: italic;
}

.message-input-panel {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    background: var(--white);
}

.message-input-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.message-input-header h3 {
    color: var(--dark-blue);
    margin-bottom: 0.25rem;
}

.info-text {
    font-size: 0.85rem;
    color: var(--dark-gray);
    font-style: italic;
}

.message-form {
    margin-bottom: 2rem;
}

.quick-actions {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.quick-actions h4 {
    color: var(--dark-blue);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.quick-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-quick {
    padding: 0.5rem 1rem;
    background: var(--light-gray);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.btn-quick:hover {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(20, 106, 255, 0.3);
}

/* Additional Hover Effects */
.filter-input:hover,
.filter-select:hover {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(20, 106, 255, 0.1);
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(20, 106, 255, 0.2);
}

.status-badge,
.priority-badge,
.role-badge {
    transition: all 0.3s ease;
    cursor: default;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.status-badge:hover,
.priority-badge:hover,
.role-badge:hover {
    transform: translateZ(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    filter: brightness(1.1);
}

.btn-small {
    transition: all 0.3s ease;
}

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

.btn-danger {
    background-color: #dc3545;
    color: var(--white);
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Cards and Containers */
.tasks-container,
.messages-container,
.employees-container,
.questions-list,
.settings-container {
    transition: all 0.3s ease;
}

.tasks-container:hover,
.messages-container:hover,
.employees-container:hover,
.questions-list:hover,
.settings-container:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content-with-sidebar {
        margin-left: 200px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .tasks-table {
        font-size: 0.85rem;
    }
    
    .messages-layout {
        grid-template-columns: 1fr;
    }
    
    .messages-list-panel {
        max-height: 400px;
    }
}

@media (max-width: 600px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }
    
    .main-content-with-sidebar {
        margin-left: 0;
    }
}

/* Task Detail Modal (Full Screen Popup) */
.task-detail-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow: hidden;
}

.task-detail-content {
    background: var(--white);
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    margin: 5vh auto;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}

.task-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border-color);
    background: var(--light-gray);
    position: relative;
}

.task-detail-header-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-header-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.task-header-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 150px;
    flex: 1;
}

.task-header-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-header-field h2 {
    margin: 0;
    color: var(--dark-blue);
    font-size: 1.5rem;
    font-weight: 600;
}

.task-header-field .form-control,
.task-header-field .status-dropdown {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    background: var(--white);
    color: var(--dark-blue);
    transition: all 0.2s ease;
}

.task-header-field .form-control:focus,
.task-header-field .status-dropdown:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(20, 106, 255, 0.1);
}

.task-header-field .status-dropdown {
    font-weight: 600;
    cursor: pointer;
}

.task-header-field .status-dropdown:hover {
    border-color: var(--blue);
}

/* Employee Select Dropdown with Checkboxes */
.employee-select-dropdown {
    position: relative;
    width: 100%;
}

.employee-select-button {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--white);
    color: var(--dark-blue);
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    text-align: left;
}

.employee-select-button:hover {
    border-color: var(--blue);
}

.employee-select-button:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(20, 106, 255, 0.1);
}

.dropdown-arrow {
    font-size: 0.8rem;
    color: #666;
    transition: transform 0.2s ease;
}

.employee-select-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.employee-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
}

.employee-dropdown-content {
    padding: 0.5rem 0;
}

.employee-dropdown-option {
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.employee-dropdown-option:hover {
    background: var(--light-gray);
}

.employee-dropdown-option input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.employee-dropdown-option label {
    cursor: pointer;
    flex: 1;
    margin: 0;
    font-size: 0.9rem;
    color: var(--dark-blue);
}

.status-dropdown {
    padding: 0.5rem 1rem;
    border: 2px solid var(--blue);
    border-radius: 6px;
    background: var(--white);
    color: var(--dark-blue);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.status-dropdown:hover {
    background: var(--blue);
    color: var(--white);
}

.task-detail-header .close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2rem;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    z-index: 10;
}

.task-detail-header .close:hover {
    color: var(--orange);
    transform: scale(1.1);
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.btn-icon:hover {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
    transform: translateY(-2px) translateZ(0);
    box-shadow: 0 4px 8px rgba(20, 106, 255, 0.3);
}

.task-detail-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.task-detail-main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
}

.task-detail-sidebar {
    width: 350px;
    padding: 2rem;
    background: var(--light-gray);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    margin: 0;
    color: var(--dark-blue);
    font-size: 1.1rem;
}

.task-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.task-section:last-child {
    border-bottom: none;
}

.task-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.task-section-header h3 {
    margin: 0;
    color: var(--dark-blue);
    font-size: 1rem;
    font-weight: 600;
}

/* Attachments Styles */
.attachments-container {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--light-gray);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.attachment-item:hover {
    background: #f0f0f0;
    border-color: var(--blue);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.attachment-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.attachment-info {
    flex: 1;
    min-width: 0;
}

.attachment-name {
    display: block;
    font-weight: 500;
    color: var(--dark-blue);
    text-decoration: none;
    margin-bottom: 0.25rem;
    word-break: break-word;
    transition: color 0.2s ease;
}

.attachment-name:hover {
    color: var(--blue);
    text-decoration: underline;
}

.attachment-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

.attachment-delete {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.6;
    flex-shrink: 0;
}

.attachment-delete:hover {
    opacity: 1;
    background: rgba(255, 0, 0, 0.1);
    transform: scale(1.1);
}

.attachment-image-link {
    cursor: pointer;
}

/* Image Popup Modal Styles */
.image-popup-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.image-popup-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.popup-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
    transition: transform 0.1s ease-out;
    cursor: zoom-in;
    user-select: none;
}

.image-popup-wrapper {
    position: relative;
    overflow: auto;
    max-width: 100%;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-popup-info {
    margin-top: 1rem;
    color: var(--white);
    font-size: 1rem;
    text-align: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.zoom-indicator {
    font-size: 0.9rem;
    opacity: 0.8;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    min-width: 50px;
    text-align: center;
}

.close-image-popup {
    position: absolute;
    top: 20px;
    right: 35px;
    color: var(--white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.close-image-popup:hover,
.close-image-popup:focus {
    color: var(--orange);
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
}

/* Attachment Popup Modal Styles */
.attachment-popup-modal {
    display: none;
    position: fixed;
    z-index: 10004;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.attachment-popup-content {
    background: var(--white);
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: zoomIn 0.3s ease;
}

.attachment-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 12px 12px 0 0;
}

.attachment-popup-header h3 {
    margin: 0;
    color: var(--dark-blue);
    font-size: 1.25rem;
    font-weight: 600;
    flex: 1;
    word-break: break-word;
}

.close-attachment-popup {
    color: var(--dark-gray);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    background: none;
    border: none;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.close-attachment-popup:hover {
    color: var(--orange);
    background: rgba(0, 0, 0, 0.05);
    transform: rotate(90deg) scale(1.1);
}

.attachment-popup-body {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.attachment-popup-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--light-gray);
    border-radius: 0 0 12px 12px;
}

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

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Close popup when clicking outside image */
.image-popup-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.labels-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.label-tag {
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.label-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.label-green { background: #4caf50; color: white; }
.label-orange { background: var(--orange); color: white; }
.label-blue { background: var(--blue); color: white; }
.label-purple { background: var(--purple); color: white; }

.description-content {
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 6px;
    min-height: 100px;
    white-space: pre-wrap;
    line-height: 1.6;
}

.description-content a {
    color: var(--blue);
    text-decoration: none;
}

.description-content a:hover {
    text-decoration: underline;
}

.checklist-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.checklist-progress .progress-bar {
    flex: 1;
    height: 24px;
}

.checklist-progress span {
    font-weight: 600;
    color: var(--dark-blue);
    min-width: 50px;
}

.checklist-container {
    margin-bottom: 1rem;
}

.checklist-item {
    background: var(--light-gray);
    border-radius: 6px;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.checklist-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.checklist-item-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checklist-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.checklist-item-text {
    flex: 1;
    color: var(--dark-blue);
    font-size: 0.95rem;
}

.checklist-item.checked .checklist-item-text {
    text-decoration: line-through;
    color: #999;
}

.checklist-item-actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.btn-icon-small {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #666;
    transition: all 0.2s ease;
    line-height: 1;
}

.btn-icon-small:hover {
    background: rgba(0,0,0,0.05);
    color: var(--dark-blue);
}

.checklist-sub-items-container {
    margin-top: 0.75rem;
    margin-left: 2rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

.checklist-sub-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--white);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.checklist-sub-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checklist-sub-item.checked .checklist-item-text {
    text-decoration: line-through;
    color: #999;
}

.add-sub-item {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.form-control-small {
    flex: 1;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.checklist-item-attachments {
    margin-top: 0.75rem;
    margin-left: 2rem;
    padding: 0.5rem;
    background: var(--white);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.checklist-attachment-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem;
    font-size: 0.85rem;
}

.checklist-attachment-item .attachment-icon {
    font-size: 1rem;
    width: 24px;
    height: 24px;
}

.checklist-attachment-item .attachment-name {
    flex: 1;
    font-size: 0.85rem;
    margin: 0;
}

.attachment-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.attachment-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--light-gray);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.attachment-option:hover {
    background: #f0f0f0;
    border: 1px solid var(--blue);
}

.add-checklist-item {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.add-checklist-item input {
    flex: 1;
}

.custom-fields-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.custom-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.custom-field label {
    font-weight: 500;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.comment-input-section {
    margin-bottom: 2rem;
}

.activity-log {
    flex: 1;
    overflow-y: auto;
}

.activity-item {
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--white);
    border-radius: 8px;
    border-left: 3px solid var(--blue);
    transition: all 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform: translateZ(0);
}

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

.activity-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.activity-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--blue);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.activity-content {
    flex: 1;
}

.activity-user {
    font-weight: 600;
    color: var(--dark-blue);
}

.activity-text {
    color: var(--dark-gray);
    line-height: 1.6;
    margin: 0.5rem 0;
}

.activity-text a {
    color: var(--blue);
    text-decoration: none;
}

.activity-text a:hover {
    text-decoration: underline;
}

.activity-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.activity-tag {
    padding: 0.25rem 0.5rem;
    background: var(--light-gray);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--dark-blue);
    cursor: pointer;
    transition: all 0.3s ease;
}

.activity-tag:hover {
    background: var(--blue);
    color: var(--white);
}

.activity-time {
    font-size: 0.8rem;
    color: var(--dark-gray);
    margin-top: 0.5rem;
}

.activity-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.activity-actions a {
    color: var(--blue);
    text-decoration: none;
    cursor: pointer;
}

.activity-actions a:hover {
    text-decoration: underline;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.form-control:hover {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(20, 106, 255, 0.1);
}

.form-control:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(20, 106, 255, 0.2);
    transform: translateY(-1px) translateZ(0);
}

/* Employee Dashboard */
.employee-dashboard {
    padding: 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.tasks-section {
    margin-bottom: 3rem;
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tasks-section h3 {
    color: var(--dark-blue);
    margin-bottom: 1.5rem;
}

.task-card {
    background: var(--light-gray);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--blue);
    transition: transform 0.3s;
}

.task-card {
    cursor: pointer;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.task-card:hover {
    transform: translateX(8px) translateZ(0);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    background: linear-gradient(90deg, var(--light-gray) 0%, rgba(20, 106, 255, 0.05) 100%);
    border-left-width: 6px;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.task-header h4 {
    color: var(--dark-blue);
    margin: 0;
    flex: 1;
}

.task-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--dark-gray);
}

.task-actions {
    display: flex;
    gap: 0.5rem;
}

.no-tasks {
    text-align: center;
    color: var(--dark-gray);
    padding: 2rem;
    font-style: italic;
}

/* Employees Page */
.employees-container {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.employees-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.employees-table-container {
    overflow-x: auto;
}

.employees-table {
    width: 100%;
    border-collapse: collapse;
}

.employees-table th {
    background-color: var(--dark-blue);
    color: var(--white);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.employees-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.employees-table tr {
    transition: all 0.3s ease;
    cursor: pointer;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.employees-table tr:hover {
    background: linear-gradient(90deg, var(--light-gray) 0%, rgba(20, 106, 255, 0.05) 100%);
    transform: translateZ(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    display: inline-block;
}

.role-employee { background-color: var(--blue); color: var(--white); }
.role-manager { background-color: var(--orange); color: var(--white); }
.role-ceo { background-color: var(--purple); color: var(--white); }
}


