@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&display=swap');

:root {
  color-scheme: light;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E4E7EC;
  --border-strong: #D0D5DD;
  --text: #101828;
  --text-muted: #667085;
  --text-faint: #98A2B3;
  --blue: #114BFF;
  --blue-hover: #2B63FF;
  --blue-bg: #DCE8FF;
  --green: #17794F;
  --green-bg: #E4F5EC;
  --amber: #B0650E;
  --amber-bg: #FDF1DE;
  --red: #C0342A;
  --red-bg: #FCE9E7;
  --radius-card: 20px;
  --radius-btn: 16px;
  --radius-input: 14px;
  --shadow: 0 8px 32px rgba(16,24,40,0.08);
  --shadow-sm: 0 2px 8px rgba(16,24,40,0.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.muted { color: var(--text-muted); }

.brand { display: flex; align-items: center; gap: 8px; }
.brand-logo { width: 26px; height: 26px; flex-shrink: 0; }
.brand-word { display: flex; align-items: baseline; gap: 5px; }
.brand-atra { font-weight: 800; font-size: 1.02em; color: var(--text); letter-spacing: -0.2px; }
.brand-digital { font-weight: 400; font-size: 0.62em; color: var(--blue); letter-spacing: 2.5px; }

/* Фирменный водяной знак — большая буква A на фонах */
.brand-watermark {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.brand-watermark svg { position: absolute; right: -60px; bottom: -60px; width: 420px; height: 420px; opacity: 0.03; }

/* ---- Login screen ---- */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--bg);
  overflow: hidden;
}

.login-card {
  width: min(380px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 36px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

.login-card h1 { font-size: 1.4rem; margin: 20px 0 4px; font-weight: 800; letter-spacing: -0.3px; }
.login-card p { margin: 0 0 24px; font-size: 0.9rem; font-weight: 500; }

#login-form label, .modal label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 16px;
}

input, select {
  width: 100%;
  margin-top: 6px;
  padding: 10px 13px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-input);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  font-weight: 500;
}
input:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }

button { cursor: pointer; font-family: inherit; }

.btn-primary {
  padding: 11px 18px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-btn);
  font-size: 0.9rem;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--blue-hover); }
#login-form .btn-primary { width: 100%; padding: 12px; }

.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-hover); }

.btn-ghost {
  padding: 8px 15px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--radius-btn);
  font-size: 0.84rem;
  font-weight: 700;
  transition: all 0.15s;
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-bg); }

.btn-xs { padding: 4px 9px; font-size: 0.72rem; }
.btn-danger:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }
.row-actions { display: flex; gap: 6px; white-space: nowrap; }

.error-msg {
  background: var(--red-bg);
  border: 1px solid rgba(192,52,42,0.2);
  color: var(--red);
  padding: 9px 12px;
  border-radius: var(--radius-input);
  font-size: 0.82rem;
  margin-bottom: 16px;
  font-weight: 600;
}

