/* ==================== VARIABLES ==================== */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #e0e7ff;
    --blue: #3b82f6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --purple: #8b5cf6;

    --bg: #f1f5f9;
    --surface: #ffffff;
    --sidebar-bg: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-active: #e2e8f0;
    --text: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);

    --radius: 8px;
    --radius-lg: 12px;
    --sidebar-width: 260px;
    --topbar-height: 64px;

    --transition: 0.2s ease;
}

/* ==================== RESET ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font-family: inherit; }
input, select, textarea {
    font-family: inherit;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: var(--radius);
    width: 100%;
    outline: none;
    transition: border var(--transition);
    background: var(--surface);
    color: var(--text);
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ==================== LOGIN PAGE ==================== */
.login-page {
    display: flex;
    min-height: 100vh;
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: white;
}

/* ===== A CHARACTER ===== */
.a-character-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0 28px;
    cursor: default;
    user-select: none;
}

.a-character-wrapper svg {
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.25));
    transition: filter .3s;
}

.a-character-wrapper:hover svg {
    filter: drop-shadow(0 12px 32px rgba(0,0,0,0.35));
}

.a-char-label {
    margin-top: 6px;
    font-size: 0.95rem;
    opacity: 0.92;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.login-brand {
    text-align: center;
    margin-bottom: 48px;
}

.brand-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    backdrop-filter: blur(10px);
}

.login-brand h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-brand p {
    font-size: 1.1rem;
    opacity: 0.85;
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1rem;
    opacity: 0.9;
    padding: 12px 20px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
}

.feature-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--surface);
}

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

.login-form-container h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.login-form label i {
    width: 16px;
    color: var(--primary);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 0.85rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    cursor: pointer;
}

.forgot-link {
    color: var(--primary);
    font-weight: 500;
}

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

.login-footer {
    text-align: center;
    margin-top: 40px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition);
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 1rem;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

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

.btn-danger:hover {
    opacity: 0.9;
}

/* ==================== LAYOUT ==================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand i {
    font-size: 1.5rem;
    color: var(--primary);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--sidebar-text);
    transition: all var(--transition);
}

.nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

.nav-item.active {
    background: var(--primary);
    color: white;
    font-weight: 500;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    margin-bottom: 8px;
}

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

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
}

.user-role {
    font-size: 0.75rem;
    color: var(--sidebar-text);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    color: var(--danger) !important;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==================== TOPBAR ==================== */
