:root {
  --bg: #080b0d;
  --bg-2: #0c1012;
  --surface: #121719;
  --surface-2: #181d21;
  --surface-3: #21272b;
  --border: #2e3539;
  --border-soft: #232a2e;
  --text: #f1f3f1;
  --muted: #abb2b7;
  --dim: #727a80;
  --accent: #9ceb59;
  --accent-bright: #deff9a;
  --accent-glow: rgba(156, 235, 89, 0.2);
  --warning: #ffbd31;
  --danger: #ff5c5c;
  --blue: #39afe6;
  --radius: 10px;
  --font: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font: 16px/1.45 var(--font);
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
  color: inherit;
  min-width: 0;
}

img,
video {
  max-width: 100%;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

button:focus,
input:focus,
select:focus {
  outline: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

a {
  color: inherit;
}

h1,
h2,
p {
  margin-top: 0;
}

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 52% -5%, rgba(156, 235, 89, 0.08), transparent 30rem),
    radial-gradient(circle at 98% 65%, rgba(33, 93, 91, 0.12), transparent 33rem),
    linear-gradient(118deg, #080b0d, #0a0d0e 46%, #070a0b);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 12px;
}

.brand {
  width: max-content;
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  line-height: 1;
}

.brand-kicker {
  display: block;
  margin-bottom: 5px;
  color: #bcc1c5;
  letter-spacing: 0.22em;
  font-size: 15px;
}

.brand-name {
  display: block;
  font-size: 29px;
  font-weight: 680;
  letter-spacing: 0.05em;
}

.brand-large .brand-kicker {
  font-size: 18px;
}

.brand-large .brand-name {
  font-size: clamp(38px, 5vw, 54px);
}

.button {
  position: relative;
  min-height: 48px;
  padding: 0 22px;
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 150ms ease;
  overflow: hidden;
}

.button::after {
  content: "";
  position: absolute;
  inset: 50%;
  border-radius: 50%;
  background: rgba(222, 255, 154, 0.18);
  transform: scale(0);
  opacity: 0;
  transition: transform 380ms ease, opacity 380ms ease;
}

.button:active:not(:disabled)::after {
  inset: -35%;
  transform: scale(1);
  opacity: 1;
}

.button:hover:not(:disabled),
.button:not(.is-disabled):hover {
  background: #262d31;
}

.button-primary {
  border-color: #68bd39;
  background: rgba(38, 52, 33, 0.3);
  color: var(--accent);
}

.button-primary:hover:not(:disabled) {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-1px);
}

.button-muted,
.button.is-disabled {
  color: #777e84;
  background: #252a2e;
  pointer-events: none;
}

.button-wide {
  width: 100%;
}

