/* ============================================
   Admin Panel — Design System (aligned with Artist Dashboard)
   ============================================ */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============================================
   CSS Variables
   ============================================ */

:root {
  --primary: #00b0b9;
  --primary-dark: #008c93;
  --primary-light: #00d4de;
  --primary-glow: rgba(0, 176, 185, 0.25);
  --bg-dark: #0a0a0a;
  --bg-card: #141414;
  --bg-card-hover: #1c1c1c;
  --bg-sidebar: #0e0e0e;
  --bg-input: #1a1a1a;
  --bg-surface: #111;
  --bg-hover: #1c1c1c;
  --border: rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.12);
  --text-primary: #ffffff;
  --text: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.35);
  --error: #ff4757;
  --danger: #ff4757;
  --success: #2ed573;
  --warning: #ffa502;
  --info: #3498ff;
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --header-height: 68px;
  --sidebar-width: 260px;
  --transition: all 0.2s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(0, 176, 185, 0.15);
}

/* ============================================
   Animations
   ============================================ */

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

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

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

@keyframes skeleton-shimmer {
  0%,
  100% {
    opacity: 0.04;
  }
  50% {
    opacity: 0.08;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

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

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

/* ============================================
   Body
   ============================================ */

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Blurred background */
.bg-blur {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9)),
    url('/assets/images/bg.webp') center/cover no-repeat;
  filter: blur(8px);
  transform: scale(1.05);
  z-index: -1;
}

/* ============================================
   Login Screen
   ============================================ */

#loginScreen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.85));
  padding: 20px;
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Modern two-column login: brand on the left, form on the right (desktop). */
#loginScreen .login-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  max-width: 880px;
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
}

#loginScreen .login-split__brand {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(0, 176, 185, 0.18), transparent 60%),
    linear-gradient(135deg, rgba(0, 176, 185, 0.08), rgba(0, 0, 0, 0));
  border-right: 1px solid var(--border);
  text-align: left;
}

#loginScreen .login-split__brand h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-primary) 50%, var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#loginScreen .login-split__brand p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  max-width: 320px;
}

#loginScreen .login-split__feature-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#loginScreen .login-split__feature-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

#loginScreen .login-split__feature-list li::before {
  content: '✓';
  width: 18px;
  height: 18px;
  background: rgba(0, 176, 185, 0.18);
  color: var(--primary);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

#loginScreen .login-split__form {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#loginScreen .login-split__form h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  text-align: left;
}

#loginScreen .login-split__form .form-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 18px;
  text-align: left;
}

@media (max-width: 720px) {
  #loginScreen .login-split {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
  #loginScreen .login-split__brand {
    display: none;
  }
  #loginScreen .login-split__form {
    padding: 28px 22px;
  }
}

.login-card h1,
.login-card h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  margin-bottom: 20px;
  font-weight: 700;
}

.login-logo {
  margin-bottom: 20px;
}

.login-logo {
  margin-bottom: 20px;
}
.login-logo img {
  width: auto;
  height: auto;
  max-width: min(50vw, 160px);
  max-height: 70px;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.login-card .form-group {
  text-align: left;
  margin-bottom: 16px;
}

.login-card .form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.login-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: var(--transition);
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-btn.loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

.error-message {
  color: var(--error);
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}

.error-message.visible {
  display: block;
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.login-back-link {
  display: block;
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: none;
  transition: var(--transition);
}

.login-back-link:hover {
  color: var(--primary);
}

.pw-wrap {
  position: relative;
}

.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  transition: var(--transition);
}

.pw-toggle:hover {
  color: var(--text-secondary);
}

.loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 6px;
  vertical-align: middle;
}

/* ============================================
   Layout
   ============================================ */

.app {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  height: 100dvh;
  left: 0;
  top: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.06) transparent;
}

.sidebar-header {
  padding: 22px 20px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.sidebar-heading {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary) 60%, var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 176, 185, 0.15);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: auto;
}

.sidebar-group {
  padding: 8px 10px 4px;
}

.sidebar-group-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  opacity: 0.7;
}

.sidebar-group-label::before,
.sidebar-group-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.sidebar-group-label::before {
  margin-right: 8px;
}

.sidebar-group-label::after {
  margin-left: 8px;
}

.nav-section {
  padding: 14px 10px;
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 12px;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  margin-bottom: 2px;
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(0, 176, 185, 0.18), rgba(0, 140, 147, 0.08));
  color: var(--primary-light);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-icon-svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 10px;
  border-top: 1px solid var(--border);
}

.user-avatar {
  width: 34px;
  height: 34px;
  background: var(--bg-input);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  object-fit: cover;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.user-email {
  font-size: 13px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role {
  font-size: 11px;
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 600;
}

.logout-btn {
  width: 100%;
  padding: 11px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: inherit;
}

.logout-btn:hover {
  background: rgba(255, 71, 87, 0.08);
  color: var(--danger);
}

.logout-btn .nav-icon-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ============================================
   Main Content
   ============================================ */

.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-width: 0;
  width: calc(100% - var(--sidebar-width));
  max-width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-width: 0;
  width: calc(100% - var(--sidebar-width));
  max-width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* ============================================
   Page
   ============================================ */

.page {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  animation: pageIn 0.3s ease both;
}

.page-header {
  margin-bottom: 24px;
}

.page-title {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

.page-header--hero {
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(0, 176, 185, 0.16), rgba(18, 18, 18, 0.9));
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
}

.page-header--hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(0, 176, 185, 0.4), transparent 70%);
  opacity: 0.7;
}

