/* ══════════════════════════════════════════════════════════
   OCEAN — BOARD, CUSTOMERS, STAGES + keyframes
══════════════════════════════════════════════════════════ */

@keyframes fade { from{opacity:0} to{opacity:1} }
@keyframes rise { from{opacity:0; transform:translateY(12px)} to{opacity:1; transform:none} }
@keyframes pop  { from{opacity:0; transform:scale(.92)} to{opacity:1; transform:none} }
@keyframes spin { to{ transform:rotate(360deg) } }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
@keyframes checkpop { 0%{transform:scale(.6)} 60%{transform:scale(1.15)} 100%{transform:scale(1)} }

/* staggered list entrance */
.stagger > * { animation:rise .5s var(--spring) both; }
.stagger > *:nth-child(1){animation-delay:.02s}
.stagger > *:nth-child(2){animation-delay:.06s}
.stagger > *:nth-child(3){animation-delay:.10s}
.stagger > *:nth-child(4){animation-delay:.14s}
.stagger > *:nth-child(5){animation-delay:.18s}
.stagger > *:nth-child(6){animation-delay:.22s}
.stagger > *:nth-child(n+7){animation-delay:.26s}

/* ── Customer cards ── */
.cust-grid { display:grid; grid-template-columns:1fr; gap:var(--s3); }
.cust {
  display:flex; align-items:center; gap:var(--s3); padding:var(--s4);
  background:var(--surface); border:1px solid var(--hairline-2); border-radius:var(--r-lg);
  box-shadow:var(--sh-1); transition:transform var(--t-fast) var(--spring), box-shadow var(--t); text-align:start;
}
.cust:active { transform:scale(.98); box-shadow:var(--sh-2); }
.cust .grow{ display:flex; flex-direction:column; gap:5px; }
.cust .name { font-family:var(--font-head); font-weight:800; font-size:16.5px; }
.cust .meta { display:flex; align-items:center; gap:10px; flex-wrap:wrap; color:var(--text-2); font-size:12.5px; font-weight:600; }
.cust .meta span{ display:inline-flex; align-items:center; gap:4px; }
.cust .meta .ic{ width:14px; height:14px; }

/* ── Month switcher ── */
.month-bar { display:flex; align-items:center; gap:var(--s2); margin-bottom:var(--s4); }
.month-bar .lbl { flex:1; text-align:center; font-family:var(--font-head); font-weight:800; font-size:16px; }
.month-nav { width:38px; height:38px; border-radius:var(--r-pill); background:var(--surface); border:1px solid var(--hairline-2);
  display:flex; align-items:center; justify-content:center; color:var(--text); box-shadow:var(--sh-1); }
.month-nav .ic{ width:18px; height:18px; }
.month-nav:active{ transform:scale(.9); }

/* customer header on board */
.board-head { display:flex; align-items:center; gap:var(--s3); margin-bottom:var(--s4); }
.board-head .grow h2{ font-size:20px; font-weight:900; }
.board-head .grow .meta{ color:var(--text-2); font-size:13px; font-weight:600; margin-top:2px; }

/* summary strip: N reels / M images done vs target */
.summary { display:grid; grid-template-columns:1fr 1fr; gap:var(--s3); margin-bottom:var(--s5); }
.summary .cell { background:var(--surface); border:1px solid var(--hairline-2); border-radius:var(--r-lg);
  padding:var(--s4); box-shadow:var(--sh-1); }
.summary .cell .k{ display:flex; align-items:center; gap:6px; color:var(--text-2); font-size:12.5px; font-weight:700; margin-bottom:8px; }
.summary .cell .k .ic{ width:15px; height:15px; }
.summary .cell .v{ font-family:var(--font-num); font-weight:800; font-size:22px; letter-spacing:-.02em; }
.summary .cell .v small{ color:var(--text-3); font-size:14px; font-weight:700; }
.summary .cell .pbar{ margin-top:10px; }

/* ── Content item card ── */
.citem { background:var(--surface); border:1px solid var(--hairline-2); border-radius:var(--r-lg);
  box-shadow:var(--sh-1); overflow:hidden; margin-bottom:var(--s3); }