.quiet-button {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.quiet-button:hover {
  color: var(--text);
  border-color: #4d565a;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
  transition: transform 170ms ease, border-color 170ms ease;
}

.icon-button:hover {
  border-color: var(--accent);
  transform: rotate(90deg);
}

.login-screen {
  min-height: 100vh;
  padding: clamp(28px, 6vw, 74px);
  display: grid;
  grid-template-columns: minmax(350px, 500px) minmax(380px, 1fr);
  align-items: center;
  gap: clamp(42px, 8vw, 112px);
}

.login-card {
  animation: rise 480ms ease both;
}

.login-card .eyebrow {
  margin-top: 52px;
  color: var(--accent);
}

.login-card h1 {
  margin-bottom: 18px;
  font-size: clamp(31px, 3.4vw, 46px);
  font-weight: 520;
  line-height: 1.12;
}

.login-copy {
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 17px;
}

.auth-switch {
  margin-bottom: 21px;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.auth-tab {
  height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  transition: color 150ms ease, background 150ms ease;
}

.auth-tab.is-active {
  color: var(--accent);
  background: rgba(156, 235, 89, 0.09);
}

.login-form {
  display: grid;
  gap: 17px;
}

.login-form label,
.modal-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

input,
select,
textarea {
  height: 49px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(156, 235, 89, 0.09);
}

textarea {
  min-height: 130px;
  padding: 13px 14px;
  resize: vertical;
}

.login-note {
  margin-top: 22px;
  color: var(--dim);
  font-size: 13px;
}

.login-showcase {
  position: relative;
  min-height: 570px;
  animation: fadeIn 600ms 150ms ease both;
}

.showcase-card {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  background:
    linear-gradient(145deg, transparent, rgba(156, 235, 89, 0.07)),
    var(--surface);
  color: rgba(234, 239, 234, 0.3);
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.42);
  letter-spacing: 0.06em;
  animation: drift 5s infinite ease-in-out;
}

.showcase-card.one {
  inset: 22px 82px auto 0;
  height: 334px;
  font-size: 36px;
}

.showcase-card.two {
  top: 241px;
  right: 18px;
  width: 310px;
  height: 224px;
  border-color: rgba(156, 235, 89, 0.7);
  color: var(--accent);
  animation-delay: -1.7s;
}

.showcase-card.three {
  left: 70px;
  bottom: 18px;
  width: 330px;
  height: 104px;
  color: var(--warning);
  animation-delay: -3s;
}

.topbar {
  position: sticky;
  z-index: 12;
  top: 0;
  height: 88px;
  padding: 0 clamp(20px, 2.6vw, 42px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(9, 12, 13, 0.93);
  backdrop-filter: blur(14px);
}

.tabs {
  align-self: stretch;
  display: flex;
  gap: 37px;
}

.tab {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 18px;
  transition: color 180ms ease;
}

.tab::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 210ms ease;
}

.tab.is-active {
  color: var(--text);
}

.tab.is-active::after {
  transform: scaleX(1);
}

.profile {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 13px;
  color: #d6dadb;
}

.role-pill {
  padding: 4px 9px;
  border: 1px solid rgba(156, 235, 89, 0.4);
  border-radius: 14px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.author-layout {
  min-height: calc(100vh - 88px);
  display: grid;
  grid-template-columns: 278px 1fr;
}

.project-sidebar {
  position: sticky;
  top: 88px;
  height: calc(100vh - 88px);
  padding: 28px 17px;
  border-right: 1px solid var(--border-soft);
  background: rgba(12, 16, 18, 0.62);
}

.sidebar-head {
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-head .eyebrow {
  margin: 0;
}

.project-list {
  display: grid;
  gap: 9px;
}

.project-item {
  padding: 14px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease;
}

.project-item:hover,
.project-item.is-active {
  border-color: var(--border);
  background: var(--surface);
}

.project-item.is-active {
  border-left-color: var(--accent);
}

.project-item strong {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
  font-weight: 520;
}

.project-item span {
  color: var(--muted);
  font-size: 13px;
}

.project-item i {
  height: 3px;
  margin-top: 10px;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: #232a2e;
}

.project-item i::before {
  content: "";
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
}

.content,
.guest-layout {
  min-width: 0;
}

.view {
  padding: clamp(27px, 3vw, 42px) clamp(22px, 3vw, 42px) 118px;
  animation: fadeSlide 240ms ease both;
}

.project-header {
  margin-bottom: 25px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.project-header h1 {
  margin: 2px 0 8px;
  font-size: clamp(25px, 2.6vw, 37px);
  font-weight: 510;
}

.project-header p:not(.eyebrow) {
  color: var(--muted);
}

.header-actions {
  display: flex;
  gap: 12px;
}

.summary-row {
  display: flex;
  gap: 11px;
}

.project-progress {
  position: relative;
  max-width: 470px;
  height: 12px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #232a2e;
}

.project-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6fdc42, var(--accent-bright));
  box-shadow: 0 0 18px var(--accent-glow);
  transition: width 260ms ease;
}

.project-progress b {
  position: absolute;
  inset: -2px 10px auto auto;
  color: var(--accent-bright);
  font-size: 11px;
}

.guest-progress {
  max-width: 520px;
}

.stat {
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  font-size: 14px;
}

.stat strong {
  color: var(--accent);
}

.author-columns {
  display: grid;
  grid-template-columns: minmax(286px, 0.8fr) minmax(390px, 1.35fr);
  gap: 24px;
}

.activity-panel {
  margin-top: 26px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(18, 23, 25, 0.76);
  animation: rise 260ms ease both;
}

.guest-activity {
  margin: 26px clamp(22px, 3vw, 42px) 118px;
}

.activity-list {
  display: grid;
  gap: 10px;
}

.activity-item {
  position: relative;
  padding: 14px 16px 14px 42px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(8, 11, 13, 0.52);
}

.activity-item::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 19px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 5px rgba(171, 178, 183, 0.08);
}

.activity-item.approved::before {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(156, 235, 89, 0.1);
}

.activity-item.changes::before {
  background: var(--warning);
  box-shadow: 0 0 0 5px rgba(255, 189, 49, 0.1);
}

.activity-item.sync::before {
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(57, 175, 230, 0.1);
}

.activity-item strong {
  display: block;
  font-weight: 500;
}

.activity-item span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.empty-state.compact {
  min-height: 98px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 16px;
}

.dash-card {
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(156, 235, 89, 0.045), transparent),
    var(--surface);
  animation: rise 260ms ease both;
}

