:root {
  /* Light theme colors */
  --color-primary: #007AFF;
  --color-primary-dark: #0056CC;
  --color-primary-light: rgba(0, 122, 255, 0.1);
  --color-success: #34C759;
  --color-error: #FF3B30;
  --color-warning: #FF9500;
  --color-accent: #5856D6;

  --color-bg: #F2F2F7;
  --color-surface: #FFFFFF;
  --color-card-bg: #FFFFFF;
  --color-text: #000000;
  --color-text-secondary: #8E8E93;
  --color-border: #C6C6C8;
  --color-border-light: #E5E5EA;

  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

[data-color-scheme="dark"] {
  /* Dark theme colors with improved contrast */
  --color-bg: #0A0A0B;
  --color-surface: #1C1C1E;
  --color-card-bg: #2C2C2E;
  --color-text: #FFFFFF;
  --color-text-secondary: #B3B3B8;
  --color-border: #48484A;
  --color-border-light: #3A3A3C;

  /* Enhanced shadows for dark theme */
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);

  /* Improved primary colors for dark theme */
  --color-primary: #5AC8FA;
  --color-primary-dark: #007AFF;
  --color-primary-light: rgba(90, 200, 250, 0.15);

  /* Better status colors for dark theme */
  --color-success: #32D74B;
  --color-error: #FF453A;
  --color-warning: #FF9F0A;
}


* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0 16px;
  height: 64px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 16px;
}

.header__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 0 auto;
}

.header__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, #7b5af7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.theme-toggle {
  background: rgba(123, 90, 247, 0.1);
  border: 1px solid rgba(123, 90, 247, 0.2);
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.theme-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(123, 90, 247, 0.2) 0%, rgba(90, 200, 250, 0.2) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.theme-toggle:hover {
  background: rgba(123, 90, 247, 0.15);
  border-color: rgba(123, 90, 247, 0.4);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(123, 90, 247, 0.2);
}