.topbar {
    height: var(--topbar-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
    max-width: 100%;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-left h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.sidebar-toggle {
    display: none;
    background: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    padding: 8px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.search-box input {
    padding-left: 36px;
    width: 240px;
    background: var(--bg);
    border: 1px solid transparent;
}

.search-box input:focus {
    background: var(--surface);
    border-color: var(--primary);
}

.notification-btn {
    position: relative;
    background: none;
    font-size: 1.1rem;
    color: var(--text-secondary);
    padding: 8px;
}

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

/* ==================== CONTENT ==================== */
.content {
    padding: 28px;
    flex: 1;
    overflow-x: hidden;
    max-width: 100%;
}

/* ==================== STAT CARDS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 26px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-blue .stat-icon { background: #dbeafe; color: var(--blue); }
.stat-green .stat-icon { background: #d1fae5; color: var(--success); }
.stat-orange .stat-icon { background: #fef3c7; color: var(--warning); }
.stat-purple .stat-icon { background: #ede9fe; color: var(--purple); }

.stat-info h3 {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}

/* ==================== CARDS ==================== */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
}

.card-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h3 i {
    color: var(--primary);
}

.card-body {
    padding: 28px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.3;
}

.empty-state p {
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.empty-state-large {
    text-align: center;
    padding: 80px 16px;
    color: var(--text-secondary);
}

.empty-state-large i {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.2;
}

.empty-state-large h3 {
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state-large p {
    margin-bottom: 24px;
}

/* ==================== ACTIVITY ==================== */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: white;
    flex-shrink: 0;
}

.bg-blue { background: var(--blue); }
.bg-green { background: var(--success); }
.bg-orange { background: var(--warning); }

.activity-content p {
    font-size: 0.88rem;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ==================== FILTER BAR ==================== */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    background: var(--surface);
    padding: 8px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.filter-tabs {
    display: flex;
    gap: 4px;
}

.filter-tab {
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    background: none;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.filter-tab:hover {
    background: var(--bg);
}

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

.view-toggle {
    display: flex;
    gap: 4px;
}

.view-btn {
    padding: 8px 12px;
    border-radius: 6px;
    background: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.view-btn.active {
    background: var(--bg);
    color: var(--text);
}

/* ==================== ADVANCED FILTER BAR ==================== */
.advanced-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-filter {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-filter i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.search-filter input {
    width: 100%;
    padding: 9px 12px 9px 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.2s;
}

.search-filter input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.filter-select {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    min-width: 140px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-result-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    padding: 9px 0;
}

@media (max-width: 768px) {
    .advanced-filter-bar {
        flex-direction: column;
    }
    .search-filter {
        width: 100%;
    }
    .filter-select {
        width: 100%;
    }
}

/* ==================== PROJECTS GRID ==================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    border-left: 4px solid var(--primary);
}

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

.project-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

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

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active { background: #d1fae5; color: #065f46; }
.status-completed { background: #dbeafe; color: #1e40af; }
.status-archived { background: #f3f4f6; color: #6b7280; }

/* ==================== KANBAN BOARD ==================== */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    min-height: calc(100vh - 180px);
}

.kanban-column {
    background: var(--bg);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.kanban-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.kanban-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kanban-todo { background: #fef3c7; color: #92400e; }
.kanban-progress { background: #dbeafe; color: #1e40af; }
.kanban-done { background: #d1fae5; color: #065f46; }

.kanban-count {
    background: rgba(0,0,0,0.1);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.kanban-cards {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100px;
}

.kanban-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    cursor: grab;
    transition: all var(--transition);
}

.kanban-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
}

.kanban-card h4 {
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.kanban-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.priority-high { border-left: 3px solid var(--danger); }
.priority-medium { border-left: 3px solid var(--warning); }
.priority-low { border-left: 3px solid var(--success); }

.kanban-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-secondary);
    opacity: 0.5;
}

.kanban-empty i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    display: block;
}

.drag-over {
    background: var(--primary-light);
    border: 2px dashed var(--primary);
    border-radius: var(--radius);
}

/* ==================== TEAM GRID ==================== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.team-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

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

.team-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 auto 14px;
}

.team-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.team-card .email {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--primary-light);
    color: var(--primary);
}

/* ==================== MODALS ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal, .modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 520px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s ease;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: var(--primary);
}

.modal-close {
    background: none;
    font-size: 1.1rem;
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
}

.modal-close:hover {
    background: var(--bg);
    color: var(--text);
}

.modal-body {
    padding: 24px;
}

.modal-body .form-group {
    margin-bottom: 18px;
}

.modal-body label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ==================== CHARTS ==================== */
.chart-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 20px;
}

.donut-chart {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: conic-gradient(
        var(--border) 0deg 360deg
    );
    position: relative;
}

.donut-chart::after {
    content: '';
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--surface);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* ==================== TOAST ==================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--surface);
    padding: 14px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    animation: toastIn 0.3s ease;
    min-width: 280px;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--blue); }

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

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .login-page {
        flex-direction: column;
    }

    .login-left {
        padding: 40px 20px;
    }

    .login-features {
        display: none;
    }

    .kanban-board {
        grid-template-columns: 1fr;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .search-box {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .content {
        padding: 16px;
    }

    .topbar {
        padding: 0 16px;
    }
}

/* ==================== BACK LINK ==================== */
.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.back-link:hover {
    background: var(--bg);
    color: var(--primary);
}

/* ==================== PROJECT CARD LINK ==================== */
.project-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card-link .project-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card-link:hover .project-card {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* ==================== PROGRESS BAR ==================== */
.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-label {
    font-size: 0.88rem;
    font-weight: 500;
}

.progress-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* ==================== DETAIL TABS ==================== */
.detail-tabs {
    display: flex;
    gap: 4px;
    background: var(--surface);
    padding: 6px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.detail-tab {
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    background: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition);
}

.detail-tab:hover {
    background: var(--bg);
    color: var(--text);
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.tab-toolbar h3 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-toolbar h3 i {
    color: var(--primary);
}

.toolbar-actions {
    display: flex;
    gap: 8px;
}

/* ==================== DATA TABLE ==================== */
.team-table-wrap {
    overflow-x: auto;
    margin-bottom: 24px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table thead th {
    background: var(--bg);
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody td {
    padding: 14px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table .empty-row td {
    padding: 0;
}

.data-table .empty-row:hover {
    background: none;
}

.member-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.member-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.btn-icon {
    background: none;
    padding: 6px 8px;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.btn-icon:hover {
    background: var(--bg);
    color: var(--danger);
}

/* ==================== ROLE TAGS ==================== */
.role-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.role-lead { background: #fef3c7; color: #92400e; }
.role-developer { background: #dbeafe; color: #1e40af; }
.role-tester { background: #fce7f3; color: #9d174d; }
.role-designer { background: #ede9fe; color: #5b21b6; }
.role-analyst { background: #d1fae5; color: #065f46; }

/* ==================== ROLE INFO CARD ==================== */
.role-info-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.role-info-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.role-info-card h4 i {
    color: var(--primary);
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.role-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius);
    background: var(--bg);
}

.role-item p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==================== ROLE PERMISSIONS PREVIEW ==================== */
.role-permissions-preview {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 4px;
}

.role-permissions-preview h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.role-permissions-preview ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.role-permissions-preview li {
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* ==================== ACCESS BADGE ==================== */
.access-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 500;
}

.access-full { background: #d1fae5; color: #065f46; }
.access-write { background: #dbeafe; color: #1e40af; }
.access-read { background: #f3f4f6; color: #6b7280; }

/* ==================== FILE MANAGER ==================== */
.file-manager {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.file-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 500;
}

.file-tree {
    padding: 16px;
}

.file-tree-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.folder-node {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
    user-select: none;
}

.folder-node:hover {
    background: var(--bg);
}

.node-toggle {
    width: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.7rem;
}

.folder-icon {
    color: var(--warning);
    font-size: 1.1rem;
}

.node-name {
    font-size: 0.88rem;
    font-weight: 500;
    flex: 1;
}

.node-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.folder-children {
    display: none;
    padding-left: 26px;
}

.folder-children.open {
    display: block;
}

.file-node {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
}

.file-node:hover {
    background: var(--bg);
}

.file-node i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* ==================== DARK MODE ==================== */
body.dark-mode {
    --bg: #0f172a;
    --surface: #1e293b;
    --sidebar-bg: #0f172a;
    --text: #e2e8f0;
    --text-secondary: #94a3b8;
    --border: #334155;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
}
body.dark-mode .card, body.dark-mode .modal { background: var(--surface); color: var(--text); }
body.dark-mode .topbar { background: var(--surface); border-color: var(--border); }
body.dark-mode input, body.dark-mode select, body.dark-mode textarea {
    background: #0f172a; color: var(--text); border-color: var(--border);
}
body.dark-mode .kanban-card { background: #0f172a; border-color: var(--border); }
body.dark-mode .stat-card { background: var(--surface); }
body.dark-mode .project-card { background: var(--surface); }
body.dark-mode .sidebar { background: var(--sidebar-bg); }
body.dark-mode .main-content { background: var(--bg); }
body.dark-mode .table th { background: #1e293b; color: var(--text-secondary); }
body.dark-mode .table td { border-color: var(--border); color: var(--text); }
body.dark-mode .badge { opacity: 0.9; }
body.dark-mode .tag { background: #1e293b; color: var(--text-secondary); }
body.dark-mode .search-dropdown { background: var(--surface); border-color: var(--border); }
body.dark-mode .search-result-item:hover { background: #0f172a; }
body.dark-mode .notification-dropdown { background: var(--surface); border-color: var(--border); }
body.dark-mode .notification-item { border-color: var(--border); }
body.dark-mode .notification-item.unread { background: #1e3a5f; }
body.dark-mode .modal-content { background: var(--surface); }
body.dark-mode .form-group label { color: var(--text-secondary); }
body.dark-mode .kanban-column { background: #1e293b; }
body.dark-mode .tab-btn { color: var(--text-secondary); }
body.dark-mode .tab-btn.active { color: #818cf8; border-color: #818cf8; }
body.dark-mode .detail-group label { color: var(--text-secondary); }
body.dark-mode .comment-item { background: #0f172a; }
body.dark-mode .gantt-task-bar { filter: brightness(0.85); }
body.dark-mode .template-card { background: var(--surface); border-color: var(--border); }
body.dark-mode .template-item { background: #0f172a; }

/* ==================== NAV DIVIDER ==================== */
.nav-divider { height: 1px; background: rgba(148,163,184,0.2); margin: 8px 16px; }

/* ==================== GLOBAL SEARCH ==================== */
.global-search {
    position: relative; display: flex; align-items: center;
    background: var(--bg); border-radius: 8px; padding: 0 12px; gap: 8px;
    flex-shrink: 1; min-width: 0;
}
.global-search i { color: var(--text-secondary); font-size: 0.85rem; }
.global-search input {
    border: none; background: transparent; padding: 8px 0; font-size: 0.85rem;
    outline: none; width: 200px; min-width: 80px; color: var(--text);
}
.search-dropdown {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); z-index: 100; max-height: 400px; overflow-y: auto; margin-top: 4px;
}
.search-dropdown.active { display: block; }
.search-group-title { padding: 8px 14px; font-size: 0.7rem; text-transform: uppercase; font-weight: 700; color: var(--text-secondary); background: var(--bg); }
.search-result-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    text-decoration: none; color: var(--text); transition: background .15s;
}
.search-result-item:hover { background: var(--bg); }
.search-result-item i { color: var(--text-secondary); width: 16px; text-align: center; }
.search-result-item div { display: flex; flex-direction: column; }
.search-result-item strong { font-size: 0.85rem; }
.search-result-item span { font-size: 0.75rem; color: var(--text-secondary); }
.search-empty { padding: 20px; text-align: center; color: var(--text-secondary); }

/* ==================== NOTIFICATION ==================== */
.notification-wrapper { position: relative; }
.notification-btn { position: relative; background: none; border: none; cursor: pointer; padding: 8px; color: var(--text-secondary); font-size: 1.1rem; }
.notification-btn:hover { color: var(--primary); }
.notification-badge {
    position: absolute; top: 2px; right: 2px; background: var(--danger); color: #fff;
    font-size: 0.65rem; min-width: 16px; height: 16px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.notification-dropdown {
    display: none; position: absolute; top: 100%; right: 0; width: 360px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); z-index: 100; margin-top: 8px;
}
.notification-dropdown.active { display: block; }
.notification-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.notification-header h4 { margin: 0; font-size: 0.9rem; }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 0.78rem; }
.notification-list { max-height: 320px; overflow-y: auto; }
.notification-item {
    display: flex; padding: 12px 16px; text-decoration: none; color: var(--text);
    border-bottom: 1px solid var(--border); transition: background .15s;
}
.notification-item:hover { background: var(--bg); }
.notification-item.unread { background: var(--primary-light); }
.notif-content strong { font-size: 0.85rem; display: block; }
.notif-content p { font-size: 0.8rem; color: var(--text-secondary); margin: 2px 0; }
.notif-time { font-size: 0.7rem; color: var(--text-secondary); }
.notification-empty { padding: 30px; text-align: center; color: var(--text-secondary); }

/* ==================== TOPBAR ICON BTN ==================== */
.topbar-icon-btn {
    background: none; border: none; cursor: pointer; padding: 8px;
    color: var(--text-secondary); font-size: 1.1rem; text-decoration: none;
    border-radius: var(--radius); transition: all .15s;
}
.topbar-icon-btn:hover { color: var(--primary); background: var(--bg); }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ==================== ALERT ==================== */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; display: flex; align-items: center; gap: 10px; font-size: 0.88rem; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fbbf24; }

/* ==================== DASHBOARD RECENT ==================== */
.recent-list { display: flex; flex-direction: column; }
.recent-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 0;
    border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); transition: background .1s;
}
.recent-item:last-child { border-bottom: none; }
.recent-item:hover { background: var(--bg); margin: 0 -16px; padding: 10px 16px; border-radius: var(--radius); }
.recent-item-info { flex: 1; display: flex; flex-direction: column; }
.recent-item-info strong { font-size: 0.88rem; }
.recent-item-info span { font-size: 0.75rem; color: var(--text-secondary); }
.recent-item-stat { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.mini-progress { flex: 0 0 80px; height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.mini-progress-fill { height: 100%; background: var(--success); border-radius: 3px; }
.priority-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.prio-high { background: var(--danger); }
.prio-medium { background: var(--warning); }
.prio-low { background: var(--success); }
.status-badge-sm {
    font-size: 0.7rem; padding: 2px 8px; border-radius: 10px; font-weight: 600; white-space: nowrap;
}
.status-to-do { background: #fef3c7; color: #92400e; }
.status-in-progress { background: #dbeafe; color: #1e40af; }
.status-done { background: #d1fae5; color: #065f46; }

/* ==================== KANBAN ENHANCEMENTS ==================== */
.kanban-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.kanban-card-project { font-size: 0.7rem; color: var(--text-secondary); }
.kanban-card h4 { font-size: 0.88rem; margin: 0 0 8px; font-weight: 600; }
.kanban-card-meta { display: flex; gap: 10px; font-size: 0.75rem; color: var(--text-secondary); flex-wrap: wrap; }
.kanban-card-meta i { margin-right: 3px; }
.kanban-card-footer { display: flex; gap: 12px; font-size: 0.72rem; color: var(--text-secondary); margin-top: 8px; }
.kanban-card-footer i { margin-right: 2px; }
.kanban-card.overdue { border-left: 3px solid var(--danger); }
.text-danger { color: var(--danger) !important; }
.dragging { opacity: 0.5; transform: rotate(2deg); }
.drag-over { background: var(--primary-light) !important; min-height: 60px; }

/* ==================== FILTER GROUP ==================== */
.filter-group { display: flex; gap: 8px; align-items: center; }

/* ==================== TASK DETAIL ==================== */
.modal-lg .modal { max-width: 800px; }
.task-detail-grid { display: grid; grid-template-columns: 1fr 240px; gap: 24px; }
.task-detail-main { min-width: 0; }
.task-detail-sidebar { display: flex; flex-direction: column; gap: 12px; }
.detail-field label { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; display: block; margin-bottom: 4px; }
.detail-field span { font-size: 0.88rem; }
.detail-field select { width: 100%; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.85rem; }

/* ==================== SUBTASK ==================== */
.subtask-section { margin-top: 20px; }
.subtask-section h4 { font-size: 0.92rem; margin-bottom: 10px; }
.subtask-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; }
.subtask-item input[type="checkbox"] { accent-color: var(--primary); }
.subtask-item input:checked + span { text-decoration: line-through; color: var(--text-secondary); }
.subtask-add { display: flex; gap: 8px; margin-top: 10px; }
.subtask-add input { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.85rem; }

/* ==================== COMMENTS ==================== */
.comment-section { margin-top: 24px; }
.comment-section h4 { font-size: 0.92rem; margin-bottom: 12px; }
.comment-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.comment-avatar {
    width: 32px; height: 32px; border-radius: 50%; background: var(--primary);
    color: white; display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700; flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.comment-head strong { font-size: 0.85rem; }
.comment-head span { font-size: 0.72rem; color: var(--text-secondary); }
.comment-body p { font-size: 0.85rem; color: var(--text); margin: 0; }
.comment-add { margin-top: 12px; }
.comment-add textarea { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); resize: vertical; font-size: 0.85rem; font-family: inherit; }
.comment-add button { margin-top: 8px; }
.text-muted { color: var(--text-secondary); font-size: 0.85rem; font-style: italic; }

/* ==================== TEAM CARDS ==================== */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.team-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.team-card-header { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.team-avatar {
    width: 48px; height: 48px; border-radius: 50%; color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 700; flex-shrink: 0;
}
.team-info h3 { font-size: 1rem; margin: 0; }
.team-role { font-size: 0.78rem; color: var(--primary); font-weight: 600; }
.team-title { font-size: 0.78rem; color: var(--text-secondary); display: block; }
.team-contact { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; font-size: 0.82rem; color: var(--text-secondary); }
.team-contact i { width: 16px; margin-right: 6px; color: var(--text-secondary); }
.team-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; border-top: 1px solid var(--border); padding-top: 14px; }
.team-stat { text-align: center; }
.ts-num { display: block; font-size: 1.1rem; font-weight: 700; color: var(--text); }
.ts-lbl { font-size: 0.68rem; color: var(--text-secondary); }

/* ==================== REPORT EXTRAS ==================== */
.css-donut {
    width: 180px; height: 180px; border-radius: 50%; position: relative; margin: 0 auto;
}
.donut-hole {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 100px; height: 100px; border-radius: 50%; background: var(--surface);
    display: flex; align-items: center; justify-content: center;
}
.donut-hole span { font-size: 1.4rem; font-weight: 700; color: var(--text); }
.progress-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.progress-row:last-child { border-bottom: none; }
.progress-row-label { flex: 0 0 180px; }
.progress-row-label strong { font-size: 0.88rem; display: block; margin-bottom: 3px; }
.progress-row-label span { font-size: 0.75rem; color: var(--text-secondary); }
.progress-row .progress-bar { flex: 1; }
.progress-pct { font-size: 0.85rem; font-weight: 700; color: var(--primary); min-width: 40px; text-align: right; }
.dropdown-wrapper { position: relative; }
.dropdown-menu { display: none; position: absolute; top: 100%; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 50; min-width: 180px; margin-top: 4px; }
.dropdown-menu.active { display: block; }
.dropdown-item { display: flex; align-items: center; gap: 8px; padding: 10px 14px; text-decoration: none; color: var(--text); font-size: 0.85rem; }
.dropdown-item:hover { background: var(--bg); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ==================== CALENDAR ==================== */
.calendar-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.calendar-controls h3 { margin: 0; min-width: 160px; text-align: center; }
.calendar-grid { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.calendar-header { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--sidebar-bg); }
.calendar-header div { padding: 10px; text-align: center; color: #fff; font-size: 0.8rem; font-weight: 600; }
.calendar-body { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-day {
    min-height: 100px; padding: 6px 8px; border: 1px solid var(--border); cursor: pointer;
    transition: background .15s; position: relative;
}
.calendar-day:hover { background: var(--bg); }
.calendar-day.other-month { background: var(--bg); opacity: 0.4; }
.calendar-day.today { background: var(--primary-light); }
.calendar-day.today .day-number { color: var(--primary); font-weight: 700; }
.day-number { font-size: 0.82rem; font-weight: 500; color: var(--text); }
.day-events { margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.calendar-event {
    font-size: 0.68rem; padding: 2px 6px; border-radius: 4px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.ev-normal { background: #dbeafe; color: #1e40af; }
.ev-high { background: #fee2e2; color: #991b1b; }
.ev-done { background: #d1fae5; color: #065f46; }
.ev-deadline { background: #fef3c7; color: #92400e; }
.calendar-more { font-size: 0.65rem; color: var(--primary); font-weight: 600; padding: 2px 0; }
.event-detail-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); }
.event-detail-item:hover { background: var(--bg); }
.event-icon { width: 32px; height: 32px; background: var(--primary-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); }
.event-info { flex: 1; }
.event-info strong { display: block; font-size: 0.88rem; }
.event-info span { font-size: 0.75rem; color: var(--text-secondary); }

/* ==================== GANTT ==================== */
.gantt-toolbar-wrap { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:16px 20px; margin-bottom:20px; display:flex; flex-direction:column; gap:12px; }
.gantt-toolbar-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.gantt-toolbar-row .form-select { flex:1; min-width:180px; max-width:400px; }
.gantt-toolbar-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.gantt-toolbar-wrap .btn-group { display:flex; gap:0; }
.gantt-toolbar-wrap .btn-group .btn { border-radius:0; border:1px solid var(--border); padding:7px 16px; font-size:.82rem; background:var(--surface); color:var(--text); cursor:pointer; transition:all .15s; }
.gantt-toolbar-wrap .btn-group .btn:first-child { border-radius:var(--radius) 0 0 var(--radius); }
.gantt-toolbar-wrap .btn-group .btn:last-child { border-radius:0 var(--radius) var(--radius) 0; }
.gantt-toolbar-wrap .btn-group .btn.active { background:var(--primary); color:#fff; border-color:var(--primary); }
.gantt-toolbar-wrap .btn-group .btn:hover:not(.active) { background:var(--bg); }
.gantt-legend { display:flex; gap:14px; font-size:.78rem; color:var(--text-secondary); align-items:center; flex-wrap:wrap; }
.gantt-legend span { display:flex; align-items:center; gap:4px; white-space:nowrap; }
.gantt-legend-dot { width:10px; height:10px; border-radius:50%; display:inline-block; flex-shrink:0; }

.gantt-container { overflow-x:auto; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); }
.gantt-chart { position:relative; }
.gantt-header { display:flex; border-bottom:2px solid var(--border); position:sticky; top:0; background:var(--surface); z-index:5; }
.gantt-label-col { width:300px; min-width:300px; padding:12px 20px; font-size:.85rem; font-weight:600; border-right:1px solid var(--border); display:flex; align-items:center; gap:10px; }
.gantt-timeline { position:relative; height:100%; }
.gantt-months { display:flex; height:32px; border-bottom:1px solid var(--border); position:relative; }
.gantt-month { position:absolute; top:0; height:32px; display:flex; align-items:center; padding-left:10px; font-size:.75rem; font-weight:700; color:var(--text-secondary); border-right:1px solid var(--border); }
.gantt-weeks { display:flex; height:24px; position:relative; }
.gantt-week { position:absolute; top:0; font-size:.68rem; color:var(--text-secondary); padding:4px 0 0 6px; }
.gantt-body {}
.gantt-project-row, .gantt-task-row { display:flex; border-bottom:1px solid var(--border); transition:background .15s; }
.gantt-task-row:hover { background:rgba(79,70,229,.04); }
.gantt-project-row { background:var(--bg); }
.gantt-project-label { font-weight:700; font-size:.86rem; color:var(--primary); }
.gantt-project-label i { margin-right:6px; }
.gantt-task-label { font-size:.83rem; padding-left:36px; color:var(--text); }
.gantt-task-label .gantt-assignee { font-size:.72rem; color:var(--text-secondary); display:block; margin-top:2px; }
.gantt-bar {
    position:absolute; height:22px; top:10px; border-radius:6px; min-width:22px;
    display:flex; align-items:center; overflow:hidden;
    box-shadow:0 1px 3px rgba(0,0,0,.15); cursor:pointer; transition:filter .15s;
}
.gantt-bar:hover { filter:brightness(1.1); }
.gantt-bar-progress { position:absolute; left:0; top:0; bottom:0; border-radius:6px; opacity:.3; background:rgba(0,0,0,.15); }
.gantt-bar-text { font-size:.68rem; color:white; padding:0 8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:600; position:relative; z-index:1; }
.gantt-today { position:absolute; top:0; bottom:0; width:2px; background:var(--danger); z-index:3; }
.gantt-today::before { content:'Bugün'; position:absolute; top:-20px; left:50%; transform:translateX(-50%); font-size:.62rem; font-weight:700; color:var(--danger); white-space:nowrap; background:var(--surface); padding:1px 6px; border-radius:3px; }
.gantt-deadline { position:absolute; top:0; bottom:0; width:2px; background:var(--warning); z-index:2; }
.gantt-deadline::before { content:'Termin'; position:absolute; top:-20px; left:50%; transform:translateX(-50%); font-size:.62rem; font-weight:700; color:var(--warning); white-space:nowrap; background:var(--surface); padding:1px 6px; border-radius:3px; }
.gantt-project-row .gantt-timeline, .gantt-task-row .gantt-timeline { height:42px; position:relative; }
.gantt-grid-line { position:absolute; top:0; bottom:0; width:1px; background:var(--border); opacity:.3; }
.gantt-weekend { position:absolute; top:0; bottom:0; background:rgba(0,0,0,.02); }
body.dark-mode .gantt-weekend { background:rgba(255,255,255,.02); }
body.dark-mode .gantt-task-row:hover { background:rgba(79,70,229,.08); }

/* ==================== PROFILE ==================== */
.profile-container { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.profile-card, .profile-stats-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.profile-header { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.profile-avatar {
    width: 72px; height: 72px; border-radius: 50%; color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 700;
}
.profile-name h2 { margin: 0; font-size: 1.3rem; }
.profile-name span { font-size: 0.88rem; color: var(--primary); font-weight: 600; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.profile-stat { text-align: center; padding: 12px; background: var(--bg); border-radius: var(--radius); }
.ps-num { display: block; font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.ps-lbl { font-size: 0.75rem; color: var(--text-secondary); }
.profile-stats-card h3 { margin: 0; font-size: 1rem; }

/* ==================== FILE GRID ==================== */
.file-grid { display: flex; flex-direction: column; gap: 4px; }
.file-card {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    border: 1px solid var(--border); border-radius: var(--radius); transition: background .15s;
}
.file-card:hover { background: var(--bg); }
.file-icon { width: 36px; height: 36px; background: var(--primary-light); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--primary); }
.file-info { flex: 1; }
.file-info strong { font-size: 0.85rem; display: block; }
.file-info span { font-size: 0.72rem; color: var(--text-secondary); }
.file-actions { display: flex; gap: 4px; }
.btn-icon { background: none; border: none; cursor: pointer; padding: 6px 8px; color: var(--text-secondary); border-radius: var(--radius); }
.btn-icon:hover { background: var(--bg); color: var(--primary); }

/* ==================== UPLOAD ZONE ==================== */
.upload-zone.drag-active { border-color: var(--primary); background: var(--primary-light); }
.upload-file-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 0.82rem; color: var(--text); }

/* ==================== INFO GRID ==================== */
.project-info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.info-item label { font-size: 0.72rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; display: block; margin-bottom: 2px; }
.info-item span { font-size: 0.88rem; }
.info-full { grid-column: 1 / -1; }

/* ==================== MODAL LG ==================== */
#taskDetailModal .modal { max-width: 800px; width: 90vw; }

/* ==================== RESPONSIVE FIXES ==================== */
@media (max-width: 768px) {
    .task-detail-grid { grid-template-columns: 1fr; }
    .task-detail-sidebar { flex-direction: row; flex-wrap: wrap; gap: 8px; }
    .calendar-day { min-height: 60px; }
    .calendar-event { display: none; }
    .gantt-label-col { width: 160px; min-width: 160px; }
    .profile-stats { grid-template-columns: repeat(2, 1fr); }
    .team-stats { grid-template-columns: repeat(2, 1fr); }
    .global-search input { width: 120px; }
    .notification-dropdown { width: 300px; right: -40px; }
}

.file-node .fa-file-image { color: var(--blue); }
.file-node .fa-file-pdf { color: var(--danger); }
.file-node .fa-file-word { color: #2b579a; }
.file-node .fa-file-excel { color: #217346; }
.file-node .fa-file-powerpoint { color: #d24726; }
.file-node .fa-file-archive { color: var(--warning); }
.file-node .fa-file-alt { color: var(--text-secondary); }

.file-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-info .file-name {
    font-size: 0.85rem;
}

.file-info .file-meta {
    font-size: 0.74rem;
    color: var(--text-secondary);
}

/* ==================== UPLOAD ZONE ==================== */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
    transition: all var(--transition);
    cursor: pointer;
}

.upload-zone:hover, .upload-zone.drag-active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-zone i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: var(--primary);
    opacity: 0.6;
}

.upload-zone p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.upload-zone span {
    font-size: 0.8rem;
    display: block;
    margin-bottom: 12px;
}

.upload-hint {
    font-size: 0.75rem !important;
    color: var(--text-secondary);
    margin-top: 12px !important;
}

.upload-btn-label {
    display: inline-flex !important;
    width: auto !important;
}

.upload-file-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upload-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: var(--radius);
    font-size: 0.85rem;
}

.upload-file-item i {
    font-size: 1.1rem;
    color: var(--primary);
}

.upload-file-item .file-name {
    flex: 1;
    font-weight: 500;
}

.upload-file-item .file-size {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ==================== MINI KANBAN ==================== */
.mini-kanban {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.mini-kanban-col {
    background: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.mini-kanban .kanban-cards {
    min-height: 200px;
}

/* ==================== MODAL SM ==================== */
.modal-sm {
    max-width: 380px;
}

/* ==================== RESPONSIVE DETAIL ==================== */
@media (max-width: 768px) {
    .detail-tabs {
        overflow-x: auto;
    }

    .mini-kanban {
        grid-template-columns: 1fr;
    }

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

    .toolbar-actions {
        flex-direction: column;
    }

    .tracking-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== PROJE BİLGİ KARTI ==================== */
.project-info-grid {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.project-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.project-info-item .info-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.project-info-item .info-value {
    font-weight: 600;
    color: var(--text);
}

@media (max-width: 768px) {
    .project-info-grid {
        flex-direction: column;
        gap: 10px;
    }
}

/* ==================== GÖREV TAKİP PANELİ ==================== */
.tracking-filter {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.84rem;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.tracking-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.tracking-summary-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.tracking-summary-card i {
    font-size: 1.6rem;
}

.tracking-summary-card div {
    display: flex;
    flex-direction: column;
}

.ts-value {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
}

.ts-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.ts-waiting i  { color: #f59e0b; }
.ts-waiting .ts-value { color: #b45309; }

.ts-active i   { color: #3b82f6; }
.ts-active .ts-value { color: #1d4ed8; }

.ts-completed i { color: #10b981; }
.ts-completed .ts-value { color: #047857; }

.ts-avg i      { color: #8b5cf6; }
.ts-avg .ts-value { color: #6d28d9; }

.tracking-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
}

.tracking-status-todo {
    background: #fef3c7;
    color: #92400e;
}

.tracking-status-progress {
    background: #dbeafe;
    color: #1e40af;
}

.tracking-status-done {
    background: #d1fae5;
    color: #065f46;
}

.tracking-row-active {
    background: #eff6ff !important;
}

.tracking-duration {
    font-weight: 600;
    font-size: 0.84rem;
    white-space: nowrap;
}

.duration-active {
    color: #2563eb;
}

.duration-done {
    color: #059669;
}

#trackingTable td strong {
    display: block;
    margin-bottom: 2px;
}

@media (max-width: 768px) {
    .tracking-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}