.dash-card.hero {
  grid-column: span 2;
  min-height: 198px;
}

.dash-card.good {
  border-color: rgba(156, 235, 89, 0.55);
}

.dash-card.warning {
  border-color: rgba(255, 189, 49, 0.55);
}

.dash-card.wide {
  grid-column: span 2;
}

.dash-card span {
  display: block;
  color: var(--accent);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 650;
}

.dash-card h2 {
  margin: 0 0 10px;
  font-weight: 500;
}

.dash-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.dash-card dl {
  margin: 0;
  display: grid;
  gap: 11px;
}

.dash-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 9px;
}

.dash-card dt {
  color: var(--muted);
}

.dash-card dd {
  margin: 0;
  text-align: right;
}

.selection-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 10px;
}

.selection-strip button {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  text-align: left;
}

.selection-strip img {
  width: 100%;
  height: 84px;
  display: block;
  object-fit: cover;
}

.selection-strip span {
  padding: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.upload-zone {
  min-height: 326px;
  padding: 42px 27px;
  border: 1px dashed #3c474b;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
  background: rgba(16, 21, 23, 0.6);
  transition: border-color 170ms ease, background 170ms ease, transform 170ms ease;
}

.upload-zone.is-dragging {
  border-color: var(--accent);
  background: rgba(156, 235, 89, 0.07);
  transform: scale(1.008);
}

.upload-zone h2 {
  margin: 14px 0 8px;
  font-size: 21px;
  font-weight: 500;
}

.upload-zone p {
  max-width: 380px;
  margin-bottom: 24px;
  color: var(--muted);
}

.upload-icon {
  width: 54px;
  height: 54px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 29px;
}

.upload-queue {
  margin-top: 13px;
  display: grid;
  gap: 9px;
}

.upload-job {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  animation: rise 200ms ease;
}

.upload-job-head {
  margin-bottom: 9px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.progress {
  height: 5px;
  overflow: hidden;
  border-radius: 10px;
  background: #252c30;
}

.progress span {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: var(--accent);
  transition: width 240ms ease;
}

.subhead {
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.subhead h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}

.subhead span {
  color: var(--muted);
}

.filter-panel {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 10px;
  background: rgba(18, 23, 25, 0.72);
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.filter-panel input,
.filter-panel select {
  height: 40px;
}

.guest-filter {
  margin-bottom: 18px;
}

.asset-list {
  display: grid;
  gap: 12px;
}

.empty-state {
  min-height: 190px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
}

.asset-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 164px 1fr;
  background: var(--surface);
  transition: border-color 180ms ease, transform 180ms ease;
  animation: rise 240ms ease both;
}

.asset-card:hover {
  transform: translateY(-2px);
  border-color: #424b50;
}

.asset-card.is-featured,
.media-card.is-featured {
  box-shadow: inset 0 0 0 1px rgba(222, 255, 154, 0.12), 0 0 28px rgba(156, 235, 89, 0.08);
}

.asset-thumb {
  position: relative;
  width: 164px;
  height: 122px;
  object-fit: cover;
  background: #111719;
}

.asset-copy {
  padding: 13px 15px;
  min-width: 0;
}

.asset-title {
  display: flex;
  justify-content: space-between;
  gap: 9px;
}

.asset-title strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 500;
}

.status {
  flex-shrink: 0;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.status.approved {
  border-color: var(--accent);
  color: var(--accent);
}

.status.changes {
  border-color: var(--warning);
  color: var(--warning);
}

.asset-meta {
  margin: 6px 0 11px;
  color: var(--muted);
  font-size: 13px;
}

.inline-actions {
  display: flex;
  gap: 8px;
}

.mini-button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
}

.mini-button:hover {
  border-color: #4b5458;
}

.section-heading {
  margin-bottom: 27px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.section-heading h1 {
  margin: 0;
  font-size: clamp(26px, 2.2vw, 37px);
  font-weight: 500;
  text-transform: uppercase;
}

.guest-project-heading h1 {
  text-transform: none;
}

.guest-project-heading h1 span {
  color: var(--muted);
  text-transform: uppercase;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 19px;
}

.media-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  animation: rise 300ms ease both;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.media-card.is-approved {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(156, 235, 89, 0.14);
}

.media-card.is-video {
  grid-column: span 2;
}

.media-visual {
  position: relative;
  display: block;
  width: 100%;
  height: 255px;
  border: 0;
  padding: 0;
  background: #101516;
}

.is-video .media-visual {
  height: 325px;
}

.media-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 300ms ease, filter 250ms ease;
}

.media-card:hover .media-visual img {
  transform: scale(1.025);
  filter: brightness(1.05);
}

.visual-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(48, 54, 57, 0.82);
  font-size: 27px;
  transform: translate(-50%, -50%);
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(12, 16, 18, 0.8);
  color: var(--muted);
  text-transform: uppercase;
  font-size: 12px;
}

