/* KCB Enterprise Project Tracker - Premium Styles */

/* ========================================
   Lufga Font from CDNFonts
   ======================================== */
@import url('https://fonts.cdnfonts.com/css/lufga');

/* ========================================
   CSS Variables - KCB Brand Colors
   ======================================== */
:root {
    /* Primary Colors */
    --primary-default: #84bd00;
    --primary-dark: #5a8200;
    --primary-active: #ABD064;
    --primary-hover: #C4DD92;
    --primary-muted: #DCEBBD;

    /* Secondary Colors */
    --secondary-default: #002B4D;
    --secondary-active: #195785;
    --secondary-hover: #6988A5;
    --secondary-muted: #BCCBD9;

    /* Tertiary Colors */
    --tertiary-default: #2B404B;
    --tertiary-active: #537486;
    --tertiary-hover: #859DAB;
    --tertiary-muted: #C7D6DD;

    /* Neutral Colors */
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --black: #000000;

    /* Status Colors */
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --info: #3B82F6;
    --info-light: #DBEAFE;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;

    /* Spacing */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --header-height: 70px;
}

/* ========================================
   Base Styles
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Lufga', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary-default);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-active);
}

/* ========================================
   Layout
   ======================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--secondary-default) 0%, var(--tertiary-default) 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width var(--transition-slow);
    box-shadow: var(--shadow-xl);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

/* Hide text when sidebar is collapsed */
.sidebar.collapsed .sidebar-brand,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .sidebar-user-info {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 1rem;
}

.sidebar.collapsed .sidebar-logo {
    width: 40px;
    height: 40px;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.75rem;
    margin: 0.25rem 0.5rem;
}

.sidebar.collapsed .nav-item i,
.sidebar.collapsed .nav-item svg {
    margin-right: 0;
}

.sidebar.collapsed .sidebar-user {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar.collapsed .sidebar-user-avatar {
    margin-right: 0;
}

.sidebar.collapsed .sidebar-footer {
    padding: 0.75rem;
    justify-content: center;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: var(--radius);
    background: var(--white);
    padding: 4px;
}

.sidebar-brand {
    flex: 1;
    overflow: hidden;
}

.sidebar-brand h1 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--white);
    white-space: nowrap;
}

.sidebar-brand span {
    font-size: 0.75rem;
    color: var(--primary-default);
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
}

.nav-item.active {
    background: rgba(132, 189, 0, 0.15);
    color: var(--primary-default);
    border-left-color: var(--primary-default);
}

.nav-item i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.nav-item span {
    font-weight: 500;
    white-space: nowrap;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--primary-default);
    color: var(--secondary-default);
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.08);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--primary-default);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--secondary-default);
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-slow);
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Header */
.header {
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: all var(--transition);
}

.menu-toggle:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--gray-500);
}

.breadcrumb a:hover {
    color: var(--primary-default);
}

.breadcrumb span {
    color: var(--gray-800);
    font-weight: 500;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 2rem;
}

.search-box {
    width: 100%;
    max-width: 500px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: var(--gray-50);
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--gray-800);
    transition: all var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-default);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--primary-muted);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    position: relative;
    transition: all var(--transition);
}

.header-btn:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.header-btn .notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: var(--radius-full);
    border: 2px solid var(--white);
}

/* Content Area */
.content {
    flex: 1;
    padding: 2rem;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
}

.page-subtitle {
    font-size: 0.9375rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* ========================================
   Cards
   ======================================== */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

/* ========================================
   Stats Cards
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.primary {
    background: var(--primary-muted);
    color: var(--primary-default);
}

.stat-icon.secondary {
    background: var(--secondary-muted);
    color: var(--secondary-default);
}

.stat-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.stat-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-icon.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-icon.info {
    background: var(--info-light);
    color: var(--info);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--gray-500);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
}

.stat-change.positive {
    background: var(--success-light);
    color: var(--success);
}

.stat-change.negative {
    background: var(--danger-light);
    color: var(--danger);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-default);
    color: var(--secondary-default);
}

.btn-primary:hover {
    background: var(--primary-active);
}

.btn-secondary {
    background: var(--secondary-default);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--secondary-active);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
}

/* ========================================
   Forms
   ======================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--gray-800);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-default);
    box-shadow: 0 0 0 3px var(--primary-muted);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ========================================
   Tables
   ======================================== */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem 1.25rem;
    text-align: left;
}

