/* ============================================================
   PMS Module — Shared Stylesheet
   Design System replicated from inventory/styles.css
   Palette : #F7F9FC (canvas) / #FFFFFF (cards) / #1C2A42 (navy/sidebar)
             #4C5E80 (muted navy) / #E3E8F0 (hairline) / #2F6F5E (positive)
             #B5482D (warning/clay) / #C9A227 (amber/pending)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root{
  --bg:            #F7F9FC;
  --card:          #FFFFFF;
  --navy:          #1C2A42;
  --navy-soft:     #26375A;
  --navy-muted:    #4C5E80;
  --line:          #E3E8F0;
  --line-strong:   #D3DAE6;
  --text:          #1C2A42;
  --text-muted:    #66748F;
  --accent:        #2F6F5E;
  --accent-soft:   #E3F0EC;
  --warn:          #B5482D;
  --warn-soft:     #F7E7E1;
  --pending:       #C9A227;
  --pending-soft:  #FBF2DA;
  --info:          #2F5D8A;
  --info-soft:     #E5EEF7;
  --radius-sm:     6px;
  --radius-md:     10px;
  --sidebar-w:     248px;
  --header-h:      64px;
  --shadow-card:   0 1px 2px rgba(28,42,66,.04), 0 1px 12px rgba(28,42,66,.05);
}

*,*::before,*::after{ box-sizing:border-box; }
html,body{ height:100%; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:'Space Grotesk', system-ui, sans-serif;
  -webkit-font-smoothing:antialiased;
  font-size:14px;
}
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
button{ font-family:inherit; cursor:pointer; }
svg.icon{ width:18px; height:18px; stroke-width:1.75; flex-shrink:0; }

/* ---------- App shell ---------- */
#app{
  display:flex;
  min-height:100vh;
}

/* ---------- Main column ---------- */
.main{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  height: 100vh;
  overflow: hidden;
}

