/* ==========================================================================
   Кабинет DevBuzz — та же палитра и метрики, что на лендинге
   ========================================================================== */

/* ===== ЭКРАН ВХОДА ===== */
.auth { min-height: 100vh; display: flex; }
.auth__aside {
  width: 46%; flex-shrink: 0; padding: 56px 60px;
  background: var(--ink); color: var(--white);
  display: flex; flex-direction: column;
}
.auth__aside .logo { color: var(--white); }
.auth__pitch { margin-top: auto; }
.auth__pitch h1 { margin: 0 0 18px; font-size: 44px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.auth__pitch p { margin: 0 0 34px; font-size: 18px; line-height: 1.45; color: var(--line-2); }
.auth__steps { display: grid; gap: 14px; margin-bottom: auto; }
.auth__step { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; line-height: 1.4; color: var(--line-2); }
.auth__step b { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.12); color: var(--white); display: grid; place-items: center; font-size: 12px; }
.auth__demo { margin-top: 34px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14); font-size: 13px; color: #9aa3ad; }
.auth__demo b { display: block; color: var(--white); margin-bottom: 10px; font-size: 13px; }
.auth__demo-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.auth__demo-btns .btn--border {
  background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .35);
}
.auth__demo-btns .btn--border:hover { background: rgba(255, 255, 255, .1); }

.auth__main { flex: 1; display: grid; place-items: center; padding: 40px 20px; }
.auth__card { width: 100%; max-width: 440px; }
.auth__card h2 { margin: 0 0 6px; font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.auth__card > p { margin: 0 0 28px; font-size: 15px; color: var(--grey); }
.auth__tabs { display: flex; gap: 6px; padding: 5px; border-radius: var(--r); background: var(--panel); margin-bottom: 26px; }
.auth__tab {
  flex: 1; height: 40px; border: 0; border-radius: var(--r-sm); background: none;
  font-size: 14px; font-weight: 700; color: var(--grey); cursor: pointer;
}
.auth__tab.is-active { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(26,28,33,.12); }

/* переключатель роли — как radio-switch на референсе */
.roleswitch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.roleswitch label {
  display: block; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--r);
  cursor: pointer; transition: border-color .15s, background-color .15s;
}
.roleswitch input { position: absolute; opacity: 0; pointer-events: none; }
.roleswitch b { display: block; font-size: 14px; font-weight: 800; }
.roleswitch span { display: block; margin-top: 4px; font-size: 12px; color: var(--grey); line-height: 1.35; }
.roleswitch input:checked + b { color: var(--pink); }
.roleswitch label:has(input:checked) { border-color: var(--pink); background: var(--pink-soft); }

/* ===== ПОЛЯ ===== */
.field { margin-bottom: 16px; }
.field > label,
.field-label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 700; color: var(--grey); text-transform: uppercase; letter-spacing: .03em; }
.input, .select, .textarea {
  width: 100%; padding: 13px 15px;
  border: 1.5px solid var(--line); border-radius: var(--r);
  background: var(--white); font-family: inherit; font-size: 15px; color: var(--ink);
  transition: border-color .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--ink); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row--3 { grid-template-columns: repeat(3, 1fr); }
.field-hint { margin: 6px 0 0; font-size: 12px; color: var(--grey); }
.form-error { margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--pink-soft); color: var(--pink-deep); font-size: 13px; font-weight: 600; }
.form-error:empty { display: none; }

/* чипсы выбора */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: block; padding: 9px 15px; border-radius: var(--r-sm);
  background: var(--panel); border: 1.5px solid transparent;
  font-size: 13px; font-weight: 700; color: var(--grey); cursor: pointer; transition: .15s;
}
.chip input:checked + span { background: var(--pink); border-color: var(--pink); color: var(--white); }
.chip--green input:checked + span { background: var(--green); border-color: var(--green); }

/* чек-лист кадров */
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 600; cursor: pointer; line-height: 1.35; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--green); flex-shrink: 0; }

/* ===== КАРКАС КАБИНЕТА ===== */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 280px; flex-shrink: 0; padding: 22px 16px;
  border-right: 1px solid var(--line); background: var(--white);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.side .logo { padding: 0 8px 22px; font-size: 18px; }
