/* ============================================================
   BILAL STUDIO — CLIENT OS
   Private operating system for client projects.
   Extends the public-site visual language: dark space, glass
   layers, technical mono labels, cyan wiring, calm motion.
   ============================================================ */

:root {
  --charcoal:   #0B0F14;
  --midnight:   #0F1722;
  --panel:      #0d141d;
  --electric:   #2B8CFF;
  --cyan:       #4FD1FF;
  --white:      #F2F2F2;
  --gray:       #8A9199;
  --indigo:     #1A1F2E;

  --green:      #46e3a0;
  --amber:      #FFC656;
  --rose:       #FF6B8B;

  --line:       rgba(242, 242, 242, 0.08);
  --line-2:     rgba(242, 242, 242, 0.14);
  --line-hot:   rgba(79, 209, 255, 0.35);
  --glass:      rgba(15, 23, 34, 0.55);
  --glass-2:    rgba(15, 23, 34, 0.78);

  --font-display: "Clash Display", "Archivo Black", sans-serif;
  --font-body:    "Satoshi", "Helvetica Neue", sans-serif;
  --font-mono:    "JetBrains Mono", monospace;

  --rail: 268px;
  --gutter: clamp(1.1rem, 3vw, 2.75rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--charcoal);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--electric); color: var(--charcoal); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--indigo); border: 2px solid var(--charcoal); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #243047; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.dim { color: var(--gray); }
.cy  { color: var(--cyan); }

/* ---------- atmosphere ---------- */
.cos-noise {
  position: fixed; inset: -50%; z-index: 0; pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cos-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 80% at 70% 0%, black 10%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 70% 0%, black 10%, transparent 80%);
}

/* ============================================================
   APP SHELL
   ============================================================ */
.cos-app {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  min-height: 100vh;
}

/* ---------- sidebar / rail ---------- */
.cos-rail {
  position: sticky; top: 0; align-self: start;
  height: 100vh;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15,23,34,0.6), rgba(11,15,20,0.6));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 40;
}
.cos-rail__brand {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.cos-rail__brand img { height: 1.3rem; width: auto; }
.cos-rail__badge {
  font-family: var(--font-mono); font-size: 0.5rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid var(--line-hot);
  padding: 0.18rem 0.4rem; border-radius: 2px;
  margin-left: auto;
}

.cos-rail__scroll { flex: 1; overflow-y: auto; padding: 1rem 0.85rem; display: flex; flex-direction: column; gap: 1.4rem; }
.cos-navgroup { display: grid; gap: 0.2rem; }
.cos-navgroup__label {
  font-family: var(--font-mono); font-size: 0.5625rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gray);
  padding: 0 0.65rem 0.5rem;
}
.cos-nav {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.62rem 0.7rem; border-radius: var(--radius);
  color: var(--gray);
  font-size: 0.875rem; font-weight: 500;
  border: 1px solid transparent;
  position: relative;
  transition: color 0.22s, background 0.22s, border-color 0.22s;
}
.cos-nav svg { width: 16px; height: 16px; flex: none; opacity: 0.8; }
.cos-nav:hover { color: var(--white); background: rgba(79,209,255,0.05); }
.cos-nav.is-active { color: var(--white); background: rgba(79,209,255,0.08); border-color: var(--line-hot); }
.cos-nav.is-active::before {
  content: ""; position: absolute; left: -0.85rem; top: 50%; transform: translateY(-50%);
  width: 2px; height: 18px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan);
}
.cos-nav__count {
  margin-left: auto; font-family: var(--font-mono); font-size: 0.625rem;
  background: var(--indigo); color: var(--cyan);
  padding: 0.1rem 0.4rem; border-radius: 99px; min-width: 1.3rem; text-align: center;
}

.cos-rail__foot { border-top: 1px solid var(--line); padding: 0.85rem; }
.cos-user { display: flex; align-items: center; gap: 0.65rem; padding: 0.4rem; }
.cos-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--electric), var(--cyan));
  color: var(--charcoal); font-weight: 700; font-size: 0.85rem;
  font-family: var(--font-display);
}
.cos-user__meta { min-width: 0; }
.cos-user__name { font-size: 0.8125rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cos-user__role { font-family: var(--font-mono); font-size: 0.5625rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray); }
.cos-signout {
  margin-left: auto; background: none; border: 1px solid var(--line);
  color: var(--gray); width: 30px; height: 30px; border-radius: var(--radius);
  display: grid; place-items: center; transition: color 0.2s, border-color 0.2s;
}
.cos-signout:hover { color: var(--rose); border-color: var(--rose); }

