* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f1011; color: #e3e3e7;
  min-height: 100vh; display: flex; justify-content: center;
  padding: 16px 16px 60px;
}

/* Lucide icons */
.icon { width: 13px; height: 13px; stroke-width: 2; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.tb-btn .icon { width: 12px; height: 12px; }
.nav-btn .icon { width: 14px; height: 14px; opacity: .8; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.6); display: none; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal-box { background: #1c1d1f; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 24px; width: 340px; }
.modal-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; color: #e3e3e7; }
.modal-box input { width: 100%; padding: 10px 12px; font-size: 13px; border-radius: 7px; border: 1px solid rgba(255,255,255,.1); background: #0f1011; color: #e3e3e7; outline: none; margin-bottom: 10px; }
.modal-box input:focus { border-color: #6c7af5; }
.modal-buttons { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.modal-btn { padding: 7px 16px; font-size: 13px; border-radius: 7px; border: 1px solid rgba(255,255,255,.1); background: transparent; color: #888896; cursor: pointer; }
.modal-btn:hover { background: rgba(255,255,255,.05); color: #e3e3e7; }
.modal-btn.primary { background: #6c7af5; color: #fff; border-color: #6c7af5; }
.modal-btn.primary:hover { background: #5a68d4; }
.modal-error { color: #ef4444; font-size: 12px; min-height: 16px; margin-top: 8px; }
.modal-success { color: #34d399; font-size: 12px; margin-top: 8px; }

/* Login screen */
.login-screen { position: fixed; inset: 0; z-index: 9999; background: #0f1011; display: flex; align-items: center; justify-content: center; }
.login-box { width: 340px; text-align: center; }
.login-logo { font-size: 28px; font-weight: 700; letter-spacing: .04em; color: #e3e3e7; margin-bottom: 32px; }
.login-box form { display: flex; flex-direction: column; gap: 12px; }
.login-box input { padding: 10px 14px; font-size: 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); background: #1c1d1f; color: #e3e3e7; outline: none; }
.login-box input:focus { border-color: #6c7af5; }
.login-btn { padding: 10px; font-size: 14px; font-weight: 600; border: none; border-radius: 8px; background: #6c7af5; color: #fff; cursor: pointer; transition: .15s; }
.login-btn:hover { background: #5a68d4; }
.login-error { color: #ef4444; font-size: 13px; min-height: 18px; }
.app { width: 1600px; max-width: 100%; margin-top: 132px; }

/* Cards */
.card { background: #1c1d1f; border: 1px solid rgba(255,255,255,.07); border-radius: 10px; padding: 20px 24px; margin-bottom: 16px; box-shadow: 0 2px 12px rgba(0,0,0,.35); }
.card-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #888896; margin-bottom: 14px; }

/* Header */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(8,9,10,.98); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,.06); }

/* Topbar */
.topbar { height: 44px; display: flex; align-items: center; padding: 0 20px; gap: 12px; background: #0a0b0d; border-bottom: 1px solid rgba(255,255,255,.05); max-width: 1600px; margin: 0 auto; }
.brand { font-size: 13px; font-weight: 700; letter-spacing: .04em; color: #e3e3e7; white-space: nowrap; text-decoration: none; }
.topbar-spacer { flex: 1; }
.topbar select { background: #1c1d1f; color: #e3e3e7; border: 1px solid rgba(255,255,255,.1); border-radius: 6px; padding: 4px 8px; font-size: 12px; outline: none; }
.topbar select:focus { border-color: #6c7af5; }

/* Auth corner */
.auth-corner { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #888896; }
.auth-corner a { color: #888896; text-decoration: none; display: flex; align-items: center; padding: 4px; border-radius: 5px; transition: color .15s, background .15s; }
.auth-corner a:hover { color: #e3e3e7; background: rgba(255,255,255,.06); }
.auth-corner .username { color: #e3e3e7; font-weight: 600; font-size: 12px; padding: 4px 10px; background: rgba(108,122,245,.12); border-radius: 6px; display: flex; align-items: center; gap: 5px; }
.auth-corner .username .icon { width: 12px; height: 12px; opacity: .6; }
.topbar-sep { width: 1px; height: 18px; background: rgba(255,255,255,.1); flex-shrink: 0; }

/* Navbar */
.navbar { height: 40px; display: flex; align-items: center; padding: 0 20px; gap: 2px; background: #111214; max-width: 1600px; margin: 0 auto; }
.nav-btn { padding: 6px 14px; font-size: 12px; font-weight: 500; color: #888896; background: none; border: none; border-radius: 6px; cursor: pointer; transition: .15s; white-space: nowrap; }
.nav-btn:hover { color: #e3e3e7; background: rgba(255,255,255,.06); }
.nav-btn.active { color: #e3e3e7; background: rgba(108,122,245,.15); }

/* Toolbar */
.toolbar-bar { min-height: 44px; display: flex; align-items: center; padding: 0 20px; gap: 12px; background: #0f1011; border-top: 1px solid rgba(255,255,255,.04); max-width: 1600px; margin: 0 auto; flex-wrap: wrap; }
.toolbar-bar:empty { display: none; }
.tb-btn { padding: 5px 12px; font-size: 11px; font-weight: 500; color: #888896; background: none; border: 1px solid rgba(255,255,255,.08); border-radius: 6px; cursor: pointer; transition: .15s; white-space: nowrap; }
.tb-btn:hover { color: #e3e3e7; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.04); }
.tb-btn.accent { border-color: rgba(108,122,245,.4); color: #6c7af5; }
.tb-btn.accent:hover { background: rgba(108,122,245,.1); }
.tb-btn.danger { border-color: rgba(239,68,68,.3); color: #ef4444; }
.tb-btn:disabled { opacity: .3; cursor: default; pointer-events: none; }
.tb-btn.flash { animation: tb-flash .45s ease; }
@keyframes tb-flash {
  0% { transform: scale(1); }
  20% { transform: scale(1.3); }
  40% { transform: scale(.9); }
  60% { transform: scale(1.15); }
  80% { transform: scale(.95); }
  100% { transform: scale(1); }
}
.toolbar-spacer { flex: 1; }
.tb-group { display: flex; align-items: center; gap: 6px; }
.tb-sep { width: 1px; height: 20px; background: rgba(255,255,255,.1); flex-shrink: 0; }
.toolbar-bar select { font-size: 11px; padding: 4px 8px; background: transparent; color: #888896; border: 1px solid rgba(255,255,255,.08); border-radius: 6px; cursor: pointer; outline: none; }
.toolbar-bar select:focus { border-color: rgba(108,122,245,.4); }
.toolbar-bar .search-wrap input { font-size: 11px; padding: 4px 8px; }
#proj-active-filter { width: 100px; }
#proj-tag-filter { width: 100px; }
#proj-preset-select { width: 110px; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 8px 12px; color: #888896; font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid rgba(255,255,255,.08); }
td { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,.04); }
tr:hover { background: rgba(255,255,255,.02); }

/* Inputs */
input, select, textarea { background: #252628; color: #e3e3e7; border: 1px solid rgba(255,255,255,.1); border-radius: 6px; padding: 6px 10px; font-size: 13px; outline: none; font-family: inherit; }
input:focus, select:focus, textarea:focus { border-color: #6c7af5; box-shadow: 0 0 0 2px rgba(108,122,245,.15); }
textarea { resize: vertical; min-height: 60px; }

/* Buttons */
.btn { padding: 6px 16px; font-size: 13px; font-weight: 500; border-radius: 6px; cursor: pointer; border: none; transition: .15s; }
.btn-primary { background: #6c7af5; color: #fff; }
.btn-primary:hover { background: #5a68e0; }
.btn-outline { background: none; border: 1px solid rgba(255,255,255,.12); color: #e3e3e7; }
.btn-outline:hover { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.04); }
.btn-danger { background: #ef4444; color: #fff; }
.btn-sm { font-size: 11px; padding: 4px 10px; }

/* Badge */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.badge-toggle { cursor: pointer; user-select: none; transition: opacity .15s; }
.badge-toggle:hover { opacity: .8; }
.badge-active { background: rgba(52,211,153,.12); color: #34d399; }
.badge-inactive { background: rgba(239,68,68,.12); color: #ef4444; }

/* Role dots */
.role-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.role-dot.analyst { background: #f59e0b; }
.role-dot.frontend { background: #a78bfa; }
.role-dot.backend { background: #3b82f6; }
.role-dot.tester { background: #34d399; }
.role-dot.designer { background: #ec4899; }
.role-dot.architect { background: #eab308; }
.role-dot.manager { background: #ef4444; }
.role-dot.devops { background: #06b6d4; }

/* Filters row */
.filters { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.filters input, .filters select { font-size: 12px; padding: 5px 8px; }

/* Search with clear button */
.search-wrap { position: relative; display: flex; align-items: center; }
.search-wrap input { padding-right: 24px; }
.search-clear {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #888896; font-size: 16px; cursor: pointer;
  line-height: 1; padding: 0 4px; opacity: 0; transition: opacity .15s;
}
.search-wrap input:not(:placeholder-shown) + .search-clear { opacity: 1; }
.search-clear:hover { color: #e3e3e7; }

/* Toggle switch */
.toggle-cell { padding: 8px 4px !important; text-align: center; cursor: pointer; }
.toggle-switch { width: 32px; height: 18px; border-radius: 9px; background: rgba(255,255,255,.1); position: relative; display: inline-block; transition: background .2s; }
.toggle-switch.on { background: #34d399; }
.toggle-knob { width: 14px; height: 14px; border-radius: 50%; background: #fff; position: absolute; top: 2px; left: 2px; transition: left .2s; }
.toggle-switch.on .toggle-knob { left: 16px; }
tr.proj-row-off { opacity: .5; }

/* Planning settings dialog */
.planning-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.planning-setting-row:last-of-type { border-bottom: none; }
.planning-setting-info { flex: 1; }
.planning-setting-label { font-size: 13px; color: #e0e0ea; font-weight: 500; }
.planning-setting-desc { font-size: 11px; color: #888; margin-top: 2px; }
/* Label-based toggle */
label.toggle-switch { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
label.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.12); border-radius: 10px; transition: background .2s; }
.toggle-slider::before { content: ""; position: absolute; height: 16px; width: 16px; left: 2px; bottom: 2px; background: #fff; border-radius: 50%; transition: transform .2s; }
label.toggle-switch input:checked + .toggle-slider { background: #34d399; }
label.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); }

/* Drag handle for project rows */
.drag-handle { cursor: grab; color: #4e4e5c; font-size: 14px; text-align: center; width: 28px; padding: 8px 4px !important; user-select: none; }
.drag-handle:hover { color: #888896; }
.drag-handle:active { cursor: grabbing; }
tr.dragging { opacity: .3; }
tr.drag-over-above { box-shadow: 0 2px 0 0 #6c7af5 inset; }
tr.drag-over-below { box-shadow: 0 -2px 0 0 #6c7af5 inset; }

/* Tag chips */
.tag-chip { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; margin-right: 3px; border: 1px solid; white-space: nowrap; }
.tag-cell { cursor: pointer; width: 150px; max-width: 150px; user-select: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tag-cell:hover { background: rgba(255,255,255,.04); border-radius: 4px; }

/* Tag picker popover */
.tag-picker { position: fixed; z-index: 9000; background: #1c1d1f; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; padding: 6px 0; min-width: 180px; max-height: 280px; overflow-y: auto; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.tag-picker.hidden { display: none; }
.tag-picker-item { display: flex; align-items: center; justify-content: space-between; padding: 2px 12px 2px 0; font-size: 12px; color: #e3e3e7; transition: background .1s; }
.tag-picker-item:hover { background: rgba(255,255,255,.06); }
.tag-picker-label { display: flex; align-items: center; gap: 8px; padding: 4px 0 4px 12px; cursor: pointer; flex: 1; min-width: 0; }
.tag-picker-label input[type="checkbox"] { accent-color: #6c7af5; width: 14px; height: 14px; cursor: pointer; }
.tag-picker-del { background: none; border: none; color: #4e4e5c; cursor: pointer; padding: 2px; display: flex; opacity: 0; transition: opacity .15s; }
.tag-picker-item:hover .tag-picker-del { opacity: 1; }
.tag-picker-del:hover { color: #ef4444; }
.tag-picker-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.tag-picker-create { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid rgba(255,255,255,.08); }
.tag-picker-create input[type="text"] { flex: 1; min-width: 0; font-size: 11px; padding: 4px 8px; border-radius: 5px; border: 1px solid rgba(255,255,255,.1); background: transparent; color: #e3e3e7; outline: none; }
.tag-picker-create input[type="text"]:focus { border-color: #6c7af5; }
.tag-picker-create input[type="color"] { width: 24px; height: 24px; padding: 0; border: 1px solid rgba(255,255,255,.1); border-radius: 4px; background: transparent; cursor: pointer; flex-shrink: 0; }
.tag-picker-create button { background: none; border: 1px solid rgba(108,122,245,.3); color: #6c7af5; border-radius: 5px; padding: 3px 6px; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; }
.tag-picker-create button:hover { background: rgba(108,122,245,.1); }

/* Tab content fade-in */
#tab-projects > .card { transition: opacity .15s; }

/* Guard overlay */
.dept-guard { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 400px; color: #888896; font-size: 15px; gap: 16px; }
.dept-guard select { font-size: 14px; padding: 8px 16px; }

/* Roadmap */
.roadmap-svg-container { overflow-x: auto; border-radius: 8px; background: #fff; border: 1px solid rgba(0,0,0,.1); padding: 0; }
.roadmap-svg-container svg { display: block; max-width: none; }

.member-filter-dropdown {
  position: absolute; top: 100%; left: 0; z-index: 200; margin-top: 4px;
  background: #232428; border: 1px solid rgba(255,255,255,.13); border-radius: 8px;
  padding: 8px 10px; min-width: 200px; max-height: 300px; overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
.member-filter-dropdown.hidden { display: none; }
.member-filter-item { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 12px; color: #b0b0be; cursor: pointer; }
.member-filter-item:hover { color: #e3e3e7; }
.member-filter-item input { accent-color: #6c7af5; cursor: pointer; }
.member-filter-item .mf-role { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Task table */
.task-table-wrap { overflow-x: auto; }
.task-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.task-table th { text-align: left; padding: 7px 8px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #6e6e82; border-bottom: 1px solid rgba(255,255,255,.07); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-table td { padding: 7px 8px; border-bottom: 1px solid rgba(255,255,255,.05); vertical-align: top; color: #e8e8f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-table tr:hover td { background: rgba(255,255,255,.04); }
.task-table tr[style*="opacity"] { transition: opacity .15s; }
.task-num { color: #6c7af5; font-size: 12px; white-space: nowrap; }
.task-name { color: #f0f0f6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Status badges */
.status-badge { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.status-open { background: rgba(99,179,237,.13); color: #7ec8f8; }
.status-done { background: rgba(52,211,153,.12); color: #34d399; }
.status-closed { background: rgba(255,255,255,.07); color: #6e6e82; }
.status-inprogress { background: rgba(251,191,36,.12); color: #fbbf24; }
.est { color: #c0c0d8; white-space: nowrap; font-size: 12px; }

/* Toggle switch */
.toggle-sw { position: relative; display: inline-block; width: 34px; height: 19px; vertical-align: middle; }
.toggle-sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-sw .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #3a3a4a; border-radius: 9px; transition: background .2s; }
.toggle-sw .slider:before { position: absolute; content: ""; height: 13px; width: 13px; left: 3px; bottom: 3px; background: #5a5a6a; border-radius: 50%; transition: transform .2s, background .2s; }
.toggle-sw input:checked + .slider { background: #6c7af5; }
.toggle-sw input:checked + .slider:before { background: #fff; transform: translateX(15px); }

/* Task project button */
.task-project-btn { background: none; border: 1px solid rgba(255,255,255,.08); color: #4e4e5c; border-radius: 4px; padding: 1px 6px; font-size: 10px; cursor: pointer; transition: all .12s; white-space: nowrap; max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.task-project-btn:hover { border-color: #6c7af5; color: #6c7af5; }
.task-project-btn.has-project { color: #6c7af5; border-color: rgba(108,122,245,.3); }

/* Project picker dropdown */
.project-picker { position: absolute; z-index: 200; background: #232428; border: 1px solid rgba(255,255,255,.13); border-radius: 6px; padding: 4px 0; min-width: 180px; max-height: 250px; overflow-y: auto; box-shadow: 0 4px 16px rgba(0,0,0,.5); }
.project-picker div { padding: 5px 12px; font-size: 12px; color: #b0b0be; cursor: pointer; white-space: nowrap; }
.project-picker div:hover { background: rgba(108,122,245,.12); color: #e3e3e7; }
.project-picker div.pp-none { color: #6e6e82; font-style: italic; }

/* Task selection bar */
.task-selection-bar { position: sticky; bottom: 12px; display: flex; align-items: center; gap: 10px; background: #232428; border: 1px solid rgba(108,122,245,.3); border-radius: 10px; padding: 10px 16px; box-shadow: 0 -4px 20px rgba(0,0,0,.5); margin-top: 12px; z-index: 50; }
.task-selection-bar .sel-count { font-size: 13px; color: #6c7af5; font-weight: 600; margin-right: 6px; }
.sel-action-btn { font-size: 12px !important; padding: 5px 12px !important; background: #1e2540 !important; border-color: rgba(108,122,245,.25) !important; }
.sel-action-btn:hover { border-color: #6c7af5 !important; }
.sel-cancel-btn { margin-left: auto; background: none !important; border: none !important; color: #6e6e82 !important; font-size: 16px !important; cursor: pointer; padding: 2px 6px !important; }
.sel-cancel-btn:hover { color: #e3e3e7 !important; }
.task-select-cb { cursor: pointer; accent-color: #6c7af5; }
#selectAllTasks { cursor: pointer; accent-color: #6c7af5; }
tr.task-selected { background: rgba(108,122,245,.08) !important; }

/* Task filters */
.task-filters { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.task-filters select, .task-filters input { font-size: 12px; padding: 5px 8px; }

/* Tag cards */
.tags-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tag-card {
  background: #1c1d1f; border: 1px solid rgba(255,255,255,.07); border-radius: 10px;
  padding: 0; cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s;
  overflow: hidden; position: relative;
}
.tag-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.15); box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.tag-card.selected { border-color: rgba(108,122,245,.5); box-shadow: 0 0 0 2px rgba(108,122,245,.2); }
.tag-card-stripe { height: 4px; width: 100%; }
.tag-card-body { padding: 12px 14px; }
.tag-card-name { font-size: 14px; font-weight: 600; color: #e3e3e7; margin-bottom: 4px; }
.tag-card-count { font-size: 11px; color: #5e5e6e; }
.tag-card-actions {
  position: absolute; top: 8px; right: 8px; display: flex; gap: 2px;
  opacity: 0; transition: opacity .15s;
}
.tag-card:hover .tag-card-actions { opacity: 1; }
.tag-card-btn {
  width: 22px; height: 22px; border-radius: 6px; border: none;
  background: rgba(0,0,0,.5); color: #b0b0be; cursor: pointer;
  font-size: 12px; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); transition: background .12s, color .12s;
}
.tag-card-btn:hover { background: rgba(0,0,0,.7); color: #e3e3e7; }
.tag-card-btn.danger:hover { color: #ef4444; }

/* Sprint list & calendar */
.sprint-layout { display: flex; gap: 24px; }
.sprint-list-panel { width: 300px; flex-shrink: 0; }
.sprint-calendar-panel { flex: 1; min-width: 280px; }
.sprint-list { display: flex; flex-direction: column; gap: 2px; }
.sprint-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border-radius: 6px; cursor: pointer; transition: background .15s;
  border: 1px solid transparent;
}
.sprint-item:hover { background: rgba(255,255,255,.04); }
.sprint-item.selected { background: rgba(108,122,245,.1); border-color: rgba(108,122,245,.25); }
.sprint-item-info { flex: 1; min-width: 0; }
.sprint-item-name { color: #e3e3e7; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sprint-item-dates { font-size: 11px; color: #5e5e6e; }
.sprint-item-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.sprint-item:hover .sprint-item-actions { opacity: 1; }
.sprint-item-btn { background: none; border: none; color: #888896; cursor: pointer; font-size: 12px; padding: 2px 4px; border-radius: 4px; }
.sprint-item-btn:hover { color: #e3e3e7; background: rgba(255,255,255,.06); }
.sprint-item-btn.danger:hover { color: #ef4444; background: rgba(239,68,68,.1); }
.sprint-active-badge { font-size: 9px; padding: 1px 6px; border-radius: 8px; font-weight: 600; }
.sprint-active-badge.on { background: rgba(52,211,153,.12); color: #34d399; }
.sprint-active-badge.off { background: rgba(239,68,68,.12); color: #ef4444; }

.sprint-cal-header { font-size: 14px; font-weight: 600; color: #e3e3e7; margin-bottom: 4px; }
.sprint-cal-sub { font-size: 11px; color: #6e6e82; margin-bottom: 16px; }
.sprint-cal-month { font-size: 12px; font-weight: 600; color: #8b9dff; margin: 12px 0 6px; }
.sprint-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 8px; }
.sprint-cal-weekday { font-size: 10px; color: #4e4e5c; text-align: center; padding: 2px 0; font-weight: 600; }
.sprint-cal-day {
  font-size: 11px; text-align: center; padding: 4px 0; border-radius: 4px;
  color: #4e4e5c; transition: background .1s;
}
.sprint-cal-day.in-sprint { background: rgba(108,122,245,.15); color: #b0b8ff; }
.sprint-cal-day.today { outline: 2px solid #6c7af5; outline-offset: -2px; color: #e3e3e7; font-weight: 700; }
.sprint-cal-day.weekend { opacity: .6; }
.sprint-cal-day.in-sprint.weekend { opacity: .8; }

.sprint-editor { padding: 16px; }
.sprint-editor label { display: block; font-size: 11px; color: #888896; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; margin-top: 10px; }
.sprint-editor input { width: 100%; }
.sprint-editor-actions { display: flex; gap: 8px; margin-top: 16px; }

/* Resource calendar */
.resource-table { border-collapse: collapse; width: max-content; font-size: 12px; }
.resource-table th, .resource-table td { border: 1px solid rgba(255,255,255,.07); height: 34px; max-height: 34px; min-width: 36px; text-align: center; padding: 0; overflow: hidden; }
.res-col-name { position: sticky; left: 0; z-index: 2; background: #1c1d1f; text-align: left !important; padding: 0 12px !important; min-width: 170px; white-space: nowrap; color: #e8e8f0; font-weight: 500; }
thead .res-col-name { background: #111214; color: #6e6e82; font-weight: 600; font-size: 11px; }
.res-head-row th { background: #111214; color: #6e6e82; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.res-head-row .res-weekend { color: #3e3e52; }
.res-head-row .res-today-col { color: #6c7af5; font-weight: 700; }
.res-day { cursor: pointer; transition: background .1s; line-height: 34px; }
.res-day:hover { background: rgba(255,255,255,.07) !important; }
.res-weekend { background: rgba(0,0,0,.18); }
.res-today-col { background: rgba(108,122,245,.09); }
.res-day.type-vacation { background: rgba(251,146,60,.2) !important; }
.res-day.type-vacation::after { content: '🏖'; font-size: 14px; line-height: 34px; display: block; height: 34px; }
.res-day.type-holiday { background: rgba(239,68,68,.15) !important; }
.res-day.type-holiday::after { content: '⛳'; font-size: 13px; line-height: 34px; display: block; height: 34px; }
.res-day.type-workday { background: rgba(76,175,80,.18) !important; }
.res-day.type-workday::after { content: '✓'; font-size: 13px; line-height: 34px; display: block; height: 34px; color: rgba(76,175,80,.7); }

/* Resource capacity table */
#resourceSummary { overflow-x: auto; }
.res-cap-table { border-collapse: collapse; font-size: 12px; width: 100%; }
.res-cap-table th, .res-cap-table td { border-bottom: 1px solid rgba(255,255,255,.06); padding: 0; vertical-align: middle; height: 34px; }
.res-cap-table thead th { border-bottom: 2px solid rgba(108,122,245,.25); }
.res-cap-name-col { text-align: left; padding: 0 12px; white-space: nowrap; font-weight: 500; color: #c0c0d0; font-size: 12px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.res-cap-sprint-th { text-align: center; padding: 6px 16px; background: #111214; white-space: nowrap; }
.res-cap-sprint-name { font-size: 11px; font-weight: 700; color: #8b9dff; }
.res-cap-sprint-dates { font-size: 10px; color: #444; }
.res-cap-cell { text-align: center; padding: 0; width: 70px; }
.res-cap-pct { display: block; width: 100%; background: none; border: none; color: #c0c0d0; font-size: 12px; text-align: center; padding: 8px 0; outline: none; -moz-appearance: textfield; }
.res-cap-pct::-webkit-inner-spin-button, .res-cap-pct::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.res-cap-pct:focus { background: rgba(108,122,245,.08); color: #e8e8f0; }
.res-cap-table tbody tr:hover td { background: rgba(255,255,255,.02); }
.res-cap-table tbody tr.res-cap-inactive td { opacity: .35; }
.res-cap-kpd-row td { border-top: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.02) !important; }
.res-cap-kpd-row .res-cap-name-col { color: #6e6e82; font-size: 11px; font-weight: 600; }
.res-cap-total-row td { background: #111214 !important; border-top: 2px solid rgba(108,122,245,.25); border-bottom: none; height: 40px; }
.res-cap-total-row .res-cap-name-col { font-weight: 700; color: #8b9dff; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.res-cap-total-hours { font-size: 13px; font-weight: 700; color: #c4caff; }

/* Resource view switcher */
.res-view-btns { display: flex; gap: 4px; margin-bottom: 12px; }
.res-view-btn { padding: 5px 12px; font-size: 11px; font-weight: 500; color: #888896; background: none; border: 1px solid rgba(255,255,255,.08); border-radius: 6px; cursor: pointer; }
.res-view-btn:hover { color: #e3e3e7; border-color: rgba(255,255,255,.18); }
.res-view-btn.active { color: #e3e3e7; background: rgba(108,122,245,.15); border-color: rgba(108,122,245,.3); }

/* Pipeline visual flow */
.pipe-flow {
  display: flex; align-items: flex-start; gap: 0; overflow-x: auto;
  padding: 20px 12px; background: #1c1d1f; border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px; min-height: 140px; position: relative;
}
.pipe-group {
  display: flex; flex-direction: column; gap: 6px; align-items: center; min-width: 130px;
  padding: 6px 4px; border-radius: 8px; transition: background .12s, outline-color .12s;
}
.pipe-group.drag-over { background: rgba(52,211,153,.06); outline: 2px dashed #34d399; outline-offset: 2px; }
.pipe-group-label { font-size: 10px; font-weight: 700; color: #4e4e5c; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.pipe-spacer {
  width: 48px; min-width: 48px; min-height: 120px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  align-self: stretch; position: relative; z-index: 2;
  border-radius: 10px; border: 2px dashed transparent;
  transition: border-color .15s, background .15s;
}
.pipe-spacer.drag-over { border-color: #34d399; background: rgba(52,211,153,.08); }
.pipe-spacer-icon { color: #3a3a4a; font-size: 18px; transition: color .15s, transform .15s; }
.pipe-spacer.drag-over .pipe-spacer-icon { color: #34d399; transform: scale(1.05); }

.pipe-connections-svg { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 1; }
.pipe-bezier { fill: none; stroke: #3a3a4a; stroke-width: 1.5; stroke-linecap: round; transition: stroke .2s, stroke-width .2s; }
.pipe-bezier.highlight { stroke: #34d399; stroke-width: 2; filter: drop-shadow(0 0 4px rgba(52,211,153,.4)); }
.pipe-port { fill: #3a3a4a; transition: fill .2s; }
.pipe-port.highlight { fill: #34d399; }

.pipe-drop-zone {
  width: 28px; min-width: 28px; min-height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 2px dashed transparent; border-radius: 8px;
  transition: border-color .15s, background .15s; align-self: flex-start;
}
.pipe-drop-zone.drag-over { border-color: #34d399; background: rgba(52,211,153,.08); }
.pipe-drop-zone .dz-icon { color: #3a3a4a; transition: color .15s; display: flex; font-size: 18px; }
.pipe-drop-zone.drag-over .dz-icon { color: #34d399; }

.spinner-inline {
  display: inline-block; width: 12px; height: 12px;
  border: 2px solid rgba(167,139,250,.3); border-top-color: #a78bfa;
  border-radius: 50%; animation: spin .6s linear infinite; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes cardAppear {
  0% { opacity: 0; transform: scale(.85) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes cardLand {
  0% { box-shadow: 0 0 0 3px rgba(108,122,245,.5); }
  100% { box-shadow: 0 0 0 0px rgba(108,122,245,0); }
}
.pipe-card {
  width: 120px; padding: 10px;
  background: #232428; border: 1px solid rgba(255,255,255,.09); border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  position: relative; transition: border-color .12s, opacity .12s;
  cursor: grab; user-select: none;
}
.pipe-card.anim-in { animation: cardAppear .3s ease-out, cardLand .5s ease-out .3s; }
.pipe-card:hover { border-color: rgba(255,255,255,.18); }
.pipe-card.dragging { opacity: 0.35; border: 1px dashed #6c7af5; }
.pipe-card-icon { font-size: 22px; line-height: 1; }
.pipe-card-role { font-size: 10px; font-weight: 600; color: #b0b0be; text-align: center; }
.pipe-card-hours {
  display: flex; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; color: #6e6e82; width: 100%;
}
.pipe-card-hours input {
  width: 36px; background: #1c1d1f; border: 1px solid rgba(255,255,255,.11);
  color: #e3e3e7; font-size: 12px; text-align: center; border-radius: 4px; padding: 3px 2px;
  outline: none; font-family: inherit;
}
.pipe-card-hours input:focus { border-color: #6c7af5; }
.pipe-card-hours .time-lbl { font-size: 9px; color: #4e4e5c; }
.pipe-card-member { width: 100%; padding: 0 2px; }
.pipe-card-member select {
  width: 100%; background: #1c1d1f; border: 1px solid rgba(255,255,255,.11);
  color: #b0b0be; font-size: 10px; border-radius: 4px; padding: 3px 4px;
  outline: none; cursor: pointer; font-family: inherit;
}
.pipe-card-member select:focus { border-color: #6c7af5; }
.pipe-card-del {
  position: absolute; top: 2px; right: 4px; background: none; border: none;
  color: #f87171; cursor: pointer; font-size: 13px; opacity: 0;
  transition: opacity .15s; padding: 2px 4px; border-radius: 4px; line-height: 1;
}
.pipe-card-dup {
  position: absolute; top: 2px; left: 4px; background: none; border: none;
  color: #34d399; cursor: pointer; font-size: 13px; opacity: 0;
  transition: opacity .15s; padding: 2px 4px; border-radius: 4px; line-height: 1;
}
.pipe-card:hover .pipe-card-del, .pipe-card:hover .pipe-card-dup { opacity: .7; }
.pipe-card-del:hover { opacity: 1 !important; background: rgba(248,113,113,.1); }
.pipe-card-dup:hover { opacity: 1 !important; background: rgba(52,211,153,.1); }

/* Pipeline step toggle */
.pipe-toggle {
  position: relative; display: inline-block; width: 28px; height: 14px; cursor: pointer;
}
.pipe-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.pipe-toggle-slider {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: #3a3b40; border-radius: 7px; transition: background .2s;
}
.pipe-toggle-slider::before {
  content: ""; position: absolute; width: 10px; height: 10px;
  left: 2px; bottom: 2px; background: #888; border-radius: 50%; transition: transform .2s, background .2s;
}
.pipe-toggle input:checked + .pipe-toggle-slider { background: rgba(108,122,245,.3); }
.pipe-toggle input:checked + .pipe-toggle-slider::before { transform: translateX(14px); background: #6c7af5; }

.pipe-role-palette {
  display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap;
  padding: 10px 12px; background: #1a1b1d; border: 1px solid rgba(255,255,255,.05); border-radius: 8px;
}
.pipe-role-palette-title { font-size: 10px; font-weight: 700; color: #4e4e5c; text-transform: uppercase; letter-spacing: .05em; width: 100%; margin-bottom: 2px; }
.pipe-role-chip {
  display: flex; align-items: center; gap: 4px;
  padding: 5px 10px; background: #232428; border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px; color: #b0b0be; font-size: 11px;
  cursor: grab; user-select: none; transition: all .12s;
}
.pipe-role-chip:hover { border-color: #6c7af5; color: #e3e3e7; background: #1e2540; }
.pipe-role-chip .chip-dot { width: 8px; height: 8px; border-radius: 50%; }

.pipe-summary { display: flex; gap: 10px; font-size: 11px; }
.pipe-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: rgba(108,122,245,.08); border-radius: 10px; color: #b0b0be; }
.pipe-badge .badge-label { color: #6e6e82; }
.pipe-badge strong { color: #e3e3e7; }

/* Project editor */
.proj-ed-field { margin-bottom: 12px; }
.proj-ed-field label { display: block; font-size: 11px; color: #888896; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: rgba(108,122,245,.06); }

/* Hidden */
.hidden { display: none !important; }

/* Add form row */
.add-row { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.add-row input, .add-row select { flex: 1; }
