/* ========== ОБЩИЕ СТИЛИ ЛИЧНОГО КАБИНЕТА ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #0a0c0f;
  font-family: 'Inter', sans-serif;
  color: #e5e7eb;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4, .gradient-text {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

.gradient-text {
  background: linear-gradient(135deg, #6ee7b7 0%, #34d399 50%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== КНОПКИ ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 22px;
  border-radius: 50px;
  background: rgba(17, 24, 39, 0.75);
  border: 1px solid #2d3748;
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  letter-spacing: 0.3px;
  backdrop-filter: blur(8px);
}

.btn-primary {
  background: #10b981;
  border: 1px solid #10b981;
  color: #0a0c0f;
  box-shadow: 0 6px 16px -6px rgba(16, 185, 129, 0.35);
  font-weight: 700;
}

.btn-primary:hover {
  background: #059669;
  border-color: #059669;
  box-shadow: 0 10px 22px -4px rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #6b7280;
  transform: translateY(-2px);
}

.btn-danger {
  border-color: #dc2626;
  color: #fca5a5;
}
.btn-danger:hover {
  background: rgba(220, 38, 38, 0.1);
  border-color: #ef4444;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ========== ШАПКА (header) ========== */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid #1f2937;
  margin-bottom: 32px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.5px;
  text-decoration: none;
}

.logo-icon {
  background: #10b981;
  color: #0a0c0f;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
}

.logo-text {
  color: white;
}
.logo-text span {
  color: #10b981;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.user-info {
  display: flex;
  flex-direction: column;
}
.user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #f1f5f9;
}
.user-plan {
  font-size: 0.75rem;
  color: #10b981;
}

.notifications {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 1px solid #2d3748;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  cursor: pointer;
  transition: 0.2s;
}
.notifications .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== СЕТКА ЛК ========== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  margin-bottom: 60px;
}

/* ========== САЙДБАР ========== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  color: #9ca3af;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.sidebar-nav li a i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.sidebar-nav li a:hover {
  background: rgba(255,255,255,0.04);
  color: #d1d5db;
}

.sidebar-nav li a.active {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  font-weight: 600;
}

.sidebar-nav li a .count {
  margin-left: auto;
  background: #1f2937;
  color: #9ca3af;
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

/* ========== ОСНОВНОЙ КОНТЕНТ ========== */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.page-header h1 {
  font-size: 1.6rem;
  color: #f9fafb;
}

/* ========== СЕКЦИИ ========== */
.section-card {
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid #2d3748;
  border-radius: 20px;
  padding: 24px;
}

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

.section-header h2 {
  font-size: 1.15rem;
  color: #f1f5f9;
}

/* ========== ФОРМЫ ========== */
.settings-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #d1d5db;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: white;
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #10b981;
}

.form-group select {
  appearance: none;
  cursor: pointer;
}

/* ========== ТАБЛИЦЫ ========== */
table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.78rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  border-bottom: 1px solid #1f2937;
}

tbody td {
  padding: 14px 14px;
  font-size: 0.88rem;
  border-bottom: 1px solid #1f2937;
  color: #d1d5db;
}

tbody tr:hover {
  background: rgba(255,255,255,0.02);
}

/* ========== СТАТУСЫ ========== */
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
}
.status.success, .status.completed {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}
.status.warning, .status.in-progress {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}
.status.danger, .status.failed {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}
.status.info, .status.scheduled {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

/* ========== TOGGLE SWITCH ========== */
.toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}
.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1f2937;
  transition: 0.3s;
  border-radius: 34px;
  border: 1px solid #374151;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background: #6b7280;
  transition: 0.3s;
  border-radius: 50%;
}
.toggle input:checked + .toggle-slider {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
}
.toggle input:checked + .toggle-slider::before {
  transform: translateX(22px);
  background: #10b981;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #1f2937;
}
.setting-row:last-child {
  border-bottom: none;
}
.setting-info h4 {
  font-size: 0.9rem;
  color: #d1d5db;
  margin-bottom: 2px;
}
.setting-info p {
  font-size: 0.8rem;
  color: #6b7280;
}

/* ========== ПАГИНАЦИЯ ========== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
}
.pagination a {
  background: rgba(17, 24, 39, 0.55);
  border: 1px solid #2d3748;
  color: #9ca3af;
}
.pagination a:hover {
  border-color: #10b981;
  color: #10b981;
}
.pagination .current {
  background: #10b981;
  border: 1px solid #10b981;
  color: #0a0c0f;
  font-weight: 600;
}

/* ========== МОДАЛЬНОЕ ОКНО ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: #111827;
  border: 1px solid #2d3748;
  border-radius: 24px;
  padding: 32px 28px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 30px 50px -15px rgba(0,0,0,0.7);
}

/* ========== АДАПТИВ ========== */
@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .sidebar-nav {
    flex-direction: row;
    gap: 4px;
  }
  .sidebar-nav li a {
    white-space: nowrap;
    padding: 10px 16px;
  }
  .settings-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .header-right .user-info {
    display: none;
  }
}