.theme-toggle:hover::before {
  opacity: 1;
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle__icon {
  color: var(--color-text-secondary);
  transition: opacity 0.2s ease;
}

.theme-toggle__icon--moon {
  display: none;
}

[data-color-scheme="dark"] .theme-toggle__icon--sun {
  display: none;
}

[data-color-scheme="dark"] .theme-toggle__icon--moon {
  display: block;
}

/* Main Content — отступ от шапки (чтобы блоки не «слипались») */
.main {
  flex: 1;
  padding: 24px 16px 20px;
  padding-top: 40px;
  width: 100%;
  margin: 0 auto;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Screens */
.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* Cards */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--color-border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.user-info.card {
  overflow: visible;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary) 0%, #7b5af7 50%, var(--color-primary) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border-color: rgba(123, 90, 247, 0.3);
}

.card:hover::before {
  opacity: 1;
}

.card__body {
  padding: 24px;
  position: relative;
  z-index: 1;
}

.user-info .card__body {
  overflow: visible;
}

/* Login */
.login {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.login__card {
  margin: 0 auto;
  max-width: 420px;
  width: 100%;
  animation: fadeInUp 0.6s ease;
}

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

.login__icon {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.login__bot-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 32px rgba(123, 90, 247, 0.3);
  border: 4px solid rgba(123, 90, 247, 0.2);
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.login__title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px 0;
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, #7b5af7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.login__subtitle {
  color: var(--color-text-secondary);
  margin: 0 0 40px 0;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
}

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

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  background: var(--color-surface);
  color: var(--color-text);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.form-input:hover {
  border-color: rgba(123, 90, 247, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(123, 90, 247, 0.1), 0 4px 16px rgba(123, 90, 247, 0.2);
  transform: translateY(-1px);
}

.form-error {
  color: var(--color-error);
  font-size: 14px;
  margin-top: 4px;
  min-height: 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  letter-spacing: -0.2px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #7b5af7 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(123, 90, 247, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(123, 90, 247, 0.4);
}

.btn--primary:active {
  transform: translateY(0);
}

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

.btn--ghost:hover {
  background: rgba(123, 90, 247, 0.1);
  border-color: rgba(123, 90, 247, 0.3);
  color: var(--color-primary);
  transform: translateY(-1px);
}

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

.btn--secondary:hover {
  border-color: var(--color-text-secondary);
  background: var(--color-bg);
}

.btn--full {
  width: 100%;
}

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

.btn__loader {
  position: absolute;
}

.loader {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Main dashboard: компактная сетка, центрирование, единые отступы */
.screen--dashboard .dashboard {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

/* Карточки дашборда — единый стиль, мягкая тень */
.screen--dashboard .card {
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--color-border);
}

.screen--dashboard .card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* User Info */
.user-info {
  margin-bottom: 0;
  overflow: visible;
  z-index: 1000;
  position: relative;
}

.user-info .card__body {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: visible;
}

.user-info {
  overflow: visible;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, #7b5af7 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(123, 90, 247, 0.3);
  transition: all 0.3s ease;
  position: relative;
}

.avatar::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--color-primary), #7b5af7);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.user-info:hover .avatar {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(123, 90, 247, 0.4);
}

.user-info:hover .avatar::after {
  opacity: 1;
}

.user-info__details {
  flex: 1;
}

.user-info__name {
  margin: 0 0 6px 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.user-info__chatid {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 0;
}

.stats__card {
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.stats__card .card__body {
  padding: 20px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.stat__icon {
  font-size: 32px;
  margin-bottom: 12px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(123, 90, 247, 0.15) 0%, rgba(90, 200, 250, 0.15) 100%);
  transition: all 0.3s ease;
}

.stat__icon--total {
  background: linear-gradient(135deg, rgba(123, 90, 247, 0.2) 0%, rgba(123, 90, 247, 0.1) 100%);
}

.stat__icon--used {
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.2) 0%, rgba(255, 149, 0, 0.1) 100%);
}

.stat__icon--left {
  background: linear-gradient(135deg, rgba(52, 199, 89, 0.2) 0%, rgba(52, 199, 89, 0.1) 100%);
}

.stats__card:hover .stat__icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 4px 16px rgba(123, 90, 247, 0.3);
}

.stat__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.stat__value {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat__label {
  font-size: 13px;
  color: var(--color-text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Progress */
.progress-card {
  margin-bottom: 24px;
}

.screen--dashboard .progress-card {
  margin-bottom: 0;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.progress-info__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--color-text);
}

.progress-info__percentage {
  font-size: 16px;
  color: var(--color-primary);
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary) 0%, #7b5af7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.progress-bar {
  height: 12px;
  background: var(--color-border-light);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary) 0%, #7b5af7 50%, var(--color-success) 100%);
  background-size: 200% 100%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.progress-bar__fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* RAG Files */
.rag-section {
  margin-bottom: 0;
}

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

.rag-section__title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rag-section__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.2px;
  margin: 0;
}

.rag-section__count {
  font-size: 13px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.rag-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.rag-item {
  padding: 20px;
  border-radius: 20px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.rag-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #7b5af7 0%, #5ac8fa 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.rag-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: rgba(123, 90, 247, 0.3);
}

.rag-item:hover::before {
  opacity: 1;
}

.rag-item__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 12px;
  word-break: break-word;
  line-height: 1.4;
  letter-spacing: -0.2px;
}

.rag-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.rag-item__badge {
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(123, 90, 247, 0.15);
  color: #7b5af7;
  border: 1px solid rgba(123, 90, 247, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.rag-item__badge:hover {
  background: rgba(123, 90, 247, 0.25);
  transform: scale(1.05);
}

/* Оранжевый блок даты и организации в карточках сводок */
.rag-item__badge--date,
.rag-item__badge--org {
  background: rgba(234, 139, 62, 0.2);
  color: #c76b1e;
  border-color: rgba(234, 139, 62, 0.35);
}

.rag-item__badge--date:hover,
.rag-item__badge--org:hover {
  background: rgba(234, 139, 62, 0.3);
}

.rag-item__content {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 12px;
  border: 1px solid var(--color-border-light);
  max-height: 280px;
  overflow-y: auto;
}

/* Сводки: 2 карточки в одну строку, выравнивание по кнопкам */
.transcriptions .zoom-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-items: stretch;
}

.transcriptions .zoom-items .rag-item {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.transcriptions .zoom-items .rag-item__content {
  flex: 1;
  min-height: 0;
}

.transcriptions .zoom-items .rag-item__actions {
  margin-top: auto;
  flex-shrink: 0;
}

/* Кнопка раскрытия текста сводки */
.rag-item__toggle-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-primary, #7b5af7);
  background: rgba(123, 90, 247, 0.1);
  border: 1px solid rgba(123, 90, 247, 0.25);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.rag-item__toggle-summary:hover {
  background: rgba(123, 90, 247, 0.18);
  border-color: rgba(123, 90, 247, 0.4);
}

.rag-item__details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rag-item__detail {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.4;
}

.rag-item__detail strong {
  color: var(--color-text-secondary);
  font-weight: 500;
  margin-right: 4px;
}

.rag-item__link {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 8px 12px;
  background: var(--color-primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s ease;
}

.rag-item__link:hover {
  background: var(--color-primary-dark);
}

.rag-item__badge--owner {
  background: rgba(52, 199, 89, 0.12);
  color: var(--color-success);
}

.rag-item__badge--participants {
  background: rgba(0, 122, 255, 0.12);
  color: var(--color-primary);
}

.rag-empty {
  padding: 48px 24px;
  border-radius: 20px;
  border: 2px dashed var(--color-border);
  background: var(--color-bg-secondary);
  text-align: center;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.rag-empty:hover {
  border-color: rgba(123, 90, 247, 0.4);
  background: linear-gradient(135deg, var(--color-bg-secondary) 0%, rgba(123, 90, 247, 0.05) 100%);
}

.rag-empty__icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
  filter: grayscale(0.3);
}

.rag-empty__text {
  font-size: 15px;
  color: var(--color-text-secondary);
  font-weight: 500;
  letter-spacing: -0.2px;
}

/* Payments */
.payments__title {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--color-text);
}

.tariffs {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tariff {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: 14px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: visible;
}

.tariff::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0%, #7b5af7 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tariff:hover {
  border-color: rgba(123, 90, 247, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(123, 90, 247, 0.2);
}

.tariff:hover::before {
  opacity: 1;
}

.tariff--popular {
  border-color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: 0 4px 16px rgba(123, 90, 247, 0.2);
  padding-top: 20px;
}

.tariff--popular::before {
  opacity: 1;
}

.tariff__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #7b5af7 100%);
  color: white;
  padding: 4px 10px;
  font-size: 10px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  box-shadow: 0 2px 8px rgba(123, 90, 247, 0.35);
}

.tariff__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tariff__minutes {
  font-weight: 600;
  font-size: 18px;
  color: var(--color-text);
  letter-spacing: -0.3px;
}

.tariff__price {
  font-weight: 700;
  font-size: 22px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #7b5af7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

/* News Section */
.news-section {
  margin-top: 20px;
}

.news-section__title {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--color-text);
}

.news-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .news-list {
    grid-template-columns: 1fr;
  }
}

.news-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 12px;
}

.news-loader p {
  color: var(--color-text-secondary);
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.news-item {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.news-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--color-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.news-item:hover {
  border-color: rgba(123, 90, 247, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.news-item:hover::before {
  opacity: 1;
}

.news-item--info {
  border-left: 4px solid var(--color-primary);
}

.news-item--info::before {
  opacity: 1;
  background: var(--color-primary);
}

.news-item--normal {
  border-left: 4px solid var(--color-success);
}

.news-item--normal::before {
  background: var(--color-success);
}

.news-item--important {
  border-left: 4px solid var(--color-warning);
}

.news-item--important::before {
  background: var(--color-warning);
}

.news-item__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
}

.news-item__title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  color: var(--color-text);
  flex: 1;
  letter-spacing: -0.2px;
  line-height: 1.4;
}

.news-item__badge {
  background: linear-gradient(135deg, var(--color-primary) 0%, #7b5af7 100%);
  color: white;
  padding: 6px 12px;
  font-size: 11px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(123, 90, 247, 0.3);
}

.news-item__badge--info {
  background: linear-gradient(135deg, var(--color-primary) 0%, #7b5af7 100%);
}

.news-item__badge--normal {
  background: linear-gradient(135deg, var(--color-success) 0%, #32D74B 100%);
}

.news-item__badge--important {
  background: linear-gradient(135deg, var(--color-warning) 0%, #FF9F0A 100%);
}

.news-item__content {
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.news-item__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-light);
}

.news-item__date {
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.news-item__author {
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.news-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-secondary);
}

.news-empty__icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.news-empty__text {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  border: 1px solid var(--color-border);
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast--error {
  border-left: 4px solid var(--color-error);
}

.toast--success {
  border-left: 4px solid var(--color-success);
}

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

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

.toast--success .toast__icon {
  color: var(--color-success);
}

.toast__close {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.toast__close:hover {
  background: var(--color-border);
}

/* Responsive */
@media (max-width: 480px) {
  .main {
    padding: 12px;
  }

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

  .stat {
    flex-direction: row;
    text-align: left;
  }

  .stat__icon {
    margin-bottom: 0;
    margin-right: 12px;
  }
}

/* Dropdown Menu */
.user-info__actions {
  position: relative;
  z-index: 10001;
  overflow: visible;
}

.user-info {
  overflow: visible;
}

.user-info .card__body {
  overflow: visible;
  position: relative;
}

.user-info.card {
  overflow: visible;
}

.menu-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--color-border);
  background: rgba(123, 90, 247, 0.05);
  color: var(--color-text-secondary);
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-trigger:hover,
.menu-trigger:focus {
  background: rgba(123, 90, 247, 0.1);
  border-color: rgba(123, 90, 247, 0.3);
  color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(123, 90, 247, 0.15);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  min-width: 220px;
  z-index: 99999;
  overflow: visible;
  max-height: calc(100vh - 200px);
  overflow-y: auto;

  /* Hiding mechanism */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0%, #7b5af7 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.dropdown-item {
  width: 100%;
  text-align: left;
  padding: 14px 18px;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  position: relative;
}

.dropdown-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--color-primary) 0%, #7b5af7 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dropdown-item:hover {
  background: rgba(123, 90, 247, 0.1);
  padding-left: 22px;
}

.dropdown-item:hover::before {
  opacity: 1;
}

.dropdown-item__icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
  transition: transform 0.2s ease;
}

.dropdown-item:hover .dropdown-item__icon {
  transform: scale(1.1);
}

.dropdown-item--danger {
  color: var(--color-error);
}

.dropdown-item--danger:hover {
  background: rgba(255, 69, 58, 0.1);
}

.dropdown-item--danger::before {
  background: var(--color-error);
}

/* Zoom Screen */
.zoom-header {
  margin-bottom: 20px;
  position: sticky;
  top: 60px;
  z-index: 90;
}

.zoom-header__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
}

.zoom-header__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.zoom-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-secondary);
}

.zoom-empty__icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.zoom-empty__text {
  margin: 0;
  font-size: 14px;
}

/* Transcriptions loading */
.transcriptions-loading {
  text-align: center;
  padding: 40px 20px;
}

.transcriptions-loading__spinner {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}

.transcriptions-loading__text {
  margin: 0 0 16px 0;
  font-size: 15px;
  color: var(--color-text-secondary);
}

.transcriptions-loading__bar {
  height: 6px;
  background: var(--color-border-light);
  border-radius: 3px;
  overflow: hidden;
  max-width: 280px;
  margin: 0 auto;
}

.transcriptions-loading__bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary) 0%, #7b5af7 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* My tasks — кнопка «Отметить выполненной» */
.my-task-item__actions {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.my-task-complete-btn {
  width: 100%;
}

/* Tasks Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  overflow-y: auto;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal__content {
  position: relative;
  background: var(--color-surface);
  width: 90%;
  max-width: 500px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  z-index: 1001;
  border: 1px solid var(--color-border);
}

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

.modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.modal__close {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--color-text-secondary);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__close:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.modal__body {
  padding: 20px;
  overflow-y: auto;
}

.modal__footer {
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
}

/* Tasks List */
.tasks-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-light);
}