.page-header--hero .page-title {
  font-size: 32px;
  margin-bottom: 10px;
}

.page-header-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.page-header-copy {
  max-width: 520px;
}

.page-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.page-header-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 12px;
}

.page-meta-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 140px;
}

.page-meta-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

.page-meta-value {
  font-size: 20px;
  font-weight: 700;
}

.page-header-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.page-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(46, 213, 115, 0.12);
  border: 1px solid rgba(46, 213, 115, 0.35);
  color: var(--success);
  font-size: 12px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(46, 213, 115, 0.6);
}

.page-status-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   Stats Grid
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
}

.stat-card:hover::after {
  opacity: 1;
}

.stat-value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================
   Cards
   ============================================ */

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  transition: var(--transition);
  animation: fadeIn 0.3s ease;
}

.card:hover {
  border-color: var(--border-light);
}

.card + .card {
  margin-top: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
}

.card-title-icon svg {
  width: 100%;
  height: 100%;
}

.card-body {
  padding: 24px;
  padding-top: 4px;
}

/* Skeleton loading */
.skeleton {
  position: relative;
  pointer-events: none;
}

.skeleton-pulse {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 4%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 84%
  );
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.skeleton-pulse-block {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-label {
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.btn-primary:hover {
  box-shadow: 0 4px 16px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-primary:active {
  box-shadow: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-light);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #e8404f;
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.25);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #27c467;
  box-shadow: 0 4px 12px rgba(46, 213, 115, 0.25);
}

.btn-warning {
  background: var(--warning);
  color: white;
}

.btn-warning:hover {
  background: #e69500;
  box-shadow: 0 4px 12px rgba(255, 165, 2, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  padding: 0;
  font-size: inherit;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-icon-danger:hover {
  background: rgba(255, 71, 87, 0.15);
  color: var(--danger);
}

.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  top: 50%;
  left: 50%;
  margin-left: -7px;
  margin-top: -7px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

.btn-danger-text {
  color: var(--error) !important;
}

/* ============================================
   Table
   ============================================ */

.table {
  width: 100%;
  border-collapse: collapse;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
}

.artist-avatar-cell {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.artist-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.artist-avatar-placeholder {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 700;
  flex-shrink: 0;
}

.artist-avatar-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.artist-avatar-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist-avatar-details code {
  font-size: 11px;
  opacity: 0.8;
}

.table thead th {
  background: rgba(255, 255, 255, 0.02);
}

.table th,
.table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.table tr {
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.table tr:hover {
  background: rgba(0, 176, 185, 0.06);
  box-shadow: inset 3px 0 0 rgba(0, 176, 185, 0.5);
}

/* Data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Specific table overrides */
#newsTable {
  table-layout: fixed;
}

#newsTable .news-title-cell {
  white-space: normal;
  word-break: break-word;
}

#newsTable .news-actions-cell {
  position: sticky;
  right: 0;
  min-width: 280px;
  background: var(--bg-card);
  z-index: 2;
  box-shadow: -8px 0 16px rgba(0, 0, 0, 0.12);
}

#newsTable tbody tr:hover .news-actions-cell {
  background: rgba(0, 176, 185, 0.06);
}

#newsTable .news-actions-inline {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.table-actions-inline {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  white-space: normal;
}

.media-actions-inline {
  justify-content: flex-start;
  flex-wrap: wrap;
  white-space: normal;
}

#artistsTable td[data-label='Действия'],
#releasesTable td[data-label='Действия'],
#moodboardTable td[data-label='Действия'],
#mediaFsTable td[data-label='Действия'] {
  position: sticky;
  right: 0;
  background: var(--bg-card);
  z-index: 2;
  box-shadow: -8px 0 16px rgba(0, 0, 0, 0.12);
}

#artistsTable tbody tr:hover td[data-label='Действия'],
#releasesTable tbody tr:hover td[data-label='Действия'],
#moodboardTable tbody tr:hover td[data-label='Действия'],
#mediaFsTable tbody tr:hover td[data-label='Действия'] {
  background: rgba(0, 176, 185, 0.06);
}

#usersTable td[data-label='Действия'],
#suTable td[data-label='Действия'],
#usersTable tbody tr:hover td[data-label='Действия'],
#suTable tbody tr:hover td[data-label='Действия'] {
  position: static;
  right: auto;
  background: transparent;
  box-shadow: none;
}

#usersTable,
#suTable {
  table-layout: fixed;
  min-width: 980px;
}

#usersTable th,
#usersTable td,
#suTable th,
#suTable td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

#usersTable .table-actions-inline,
#suTable .table-actions-inline {
  white-space: normal;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}

#mediaFsTable,
#auditTable,
#emailOutboxTable {
  width: 100%;
  min-width: 0;
  table-layout: auto;
}

#auditTable th,
#auditTable td,
#emailOutboxTable th,
#emailOutboxTable td,
#mediaFsTable th,
#mediaFsTable td {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  min-width: 0;
}

#emailOutboxTable .table-actions-inline {
  white-space: normal;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}

#mediaFsTable .table-actions-inline {
  white-space: normal;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}

#page-media .card,
#page-media .card-body,
#page-audit .card,
#page-audit .card-body,
#page-profile .card,
#page-profile .card-body,
#page-media .media-toolbar,
#page-media .media-toolbar-actions {
  min-width: 0;
}

#page-media .table-scroll,
#page-audit .table-scroll {
  max-width: 100%;
  min-width: 0;
}