/* ---------- main column ---------- */
.cos-main { min-width: 0; display: flex; flex-direction: column; }
.cos-topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 1rem;
  padding: 0.9rem var(--gutter);
  border-bottom: 1px solid var(--line);
  background: rgba(11,15,20,0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.cos-burger { display: none; background: none; border: 1px solid var(--line); color: var(--white);
  width: 38px; height: 38px; border-radius: var(--radius); place-items: center; }
.cos-crumbs { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono);
  font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray); min-width: 0; }
.cos-crumbs a:hover { color: var(--cyan); }
.cos-crumbs span.sep { color: var(--indigo); }
.cos-crumbs b { color: var(--white); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cos-topbar__right { margin-left: auto; display: flex; align-items: center; gap: 0.85rem; }
.cos-clock { font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.14em; color: var(--gray); }
.cos-status {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-mono); font-size: 0.5625rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray);
}
.cos-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); animation: cos-blink 2.6s infinite; }
@keyframes cos-blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

.cos-content { padding: clamp(1.4rem, 3vw, 2.6rem) var(--gutter) 5rem; flex: 1; }
.cos-content.is-wide { max-width: 1500px; }

/* ---------- page head ---------- */
.cos-pagehead { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.cos-pagehead__idx { color: var(--electric); margin-bottom: 0.7rem; }
.cos-pagehead h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1; letter-spacing: -0.01em; text-transform: uppercase;
}
.cos-pagehead p { color: var(--gray); margin-top: 0.7rem; max-width: 60ch; }
.cos-pagehead__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ============================================================
   PRIMITIVES
   ============================================================ */
.glass {
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  position: relative; border-radius: var(--radius);
}
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); position: relative;
}
.panel--hover { transition: border-color 0.3s, transform 0.3s var(--ease-out); }
.panel--hover:hover { border-color: var(--line-hot); transform: translateY(-3px); }

.panel__bar, .glass__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); color: var(--gray);
}
.panel__bar .mono { color: var(--gray); }
.panel__body { padding: 1.15rem; }

/* corner ticks */
.tick { position: absolute; width: 10px; height: 10px; pointer-events: none; }
.tick.tl { top:-1px; left:-1px; border-top:1.5px solid var(--cyan); border-left:1.5px solid var(--cyan); }
.tick.tr { top:-1px; right:-1px; border-top:1.5px solid var(--cyan); border-right:1.5px solid var(--cyan); }
.tick.bl { bottom:-1px; left:-1px; border-bottom:1.5px solid var(--cyan); border-left:1.5px solid var(--cyan); }
.tick.br { bottom:-1px; right:-1px; border-bottom:1.5px solid var(--cyan); border-right:1.5px solid var(--cyan); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.78rem 1.3rem; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase;
  border: 1px solid transparent; position: relative; overflow: hidden;
  background: transparent; color: var(--white); /* never inherit the UA button-face fill */
  transition: color 0.25s, border-color 0.25s, background 0.25s, opacity 0.2s;
  white-space: nowrap; -webkit-appearance: none; appearance: none;
}
.btn svg { width: 0.9em; height: 0.9em; flex: none; }
.btn--solid { background: var(--white); color: var(--charcoal); }
.btn--solid:hover { background: var(--electric); color: var(--white); }
.btn--cyan { background: var(--cyan); color: var(--charcoal); }
.btn--cyan:hover { background: #76dbff; }
.btn--ghost { border-color: rgba(242,242,242,0.22); color: var(--white); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(79,209,255,0.06); }
.btn--danger { border-color: rgba(255,107,139,0.4); color: var(--rose); }
.btn--danger:hover { background: rgba(255,107,139,0.1); }
.btn--sm { padding: 0.55rem 0.9rem; font-size: 0.625rem; }
.btn--lg { padding: 1rem 1.8rem; font-size: 0.78rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.45; pointer-events: none; }

/* status pills */
.pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-mono); font-size: 0.5625rem; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase;
  padding: 0.28rem 0.6rem; border-radius: 99px;
  border: 1px solid var(--line-2); color: var(--gray);
  white-space: nowrap;
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--cyan   { color: var(--cyan);    border-color: rgba(79,209,255,0.4);  background: rgba(79,209,255,0.08); }
.pill--green  { color: var(--green);   border-color: rgba(70,227,160,0.4);  background: rgba(70,227,160,0.08); }
.pill--amber  { color: var(--amber);   border-color: rgba(255,198,86,0.4);  background: rgba(255,198,86,0.08); }
.pill--rose   { color: var(--rose);    border-color: rgba(255,107,139,0.4); background: rgba(255,107,139,0.08); }
.pill--blue   { color: var(--electric);border-color: rgba(43,140,255,0.45); background: rgba(43,140,255,0.1); }
.pill--mute   { color: var(--gray); }