.card-badge.approved {
  border-color: var(--accent);
  color: var(--accent);
}

.card-badge.changes {
  border-color: var(--warning);
  color: var(--warning);
}

.featured-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 10px;
  border: 1px solid rgba(222, 255, 154, 0.64);
  border-radius: 4px;
  background: rgba(12, 16, 18, 0.8);
  color: var(--accent-bright);
  text-transform: uppercase;
  font-size: 12px;
}

.media-info {
  padding: 13px 15px 15px;
}

.media-info h2 {
  margin: 0 0 5px;
  overflow: hidden;
  font-size: 17px;
  font-weight: 450;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.media-info p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(325px, 1fr));
  gap: 21px;
}

.add-channel {
  margin-top: 26px;
  display: flex;
  justify-content: center;
}

.channel-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  animation: rise 280ms ease both;
}

.channel-main {
  min-height: 132px;
  padding: 23px 20px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.platform-icon {
  width: 68px;
  height: 62px;
  flex-shrink: 0;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 29px;
  font-weight: 650;
}

.platform-icon.youtube {
  background: #fc111a;
}

.platform-icon.telegram {
  border-radius: 50%;
  background: #299bd3;
}

.platform-icon.vk {
  background: #4e83bd;
}

.platform-icon.instagram {
  background: linear-gradient(135deg, #6e35cf, #e23a74 58%, #ffc249);
}

.channel-main h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 480;
}

.connection {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--accent);
}

.connection::before {
  content: "✓";
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #16220f;
}

.connection.disconnected {
  color: var(--muted);
}

.connection.disconnected::before {
  content: "–";
  color: #1b2023;
  background: var(--muted);
}

.connection.error {
  color: var(--danger);
}

.connection.error::before {
  content: "×";
  background: var(--danger);
}

.channel-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  font-size: 14px;
}

.channel-footer .inline-actions {
  flex-shrink: 0;
}

.channel-error {
  color: var(--danger);
  font-size: 12px;
}

.action-dock {
  position: fixed;
  z-index: 8;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 101px;
  padding: 18px 20px 12px;
  border: 1px solid var(--border-soft);
  background: rgba(23, 28, 31, 0.97);
  text-align: center;
}