.table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.table td {
    font-size: 0.875rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.table tbody tr {
    transition: background var(--transition);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

/* ========================================
   Progress Bars
   ======================================== */
.progress {
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-default);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.progress-bar.secondary {
    background: var(--secondary-default);
}

.progress-bar.success {
    background: var(--success);
}

.progress-bar.warning {
    background: var(--warning);
}

.progress-bar.danger {
    background: var(--danger);
}

/* ========================================
   Badges
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-primary {
    background: var(--primary-muted);
    color: var(--primary-default);
}

.badge-secondary {
    background: var(--secondary-muted);
    color: var(--secondary-default);
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

/* ========================================
   Avatar
   ======================================== */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    background: var(--gray-200);
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

.avatar-lg {
    width: 56px;
    height: 56px;
}

.avatar-group {
    display: flex;
}

.avatar-group .avatar {
    border: 2px solid var(--white);
    margin-left: -10px;
}

.avatar-group .avatar:first-child {
    margin-left: 0;
}

/* ========================================
   Charts
   ======================================== */
.chart-container {
    position: relative;
    height: 300px;
}

/* ========================================
   Kanban Board
   ======================================== */
.kanban-board {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.kanban-column {
    flex: 0 0 320px;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 1rem;
    max-height: calc(100vh - 250px);
    display: flex;
    flex-direction: column;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-200);
}

.kanban-column-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kanban-column-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    background: var(--gray-200);
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
}

.kanban-cards {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.kanban-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    cursor: grab;
    transition: transform var(--transition), box-shadow var(--transition);
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kanban-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.kanban-card-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.kanban-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* ========================================
   Project Card
   ======================================== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.project-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.project-info {
    flex: 1;
    min-width: 0;
}

.project-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-code {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.project-card-body {
    padding: 1.25rem 1.5rem;
}

.project-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-progress {
    margin-bottom: 1rem;
}

.project-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.project-progress-label {
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.project-progress-value {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.project-stats {
    display: flex;
    gap: 1.5rem;
}

.project-stat {
    flex: 1;
    text-align: center;
}

.project-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.project-stat-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
}

.project-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ========================================
   Timeline / Gantt Chart
   ======================================== */
.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--success), var(--info), var(--gray-300));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
    padding-left: 1rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2.5rem;
    top: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.timeline-marker i {
    width: 18px;
    height: 18px;
}

.timeline-date {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-content {
    background: var(--white);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--status-color, var(--gray-300));
    transition: all 0.2s ease;
}

.timeline-content:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(4px);
}

.timeline-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.timeline-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.timeline-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    text-transform: capitalize;
    white-space: nowrap;
}

.timeline-status i {
    width: 14px;
    height: 14px;
}

.timeline-status.status-completed {
    background: var(--success-light);
    color: var(--success);
}

.timeline-status.status-in-progress {
    background: var(--info-light);
    color: var(--info);
}

.timeline-status.status-upcoming {
    background: var(--gray-100);
    color: var(--gray-500);
}