#page-media,
#page-audit,
#page-profile {
  overflow-x: hidden;
}

.su-actions {
  flex-wrap: wrap;
  white-space: normal;
}

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

.detail-full {
  grid-column: 1 / -1;
}

.su-user-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.su-user-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================
   Badges
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.badge-success {
  background: rgba(46, 213, 115, 0.15);
  color: var(--success);
}

.badge-warning {
  background: rgba(255, 165, 2, 0.15);
  color: var(--warning);
}

.badge-neutral {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.badge-info {
  background: rgba(0, 176, 185, 0.15);
  color: var(--primary);
}

.badge-danger {
  background: rgba(255, 71, 87, 0.18);
  color: var(--danger);
}

.badge-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

.badge-draft {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.badge-moderation {
  background: rgba(52, 152, 255, 0.12);
  color: #5dade2;
}

.badge-needs_revision,
.badge-needs-revision {
  background: rgba(255, 165, 2, 0.12);
  color: var(--warning);
}

.badge-rejected {
  background: rgba(255, 71, 87, 0.12);
  color: var(--danger);
}

.badge-sent_to_platforms,
.badge-sent-to-platforms {
  background: rgba(155, 89, 182, 0.12);
  color: #bb8fce;
}

.badge-published,
.badge-green {
  background: rgba(46, 213, 115, 0.12);
  color: var(--success);
}

.badge-gray {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

/* ============================================
   Modal
   ============================================ */

.modal-backdrop,
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-slow),
    visibility var(--transition-slow);
}

.modal-backdrop.visible,
.modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.98);
  transition: transform var(--transition-slow);
  animation: modalIn 0.25s ease;
}

.modal-backdrop.visible .modal {
  transform: translateY(0) scale(1);
}

.modal-lg {
  max-width: 720px;
}

.modal-xl {
  max-width: 880px;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 17px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Inline-редакторы (artist/release/news/user): модалка смонтирована внутрь страницы
   через JS-обёртку .modal-backdrop--inline. CSS визуально не меняет модалку,
   но делает видимым backdrop (который нужен для Esc и клика вне окна). */
.entity-editor-inline,
.release-editor-inline {
  position: static;
  inset: auto;
  background: transparent;
  display: none;
  padding: 0;
  opacity: 1;
  visibility: visible;
  z-index: 1;
  margin-top: 6px;
}

.entity-editor-inline.visible,
.release-editor-inline.visible {
  display: block;
}

.entity-editor-inline .modal,
.release-editor-inline .modal {
  max-width: none;
  max-height: none;
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transform: none;
  border-radius: 12px;
  background: rgba(12, 12, 12, 0.72);
}

.entity-editor-inline .modal-header,
.release-editor-inline .modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  background: rgba(14, 14, 14, 0.9);
  backdrop-filter: blur(6px);
}

.entity-editor-inline .modal-body,
.release-editor-inline .modal-body {
  padding: 16px;
}

/* Виртуальный backdrop, который создаётся JS-обёрткой для inline-редакторов.
   Используется стандартный класс .modal-backdrop из глобальной сетки. */

.entity-editor-inline .modal-close,
.release-editor-inline .modal-close {
  font-size: 13px;
  line-height: 1.2;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  min-width: 44px;
  min-height: 36px;
  background: rgba(255, 255, 255, 0.04);
}

.entity-editor-inline .form-row,
.release-editor-inline .form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.entity-editor-inline .form-row .form-group,
.release-editor-inline .form-row .form-group {
  min-width: 0;
}

.release-accordion {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.release-accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.release-accordion summary::-webkit-details-marker {
  display: none;
}

.release-accordion summary::after {
  content: '\25BE';
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.release-accordion[open] summary::after {
  transform: rotate(180deg);
}

.release-accordion-content {
  border-top: 1px solid var(--border);
  padding: 14px;
}

.release-track-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.release-track-item:hover {
  border-color: rgba(0, 176, 185, 0.35);
  background: rgba(0, 176, 185, 0.06);
}

.release-track-item.dragging {
  opacity: 0.6;
  border-color: var(--primary);
}

.release-track-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.release-track-handle {
  cursor: grab;
  color: var(--text-muted);
  user-select: none;
  font-size: 18px;
  line-height: 1;
  padding: 4px 8px;
  border: 1px dashed var(--border);
  border-radius: 8px;
}

.release-track-toolbar .btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
}

.release-track-grid {
  display: grid;
  grid-template-columns: 1.4fr 1.1fr 0.6fr;
  gap: 8px;
}

.track-import-progress {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 6px;
}

.track-import-progress[hidden] {
  display: none;
}

.track-import-stage {
  font-size: 12px;
  color: var(--text-muted);
}

.track-import-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.track-import-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--primary);
  transition: width 0.2s ease;
}

.track-import-log {
  max-height: 92px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text);
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .release-track-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Forms
   ============================================ */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  transition: var(--transition);
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.4)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-select option {
  background: #1a1a1a;
  color: var(--text);
  padding: 8px;
}

.form-textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.input-with-icon {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
  opacity: 0.6;
}

.input-with-icon .form-input {
  padding-left: 38px;
}

/* Switch / Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  transition: var(--transition);
}

.slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
}

.switch input:checked + .slider {
  background: var(--primary);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

.socials-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.socials-item {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.socials-remove {
  padding: 10px 12px;
}

/* Autocomplete dropdown */
.autocomplete-dropdown {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.autocomplete-item:last-child {
  border-bottom: none !important;
}

/* Loading placeholder */
.loading-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

/* ============================================
   Media Grid
   ============================================ */

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.media-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.media-item:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 176, 185, 0.45);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

