/* ==========================================================================
   MediaSun Liquid Glass Neumorphic Design System (CSS3)
   Palette: Dark Luxury Olive & Matte Muted Gold
   ========================================================================== */

:root {
  --bg: #1b1e0e;
  --fg: #f4ecd0;
  --muted: #b9b78f;
  --accent: #e6d48e;
  --line: rgba(234, 223, 174, 0.2);
  --glass: rgba(255, 255, 255, 0.07);
  --glass-elevated: rgba(36, 40, 20, 0.95);
  --success: #3aa66b;
  --danger: #d64545;
  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
}

html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: "Vazirmatn", Tahoma, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea {
  font-family: inherit;
}

/* Ambient animated blur blobs */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .7;
  z-index: 0;
  pointer-events: none;
}
.b1 {
  width: 60vmax;
  height: 60vmax;
  background: #8fa35a;
  top: -20vmax;
  right: -15vmax;
}
.b2 {
  width: 45vmax;
  height: 45vmax;
  background: #e3d3a0;
  bottom: -15vmax;
  left: -10vmax;
  opacity: .5;
}
.b3 {
  width: 30vmax;
  height: 30vmax;
  background: #c9a94e;
  top: 40%;
  left: 30%;
  opacity: .35;
}

/* Main SPA shell container */
main {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 22px 16px 120px;
}

.scr {
  animation: in .3s ease both;
}
.scr.na {
  animation: none;
}
@keyframes in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Header bar */
.top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.top img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.top h1, .ph b {
  flex: 1;
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Liquid Glass Component (.lg) */
.lg {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--fg);
  font: 600 1rem "Vazirmatn", Tahoma, sans-serif;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.2,.8,.2,1);
  -webkit-tap-highlight-color: transparent;
}
.lg:hover {
  transform: scale(1.02);
}
.lg:active {
  transform: scale(.98);
}
.lg:focus-visible, .nb:focus-visible, .chip:focus-visible, .xt:focus-visible,
.tk:focus-visible, .pt:focus-visible, .ck:focus-visible, .ibtn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.lg .edge {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(0, 0, 0, .03),
              0 2px 6px rgba(0, 0, 0, .08),
              inset 3px 3px .5px -3.5px rgba(255, 255, 255, .09),
              inset -3px -3px .5px -3.5px rgba(255, 255, 255, .85),
              inset 1px 1px 1px -.5px rgba(255, 255, 255, .6),
              inset -1px -1px 1px -.5px rgba(255, 255, 255, .6),
              inset 0 0 6px 6px rgba(255, 255, 255, .12),
              inset 0 0 2px 2px rgba(255, 255, 255, .06),
              0 0 12px rgba(0, 0, 0, .15);
}

.lg .blur {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  z-index: -1;
  overflow: hidden;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
@supports (backdrop-filter: url("#x")) and (not (-webkit-hyphens: none)) {
  .lg .blur {
    backdrop-filter: url("#container-glass");
  }
}

.lg .t {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.lg.sel .edge {
  box-shadow: 0 0 0 2px var(--accent),
              0 0 18px rgba(230, 212, 142, .5),
              inset 0 0 6px 6px rgba(255, 255, 255, .14);
}

/* Avatars */
.av {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 2.5px;
  background: conic-gradient(#eadfae, #8fa35a, #c9a94e, #eadfae);
  flex: none;
}
.av > img, .av > svg, .init {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #1b1e0e;
  box-sizing: border-box;
}
.init {
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #1b1e0e;
  font-size: 1.2rem;
  background: #eadfae;
}
.av.sm {
  width: 26px;
  height: 26px;
  padding: 1.5px;
}
.av.sm .init {
  font-size: .7rem;
  border-width: 1px;
}
.av.sm > img, .av.sm > svg {
  border-width: 1px;
}
.av.xl {
  width: 60px;
  height: 60px;
}
.av.big {
  width: 86px;
  height: 86px;
  padding: 3px;
}
.av.big .init {
  font-size: 2.2rem;
}
.av.nv {
  width: 28px;
  height: 28px;
  padding: 1.5px;
}
.av.nv .init {
  font-size: .8rem;
  border-width: 1px;
}

/* Stats */
.stats {
  display: flex;
  flex: 1;
  justify-content: space-around;
  text-align: center;
}
.stats b {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
}
.stats span {
  font-size: .7rem;
  color: var(--muted);
}
.dh {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.dn {
  margin-bottom: 14px;
}
.dn b {
  display: block;
  font-size: 1.05rem;
}
.dn small {
  color: var(--muted);
  font-size: .8rem;
}

/* Search input */
.sr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line);
  margin-bottom: 14px;
}
.sr:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230, 212, 142, .2);
}
.sr svg {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.sr input, .inp {
  background: none;
  border: 0;
  outline: 0;
  color: var(--fg);
  font: 400 16px "Vazirmatn", Tahoma, sans-serif;
}
.sr input {
  flex: 1;
  min-width: 0;
}
.sr input::placeholder, .inp::placeholder {
  color: var(--muted);
}

/* Modern Responsive Explore Grid */
.xg {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 12px 0 24px;
}
@media (min-width: 600px) {
  .xg {
    grid-template-columns: repeat(3, 1fr);
  }
}

.xt-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 12px;
  text-align: right;
  border: 1px solid var(--line);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
  background: var(--glass);
  animation: in .4s ease backwards;
  border-radius: 18px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.xt-card:hover {
  transform: translateY(-2px);
  border-color: rgba(230, 212, 142, 0.4);
  background: rgba(255, 255, 255, 0.08);
}
.xt-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.xt-info {
  flex: 1;
  min-width: 0;
}
.xt-name {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.3;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xt-badge-total {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--accent);
  margin-top: 2px;
}
.xt-stats-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.xt-stat-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 8px;
  border-radius: 8px;
}
.xt-stat-pill b {
  font-weight: 700;
  color: var(--fg);
  font-size: 0.8rem;
  padding: 1px 6px;
  border-radius: 6px;
}
.xt-stat-pill.edit b {
  background: rgba(155, 176, 101, 0.22);
  color: #c5d79a;
}
.xt-stat-pill.todo b {
  background: rgba(230, 212, 142, 0.16);
  color: var(--accent);
}
.xt-stat-pill.done b {
  background: rgba(120, 190, 140, 0.2);
  color: #9fe0b0;
}

