/* src/styles/main.css */
:root {
  --background: 210 20% 96%;
  --foreground: 222 84% 5%;

  --card: 0 0% 100%;
  --card-foreground: 222 84% 5%;

  --primary: 210 75% 50%;
  --primary-foreground: 0 0% 100%;

  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;

  --success: 142 71% 45%; /* <-- НАШ НОВЫЙ ТОКЕН */

  --muted: 210 20% 94%;
  --muted-foreground: 215 16% 47%;

  --border: 210 20% 88%;
  --input: 210 20% 88%;
  --ring: 210 75% 50%;

  --radius: 0.5rem;
}
* {
  box-sizing: border-box;
  border-color: hsl(var(--border));
  margin: 0;
  padding: 0;
}
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: 'Inter', sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  min-height: 100vh;
}
#app {
  width: 100%;
  height: 100%;
}
.card {
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
}
.card-header {
  padding: 1.5rem;
}
.card-content {
  padding: 1.5rem;
  padding-top: 0;
}
.card-footer {
  padding: 1.5rem;
  padding-top: 0;
  margin-top: 1rem;
  border-top: 1px solid hsl(var(--border));
  background-color: transparent;
  display: flex;
  justify-content: flex-end;
}
.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: hsl(var(--foreground));
}
.card-description {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: hsl(var(--foreground));
}
.form-input,
.form-textarea {
  display: block;
  width: 100%;
  border-radius: calc(var(--radius) - 2px);

  background-color: hsl(var(--background));
  border: 1px solid hsl(var(--border));

  padding: 0.75rem;
  font-size: 0.875rem;
  outline: none;
  transition:
    box-shadow 0.15s ease-in-out,
    border-color 0.15s ease-in-out;
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: hsl(var(--muted-foreground));
}
.form-input:focus,
.form-textarea:focus {
  box-shadow:
    0 0 0 2px hsl(var(--background)),
    0 0 0 4px hsl(var(--ring));
}
.form-textarea {
  min-height: 120px;
  max-height: 400px;
  resize: none;
  overflow-y: auto;
  line-height: 1.6;
}
.form-textarea::-webkit-scrollbar {
  width: 8px;
}
.form-textarea::-webkit-scrollbar-track {
  background: transparent;
}
.form-textarea::-webkit-scrollbar-thumb {
  background-color: hsl(var(--border));
  border-radius: 10px;
  cursor: default;
}
.form-textarea::-webkit-scrollbar-thumb:hover {
  background-color: hsl(var(--muted-foreground));
}
.form-hint {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.5rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  font-weight: 500;
  height: 2.5rem;
  padding: 0 1rem;
  border: none;
  cursor: pointer;
  transition:
    background-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
  outline: none;
}
.btn:focus-visible {
  box-shadow:
    0 0 0 2px hsl(var(--background)),
    0 0 0 4px hsl(var(--ring));
}
.btn:disabled {
  pointer-events: none;
  opacity: 0.7;
}
.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.btn-primary:hover {
  background-color: hsl(var(--primary) / 0.9);
}
.btn-destructive {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}
.btn-destructive:hover {
  background-color: hsl(var(--destructive) / 0.9);
}
.btn-secondary {
  background-color: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}
.btn-secondary:hover {
  background-color: hsl(var(--border));
}
.alert-danger {
  border-color: hsl(var(--destructive));
}
.alert-danger .card-title {
  color: hsl(var(--destructive));
}
.file-upload-zone {
  border: 2px dashed hsl(var(--border));
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background-color 0.2s;
}
.file-upload-zone:hover {
  border-color: hsl(var(--primary));
  background-color: hsl(var(--muted));
}
.file-upload-zone__icon {
  width: 2rem;
  height: 2rem;
  margin: 0 auto 0.5rem;
  color: hsl(var(--muted-foreground));
}
.file-upload-zone__text {
  font-weight: 500;
  color: hsl(var(--foreground));
  margin-bottom: 0.25rem;
}
.file-upload-zone__hint {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}
.file-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}
.file-list-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background-color: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  margin-bottom: 0.5rem;
}
.file-list-item__icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  color: hsl(var(--muted-foreground));
}
.file-list-item__name {
  flex-grow: 1;
  font-size: 0.875rem;
}
.file-list-item__remove {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background-color: hsl(var(--card));
  color: hsl(var(--muted-foreground));
  display: flex;
  align-items: center;
  justify-content: center;
}
.file-list-item__remove:hover {
  background-color: hsl(var(--destructive) / 0.2);
  color: hsl(var(--destructive));
}
.error-message {
  color: hsl(var(--destructive));
  margin-top: 1rem;
  font-size: 0.875rem;
  text-align: center;
}
.success-message {
  color: #28a745;
  margin-top: 1rem;
  font-size: 0.875rem;
  text-align: center;
}
.form-textarea--monospace {
  font-family:
    'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
    monospace;
  background-color: hsl(var(--muted));
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
  line-height: 1.6;
  min-height: 150px; /* Сделаем его повыше по умолчанию */
}

/* src/styles/header.css */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1rem 4rem; /* Отступы как у основного контента */
  border-bottom: 1px solid hsl(var(--border));
  background-color: hsl(
    var(--card)
  ); /* Слегка отличающийся фон для выделения */
  box-sizing: border-box;
}
.header-logo {
  font-size: 1.25rem; /* 20px */
  font-weight: 600;
  color: hsl(var(--foreground));
}
.header-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  border: 1px solid hsl(var(--border));
}
.header-profile {
  position: relative; /* Важно для позиционирования меню */
}
.header-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  border: 1px solid hsl(var(--border));
  overflow: hidden; /* Скрываем части изображения, выходящие за круг */
}
.header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Масштабируем изображение, сохраняя пропорции */
}
.menu-action {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  border: none;
  background-color: transparent;
  color: hsl(var(--foreground));
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none; /* Для ссылок */
}
.menu-action:hover {
  background-color: hsl(var(--muted)); /* Легкий серый фон при наведении */
}

/* Модификатор для опасных действий */
.menu-action.destructive:hover {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

/* Стили выпадающего меню */
.profile-menu {
  position: absolute;
  top: calc(100% + 10px); /* 10px отступ от аватарки */
  right: 0;
  width: 240px;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
  padding: 0.5rem 0;
}
.menu-user-info {
  padding: 0.5rem 1rem;
  display: flex;
  flex-direction: column;
}
.menu-user-name {
  font-weight: 600;
  color: hsl(var(--foreground));
}
.menu-user-email {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}
.menu-divider {
  height: 1px;
  background-color: hsl(var(--border));
  margin: 0.5rem 0;
}
.menu-logout-button {
  width: calc(100% - 1rem);
  margin: 0 0.5rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background-color: #f7931a; /* Оранжевый цвет */
  color: white;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}
.menu-logout-button:hover {
  background-color: #e0810a;
}

/* Анимация появления */
.fade-enter-active,
.fade-leave-active {
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.fade-enter-from,
.fade-leave-to {
  opacity: 0;
  transform: translateY(-5px);
}

/* src/styles/modal.css */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content {
  background-color: hsl(var(--card));
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  width: 100%;
  max-width: 500px;
}
.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
}
.modal-header {
  margin-bottom: 1.5rem;
}
.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
}

/* Анимация */
.modal-fade-enter-active,
.modal-fade-leave-active {
  transition: opacity 0.3s ease;
}
.modal-fade-enter-from,
.modal-fade-leave-to {
  opacity: 0;
}

/* Обновляем стили для основного макета */
#layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}
.content {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 4rem;
  padding-bottom: 10rem;
}