.media-item-preview {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: block;
}

.media-item-preview img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.media-item-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.media-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-item-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 11px;
  color: var(--text-muted);
}

.media-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 176, 185, 0.15);
  color: var(--primary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.media-item-actions .btn {
  flex: 1;
  padding: 6px 8px;
  font-size: 11px;
}

.media-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.media-toolbar-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1 1 320px;
}

.media-toolbar-stats {
  font-size: 12px;
  color: var(--text-muted);
}

.media-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
  flex: 1 1 320px;
}

.media-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 220px;
  min-width: 220px;
}

.media-search .form-input {
  width: 100%;
}

.media-help-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 18px;
}

.media-help-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.media-help-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.media-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.media-breadcrumbs button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  transition: var(--transition);
}

.media-breadcrumbs button:hover {
  border-color: rgba(0, 176, 185, 0.4);
  color: var(--text);
}

.media-breadcrumbs button:last-child {
  border-color: rgba(0, 176, 185, 0.5);
  background: rgba(0, 176, 185, 0.08);
  color: var(--text);
  cursor: default;
}

.media-breadcrumb-sep {
  color: var(--text-muted);
  opacity: 0.5;
}

.media-system-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.media-system-item {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.media-system-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.media-meter {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.media-meter-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  transition: width 0.25s ease;
}

.media-system-value {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.media-system-meta {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.media-upload-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 160px auto;
  gap: 16px;
  align-items: end;
}

.media-upload-form .form-input {
  min-height: 44px;
}

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

.media-usage-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.media-usage-item a {
  color: var(--primary);
  text-decoration: none;
}

.media-usage-type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* ============================================
   Pagination
   ============================================ */

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pagination-btn {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.pagination-btn:hover {
  background: var(--bg-card-hover);
}

.pagination-btn.active {
  background: var(--primary);
  border-color: var(--primary);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   Pill Tabs
   ============================================ */

.pill-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pill-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: inherit;
}

.pill-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: rgba(0, 176, 185, 0.3);
}

.pill-tab.active {
  background: var(--primary);
  color: var(--text);
  border-color: var(--primary);
}

.pill-tab span {
  font-size: 15px;
}

/* ============================================
   Filter grid
   ============================================ */

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
  align-items: end;
}

.filter-group {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-group-action {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.filter-group-action .btn {
  min-height: 44px;
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ============================================
   KPI row
   ============================================ */

.kpi-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.kpi-item {
  padding: 12px 18px;
  background: rgba(0, 176, 185, 0.06);
  border: 1px solid rgba(0, 176, 185, 0.2);
  border-radius: 10px;
  min-width: 160px;
}

.kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

.kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================
   Tabs (standalone)
   ============================================ */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: inherit;
  margin-bottom: -1px;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content.hidden {
  display: none !important;
}

.tab-content {
  animation: pageIn 0.2s ease both;
}

/* ============================================
   Search wrap / dropdown
   ============================================ */

.search-wrap {
  position: relative;
}

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 200px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.search-dropdown.show {
  display: block;
}

.search-dropdown-item {
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--transition-normal);
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.search-dropdown-item:last-child {
  border-bottom: none;
}

.search-dropdown-item:hover {
  background: rgba(0, 176, 185, 0.08);
}

.search-input {
  width: 100% !important;
}

.search-input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.search-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover {
  background: var(--bg-hover);
}

.search-empty {
  padding: 14px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

/* ============================================
   Profile Grid
   ============================================ */

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.maintenance-social-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(200px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.maintenance-social-row .form-input {
  width: 100%;
}

.maintenance-social-row button {
  white-space: nowrap;
}

/* Table search */
.table-search {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.table-search .form-input {
  max-width: 300px;
  min-width: 240px;
  flex: 1 1 240px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================
   Neuro Page
   ============================================ */

#page-neuro .neuro-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

#page-neuro .neuro-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

#page-neuro .neuro-summary-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  padding: 14px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#page-neuro .neuro-summary-label {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#page-neuro .neuro-summary-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  word-break: break-word;
}

#page-neuro .neuro-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

#page-neuro .neuro-meta-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

#page-neuro .neuro-run-title {
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

#page-neuro .neuro-rss-diagnostics {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
}

#page-neuro .neuro-rss-grid {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

#page-neuro .neuro-rss-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  min-width: 0;
}

#page-neuro .neuro-rss-item-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
  word-break: break-word;
}

#page-neuro .neuro-rss-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

#page-neuro .neuro-rss-top {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

/* Weekly digest */
.weekly-digest-preview {
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.weekly-digest-preview pre,
.weekly-digest-preview code,
.weekly-digest-preview p {
  margin: 0;
  color: var(--text);
}

/* Moodboard */
.moodboard-tags-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.moodboard-tags-controls .form-input {
  flex: 1 1 240px;
  min-width: 200px;
}

.moodboard-tags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 12px;
  max-height: 420px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.filter-toggle-label,
.mood-tag-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.filter-toggle-label input,
.mood-tag-pill input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.filter-toggle-label:hover,
.mood-tag-pill:hover {
  background: rgba(0, 176, 185, 0.08);
  border-color: rgba(0, 176, 185, 0.2);
}

/* Service status */
.service-status-overview {
  display: grid;
  gap: 12px;
}

.service-status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.service-status-name {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

.service-status-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.service-status-pending {
  background: rgba(255, 203, 0, 0.12);
  color: #f3b500;
}
.service-status-success {
  background: rgba(46, 213, 115, 0.14);
  color: #2ed573;
}
.service-status-warning {
  background: rgba(255, 159, 67, 0.14);
  color: #ff9f43;
}
.service-status-error {
  background: rgba(255, 88, 88, 0.14);
  color: #ff5858;
}

.service-status-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.service-status-history {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 32px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.service-status-history .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.service-monitoring {
  position: relative;
  padding: 18px 18px 18px 44px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.service-monitoring::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: linear-gradient(to bottom, rgba(0, 176, 185, 0.35), rgba(0, 176, 185, 0.1));
}

.service-monitoring-step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px 18px 16px 32px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.service-monitoring-step:last-child {
  margin-bottom: 0;
}

.service-monitoring-step:hover {
  transform: translateY(-1px);
  background: rgba(0, 176, 185, 0.08);
  border-color: rgba(0, 176, 185, 0.2);
}

.service-step-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  background: rgba(0, 176, 185, 0.14);
  color: var(--text);
}

.service-step-content {
  min-width: 0;
}

.service-step-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.service-step-status {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.service-step-status .status-label {
  font-weight: 600;
}

.service-step-status .status-value {
  color: var(--text);
  font-weight: 700;
}

.service-step-status .status-value.ok {
  color: #2ed573;
}
.service-step-status .status-value.error {
  color: #ff5858;
}
.service-step-status .status-value.pending {
  color: #ffb800;
}

.service-status-history .status-dot.ok {
  background: #2ed573;
}
.service-status-history .status-dot.warn {
  background: #ff9f43;
}
.service-status-history .status-dot.error {
  background: #ff5858;
}
.service-status-history .status-dot.pending {
  background: rgba(255, 203, 0, 0.7);
}

.maintenance-socials-editor {
  display: grid;
  gap: 10px;
}

/* ============================================
   2FA Setup
   ============================================ */

.twofa-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: var(--bg-hover);
  border-radius: 12px;
  margin-bottom: 16px;
}

.twofa-qr img {
  width: 200px;
  height: 200px;
  border-radius: 8px;
}

.twofa-secret {
  font-family: monospace;
  font-size: 14px;
  background: var(--bg-dark);
  padding: 8px 16px;
  border-radius: 6px;
  user-select: all;
}

.backup-codes {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.backup-code {
  font-family: monospace;
  font-size: 12px;
  padding: 8px;
  background: var(--bg-hover);
  border-radius: 4px;
  text-align: center;
}

/* ============================================
   Sessions List
   ============================================ */

.session-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--bg-hover);
  border-radius: 8px;
  margin-bottom: 8px;
}

.session-info {
  font-size: 13px;
}

.session-info small {
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

/* ============================================
   Hidden utility
   ============================================ */

.hidden {
  display: none !important;
}

/* ============================================
   Admin Header
   ============================================ */

.admin-header,
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 32px;
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}

.header-left,
.admin-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header h1 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.admin-header-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.admin-header-kicker {
  color: var(--text-muted);
  font-weight: 500;
}

.admin-header-sep {
  color: var(--text-muted);
  opacity: 0.4;
}

.admin-header-current {
  color: var(--text);
  font-weight: 600;
}

.sidebar-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* Search box */
.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  padding: 0 12px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  padding: 9px 8px;
  width: 200px;
  font-size: 13px;
  font-family: inherit;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.admin-header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.admin-header-search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  opacity: 0.4;
  pointer-events: none;
}

.admin-header-search input {
  width: 220px;
  padding: 8px 12px 8px 34px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  transition: all var(--transition-normal);
}

.admin-header-search input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  width: 280px;
}

.admin-header-search input::placeholder {
  color: var(--text-muted);
}

.header-right,
.admin-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Notification bell */
.notification-bell,
.admin-header-notif {
  position: relative;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.notification-bell:hover,
.admin-header-notif:hover {
  background: rgba(255, 255, 255, 0.05);
}

.bell-icon,
.admin-header-notif-icon {
  font-size: 20px;
  display: block;
}

.notification-badge,
.admin-header-notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 6px rgba(255, 71, 87, 0.3);
}

.notification-badge.hidden,
.admin-header-notif-badge.hidden {
  display: none;
}

/* User info in header */
.admin-header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.admin-header-user:hover {
  background: rgba(255, 255, 255, 0.05);
}

.admin-header-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.admin-header-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  object-fit: cover;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

/* Admin content */
.admin-content {
  padding: 30px;
  flex: 1;
}

.admin-page-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px;
  gap: 16px;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================
   Notification Dropdown
   ============================================ */

.notif-dropdown {
  position: fixed;
  top: calc(var(--header-height) + 8px);
  right: 100px;
  width: 360px;
  max-height: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.2s ease;
}

.notif-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.notif-dropdown-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.notif-dropdown-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.notif-dropdown-empty {
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.notif-dropdown-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-normal);
  margin-bottom: 4px;
}

.notif-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notif-dropdown-item.unread {
  border-left: 3px solid var(--primary);
}

.notif-dropdown-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.notif-dropdown-item-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.notif-dropdown-footer {
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  text-align: center;
}

.notif-dropdown-all {
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.notif-dropdown-all:hover {
  text-decoration: underline;
}

/* ============================================
   Toast Notifications
   ============================================ */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  --toast-accent: var(--primary);
  padding: 14px 18px;
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  background: rgba(12, 12, 12, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 4px solid var(--toast-accent);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
  animation: toastIn 0.3s ease;
  max-width: 360px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.toast::before {
  content: '';
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--toast-accent);
  box-shadow: 0 0 10px var(--toast-accent);
  flex-shrink: 0;
}

.toast.success {
  --toast-accent: var(--success);
}
.toast.error {
  --toast-accent: var(--error);
}
.toast.warning {
  --toast-accent: var(--warning);
}
.toast.info {
  --toast-accent: var(--primary);
}

/* ============================================
   Rich Text Editor (Quill)
   ============================================ */

.ql-container {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border) !important;
  border-top: none !important;
  border-radius: 0 0 8px 8px;
  min-height: 200px;
  color: var(--text);
}

.ql-toolbar {
  background: var(--bg-hover);
  border: 1px solid var(--border) !important;
  border-radius: 8px 8px 0 0;
}

.ql-toolbar .ql-stroke {
  stroke: var(--text-muted);
}
.ql-toolbar .ql-fill {
  fill: var(--text-muted);
}
.ql-toolbar .ql-picker {
  color: var(--text-muted);
}
.ql-toolbar button:hover .ql-stroke {
  stroke: var(--primary);
}
.ql-toolbar button:hover .ql-fill {
  fill: var(--primary);
}
.ql-toolbar button.ql-active .ql-stroke {
  stroke: var(--primary);
}
.ql-toolbar button.ql-active .ql-fill {
  fill: var(--primary);
}
.ql-editor {
  min-height: 200px;
}
.ql-editor.ql-blank::before {
  color: var(--text-muted);
}
.ql-editor img {
  max-width: 100%;
  height: auto;
  cursor: pointer;
  resize: both;
  overflow: auto;
  border: 2px solid transparent;
  border-radius: 4px;
  transition: border-color 0.2s;
}
.ql-editor img:hover {
  border-color: var(--primary);
}
.ql-editor img[style*='width'] {
  max-width: 100%;
}

.image-resize-popover {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  background: rgba(15, 15, 15, 0.98);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  z-index: 2000;
  width: min(420px, calc(100% - 24px));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  display: none;
  gap: 12px;
  flex-direction: column;
}

.image-resize-popover.show {
  display: flex;
}

.image-resize-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.image-resize-actions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.image-resize-btn {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 6px;
  font-size: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.image-resize-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.image-resize-range {
  width: 100%;
}

/* Image Upload Inline */
.image-upload-area {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.02);
}

.image-upload-area:hover {
  border-color: var(--primary);
  background: rgba(0, 176, 185, 0.05);
}

.image-upload-area.dragover {
  border-color: var(--primary);
  background: rgba(0, 176, 185, 0.1);
}

.image-upload-area img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  margin-top: 12px;
}

.image-upload-area p {
  color: var(--text-muted);
  margin: 0;
}

.image-upload-area .upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.image-upload-area .upload-icon svg {
  width: 32px;
  height: 32px;
}

.release-track-editor .ql-editor {
  min-height: 110px;
}

.inline-icon,
.status-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.inline-icon svg,
.status-icon svg {
  width: 14px;
  height: 14px;
}

/* Medium-large modals for heavy editors */
.modal.modal-wide {
  max-width: 960px;
  max-height: 92vh;
}

#newsModal .modal {
  max-width: min(96vw, 960px);
  max-height: 92vh;
}