.citem-top { display:flex; align-items:flex-start; gap:var(--s3); padding:var(--s4) var(--s4) var(--s3); }
.citem-kind { width:40px; height:40px; border-radius:var(--r-md); display:flex; align-items:center; justify-content:center;
  flex:0 0 auto; }
.citem-kind .ic{ width:20px; height:20px; }
.k-reel{ background:rgba(255,55,95,.14); color:var(--pink); }
.k-video{ background:var(--accent-soft); color:var(--accent); }
.k-image{ background:rgba(191,90,242,.14); color:var(--purple); }
.citem-top .grow h3{ font-size:15.5px; font-weight:800; font-family:var(--font-head); }
.citem-scenario { color:var(--text-2); font-size:13px; line-height:1.6; margin-top:3px; white-space:pre-wrap;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.citem-scenario.empty-txt{ color:var(--text-3); font-style:normal; }

/* stage rail */
.stages { display:flex; gap:6px; padding:0 var(--s4) var(--s4); overflow-x:auto; scrollbar-width:none; }
.stages::-webkit-scrollbar{ display:none; }
.stage { flex:1 0 auto; min-width:62px; display:flex; flex-direction:column; align-items:center; gap:5px;
  padding:9px 6px; border-radius:var(--r-md); background:var(--bg-2); color:var(--text-3);
  border:1.5px solid transparent; transition:all var(--t-fast) var(--spring); cursor:pointer; }
.stage .ic{ width:19px; height:19px; }
.stage .lbl{ font-size:10px; font-weight:800; font-family:var(--font-head); }
.stage:active{ transform:scale(.92); }
.stage.done { background:rgba(48,209,88,.16); color:var(--green); }
.stage.done .ic{ animation:checkpop .3s var(--spring); }
.stage.locked { opacity:.55; cursor:not-allowed; }
.stage.locked:active{ transform:none; }
.stage.mine:not(.done){ color:var(--accent); border-color:var(--accent-soft); }

/* progress dots on collapsed item */
.stage-dots{ display:flex; gap:4px; }
.stage-dots i{ width:7px; height:7px; border-radius:99px; background:var(--hairline); }
.stage-dots i.on{ background:var(--green); }

/* role chips picker */
.role-picker{ display:flex; flex-wrap:wrap; gap:8px; }

/* ── Notion-style table ── */
.tbl-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; border:1px solid var(--hairline-2);
  border-radius:var(--r-lg); background:var(--surface); box-shadow:var(--sh-1); }
.tbl { border-collapse:collapse; width:max-content; min-width:100%; }
.tbl thead th { position:sticky; top:0; z-index:2; background:var(--surface-2);
  padding:9px 6px; font-family:var(--font-head); font-size:10.5px; font-weight:800; color:var(--text-2);
  white-space:nowrap; border-bottom:1px solid var(--hairline); }
.tbl thead th.stage-col span { display:block; margin-top:2px; }
.tbl thead th .ic { width:16px; height:16px; }
.tbl td { border-bottom:1px solid var(--hairline-2); padding:0; }
.tbl tr:last-child td { border-bottom:none; }

.name-col { position:sticky; right:0; z-index:1; background:var(--surface);
  min-width:168px; max-width:210px; text-align:start;
  box-shadow:1px 0 0 var(--hairline-2); }
.tbl thead th.name-col { z-index:3; text-align:start; padding-inline-start:12px; }
.name-cell { display:flex; align-items:center; gap:9px; padding:10px 12px; width:100%; text-align:start; }
.name-cell .citem-kind { width:32px; height:32px; border-radius:10px; }
.name-cell .citem-kind .ic { width:16px; height:16px; }
.name-cell .t { font-family:var(--font-head); font-weight:800; font-size:13.5px; }
.name-cell .sc { color:var(--text-3); font-size:11px; margin-top:1px; }

