/* =====================================================================
   Takeoff – projects.css   (projects.html: the landing page)
   Requires base.css
   ===================================================================== */
.dlg .btn{height:32px}
.dlg .inp{height:32px}

.app{display:grid;grid-template-rows:52px 1fr;height:100vh}
/* Top bar */
.topbar{background:var(--chrome);color:var(--chrome-text);display:flex;align-items:center;gap:16px;padding:0 16px}
.logo{display:flex;align-items:center;gap:9px;font-weight:600;font-size:14px;width:216px}
.logo i{width:24px;height:24px;border-radius:6px;background:linear-gradient(135deg,#3b82f6,#8b5cf6);display:grid;place-items:center}
.logo i svg{width:14px;height:14px;stroke:#fff}
.search{flex:1;max-width:520px;display:flex;align-items:center;gap:8px;height:32px;padding:0 12px;border-radius:8px;background:rgba(255,255,255,.09);color:#b9c0d0}
.search:focus-within{background:rgba(255,255,255,.16);color:#fff}
.search input{flex:1;background:none;border:0;outline:0;color:#fff;font:inherit}
.search input::placeholder{color:#97a0b4}
.search kbd{font:inherit;font-size:11px;padding:1px 6px;border-radius:4px;background:rgba(255,255,255,.12)}
.topbar .grow{flex:1}
.iconbtn{width:32px;height:32px;border-radius:8px;display:grid;place-items:center;color:#b9c0d0}
.iconbtn:hover{background:rgba(255,255,255,.12);color:#fff}
/* Layout */
.body{display:grid;grid-template-columns:232px 1fr;min-height:0}
nav{background:var(--panel);border-right:1px solid var(--border);padding:14px 10px;display:flex;flex-direction:column;gap:2px;overflow:auto}
.newbtn{display:flex;align-items:center;justify-content:center;gap:8px;height:36px;border-radius:8px;background:var(--accent);color:#fff;font-weight:600;margin-bottom:12px}
.newbtn:hover{background:var(--accent-hover)}
.nav-item{display:flex;align-items:center;gap:10px;height:34px;padding:0 10px;border-radius:7px;color:#3b4254;text-align:left}
.nav-item:hover{background:var(--hover)}
.nav-item.on{background:var(--accent-soft);color:var(--accent);font-weight:600}
.nav-item .n{margin-left:auto;font-size:11.5px;color:var(--muted)}
.nav-item.on .n{color:var(--accent)}
.nav-head{margin:16px 10px 6px;font-size:11px;font-weight:600;letter-spacing:.5px;text-transform:uppercase;color:var(--muted)}
.storage{margin-top:auto;padding:12px;border:1px solid var(--border);border-radius:10px;background:var(--row-alt)}
.storage .bar{height:6px;border-radius:3px;background:var(--border);margin:8px 0 6px;overflow:hidden}
.storage .bar i{display:block;height:100%;width:42%;background:var(--accent)}
.storage small{color:var(--muted)}
main{overflow:auto;padding:26px 32px 40px}
.wrap{max-width:1640px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr) 328px;gap:28px;align-items:start}
.wrap.noact{grid-template-columns:minmax(0,1fr)}
.wrap.noact .activity{display:none}
.content{min-width:0}
.head .actbtn{display:flex;align-items:center;gap:8px;height:32px;padding:0 12px;border:1px solid var(--border-strong);border-radius:8px;background:var(--panel);font-weight:500}
.head .actbtn:hover{background:var(--hover)}
.head .actbtn.on{background:var(--accent-soft);border-color:transparent;color:var(--accent)}
/* Activity panel */
.activity{position:sticky;top:0;display:flex;flex-direction:column;max-height:calc(100vh - 52px - 56px);background:var(--panel);border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden}
.ah{display:flex;align-items:center;gap:8px;padding:14px 16px 10px}
.ah h2{margin:0;font-size:14px;flex:1}
.ah button.link{color:var(--accent);font-size:12px}
.ah button.link:hover{text-decoration:underline}
.achips{display:flex;gap:6px;padding:0 16px 12px;border-bottom:1px solid var(--border)}
.achips .chip{height:26px;padding:0 10px;font-size:12px}
.afeed{overflow:auto;padding:4px 0 8px}
.ag{padding:12px 16px 4px;font-size:11px;font-weight:600;letter-spacing:.5px;text-transform:uppercase;color:var(--muted)}
.ai{position:relative;display:flex;gap:11px;padding:9px 16px;cursor:pointer}
.ai:hover{background:var(--hover)}
.ai .av{position:relative;flex:none;width:32px;height:32px}
.ai .av .avatar{width:32px;height:32px;font-size:11px}
.ai .ty{position:absolute;right:-4px;bottom:-4px;width:16px;height:16px;border-radius:50%;display:grid;place-items:center;border:2px solid var(--panel);color:#fff}
.ai .ty svg{width:9px;height:9px;stroke-width:2.4}
.ai:hover .ty{border-color:var(--hover)}
.ai .tx{min-width:0;flex:1;line-height:1.45}
.ai .pj{color:var(--muted);font-size:12px;margin-top:1px}
.ai blockquote{margin:6px 0 0;padding:6px 10px;border-left:3px solid var(--border-strong);background:var(--row-alt);border-radius:0 6px 6px 0;color:#3b4254;font-size:12.5px}
.ai .dot{position:absolute;right:14px;top:16px;width:8px;height:8px;border-radius:50%;background:var(--accent)}
.aempty{padding:34px 16px;text-align:center;color:var(--muted)}
@media (max-width:1240px){ .wrap{grid-template-columns:minmax(0,1fr)} .activity{position:static;max-height:420px} }
.head{display:flex;align-items:flex-end;gap:16px;margin-bottom:20px}
.head h1{margin:0;font-size:22px;letter-spacing:-.2px}
.head p{margin:4px 0 0;color:var(--muted)}
.head .grow{flex:1}
/* KPI tiles */
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:24px}
.kpi{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius-lg);padding:14px 16px}
.kpi span{color:var(--muted);font-size:12px}
.kpi b{display:block;font-size:22px;margin-top:4px;letter-spacing:-.3px;font-variant-numeric:tabular-nums}
/* Toolbar */
.toolbar{display:flex;align-items:center;gap:10px;margin-bottom:16px;flex-wrap:wrap}
.chips{display:flex;gap:6px;flex-wrap:wrap}
.chip{height:30px;padding:0 12px;border-radius:999px;border:1px solid var(--border-strong);background:var(--panel);color:#3b4254}
.chip:hover{background:var(--hover)}
.chip.on{background:var(--text);border-color:var(--text);color:#fff}
.toolbar .grow{flex:1}
select.sel{height:30px;border:1px solid var(--border-strong);border-radius:8px;background:var(--panel);padding:0 8px;font:inherit;color:var(--text)}
.seg{display:flex;border:1px solid var(--border-strong);border-radius:8px;overflow:hidden;background:var(--panel)}
.seg button{width:34px;height:28px;display:grid;place-items:center;color:var(--muted)}
.seg button.on{background:var(--accent-soft);color:var(--accent)}
/* Cards */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:18px}
.card{position:relative;background:var(--panel);border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden;cursor:pointer;
    transition:transform .15s,box-shadow .15s,border-color .15s;display:flex;flex-direction:column}
.card:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(20,30,60,.12);border-color:var(--border-strong)}
.thumb{height:150px;background:#0b0d12;position:relative;overflow:hidden}
.thumb svg{width:100%;height:100%;stroke-width:1}
.thumb::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.25),transparent 40%)}
.status-chip{position:absolute;left:12px;top:12px;z-index:2;display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 9px;border-radius:999px;background:rgba(255,255,255,.95);font-size:11.5px;font-weight:600}
.status-chip i{width:7px;height:7px;border-radius:50%}
.star{position:absolute;right:10px;top:8px;z-index:2;width:30px;height:30px;border-radius:8px;display:grid;place-items:center;color:#cbd5e1}
.star:hover{background:rgba(255,255,255,.18);color:#fff}
.star.on{color:#fbbf24}
.star.on svg{fill:#fbbf24}
.cbody{padding:14px 16px 12px;display:flex;flex-direction:column;gap:3px;flex:1}
.cbody h3{margin:0;font-size:14.5px;letter-spacing:-.1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:26px}
.client{color:var(--muted)}
.meta{display:flex;gap:16px;margin-top:10px;color:#3b4254}
.meta span{display:flex;align-items:center;gap:6px}
.meta svg{color:var(--muted);width:14px;height:14px}
.cfoot{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;border-top:1px solid var(--border);background:var(--row-alt);color:var(--muted);font-size:12px}
.team{display:flex}
.team .avatar{width:24px;height:24px;font-size:9.5px;border:2px solid var(--row-alt);margin-left:-6px}
.team .avatar:first-child{margin-left:0}
.kebab{position:absolute;right:8px;top:158px;width:28px;height:28px;border-radius:7px;display:grid;place-items:center;color:var(--muted);opacity:0;transition:opacity .12s}
.card:hover .kebab,.kebab:focus-visible{opacity:1}
.kebab:hover{background:var(--hover);color:var(--text)}
.card.new{border:2px dashed var(--border-strong);background:transparent;align-items:center;justify-content:center;min-height:276px;gap:10px;color:var(--muted)}
.card.new:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-soft);transform:none;box-shadow:none}
.card.new .plus{width:44px;height:44px;border-radius:12px;background:var(--panel);display:grid;place-items:center;border:1px solid var(--border)}
.card.new .plus svg{width:22px;height:22px}
/* List view */
.list{display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden}
.row{display:grid;grid-template-columns:minmax(220px,2.4fr) 120px 90px 120px 130px 110px 36px;align-items:center;gap:12px;padding:10px 16px;border-bottom:1px solid #eef0f3;cursor:pointer}
.row:last-child{border-bottom:0}
.row.hd{background:var(--row-alt);color:var(--muted);font-weight:600;cursor:default;padding:8px 16px}
.row:not(.hd):hover{background:var(--hover)}
.row .nm{display:flex;align-items:center;gap:10px;min-width:0}
.row .nm b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row .nm small{color:var(--muted)}
.row .mini{width:44px;height:32px;border-radius:6px;overflow:hidden;background:#0b0d12;flex:none}
.row .mini svg{width:100%;height:100%}
.pill{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 9px;border-radius:999px;background:var(--bg);font-size:11.5px;font-weight:600;width:max-content}
.pill i{width:7px;height:7px;border-radius:50%}
.row .kebab{position:static;opacity:1}
.row .num{font-variant-numeric:tabular-nums}
.empty{text-align:center;padding:70px 20px;color:var(--muted)}
.empty h3{color:var(--text);margin:12px 0 4px}
/* Dialog (projects page) */
@keyframes pop{from{opacity:0;transform:scale(.98) translateY(-2px)}}
.scrim{position:fixed;inset:0;background:rgba(15,20,35,.38);backdrop-filter:blur(2px);display:grid;place-items:center;z-index:900;animation:fade .15s}
@keyframes fade{from{opacity:0}}
.dlg{width:460px;max-width:calc(100vw - 24px);background:var(--panel);border-radius:12px;box-shadow:0 24px 60px rgba(15,20,40,.28);overflow:hidden;animation:pop .17s cubic-bezier(.2,.9,.3,1)}
.dlg header{display:flex;align-items:center;height:46px;padding:0 8px 0 18px;border-bottom:1px solid var(--border);background:var(--row-alt);font-weight:600;font-size:14px}
.dlg header span{flex:1}
.dlg header button{width:30px;height:30px;border-radius:6px;display:grid;place-items:center;color:var(--muted)}
.dlg header button:hover{background:var(--danger-soft);color:var(--danger-text)}
.dlg form{padding:18px;display:grid;grid-template-columns:100px 1fr;gap:12px;align-items:center}
.dlg label{color:var(--muted)}
.dlg footer{display:flex;justify-content:flex-end;gap:8px;padding:10px 14px;border-top:1px solid var(--border);background:var(--row-alt)}
@media (max-width:900px){ .body{grid-template-columns:1fr} nav{display:none} .kpis{grid-template-columns:repeat(2,1fr)} .logo{width:auto} main{padding:20px 16px} .row{grid-template-columns:1fr 90px 36px}.row>:nth-child(n+3):not(:last-child){display:none} }