/* Dossier Status Filter Chips */
.dossier-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 6px 2px 10px;
}
.dossier-status-chips::-webkit-scrollbar {
  display: none;
}
.ds-chip {
  flex: 0 0 auto;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.ds-chip.on {
  background: rgba(230, 212, 142, 0.18);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 10px rgba(230, 212, 142, 0.14);
}

/* Project grid in profile (3-Column Instagram Cover Grid) */
.pgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 2px;
  padding-bottom: 24px;
}
.pt {
  aspect-ratio: 4 / 4.6;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 7px;
  border: 1px solid rgba(234, 223, 174, 0.14);
  color: var(--fg);
  font: inherit;
  text-align: right;
  cursor: pointer;
  animation: in .35s ease backwards;
  background: linear-gradient(155deg, rgba(64, 69, 36, 0.92), rgba(34, 37, 19, 0.96));
  border-radius: 12px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.pt:active {
  transform: scale(0.97);
}
.pt.tone-done {
  background: linear-gradient(155deg, rgba(162, 142, 74, 0.55), rgba(56, 50, 24, 0.95));
  border-color: rgba(230, 212, 142, 0.35);
}
.pt.tone-ready {
  background: linear-gradient(155deg, rgba(64, 128, 92, 0.52), rgba(24, 48, 34, 0.95));
  border-color: rgba(110, 214, 152, 0.3);
}
.pt.tone-edit {
  background: linear-gradient(155deg, rgba(118, 140, 74, 0.52), rgba(44, 54, 26, 0.95));
  border-color: rgba(165, 194, 108, 0.3);
}
.pt.tone-rev {
  background: linear-gradient(155deg, rgba(176, 102, 54, 0.54), rgba(62, 32, 18, 0.96));
  border-color: rgba(244, 158, 96, 0.38);
}
.pt.tone-accept {
  background: linear-gradient(155deg, rgba(62, 122, 134, 0.5), rgba(24, 44, 52, 0.96));
  border-color: rgba(116, 204, 224, 0.3);
}
.pt-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.pt-cover.loaded {
  opacity: 1;
}
.pt-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 16, 9, 0.64) 0%, rgba(14, 16, 9, 0.14) 44%, rgba(12, 14, 7, 0.90) 100%);
}
.pt-top,
.pt-bottom {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.pt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 7px;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.35;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(18, 20, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--fg);
}
.pt-badge span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pt-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
  background: #b9b78f;
}
.pt-badge.tone-done { color: #f6e7ae; border-color: rgba(230, 212, 142, 0.45); }
.pt-badge.tone-done i { background: #e6d48e; box-shadow: 0 0 6px #e6d48e; }
.pt-badge.tone-ready { color: #aaf0c4; border-color: rgba(96, 210, 140, 0.45); }
.pt-badge.tone-ready i { background: #58d68d; box-shadow: 0 0 6px #58d68d; }
.pt-badge.tone-edit { color: #d6ea9e; border-color: rgba(165, 198, 92, 0.42); }
.pt-badge.tone-edit i { background: #b5d46b; }
.pt-badge.tone-rev { color: #ffd1aa; border-color: rgba(244, 152, 82, 0.5); }
.pt-badge.tone-rev i { background: #f39c4a; box-shadow: 0 0 6px #f39c4a; }
.pt-badge.tone-accept { color: #aae7f5; border-color: rgba(102, 198, 224, 0.45); }
.pt-badge.tone-accept i { background: #5bc6e3; }
.pt b {
  font-size: .71rem;
  font-weight: 700;
  line-height: 1.32;
  color: #f7f0d4;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}
.pt small.pt-date {
  font-size: .57rem;
  color: rgba(234, 223, 174, 0.8);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}
.pt.add {
  background: var(--glass);
  border: 1px dashed var(--accent);
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--accent);
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin: 18px 0 6px;
}
.tabs span {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  font-weight: 600;
  font-size: .9rem;
  border-bottom: 2px solid var(--accent);
  margin-bottom: -1px;
}

/* Hero card */
.hero {
  padding: 20px;
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid var(--line);
  margin-bottom: 16px;
  text-align: center;
}
.hero small {
  color: var(--muted);
  font-size: .88rem;
}
.hero b {
  display: block;
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--accent);
}
.hs {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hs span {
  font-size: .78rem;
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .1);
}

/* Task cards */
.tk {
  display: block;
  width: 100%;
  text-align: right;
  color: var(--fg);
  font: inherit;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px 16px;
  margin-bottom: 12px;
  cursor: pointer;
  animation: in .45s ease backwards;
  transition: transform .2s, background .2s;
}
.tk:hover {
  background: rgba(255, 255, 255, .1);
  transform: translateY(-2px);
}
.tk header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.who2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .88rem;
  font-weight: 600;
}
.st {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 99px;
  background: rgba(230, 212, 142, .16);
  color: var(--accent);
}
.st i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.6s ease-in-out infinite;
}
.st.edit, .st.edited {
  background: rgba(155, 176, 101, .22);
  color: #c5d79a;
}
.st.done, .st.uploaded {
  background: rgba(120, 190, 140, .2);
  color: #9fe0b0;
}
.st.done i, .st.uploaded i {
  animation: none;
}
@keyframes pulse {
  50% { opacity: .3; transform: scale(.7); }
}
.tk h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}
.tk p {
  margin: 3px 0;
  font-size: .82rem;
  color: var(--muted);
}
.tk p b {
  color: var(--fg);
  font-weight: 600;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 34px 0;
  line-height: 2;
}
.lnk {
  display: block;
  margin: 18px auto 0;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: .78rem;
  cursor: pointer;
  padding: 8px;
}
.lnk:hover {
  color: var(--accent);
}

/* Bottom Navigation */
.nav {
  position: fixed;
  z-index: 10;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 14px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  background: linear-gradient(to top, rgba(20, 22, 10, .85), transparent);
}
.nb {
  pointer-events: auto;
  width: 56px;
  min-height: 52px;
  padding: 0;
  border-radius: 18px;
  color: var(--muted);
}
.nb .edge, .nb .blur {
  border-radius: 18px;
}
.nb svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nb.sel {
  color: var(--accent);
}
.nb em {
  position: absolute;
  z-index: 3;
  top: -5px;
  left: -3px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--accent);
  color: #1b1e0e;
  font: 800 .65rem/18px "Vazirmatn", sans-serif;
  font-style: normal;
  text-align: center;
  padding: 0 4px;
}

/* Form Grid */
.fgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.fgrid .w {
  grid-column: 1 / -1;
}
.fr {
  min-height: 56px;
  font-size: .9rem;
  font-weight: 600;
  padding: 8px 10px;
}
.fr .t {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  text-align: center;
  line-height: 1.6;
}
.fr .ic {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bx {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 6px;
  font-style: normal;
  font-size: .8rem;
  font-weight: 800;
  color: #fff;
}
.bx.no {
  background: var(--danger);
}
.bx.ok {
  background: var(--success);
}

/* Sheets / Modals */
.sheet-bg {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(10, 12, 4, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: in .2s ease both;
  backdrop-filter: blur(4px);
}
.sheet {
  width: 100%;
  max-width: 520px;
  max-height: min(80vh, 80dvh);
  overflow-y: auto;
  background: var(--glass-elevated);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 20px 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  animation: up .3s cubic-bezier(.2, .9, .25, 1) both;
}
.sheet h3 {
  margin: 0 0 14px;
  font-size: 1rem;
}
@keyframes up {
  from { transform: translateY(24px) scale(.96); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.ta {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.8;
}
.sp {
  height: 14px;
}
.olist {
  display: grid;
  gap: 10px;
}
.lg.opt {
  justify-content: flex-start;
  padding: 8px 14px;
  min-height: 56px;
  font-size: .95rem;
}
.opt .t {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.two .chip {
  justify-content: center;
  padding: 12px;
}
.wl {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .85rem;
}
.lg.opt.c .t {
  justify-content: center;
}
.big-ok {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 2rem;
  margin: 4px auto 14px;
}
.wkl {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  font-size: .82rem;
  color: var(--muted);
  display: grid;
  gap: 4px;
}
.wkl strong {
  color: var(--fg);
}

/* Stories */
.stories {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  margin: 0 -16px 8px;
  padding: 2px 16px 12px;
  scrollbar-width: none;
}
.stories::-webkit-scrollbar {
  display: none;
}
.sb {
  flex: none;
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}
.sb > span:last-child {
  font-size: .7rem;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.av.st {
  width: 68px;
  height: 68px;
  padding: 3px;
}
.av.st .init {
  font-size: 1.6rem;
}
.av.seen {
  background: rgba(234, 223, 174, .22);
}
.sb:focus-visible, .hl:focus-visible, .ptabs button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Highlights */
.hls {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0 14px;
}
.hl {
  flex: 1;
  max-width: 86px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  color: var(--fg);
  font: inherit;
  font-size: .74rem;
  cursor: pointer;
}
.hl .ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2.5px solid #c9a94e;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 0 12px rgba(201, 169, 78, .2);
}
.hl svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #e0c882;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Profile tabs */
.ptabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin: 4px 0 8px;
}
.ptabs button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font: 600 .84rem "Vazirmatn", Tahoma, sans-serif;
  padding: 12px 2px;
  margin-bottom: -1px;
  cursor: pointer;
}
.ptabs button.on {
  color: var(--fg);
  border-color: var(--accent);
}
.ptabs svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.stl {
  margin: 0 0 10px;
  line-height: 1.9;
  font-size: .95rem;
}
.ph {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.ibtn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .08);
  color: var(--fg);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 99px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--fg);
  font: 600 .84rem "Vazirmatn", Tahoma, sans-serif;
  cursor: pointer;
}
.chip.on {
  background: var(--accent);
  color: #1b1e0e;
  border-color: var(--accent);
}
.chip.ed {
  padding: 5px 14px 5px 6px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Form fields */
.fld {
  margin-bottom: 20px;
}
.fld > label, .fld > span {
  display: block;
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.inp {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line);
  padding: 0 14px;
}
.inp:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230, 212, 142, .2);
}
.tot {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: .9rem;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(230, 212, 142, .12);
}
.tot b {
  color: var(--accent);
}

/* Revisions & Direct */
.rvi {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--line);
  font-size: .88rem;
}
.rvi.done span {
  text-decoration: line-through;
  opacity: .55;
}
.rvi span {
  flex: 1;
  line-height: 1.7;
}
.ck {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: none;
  color: transparent;
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.ck.on {
  background: var(--accent);
  color: #1b1e0e;
}
.addr {
  display: flex;
  gap: 8px;
}
.addr .inp {
  flex: 1;
}
.addr .chip {
  flex: none;
}
.dm {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--line);
  animation: in .4s ease backwards;
}
.dm.done {
  opacity: .55;
}
.dm button.m {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  color: var(--fg);
  text-align: right;
  cursor: pointer;
  font: inherit;
  padding: 0;
}
.dm b {
  display: block;
  font-size: .88rem;
}
.dm small {
  display: block;
  color: var(--muted);
  font-size: .72rem;
}
.dm p {
  margin: 4px 0 0;
  font-size: .84rem;
  line-height: 1.7;
}

/* Revisions Grouped Accordion & Controls */
.rev-controls-wrap {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rev-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 12px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}
.rev-search-box input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.84rem;
}
.rev-search-box input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}
.rev-filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.rev-chip {
  padding: 5px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all 0.2s ease;
}
.rev-chip.active {
  background: rgba(230, 212, 142, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}
.rev-mode-switch {
  display: flex;
  gap: 3px;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.rev-chip-mode {
  padding: 4px 10px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.rev-chip-mode.active {
  background: rgba(230, 212, 142, 0.2);
  color: var(--accent);
}

/* Accordion Project Card */
.rev-group-card {
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--line);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  animation: in 0.35s ease backwards;
}
.rev-group-card:hover {
  border-color: rgba(230, 212, 142, 0.35);
}
.rev-group-header {
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
  gap: 10px;
  transition: background 0.2s ease;
}
.rev-group-header:hover {
  background: rgba(255, 255, 255, 0.05);
}
.rev-group-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.rev-group-text {
  flex: 1;
  min-width: 0;
}
.rev-group-title {
  display: block;
  font-size: 0.86rem;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rev-group-subtitle {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.rev-group-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.rev-group-count-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(230, 212, 142, 0.15);
  color: var(--accent);
}
.rev-group-voice-badge {
  font-size: 0.85rem;
}
.rev-group-arrow {
  font-size: 0.85rem;
  color: var(--muted);
  display: inline-block;
  transition: transform 0.25s ease;
}
.rev-group-card.open .rev-group-arrow {
  transform: rotate(180deg);
}
.rev-group-body {
  padding: 10px 12px 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: none;
}
.rev-group-card.open .rev-group-body {
  display: block;
}
.rev-group-body .dm {
  background: rgba(0, 0, 0, 0.25);
  margin-bottom: 8px;
  padding: 8px 10px;
  border-color: rgba(255, 255, 255, 0.06);
}
.rev-load-more-btn {
  padding: 8px 18px;
  border-radius: 12px;
  background: rgba(230, 212, 142, 0.12);
  border: 1px solid rgba(230, 212, 142, 0.3);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.rev-load-more-btn:hover {
  background: rgba(230, 212, 142, 0.22);
  border-color: var(--accent);
}
.rev-resolved-details summary::-webkit-details-marker {
  display: none;
}
h2.sec {
  font-size: .9rem;
  color: var(--muted);
  margin: 18px 0 10px;
  font-weight: 600;
}

/* Reels gallery */
.rg {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.rl {
  aspect-ratio: 9/14;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(170deg, #eadfae, #9bb065 70%, #4e5c2c);
  color: #1b1e0e;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  text-align: right;
  cursor: pointer;
  font: inherit;
  position: relative;
  animation: in .4s ease backwards;
}
.rl::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(27, 30, 14, .55);
}
.rl::after {
  content: "";
  position: absolute;
  top: 21px;
  left: 23px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #f4ecd0;
}
.rl b {
  font-size: .92rem;
}
.rl small {
  font-size: .72rem;
  opacity: .8;
}

/* Wipe page transition */
.pg {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 42%, #2e3317, #14160a);
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}
.pg.in {
  visibility: visible;
  pointer-events: auto;
  animation: pgin .36s cubic-bezier(.6, 0, .2, 1) forwards;
}
.pg.out {
  visibility: visible;
  pointer-events: auto;
  animation: pgout .45s cubic-bezier(.7, 0, .3, 1) forwards;
}
.pg .a1, .pg .a2, .pg #wlogo {
  animation-play-state: paused;
}
.pg.in .a1, .pg.in .a2, .pg.in #wlogo,
.pg.out .a1, .pg.out .a2, .pg.out #wlogo {
  animation-play-state: running;
}
@keyframes pgin {
  from { opacity: 1; clip-path: circle(0% at 50% 50%); }
  to { opacity: 1; clip-path: circle(150% at 50% 50%); }
}
@keyframes pgout {
  from { opacity: 1; clip-path: circle(150% at 50% 50%); }
  to { opacity: 1; clip-path: circle(0% at 50% 50%); }
}

/* Initial loader */
.ld {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
  background: radial-gradient(circle at 50% 42%, #2e3317, #14160a);
  transition: opacity .45s ease, transform .45s ease, visibility .45s ease;
  visibility: visible;
}
.ld.out {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
  visibility: hidden;
}
.ld-progress-wrap {
  width: min(82vw, 290px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ld-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--muted);
}
.ld-progress-meta b {
  color: var(--accent);
  font-weight: 800;
  font-size: 0.82rem;
  flex: none;
}
.ld-progress-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(234, 223, 174, 0.12);
  border: 1px solid rgba(234, 223, 174, 0.18);
  overflow: hidden;
}
.ld-progress-fill {
  width: 6%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8fa35a, #e6d48e, #f4ebc4);
  box-shadow: 0 0 12px rgba(230, 212, 142, 0.55);
  transition: width 0.28s ease;
}
.ld-box {
  position: relative;
  width: min(56vw, 210px);
  aspect-ratio: 1;
}
.ld-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.ld-svg circle {
  fill: none;
  stroke-linecap: round;
}
.ld-svg .tr {
  stroke: rgba(234, 223, 174, .14);
  stroke-width: 2;
}
.ld-svg .a1 {
  stroke: url(#ldg);
  stroke-width: 4.5;
  transform-origin: 100px 100px;
  animation: spin 1.7s linear infinite, arc 1.9s ease-in-out infinite;
}
.ld-svg .a2 {
  stroke: #c9a94e;
  stroke-width: 2;
  stroke-dasharray: 26 502;
  transform-origin: 100px 100px;
  animation: spin 2.6s linear infinite reverse;
}
.ld-box img, .ld-box .brand-monogram-circle {
  position: absolute;
  inset: 14%;
  width: 72%;
  height: 72%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e6d48e, #8fa35a);
  color: #1b1e0e;
  font-weight: 900;
  font-size: 2.4rem;
  letter-spacing: -0.05em;
  filter: drop-shadow(0 0 18px rgba(230, 212, 142, .35));
  animation: breathe 2.2s ease-in-out infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes arc {
  0%, 100% { stroke-dasharray: 70 521; }
  50% { stroke-dasharray: 310 281; }
}
@keyframes breathe {
  0%, 100% { transform: scale(.96); }
  50% { transform: scale(1.04); }
}

/* Toast feedback system */
.toast-container {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(92vw, 420px);
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(30, 34, 16, 0.94);
  border: 1px solid var(--line);
  color: var(--fg);
  font-size: .88rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  animation: in .25s ease forwards;
  backdrop-filter: blur(8px);
}
.toast.success {
  border-color: rgba(58, 166, 107, 0.5);
}
.toast.error {
  border-color: rgba(214, 69, 69, 0.5);
}
.toast svg {
  width: 20px;
  height: 20px;
  flex: none;
}

@media (prefers-reduced-motion: reduce) {
  *, .scr {
    animation: none !important;
  }
  .pg {
    display: none !important;
  }
}

/* ==========================================
   Google Calendar Weekly Strip & Home Styles
   ========================================== */
.cal-wrapper {
  margin: 10px 0 16px;
  padding: 12px 14px;
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cal-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cal-nav-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cal-btn {
  padding: 4px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg);
  font-size: 0.78rem;
  cursor: pointer;
  transition: background .15s ease;
}
.cal-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.cal-strip {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}
.cal-day-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all .2s ease;
  min-width: 0;
}
.cal-day-box:hover {
  background: rgba(255, 255, 255, 0.08);
}
.cal-day-box.sel {
  background: rgba(230, 212, 142, 0.18);
  border-color: rgba(230, 212, 142, 0.5);
  box-shadow: 0 0 12px rgba(230, 212, 142, 0.2);
}
.cal-day-box.today:not(.sel) {
  border-color: rgba(255, 255, 255, 0.3);
}
.cal-day-name {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 2px;
}
.cal-day-box.sel .cal-day-name {
  color: var(--accent);
  font-weight: 700;
}
.cal-day-num {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.2;
}
.cal-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 4px;
  opacity: 0.9;
}
.cal-empty-card {
  padding: 30px 20px;
  text-align: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--line);
  margin: 14px 0;
}
.cal-empty-card b {
  display: block;
  margin: 8px 0 4px;
}

/* Home Mode Switcher & Filter Chips */
.home-mode-bar {
  display: flex;
  gap: 8px;
  margin: 12px 0 14px;
}
.mode-pill {
  flex: 1;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all .2s ease;
}
.mode-pill.on {
  background: rgba(230, 212, 142, 0.16);
  border-color: rgba(230, 212, 142, 0.4);
  color: var(--fg);
}
.filter-chips-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.filter-chips-bar::-webkit-scrollbar {
  display: none;
}
.fchip {
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.fchip.on {
  background: var(--fg);
  color: #1b1e0e;
  border-color: var(--fg);
}

/* Quick Action Buttons on Task Cards */
.tk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.qbtn {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.qbtn-accent {
  background: rgba(230, 212, 142, 0.16);
  border-color: rgba(230, 212, 142, 0.35);
  color: var(--accent);
}
.qbtn-accent:hover {
  background: rgba(230, 212, 142, 0.28);
}
.qbtn-success {
  background: rgba(120, 190, 140, 0.2);
  border-color: rgba(120, 190, 140, 0.4);
  color: #9fe0b0;
}
.qbtn-success:hover {
  background: rgba(120, 190, 140, 0.32);
}
.qbtn-warning {
  background: rgba(240, 150, 80, 0.18);
  border-color: rgba(240, 150, 80, 0.4);
  color: #ffb070;
}
.qbtn-warning:hover {
  background: rgba(240, 150, 80, 0.3);
}

/* Timecode Badge in Revisions */
.tc-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(230, 212, 142, 0.18);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  margin-left: 6px;
}

/* In-App Video Player Modal */
.video-modal-card {
  width: 100%;
  max-width: 380px;
  background: rgba(20, 24, 12, 0.96);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: in .3s ease forwards;
}
.video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.video-9-16-container {
  width: 100%;
  aspect-ratio: 9/16;
  max-height: 60vh;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Release Enhancements: Profile Dashboard, Reels Showcase, Audio & Smart Jump
   ========================================================================== */

/* Profile Dashboard & Personal Ledger */
.profile-sub-nav {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-bottom: 20px;
}
.psub-btn {
  flex: 1;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.psub-btn.active {
  background: var(--accent);
  color: #1a1e0b;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(230, 212, 142, 0.25);
}

.profile-hero {
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(230, 212, 142, 0.08) 0%, rgba(30, 36, 18, 0.7) 100%);
  border: 1px solid var(--line);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.profile-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e6d48e, #9bb065);
  color: #1a1e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(230, 212, 142, 0.3);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(230, 212, 142, 0.4);
}
.profile-avatar .profile-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 2;
}
.profile-avatar .profile-avatar-img.loaded {
  opacity: 1;
}
.profile-avatar .profile-avatar-initial {
  position: relative;
  z-index: 1;
}
.profile-info {
  flex: 1;
}
.profile-name {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.role-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(230, 212, 142, 0.16);
  color: var(--accent);
  border: 1px solid rgba(230, 212, 142, 0.3);
}

/* Personal Payroll & Settlement Card */
.payroll-card {
  padding: 20px;
  border-radius: 22px;
  background: rgba(25, 30, 15, 0.85);
  border: 1px solid rgba(230, 212, 142, 0.35);
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.payroll-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.payroll-title {
  font-size: 0.96rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}
.payroll-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  text-align: center;
}
.payroll-col {
  padding: 12px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.payroll-col.settled {
  border-color: rgba(90, 200, 120, 0.25);
  background: rgba(90, 200, 120, 0.05);
}
.payroll-col.pending {
  border-color: rgba(240, 180, 60, 0.25);
  background: rgba(240, 180, 60, 0.05);
}
.payroll-num {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 4px;
  display: block;
}
.payroll-lbl {
  font-size: 0.72rem;
  color: var(--muted);
  display: block;
}

/* KPI Stats Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.kpi-card {
  padding: 14px 10px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--line);
  text-align: center;
}
.kpi-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
  display: block;
}
.kpi-lbl {
  font-size: 0.72rem;
  color: var(--muted);
}

/* Voice Audio Player in Revisions */
.rev-audio-player {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.rev-audio-player audio {
  width: 100%;
  height: 32px;
  outline: none;
}

/* Enhanced Reels & Publication Showcase */
.rg-enhanced {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.reel-item-card {
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(35, 42, 22, 0.9) 0%, rgba(20, 24, 12, 0.95) 100%);
  border: 1px solid var(--line);
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 135px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.reel-item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(230, 212, 142, 0.4);
}
.reel-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
}
.reel-client-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(230, 212, 142, 0.12);
  padding: 2px 7px;
  border-radius: 6px;
}
.reel-status-dot {
  font-size: 0.70rem;
  color: var(--muted);
}
.reel-title {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 6px 0 8px;
  flex: 1;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.reel-actions-bar {
  display: flex;
  gap: 5px;
  margin-top: auto;
}
.btn-reel-play {
  flex: 1;
  padding: 5px 8px;
  border-radius: 8px;
  border: 0;
  background: var(--accent);
  color: #1a1e0b;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.btn-reel-copy {
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: inherit;
  font-size: 0.76rem;
  cursor: pointer;
}

/* Explore Pinned Ribbon */
.pinned-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #f5b041;
  background: rgba(245, 176, 65, 0.15);
  border: 1px solid rgba(245, 176, 65, 0.3);
  padding: 1px 6px;
  border-radius: 6px;
  margin-left: 6px;
}

/* Calendar Milestone Badges & Color Dots (Idea 2) */
.cal-dots-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-top: 4px;
  min-height: 6px;
}
.cal-dot-deadline {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff4d4f;
  box-shadow: 0 0 6px rgba(255, 77, 79, 0.7);
}
.cal-dot-shooting {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1890ff;
  box-shadow: 0 0 6px rgba(24, 144, 255, 0.7);
}
.cal-dot-publish {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #52c41a;
  box-shadow: 0 0 6px rgba(82, 196, 26, 0.7);
}
.cal-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.72rem;
  color: var(--muted);
}
.cal-legend .leg-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cal-btn.highlight {
  background: rgba(230, 212, 142, 0.16);
  border-color: rgba(230, 212, 142, 0.4);
  color: var(--accent);
  font-weight: 700;
}
.day-milestone-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.day-milestone-tag.tag-deadline {
  background: rgba(255, 77, 79, 0.15);
  border: 1px solid rgba(255, 77, 79, 0.35);
  color: #ff7875;
}
.day-milestone-tag.tag-shooting {
  background: rgba(24, 144, 255, 0.15);
  border: 1px solid rgba(24, 144, 255, 0.35);
  color: #69c0ff;
}
.day-milestone-tag.tag-publish {
  background: rgba(82, 196, 26, 0.15);
  border: 1px solid rgba(82, 196, 26, 0.35);
  color: #95de64;
}
.milestones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin: 10px 0;
}
.ms-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: all .2s ease;
}
.ms-pill.deadline {
  border-color: rgba(255, 77, 79, 0.25);
  background: rgba(255, 77, 79, 0.05);
}
.ms-pill.shooting {
  border-color: rgba(24, 144, 255, 0.25);
  background: rgba(24, 144, 255, 0.05);
}
.ms-pill.publish {
  border-color: rgba(82, 196, 26, 0.25);
  background: rgba(82, 196, 26, 0.05);
}
.ms-pill.target-active {
  box-shadow: 0 0 10px rgba(230, 212, 142, 0.3);
  border-color: var(--accent);
  background: rgba(230, 212, 142, 0.12);
}
.ms-pill .ms-icon {
  font-size: 1.1rem;
}
.ms-pill .ms-content {
  display: flex;
  flex-direction: column;
}
.ms-pill .ms-content small {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.1;
}
.ms-pill .ms-content b {
  font-size: 0.78rem;
  color: var(--fg);
  line-height: 1.3;
}


/* ===================================================
   Idea 1 & 2: Task Dispatch Offer Hero & Accept Action
   =================================================== */
.task-offer-hero {
  margin: 12px 0 18px;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(230, 212, 142, 0.12) 0%, rgba(20, 24, 20, 0.85) 100%);
  border: 1px solid rgba(230, 212, 142, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 0 20px rgba(230, 212, 142, 0.08);
  animation: glowPulse 4s infinite alternate;
}

@keyframes glowPulse {
  0% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 0 10px rgba(230, 212, 142, 0.05); }
  100% { box-shadow: 0 8px 36px rgba(230, 212, 142, 0.2), inset 0 0 25px rgba(230, 212, 142, 0.15); }
}