.stage-col { width:58px; text-align:center; }
.cell-btn { width:100%; min-height:54px; display:flex; align-items:center; justify-content:center; }
.cell-dot { width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  border:2px solid var(--hairline); color:transparent; transition:all var(--t-fast) var(--spring); }
.cell-dot .ic { width:15px; height:15px; stroke-width:3; }
.cell-btn.mine .cell-dot { border-color:var(--accent); color:var(--accent); }
.cell-btn.done .cell-dot { background:var(--green); border-color:var(--green); color:#fff; animation:checkpop .3s var(--spring); }
.cell-btn.locked { opacity:.45; }
.cell-btn:active .cell-dot { transform:scale(.85); }

/* not-applicable stage (e.g. record/voiceover for images) */
.cell-na { min-height:54px; display:flex; align-items:center; justify-content:center; color:var(--hairline); }
.cell-na .ic { width:14px; height:14px; opacity:.5; }

/* read-only status states (customer board) */
.cell-btn.readonly { cursor:default; }
.cell-btn.readonly:active .cell-dot { transform:none; }
.cell-dot.st-done    { background:var(--green); border-color:var(--green); color:#fff; }
.cell-dot.st-done .ic{ animation:checkpop .3s var(--spring); }
.cell-dot.st-active  { border-color:var(--amber); position:relative; }
.cell-dot.st-active::after { content:""; width:11px; height:11px; border-radius:50%; background:var(--amber); animation:pulse 1.4s infinite; }
.cell-dot.st-waiting { border-color:var(--hairline); color:var(--text-3); }
.cell-dot.st-waiting .ic { width:12px; height:12px; opacity:.55; }
.cell-dot.st-na      { border-color:transparent; background:var(--bg-2); color:var(--text-3); }
.cell-dot.st-na .ic  { width:13px; height:13px; opacity:.6; }

/* finished-by avatar shown inside the cell */
.cell-ava { width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  color:#fff; font-family:var(--font-head); font-weight:800; font-size:11px;
  box-shadow:0 0 0 2px var(--green), 0 1px 3px rgba(0,0,0,.25); }

/* tighter table on phones so more stages are visible */
@media (max-width:480px){
  .name-col { min-width:116px; max-width:150px; box-shadow:1px 0 0 var(--hairline); }
  .name-cell { padding:9px 10px; gap:7px; }
  .name-cell .citem-kind { width:28px; height:28px; }
  .name-cell .citem-kind .ic { width:14px; height:14px; }
  .name-cell .t { font-size:12.5px; }
  .name-cell .sc { font-size:10px; }
  .stage-col { width:50px; }
  .tbl thead th { font-size:9.5px; padding:8px 3px; }
  .tbl thead th .ic { width:15px; height:15px; }
  .cell-btn { min-height:48px; }
  .cell-dot, .cell-ava { width:24px; height:24px; }
}

/* ── Phone-width mode (Settings → عرض التطبيق) — keeps desktop/PWA phone-shaped ── */
:root[data-appwidth="phone"] { --app-max: 460px; }
:root[data-appwidth="phone"] .appbar,
:root[data-appwidth="phone"] .view { max-width: var(--app-max); margin-inline:auto; }
:root[data-appwidth="phone"] .fab { inset-inline-end: max(18px, calc(50vw - var(--app-max)/2 + 14px)); }
@media (min-width:520px){
  :root[data-appwidth="phone"] body { background:var(--bg-2); }
  :root[data-appwidth="phone"] .appbar { border-inline:1px solid var(--hairline-2); background:var(--glass-bg); }
}

/* dashboard hero */
.hero { position:relative; overflow:hidden; border-radius:var(--r-xl); padding:var(--s6) var(--s5);
  background:var(--accent-grad); color:#fff; box-shadow:0 12px 34px rgba(10,132,255,.35); margin-bottom:var(--s5); }
.hero::after{ content:""; position:absolute; inset:0; background:radial-gradient(120% 90% at 100% 0,rgba(255,255,255,.28),transparent 55%); pointer-events:none; }
.hero .greet{ font-size:13.5px; font-weight:700; opacity:.9; }
.hero .name{ font-family:var(--font-head); font-size:26px; font-weight:900; margin-top:2px; }
.hero .date{ margin-top:6px; font-size:13px; opacity:.85; font-weight:600; }
