/* ERSS tracker — custom styles on top of Tailwind */

/* ---- Kanban board ---- */
.kanban-board {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    align-items: stretch;
    padding: 0.25rem 0.25rem 0.75rem;
}
/* Slim, unobtrusive scrollbar under the columns */
.kanban-board::-webkit-scrollbar { height: 8px; }
.kanban-board::-webkit-scrollbar-track { background: transparent; }
.kanban-board::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}
.kanban-board { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }

.kanban-column {
    flex: 1 0 250px;
    min-width: 250px;
    background: #eef1f6;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.7rem;
    display: flex;
    flex-direction: column;
}
.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}
.kanban-count {
    background: #dbe2ec;
    border-radius: 999px;
    min-width: 1.5rem;
    text-align: center;
    padding: 0.1rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
}
.kanban-cards {
    flex: 1;
    min-height: 3.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-radius: 6px;
    transition: background 0.15s, outline-color 0.15s;
}
/* Placeholder for empty columns */
.kanban-cards:empty::after {
    content: 'Drop tenders here';
    color: #94a3b8;
    font-size: 0.75rem;
    text-align: center;
    padding: 1.1rem 0.5rem;
    border: 1.5px dashed #cbd5e1;
    border-radius: 6px;
}
.kanban-cards.drag-over {
    outline: 2px dashed #93b4f5;
    outline-offset: -2px;
    background: #e7eefc;
}
.kanban-card {
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.07);
    cursor: grab;
    transition: box-shadow 0.15s, transform 0.15s;
}
.kanban-card:hover {
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: 0.45; transform: none; }
.kanban-card-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1e293b;
    display: block;
    line-height: 1.35;
}
.kanban-card-title:hover { color: #2563eb; }
.kanban-card-sub {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kanban-card-meta {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.45rem;
}

/* Toast notification on the board */
.kanban-toast {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 60;
    max-width: 22rem;
}

/* ---- Gantt schedule ---- */
.gantt-body { position: relative; }
.gantt-row { transition: background-color .12s ease; }
.gantt-row-proj:hover { background: #eef2f7; }
.task-row:hover { background: #f8fafc; }
.task-row:hover .gantt-label-cell { background: #f8fafc; }
.gantt-label-cell {
    position: sticky;
    left: 0;
    z-index: 9;
    background: #fff;
}
.gantt-lane {
    min-height: 3rem;
    position: relative;
}
.gantt-lane.drag-over {
    background-color: #e7eefc !important;
}
.gantt-today {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ef4444;
    opacity: 0.6;
    z-index: 6;
    pointer-events: none;
}
.gantt-bar {
    position: absolute;
    top: 7px;
    height: 1.85rem;
    border-radius: 5px;
    font-size: 0.72rem;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 0.35rem;
    cursor: grab;
    user-select: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 1px 2px rgba(15, 23, 42, 0.22);
    z-index: 4;
    white-space: nowrap;
    touch-action: none;
    transition: left .12s ease, width .12s ease, filter .12s ease;
}
.gantt-bar:hover { filter: brightness(1.1); }
.gantt-bar.dragging { opacity: 0.8; z-index: 20; cursor: grabbing; transition: none; }
.gantt-bar.dim { opacity: 0.22; }
.gantt-bar.is-done { opacity: 0.55; }
.gantt-bar.is-done .gantt-bar-label { text-decoration: line-through; }
.gantt-bar.st-todo        { background: #64748b; }
.gantt-bar.st-in_progress { background: #2563eb; }
.gantt-bar.st-on_hold     { background: #d97706; }
.gantt-bar.st-done        { background: #059669; }
.gantt-bar.st-cancelled   { background: #475569; }
.gantt-bar.is-cancelled   { opacity: 0.45; }
.gantt-bar.is-cancelled .gantt-bar-label { text-decoration: line-through; }
.gantt-bar-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    padding: 0 0.15rem;
}
.gantt-handle {
    flex: 0 0 7px;
    align-self: stretch;
    cursor: ew-resize;
    opacity: 0.35;
    transition: opacity .12s ease;
}
.gantt-bar:hover .gantt-handle { opacity: 0.95; }
.gantt-handle.gh-l { border-left: 2px solid rgba(255, 255, 255, 0.55); }
.gantt-handle.gh-r { border-right: 2px solid rgba(255, 255, 255, 0.55); }

.gantt-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    color: #fff;
    cursor: grab;
    user-select: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15);
}
.gantt-chip.st-todo        { background: #64748b; }
.gantt-chip.st-in_progress { background: #2563eb; }
.gantt-chip.st-on_hold     { background: #d97706; }
.gantt-chip.st-done        { background: #059669; }
.gantt-chip.st-cancelled   { background: #475569; opacity: 0.55; }
.gantt-chip.dragging { opacity: 0.5; }
.gantt-chip.dim { opacity: 0.3; }

/* Slim variants for per-task rows */
.gantt-lane-sm { min-height: 2.15rem; }
.gantt-bar-sm {
    top: 4px;
    height: 1.5rem;
    font-size: 0.68rem;
    border-radius: 4px;
}

/* Collapsible project groups */
.gantt-group.collapsed .task-row { display: none; }
.gantt-collapse i {
    display: inline-block;
    transition: transform 0.15s ease;
}
.gantt-group.collapsed .gantt-collapse i { transform: rotate(-90deg); }