/* progress bar */
.prog { height: 5px; background: var(--indigo); border-radius: 99px; overflow: hidden; }
.prog > i { display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--electric), var(--cyan));
  box-shadow: 0 0 12px rgba(79,209,255,0.5);
  transition: width 1s var(--ease-out); }
.prog--rose > i { background: var(--rose); box-shadow: none; }
.prog--amber > i { background: var(--amber); box-shadow: none; }

/* meta data list */
.datarows { display: grid; }
.datarows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.6rem 0; border-bottom: 1px solid var(--line); font-size: 0.8125rem; }
.datarows > div:last-child { border-bottom: none; }
.datarows dt, .datarows .k { font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray); }
.datarows dd, .datarows .v { color: var(--white); text-align: right; }

/* grids */
.grid { display: grid; gap: clamp(0.9rem, 1.6vw, 1.3rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (max-width: 1100px){ .grid-4 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 860px){ .grid-3, .grid-2 { grid-template-columns: 1fr; } .grid-4 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 560px){ .grid-4 { grid-template-columns: 1fr; } }

/* stat tiles */
.stat { padding: 1.1rem 1.2rem; }
.stat__k { font-family: var(--font-mono); font-size: 0.5625rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray); }
.stat__v { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1; margin-top: 0.5rem; }
.stat__sub { font-size: 0.75rem; color: var(--gray); margin-top: 0.35rem; }

/* section title */
.cos-sectiontitle { display: flex; align-items: center; gap: 0.8rem; margin: 0 0 1rem; }
.cos-sectiontitle h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.02em; }
.cos-sectiontitle .line { flex: 1; height: 1px; background: var(--line); }
.cos-sectiontitle a { font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); }

/* ============================================================
   PROJECT CARD
   ============================================================ */
.pcard { display: flex; flex-direction: column; padding: 1.2rem; gap: 0.95rem; cursor: pointer; }
.pcard__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.pcard__code { font-family: var(--font-mono); font-size: 0.5625rem; letter-spacing: 0.16em; color: var(--gray); }
.pcard__title { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; text-transform: uppercase; line-height: 1.05; margin-top: 0.3rem; }
.pcard__client { font-size: 0.8rem; color: var(--gray); margin-top: 0.2rem; }
.pcard__prog-row { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.1em; color: var(--gray); margin-bottom: 0.45rem; }
.pcard__prog-row b { color: var(--cyan); font-size: 0.75rem; }
.pcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: auto; }

/* ============================================================
   PHASE TIMELINE
   ============================================================ */
.phases { display: flex; gap: 0; overflow-x: auto; padding-bottom: 0.4rem; }
.phase { flex: 1; min-width: 92px; position: relative; padding: 0.2rem 0.4rem 0; text-align: center; }
.phase__node {
  width: 18px; height: 18px; border-radius: 50%; margin: 0 auto 0.7rem;
  border: 2px solid var(--indigo); background: var(--charcoal); position: relative; z-index: 2;
  transition: all 0.4s var(--ease-out);
}
.phase::before { content:""; position: absolute; top: calc(0.2rem + 9px); left: -50%; width: 100%; height: 2px; background: var(--indigo); z-index: 1; }
.phase:first-child::before { display: none; }
.phase__label { font-family: var(--font-mono); font-size: 0.5625rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); display: block; }
.phase__state { font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 0.25rem; display: block; color: var(--indigo); }