.toh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.toh-header-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Instagram-Style Snap Carousel for Project Offers */
.task-offer-hero.instagram-carousel {
  margin: 12px 0 20px;
  padding: 14px 12px 14px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(230, 212, 142, 0.12) 0%, rgba(18, 22, 18, 0.94) 100%);
  border: 1px solid rgba(230, 212, 142, 0.35);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45), inset 0 0 20px rgba(230, 212, 142, 0.08);
  position: relative;
  overflow: hidden;
}

.toh-carousel-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.45);
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid rgba(230, 212, 142, 0.25);
}

.toh-carousel-counter {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  padding: 0 4px;
  white-space: nowrap;
}

.toh-nav-btn {
  background: rgba(230, 212, 142, 0.15);
  border: none;
  color: var(--accent);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.toh-nav-btn:hover {
  background: var(--accent);
  color: #121412;
  transform: scale(1.1);
}

.toh-carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding: 8px 4px 10px;
  scrollbar-width: none;
}

.toh-carousel-track::-webkit-scrollbar {
  display: none;
}

.toh-carousel-slide {
  flex: 0 0 88%;
  max-width: 360px;
  min-width: 285px;
  scroll-snap-align: center;
  margin: 0 !important;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .toh-carousel-slide {
    flex: 0 0 380px;
  }
}