/* ---- App shell ---- */
.app-shell {
  display: grid;
  /* minmax(0, 1fr) — без этого широкая таблица заявок раздвигает колонку
     контента шире доступного места и весь экран уезжает за край окна. */
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand { padding: 4px 10px 24px; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: var(--radius-btn);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  transition: all 0.12s;
}
.nav-item:hover { background: var(--bg); color: var(--text); }
.nav-item.active { background: var(--blue-bg); color: var(--blue); font-weight: 700; }
.nav-ico { display: inline-flex; width: 18px; height: 18px; flex-shrink: 0; }
.nav-ico svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.sidebar-footer { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 12px; }
#admin-hub-switch-wrap { margin-bottom: 12px; }
#admin-hub-switch-wrap select { margin: 0; font-size: 0.82rem; padding: 8px 10px; }

/* Плашка «вы в кабинете хаба» — показывается главному админу, когда он зашёл
   в кабинет конкретного хаба через «Перейти в кабинет» на странице «Аккаунты». */
.impersonation-banner {
  background: var(--blue-bg);
  border: 1px solid rgba(17,75,255,0.25);
  border-radius: var(--radius-input);
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.impersonation-banner .impersonation-text { font-size: 0.78rem; color: var(--blue); font-weight: 700; line-height: 1.4; }
.impersonation-banner .impersonation-text b { font-size: 0.86rem; }
.impersonation-banner button { width: 100%; margin: 0; }

/* Статус автосинхронизации с гугл-таблицей — показывается только главному админу. */
.sync-status-widget {
  background: var(--bg-soft, #F4F6FB);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sync-status-text { font-size: 0.74rem; color: var(--text-muted, #6B7280); line-height: 1.4; }
.sync-status-text.sync-ok { color: var(--green); }
.sync-status-text.sync-error { color: var(--red); }
.sync-status-widget button { width: 100%; margin: 0; font-size: 0.78rem; padding: 6px 8px; }
.sidebar-user { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sidebar-user span { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.content { padding: 28px 36px 60px; width: 100%; max-width: none; position: relative; }

/* ---------- состояния загрузки: верхний прогресс-бар + скелетоны таблиц/графиков ---------- */
#top-loader {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  overflow: hidden; opacity: 0; pointer-events: none; transition: opacity 0.15s ease; z-index: 5;
}
#top-loader.active { opacity: 1; }
#top-loader-bar {
  position: absolute; top: 0; left: 0; height: 100%; width: 40%;
  background: var(--blue); border-radius: 2px;
  animation: top-loader-slide 1.1s ease-in-out infinite;
}
@keyframes top-loader-slide {
  0% { left: -40%; }
  100% { left: 100%; }
}

.skeleton-row td { padding: 14px 12px; }
.skeleton-bar {
  height: 14px; border-radius: 6px; width: 100%;
  background: linear-gradient(90deg, #ECEEF2 25%, #F6F7F9 37%, #ECEEF2 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}
@keyframes skeleton-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
.chart-spinner {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.6); z-index: 2;
}
.chart-spinner::after {
  content: ''; width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--blue-bg); border-top-color: var(--blue);
  animation: chart-spinner-spin 0.7s linear infinite;
}
@keyframes chart-spinner-spin { to { transform: rotate(360deg); } }

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}
.content-header h2 { margin: 0; font-size: 1.4rem; font-weight: 800; letter-spacing: -0.4px; }
#header-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#header-controls input, #header-controls select { width: auto; margin: 0; padding: 8px 12px; font-size: 0.84rem; }

/* ---- KPI cards ---- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.kpi-card .value { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.3px; }
.kpi-card .label { font-size: 0.76rem; color: var(--text-muted); margin-top: 3px; font-weight: 600; }
.kpi-card.accent-blue .value { color: var(--blue); }
.kpi-card.accent-green .value { color: var(--green); }
.kpi-card.accent-amber .value { color: var(--amber); }
.kpi-card.accent-red .value { color: var(--red); }

/* ---- Panel / tables ---- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 22px 10px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.panel-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.panel-header h3 { margin: 0; font-size: 1rem; font-weight: 800; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select { width: auto; margin: 0; padding: 8px 11px; font-size: 0.84rem; }
#search-input { min-width: 220px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
thead th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-weight: 500;
}
tbody tr:hover { background: var(--bg); }
tbody tr.total-row { font-weight: 800; background: var(--bg); }
tbody tr.total-row td { border-top: 2px solid var(--border-strong); }

/* Подсветка строк заявок по статусу — как условное форматирование в Google Sheets */
tbody tr.row-paid { background: var(--green-bg); }
tbody tr.row-paid:hover { background: #d7f0e3; }
tbody tr.row-waiting { background: var(--amber-bg); }
tbody tr.row-waiting:hover { background: #fbe7c8; }
tbody tr.row-cancelled { background: var(--red-bg); }
tbody tr.row-cancelled:hover { background: #fadad7; }
tbody tr.row-dubl { background: #ECEAFB; }
tbody tr.row-dubl:hover { background: #E1DCF9; }
tbody tr.row-paid td, tbody tr.row-waiting td, tbody tr.row-cancelled td, tbody tr.row-dubl td { border-bottom-color: rgba(16,24,40,0.06); }

.reconciled-check { width: auto; margin: 0; cursor: pointer; }
.status-changed-at { font-size: 0.76rem; color: var(--text-muted); white-space: nowrap; }

/* Плашки в стиле Apple */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 700;
}
.badge-waiting { background: var(--amber-bg); color: var(--amber); }
.badge-paid { background: var(--green-bg); color: var(--green); }
.badge-cancelled { background: var(--red-bg); color: var(--red); }
.badge-neutral { background: var(--blue-bg); color: var(--blue); }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--blue-bg);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-select {
  padding: 6px 9px;
  font-size: 0.8rem;
  width: auto;
  margin: 0;
}

.empty-state {
  text-align: center;
  padding: 44px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.sub-tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.sub-tab {
  padding: 9px 4px;
  margin-right: 20px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  transform: translateY(1px);
}
.sub-tab.active { color: var(--text); border-bottom-color: var(--blue); }

.profit-positive { color: var(--green); font-weight: 800; }
.profit-negative { color: var(--red); font-weight: 800; }

/* Плашка с реквизитами оплаты */
.payment-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--blue-bg);
  border: 1px solid rgba(17,75,255,0.18);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.payment-banner .payment-ico {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 12px;
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.payment-banner .payment-ico svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 2; fill: none; }
.payment-banner .payment-title { font-weight: 800; font-size: 0.92rem; margin-bottom: 4px; }
.payment-banner .payment-details { font-size: 0.86rem; color: var(--text); font-weight: 600; line-height: 1.5; }
.payment-banner .payment-details b { color: var(--blue); font-weight: 800; }

/* Жёлтый баннер-напоминание: превышен предоплаченный лимит по хабу */
.finance-warning {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--amber-bg);
  border: 1px solid rgba(176,101,14,0.3);
  border-radius: var(--radius-card);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.86rem;
  color: var(--amber);
  font-weight: 700;
  line-height: 1.5;
}
.finance-warning .warn-ico { flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; }
.finance-warning .warn-ico svg { width: 100%; height: 100%; stroke: var(--amber); stroke-width: 2; fill: none; }
.finance-warning ul { margin: 6px 0 0; padding-left: 18px; }
.finance-warning li { margin-bottom: 2px; }

/* Разбивка расходов по категориям */
.type-breakdown { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.type-row { display: flex; align-items: center; gap: 12px; }
.type-row .type-label { width: 200px; flex-shrink: 0; font-size: 0.84rem; font-weight: 700; }
.type-row .type-bar-wrap { flex: 1; background: var(--bg); border-radius: 8px; height: 10px; overflow: hidden; }
.type-row .type-bar { height: 100%; background: var(--blue); border-radius: 8px; }
.type-row .type-amount { width: 130px; flex-shrink: 0; text-align: right; font-size: 0.84rem; font-weight: 800; }
.type-row .type-pct { width: 50px; flex-shrink: 0; text-align: right; font-size: 0.76rem; color: var(--text-muted); font-weight: 600; }

/* Финансы: строки с превышением лимита */
tbody tr.row-excess { background: var(--red-bg); }
tbody tr.row-excess:hover { background: #fadad7; }
.excess-value { color: var(--red); font-weight: 800; }
.ok-value { color: var(--green); font-weight: 700; }

/* Отзывы */
.reviews-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 30px;
  box-shadow: var(--shadow-sm);
  max-width: 560px;
}
.reviews-card .reviews-ico {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--blue-bg); display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.reviews-card .reviews-ico svg { width: 24px; height: 24px; stroke: none; fill: var(--blue); }
.reviews-card p { font-size: 0.95rem; line-height: 1.6; margin: 0 0 18px; font-weight: 600; }
.reviews-card a.btn-primary { display: inline-block; text-decoration: none; }

/* Графики */
.charts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 20px; }
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 18px 20px; box-shadow: var(--shadow-sm); min-width: 0; }
.chart-card h3 { margin: 0 0 14px; font-size: 0.95rem; font-weight: 800; }
/* width: 100% — .chart-wrap сам никогда не должен раздвигаться шире карточки, иначе
   он распирает всю страницу. Прокручивается по горизонтали только .chart-scroll-inner
   внутри него (её ширину задаёт JS под количество дней/баров). */
.chart-card .chart-wrap { position: relative; width: 100%; max-width: 100%; height: 240px; overflow-x: auto; overflow-y: hidden; }
.chart-scroll-inner { height: 100%; min-width: 100%; }
.chart-card-full { grid-column: 1 / -1; }

.btn-jump {
  padding: 6px 10px;
  font-size: 0.76rem;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--blue);
  border-radius: var(--radius-btn);
  font-weight: 700;
}
.btn-jump:hover { background: var(--blue-bg); border-color: var(--blue); }

/* ---- Modal ---- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(16,24,40,0.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
  padding: 16px;
}
.modal {
  width: min(380px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 26px;
  box-shadow: 0 20px 60px rgba(16,24,40,0.18);
  box-sizing: border-box;
}
.modal h3 { margin-top: 0; font-size: 1.1rem; font-weight: 800; }
.modal-actions { display: flex; gap: 10px; margin-top: 6px; }
.modal-actions .btn-ghost, .modal-actions .btn-primary { width: 50%; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.checkbox-label input { width: auto; margin: 0; }

/* Подтверждение опасного действия — кнопка "Подтвердить" красная, если вызвано как danger. */
#confirm-ok.danger { background: var(--red); }
#confirm-ok.danger:hover { background: #A32A22; }

/* ---- Toast-уведомления (замена alert()) ---- */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}
.toast {
  background: var(--text);
  color: #fff;
  border-radius: var(--radius-input);
  padding: 13px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(16,24,40,0.25);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: toast-in 0.2s ease-out;
}
.toast.toast-success { background: var(--green); }
.toast.toast-error { background: var(--red); }
.toast-ico { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.toast-ico svg { width: 100%; height: 100%; stroke: #fff; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.toast.fade-out { animation: toast-out 0.2s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; transform: translateY(4px); } }

[hidden] { display: none !important; }

/* ---- Мобильная адаптация ----
   Сайдбар превращается в верхнюю панель: бренд сверху, навигация — горизонтальная
   прокручиваемая полоса, футер (депозиты хаба/синхронизация/выход) — компактной
   строкой ниже, а не пропадает совсем, как было раньше. */
@media (max-width: 880px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    flex-direction: column;
    padding: 14px 14px 10px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-brand { padding: 2px 4px 12px; }
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    flex: none;
    gap: 4px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .nav-item { flex-shrink: 0; white-space: nowrap; padding: 8px 11px; font-size: 0.82rem; }

  .sidebar-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
  }
  .sidebar-footer > * { margin-bottom: 0 !important; }
  #admin-hub-switch-wrap, .impersonation-banner, .sync-status-widget { flex: 1 1 180px; min-width: 160px; }
  .sidebar-user { flex: 1 1 180px; }
  #change-password-btn { flex: 1 1 160px; width: auto; }

  .content { padding: 18px; }
  .content-header { margin-bottom: 16px; }
  .content-header h2 { font-size: 1.2rem; }

  .charts-row { grid-template-columns: 1fr; }
  .chart-card .chart-wrap { height: 210px; }

  .modal-actions { flex-wrap: wrap; }
  .modal-actions .btn-ghost, .modal-actions .btn-primary { width: 100%; }
}

@media (max-width: 560px) {
  .login-card { padding: 24px; }
  .content { padding: 12px; }
  .kpi-row { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
  .kpi-card { padding: 12px 14px; }
  .kpi-card .value { font-size: 1.25rem; }
  .panel { padding: 14px 14px 6px; }
  table { font-size: 0.78rem; }
  thead th, tbody td { padding: 8px !important; }
  .nav-item { padding: 7px 9px; font-size: 0.78rem; }
  .nav-ico { width: 16px; height: 16px; }
  #header-controls input, #header-controls select { font-size: 0.8rem; }
  .filters input, .filters select { font-size: 0.8rem; }
  #search-input { min-width: 0; flex: 1 1 100%; }
}