#releaseModal .modal {
  max-width: min(96vw, 960px);
  max-height: 92vh;
}

#artistModal .modal {
  max-width: min(96vw, 840px);
  max-height: 92vh;
}

/* ============================================
   Admin Chat
   ============================================ */

.admin-chat-container {
  display: grid;
  grid-template-columns: 310px 1fr;
  height: calc(100vh - 140px);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.admin-chat-sidebar {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar);
}

.admin-chat-search {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.admin-chat-search input {
  width: 100%;
  padding: 9px 14px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.admin-chat-search input:focus {
  border-color: var(--primary);
}

.admin-chat-list {
  flex: 1;
  overflow-y: auto;
}

.chat-conv-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.15s;
}

.chat-conv-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.chat-conv-item.active {
  background: rgba(0, 176, 185, 0.06);
  border-left: 3px solid var(--primary);
}

.chat-conv-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.chat-conv-info {
  flex: 1;
  min-width: 0;
}

.chat-conv-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.chat-conv-preview {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conv-badge {
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  box-shadow: 0 2px 6px var(--primary-glow);
}

.admin-chat-main {
  display: flex;
  flex-direction: column;
}

.admin-chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.admin-chat-header h3 {
  font-size: 15px;
  font-weight: 600;
}

.admin-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  max-width: 72%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  word-wrap: break-word;
  line-height: 1.5;
  position: relative;
}

.chat-msg.sent {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-msg.received {
  align-self: flex-start;
  background: var(--bg-hover);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-msg-operator {
  font-size: 10px;
  opacity: 0.65;
  margin-bottom: 3px;
  font-weight: 500;
}

.chat-msg-time {
  font-size: 10px;
  opacity: 0.6;
  margin-top: 4px;
  text-align: right;
}

.admin-chat-input-area {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  background: var(--bg-sidebar);
}

.admin-chat-input {
  flex: 1;
  padding: 11px 16px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.admin-chat-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Chat layout generic */
.chat-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - var(--header-height) - 56px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}

.chat-sidebar {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

/* ============================================
   Verification photo gallery
   ============================================ */

.ver-photo-card {
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.ver-photo-card:hover {
  border-color: var(--primary, #00b0b9) !important;
  box-shadow: 0 4px 16px rgba(0, 176, 185, 0.15);
}

.ver-photo-preview:hover .ver-zoom-hint {
  opacity: 1 !important;
}

.ver-photo-preview img {
  transition: transform 0.2s ease;
}

/* Reject reason styling */
.ver-reject-reason {
  font-size: 13px;
  line-height: 1.5;
  color: var(--admin-text-secondary, #aaa);
}

/* ============================================
   Analytics Tabs
   ============================================ */

.analytics-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: var(--bg-hover);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.analytics-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  flex: 1;
  justify-content: center;
}

.analytics-tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.analytics-tab-btn.active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.analytics-tab-icon {
  font-size: 18px;
}

.analytics-tab-btn.active .analytics-tab-icon {
  filter: none;
}

/* Analytics Filter Grid */
.analytics-wrap .filter-grid {
  padding: 16px;
  background: var(--bg-hover);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.analytics-wrap .filter-group-action {
  justify-content: flex-end;
}

/* Analytics Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.table-footer {
  padding: 10px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   Empty & Error States
   ============================================ */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  opacity: 0.25;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state-text {
  font-size: 14px;
  color: var(--text-muted);
}

.locations-cell {
  font-size: 13px;
  max-width: 240px;
}

.amount-green {
  color: var(--success);
  font-weight: 600;
}
.amount-blue {
  color: var(--primary);
  font-weight: 600;
}

.kpi-card {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
}
.kpi-card .kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.kpi-card .kpi-value {
  font-size: 20px;
  font-weight: 700;
}
.kpi-card .kpi-green {
  color: var(--success);
}
.kpi-card .kpi-blue {
  color: var(--primary);
}

/* ============================================
   Icon utilities
   ============================================ */

.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.icon-lg {
  width: 40px;
  height: 40px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.icon-sm {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ============================================
   Mobile Hamburger Menu
   ============================================ */

.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1002;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  width: 48px;
  height: 48px;
  cursor: pointer;
  color: var(--bg-dark);
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle svg {
  width: 22px;
  height: 22px;
}

.sidebar.mobile-open {
  transform: translateX(0) !important;
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s,
    visibility 0.3s;
}

.mobile-overlay.active {
  display: block;
  opacity: 1;
  visibility: visible;
}

/* ============================================
   Utility Classes
   ============================================ */

.u-link-primary {
  color: var(--primary);
  text-decoration: none;
}

.u-link-primary:hover {
  text-decoration: underline;
}

.u-empty-cell {
  text-align: center;
  color: var(--text-muted);
  padding: 20px;
}

.u-empty-cell-lg {
  text-align: center;
  color: var(--text-muted);
  padding: 24px;
}

.u-ellipsis-200 {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.u-error {
  color: var(--error);
}

.u-success {
  color: var(--success);
}

.u-warning {
  color: var(--warning);
}

.su-avatar-28 {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.u-list-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.u-list-row-sm {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.u-list-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.u-grid-1-gap16 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.u-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.u-stat-card {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.u-stat-card.total {
  background: rgba(0, 176, 185, 0.08);
}
.u-stat-card.premium {
  background: rgba(46, 213, 115, 0.08);
}
.u-stat-card.pro {
  background: rgba(255, 165, 2, 0.08);
}
.u-stat-card.banned {
  background: rgba(255, 71, 87, 0.08);
}

.u-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.u-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.u-profile-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.u-profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 600;
  color: #fff;
}
.u-profile-email {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}
.u-profile-role {
  color: var(--text-secondary);
  font-size: 14px;
}
.u-profile-meta {
  padding: 16px;
  background: var(--bg-hover);
  border-radius: 8px;
}
.u-profile-meta-row {
  display: flex;
  justify-content: space-between;
}
.u-profile-meta-row + .u-profile-meta-row {
  margin-top: 8px;
}
.u-profile-meta-label {
  color: var(--text-secondary);
}

.u-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.u-checkbox-md {
  width: 18px;
  height: 18px;
}

.u-file-hidden {
  display: none;
}

.u-card-span-all {
  grid-column: 1 / -1;
}

/* ============================================
   Responsive: Tablet (1024px)
   ============================================ */

@media (max-width: 1024px) {
  .page-header-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-stats {
    justify-content: center;
  }

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

/* ============================================
   Responsive: Mobile (768px)
   ============================================ */

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    z-index: 1001;
    width: 100%;
    max-width: min(85vw, 320px);
    height: 100vh;
    height: 100dvh;
    overflow-x: hidden;
  }

  .sidebar.show,
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
  }

  .sidebar-toggle {
    display: flex;
  }

  .main,
  .main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    padding: 70px 16px 20px 16px;
  }

  .header,
  .admin-header {
    padding: 0 16px;
  }

  .header h1 {
    font-size: 16px;
  }

  .page-title {
    font-size: 17px;
  }

  .page-header h2 {
    font-size: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 24px;
  }

  .search-box input {
    width: 120px;
  }

  .user-name {
    display: none;
  }

  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    min-width: 0;
    width: 100%;
    font-size: 13px;
  }

  .table th,
  .table td {
    padding: 10px 8px;
  }

  .table th {
    font-size: 11px;
  }

  .table thead {
    display: none;
  }

  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    background: rgba(17, 17, 17, 0.7);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
  }

  .table td {
    padding: 6px 0;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }

  .table td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex: 0 0 40%;
  }

  .table img {
    width: 40px !important;
    height: 40px !important;
  }

  #newsTable .news-actions-cell {
    position: static;
    min-width: 0;
    background: transparent;
    box-shadow: none;
  }

  #newsTable .news-actions-inline {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  #artistsTable td[data-label='Действия'],
  #releasesTable td[data-label='Действия'],
  #moodboardTable td[data-label='Действия'],
  #usersTable td[data-label='Действия'],
  #suTable td[data-label='Действия'],
  #mediaFsTable td[data-label='Действия'] {
    position: static;
    background: transparent;
    box-shadow: none;
  }

  .modal,
  .modal-backdrop .modal {
    width: 100%;
    max-width: 100%;
    max-height: 94vh;
    overflow-y: auto;
    border-radius: 12px;
  }

  .modal-backdrop {
    padding: 8px;
  }

  .modal-header,
  .modal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .modal-footer .btn {
    width: 100%;
  }

  .modal-body {
    max-height: calc(94vh - 124px);
    overflow-y: auto;
    padding: 14px;
  }

  .modal.modal-wide {
    max-width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .btn {
    padding: 11px 14px;
    font-size: 14px;
  }

  .btn-sm {
    padding: 6px 10px;
    font-size: 12px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .page-header--hero {
    padding: 18px;
  }

  .page-header--hero .page-title {
    font-size: 26px;
  }

  .page-header-main {
    align-items: flex-start;
  }

  .page-header-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .page-header-status {
    justify-content: flex-start;
  }

  .media-upload-form {
    grid-template-columns: 1fr;
  }

  .media-toolbar {
    align-items: flex-start;
  }

  .media-toolbar-actions {
    width: 100%;
  }

  .media-search {
    width: 100%;
  }

  .media-search .form-input,
  #mediaTypeFilter,
  #mediaSort,
  #mediaPageSize {
    width: 100%;
  }

  .page-header-actions {
    width: 100%;
  }

  .page-header-actions .btn {
    width: 100%;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .card {
    padding: 14px;
  }

  .card-header .btn,
  .card-header input[type='text'] {
    width: 100% !important;
  }

  .card-header-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .card-header-actions .btn {
    flex: 1;
    min-width: 120px;
  }

  .filter-row,
  .form-row {
    flex-wrap: wrap;
  }

  .form-group {
    min-width: 100% !important;
  }

  .socials-item {
    grid-template-columns: 1fr;
  }

  input[type='text'],
  input[type='email'],
  input[type='password'],
  input[type='url'],
  input[type='date'],
  input[type='datetime-local'],
  textarea,
  select {
    font-size: 16px;
  }

  .sidebar-footer {
    padding: 12px;
  }

  .user-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .news-actions-inline {
    width: 100%;
  }

  .news-actions-inline .btn {
    flex: 1 1 48%;
  }

  .release-track-item,
  .release-fact-item,
  .release-video-item,
  .release-contrib-item,
  .contrib-social-row,
  .release-artist-item {
    grid-template-columns: 1fr !important;
  }

  .release-track-item .btn,
  .release-fact-item .btn,
  .release-video-item .btn,
  .release-contrib-item .btn,
  .contrib-social-row .btn,
  .release-artist-item .btn {
    width: 100% !important;
  }

  .entity-editor-inline .modal,
  .release-editor-inline .modal {
    border-radius: 10px;
  }

  .entity-editor-inline .modal-body,
  .release-editor-inline .modal-body {
    padding: 12px;
  }

  .entity-editor-inline .form-row,
  .release-editor-inline .form-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #page-neuro .neuro-actions .btn {
    flex: 1 1 calc(50% - 8px);
    min-width: 170px;
  }

  #page-neuro .neuro-meta-actions .btn {
    flex: 1 1 calc(50% - 8px);
  }
}

/* ============================================
   Responsive: Small Mobile (480px)
   ============================================ */

@media (max-width: 480px) {
  .card {
    padding: 10px;
    border-radius: 12px;
  }

  .main,
  .main-content {
    padding: 60px 8px 16px 8px;
    width: 100%;
    max-width: 100%;
  }

  .modal-backdrop {
    padding: 4px;
  }

  .modal {
    max-height: 96vh;
    border-radius: 10px;
  }

  .modal-header,
  .modal-footer {
    padding: 10px 12px;
  }

  .modal-body {
    max-height: calc(96vh - 112px);
    padding: 10px;
  }

  .table tr {
    padding: 10px 10px;
  }

  .table td {
    font-size: 11px;
  }

  .table td::before {
    font-size: 9px;
    flex: 0 0 50%;
  }

  .page-title {
    font-size: 17px;
  }

  .page-header--hero .page-title {
    font-size: 22px;
  }

  .page-header-meta {
    grid-template-columns: 1fr;
  }

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

  .search-box {
    display: none;
  }

  .news-actions-inline .btn {
    flex: 1 1 100%;
  }

  .su-detail-grid {
    grid-template-columns: 1fr !important;
  }

  #page-neuro .neuro-actions .btn,
  #page-neuro .neuro-meta-actions .btn {
    flex: 1 1 100%;
    min-width: 0;
  }

  #weeklyDigestProgressLog {
    max-height: 120px !important;
  }

  .btn {
    padding: 8px 10px;
    font-size: 12px;
  }

  .btn-sm {
    padding: 6px 8px;
    font-size: 11px;
  }
}