.toh-carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.toh-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(230, 212, 142, 0.25);
  transition: all 0.25s ease;
  cursor: pointer;
}

.toh-dot.active {
  width: 18px;
  border-radius: 6px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(230, 212, 142, 0.6);
}

.toh-sparkle {
  font-size: 1.5rem;
}

.toh-title b {
  display: block;
  font-size: 1rem;
  color: var(--accent);
  font-weight: 800;
}

.toh-title small {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.tk.task-offer-card {
  border: 1.5px solid rgba(230, 212, 142, 0.5) !important;
  background: linear-gradient(160deg, rgba(230, 212, 142, 0.08) 0%, rgba(25, 27, 24, 0.95) 100%) !important;
  position: relative;
  overflow: hidden;
}

.offer-badge-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(230, 212, 142, 0.2);
  border: 1px solid rgba(230, 212, 142, 0.4);
  color: #f7e7a9;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.74rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.wage-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(24, 144, 255, 0.12);
  border: 1px solid rgba(24, 144, 255, 0.3);
  color: #91d5ff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.74rem;
  font-weight: 700;
  margin-bottom: 8px;
  margin-right: 6px;
}

/* 3-Tier Incentive Rules Box (Ultra Clean Flex Rows) */
.incentive-rules-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 12px;
}

