/* Оформление TaskerYan: светлая минималистичная страница с фиолетовым акцентом. */
:root {
  --bg: #f4f5fb;
  --bg-soft: #eef0fa;
  --panel: #ffffff;
  --panel-muted: #f6f7fc;
  --border: #e2e4f0;
  --border-strong: #d3d6e8;
  --text: #16161a;
  --text-muted: #6f7285;
  --text-faint: #9a9db0;
  --accent: #4a5bd8;
  --accent-strong: #3b49c4;
  --accent-soft: #eaecfd;
  --ok: #1f9254;
  --ok-soft: #e7f6ec;
  --warn: #b8791b;
  --warn-soft: #fdf3e2;
  --danger: #d0453b;
  --danger-soft: #fdecea;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 12px 40px rgba(30, 34, 90, .07), 0 2px 6px rgba(30, 34, 90, .04);
  --shadow-soft: 0 6px 18px rgba(30, 34, 90, .06);
  --font: "Inter", "Segoe UI", "Helvetica Neue", system-ui, -apple-system, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

/* ——— Левая фирменная колонка ——— */
.promo {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #eef0fb 0%, #e6e9f8 55%, #dfe3f6 100%);
  border-right: 1px solid #e4e7f5;
}

.promo__inner {
  position: relative;
  z-index: 2;
  padding: 30px 22px 0;
}

.promo__lead {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
  font-weight: 600;
  color: #2b2f4a;
  letter-spacing: -.01em;
}

.promo__rule {
  width: 34px;
  margin: 18px 0;
  border: 0;
  border-top: 1px solid #c3c8e4;
}

.promo__note {
  margin: 0;
  font-size: 12.5px;
  color: #7b80a0;
  line-height: 1.55;
}

.promo__hills {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 62%;
  z-index: 1;
}

/* ——— Верхняя панель ——— */
.content { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 32px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e8eaf4;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }

.brand__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(150deg, #4f61e0, #3a46b8);
  color: #fff;
}

.brand__name { font-weight: 600; font-size: 15.5px; letter-spacing: -.01em; }

.topbar__divider { width: 1px; height: 22px; background: #e2e4f0; }

.topbar__page { color: var(--text-muted); font-size: 14.5px; }

.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 16px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #f3f4fa;
  font-size: 12.5px;
  color: var(--text-muted);
  border: 1px solid #e7e9f3;
}

.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: #c9cddd; }
.pill--live { background: var(--ok-soft); color: #16703f; border-color: #cfead9; }
.pill--live .pill__dot { background: #23a35c; box-shadow: 0 0 0 3px rgba(35, 163, 92, .16); }
.pill--test { background: #eef0fd; color: #3b49c4; border-color: #dbdffa; }
.pill--test .pill__dot { background: #5a68e0; box-shadow: 0 0 0 3px rgba(90, 104, 224, .16); }
.pill--error { background: var(--danger-soft); color: #a4362e; border-color: #f6d5d2; }
.pill--error .pill__dot { background: #d0453b; }

.user { display: inline-flex; align-items: center; gap: 9px; }

.user__avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(150deg, #a9b2ea, #7d88d3);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
}

.user__name { font-size: 14px; }

/* ——— Основная область ——— */
.main {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 34px 32px 40px;
}

.title {
  margin: 0;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.title__accent { color: var(--accent); }

.subtitle {
  margin: 10px 0 24px;
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.5;
}

.composer {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 8px 8px 10px;
  transition: border-color .15s, box-shadow .15s;
}

.composer:focus-within { border-color: #c3c9f5; box-shadow: 0 14px 44px rgba(74, 91, 216, .13); }

.composer__input {
  width: 100%;
  border: 0;
  outline: none;
  resize: vertical;
  min-height: 74px;
  padding: 14px 16px 6px;
  font: inherit;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: transparent;
}

.composer__input::placeholder { color: #a9adc0; }

.composer__bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 0;
}

.composer__left { display: flex; gap: 6px; }
.composer__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.counter { color: var(--text-faint); font-size: 13px; font-variant-numeric: tabular-nums; }

.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(150deg, #5566e6, #4351cf);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(67, 81, 207, .28);
  transition: transform .12s, box-shadow .15s, opacity .15s;
}

.primary-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(67, 81, 207, .32); }
.primary-button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.primary-button--small { padding: 9px 16px; font-size: 14px; }
.primary-button--busy { opacity: .8; }

.kbd {
  font: inherit;
  font-size: 11.5px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .25);
}

.ghost-button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13.5px;
  padding: 7px 10px;
  border-radius: 9px;
  cursor: pointer;
}

.ghost-button:hover { background: var(--panel-muted); color: var(--text); }

.ghost-button--boxed {
  border: 1px solid var(--border);
  background: var(--panel);
  color: #4b4f63;
  padding: 8px 14px;
}

.icon-button {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-faint);
  width: 32px;
  height: 32px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.icon-button:hover { color: var(--danger); border-color: #f0d3d0; }

/* ——— Сообщения ——— */
.notice {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  border: 1px solid transparent;
  white-space: pre-line;
}

.notice--warn { background: var(--danger-soft); border-color: #f6d5d2; color: #9c352d; }
.notice--ok { background: var(--ok-soft); border-color: #cfe9d8; color: #17693c; }
.notice a { color: inherit; font-weight: 600; }
/* Кнопка внутри плашки: цвет текста и ссылки должен оставаться белым. */
.notice .primary-button,
.notice .primary-button:visited,
.notice a.primary-button {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* Строка успеха: текст, ссылка на задачу, файлы и кнопка календаря в одну линию. */
.success-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.success-line__text { font-weight: 600; }
.success-line__link { color: inherit; }
.success-line__note { color: #2f7a52; font-size: 13.5px; }
.success-line__download { font-size: 13.5px; text-decoration: underline; }

/* ——— Карточка результата ——— */
.preview {
  margin-top: 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px 20px 8px;
}

.preview__head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.preview__title { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.preview__hint { margin: 4px 0 0; color: var(--text-muted); font-size: 13.5px; }
.preview__head > button { margin-left: auto; }
.preview__foot { border-top: 1px solid #eef0f7; margin-top: 14px; padding: 10px 0 8px; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.field {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--panel-muted);
  border: 1px solid #eceef7;
  border-radius: var(--radius);
  position: relative;
}

.field--wide { grid-column: 1 / -1; }
.field:focus-within { background: #fff; border-color: #cfd4f7; }

.field__icon { color: #8f93a8; margin-top: 20px; flex: 0 0 auto; }

.field__body { flex: 1 1 auto; min-width: 0; }

.field__label { display: block; font-size: 12px; color: var(--text-faint); margin-bottom: 3px; }

.field__control {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  padding: 3px 0;
  border-bottom: 1px solid transparent;
}

.field__control:focus { border-bottom-color: #c8cdf2; }

.field__control--area { resize: vertical; min-height: 42px; line-height: 1.5; }

select.field__control { cursor: pointer; }

.field__row { display: flex; align-items: center; gap: 8px; }

.field__control--time { width: 108px; flex: 0 0 auto; }

.field__note { margin: 3px 0 0; font-size: 12px; color: var(--text-faint); }

.field__error { margin: 4px 0 0; font-size: 12.5px; color: var(--danger); }

.field--invalid { background: #fff7f6; border-color: #f2d4d1; }

.field__state {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 11px;
  color: var(--text-faint);
}

.field__state--detected { color: #5a68e0; }
.field__state--manual { color: var(--warn); }

/* ——— Файлы ——— */
.files {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px dashed #d8dbf0;
  border-radius: var(--radius);
  background: #fbfbfe;
}

.files--drop { border-color: #9aa4ec; background: #f2f3fe; }

.files__head { display: flex; align-items: flex-start; gap: 12px; }
.files__head .field__icon { margin-top: 2px; }
.files__text { display: flex; flex-direction: column; min-width: 0; }
.files__actions { margin-left: auto; display: flex; gap: 8px; }

.files__list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.files__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 13.5px;
}

.files__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files__size { color: var(--text-faint); font-size: 12.5px; margin-left: auto; }

.files__remove {
  border: 0;
  background: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
}
.files__remove:hover { color: var(--danger); }

/* ——— Напоминание ——— */
.reminder {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px dashed #d8dbf0;
  border-radius: var(--radius);
  background: #fbfbfe;
}

.reminder__main { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.reminder__main .field__icon { margin-top: 2px; }
.reminder__text { display: flex; flex-direction: column; }
.reminder__hint { font-size: 12.5px; color: var(--text-faint); }
.reminder__controls { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.reminder__input { width: 210px; border: 1px solid var(--border); border-radius: 9px; padding: 6px 8px; background: #fff; }
.reminder__input:focus { border-color: #c8cdf2; }

@media (max-width: 700px) {
  .reminder { flex-direction: column; align-items: stretch; }
  .reminder__controls { margin-left: 0; }
  .reminder__input { width: 100%; }
}

.warnings { margin: 0; font-size: 13px; color: var(--warn); }
.warnings ul { margin: 0; padding-left: 18px; }

/* ——— Подвал ——— */
.footer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  color: var(--text-faint);
  font-size: 13px;
}

.footer__left { margin: 0; display: flex; gap: 8px; align-items: baseline; }
.spark { color: #7b86e0; }
.link-button {
  margin-left: auto;
  border: 0;
  background: none;
  color: #5a68e0;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  white-space: nowrap;
}
.link-button:hover { background: var(--accent-soft); }

/* ——— Окно «Как это работает» ——— */
.dialog {
  width: min(560px, 92vw);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: var(--text);
  box-shadow: 0 30px 70px rgba(20, 24, 70, .22);
}
.dialog::backdrop { background: rgba(24, 26, 50, .35); }
.dialog__title { margin: 0 0 12px; font-size: 19px; }
.dialog__subtitle { margin: 18px 0 8px; font-size: 15px; }
.dialog__list { margin: 0; padding-left: 20px; color: #3d4054; font-size: 14px; line-height: 1.6; }
.dialog__note { margin: 16px 0; padding: 10px 14px; border-radius: 12px; background: var(--panel-muted); font-size: 13px; color: var(--text-muted); }
.dialog form { margin: 0; text-align: right; }

.feed {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  padding: 10px 12px;
  border: 1px dashed #d8dbf0;
  border-radius: 12px;
  background: #fbfbfe;
}

.feed__url {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  color: #4b4f63;
  overflow-wrap: anywhere;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ——— Узкие экраны ——— */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .promo { display: none; }
  .main { padding: 24px 18px 32px; }
  .topbar { padding: 12px 18px; }
  .title { font-size: 30px; }
  .fields { grid-template-columns: 1fr; }
  .footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .link-button { margin-left: 0; }
}

@media (max-width: 520px) {
  .topbar__divider, .topbar__page, .user__name { display: none; }
  .composer__bottom { flex-wrap: wrap; }
  .composer__right { width: 100%; justify-content: space-between; }
  .primary-button { flex: 1 1 auto; justify-content: center; }
  .kbd { display: none; }
}