.phase.is-complete .phase__node { background: var(--green); border-color: var(--green); box-shadow: 0 0 10px rgba(70,227,160,0.5); }
.phase.is-complete::before { background: var(--green); }
.phase.is-approved .phase__node { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 10px rgba(79,209,255,0.6); }
.phase.is-approved::before { background: var(--cyan); }
.phase.is-in_progress .phase__node { border-color: var(--cyan); background: var(--charcoal); animation: phase-pulse 2s infinite; }
.phase.is-in_progress .phase__state { color: var(--cyan); }
.phase.is-waiting_client .phase__node { border-color: var(--amber); background: var(--charcoal); animation: phase-pulse 2s infinite; }
.phase.is-waiting_client .phase__state { color: var(--amber); }
@keyframes phase-pulse { 0%,100%{ box-shadow: 0 0 0 0 rgba(79,209,255,0.4);} 50%{ box-shadow: 0 0 0 6px rgba(79,209,255,0);} }

/* ============================================================
   TABS
   ============================================================ */
.cos-tabs { display: flex; gap: 0.2rem; border-bottom: 1px solid var(--line); margin-bottom: 1.6rem; overflow-x: auto; }
.cos-tab {
  padding: 0.8rem 1.05rem; color: var(--gray); background: none; border: none;
  font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase;
  border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; align-items: center; gap: 0.45rem;
  transition: color 0.2s, border-color 0.2s;
}
.cos-tab:hover { color: var(--white); }
.cos-tab.is-active { color: var(--cyan); border-bottom-color: var(--cyan); }
.cos-tab__count { font-size: 0.6rem; background: var(--indigo); color: var(--cyan); border-radius: 99px; padding: 0.05rem 0.38rem; }

/* ============================================================
   LISTS / ROWS (files, tasks, approvals, updates)
   ============================================================ */
.rowlist { display: grid; }
.row {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.95rem 1.1rem; border: 1px solid var(--line); border-bottom: none;
  background: var(--panel); transition: background 0.2s;
}
.row:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.row:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.row:hover { background: #0f1822; }
.row__icon { width: 38px; height: 38px; border-radius: var(--radius); flex: none; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--cyan); background: rgba(79,209,255,0.05); }
.row__main { min-width: 0; flex: 1; }
.row__title { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__meta { font-family: var(--font-mono); font-size: 0.5625rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); margin-top: 0.2rem; }
.row__actions { display: flex; align-items: center; gap: 0.5rem; flex: none; }
.iconbtn { width: 34px; height: 34px; border-radius: var(--radius); border: 1px solid var(--line); background: none; color: var(--gray);
  display: grid; place-items: center; transition: color 0.2s, border-color 0.2s; }
.iconbtn:hover { color: var(--cyan); border-color: var(--line-hot); }
.iconbtn svg { width: 15px; height: 15px; }

/* ---------- task board ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(220px,1fr)); gap: 0.9rem; overflow-x: auto; }
@media (max-width: 1100px){ .board { grid-template-columns: repeat(5, 250px); } }
.board__col { background: rgba(15,23,34,0.4); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.7rem; min-height: 120px; }
.board__head { display: flex; align-items: center; justify-content: space-between; padding: 0.2rem 0.4rem 0.7rem; }
.board__head .mono { color: var(--gray); }
.taskcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem; margin-bottom: 0.6rem; cursor: pointer; transition: border-color 0.2s; }
.taskcard:hover { border-color: var(--line-hot); }
.taskcard__title { font-size: 0.85rem; font-weight: 600; }
.taskcard__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 0.6rem; }
.taskcard__due { font-family: var(--font-mono); font-size: 0.5625rem; letter-spacing: 0.08em; color: var(--gray); }
.taskcard__due.is-over { color: var(--rose); }

/* ============================================================
   DESIGN REVIEW (image + comment pins)
   ============================================================ */
.review { display: grid; grid-template-columns: 1fr 360px; gap: 1.1rem; align-items: start; }
@media (max-width: 1000px){ .review { grid-template-columns: 1fr; } }
.review__stage {
  position: relative; background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(43,140,255,0.06), transparent 70%), #07090d;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  min-height: 380px; display: grid; place-items: center;
}
.review__canvas { position: relative; display: inline-block; max-width: 100%; cursor: crosshair; }
.review__canvas img { display: block; max-width: 100%; max-height: 72vh; }
.review__pin {
  position: absolute; transform: translate(-50%, -50%); z-index: 3;
  width: 26px; height: 26px; border-radius: 50% 50% 50% 2px;
  background: var(--cyan); color: var(--charcoal);
  display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700; font-size: 0.7rem;
  box-shadow: 0 0 0 3px rgba(79,209,255,0.25), 0 4px 12px rgba(0,0,0,0.5);
  cursor: pointer; transition: transform 0.15s;
}
.review__pin:hover, .review__pin.is-active { transform: translate(-50%, -50%) scale(1.18); }
.review__pin.is-resolved { background: var(--green); }
.review__side { display: flex; flex-direction: column; gap: 0.9rem; }
.review__comments { display: flex; flex-direction: column; gap: 0.6rem; max-height: 60vh; overflow-y: auto; padding-right: 0.2rem; }

