/* ── ProManage - Clean Bright Theme ─────────────────────── */
:root {
    --primary: #4361ee;
    --primary-light: #eef0ff;
    --secondary: #3a0ca3;
    --success: #06d6a0;
    --warning: #ffd166;
    --danger: #ef476f;
    --info: #118ab2;
    --dark: #1d3557;
    --light: #f8f9fc;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #2b2d42;
    --text-muted: #8d99ae;
    --border: #e9ecef;
    --sidebar-w: 260px;
    --header-h: 64px;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); margin: 0; font-size: 14px; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--secondary); }

/* ── LOGIN PAGE ───────────────────────────────────────── */
.login-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.login-card { background: #fff; border-radius: 20px; padding: 48px; width: 420px; box-shadow: var(--shadow-lg); }
.login-card h2 { font-size: 28px; font-weight: 700; margin-bottom: 8px; color: var(--dark); }
.login-card .subtitle { color: var(--text-muted); margin-bottom: 32px; }
.login-card .form-control { border-radius: 10px; padding: 12px 16px; border: 1.5px solid var(--border); font-size: 14px; }
.login-card .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(67,97,238,0.15); }
.login-card .btn-primary { border-radius: 10px; padding: 12px; font-weight: 600; font-size: 15px; background: var(--primary); border: none; }
.login-card .btn-primary:hover { background: var(--secondary); }
.login-users-table { font-size: 12px; margin-top: 20px; }
.login-users-table td, .login-users-table th { padding: 6px 10px; }
.login-users-table .badge { cursor: pointer; }