/* ---------- Sidebar ---------- */
#sidebar{
  width:var(--sidebar-w);
  flex-shrink:0;
  background:var(--navy);
  color:#CBD5E6;
  display:flex;
  flex-direction:column;
  position:sticky;
  top:0;
  height:100vh;
  z-index:20;
  overflow-y:auto;
}
.sidebar-header{
  padding:20px 22px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: linear-gradient(145deg, #2F6F5E, #1C4B3E);
  padding: 4px;
}
.brand-text{ display:flex; flex-direction:column; line-height:1.15; }
.brand-text h2{ font-weight:600; font-size:0.95rem; letter-spacing:.2px; color:#F2F5F9; line-height:1.15; }
.brand-subtitle{ font-size:0.68rem; color:#8DA0BE; opacity:1; font-family:'IBM Plex Mono',monospace; font-weight:400; letter-spacing:.5px; text-transform:uppercase; margin-top:2px; }

.side-scroll{
  padding:14px 12px 20px;
}
.nav-eyebrow{
  font-family:'IBM Plex Mono',monospace;
  font-size:10px;
  letter-spacing:1.2px;
  text-transform:uppercase;
  color:#5D6E8C;
  padding:14px 12px 8px;
}
.nav-item{
  position:relative;
}
.nav-link{
  display:flex;
  align-items:center;
  gap:11px;
  padding:10px 12px;
  border-radius:8px;
  color:#B9C6DD;
  font-size:13.5px;
  font-weight:500;
  transition:background .15s ease, color .15s ease;
  margin-bottom:2px;
  cursor:pointer;
  text-decoration:none;
}
.nav-link svg{ color:#7C8FB0; transition:color .15s ease; }
.nav-link:hover{ background:rgba(255,255,255,.06); color:#F2F5F9; }
.nav-link:hover svg{ color:#CBD5E6; }
.nav-item.active > .nav-link{
  background:rgba(47,111,94,.22);
  color:#EAF4F0;
}
.nav-item.active > .nav-link svg{ color:#5FAE97; }
.nav-item.active > .nav-link::before{
  content:"";
  position:absolute;
  left:-12px; top:6px; bottom:6px;
  width:3px;
  border-radius:2px;
  background:#5FAE97;
}
.nav-count{
  margin-left:auto;
  font-family:'IBM Plex Mono',monospace;
  font-size:10.5px;
  background:rgba(255,255,255,.08);
  color:#A9B9D3;
  padding:1px 6px;
  border-radius:20px;
}
.nav-item.active .nav-count{ background:rgba(95,174,151,.25); color:#D6EFE6; }

.nav-caret{ margin-left:auto; color:#7C8FB0; transition:transform .18s ease; }
.nav-item.expanded .nav-caret{ transform:rotate(90deg); }
.nav-sub{
  max-height:0;
  overflow:hidden;
  transition:max-height .25s ease;
  padding-left:30px;
}
.nav-item.expanded .nav-sub{ max-height:200px; }
.nav-sub .nav-link{ font-size:12.5px; padding:8px 12px; gap:9px; }
.nav-sub .nav-link svg{ width:14px; height:14px; }

.side-footer{
  padding:14px 20px 18px;
  border-top:1px solid rgba(255,255,255,.08);
  font-family:'IBM Plex Mono',monospace;
  font-size:10.5px;
  color:#5D6E8C;
  display:flex;
  justify-content:space-between;
}

.sidebar-spacer{
  flex:1;
}

/* ---------- User Profile ---------- */
.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 8px;
  flex-wrap: wrap;
}
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, #FFD700, #FF8C00);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #F2F5F9;
  line-height: 1.2;
}
.user-role {
  font-size: 0.65rem;
  color: #8DA0BE;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'IBM Plex Mono', monospace;
  margin-top: 1px;
}
.logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  margin-top: 8px;
  justify-content: center;
}
.logout-btn:hover {
  background: #334155;
  color: #ffffff;
  border-color: #B5482D;
}
.logout-btn svg { flex-shrink: 0; }

/* ---------- Header ---------- */
#header{
  height:var(--header-h);
  background:linear-gradient(135deg, #1C2A42 0%, #2F6F5E 50%, #2F5D8A 100%);
  border-bottom:1px solid rgba(255,255,255,.08);
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  padding:0 24px;
  position:sticky;
  top:0;
  z-index:10;
  gap:20px;
  box-shadow:0 2px 16px rgba(28,42,66,.15);
}
.header-left{ display:flex; align-items:center; gap:18px; min-width:0; justify-self:start; }
.page-title{
  font-size:17px;
  font-weight:600;
  letter-spacing:.1px;
  white-space:nowrap;
  color:#FFFFFF;
}
.page-crumb{
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  color:rgba(255,255,255,.65);
  white-space:nowrap;
}
.header-mid{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  color:rgba(255,255,255,.7);
  font-family:'IBM Plex Mono',monospace;
  font-size:12px;
  justify-self:center;
}
.chip{
  display:flex;
  align-items:center;
  gap:7px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.15);
  padding:6px 11px;
  border-radius:20px;
  white-space:nowrap;
}
.chip svg{ width:14px; height:14px; color:rgba(255,255,255,.5); }
.chip strong{ color:#FFFFFF; font-weight:600; }

.header-right{
  display:flex;
  align-items:center;
  gap:14px;
  flex-shrink:0;
  justify-self:end;
}
.icon-btn{
  position:relative;
  width:36px; height:36px;
  border-radius:9px;
  border:1px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.1);
  display:flex; align-items:center; justify-content:center;
  color:rgba(255,255,255,.75);
  transition:background .15s;
}
.icon-btn:hover{ background:rgba(255,255,255,.2); color:#FFFFFF; }
.icon-btn .dot{
  position:absolute; top:6px; right:6px;
  width:7px; height:7px; border-radius:50%;
  background:#FF6B6B;
  border:1.5px solid transparent;
}
.avatar{
  width:36px; height:36px;
  border-radius:50%;
  background:linear-gradient(145deg,#FFD700,#FF8C00);
  color:#1C2A42;
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:13px;
  font-family:'IBM Plex Mono',monospace;
  cursor:pointer;
}

/* ---------- Weather Chip ---------- */
.weather-chip-enhanced {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  padding: 7px 16px 7px 14px;
  border-radius: 24px;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.2px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  cursor: default;
}
.weather-chip-enhanced:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.12) 100%);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}
.weather-left { display: flex; align-items: center; gap: 6px; }
.weather-left strong { color: #ffffff; font-weight: 600; font-size: 0.85rem; }
.weather-divider { width: 1px; height: 22px; background: rgba(255, 255, 255, 0.2); flex-shrink: 0; }
.weather-right { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1.2; }
.weather-location { font-size: 0.68rem; color: rgba(255, 255, 255, 0.7); font-family: 'Space Grotesk', sans-serif; font-weight: 500; letter-spacing: 0.3px; }
.weather-humidity { display: flex; align-items: center; gap: 3px; font-size: 0.68rem; color: rgba(255, 255, 255, 0.8); font-family: 'IBM Plex Mono', monospace; }
.humidity-icon { width: 11px; height: 11px; stroke-width: 2; flex-shrink: 0; color: rgba(255, 255, 255, 0.6); }
.weather-chip-enhanced .weather-icon { width: 18px; height: 18px; stroke-width: 2; flex-shrink: 0; color: #FFD700; filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.3)); }

/* ---------- Nav Capsule ---------- */
.nav-capsule-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  margin: 10px auto 6px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.nav-capsule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 40px;
  box-shadow: 0 2px 8px rgba(28, 42, 66, 0.06);
}
.nav-capsule-btn {
  padding: 7px 26px;
  border-radius: 28px;
  text-decoration: none;
  white-space: nowrap;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  background: transparent;
  border: 1.5px solid transparent;
  transition: all 0.25s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.nav-capsule-btn:hover {
  color: var(--text);
  background: var(--bg);
  border-color: var(--line);
}
.nav-capsule-btn.active {
  color: #ffffff;
  background: #259E8A;
  border-color: #259E8A;
  box-shadow: 0 2px 10px rgba(37, 158, 138, 0.35);
  font-weight: 600;
}

/* ---------- Content Panel ---------- */
.content-panel {
  flex: 1;
  padding: 26px 28px 60px;
  overflow-y: auto;
  min-height: 0;
}

/* ---------- Content Header ---------- */
.content-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.content-head h1 {
  margin: 0 0 4px;
  font-size: 21px;
  font-weight: 600;
}
.content-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

/* ---------- Utility ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--text);
  transition: background .15s, border-color .15s;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: var(--bg); }
.btn-primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #F3F6FA;
}
.btn-primary:hover { background: var(--navy-soft); }

/* ---------- Sheet table ---------- */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  gap: 14px;
  flex-wrap: wrap;
}
.panel-head h2 {
  font-size: 14.5px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-head h2 svg { width: 16px; height: 16px; color: var(--navy-muted); }

/* ============================================================
   Task List — Card Grid, Filter Bar, Pagination, Modal
   ============================================================ */

/* ---------- Filter Bar ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
  flex-wrap: wrap;
}
.filter-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.filter-select {
  padding: 6px 28px 6px 10px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2366748F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
}
.filter-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(47,111,94,0.15);
}
.filter-search {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  width: 200px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-search::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}
.filter-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(47,111,94,0.15);
}

/* ---------- Task Card Grid ---------- */
.task-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 18px;
}
@media (max-width: 1100px) {
  .task-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .task-grid { grid-template-columns: 1fr; }
}

/* ---------- Task Card ---------- */
.task-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-card);
}
.task-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(47,111,94,0.12);
  transform: translateY(-2px);
}
.task-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.task-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.task-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.task-card-meta-line {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}
.task-card-meta-line strong {
  color: var(--text);
  font-weight: 600;
}
.task-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}

/* ---------- Status Tag Badge ---------- */
.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-tag-planned {
  background: #E5EEF7;
  color: #2F5D8A;
}
.status-tag-progress {
  background: #E3F0EC;
  color: #2F6F5E;
}
.status-tag-completed {
  background: #E3F0EC;
  color: #1C4B3E;
}
.status-tag-pending {
  background: #FBF2DA;
  color: #C9A227;
}

/* ---------- Pagination Bar ---------- */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}
.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.pagination-btn:hover:not(:disabled) {
  background: var(--bg);
  border-color: var(--accent);
  color: var(--accent);
}
.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pagination-indicator {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
}

