/* ============================================
   INBOX & TASK BOARD v2.1 — Premium Design
   Kế thừa theme từ styles.css (dark/light mode)
   ============================================ */

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-surface: #f8fafc;
    --bg-glass: #ffffff;
    --accent-primary: #6366f1;
    --accent-primary-light: #818cf8;
    --accent-secondary: #06b6d4;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-accent: #6366f1;
    --border-color: #e2e8f0;
    --border-subtle: #cbd5e1;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

[data-theme="dark"], body.dark-mode, .dark-mode {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a1f35;
    --bg-card-hover: #1f2545;
    --bg-surface: rgba(26, 31, 53, 0.8);
    --bg-glass: rgba(17, 24, 39, 0.6);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: rgba(99, 102, 241, 0.15);
}

/* ── Main Layout ── */
.inbox-board-wrapper {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 120px);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 12px;
    overflow: hidden;
}

/* ── Top Toolbar ── */
.ib-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
    gap: 12px;
    flex-wrap: wrap;
    z-index: 10;
}
.ib-toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ib-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ib-search {
    position: relative;
}
.ib-search input {
    padding: 7px 12px 7px 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 0.8rem;
    width: 200px;
    outline: none;
    transition: all 0.2s;
}
.ib-search input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
    width: 260px;
}
.ib-search::before {
    content: '🔍';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    pointer-events: none;
}
.ib-filter-chip {
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-weight: 500;
}
.ib-filter-chip:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary-light);
    background: rgba(99,102,241,0.08);
}
.ib-filter-chip.active {
    background: var(--accent-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}
.ib-member-chip {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}
.ib-member-chip:hover { transform: scale(1.15); }
.ib-member-chip.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
}
.ib-btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}
.ib-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}
.ib-btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}
.ib-btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(99,102,241,0.35);
    transform: translateY(-1px);
}

/* ── Content Area ── */
.ib-content {
    flex: 1;
    overflow: hidden;
    display: flex;
}

/* ── Bottom View Bar ── */
.ib-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    z-index: 10;
}
.ib-view-tab {
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
    font-weight: 500;
    position: relative;
}
.ib-view-tab:hover {
    color: var(--text-secondary);
    background: var(--bg-card-hover);
}
.ib-view-tab.active {
    color: var(--accent-primary-light);
    background: rgba(99,102,241,0.1);
    font-weight: 600;
}
.ib-view-tab.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 3px;
}

/* ═══════════════════════════════════════
   INBOX SIDEBAR
   ═══════════════════════════════════════ */
.ib-inbox-sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.3s ease;
}
.ib-inbox-sidebar.collapsed {
    width: 48px;
    min-width: 48px;
}
.ib-inbox-sidebar.collapsed .ib-inbox-title,
.ib-inbox-sidebar.collapsed .ib-inbox-list,
.ib-inbox-sidebar.collapsed .ib-inbox-add span { display: none; }
.ib-inbox-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.ib-inbox-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.ib-inbox-badge {
    background: var(--accent-warning);
    color: #1a1a2e;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}
.ib-inbox-collapse {
    width: 26px; height: 26px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.ib-inbox-collapse:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.ib-inbox-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
.ib-inbox-list::-webkit-scrollbar { width: 4px; }
.ib-inbox-list::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.2); border-radius: 4px; }
.ib-inbox-item {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    margin-bottom: 6px;
    cursor: grab;
    transition: all 0.2s;
}
.ib-inbox-item:hover {
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-sm);
}
.ib-inbox-item.dragging { opacity: 0.4; }
.ib-inbox-item-source {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.ib-inbox-item-source.hub { background: rgba(234,88,12,0.12); color: #fb923c; }
.ib-inbox-item-source.dept { background: rgba(99,102,241,0.12); color: var(--accent-primary-light); }
.ib-inbox-item-source.okr { background: rgba(16,185,129,0.12); color: #34d399; }
.ib-inbox-item-source.cross-dept { background: rgba(139,92,246,0.12); color: #a78bfa; }
.ib-inbox-item-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 4px;
}
.ib-inbox-item-date {
    font-size: 0.68rem;
    color: var(--text-muted);
}
.ib-inbox-add {
    padding: 8px;
    border-top: 1px solid var(--border-color);
}
.ib-inbox-add-btn {
    width: 100%;
    padding: 8px;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    background: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}
.ib-inbox-add-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary-light);
    background: rgba(99,102,241,0.05);
}

/* ═══════════════════════════════════════
   VIEW: BOARD (Kanban)
   ═══════════════════════════════════════ */
.ib-board-view {
    flex: 1;
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    overflow-x: auto;
    overflow-y: hidden;
}
.ib-column {
    min-width: 280px;
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    max-height: 100%;
    transition: border-color 0.2s;
}
.ib-column:hover { border-color: rgba(99,102,241,0.25); }
.ib-col-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}
.ib-col-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}
.ib-col-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.ib-col-count {
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-weight: 600;
}
.ib-col-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 60px;
    transition: background 0.2s;
}
.ib-col-body.drag-over { background: rgba(99,102,241,0.08); }
.ib-col-body::-webkit-scrollbar { width: 4px; }
.ib-col-body::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.15); border-radius: 4px; }
.ib-col-add { padding: 8px; border-top: 1px solid var(--border-color); }
.ib-col-add-btn {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 8px;
    background: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ib-col-add-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); }