/* ── SIDEBAR ──────────────────────────────────────────── */
.sidebar { width: var(--sidebar-w); height: 100vh; position: fixed; top: 0; left: 0; background: #fff; border-right: 1px solid var(--border); z-index: 1000; display: flex; flex-direction: column; transition: transform .3s; }
.sidebar-brand { padding: 20px 24px; font-size: 22px; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.sidebar-brand i { font-size: 26px; }
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.sidebar-nav .nav-label { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--text-muted); padding: 12px 12px 6px; letter-spacing: 0.5px; }
.sidebar-nav .nav-item { margin-bottom: 2px; }
.sidebar-nav .nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; color: var(--text); font-weight: 500; transition: all .2s; }
.sidebar-nav .nav-link:hover { background: var(--primary-light); color: var(--primary); }
.sidebar-nav .nav-link.active { background: var(--primary); color: #fff; }
.sidebar-nav .nav-link i { font-size: 18px; width: 22px; text-align: center; }
.sidebar-user { padding: 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.sidebar-user .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
.sidebar-user .user-info { flex: 1; }
.sidebar-user .user-name { font-weight: 600; font-size: 13px; }
.sidebar-user .user-role { font-size: 11px; color: var(--text-muted); }

/* ── HEADER ───────────────────────────────────────────── */
.main-header { height: var(--header-h); background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; position: sticky; top: 0; z-index: 500; }
.main-header .page-title { font-size: 20px; font-weight: 700; color: var(--dark); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.notif-bell { position: relative; cursor: pointer; font-size: 20px; color: var(--text-muted); }
.notif-bell .badge { position: absolute; top: -6px; right: -8px; font-size: 10px; }

/* ── MAIN CONTENT ─────────────────────────────────────── */
.main-wrapper { margin-left: var(--sidebar-w); min-height: 100vh; }
.main-content { padding: 28px; }

/* ── METRIC CARDS ─────────────────────────────────────── */
.metric-card { background: var(--card-bg); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; border: 1px solid var(--border); }
.metric-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.metric-card .metric-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.metric-card .metric-value { font-size: 32px; font-weight: 800; line-height: 1; }
.metric-card .metric-label { font-size: 13px; color: var(--text-muted); font-weight: 500; margin-top: 4px; }
.icon-blue { background: #e8f0fe; color: #4361ee; }
.icon-green { background: #e6f9f1; color: #06d6a0; }
.icon-purple { background: #f0e8ff; color: #7c3aed; }
.icon-orange { background: #fff3e0; color: #ff9800; }
.icon-red { background: #fce4ec; color: #ef476f; }

/* ── CARDS & BOXES ────────────────────────────────────── */
.card { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--card-bg); }
.card-header { background: transparent; border-bottom: 1px solid var(--border); font-weight: 600; padding: 16px 20px; }
.card-body { padding: 20px; }

/* ── PROJECT CARDS ────────────────────────────────────── */
.project-card { border-radius: var(--radius); border: 1px solid var(--border); background: #fff; padding: 20px; transition: all .2s; cursor: pointer; }
.project-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.project-card .project-type-badge { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.project-card .progress { height: 6px; border-radius: 4px; }
.cost-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* ── KANBAN BOARD ─────────────────────────────────────── */
.kanban-board { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 16px; min-height: 400px; }
.kanban-column { min-width: 280px; max-width: 320px; flex: 1; background: var(--bg); border-radius: var(--radius); padding: 12px; }
.kanban-column-header { font-weight: 700; font-size: 13px; padding: 8px 12px; border-radius: 8px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.kanban-column-header .count { background: rgba(0,0,0,.1); border-radius: 12px; padding: 2px 10px; font-size: 12px; }
.kanban-card { background: #fff; border-radius: 10px; padding: 14px; margin-bottom: 10px; border: 1px solid var(--border); cursor: grab; transition: all .15s; }
.kanban-card:hover { box-shadow: var(--shadow); }
.kanban-card.dragging { opacity: 0.5; transform: rotate(2deg); }
.kanban-card .task-title { font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.kanban-card .task-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-muted); }

/* ── PRIORITY BADGES ──────────────────────────────────── */
.priority-Critical { background: #fce4ec; color: #c62828; }
.priority-High { background: #fff3e0; color: #e65100; }
.priority-Medium { background: #e3f2fd; color: #1565c0; }
.priority-Low { background: #e8f5e9; color: #2e7d32; }

/* ── STATUS BADGES ────────────────────────────────────── */
.status-ToDo { background: #e0e0e0; color: #424242; }
.status-InProgress { background: #e3f2fd; color: #1565c0; }
.status-InReview { background: #fff3e0; color: #e65100; }
.status-Done { background: #e8f5e9; color: #2e7d32; }
.status-Active { background: #e8f5e9; color: #2e7d32; }
.status-Completed { background: #e0e0e0; color: #424242; }
.status-OnHold { background: #fff3e0; color: #e65100; }
.status-NotStarted { background: #f5f5f5; color: #757575; }

/* ── STAGE PIPELINE ───────────────────────────────────── */
.stage-pipeline { display: flex; gap: 4px; flex-wrap: wrap; margin: 16px 0; }
.stage-pill { padding: 8px 16px; border-radius: 20px; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stage-pill.completed { background: #e8f5e9; color: #2e7d32; }
.stage-pill.in-progress { background: #e3f2fd; color: #1565c0; border: 2px solid #1565c0; }
.stage-pill.not-started { background: #f5f5f5; color: #9e9e9e; }
.stage-pill i { font-size: 14px; }
.stage-connector { display: flex; align-items: center; color: #ccc; }

/* ── TABLES ───────────────────────────────────────────── */
.table { font-size: 13px; }
.table th { font-weight: 600; color: var(--text-muted); text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px; border-bottom: 2px solid var(--border); }
.table td { vertical-align: middle; padding: 12px; }

/* ── TIMER WIDGET ─────────────────────────────────────── */
.timer-widget { position: fixed; bottom: 24px; right: 24px; background: #fff; border-radius: 16px; padding: 16px 20px; box-shadow: 0 8px 40px rgba(0,0,0,0.15); z-index: 9999; min-width: 320px; border: 2px solid var(--primary); }
.timer-display { font-size: 32px; font-weight: 800; font-family: 'JetBrains Mono', monospace; color: var(--primary); text-align: center; }
.timer-task { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer-controls { display: flex; gap: 8px; margin-top: 12px; justify-content: center; }
.timer-btn { border: none; border-radius: 10px; padding: 8px 16px; font-weight: 600; font-size: 13px; cursor: pointer; transition: all .2s; }
.timer-btn-start { background: var(--success); color: #fff; }
.timer-btn-pause { background: var(--warning); color: var(--dark); }
.timer-btn-stop { background: var(--danger); color: #fff; }
.timer-btn:hover { transform: scale(1.05); }
.timer-minimized { min-width: auto; padding: 10px 16px; cursor: pointer; }
.timer-minimized .timer-display { font-size: 18px; }

/* ── NOTIFICATION DROPDOWN ────────────────────────────── */
.notif-dropdown { position: absolute; right: 0; top: 40px; width: 360px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--border); max-height: 400px; overflow-y: auto; z-index: 9999; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; transition: background .2s; }
.notif-item:hover { background: var(--primary-light); }
.notif-item.unread { background: #f8f9ff; }
.notif-item .notif-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-item .notif-text { font-size: 13px; }
.notif-item .notif-time { font-size: 11px; color: var(--text-muted); }

/* ── FORM STYLING ─────────────────────────────────────── */
.form-control, .form-select { border-radius: 10px; border: 1.5px solid var(--border); padding: 10px 14px; font-size: 14px; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(67,97,238,0.12); }
.form-label { font-weight: 600; font-size: 13px; color: var(--text); margin-bottom: 6px; }
.btn { border-radius: 10px; font-weight: 600; padding: 10px 20px; font-size: 14px; transition: all .2s; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--secondary); border-color: var(--secondary); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); }
.btn-success { background: var(--success); border-color: var(--success); }
.btn-light { background: #f0f2f5; border: 1px solid var(--border); color: var(--text); }

/* ── VIEW TOGGLE ──────────────────────────────────────── */
.view-toggle .btn { padding: 8px 14px; }
.view-toggle .btn.active { background: var(--primary); color: #fff; }

/* ── APPROVAL CARD ────────────────────────────────────── */
.approval-card { border-left: 4px solid var(--warning); }
.approval-card .badge { font-size: 11px; }

/* ── COMMENT THREAD ───────────────────────────────────── */
.comment-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.comment-body { flex: 1; }
.comment-header { font-size: 12px; margin-bottom: 4px; }
.comment-header strong { color: var(--text); }
.comment-header span { color: var(--text-muted); margin-left: 8px; }
.comment-text { font-size: 13px; line-height: 1.5; }

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }
    .kanban-board { flex-direction: column; }
    .kanban-column { min-width: 100%; max-width: 100%; }
}

/* ── CHARTS ───────────────────────────────────────────── */
.chart-container { position: relative; height: 300px; }

/* ── TOAST ────────────────────────────────────────────── */
.toast-container { position: fixed; top: 80px; right: 24px; z-index: 9999; }

/* ── DOCUMENT LIST ────────────────────────────────────── */
.doc-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; }
.doc-item .doc-icon { width: 40px; height: 40px; border-radius: 8px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.doc-item .doc-info { flex: 1; }
.doc-item .doc-title { font-weight: 600; font-size: 13px; }
.doc-item .doc-meta { font-size: 11px; color: var(--text-muted); }

/* ── ACTIVITY LOG ─────────────────────────────────────── */
.activity-item { display: flex; gap: 12px; padding: 10px 0; font-size: 13px; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex-shrink: 0; }
.activity-time { color: var(--text-muted); font-size: 11px; }

/* ── MISC ─────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state i { font-size: 48px; margin-bottom: 12px; opacity: 0.3; }
.badge { font-weight: 600; padding: 4px 10px; border-radius: 6px; font-size: 11px; }
.modal-content { border-radius: var(--radius); border: none; }
.modal-header { border-bottom: 1px solid var(--border); }
hr { border-color: var(--border); }

/* ── CHECKBOX PICKER ──────────────────────────────────── */
.border.rounded-3 .form-check { padding: 6px 10px 6px 32px; border-radius: 8px; transition: background .15s; }
.border.rounded-3 .form-check:hover { background: var(--primary-light); }
.border.rounded-3 .form-check-input:checked + .form-check-label { color: var(--primary); font-weight: 600; }
.border.rounded-3 .form-check-input { border-radius: 4px; }
.border.rounded-3 .form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

/* ── TAG CHIPS ────────────────────────────────────────── */
.tag-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 20px; background: var(--primary-light); color: var(--primary); font-size: 12px; font-weight: 600; }
.tag-chip .bi-x { cursor: pointer; font-size: 14px; }
.tag-chip .bi-x:hover { color: var(--danger); }