.cmt { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 0.85rem; background: var(--panel); }
.cmt.is-active { border-color: var(--line-hot); }
.cmt.is-reply { margin-left: 1.1rem; border-left: 2px solid var(--indigo); }
.cmt__head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.45rem; }
.cmt__pin { width: 18px; height: 18px; border-radius: 50%; background: var(--cyan); color: var(--charcoal); display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.55rem; font-weight: 700; flex: none; }
.cmt__author { font-size: 0.78rem; font-weight: 600; }
.cmt__time { font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.1em; color: var(--gray); margin-left: auto; }
.cmt__body { font-size: 0.82rem; color: #cdd3d9; }
.cmt__actions { display: flex; gap: 0.8rem; margin-top: 0.5rem; }
.cmt__actions button { background: none; border: none; color: var(--gray); font-family: var(--font-mono); font-size: 0.5625rem; letter-spacing: 0.1em; text-transform: uppercase; transition: color 0.2s; }
.cmt__actions button:hover { color: var(--cyan); }

/* ============================================================
   FORMS
   ============================================================ */
.field { display: grid; gap: 0.45rem; margin-bottom: 1rem; }
.field > label, .field__label { font-family: var(--font-mono); font-size: 0.5625rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray); }
.input, .select, .textarea {
  width: 100%; font-family: var(--font-body); font-size: 0.92rem; color: var(--white);
  background: rgba(7,9,13,0.6); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 0.7rem 0.85rem; transition: border-color 0.2s, box-shadow 0.2s;
}
.textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(79,209,255,0.12); }
.input::placeholder, .textarea::placeholder { color: rgba(138,145,153,0.5); }
select.select { 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 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%238A9199' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.8rem center; padding-right: 2rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
@media (max-width: 560px){ .field-row { grid-template-columns: 1fr; } }

/* ---------- dropzone ---------- */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; min-height: 160px; box-sizing: border-box;
  border: 1.5px dashed rgba(255,255,255,0.12); border-radius: var(--radius);
  padding: 2.4rem 1.6rem; text-align: center; color: var(--gray);
  background: rgba(255,255,255,0.02);
  transition: border-color 0.2s, background 0.2s, color 0.2s; cursor: pointer;
  user-select: none;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--cyan); background: rgba(79,209,255,0.05); color: var(--white); }
.dropzone svg { width: 28px; height: 28px; margin-bottom: 0.8rem; color: var(--cyan); flex-shrink: 0; }
.dropzone b { color: var(--white); }
.dropzone.is-drag { border-style: solid; }

/* ============================================================
   MODAL / DRAWER
   ============================================================ */