.incentive-tier {
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
}

.tier-top {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tier-desc {
  margin: 0;
  color: var(--fg);
  opacity: 0.88;
  font-size: 0.68rem;
  line-height: 1.3;
}

.incentive-tier.bonus {
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.3);
  color: #a7f3d0;
}

.incentive-tier.ontime {
  background: rgba(230, 212, 142, 0.08);
  border-color: rgba(230, 212, 142, 0.3);
  color: #fde68a;
}

.incentive-tier.penalty {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}

.tier-top {
  display: flex;
  align-items: center;
  gap: 5px;
}

.tier-icon {
  font-size: 0.95rem;
}

.tier-title {
  font-weight: 700;
  font-size: 0.76rem;
}

.tier-desc {
  margin: 0;
  color: var(--fg);
  opacity: 0.85;
  font-size: 0.68rem;
  line-height: 1.35;
}

/* 1-Click Accept Button */
.btn-accept-project {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  border-radius: 16px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.4);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-accept-project:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.6);
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
}

.btn-accept-project:active {
  transform: translateY(0);
}

.btn-accept-project .btn-icon {
  font-size: 1.1rem;
  font-weight: 900;
}

/* ===================================================
   Idea 3: Live Incentive Pill & Delivery Tracker
   =================================================== */
.live-incentive-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.76rem;
  font-weight: 700;
  margin: 8px 0 6px;
  border: 1px solid transparent;
}