.side .logo__mark { height: 28px; }
.side__nav { display: grid; gap: 4px; }
.side__link {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border: 0; background: none; border-radius: var(--r-sm); width: 100%; text-align: left;
  font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--grey);
  line-height: 1.3; cursor: pointer;
}
.side__link:hover { background: var(--panel); color: var(--ink); }
.side__link.is-active { background: var(--pink-soft); color: var(--pink-deep); }
.side__link i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); flex-shrink: 0; }
.side__link.is-active i { background: var(--pink); }
.side__count { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--grey); }
.side__foot { margin-top: auto; }
.side__balance { padding: 16px; border-radius: var(--r); background: var(--panel); margin-bottom: 14px; }
.side__balance span { font-size: 11px; font-weight: 700; color: var(--grey); text-transform: uppercase; }
.side__balance b { display: block; margin-top: 6px; font-size: 22px; font-weight: 800; }
.side__user { display: flex; align-items: center; gap: 10px; padding: 10px 8px; }
.side__user small { display: block; color: var(--grey); font-size: 11px; }
.side__user b { font-size: 13px; }

.main { flex: 1; min-width: 0; background: var(--panel); }
.main__head {
  padding: 26px 34px; background: var(--white); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.main__head h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.main__head p { margin: 4px 0 0; font-size: 14px; color: var(--grey); }
.main__actions { margin-left: auto; display: flex; gap: 10px; }
.main__body { padding: 28px 34px 60px; }

.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--panel-2); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--grey-2); flex-shrink: 0; }
.avatar--pink { background: var(--pink-soft); color: var(--pink-deep); }
.avatar--blue { background: var(--blue-soft); color: var(--blue); }
.avatar--green { background: var(--green-soft); color: var(--green-hover); }

.demo-note {
  margin: 0 0 22px; padding: 12px 16px; border-radius: var(--r-sm);
  background: var(--orange-soft); color: #7a4400; font-size: 13px; font-weight: 600;
}

/* ===== СВОДКА ПО ИСПОЛНИТЕЛЮ ===== */
.perf { margin-bottom: 20px; max-width: 880px; }
.perf__head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 20px; margin-bottom: 12px;
}
.perf__ava { width: 46px; height: 46px; font-size: 15px; }
.perf__id b { display: block; font-size: 16px; font-weight: 800; }
.perf__id small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--grey); }
.perf__presence { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.perf__state { font-size: 13px; font-weight: 700; }
.perf__presence small { font-size: 12px; color: var(--grey); }
.dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--line-2);
  flex-shrink: 0; box-shadow: 0 0 0 3px var(--panel-2);
}
.dot--on { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

.kpis--perf { margin-bottom: 0; }
/* двойной класс нужен, чтобы перебить .kpi, объявленный ниже в файле */
.kpi.kpi--alert { background: var(--pink-soft); border-color: transparent; }
.kpi.kpi--alert b, .kpi.kpi--alert span { color: var(--pink-deep); }
/* подписи в две строки, чтобы числа во всех плашках стояли на одной линии */
.kpis--perf .kpi span { display: block; min-height: 2.4em; }
.rate { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.rate em { font-style: normal; font-size: 11.5px; color: var(--grey); }
.star { font-size: 13px; color: var(--line-2); line-height: 1; }
.star.is-on { color: var(--orange); }

/* ===== ПАНЕЛИ ФОРМ (профиль) ===== */
.panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  padding: 24px; margin-bottom: 14px; max-width: 880px;
}
.panel__title { margin: 0 0 16px; font-size: 16px; font-weight: 800; }
.panel--narrow { max-width: 620px; }
.panel--narrow .field:last-child { margin-bottom: 0; }
/* звёздочка обязательного поля */
.req { color: var(--pink); font-weight: 700; }
.form-ok {
  margin: 0 0 16px; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--green-soft); color: var(--green-hover); font-size: 13px; font-weight: 600;
  max-width: 880px;
}
.input:disabled { background: var(--panel); color: var(--grey); }

/* соцсети: галочка площадки + ссылка на аккаунт */
.nets { display: grid; gap: 10px; }
.net { display: grid; grid-template-columns: 200px 1fr; gap: 14px; align-items: center; }
.net__pick { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; cursor: pointer; }
.net__pick input { width: 18px; height: 18px; accent-color: var(--green); flex-shrink: 0; }
/* ссылка гаснет, пока площадка не отмечена */
.net:not(:has(input[type="checkbox"]:checked)) .net__url { opacity: .45; }

