/* resources/css/dashboard.css - Стили дашборда */

@import url('auth.css');

/* === Цветовая палитра (спокойные тона) === */
:root {
  --color-primary: #4a7c59;
  --color-primary-light: #5d8f6d;
  --color-primary-dark: #3a6347;
  --color-secondary: #c9a961;
  --color-secondary-dark: #b8964e;
  --color-bg-light: #f8f5f0;
  --color-bg-card: #ffffff;
  --color-bg-accent: #f0f7f4;
  --color-text-dark: #2d3748;
  --color-text-medium: #4a5568;
  --color-text-light: #718096;
  --color-border: #e2e8f0;
  --color-white: #ffffff;
  --color-error: #e53e3e;
  --color-error-light: #fff5f5;
  --color-success: #48bb78;
  --color-success-light: #f0fff4;
  --color-warning: #ed8936;
  --color-warning-light: #fffaf0;
  --color-info: #4299e1;
  --color-info-light: #ebf8ff;
}

/* === Основная разметка === */
.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

@media (max-width: 768px) {
  .dashboard-container {
    padding: 1rem;
  }
}

/* === Уведомления === */
.dashboard-alert {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dashboard-alert-warning {
  background: var(--color-warning-light);
  border-left: 4px solid var(--color-warning);
}

.dashboard-alert-icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.dashboard-alert-warning .dashboard-alert-icon {
  color: #d97706;
}

.dashboard-alert-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: #92400e;
}

.dashboard-alert-text {
  font-size: 0.875rem;
  color: #b45309;
  margin-bottom: 0.75rem;
}

.dashboard-alert-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* === Карточки === */
.dashboard-card {
  background: var(--color-bg-card);
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.2s ease;
}

.dashboard-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.dashboard-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* === Профиль пользователя === */
.user-profile-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .user-profile-card {
    flex-direction: row;
    align-items: center;
  }
}

.user-avatar-wrapper {
  flex-shrink: 0;
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15);
}

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

.user-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 0.25rem;
  word-break: break-word;
}

.user-email,
.user-phone {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: 0.125rem;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}

.user-badge-verified {
  background: var(--color-success-light);
  color: #059669;
}

.user-badge-unverified {
  background: var(--color-warning-light);
  color: #d97706;
}

.user-badge-icon {
  width: 0.875rem;
  height: 0.875rem;
}

/* === Роли === */
.user-roles-card {
  background: var(--color-bg-accent);
  border: 1px solid #d1fae5;
  border-radius: 0.75rem;
  padding: 1rem;
}

.user-roles-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #065f46;
  margin-bottom: 0.75rem;
}

.user-roles-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.user-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  background: var(--color-success-light);
  color: #065f46;
}

/* === Сетка информации === */
.dashboard-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .dashboard-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.info-card {
  background: var(--color-bg-card);
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.info-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.info-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-label {
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.info-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-dark);
  text-align: right;
  word-break: break-word;
  max-width: 60%;
}

.info-status {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.info-status-verified {
  color: var(--color-success);
}

.info-status-unverified {
  color: var(--color-warning);
}

/* === Быстрые действия === */
.dashboard-actions-section {
  margin-top: 2rem;
}

.dashboard-actions-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 1rem;
}

.dashboard-actions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dashboard-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-white);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(74, 124, 89, 0.3);
}

.dashboard-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(74, 124, 89, 0.4);
}

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

.dashboard-action-btn-secondary {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.dashboard-action-btn-secondary:hover {
  box-shadow: 0 4px 8px rgba(107, 114, 128, 0.4);
}

.dashboard-action-btn-purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.dashboard-action-btn-purple:hover {
  box-shadow: 0 4px 8px rgba(139, 92, 246, 0.4);
}

.dashboard-action-btn-icon {
  font-size: 1.125rem;
}

/* === Список постов === */
.dashboard-posts-section {
  margin-top: 2rem;
}

.dashboard-posts-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 1rem;
}

.dashboard-posts-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dashboard-post-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

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

.dashboard-post-info {
  flex: 1;
  min-width: 0;
}

.dashboard-post-link {
  font-weight: 600;
  color: var(--color-text-dark);
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
  margin-bottom: 0.25rem;
  word-break: break-word;
}

.dashboard-post-link:hover {
  color: var(--color-primary);
}

.dashboard-post-meta {
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

.dashboard-post-stats {
  text-align: right;
  flex-shrink: 0;
  margin-left: 1rem;
}

.dashboard-post-stat-row {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin-bottom: 0.125rem;
}

.dashboard-posts-more {
  margin-top: 1rem;
  text-align: center;
}

.dashboard-posts-more-link {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.dashboard-posts-more-link:hover {
  color: var(--color-primary-dark);
}

/* === Адаптивность для постов === */
@media (max-width: 640px) {
  .dashboard-post-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .dashboard-post-stats {
    text-align: left;
    margin-left: 0;
  }
}