.action-dock .button {
  margin: 0 6px;
}

.action-dock p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.read-only-dock {
  display: grid;
  place-items: center;
  min-height: 75px;
}

.read-only-dock p {
  margin: 0;
}

.modal {
  width: min(500px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.6);
}

.modal[open] {
  animation: modalIn 210ms ease both;
}

.modal::backdrop {
  background: rgba(2, 4, 5, 0.7);
  backdrop-filter: blur(4px);
}

.modal-form {
  padding: 24px;
  display: grid;
  gap: 17px;
}

.modal-form p {
  margin: 0;
  color: var(--muted);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-head h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 520;
}

.close-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 30px;
  line-height: 1;
}

.media-modal {
  width: min(1100px, calc(100vw - 34px));
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(350px, 1.45fr) minmax(300px, 0.9fr);
}

.review-preview {
  position: relative;
  min-height: 540px;
  background: #0b0f10;
}

.review-preview img,
.review-preview video {
  width: 100%;
  height: 100%;
  min-height: 540px;
  max-height: 72vh;
  display: block;
  object-fit: contain;
}

.review-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 48px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  background: rgba(18, 23, 25, 0.7);
  color: var(--text);
  font-size: 42px;
  transform: translateY(-50%);
  transition: border-color 160ms ease, background 160ms ease;
}

.review-nav:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(31, 39, 33, 0.9);
}

.review-nav.prev {
  left: 14px;
}

.review-nav.next {
  right: 14px;
}

.timeline-panel {
  position: absolute;
  bottom: 19px;
  right: 18px;
  left: 18px;
  padding: 13px;
  border-radius: 7px;
  background: rgba(10, 13, 15, 0.83);
}

.timeline-panel input {
  width: 100%;
  height: auto;
  padding: 0;
  accent-color: var(--accent);
}