/* ===== КАРТОЧКИ ЗАДАНИЙ ===== */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.toolbar .select, .toolbar .input { width: auto; min-width: 150px; padding: 9px 12px; font-size: 13px; }
.filter-btn {
  height: 36px; padding: 0 14px; border: 0; border-radius: var(--r-sm);
  background: var(--white); font-family: inherit; font-size: 13px; font-weight: 700;
  color: var(--grey); cursor: pointer;
}
.filter-btn.is-active { background: var(--ink); color: var(--white); }

.tasks { display: grid; gap: 12px; }
.task {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px; display: flex; gap: 18px; align-items: flex-start;
}
.task__thumb {
  width: 78px; height: 88px; border-radius: var(--r-sm); background: var(--panel-2);
  flex-shrink: 0; display: grid; place-items: center; font-size: 24px; color: var(--line-2);
}
.task__body { flex: 1; min-width: 0; }
.task__title { margin: 0 0 6px; font-size: 16px; font-weight: 800; line-height: 1.25; }
.task__desc { margin: 0 0 12px; font-size: 13px; color: var(--grey); line-height: 1.45; }
.task__meta { display: flex; gap: 8px; flex-wrap: wrap; }
.task__side { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.task__price { font-size: 20px; font-weight: 800; white-space: nowrap; }
/* длинная подпись «Открыть техническое задание» переносится внутри кнопки,
   чтобы не сжимать заголовок карточки */
.task__side .btn {
  max-width: 172px; height: auto; min-height: 38px; padding: 9px 14px;
  white-space: normal; text-align: center; line-height: 1.25;
}

.badge {
  display: inline-block; padding: 5px 10px; border-radius: 7px;
  font-size: 11px; font-weight: 700; background: var(--panel); color: var(--grey);
}
.badge--green { background: var(--green-soft); color: var(--green-hover); }
.badge--blue { background: var(--blue-soft); color: var(--blue); }
.badge--orange { background: var(--orange-soft); color: #a25b00; }
.badge--pink { background: var(--pink-soft); color: var(--pink-deep); }
.badge--grey { background: var(--panel-2); color: var(--grey-3); }
.badge--dark { background: var(--ink); color: var(--white); }

.empty { padding: 60px 20px; text-align: center; background: var(--white); border: 1px dashed var(--line-2); border-radius: var(--r); }
.empty h3 { margin: 0 0 8px; font-size: 20px; font-weight: 800; }
.empty p { margin: 0 auto 22px; font-size: 14px; color: var(--grey); max-width: 420px; line-height: 1.5; }

/* ===== KPI ===== */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.kpi { padding: 20px; border-radius: var(--r); background: var(--white); border: 1px solid var(--line); }
.kpi span { font-size: 11px; font-weight: 700; color: var(--grey); text-transform: uppercase; letter-spacing: .03em; }
.kpi b { display: block; margin-top: 8px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.kpi--pink { background: var(--pink-soft); border-color: transparent; }
.kpi--pink b, .kpi--pink span { color: var(--pink-deep); }

/* ===== ДЕТАЛИ ЗАДАНИЯ (модалка) ===== */
.modal {
  position: fixed; inset: 0; z-index: 120; display: none;
  background: rgba(26, 28, 33, .55); padding: 30px 20px; overflow-y: auto;
}
.modal.is-open { display: block; }
.modal__box {
  max-width: 760px; margin: 0 auto; background: var(--white);
  border-radius: var(--r-lg); overflow: hidden;
}
.modal__box--wide { max-width: 900px; }
.modal__head {
  padding: 24px 30px; background: var(--ink); color: var(--white);
  display: flex; align-items: flex-start; gap: 16px;
}
.modal__head h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; line-height: 1.25; }
.modal__head p { margin: 0; font-size: 13px; color: var(--line-2); }
.modal__close {
  margin-left: auto; width: 34px; height: 34px; flex-shrink: 0;
  border: 0; border-radius: var(--r-sm); background: rgba(255,255,255,.14);
  color: var(--white); font-size: 18px; cursor: pointer; line-height: 1;
}
.modal__body { padding: 28px 30px; }
.modal__foot {
  padding: 20px 30px; border-top: 1px solid var(--line); background: var(--panel);
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.modal__foot .btn--block { flex: 1; }

.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.detail-grid div { padding: 14px; border-radius: var(--r-sm); background: var(--panel); }
.detail-grid span { display: block; font-size: 10.5px; font-weight: 700; color: var(--grey); text-transform: uppercase; letter-spacing: .03em; }
.detail-grid b { display: block; margin-top: 6px; font-size: 17px; font-weight: 800; }
.detail-sec { margin-bottom: 24px; }
.detail-sec h4 { margin: 0 0 12px; font-size: 12px; font-weight: 700; color: var(--grey); text-transform: uppercase; letter-spacing: .03em; }
.detail-sec p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink); white-space: pre-line; }
.shotlist { display: grid; gap: 8px; }
.shotlist li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; }
.shotlist i {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
  background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 12 12'%3E%3Cpath d='M1.5 6.3l3 3 6-6.6' fill='none' stroke='%235faf2d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat;
}