.task-checkbox {
  display: flex;
  gap: 10px;
  cursor: pointer;
  width: 100%;
  align-items: flex-start;
}

.task-checkbox input {
  margin-top: 4px;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.task-checkbox span {
  font-size: 15px;
  line-height: 1.5;
}

.tasks-empty {
  text-align: center;
  color: var(--color-text-secondary);
  padding: 20px;
}

/* Action Buttons in List */
.rag-item__actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-light);
}

.rag-item__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  text-decoration: none;
  gap: 6px;
}

.rag-item__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rag-item .edit-rag-btn {
  background: rgba(90, 200, 250, 0.1);
  color: #5ac8fa;
  border: 1px solid rgba(90, 200, 250, 0.2);
}

.rag-item .edit-rag-btn:hover {
  background: rgba(90, 200, 250, 0.2);
  border-color: rgba(90, 200, 250, 0.4);
  color: #5ac8fa;
}

.rag-item .delete-rag-btn {
  background: rgba(255, 69, 58, 0.1);
  color: #ff453a;
  border: 1px solid rgba(255, 69, 58, 0.2);
}

.rag-item .delete-rag-btn:hover {
  background: rgba(255, 69, 58, 0.2);
  border-color: rgba(255, 69, 58, 0.4);
  color: #ff453a;
}