/* ============================================================
   Task Details Modal
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(28,42,66,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal-container {
  background: var(--card);
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(28,42,66,0.2);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
}
.modal-overlay.active .modal-container {
  transform: translateY(0) scale(1);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-header h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover {
  background: var(--bg);
  color: var(--text);
}
.modal-body {
  padding: 20px;
}
.modal-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.modal-detail-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  flex: 1;
}
.modal-detail-id {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.modal-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.modal-detail-meta-line {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.modal-detail-meta-line strong {
  color: var(--text);
  font-weight: 600;
}
.modal-detail-desc {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
}
.modal-detail-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.modal-detail-date strong {
  color: var(--text);
  font-weight: 600;
}
.modal-assignees {
  margin-bottom: 20px;
}
.modal-assignees h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 10px;
}
.assignee-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.assignee-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}
.assignee-pill:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.modal-actions .btn {
  padding: 9px 20px;
  font-size: 13px;
}

/* ============================================================
   Create WBS — Form Styles
   ============================================================ */

.form-card {
  max-width: 720px;
  margin: 0 auto;
}

.form-body {
  padding: 24px 28px;
}

.form-group {
  margin-bottom: 22px;
}

.form-group:last-of-type {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--warn);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text);
  background: var(--card);
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 111, 94, 0.12);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-textarea {
  resize: vertical;
  min-height: 56px;
  line-height: 1.5;
}