/* ── Task Card ── */
.ib-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0;
    margin-bottom: 8px;
    cursor: grab;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.ib-card:hover {
    border-color: rgba(99,102,241,0.3);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}
.ib-card.dragging { opacity: 0.4; transform: rotate(2deg) scale(0.97); }
.ib-card-bar { height: 3px; width: 100%; }
.ib-card-bar.change { background: linear-gradient(90deg, #3b82f6, #6366f1); }
.ib-card-bar.run { background: linear-gradient(90deg, #10b981, #06b6d4); }
.ib-card-inner { padding: 12px 14px; }
.ib-card-tags { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.ib-tag {
    font-size: 0.6rem;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.ib-tag.change { background: rgba(59,130,246,0.15); color: #60a5fa; }
.ib-tag.run { background: rgba(16,185,129,0.15); color: #34d399; }
.ib-tag.q1 { background: rgba(239,68,68,0.15); color: #f87171; }
.ib-tag.q2 { background: rgba(245,158,11,0.15); color: #fbbf24; }
.ib-tag.hub { background: rgba(234,88,12,0.15); color: #fb923c; }
.ib-card-title {
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.45;
}
.ib-card-okr {
    font-size: 0.68rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding: 5px 9px;
    background: rgba(99,102,241,0.06);
    border-radius: 6px;
    border-left: 2px solid var(--accent-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ib-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}
.ib-card-assignee { display: flex; align-items: center; gap: 6px; }
.ib-card-avatar {
    width: 24px; height: 24px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    font-weight: 700;
    flex-shrink: 0;
}
.ib-card-name { font-size: 0.72rem; color: var(--text-secondary); }
.ib-card-due {
    font-size: 0.68rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 4px;
}
.ib-card-due.overdue { background: rgba(239,68,68,0.12); color: #f87171; }
.ib-card-due.soon { background: rgba(245,158,11,0.12); color: #fbbf24; }
.ib-card-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s; }
.ib-card:hover .ib-card-actions { opacity: 1; }
.ib-card-act {
    width: 22px; height: 22px;
    border: none;
    background: rgba(99,102,241,0.06);
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.ib-card-act:hover { background: rgba(99,102,241,0.15); color: var(--accent-primary-light); }

/* ═══════════════════════════════════════
   VIEW: TABLE
   ═══════════════════════════════════════ */
.ib-table-view { flex: 1; overflow: auto; padding: 16px 20px; }
.ib-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.82rem; }
.ib-table thead th {
    position: sticky; top: 0; z-index: 2;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.ib-table tbody tr { transition: background 0.15s; cursor: pointer; }
.ib-table tbody tr:hover { background: var(--bg-card-hover); }
.ib-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}
.ib-table-status {
    padding: 3px 10px; border-radius: 12px; font-size: 0.7rem; font-weight: 600; white-space: nowrap; display: inline-block;
}
.ib-table-status.today { background: rgba(239,68,68,0.12); color: #f87171; }
.ib-table-status.this_week { background: rgba(245,158,11,0.12); color: #fbbf24; }
.ib-table-status.later { background: rgba(99,102,241,0.12); color: #818cf8; }
.ib-table-status.done { background: rgba(16,185,129,0.12); color: #34d399; }
.ib-table-status.inbox { background: rgba(148,163,184,0.12); color: #94a3b8; }

/* ═══════════════════════════════════════
   VIEW: CALENDAR
   ═══════════════════════════════════════ */
.ib-calendar-view { flex: 1; overflow: auto; padding: 16px 20px; }
.ib-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ib-cal-nav { display: flex; align-items: center; gap: 12px; }
.ib-cal-nav-btn {
    width: 32px; height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.ib-cal-nav-btn:hover { background: var(--bg-card-hover); }
.ib-cal-month { font-size: 1rem; font-weight: 600; color: var(--text-primary); min-width: 180px; text-align: center; }
.ib-cal-grid {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px;
    background: var(--border-color); border-radius: 12px; overflow: hidden;
}
.ib-cal-day-header {
    padding: 8px; text-align: center;
    font-size: 0.72rem; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase;
    background: var(--bg-card);
}
.ib-cal-day {
    min-height: 90px; padding: 6px;
    background: var(--bg-secondary);
    transition: background 0.15s;
}
.ib-cal-day:hover { background: var(--bg-card-hover); }
.ib-cal-day.today { background: rgba(99,102,241,0.08); }
.ib-cal-day.other-month { opacity: 0.3; }
.ib-cal-date { font-size: 0.72rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 4px; }
.ib-cal-day.today .ib-cal-date {
    background: var(--accent-primary); color: white;
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.ib-cal-event {
    font-size: 0.65rem; padding: 2px 5px; border-radius: 3px;
    margin-bottom: 2px; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; cursor: pointer; font-weight: 500; transition: opacity 0.15s;
}
.ib-cal-event:hover { opacity: 0.8; }
.ib-cal-event.change { background: rgba(59,130,246,0.2); color: #93c5fd; }
.ib-cal-event.run { background: rgba(16,185,129,0.2); color: #6ee7b7; }
.ib-cal-event.start { background: rgba(16,185,129,0.25); color: #34d399; border-left: 2px solid #10b981; }
.ib-cal-event.outlook { background: rgba(139,92,246,0.2); color: #c4b5fd; font-style: italic; }
.ib-cal-day.drag-over { background: rgba(99,102,241,0.15) !important; outline: 2px dashed var(--accent-primary); outline-offset: -2px; }

/* ═══════════════════════════════════════
   VIEW: TIMELINE (Gantt)
   ═══════════════════════════════════════ */
.ib-tl-label {
    position: sticky;
    left: 0;
    z-index: 6;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-right: 2px solid var(--border-color);
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.15s;
}
.ib-tl-label:hover { background: rgba(99,102,241,0.08); }
.ib-tl-task-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ib-tl-task-dot.change { background: #3b82f6; }
.ib-tl-task-dot.run { background: #10b981; }

/* Gantt Bars */
.ib-tl-bar { box-shadow: 0 1px 4px rgba(0,0,0,0.25); transition: opacity 0.15s, transform 0.1s; }
.ib-tl-bar:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.ib-tl-bar.change { background: linear-gradient(135deg, #3b82f6, #6366f1); color: #fff; }
.ib-tl-bar.run { background: linear-gradient(135deg, #10b981, #34d399); color: #fff; }
.ib-tl-bar.done { opacity: 0.45; filter: saturate(0.5); }
.ib-tl-bar.overdue { background: linear-gradient(135deg, #ef4444, #f97316); color: #fff; animation: ib-tl-pulse 2s ease-in-out infinite; }
@keyframes ib-tl-pulse {
    0%, 100% { box-shadow: 0 1px 4px rgba(239,68,68,0.3); }
    50% { box-shadow: 0 1px 10px rgba(239,68,68,0.5); }
}
.ib-tl-bar-text { font-size: 0.62rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ═══════════════════════════════════════
   VIEW: DASHBOARD
   ═══════════════════════════════════════ */
.ib-dashboard-view { flex: 1; overflow: auto; padding: 20px; }
.ib-dash-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px; margin-bottom: 20px;
}
.ib-dash-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 12px; padding: 20px; transition: border-color 0.2s;
}
.ib-dash-card:hover { border-color: rgba(99,102,241,0.25); }
.ib-dash-card-title {
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 12px;
}
.ib-dash-stat-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.ib-dash-stat-num { font-size: 2rem; font-weight: 700; color: var(--text-primary); line-height: 1; }
.ib-dash-stat-label { font-size: 0.78rem; color: var(--text-secondary); }
.ib-dash-progress { width: 100%; height: 6px; border-radius: 3px; background: var(--bg-surface); overflow: hidden; margin-top: 8px; }
.ib-dash-progress-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.ib-dash-bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 100px; margin-top: 12px; }
.ib-dash-bar { flex: 1; border-radius: 4px 4px 0 0; transition: height 0.4s ease; position: relative; min-width: 30px; }
.ib-dash-bar-label { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: 0.6rem; color: var(--text-muted); white-space: nowrap; }
.ib-dash-bar-val { position: absolute; top: -16px; left: 0; right: 0; text-align: center; font-size: 0.65rem; font-weight: 600; color: var(--text-secondary); }
.ib-dash-member-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-color); }
.ib-dash-member-row:last-child { border-bottom: none; }
.ib-dash-member-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--bg-surface); overflow: hidden; }
.ib-dash-member-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }

/* ═══════════════════════════════════════
   MODAL — kế thừa theme gốc
   ═══════════════════════════════════════ */
.ib-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: ibFadeIn 0.15s ease;
}
.ib-modal-overlay.show { display: flex; }
@keyframes ibFadeIn { from { opacity: 0; } to { opacity: 1; } }
.ib-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 620px;
    max-width: 92vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: ibSlideUp 0.2s ease;
}
@keyframes ibSlideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.ib-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ib-modal-header h3 {
    font-size: 1.05rem; font-weight: 600; color: var(--text-primary);
    display: flex; align-items: center; gap: 8px;
}
.ib-modal-close {
    width: 32px; height: 32px; border-radius: 8px;
    border: none; background: transparent;
    color: var(--text-muted); font-size: 1.2rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.ib-modal-close:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.ib-modal-body { padding: 20px 24px; }
.ib-form-group { margin-bottom: 14px; }
.ib-form-group label {
    display: block; font-size: 0.75rem; font-weight: 500;
    color: var(--text-secondary); margin-bottom: 5px;
    text-transform: uppercase; letter-spacing: 0.3px;
}
.ib-form-group input,
.ib-form-group select,
.ib-form-group textarea {
    width: 100%; padding: 9px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 0.84rem; outline: none;
    transition: border-color 0.2s;
}
.ib-form-group input:focus,
.ib-form-group select:focus,
.ib-form-group textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.ib-form-row { display: flex; gap: 12px; }
.ib-form-row .ib-form-group { flex: 1; }
.ib-modal-footer {
    padding: 14px 24px; border-top: 1px solid var(--border-color);
    display: flex; justify-content: flex-end; gap: 8px;
}

/* ── Empty state ── */
.ib-empty { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.ib-empty-icon { font-size: 2rem; margin-bottom: 10px; opacity: 0.5; }
.ib-empty h4 { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 4px; }
.ib-empty p { font-size: 0.75rem; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .ib-board-view { padding: 10px; }
    .ib-column { min-width: 250px; width: 250px; }
    .ib-toolbar { padding: 8px 12px; }
    .ib-dash-grid { grid-template-columns: 1fr; }
    .ib-inbox-sidebar { width: 220px; min-width: 220px; }
}