.timeline-label {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.review-panel {
  max-height: 80vh;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.review-panel h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}

.review-actions {
  display: flex;
  gap: 9px;
}

.comments {
  flex: 1;
  min-height: 90px;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 9px;
}

.comment {
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: var(--bg-2);
}

.comment strong {
  color: var(--accent);
  font-size: 13px;
}

.comment p {
  margin: 5px 0 0;
  font-size: 14px;
}

.comment-form {
  display: grid;
  gap: 9px;
}

.comment-form textarea {
  min-height: 90px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
}

.timecode-line {
  color: var(--warning);
  font-size: 13px;
}

.toast-region {
  position: fixed;
  z-index: 30;
  top: 102px;
  right: 22px;
  display: grid;
  gap: 9px;
}

.toast {
  min-width: 250px;
  max-width: 390px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 7px;
  background: var(--surface-2);
  box-shadow: 0 15px 34px rgba(0, 0, 0, 0.42);
  animation: toastIn 220ms ease both;
}

.toast.error {
  border-left-color: var(--danger);
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(156, 235, 89, 0.24);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 650ms linear infinite;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-11px); }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1120px) {
  .author-columns {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

@media (max-width: 900px) {
  .login-screen {
    display: block;
    max-width: 540px;
    margin: 0 auto;
  }

  .login-showcase {
    display: none;
  }

  .topbar {
    height: auto;
    padding-top: 18px;
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand profile" "tabs tabs";
  }

  .brand {
    grid-area: brand;
  }

  .profile {
    grid-area: profile;
  }

  .tabs {
    grid-area: tabs;
    height: 53px;
    justify-content: center;
  }

  .author-layout {
    display: block;
  }

  .project-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border-soft);
  }

  .project-list {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }

  .channel-grid {
    grid-template-columns: 1fr;
  }

  .review-layout {
    grid-template-columns: 1fr;
  }

  .review-preview,
  .review-preview img {
    min-height: 320px;
  }

  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }

  .filter-panel label:first-child {
    grid-column: 1 / -1;
  }

  .dash-card.hero,
  .dash-card.wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .view {
    padding: 22px 14px 34px;
  }

  .topbar {
    padding: 14px;
    grid-template-columns: 1fr;
    grid-template-areas: "brand" "profile" "tabs";
    gap: 11px;
  }

  .brand-kicker {
    font-size: 12px;
  }

  .brand-name {
    font-size: 24px;
  }

  .profile .role-pill {
    display: none;
  }

  .profile {
    justify-self: stretch;
    justify-content: space-between;
    font-size: 14px;
  }

  .tabs {
    height: 46px;
    justify-content: flex-start;
    gap: 22px;
    overflow-x: auto;
  }

  .tab {
    flex: 0 0 auto;
    font-size: 15px;
  }

  .project-sidebar {
    padding: 18px 14px;
  }

  .project-list {
    grid-template-columns: 1fr;
  }

  .project-header,
  .section-heading,
  .header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-row,
  .inline-actions {
    flex-wrap: wrap;
  }

  .header-actions .button,
  .inline-actions .mini-button {
    flex: 1 1 140px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .filter-panel label:first-child {
    grid-column: auto;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .media-card.is-video {
    grid-column: auto;
  }

  .asset-card {
    grid-template-columns: 1fr;
  }

  .asset-thumb {
    width: 100%;
    height: 170px;
  }

  .asset-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .media-visual,
  .is-video .media-visual {
    height: clamp(220px, 58vw, 310px);
  }

  .channel-main {
    min-height: 112px;
    padding: 18px;
    align-items: flex-start;
  }

  .platform-icon {
    width: 54px;
    height: 54px;
    border-radius: 13px;
    font-size: 22px;
  }

  .channel-footer,
  .review-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .action-dock {
    position: sticky;
    min-height: 0;
    padding: 14px;
    border-radius: 12px 12px 0 0;
  }

  .action-dock .button {
    width: 100%;
    margin: 0 0 8px;
  }

  .guest-activity {
    margin: 20px 14px 34px;
  }

  .modal {
    max-height: calc(100dvh - 22px);
    overflow: auto;
  }

  .review-preview,
  .review-preview img,
  .review-preview video {
    min-height: 230px;
  }

  .review-nav {
    width: 40px;
    height: 52px;
    font-size: 34px;
  }
}

@media (max-width: 430px) {
  .login-screen {
    padding: 22px 16px;
  }

  .brand-large .brand-name {
    font-size: 34px;
  }

  .button {
    min-height: 44px;
    padding: 0 15px;
    font-size: 14px;
  }

  .project-header h1,
  .section-heading h1 {
    font-size: 25px;
  }

  .stat {
    width: 100%;
  }

  .toast-region {
    top: 12px;
    right: 12px;
    left: 12px;
  }

  .toast {
    min-width: 0;
    max-width: none;
  }
}


/* Admin panel */
.admin-tab { color: var(--accent); }
.admin-view { max-width: 1280px; }
.admin-stats { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 14px; margin-bottom: 22px; }
.admin-stats article { min-height: 112px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.admin-stats span { display: block; color: var(--accent-bright); font-size: 28px; font-weight: 650; }
.admin-stats p { margin: 8px 0 0; color: var(--muted); }
.admin-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.admin-panel { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.admin-table { display: grid; gap: 9px; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px; border: 1px solid var(--border-soft); border-radius: 8px; background: rgba(8, 11, 13, 0.52); }
.admin-row.is-blocked { border-color: rgba(255, 92, 92, 0.45); opacity: 0.72; }
.admin-row strong, .admin-row span { display: block; }
.admin-row span { margin-top: 4px; color: var(--muted); font-size: 13px; }
.admin-row-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.admin-badge { margin: 0 !important; padding: 5px 8px; color: #0a0d0e !important; background: var(--accent); border-radius: 5px; font-size: 11px !important; font-weight: 800; }
.mini-button.danger { color: var(--danger); border-color: rgba(255, 92, 92, 0.45); }
@media (max-width: 1120px) { .admin-stats { grid-template-columns: repeat(3, 1fr); } .admin-columns { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .admin-stats { grid-template-columns: 1fr 1fr; } .admin-row { align-items: stretch; flex-direction: column; } }