.char-counter {
  display: block;
  text-align: right;
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
  margin-top: 4px;
}

/* Select wrapper with dropdown arrow */
.select-wrapper {
  position: relative;
}

.select-wrapper select {
  width: 100%;
  padding: 10px 36px 10px 12px;
  font-size: 13px;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text);
  background: var(--card);
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.select-wrapper select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 111, 94, 0.12);
}

.select-wrapper .select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

/* 2-column row for date pickers */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Upload zone */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 16px;
  border: 2px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}

.upload-zone:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.upload-zone .upload-icon {
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  stroke-width: 1.5;
}

.upload-zone:hover .upload-icon {
  color: var(--accent);
}

.upload-zone .upload-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.upload-zone .upload-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Assignee bubbles (WBS form) */
.assignee-bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  min-height: 20px;
}

.assignee-empty-hint {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  opacity: 0.6;
}

.assignee-bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 10px;
  border-radius: 20px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  transition: background 0.15s;
}

.assignee-bubble:hover {
  background: #d0ebe4;
}

.assignee-bubble-name {
  white-space: nowrap;
}

.assignee-bubble-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}

.assignee-bubble-remove:hover {
  background: var(--warn);
}

/* Form action buttons — right-aligned */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  border: 1.5px solid var(--line-strong);
  background: var(--card);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-outline:hover {
  background: var(--bg);
  border-color: var(--navy-muted);
  color: var(--text);
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 22px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  border: 1.5px solid var(--navy);
  background: var(--navy);
  color: #F3F6FA;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-submit:hover {
  background: var(--navy-soft);
  border-color: var(--navy-soft);
}

/* ============================================================
   Kanban Board — Column Layout, Cards, WBS Detail Modal
   ============================================================ */

/* ---------- Board Layout ---------- */
.board-container {
  display: flex;
  gap: 20px;
  padding: 20px;
  overflow-x: auto;
  overflow-y: auto;
  min-height: 520px;
  flex: 1;
  align-items: flex-start;
}

.board-column {
  min-width: 360px;
  max-width: 420px;
  width: 380px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  max-height: 640px;
}

.board-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.board-column-header .count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
  padding: 0 6px;
}

/* Column color themes */
.board-column-planned {
  background: #E5EEF7;
}
.board-column-planned .board-column-header {
  color: #2F5D8A;
}
.board-column-planned .count-badge {
  background: #2F5D8A;
  color: #fff;
}

.board-column-progress {
  background: #E3F0EC;
}
.board-column-progress .board-column-header {
  color: #1C4B3E;
}
.board-column-progress .count-badge {
  background: #2F6F5E;
  color: #fff;
}

.board-column-completed {
  background: #D4EDDA;
}
.board-column-completed .board-column-header {
  color: #155724;
}
.board-column-completed .count-badge {
  background: #28A745;
  color: #fff;
}

.board-column-delinquent {
  background: #F8D7DA;
}
.board-column-delinquent .board-column-header {
  color: #721C24;
}
.board-column-delinquent .count-badge {
  background: #C82333;
  color: #fff;
}