.rag-item__btn--tasks {
  background: rgba(0, 122, 255, 0.1);
  color: var(--color-primary);
}

.rag-item__btn--tasks:hover {
  background: rgba(0, 122, 255, 0.2);
}

.rag-item__link {
  margin-top: 0;
}

/* Tasks in Summary Card */
.rag-item__tasks {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.rag-item__tasks-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--color-text);
}

.rag-item__tasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-task-item {
  padding: 8px 12px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-primary);
}

.summary-task-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 4px;
}

.summary-task-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

/* Structured Tasks */
.task-item--structured {
  flex-direction: column;
  align-items: stretch;
}

.task-header {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 600;
}

.task-number {
  color: var(--color-primary);
}

.task-title {
  flex: 1;
}

.task-detail {
  font-size: 14px;
  padding-left: 24px;
  margin-top: 4px;
  color: var(--color-text-secondary);
}

.task-detail strong {
  color: var(--color-text);
  margin-right: 4px;
}

/* Task Editor Styles */
.task-editor {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Чтобы выпадающие списки (workspace, доска, колонка) не обрезались */
.task-editor .card,
.task-editor-workspace-wrap,
.task-editor-content .card,
.task-editor-item.card {
  overflow: visible;
}
.task-editor .card__body,
.task-editor-workspace-wrap .card__body,
.task-editor-item .card__body {
  overflow: visible;
}
.task-editor .searchable-dropdown,
.task-editor-dropdown-wrap {
  overflow: visible;
}
.task-editor .searchable-dropdown__panel {
  z-index: 1100;
}

.task-editor-header__content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.task-editor-header__title {
  flex: 1;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.task-editor-info {
  padding: 12px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.task-editor-info__text {
  margin: 0;
  font-size: 14px;
}

.task-editor-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.task-editor-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-secondary);
  font-size: 14px;
}

.task-editor-item {
  padding: 16px;
  background: var(--color-bg);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.task-editor-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.task-editor-item__number {
  font-weight: 600;
  color: var(--color-primary);
}

.task-editor-item__remove {
  background: var(--color-error);
  color: white;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: opacity 0.2s;
}

.task-editor-item__remove:hover {
  opacity: 0.8;
}

.task-editor-item__field {
  margin-bottom: 12px;
}

.task-editor-item__field:last-child {
  margin-bottom: 0;
}

.task-editor-item__field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--color-text-secondary);
}