.live-incentive-pill.inc-badge-bonus {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

.live-incentive-pill.inc-badge-ontime {
  background: rgba(230, 212, 142, 0.12);
  border-color: rgba(230, 212, 142, 0.35);
  color: #fde68a;
}

.live-incentive-pill.inc-badge-penalty {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.4);
  color: #fca5a5;
  animation: pulseWarning 2s infinite;
}

.live-incentive-pill.inc-badge-done {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.35);
  color: #93c5fd;
}

@keyframes pulseWarning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

/* ==========================================================================
   Multi-Source Avatar, Customer Switcher & Telegram Media Styles
   ========================================================================== */

/* Enhanced Avatar Image with Smooth Loaded Transition */
.av {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.av .av-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}
.av .av-img.loaded {
  opacity: 1;
}
.av .init {
  position: relative;
  z-index: 0;
}

/* Horizontal Quick Customer Switcher Strip */
.client-quick-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  margin-bottom: 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.client-quick-strip::-webkit-scrollbar {
  display: none;
}
.client-strip-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 7px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--fg);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 0.82rem;
  flex-shrink: 0;
}
.client-strip-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.client-strip-chip.active {
  background: rgba(80, 200, 120, 0.16);
  border-color: rgba(80, 200, 120, 0.55);
  color: #50c878;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(80, 200, 120, 0.18);
}
.client-strip-chip .chip-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dossier Header & Client Switcher Button */
.ph-dossier {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.client-switcher-wrap {
  display: flex;
  align-items: center;
}
.client-switcher-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 6px 14px 6px 12px;
  color: var(--fg);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.client-switcher-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}