/* ---------- Column Scroll Area ---------- */
.board-column-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.board-column-scroll::-webkit-scrollbar {
  width: 6px;
}
.board-column-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.board-column-scroll::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.12);
  border-radius: 4px;
}

/* ---------- WBS Card ---------- */
.board-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(28,42,66,0.06);
  flex-shrink: 0;
}

.board-card:hover {
  border-color: var(--accent);
  box-shadow: 0 3px 12px rgba(47,111,94,0.15);
  transform: translateY(-1px);
}

.board-card.draggable {
  cursor: grab;
}

.board-card.draggable:active {
  cursor: grabbing;
}

.board-card.dragging {
  opacity: 0.4;
  transform: scale(0.98);
}

.board-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.board-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.board-card-date {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
}

.board-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.board-column-scroll.drag-over {
  background: rgba(47,111,94,0.06);
  outline: 2px dashed var(--accent);
  outline-offset: -4px;
  border-radius: var(--radius-md);
}

.board-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.board-card-assignees {
  display: flex;
  align-items: center;
  gap: 3px;
}

.board-card-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--card);
  font-family: 'IBM Plex Mono', monospace;
}

.board-card-avatar-more {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 8px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--line);
  font-family: 'IBM Plex Mono', monospace;
}

/* ============================================================
   WBS Details Modal — Two-Column Layout
   ============================================================ */
.wbs-detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
  min-height: 400px;
}

.wbs-detail-left {
  padding: 20px;
  border-right: 1px solid var(--line);
  overflow-y: auto;
  max-height: 70vh;
}

.wbs-detail-right {
  padding: 20px;
  overflow-y: auto;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}

/* WBS Meta Panel */
.wbs-meta-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wbs-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #E3F0EC;
  color: #2F6F5E;
}

.wbs-meta-subtask {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 12px 0 4px;
}

.wbs-meta-subtask-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin: 10px 0 3px;
}

.wbs-meta-subtask-desc-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.wbs-meta-desc-block {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 12px;
}

.wbs-meta-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.wbs-meta-date strong {
  color: var(--text);
  font-weight: 600;
}

.wbs-meta-assignees {
  margin-bottom: 14px;
}

.wbs-meta-assignees-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.wbs-attachments {
  margin-bottom: 16px;
}

.wbs-attachments-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.wbs-attachments-box {
  padding: 12px 14px;
  background: #E5EEF7;
  border: 1px solid #C5D9F0;
  border-radius: 8px;
  font-size: 12px;
  color: #2F5D8A;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wbs-attachments-box svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Add Your Work Form */
.add-work-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 18px 0 2px;
}

.add-work-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.add-work-form .form-group {
  margin-bottom: 14px;
}

.add-work-form .form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.add-work-form .form-textarea {
  min-height: 70px;
  resize: vertical;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.add-work-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

/* ---------- Related Works Feed ---------- */
.works-feed-header {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.works-feed-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.works-feed-scroll::-webkit-scrollbar {
  width: 6px;
}

.works-feed-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.works-feed-scroll::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}

.work-feed-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.work-feed-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.work-feed-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.work-feed-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
}

.work-feed-meta strong {
  color: var(--text);
  font-weight: 600;
}

.work-feed-hours {
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 600;
  font-family: 'IBM Plex Mono', monospace;
}

/* ---------- Responsive ---------- */
@media (max-width:900px){
  :root{ --sidebar-w:220px; }
  .header-mid{ display:none; }
}

@media (max-width: 1024px) {
  .board-container {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .board-column {
    min-width: 300px;
    width: 320px;
  }
  .wbs-detail-grid {
    grid-template-columns: 1fr;
  }
  .wbs-detail-left {
    border-right: none;
    border-bottom: 1px solid var(--line);
    max-height: none;
  }
  .wbs-detail-right {
    max-height: 300px;
  }
}

@media (max-width:720px){
  #sidebar{ position:fixed; left:-260px; transition:left .2s ease; }
  #sidebar.open{ left:0; }
  .content-panel{ padding:18px; }
  #header{ padding:0 14px; }
  .board-container {
    padding: 12px;
    gap: 14px;
  }
  .board-column {
    min-width: 260px;
    width: 280px;
  }
}