.cos-modal-wrap {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 1.2rem;
  background: rgba(4,6,10,0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.cos-modal-wrap.is-open { display: flex; animation: cos-fade 0.2s ease; }
@keyframes cos-fade { from { opacity: 0; } to { opacity: 1; } }
.cos-modal {
  width: min(640px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--midnight); border: 1px solid var(--line-2); border-radius: var(--radius);
  position: relative; animation: cos-rise 0.25s var(--ease-out);
}
.cos-modal--wide { width: min(1100px, 100%); }

/* lightbox variant - full viewport */
.cos-modal--lightbox {
  width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh;
  border-radius: 0; border: none; background: rgba(4,4,15,0.97);
  display: flex; flex-direction: column; overflow: hidden;
}
.cos-modal--lightbox .cos-modal__head {
  background: transparent; border-bottom: 1px solid rgba(255,255,255,0.07);
  padding: 0.9rem 1.2rem;
}
.cos-modal--lightbox .cos-modal__head h3 {
  font-size: 0.875rem; font-family: var(--font-mono); font-weight: 400;
  text-transform: none; letter-spacing: 0; color: var(--gray); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.cos-lightbox__stage {
  flex: 1; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; min-height: 0;
}
.cos-lightbox__img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  user-select: none; pointer-events: none; border-radius: 4px;
}
.cos-lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.12);
  color: var(--white); width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  transition: background 0.15s, border-color 0.15s; z-index: 2;
}
.cos-lightbox__nav:hover { background: rgba(79,209,255,0.18); border-color: var(--cyan); color: var(--cyan); }
.cos-lightbox__nav--prev { left: 1.2rem; }
.cos-lightbox__nav--next { right: 1.2rem; }
.cos-lightbox__nav[disabled] { opacity: 0.2; pointer-events: none; }
.cos-lightbox__foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.2rem; border-top: 1px solid rgba(255,255,255,0.07);
  gap: 1rem; flex-shrink: 0;
}
.cos-lightbox__meta { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.cos-lightbox__meta .cos-lightbox__name { font-size: 0.85rem; color: var(--white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cos-lightbox__counter { font-family: var(--font-mono); font-size: 0.5625rem; letter-spacing: 0.12em; color: var(--gray); white-space: nowrap; }

/* file gallery grid */
.cos-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-bottom: 2rem;
}
@media (max-width: 860px) { .cos-gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .cos-gallery { grid-template-columns: repeat(2, 1fr); } }
.cos-thumb {
  aspect-ratio: 1; border-radius: var(--radius); overflow: hidden;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line);
  cursor: pointer; position: relative;
  transition: border-color 0.2s, transform 0.15s;
}
.cos-thumb:hover { border-color: var(--cyan); transform: scale(1.02); }
.cos-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: opacity 0.3s;
}
.cos-thumb img[data-loading] { opacity: 0; }
.cos-thumb__bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 0.5rem 0.6rem 0.55rem;
  background: linear-gradient(to top, rgba(4,4,15,0.85) 0%, transparent 100%);
  font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transition: opacity 0.2s;
}
.cos-thumb:hover .cos-thumb__bar { opacity: 1; }
@keyframes cos-rise { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.cos-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--midnight); z-index: 2; }
.cos-modal__head h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; text-transform: uppercase; }
.cos-modal__body { padding: 1.3rem; }
.cos-modal__foot { padding: 1rem 1.3rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 0.7rem; }

/* contact studio message modal */
.cos-msg__kicker { font-size: 0.5625rem; letter-spacing: 0.18em; margin-bottom: 0.5rem; }
.cos-msg__desc { color: var(--gray); font-size: 0.9rem; line-height: 1.55; margin-bottom: 1.1rem; }
.cos-msg__ctx { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.5625rem; letter-spacing: 0.12em;
  color: var(--cyan); border: 1px solid rgba(79,209,255,0.25); background: rgba(79,209,255,0.06);
  border-radius: 999px; padding: 0.35rem 0.7rem; margin-bottom: 1.2rem; }