.timeline-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.timeline-type {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.badge-milestone {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-phase {
    background: var(--info-light);
    color: var(--info);
}

.badge-sprint {
    background: var(--success-light);
    color: var(--success);
}

/* ========================================
   Login Page
   ======================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, var(--secondary-default) 0%, var(--tertiary-default) 100%);
}

.login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: var(--white);
}

.login-brand {
    text-align: center;
    margin-bottom: 3rem;
}

.login-brand img {
    width: auto;
    height: auto;
    max-width: 180px;
    max-height: 80px;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--white);
    padding: 1rem;
    object-fit: contain;
}

.login-brand h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-brand p {
    font-size: 1rem;
    opacity: 0.8;
}

.login-features {
    max-width: 400px;
}

.login-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.login-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: rgba(132, 189, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-default);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.login-feature-icon.ai-icon {
    background: linear-gradient(135deg, rgba(132, 189, 0, 0.25), rgba(0, 43, 77, 0.2));
    color: var(--primary-default);
    animation: aiPulse 2s ease-in-out infinite;
}

@keyframes aiPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(132, 189, 0, 0.3); }
    50% { box-shadow: 0 0 20px 5px rgba(132, 189, 0, 0.25); }
}

.login-feature-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.login-feature-content p {
    font-size: 0.875rem;
    opacity: 0.8;
}

.login-right {
    width: 500px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.login-form-container {
    width: 100%;
    max-width: 380px;
}

.login-form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.login-form-header p {
    color: var(--gray-500);
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form .btn {
    width: 100%;
    margin-top: 0.5rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.login-footer a {
    color: var(--primary-default);
    font-weight: 500;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease, width 0.3s ease;
    }

    /* Show sidebar when NOT collapsed (hamburger toggled) */
    .sidebar:not(.collapsed) {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }

    /* Hide sidebar when collapsed */
    .sidebar.collapsed {
        transform: translateX(-100%);
    }

    .main-content {
        margin-left: 0 !important;
    }

    .sidebar.collapsed ~ .main-content {
        margin-left: 0;
    }

    .login-left {
        display: none;
    }

    .login-right {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 1rem;
    }

    .header-center {
        display: none;
    }

    .content {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* ========================================
   Utilities
   ======================================== */
.text-primary { color: var(--primary-default); }
.text-secondary { color: var(--secondary-default); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--gray-500); }

.bg-primary { background-color: var(--primary-default); }
.bg-secondary { background-color: var(--secondary-default); }
.bg-success { background-color: var(--success); }
.bg-warning { background-color: var(--warning); }
.bg-danger { background-color: var(--danger); }

.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.d-flex { display: flex; }
.d-none { display: none; }
.d-block { display: block; }

.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary-default);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.2s ease;
}

.modal-content.modal-sm {
    max-width: 400px;
}

.modal-content.modal-lg {
    max-width: 900px;
}

.modal-content.modal-xl {
    max-width: 1200px;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: fadeIn 0.3s ease;
    min-width: 300px;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-danger { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--info); }

/* ===================== AI Chat Panel ===================== */
.ai-chat-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-default), var(--primary-dark));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    z-index: 9990;
}

.ai-chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 107, 63, 0.4);
}

.ai-chat-toggle i {
    width: 24px;
    height: 24px;
}

.ai-toggle-label {
    display: none;
}

.ai-chat-panel {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 400px;
    height: 600px;
    max-height: calc(100vh - 3rem);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    z-index: 9995;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.ai-chat-panel.open {
    display: flex;
}

.ai-chat-panel.minimized {
    height: auto;
}

.ai-chat-panel.minimized .ai-chat-body,
.ai-chat-panel.minimized .ai-chat-input {
    display: none;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-default), var(--primary-dark));
    color: white;
}

.ai-chat-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.ai-chat-title i {
    width: 20px;
    height: 20px;
}

.ai-chat-actions {
    display: flex;
    gap: 0.25rem;
}

.ai-chat-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ai-chat-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ai-chat-btn i {
    width: 16px;
    height: 16px;
}

.ai-chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-welcome-message,
.ai-message {
    display: flex;
    gap: 0.75rem;
}

.ai-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-avatar i {
    width: 18px;
    height: 18px;
    color: var(--primary-default);
}

.ai-message-content {
    flex: 1;
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.ai-message-content p {
    margin: 0;
}

.ai-message-content ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.ai-message-content li {
    margin: 0.25rem 0;
}

.ai-message.user {
    flex-direction: row-reverse;
}

.ai-message.user .ai-avatar {
    background: var(--gray-200);
}

.ai-message.user .ai-avatar i {
    color: var(--gray-600);
}

.ai-message.user .ai-message-content {
    background: var(--primary-default);
    color: white;
}

.ai-quick-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--gray-200);
    flex-wrap: wrap;
}

