/**
 * Stylesheet untuk Project Management Bamboo Village Trust
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --sidebar-bg: #e0f7fa; /* light teal */
    --sidebar-active: #00bcd4; /* bright cyan/teal for active */
    --sidebar-text: #134e6f; /* dark blue for contrast */
    --sidebar-hover: #b2ebf2; /* lighter teal for hover */
    --main-bg: #f1f5f9;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --primary-color: #3b82f6;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --teal-color: #14b8a6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--main-bg);
    color: var(--text-primary);
    line-height: 1.6;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: 280px;
    background: linear-gradient(135deg, #e0f7fa 80%, #b2ebf2 100%);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: width 0.3s ease;
    left: 0;
    top: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #b2ebf2;
    text-align: center;
}

.sidebar-header .logo {
    max-width: 120px;
    height: auto;
    margin-bottom: 10px;
}

.logo-placeholder {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    background: var(--teal-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar-toggle-btn {
    position: absolute;
    top: 20px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--teal-color);
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s;
    display: block;
    z-index: 10;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.sidebar-toggle-btn:hover {
    color: var(--sidebar-text);
    transform: scale(1.2);
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    border-radius: 8px;
    margin: 2px 8px;
}

.nav-item i {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
}

.nav-item:hover {
    background-color: var(--sidebar-hover);
    border-left-color: var(--sidebar-active);
    color: var(--primary-color);
}

/* Sidebar Collapsed State */
.sidebar.collapsed {
    width: 70px;
}

.sidebar.collapsed .sidebar-header {
    padding: 20px 10px;
    position: relative;
}

.sidebar.collapsed .logo {
    max-width: 50px;
    margin: 0 auto 10px;
}

.sidebar.collapsed .sidebar-title {
    display: none;
}

.sidebar.collapsed .sidebar-toggle-btn {
    right: 8px;
    transform: rotate(180deg);
}

.sidebar.collapsed .nav-item {
    padding: 12px;
    justify-content: center;
    position: relative;
}

.sidebar.collapsed .nav-item span {
    display: none;
}

.sidebar.collapsed .nav-item i {
    margin-right: 0;
    font-size: 20px;
    width: auto;
}

/* Tooltip for collapsed sidebar items */
.sidebar.collapsed .nav-item {
    position: relative;
}

.sidebar.collapsed .nav-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 75px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sidebar.collapsed .nav-item:hover::after {
    opacity: 1;
}

.nav-item.active {
    background: linear-gradient(90deg, var(--sidebar-active) 80%, #b2ebf2 100%);
    border-left-color: var(--sidebar-active);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 8px 0 rgba(0,188,212,0.08);
}

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--main-bg);
    transition: margin-left 0.3s ease;
}

/* Main content when sidebar is collapsed */
.sidebar.collapsed ~ .main-content {
    margin-left: 70px;
}

.main-header {
    background: var(--card-bg);
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-menu {
    position: relative;
}

.user-avatar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
}

.user-avatar span {
    color: white;
    position: relative;
    z-index: 1;
    font-weight: 600;
}

.user-name {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.user-dropdown .user-info {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.user-dropdown .user-info strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.user-dropdown .user-info small {
    color: var(--text-secondary);
    font-size: 12px;
}

.user-dropdown a {
    display: block;
    padding: 12px 15px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.3s;
    border-bottom: 1px solid var(--border-color);
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a:hover {
    background: #f8fafc;
}

.user-dropdown a i {
    width: 20px;
    margin-right: 10px;
    color: var(--text-secondary);
}

/* ========== VIEW PRINT BUTTON ========== */
#viewPrintBtn {
    margin-right: 0;
}

/* ========== RESOURCE DASHBOARD ========== */
.resource-dashboard {
    padding: 20px;
}

.resource-section {
    margin-bottom: 40px;
}

.resource-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.resource-header {
    padding: 20px 30px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    text-align: center;
}

.resource-content {
    padding: 30px;
}

.chart-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 15px;
}

.chart-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: inline-block;
}

.task-stat-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.task-stat-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.task-stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #1e293b;
}