/* таймлайн статусов */
.timeline { display: flex; margin-bottom: 26px; }
.tl { flex: 1; text-align: center; position: relative; padding-top: 32px; }
.tl::before { content: ''; position: absolute; left: 0; right: 0; top: 11px; height: 3px; background: var(--line); }
.tl:first-child::before { left: 50%; }
.tl:last-child::before { right: 50%; }
.tl.is-done::before { background: var(--green); }
/* у текущего шага закрашена только левая половина линии: дальше ещё не дошли */
.tl.is-now::before { background: linear-gradient(to right, var(--green) 50%, var(--line) 50%); }
.tl i {
  position: absolute; left: 50%; top: 4px; transform: translateX(-50%);
  width: 18px; height: 18px; border-radius: 50%; background: var(--white);
  border: 3px solid var(--line-2); z-index: 1;
}
.tl.is-done i { background: var(--green); border-color: var(--green); }
.tl.is-now i { background: var(--blue); border-color: var(--blue); }
.tl b { display: block; font-size: 11.5px; font-weight: 700; color: var(--line-2); }
.tl.is-done b, .tl.is-now b { color: var(--ink); }

/* исполнитель */
.executor { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--panel); margin-bottom: 24px; }
.executor b { display: block; font-size: 14px; }
.executor small { display: block; font-size: 12px; color: var(--grey); margin-top: 2px; }

/* сдача */
.submission { padding: 16px; border-radius: var(--r); background: var(--blue-soft); margin-bottom: 24px; }
.submission a { color: var(--blue); font-weight: 700; word-break: break-all; }
.submission p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--grey-3); }

/* чат */
.chat { display: grid; gap: 10px; margin-bottom: 18px; max-height: 260px; overflow-y: auto; }
.msg { max-width: 82%; padding: 12px 14px; border-radius: var(--r); background: var(--panel-2); font-size: 13.5px; line-height: 1.45; }
.msg b { display: block; font-size: 11.5px; margin-bottom: 4px; color: var(--grey-3); }
.msg--mine { margin-left: auto; background: var(--pink-soft); }
.msg--mine b { color: var(--pink-deep); }
.chat-form { display: flex; gap: 10px; }
.chat-form .input { flex: 1; }
.history { display: grid; gap: 8px; font-size: 12.5px; color: var(--grey); }
.history li { display: flex; gap: 10px; }
.history time { flex-shrink: 0; font-weight: 700; color: var(--grey-3); }

@media (max-width: 1000px) {
  .kpis, .detail-grid { grid-template-columns: repeat(2, 1fr); }
  .perf__presence { margin-left: 0; width: 100%; order: 3; }
  .auth__aside { display: none; }
  .checks, .field-row, .field-row--3 { grid-template-columns: 1fr; }
  .net { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .side { width: auto; height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--line); }
  .side__nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; gap: 6px; }
  .side__link { white-space: nowrap; }
  .side__foot { margin-top: 18px; display: flex; gap: 12px; align-items: center; }
  .side__balance { margin: 0; flex: 1; padding: 10px 14px; }
  .side__balance b { font-size: 17px; }
  .main__head, .main__body { padding-left: 18px; padding-right: 18px; }
  .task { flex-wrap: wrap; }
  .task__side { align-items: flex-start; text-align: left; width: 100%; flex-direction: row; justify-content: space-between; }
  .modal { padding: 0; }
  .modal__box { border-radius: 0; min-height: 100vh; }
  .modal__head, .modal__body, .modal__foot { padding-left: 18px; padding-right: 18px; }
  .timeline { display: grid; gap: 14px; }
  .tl { text-align: left; padding: 0 0 0 30px; }
  .tl::before { display: none; }
  .tl i { left: 0; top: 2px; transform: none; }
  .tl b { font-size: 13px; }
}