.ai-quick-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.75rem;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
}

.ai-quick-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-default);
    color: var(--primary-default);
}

.ai-quick-btn i {
    width: 14px;
    height: 14px;
}

.ai-chat-input {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.ai-chat-input textarea {
    flex: 1;
    resize: none;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 0.75rem;
    font-size: 0.875rem;
    font-family: inherit;
    max-height: 120px;
    line-height: 1.4;
}

.ai-chat-input textarea:focus {
    outline: none;
    border-color: var(--primary-default);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.ai-send-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--primary-default);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ai-send-btn:hover {
    background: var(--primary-dark);
}

.ai-send-btn:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

.ai-send-btn i {
    width: 18px;
    height: 18px;
}

.ai-typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--gray-500);
}

.ai-typing-dots {
    display: flex;
    gap: 4px;
}

.ai-typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--gray-400);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.ai-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Mobile responsiveness for AI chat */
@media (max-width: 480px) {
    .ai-chat-panel {
        width: calc(100vw - 2rem);
        right: 1rem;
        height: calc(100vh - 8rem);
    }
}

/* ===================== Timeline / Gantt Chart ===================== */
.timeline-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.timeline-controls {
    display: flex;
    gap: 0.5rem;
}

.timeline-zoom-btn {
    padding: 0.5rem 0.75rem;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.timeline-zoom-btn:hover {
    background: var(--gray-100);
}

.timeline-zoom-btn.active {
    background: var(--primary-default);
    color: white;
    border-color: var(--primary-default);
}

.timeline-body {
    display: flex;
    overflow: hidden;
}

.timeline-sidebar {
    width: 280px;
    min-width: 280px;
    border-right: 1px solid var(--gray-200);
    background: var(--white);
}

.timeline-sidebar-header {
    height: 60px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    font-weight: 600;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.timeline-task-list {
    overflow-y: auto;
    max-height: calc(100vh - 300px);
}

.timeline-task-row {
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 1rem;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: background 0.2s;
}

.timeline-task-row:hover {
    background: var(--gray-50);
}

.timeline-task-row.has-children {
    font-weight: 500;
}

.timeline-task-toggle {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    cursor: pointer;
}

.timeline-task-toggle i {
    width: 14px;
    height: 14px;
    color: var(--gray-500);
}

.timeline-task-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
}

.timeline-task-assignee {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-default);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
}

.timeline-chart {
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 300px);
}

.timeline-chart-header {
    height: 60px;
    display: flex;
    position: sticky;
    top: 0;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    z-index: 10;
}

.timeline-date-cell {
    min-width: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--gray-100);
    font-size: 0.7rem;
    color: var(--gray-600);
}

.timeline-date-cell.weekend {
    background: var(--gray-100);
}

.timeline-date-cell.today {
    background: var(--primary-light);
    color: var(--primary-default);
    font-weight: 600;
}

.timeline-date-cell .day {
    font-size: 0.875rem;
    font-weight: 500;
}

.timeline-chart-body {
    position: relative;
}

.timeline-chart-row {
    height: 40px;
    position: relative;
    border-bottom: 1px solid var(--gray-100);
}

.timeline-bar {
    position: absolute;
    top: 8px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 0.75rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 20px;
    z-index: 5;
}

.timeline-bar:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.timeline-bar.status-todo {
    background: var(--gray-400);
}

.timeline-bar.status-in_progress {
    background: var(--info);
}

.timeline-bar.status-in_review {
    background: var(--warning);
}

.timeline-bar.status-completed {
    background: var(--success);
}

.timeline-bar.status-blocked {
    background: var(--danger);
}

.timeline-bar-progress {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px 0 0 4px;
}