.task-editor-input,
.task-editor-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  transition: border-color 0.2s;
}

.task-editor-input:focus,
.task-editor-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.task-editor-textarea {
  min-height: 80px;
  resize: vertical;
}

.modal__footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Main Content */
.main {
  flex: 1;
  padding: 16px;
  width: 100%;
  margin: 0 auto;
  max-width: 600px;
  /* Comfortable width for mobile/tablet */
}

/* Header Content updates */
.header__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  max-width: 600px;
  /* Comfortable width for mobile/tablet */
}

/* ... existing styles ... */

/* Responsive adjustments for small screens */
@media (max-width: 600px) {
  .rag-section__title {
    font-size: 16px;
  }

  .rag-item {
    padding: 16px;
    border-radius: 16px;
  }

  .rag-item__title {
    font-size: 15px;
  }

  .rag-item__content {
    font-size: 13px;
    padding: 10px;
  }

  .rag-item__actions {
    flex-direction: column;
  }

  .rag-item__btn {
    width: 100%;
    justify-content: center;
  }

  .rag-empty {
    padding: 32px 20px;
  }

  .rag-empty__icon {
    font-size: 40px;
  }

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

  .zoom-recordings .zoom-items {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .transcriptions .zoom-items {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 900px) and (min-width: 601px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .zoom-recordings .zoom-items {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* =========================================
   Desktop Adaptation
   ========================================= */
@media (min-width: 1024px) {

  /* Expand containers */
  .header__content,
  .main {
    max-width: 1200px;
    padding: 0 32px;
  }

  /* Dashboard — одна колонка на всех экранах, блоки не разбросаны */
  .screen--dashboard .dashboard {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }

  /* Stats — три карточки в ряд, равная высота */
  .stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
  .stats__card {
    display: flex;
  }
  .stats__card .card__body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .screen--dashboard .news-list {
    grid-template-columns: 1fr;
  }

  /* Zoom Recordings Grid */
  .zoom-recordings .zoom-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 16px;
  }

  /* Task Editor Desktop Layout */
  .task-editor-content .task-editor-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
  }

  .task-editor-item {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .task-editor-item__field:has(textarea) {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .task-editor-textarea {
    flex: 1;
    min-height: 100px;
  }
}