/* =========================================
   КІНОПОРТАЛ — Користувачі (mobile-first)
   Оновлено: 2025-10-24
========================================= */

:root{
  --page-bg: linear-gradient(90deg, #f4f4f4, #e0e7ff);
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --muted-2: #9aa4b2;
  --border: #e5e7eb;
  --card-border: #e3e8ef;
  --brand: #3498db;
  --brand-2: #87CEEB;
  --brand-hover: #2980b9;
  --shadow: 0 10px 24px rgba(0,0,0,.12);
  --shadow-soft: 0 6px 14px rgba(0,0,0,.08);
  --radius: 14px;
}

*{ box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--page-bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

/* Контейнер страницы */
.users-main{
  min-height: calc(100vh - 160px); /* с учётом header/footer */
  display: block;
  padding: 16px 0 24px;
}
.users-container{
  width: min(1200px, 100%);
  margin-inline: auto;
  padding-inline: clamp(12px, 4vw, 24px);
}

/* Заголовок */
.users-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.users-title{
  margin: 6px 0 10px 0;
  font-size: clamp(22px, 4.4vw, 30px);
  line-height: 1.2;
}

/* Алерты */
.alert{
  border-radius: 12px;
  padding: 10px 12px;
  margin: 10px 0 14px;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  font-size: 14px;
}
.alert.error{
  color: #842029;
  background: #f7e7e7;
  border-color: #f5c2c7;
}

/* Блок роли */
.role-block{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(12px, 3.4vw, 18px);
  margin-top: 16px;
}
.role-heading{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin-bottom: 10px;
}
.role-title{
  margin:0; font-size: clamp(18px, 3.8vw, 22px); line-height:1.25;
}
.badge{
  display:inline-flex; align-items:center; justify-content:center;
  min-width: 32px; height: 28px; padding: 0 10px;
  border-radius: 999px;
  font-weight: 700; font-size: 13px; color:#fff;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 14px rgba(52,152,219,.25);
}

/* Сетка пользователей */
.users-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

/* Карточка пользователя */
.user-card{
  background:#fff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  transition: transform .08s ease, box-shadow .2s ease, border-color .2s ease;
}
.user-link{
  display:flex; align-items:center; gap:12px;
  padding: 12px;
  text-decoration:none; color: inherit;
}
.user-card:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
  border-color: #d7dde8;
}

/* Аватар и текст */
.user-avatar{
  width:56px; height:56px; border-radius:50%; object-fit:cover; flex:0 0 auto;
  background:#f1f5f9; border:1px solid #e5e7eb;
}
.user-meta{ display:flex; flex-direction:column; gap:2px; min-width: 0; }
.user-name{
  font-weight:700; font-size: 15px; color:#111827;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width: 100%;
}
.user-role{
  font-size: 13px; color: var(--muted);
}

/* Пустой список */
.muted{ color: var(--muted-2); }
.center{ text-align:center; }

/* Адаптив мелочи */
@media (max-width: 420px){
  .user-link{ padding: 10px; gap: 10px; }
  .user-avatar{ width:52px; height:52px; }
}