.timeline-bar-label {
    position: relative;
    z-index: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-dependency-line {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.timeline-dependency-line path {
    fill: none;
    stroke: var(--gray-400);
    stroke-width: 2;
}

.timeline-dependency-line.critical path {
    stroke: var(--danger);
}

.timeline-today-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--danger);
    z-index: 2;
}

.timeline-today-line::before {
    content: 'Today';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.625rem;
    color: var(--danger);
    white-space: nowrap;
}

/* Timeline resize handle */
.timeline-bar-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: ew-resize;
    background: transparent;
}

.timeline-bar-handle.left {
    left: 0;
    border-radius: 4px 0 0 4px;
}

.timeline-bar-handle.right {
    right: 0;
    border-radius: 0 4px 4px 0;
}

.timeline-bar-handle:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Timeline empty state */
.timeline-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--gray-500);
}

.timeline-empty i {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: var(--gray-400);
}

/* Timeline legend */
.timeline-legend {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.timeline-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.timeline-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* AI Settings Styles */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#ai-settings-card .form-group {
    margin-bottom: 1rem;
}

#ai-settings-card .btn i {
    margin-right: 0.5rem;
}

#ai-settings-card small {
    line-height: 1.5;
}

/* AI Actions Styles */
.ai-action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    margin: 4px 0;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    font-size: 0.875rem;
    color: #065f46;
}

.ai-action-item i {
    color: #10b981;
}

.ai-actions-header {
    font-size: 0.875rem;
}

/* ========================================
   PMO Module Styles
   ======================================== */

/* Tabs Component */
.tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 0;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: var(--primary-default);
    background: var(--gray-50);
}

.tab-btn.active {
    color: var(--primary-default);
    border-bottom-color: var(--primary-default);
}

.tab-btn i {
    width: 16px;
    height: 16px;
}

.tab-content {
    padding-top: 1.5rem;
}

/* OKR Tree Styles */
.okr-tree {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.okr-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.okr-objective {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    cursor: pointer;
    transition: background var(--transition);
}

.okr-objective:hover {
    background: var(--gray-50);
}

.okr-expand-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: transform var(--transition);
}

.okr-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--primary-muted);
    color: var(--primary-default);
    display: flex;
    align-items: center;
    justify-content: center;
}

.okr-content {
    flex: 1;
}

.okr-title {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.okr-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.okr-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.okr-progress span {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    min-width: 40px;
}

.okr-key-results {
    padding: 0 1rem 1rem 3.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.okr-key-result {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.kr-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--success-light);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kr-content {
    flex: 1;
}

.kr-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.kr-metric {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.kr-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kr-progress span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-600);
    min-width: 35px;
}

/* Workload Heatmap Styles */
.workload-heatmap {
    padding: 1rem 0;
}

.heatmap-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.heatmap-header,
.heatmap-row {
    display: grid;
    grid-template-columns: 150px repeat(5, 1fr);
    gap: 4px;
}

.heatmap-cell {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.heatmap-cell.header {
    font-weight: 600;
    color: var(--gray-600);
    background: transparent;
}

.heatmap-cell.resource-name {
    justify-content: flex-start;
    padding-left: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    background: transparent;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Integration Status Styles */
.integration-status {
    border-radius: var(--radius);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-default);
}

/* Badge Variants for PMO */
.badge-info {
    background: var(--info-light);
    color: var(--info);
}

/* Stats Grid Enhancement for PMO Pages */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Text Utilities */
.text-muted {
    color: var(--gray-500);
}

/* Responsive Adjustments for PMO */
@media (max-width: 992px) {
    .heatmap-header,
    .heatmap-row {
        grid-template-columns: 120px repeat(5, 1fr);
    }

    .heatmap-cell.resource-name {
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .okr-objective {
        flex-wrap: wrap;
    }

    .okr-progress {
        width: 100%;
        margin-top: 0.5rem;
        padding-left: 3.25rem;
    }

    .heatmap-header,
    .heatmap-row {
        grid-template-columns: 100px repeat(5, 40px);
    }
}