.cos-msg__ctx i { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.cos-msg__form { margin: 0; }
.cos-msg__area { min-height: 130px; }
.cos-msg__count { text-align: right; font-size: 0.5625rem; letter-spacing: 0.1em; color: var(--gray); margin-top: 0.35rem; }
.cos-x { background: none; border: 1px solid var(--line); color: var(--gray); width: 34px; height: 34px; border-radius: var(--radius); display: grid; place-items: center; }
.cos-x:hover { color: var(--rose); border-color: var(--rose); }

/* ============================================================
   TOAST
   ============================================================ */
.cos-toasts { position: fixed; bottom: 1.4rem; right: 1.4rem; z-index: 500; display: flex; flex-direction: column; gap: 0.6rem; }
.cos-toast {
  background: var(--glass-2); border: 1px solid var(--line-hot); border-radius: var(--radius);
  backdrop-filter: blur(12px); padding: 0.85rem 1.1rem; min-width: 240px; max-width: 360px;
  display: flex; align-items: center; gap: 0.7rem; font-size: 0.85rem;
  animation: cos-toast-in 0.3s var(--ease-out);
}
.cos-toast.is-out { animation: cos-toast-out 0.3s var(--ease-out) forwards; }
.cos-toast i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); flex: none; }
.cos-toast.is-err { border-color: rgba(255,107,139,0.5); }
.cos-toast.is-err i { background: var(--rose); box-shadow: 0 0 8px var(--rose); }
@keyframes cos-toast-in { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes cos-toast-out { to { transform: translateX(20px); opacity: 0; } }

/* ============================================================
   EMPTY / LOADING
   ============================================================ */
.cos-empty { text-align: center; padding: clamp(2rem,6vw,4rem) 1rem; color: var(--gray); }
.cos-empty svg { width: 40px; height: 40px; color: var(--indigo); margin: 0 auto 1rem; }
.cos-empty h3 { font-family: var(--font-display); color: var(--white); font-size: 1.2rem; text-transform: uppercase; margin-bottom: 0.4rem; }
.cos-empty p { max-width: 40ch; margin: 0 auto 1.2rem; font-size: 0.9rem; }

.cos-skeleton { background: linear-gradient(90deg, var(--indigo) 0%, #232b3d 50%, var(--indigo) 100%);
  background-size: 200% 100%; animation: cos-shimmer 1.3s infinite; border-radius: var(--radius); }
@keyframes cos-shimmer { to { background-position: -200% 0; } }

.cos-spinner { width: 32px; height: 32px; border: 2px solid var(--indigo); border-top-color: var(--cyan); border-radius: 50%; animation: cos-spin 0.7s linear infinite; margin: 2rem auto; }
@keyframes cos-spin { to { transform: rotate(360deg); } }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.cos-auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 0.9fr; position: relative; z-index: 1; }
@media (max-width: 880px){ .cos-auth { grid-template-columns: 1fr; } .cos-auth__aside { display: none; } }
.cos-auth__form-col { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem,6vw,5rem); }
.cos-auth__brand { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 3rem; }
.cos-auth__brand img { height: 1.6rem; display: block; }
.cos-auth__home { display: inline-flex; align-items: center; border-radius: 6px; transition: opacity 0.2s; }
.cos-auth__home:hover { opacity: 0.75; }
.cos-auth__home:focus-visible { outline: 1px solid var(--cyan); outline-offset: 4px; }
.cos-auth__card { width: min(420px, 100%); }
.cos-auth h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem,4vw,2.8rem); text-transform: uppercase; line-height: 1; letter-spacing: -0.01em; }
.cos-auth__sub { color: var(--gray); margin: 0.8rem 0 2rem; }
.cos-oauth { display: grid; gap: 0.65rem; }
.oauth-btn { justify-content: center; }
.oauth-btn svg { flex: none; }
.cos-divider { display: flex; align-items: center; gap: 0.8rem; margin: 1.4rem 0; }
.cos-divider span { flex: 1; height: 1px; background: var(--line); }
.cos-divider b { font-size: 0.5625rem; letter-spacing: 0.16em; white-space: nowrap; }
.cos-auth__alt { margin-top: 1.2rem; text-align: center; font-size: 0.8rem; color: var(--gray); }
.cos-auth__alt button { background: none; border: none; color: var(--cyan); font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; }
.cos-auth__aside { position: relative; border-left: 1px solid var(--line); overflow: hidden;
  background: radial-gradient(ellipse 80% 70% at 70% 30%, rgba(43,140,255,0.12), transparent 70%), var(--midnight); }
.cos-auth__aside-inner { position: absolute; inset: 0; padding: clamp(2rem,4vw,4rem); display: flex; flex-direction: column; justify-content: space-between; }
.cos-auth__quote { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem,2.4vw,2.1rem); line-height: 1.15; text-transform: uppercase; }
.cos-auth__quote em { font-style: normal; color: transparent; -webkit-text-stroke: 1.2px var(--cyan); }
.cos-auth__feat { display: grid; gap: 0.7rem; }
.cos-auth__feat div { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); }
.cos-auth__feat svg { width: 14px; height: 14px; color: var(--cyan); }

/* ============================================================
   RESPONSIVE — rail collapses
   ============================================================ */
.cos-rail__backdrop { display: none; }
@media (max-width: 940px) {
  .cos-app { grid-template-columns: 1fr; }
  .cos-rail {
    position: fixed; top: 0; left: 0; width: min(280px, 86vw);
    transform: translateX(-102%); transition: transform 0.3s var(--ease-out);
  }
  .cos-app.is-rail-open .cos-rail { transform: translateX(0); }
  .cos-app.is-rail-open .cos-rail__backdrop { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(4,6,10,0.6); }
  .cos-burger { display: grid; }
  .board { grid-template-columns: repeat(5, 240px); }
}

.hide-mobile { }
@media (max-width: 620px){ .hide-mobile { display: none !important; } .cos-clock { display: none; } }
@media (max-width: 480px){ .field-row { grid-template-columns: 1fr; } }