.btn-time {
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    background: white;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-time:hover {
    background: #f1f5f9;
}

.btn-time.active {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

.btn-granularity {
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    background: white;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-granularity:hover {
    background: #f1f5f9;
}

.btn-granularity.active {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

/* Heatmap Table */
.heatmap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-top: 20px;
}

.heatmap-table th {
    background: #f8fafc;
    padding: 8px 4px;
    text-align: center;
    font-weight: 600;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.heatmap-table td {
    padding: 4px;
    text-align: center;
    border: 1px solid #e2e8f0;
    min-width: 40px;
}

.heatmap-cell {
    background: white;
    height: 30px;
}

.heatmap-cell:not(:empty) {
    font-weight: bold;
}

.day-label {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
}

.day-total {
    background: #f1f5f9;
    font-weight: 600;
    color: #1e293b;
}

.summary-row {
    background: #f8fafc;
    font-weight: 600;
}

.summary-row td {
    padding: 10px 4px;
    border-top: 2px solid #cbd5e1;
}

/* ========== EXPORT MENU ========== */
.export-menu-wrapper {
    position: relative;
}

.export-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
}

.export-dropdown a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.export-dropdown a:last-child {
    border-bottom: none;
}

.export-dropdown a:hover {
    background: #f8fafc;
}

.export-dropdown a i {
    width: 20px;
    margin-right: 10px;
    color: var(--text-secondary);
}

/* ========== NOTIFICATIONS ========== */
.notification-menu-wrapper {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 350px;
    max-width: 400px;
    max-height: 500px;
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notification-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    flex-wrap: wrap;
    gap: 10px;
}

.notification-header h4 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
    flex: 1;
    min-width: 120px;
}

.notification-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    text-decoration: underline;
}

.notification-list {
    overflow-y: auto;
    max-height: 400px;
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item.unread {
    background: #eff6ff;
    border-left: 3px solid var(--primary-color);
}

.notification-item.unread:hover {
    background: #dbeafe;
}

.notification-item-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.notification-item-message {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-item-time {
    font-size: 11px;
    color: var(--text-secondary);
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.notification-loading {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
}

/* ========== TASK COMMENTS ========== */
.comments-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.comment-item {
    padding: 12px;
    margin-bottom: 10px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.comment-time {
    font-size: 11px;
    color: var(--text-secondary);
}

.comment-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
}

.comment-form {
    display: flex;
    gap: 10px;
}

.comment-input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
}

.comment-submit {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    align-self: flex-start;
}

/* ========== USER MANAGEMENT ========== */
.role-select, .status-select, .employee-type-select {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

.role-select[style*="background: #fef3c7"] {
    background: #fef3c7 !important;
}

.role-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.role-admin {
    background: #fef3c7;
    color: #92400e;
}

.role-badge.role-project_manager {
    background: #dbeafe;
    color: #1e40af;
}

.role-badge.role-executive {
    background: #e0e7ff;
    color: #3730a3;
}

.role-badge.role-team_member {
    background: #f3f4f6;
    color: #374151;
}

/* ========== DASHBOARD NOTES ========== */
.dashboard-notes {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    background: #f8fafc;
    color: var(--text-primary);
    transition: border-color 0.2s, background 0.2s;
}

.dashboard-notes:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dashboard-notes::placeholder {
    color: #94a3b8;
    font-style: italic;
}

/* Print styles for notes */
@media print {
    .dashboard-notes {
        border: 1px solid #000;
        background: white;
        padding: 10px;
        height: auto;
    }
}

.status-badge.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.kpi-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.kpi-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.kpi-label {
    font-size: 14px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* ========== FOOTER ========== */
.main-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 20px 30px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    margin: 5px 0;
    line-height: 1.6;
}

.footer-content p:first-child {
    font-weight: 500;
    color: var(--text-primary);
}

/* ========== BUTTONS ========== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.editable-cell {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    min-width: 100px;
    transition: background-color 0.2s;
}

.editable-cell:hover {
    background-color: #f0f9ff;
    border: 1px dashed #14b8a6;
}

.inline-edit-input {
    width: 100%;
    padding: 4px 8px;
    border: 2px solid #14b8a6;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.editable-select {
    cursor: pointer;
    min-width: 120px;
}

.editable-cell {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    min-width: 100px;
    transition: background-color 0.2s, border 0.2s;
}

.editable-cell:hover {
    background-color: #f0f9ff;
    border: 1px dashed #14b8a6;
}

.inline-edit-input {
    width: 100%;
    padding: 4px 8px;
    border: 2px solid #14b8a6;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.editable-select {
    cursor: pointer;
    min-width: 120px;
    transition: background-color 0.2s;
}

.editable-select:hover {
    background-color: #f0f9ff;
}

.btn-icon {
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.btn-icon:hover {
    color: var(--primary-color);
}

.btn-danger {
    color: var(--danger-color);
}

.btn-danger:hover {
    color: #dc2626;
}

/* ========== DASHBOARD ========== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.kpi-content {
    flex: 1;
}

.kpi-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.kpi-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.chart-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.chart-container {
    height: 250px;
    position: relative;
}

/* ========== TABLES ========== */
.table-container,
.task-table-container {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    position: relative;
}

/* Table Header with Minimize/Maximize Button */
.table-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
}

.table-header-wrapper h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.table-toggle-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    transition: all 0.3s;
    border-radius: 4px;
}

.table-toggle-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.table-body-wrapper {
    overflow-x: auto;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
    padding: 0;
    display: block;
}

.table-body-wrapper.minimized {
    max-height: 0 !important;
    overflow: hidden;
    opacity: 0;
    padding: 0;
}

.table-body-wrapper.maximized {
    max-height: 5000px;
    opacity: 1;
    padding: 0;
}

.data-table,
.task-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead,
.task-table thead {
    background: #f8fafc;
}

.data-table th,
.task-table th {
    padding: 15px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.data-table td,
.task-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.data-table tbody tr:hover,
.task-table tbody tr:hover {
    background: #f8fafc;
}

.text-center {
    text-align: center;
}

/* ========== BADGES ========== */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-open {
    background: #e2e8f0;
    color: #475569;
}

.status-in-progress {
    background: #dbeafe;
    color: #1e40af;
}

.status-in_progress {
    background: #dbeafe;
    color: #1e40af;
}

.status-complete {
    background: #dcfce7;
    color: #166534;
}

.status-completed {
    background: #dcfce7;
    color: #166534;
}

.status-on-hold {
    background: #fed7aa;
    color: #9a3412;
}

.status-on_hold {
    background: #fed7aa;
    color: #9a3412;
}

.status-canceled {
    background: #fee2e2;
    color: #991b1b;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.priority-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.priority-low {
    background: #dbeafe;
    color: #1e40af;
}

.priority-medium {
    background: #fef3c7;
    color: #92400e;
}

.priority-high {
    background: #fee2e2;
    color: #991b1b;
}

.priority-critical {
    background: #7c2d12;
    color: #ffffff;
}

.complexity-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.complexity-low {
    background: #dcfce7;
    color: #166534;
}

.complexity-level1 {
    background: #dcfce7;
    color: #166534;
}

.complexity-medium {
    background: #fef3c7;
    color: #92400e;
}

.complexity-level2 {
    background: #fef3c7;
    color: #92400e;
}

.complexity-high {
    background: #fee2e2;
    color: #991b1b;
}

.complexity-level3 {
    background: #fee2e2;
    color: #991b1b;
}

/* Project Management Table Styling */
.project-management-table thead th {
    background: linear-gradient(135deg, #22c55e 0%, #14b8a6 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px 15px;
}

.project-management-table thead th:first-child {
    background: #475569;
}

.project-management-table thead th:last-child {
    background: #475569;
}

.project-management-table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
}

/* ========== RACI ========== */
.raci-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.raci-section h4 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 16px;
}

.raci-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.raci-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.raci-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.raci-r {
    background: #dbeafe;
    color: #1e40af;
}

.raci-a {
    background: #dcfce7;
    color: #166534;
}

.raci-c {
    background: #fef3c7;
    color: #92400e;
}

.raci-i {
    background: #e9d5ff;
    color: #6b21a8;
}

/* ========== PROGRESS BAR ========== */
.progress-bar {
    position: relative;
    width: 100%;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success-color);
    transition: width 0.3s;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ========== FORMS ========== */
.form-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.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(59, 130, 246, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 50px auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: var(--text-primary);
}

/* ========== UTILITY ========== */
.loading {
    text-align: center;
    padding: 50px;
    color: var(--text-secondary);
}

.loading i {
    font-size: 32px;
    margin-bottom: 10px;
}

.empty-state,
.error-state {
    text-align: center;
    padding: 50px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.empty-state h3,
.error-state h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.empty-state p,
.error-state p {
    color: var(--text-secondary);
}

.error-state {
    color: var(--danger-color);
}

.error-state i {
    font-size: 48px;
    margin-bottom: 15px;
}

/* ========== PAGE SPECIFIC ========== */
.task-management,
.project-management {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.task-header,
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.task-header h3,
.page-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ========== DASHBOARD SECTIONS ========== */
.dashboard-section {
    margin-bottom: 30px;
}

/* ========== PROJECT DASHBOARD ========== */
.project-header {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.project-selector {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.project-dropdown {
    flex: 1;
    max-width: 600px;
    padding: 10px 15px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    background: rgba(255,255,255,0.2);
    color: white;
    cursor: pointer;
}

.project-dropdown option {
    color: #1e293b;
    background: white;
}

.project-info {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.section-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.timeline-nav {
    display: flex;
    gap: 10px;
}

.timeline-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.timeline-btn:hover {
    background: #f8fafc;
}

.timeline-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.timeline-selector {
    display: flex;
    gap: 5px;
}

.timeline-select-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.timeline-select-btn:hover {
    background: #f8fafc;
}

.timeline-select-btn.active {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.timeline-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ========== HAMBURGER MENU ========== */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    color: var(--sidebar-text);
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    margin-right: 10px;
    z-index: 1001;
}

.hamburger-menu:hover {
    opacity: 0.7;
}

.sidebar.mobile-hidden {
    display: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-left: 250px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .hamburger-menu {
        display: none;
    }
}

@media (max-width: 768px) {
    /* MOBILE: Show hamburger */
    .hamburger-menu {
        display: block;
        background: none;
        border: none;
        color: var(--sidebar-text);
        font-size: 24px;
        cursor: pointer;
        padding: 10px;
        margin-right: 10px;
        z-index: 1001;
    }
    
    .hamburger-menu:hover {
        opacity: 0.7;
    }
    
    /* Hide sidebar by default on mobile, show with hamburger */
    .sidebar {
        width: 100%;
        max-width: 280px;
        height: 100vh;
        position: fixed;
        left: -280px;
        top: 0;
        transition: left 0.3s ease;
        z-index: 999;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.mobile-visible {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .main-header {
        padding: 15px 15px;
        gap: 10px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .header-actions {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .btn {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .btn i {
        font-size: 14px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .charts-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .raci-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .card {
        padding: 15px;
    }
    
    .sidebar-nav {
        padding: 8px 0;
    }
    
    .nav-item {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .nav-item i {
        width: 18px;
        margin-right: 10px;
        font-size: 14px;
    }
    
    .nav-item span {
        display: inline;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .user-name {
        max-width: 70px;
        font-size: 10px;
    }
    
    .export-dropdown,
    .user-dropdown,
    .notification-dropdown {
        position: fixed;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }
    
    .content-area {
        padding: 15px;
    }
    
    table {
        font-size: 12px;
    }
    
    /* Table responsive on mobile */
    .table-container,
    .task-table-container {
        overflow-x: auto;
        scroll-behavior: smooth;
    }
    
    .data-table,
    .task-table {
        min-width: 800px;
    }
    
    .data-table th,
    .data-table td,
    .task-table th,
    .task-table td {
        padding: 10px 8px;
        font-size: 11px;
    }
    
    .table-header-wrapper {
        padding: 12px 15px;
    }
    
    .table-header-wrapper h4 {
        font-size: 14px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="number"],
    textarea,
    select {
        padding: 10px;
        font-size: 14px;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    /* Hide button text on mobile, show only icons */
    .btn:not(.btn-primary):not(.btn-success):not(.btn-danger) span {
        display: none;
    }
    
    .notification-dropdown {
        right: 0;
        left: 0;
        max-width: 100%;
        top: 50px;
    }
    
    .main-footer {
        padding: 18px 20px;
        font-size: 12px;
    }
    
    .footer-content p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 16px;
    }
    
    .main-header {
        padding: 12px 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .sidebar {
        width: 100%;
        left: -100%;
    }
    
    .sidebar.mobile-visible {
        left: 0;
    }
    
    .btn {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .dashboard-grid,
    .charts-row,
    .raci-grid {
        gap: 10px;
    }
    
    .card {
        padding: 12px;
        border-radius: 8px;
    }
    
    .card-header {
        padding: 10px;
        font-size: 14px;
    }
    
    table {
        font-size: 11px;
    }
    
    th, td {
        padding: 8px 4px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="number"],
    textarea,
    select {
        padding: 8px;
        font-size: 13px;
    }
    
    label {
        font-size: 13px;
    }
    
    .modal {
        padding: 15px;
    }
    
    .modal-content {
        width: 95vw;
        max-width: 95vw;
    }
    
    .main-footer {
        padding: 15px 12px;
        font-size: 12px;
    }
    
    .footer-content p {
        font-size: 11px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ========== GANTT CHART ========== */
.gantt-chart-container {
    padding: 20px;
}

.gantt-header {
    margin-bottom: 20px;
}

.gantt-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Gantt Filters Styling */
.gantt-filters {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    background-color: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-group select:hover {
    border-color: #3b82f6;
}

.filter-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.filter-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-actions .btn-primary {
    background: #3b82f6;
    color: white;
}

.filter-actions .btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.filter-actions .btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.filter-actions .btn-secondary:hover {
    background: var(--border-color);
}

/* Gantt Table Styling */

.gantt-table-wrapper {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    position: relative;
}

.gantt-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.gantt-table thead {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 10;
}

.gantt-table th {
    padding: 12px 15px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    background: #f8fafc;
}

.gantt-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    white-space: nowrap;
}

.gantt-table tbody tr:hover {
    background: #f8fafc;
}

/* Fixed columns (Work Breakdown Structure, Milestone Task, Plan Start, Progress) */
.gantt-col-fixed {
    position: sticky;
    background: var(--card-bg);
    z-index: 5;
    min-width: 150px;
    max-width: 200px;
}

/* First fixed column (Work Breakdown Structure) */
.gantt-table th:first-child,
.gantt-table td:first-child {
    left: 0;
    position: sticky;
    background: #f8fafc;
    z-index: 10;
}

.gantt-table tbody td:first-child {
    background: var(--card-bg);
    z-index: 5;
}

.gantt-table tbody tr:hover td:first-child {
    background: #f8fafc;
}

/* Second fixed column (Milestone Task) */
.gantt-table th:nth-child(2),
.gantt-table td:nth-child(2) {
    left: 150px;
    position: sticky;
    background: #f8fafc;
    z-index: 10;
}

.gantt-table tbody td:nth-child(2) {
    background: var(--card-bg);
    z-index: 5;
}

.gantt-table tbody tr:hover td:nth-child(2) {
    background: #f8fafc;
}

/* Third fixed column (Plan Start) */
.gantt-table th:nth-child(3),
.gantt-table td:nth-child(3) {
    left: 300px;
    position: sticky;
    background: #f8fafc;
    z-index: 10;
}

.gantt-table tbody td:nth-child(3) {
    background: var(--card-bg);
    z-index: 5;
}

.gantt-table tbody tr:hover td:nth-child(3) {
    background: #f8fafc;
}

/* Fourth fixed column (Progress) */
.gantt-table th:nth-child(4),
.gantt-table td:nth-child(4) {
    left: 450px;
    position: sticky;
    background: #f8fafc;
    z-index: 10;
}

.gantt-table tbody td:nth-child(4) {
    background: var(--card-bg);
    z-index: 5;
}

.gantt-table tbody tr:hover td:nth-child(4) {
    background: #f8fafc;
}

/* Date columns */
.gantt-col-date {
    min-width: 80px;
    text-align: center;
    position: relative;
}

/* Gantt marker (colored square for marked dates) */
.gantt-marker {
    width: 12px;
    height: 12px;
    background: #14b8a6;
    border-radius: 2px;
    margin: 0 auto;
    display: inline-block;
}

.gantt-marker-plan {
    background: #3b82f6;
}

.gantt-marker-actual {
    background: #10b981;
}

.gantt-marker-both {
    background: linear-gradient(135deg, #3b82f6 50%, #10b981 50%);
}

/* Timeline Minimize/Maximize Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        max-height: 1000px;
    }
    to {
        opacity: 0;
        max-height: 0;
    }
}