.csb-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
}
.csb-tag {
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.4px;
  margin-bottom: 1px;
}
.csb-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.csb-title {
  font-size: 1.05rem;
  font-weight: 700;
}
.csb-arrow {
  font-size: 0.72rem;
  color: var(--muted);
  transition: transform 0.2s ease;
}
.client-switcher-btn:hover .csb-arrow {
  transform: translateY(2px);
  color: var(--fg);
}

/* Dossier Avatar with Live Refresh */
.dh-avatar-wrap {
  position: relative;
  display: inline-block;
}
.avatar-refresh-btn {
  position: absolute;
  bottom: 0px;
  left: 0px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(25, 35, 25, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.2s ease;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.avatar-refresh-btn:hover {
  background: rgba(40, 70, 40, 0.98);
  transform: scale(1.15) rotate(90deg);
}
.avatar-upload-btn {
  position: absolute;
  bottom: 0px;
  right: -2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(38, 44, 24, 0.95);
  border: 1px solid rgba(230, 212, 142, 0.45);
  color: var(--accent);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.avatar-upload-btn:hover {
  background: rgba(66, 76, 38, 0.98);
  transform: scale(1.12);
}

/* Task Card Media Thumbnail - Ambient Backdrop Pattern (Anti-Pixelation) */
.tk-card-cover-wrap {
  width: 100%;
  height: 140px;
  border-radius: 14px;
  overflow: hidden;
  margin: 8px 0 10px;
  background: radial-gradient(circle at center, rgba(35, 40, 32, 0.95) 0%, rgba(16, 18, 16, 0.98) 100%);
  border: 1px solid rgba(230, 212, 142, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.tk-card-cover-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  image-rendering: -webkit-optimize-contrast;
}
.tk:hover .tk-card-cover-img {
  transform: scale(1.04);
}

/* Task Detail Sheet Media Showcase */
.task-media-showcase {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 14px 0 18px;
}
.media-cover-card, .media-video-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
.media-card-label {
  font-size: 0.82rem;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}
.media-img-box {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(35, 40, 32, 0.95) 0%, rgba(16, 18, 16, 0.98) 100%);
  border: 1px solid rgba(230, 212, 142, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  min-height: 160px;
}
.detail-cover-img {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  display: block;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
  image-rendering: -webkit-optimize-contrast;
}

/* Video Preview Fallback when > 20MB */
.video-preview-fallback {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #fcd34d;
  font-size: 0.8rem;
  line-height: 1.5;
}
.video-preview-fallback .fb-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}
.video-preview-fallback b {
  display: block;
  font-size: 0.86rem;
  margin-bottom: 2px;
  color: #fbbf24;
}
.video-preview-fallback p {
  margin: 0;
  opacity: 0.9;
}
.video-preview-fallback.hidden {
  display: none !important;
}

.media-dl-btn.primary {
  background: linear-gradient(135deg, rgba(230, 212, 142, 0.25) 0%, rgba(200, 180, 110, 0.18) 100%);
  border: 1px solid rgba(230, 212, 142, 0.45);
  color: var(--accent);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.media-dl-btn.primary:hover {
  background: rgba(230, 212, 142, 0.35);
  color: #fff;
}

/* Revision Badge Avatar */
.av.rev-badge-av {
  background: linear-gradient(135deg, rgba(230, 212, 142, 0.25) 0%, rgba(24, 144, 255, 0.2) 100%);
  border: 1px solid rgba(230, 212, 142, 0.4);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-video-player {
  width: 100%;
  max-height: 320px;
  border-radius: 12px;
  background: #000;
  outline: none;
  display: block;
}
.media-video-actions {
  margin-top: 8px;
}
.media-dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--fg);
  text-decoration: none;
  font-size: 0.82rem;
  transition: background 0.2s ease, border-color 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}
.media-dl-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ==========================================================================
   Refined Swipeable Stories, Anti-Horizontal-Overflow Modal & Active Badges
   ========================================================================== */

/* Stories: Smooth touch swipe & mouse drag */
.stories {
  display: flex !important;
  gap: 12px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-behavior: smooth !important;
  scrollbar-width: none !important;
  cursor: grab !important;
  user-select: none !important;
  touch-action: pan-x pan-y !important;
  padding: 4px 6px 12px !important;
}
.stories:active {
  cursor: grabbing !important;
}
.stories::-webkit-scrollbar {
  display: none !important;
}

/* Quick Strip: Smooth touch swipe & mouse drag */
.client-quick-strip {
  display: flex !important;
  gap: 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-behavior: smooth !important;
  scrollbar-width: none !important;
  cursor: grab !important;
  user-select: none !important;
  touch-action: pan-x pan-y !important;
  padding: 4px 4px 10px !important;
  margin-bottom: 6px !important;
}
.client-quick-strip:active {
  cursor: grabbing !important;
}
.client-quick-strip::-webkit-scrollbar {
  display: none !important;
}

.client-strip-chip.has-active-tasks {
  border-color: rgba(80, 200, 120, 0.4);
}
.client-strip-chip.is-inactive {
  opacity: 0.55;
}
.client-strip-chip .chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #50c878;
  display: inline-block;
  margin-right: 3px;
  box-shadow: 0 0 6px #50c878;
}

/* Modal Client Selector: Zero Horizontal Scroll on Hover */
#sheet-clients-container {
  max-height: 420px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important; /* Strictly forbid horizontal scroll */
  padding: 4px 6px 14px 6px !important;
  box-sizing: border-box !important;
  scrollbar-width: thin !important;
  width: 100% !important;
}
#sheet-clients-container::-webkit-scrollbar {
  width: 5px !important;
}
#sheet-clients-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px !important;
}
#sheet-clients-container .lg.opt {
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 0 8px 0 !important;
  transform: none !important; /* Zero horizontal scaling */
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease !important;
}
#sheet-clients-container .lg.opt:hover {
  transform: translateY(-2px) !important; /* Lift upward only! */
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}
#sheet-clients-container .lg.opt:active {
  transform: translateY(0) !important;
}

.sheet-section-title {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 700;
  padding: 8px 10px 4px;
  margin-top: 6px;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sheet-section-title.inactive {
  color: var(--muted);
  margin-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}


/* Premium Circular Brand Loading Logo */
.brand-loading-logo {
  position: absolute;
  inset: 13%;
  width: 74%;
  height: 74%;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(230, 212, 142, 0.4);
  animation: logoPulse 2.8s infinite ease-in-out alternate;
}

@keyframes logoPulse {
  0% { transform: scale(0.96); filter: drop-shadow(0 0 10px rgba(230, 212, 142, 0.3)); }
  100% { transform: scale(1.02); filter: drop-shadow(0 0 24px rgba(230, 212, 142, 0.65)); }
}


/* Carousel Controls & Reset Button (Photo 1 Fix) */
.toh-nav-btn.reset {
  font-size: 0.95rem;
  width: 24px;
  height: 24px;
  background: rgba(230, 212, 142, 0.12);
  margin-inline-end: 2px;
}

.toh-nav-btn.reset:hover {
  background: var(--accent);
  color: #121412;
  transform: rotate(-180deg) scale(1.1);
}

/* Dedicated Scrollable Container for Agenda & Task Board (Photo 2 Fix) */
.home-tasks-scroll-container {
  max-height: 58vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 4px 6px 18px 4px;
  margin-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(230, 212, 142, 0.4) rgba(0, 0, 0, 0.2);
  border-radius: 16px;
}

@media (min-width: 768px) {
  .home-tasks-scroll-container {
    max-height: 600px;
  }
}

.home-tasks-scroll-container::-webkit-scrollbar {
  width: 6px;
}

.home-tasks-scroll-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  margin: 6px 0;
}

.home-tasks-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(230, 212, 142, 0.35);
  border-radius: 10px;
  border: 1px solid rgba(230, 212, 142, 0.15);
  transition: background 0.2s;
}

.home-tasks-scroll-container::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
