:root {
  --bg-color: #04050b;
  --bg-gradient-1: rgba(96, 165, 250, 0.25);
  --bg-gradient-2: rgba(192, 132, 252, 0.3);
  --text-color: #f4f6ff;
  --muted-color: rgba(244, 246, 255, 0.7);
  --card-bg: rgba(13, 16, 26, 0.85);
  --card-text: #f8f9ff;
  --primary: #6293ff;
  --primary-contrast: #05060d;
  --accent: #c084fc;
  --accent-2: #20e3b2;
  --glass-border: rgba(255, 255, 255, 0.12);
  --chip-bg: rgba(255, 255, 255, 0.08);
  --chip-color: #fdfdff;
  --input-bg: rgba(255, 255, 255, 0.05);
  --input-border: rgba(255, 255, 255, 0.2);
  --shadow-strong: 0 25px 60px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
  --bg-color: #f6f7fb;
  --bg-gradient-1: rgba(99, 102, 241, 0.1);
  --bg-gradient-2: rgba(236, 72, 153, 0.08);
  --text-color: #0f172a;
  --muted-color: rgba(15, 23, 42, 0.7);
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-text: #0f172a;
  --primary: #2563eb;
  --primary-contrast: #ffffff;
  --accent: #9333ea;
  --accent-2: #0ea5e9;
  --glass-border: rgba(15, 23, 42, 0.08);
  --chip-bg: rgba(15, 23, 42, 0.05);
  --chip-color: #0f172a;
  --input-bg: rgba(15, 23, 42, 0.03);
  --input-border: rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 25px 45px rgba(15, 23, 42, 0.15);
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 0% 0%, var(--bg-gradient-1), transparent 45%),
              radial-gradient(circle at 80% 0%, var(--bg-gradient-2), transparent 55%),
              var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  transition: background 0.4s ease, color 0.2s ease;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.sidebar {
  background: rgba(4, 5, 11, 0.75);
  border-right: 1px solid var(--glass-border);
  padding: 2rem 1.5rem;
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-brand h4 {
  font-weight: 700;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.sidebar-footer {
  border-top: 1px solid var(--glass-border);
  padding-top: 1rem;
  margin-top: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  color: var(--muted-color);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-link.active,
.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-color);
}

.shell-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
}

.topbar-btn .material-symbols {
  font-size: 1.25rem;
}

.topbar-btn .badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0.15rem 0.35rem;
  font-size: 0.7rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-user .user-name {
  font-weight: 600;
}

.topbar-user .user-role {
  font-size: 0.85rem;
  color: var(--muted-color);
}

.shell-content {
  padding: 2rem;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

.dashboard-page {
  max-width: 100%;
  width: 100%;
  overflow-x: hidden;
}

.notifications-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  height: 100vh;
  background: linear-gradient(180deg, 
    rgba(4, 6, 12, 0.98) 0%, 
    rgba(10, 12, 20, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--glass-border);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  z-index: 1100;
}

@media (max-width: 768px) {
  .notifications-panel {
    width: 100%;
    max-width: 100vw;
    right: -100%;
    border-left: none;
    border-top: 1px solid var(--glass-border);
    z-index: 2000;
  }

  .notifications-header {
    padding: 1rem;
  }

  .notifications-header h6 {
    font-size: 1rem;
  }

  .notification-list {
    padding: 0.75rem;
  }

  .notification-list-item {
    padding: 1rem;
    margin-bottom: 0.6rem;
    border-radius: 10px;
  }

  .notification-title {
    font-size: 0.9rem;
  }

  .notification-meta {
    font-size: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .notification-meta-item {
    font-size: 0.7rem;
  }

  .notification-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }
}

@media (max-width: 576px) {
  .notifications-panel {
    height: 100vh;
    top: 0;
  }

  .notifications-header {
    padding: 0.85rem;
  }

  .notification-list-item {
    padding: 0.85rem;
    margin-bottom: 0.5rem;
  }

  .notification-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .notification-badge {
    align-self: flex-end;
  }
}

[data-theme="light"] .notifications-panel {
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.98) 0%, 
    rgba(250, 250, 252, 0.98) 100%);
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
}

.notifications-panel.active {
  right: 0;
}

.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
}

[data-theme="light"] .notifications-header {
  background: rgba(0, 0, 0, 0.03);
}

.notifications-header h6 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--card-text);
}

.notifications-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}

/* Кастомный скроллбар */
.notifications-body::-webkit-scrollbar {
  width: 8px;
}

.notifications-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  margin: 4px;
}

.notifications-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  transition: background 0.2s ease;
}

.notifications-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .notifications-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .notifications-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .notifications-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.notification-item {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
  min-height: 80px;
  flex-shrink: 0;
  margin-bottom: 0.75rem;
}

.notification-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(-2px);
}

.notification-item:hover::before {
  opacity: 1;
}

.notification-item.read {
  opacity: 0.6;
  background: rgba(255, 255, 255, 0.02);
}

.notification-item.read:hover {
  opacity: 0.8;
}

[data-theme="light"] .notification-item {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .notification-item:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .notification-item.read {
  background: rgba(0, 0, 0, 0.02);
}

.notification-item .fw-semibold {
  color: var(--card-text);
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.notification-item .text-muted {
  font-size: 0.85rem;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.notification-item > div {
  width: 100%;
}

#toastHost {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2000;
}

.toast-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-strong);
  border: 1px solid var(--glass-border);
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  cursor: pointer;
  user-select: none;
}

.toast-card:hover {
  background: var(--glass-hover);
  transform: translateX(-5px);
}

.toast-card.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-card.hide {
  opacity: 0;
  transform: translateX(100%);
}

.text-muted,
.lead,
p {
  color: var(--muted-color) !important;
}

.theme-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
}

.theme-toggle-btn,
.theme-toggle-btn-sidebar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--card-text);
  font-weight: 500;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
}

.theme-toggle-btn {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  width: auto;
}

.theme-toggle-btn:hover,
.theme-toggle-btn-sidebar:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.theme-toggle-btn .toggle-icon,
.theme-toggle-btn-sidebar .toggle-icon {
  font-size: 1.1rem;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.theme-toggle-btn[data-theme="light"] .sun,
.theme-toggle-btn[data-theme="dark"] .moon,
.theme-toggle-btn-sidebar[data-theme="light"] .sun,
.theme-toggle-btn-sidebar[data-theme="dark"] .moon {
  opacity: 1;
}

.btn {
  border-radius: 12px;
  padding: 0.65rem 1.25rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(115deg, var(--primary), var(--accent));
  border: 0;
  color: var(--primary-contrast);
  box-shadow: 0 8px 20px rgba(98, 147, 255, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(98, 147, 255, 0.45);
  color: var(--primary-contrast);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-color);
  background: transparent;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--text-color);
}

.btn-danger {
  background: linear-gradient(115deg, #ef4444, #dc2626);
  border: 0;
  color: white;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.45);
  color: white;
}

.btn-outline-danger {
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
  background: transparent;
}

.btn-outline-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-glass {
  width: min(520px, 100%);
  padding: 3rem 2.75rem;
  border-radius: 32px;
  background: var(--card-bg);
  backdrop-filter: blur(22px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-strong);
  color: var(--card-text);
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.form-label {
  color: var(--muted-color);
  font-weight: 500;
}

.form-control,
.form-select,
textarea.form-control {
  border-radius: 12px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-color);
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px 14px;
  padding-right: 2.5rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(98, 147, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-color);
  outline: none;
}

/* Светлая тема для select */
[data-theme="light"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%231e293b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(15, 23, 42, 0.2);
}

[data-theme="light"] .form-select:hover {
  background-color: rgba(255, 255, 255, 1);
  border-color: rgba(15, 23, 42, 0.3);
}

[data-theme="light"] .form-select:focus {
  background-color: rgba(255, 255, 255, 1);
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(98, 147, 255, 0.1);
}

/* Темная тема для select */
[data-theme="dark"] .form-select {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .form-select:hover {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Options стили */
.form-select option {
  background-color: var(--card-bg);
  color: var(--text-color);
  padding: 0.5rem 1rem;
}

[data-theme="light"] .form-select option {
  background-color: #ffffff;
  color: #1e293b;
}

[data-theme="dark"] .form-select option {
  background-color: #0f172a;
  color: #f1f5f9;
}

.form-control::placeholder {
  color: var(--muted-color);
  opacity: 0.6;
}

/* Input Group */
.input-group {
  display: flex;
  width: 100%;
}

.input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.input-group .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  border: 1px solid var(--input-border);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.input-group .btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.input-group .btn .material-symbols {
  font-size: 1.2rem;
}

[data-theme="light"] .input-group .btn {
  border-color: rgba(15, 23, 42, 0.2);
  background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .input-group .btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(15, 23, 42, 0.3);
}

.form-check-input {
  border-radius: 6px;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-check-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(98, 147, 255, 0.15);
}

.form-check-label {
  color: var(--text-color);
  margin-left: 0.5rem;
}

.login-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
}

.login-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
}

.dashboard-page {
  color: var(--text-color);
}

.glass-panel {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  box-shadow: var(--shadow-strong);
  color: var(--card-text);
}

.glass-panel .badge.bg-gradient {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  font-size: 0.95rem;
  border: 0;
}

.hero-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-card .hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Modern Hero Card */
.hero-card-modern {
  position: relative;
  min-height: 280px;
  width: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.hero-card-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-gradient-1 {
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite;
}

.hero-gradient-2 {
  position: absolute;
  bottom: -40%;
  left: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 25s ease-in-out infinite reverse;
}

.hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.03) 1px, transparent 0);
  background-size: 40px 40px;
  opacity: 0.5;
}

.hero-card-content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3rem 3.5rem;
  min-height: 280px;
}

.hero-main {
  flex: 1;
  max-width: 70%;
}

.hero-greeting {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  backdrop-filter: blur(10px);
}

.hero-icon {
  font-size: 1.5rem;
  animation: wave 2s ease-in-out infinite;
  transform-origin: 70% 70%;
}

.hero-greeting-text {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .hero-greeting-text {
    background: linear-gradient(135deg, #6293ff, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 0.5rem 0 1rem 0;
  color: rgba(255, 255, 255, 0.95);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .hero-title {
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

.hero-title-prefix {
  display: block;
  font-size: 0.5em;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: rgba(255, 255, 255, 0.85) !important;
  position: relative;
  z-index: 1;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.85) !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
}

.hero-title-name {
  display: block;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-subtitle-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
  opacity: 0.8;
}

.hero-panel-name {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-badge-role {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent));
  border-radius: 50px;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-badge-role:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
}

.hero-badge-role .material-symbols {
  font-size: 1.1rem;
}

.hero-badge-status {
  padding: 0.65rem 1.5rem;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: #22d3ee;
  font-weight: 600;
  font-size: 0.95rem;
}

.hero-decoration {
  position: relative;
  width: 200px;
  height: 200px;
  flex-shrink: 0;
}

.hero-decoration-circle {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  animation: rotate 20s linear infinite;
}

.hero-decoration-circle.circle-1 {
  width: 180px;
  height: 180px;
  top: 10px;
  left: 10px;
}

.hero-decoration-circle.circle-2 {
  width: 140px;
  height: 140px;
  top: 30px;
  left: 30px;
  animation-duration: 15s;
  animation-direction: reverse;
}

.hero-decoration-circle.circle-3 {
  width: 100px;
  height: 100px;
  top: 50px;
  left: 50px;
  animation-duration: 10s;
}

.hero-decoration-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
  border-radius: 50%;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-decoration-icon .material-symbols {
  font-size: 2.5rem;
  color: var(--primary-color);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes wave {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(20deg);
  }
  75% {
    transform: rotate(-20deg);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Light theme adaptation */
[data-theme="light"] .hero-card-modern {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .hero-gradient-1 {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
}

[data-theme="light"] .hero-gradient-2 {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.06) 0%, transparent 70%);
}

[data-theme="light"] .hero-pattern {
  background-image: 
    radial-gradient(circle at 2px 2px, rgba(15, 23, 42, 0.03) 1px, transparent 0);
  opacity: 0.3;
}

[data-theme="light"] .hero-greeting {
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .hero-title {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] .hero-title-name {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] .hero-greeting-text {
  color: rgba(15, 23, 42, 0.9);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  [data-theme="light"] .hero-greeting-text {
    background: linear-gradient(135deg, #2563eb, #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

[data-theme="light"] .hero-title-prefix {
  color: rgba(15, 23, 42, 0.75) !important;
  -webkit-text-fill-color: rgba(15, 23, 42, 0.75) !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
}

[data-theme="light"] .hero-title {
  color: rgba(15, 23, 42, 0.95);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  [data-theme="light"] .hero-title {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

[data-theme="light"] .hero-subtitle {
  color: var(--muted-color);
}

[data-theme="light"] .hero-panel-name {
  color: var(--text-color);
}

[data-theme="light"] .hero-decoration-circle {
  border-color: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .hero-decoration-icon {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
  border: 1px solid rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .hero-decoration-icon .material-symbols {
  color: var(--primary);
}

[data-theme="light"] .hero-badge-role {
  background: linear-gradient(135deg, #2563eb, #9333ea);
  color: white;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}

[data-theme="light"] .hero-badge-role:hover {
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.35);
}

[data-theme="light"] .hero-badge-status {
  background: rgba(34, 211, 238, 0.15);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: #0891b2;
}

/* Responsive */
@media (max-width: 992px) {
  .hero-card-content {
    flex-direction: column;
    padding: 2.5rem 2rem;
    text-align: center;
  }
  
  .hero-main {
    max-width: 100%;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-decoration {
    width: 150px;
    height: 150px;
    margin-top: 2rem;
  }
  
  .hero-decoration-circle.circle-1 {
    width: 130px;
    height: 130px;
  }
  
  .hero-decoration-circle.circle-2 {
    width: 100px;
    height: 100px;
  }
  
  .hero-decoration-circle.circle-3 {
    width: 70px;
    height: 70px;
  }
  
  .hero-decoration-icon {
    width: 60px;
    height: 60px;
  }
  
  .hero-decoration-icon .material-symbols {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .hero-card-modern {
    min-height: 240px;
  }
  
  .hero-card-content {
    padding: 2rem 1.5rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-badges {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-badge-role,
  .hero-badge-status {
    width: 100%;
    justify-content: center;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-color);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.chip-live {
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.pulse-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.8);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.2);
    opacity: 0.2;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.8;
  }
}

.metric-card {
  height: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.metric-card .glass-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Обеспечиваем одинаковую высоту карточек в ряду */
.row.g-4 > [class*="col-"] {
  display: flex;
}

.row.g-4 > [class*="col-"] > .metric-card {
  width: 100%;
}

.row.g-4 > [class*="col-"] > .glass-panel {
  width: 100%;
  flex: 1;
}

.metric-label {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted-color);
  display: block;
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.data-terminal {
  min-height: 200px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.45);
  padding: 1.1rem;
  color: #e2e8ff;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .data-terminal {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

[data-theme="light"] .sidebar {
  background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .sidebar-link {
  color: var(--muted-color);
}

[data-theme="light"] .sidebar-link.active,
[data-theme="light"] .sidebar-link:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-color);
}

[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .btn-outline-light {
  border-color: rgba(15, 23, 42, 0.2);
  color: var(--text-color);
}

[data-theme="light"] .btn-outline-light:hover {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.3);
}

[data-theme="light"] .table {
  color: var(--text-color);
}

[data-theme="light"] .table-dark {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(15, 23, 42, 0.02);
  --bs-table-hover-bg: rgba(15, 23, 42, 0.04);
  --bs-table-color: #1e293b;
  color: #1e293b;
}

[data-theme="light"] .table-dark th,
[data-theme="light"] .table-dark td {
  color: #1e293b;
  border-color: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .table-dark .btn {
  color: #1e293b;
}

[data-theme="light"] .table-dark .btn:hover {
  color: #0f172a;
}

[data-theme="light"] .table-dark .form-check-input {
  background-color: rgba(15, 23, 42, 0.1);
  border-color: rgba(15, 23, 42, 0.2);
}

[data-theme="light"] .table-dark .form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.control-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.control-section {
  padding: 2rem;
}

@media (max-width: 768px) {
  .control-grid {
    gap: 1.25rem;
  }

  .control-section {
    padding: 1.25rem;
  }

  .control-section header h4 {
    font-size: 1.15rem;
  }
}

@media (max-width: 576px) {
  .control-grid {
    gap: 1rem;
  }

  .control-section {
    padding: 1rem;
  }

  .control-section header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem;
  }

  .control-section header h4 {
    font-size: 1.05rem;
  }

  .control-section header .d-flex.gap-2 {
    width: 100%;
    flex-wrap: wrap;
  }

  .control-section header .btn {
    flex: 1;
    min-width: calc(50% - 0.5rem);
  }
}

.control-section header {
  margin-bottom: 1.5rem;
}

.control-section header h4 {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.secure-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.secure-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.filters-section {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
}

@media (max-width: 768px) {
  .filters-section {
    padding: 1.25rem;
    margin-bottom: 1.25rem;
  }
}

@media (max-width: 576px) {
  .filters-section {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 12px;
  }
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 576px) {
  .filter-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }
}

.filter-row .form-control,
.filter-row .form-select {
  border-radius: 12px;
}

.form-control-sm,
.form-select-sm {
  font-size: 0.875rem;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
}

@media (max-width: 576px) {
  .form-control-sm,
  .form-select-sm {
    font-size: 0.8rem;
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
  }
}

.form-select-sm {
  padding-right: 2.25rem;
  background-size: 12px 12px;
  background-position: right 0.65rem center;
}

.resource-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.table-responsive {
  margin-top: 1rem;
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 576px) {
  .table-responsive {
    overflow: visible;
    border-radius: 12px;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
  }
}

.table {
  margin-bottom: 0;
  color: var(--text-color);
}

.table thead th {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--glass-border);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: 1rem;
  user-select: none;
}

.table thead th.sortable {
  position: relative;
  padding-right: 2rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.table thead th.sortable:hover {
  background: rgba(255, 255, 255, 0.08);
}

.table thead th.sortable .sort-icon {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0.4;
  transition: opacity 0.2s ease;
  display: inline-block;
  width: 1rem;
  text-align: center;
}

.table thead th.sortable:hover .sort-icon {
  opacity: 0.7;
}

.table thead th.sortable.sort-asc .sort-icon::before {
  content: "▲";
  opacity: 1;
  color: var(--primary-color);
}

.table thead th.sortable.sort-desc .sort-icon::before {
  content: "▼";
  opacity: 1;
  color: var(--primary-color);
}

.table thead th.sortable.sort-asc .sort-icon,
.table thead th.sortable.sort-desc .sort-icon {
  opacity: 1;
}

.table tbody td {
  border-color: var(--glass-border);
  padding: 0.85rem 1rem;
  vertical-align: middle;
}

.table-dark {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
  --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

.table-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.table text-center th,
.table.text-center td {
  text-align: center;
  vertical-align: middle;
}

.table th input[type="checkbox"],
.table td input[type="checkbox"] {
  cursor: pointer;
  width: 1.1rem;
  height: 1.1rem;
}

.notification-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.notification-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 16px;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.04);
}

.setup-page {
  min-height: 100vh;
  padding: 3rem 0;
}

.setup-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.setup-list li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.setup-list p {
  margin-bottom: 0;
}

.setup-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
}

pre {
  min-height: 160px;
  border-radius: 16px;
  overflow: auto;
}

.material-symbols {
  font-family: "Material Symbols Outlined", sans-serif;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  user-select: none;
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 220px 1fr;
  }

  .shell-content {
    padding: 1.5rem;
  }

  .glass-panel {
    padding: 1.5rem;
  }
}

/* Планшеты */
@media (max-width: 992px) {
  .shell-content {
    padding: 1.25rem;
  }

  .glass-panel {
    padding: 1.25rem;
  }

  .topbar {
    padding: 1rem 1.5rem;
  }

  .btn {
    padding: 0.6rem 1.1rem;
    font-size: 0.9rem;
  }
}

/* Кнопка открытия сайдбара на мобильных */
.sidebar-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin-right: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--text-color);
  transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.sidebar-toggle-btn .material-symbols {
  font-size: 1.5rem;
}

/* Кнопка закрытия сайдбара */
.sidebar-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-color);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sidebar-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.sidebar-close-btn .material-symbols {
  font-size: 1.25rem;
}

/* Заголовок сайдбара с кнопкой закрытия */
.sidebar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.sidebar-brand {
  flex: 1;
}

/* Overlay для мобильных устройств */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  /* Базовые размеры для планшетов */
  html {
    font-size: 15px;
  }

  /* Колонки Bootstrap - адаптация на планшетах */
  .col-md-2 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .col-md-3 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .col-md-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    padding: 1.75rem 1.25rem;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: block;
  }

  .sidebar-toggle-btn {
    display: flex;
  }

  .sidebar-close-btn {
    display: flex;
  }

  .topbar-left {
    display: flex;
    align-items: center;
  }

  .topbar-left h5 {
    font-size: 1.05rem;
  }

  .shell-content {
    padding: 1rem;
  }

  .topbar {
    padding: 1rem 1.25rem;
  }

  .topbar-user {
    display: none;
  }

  /* Уменьшенные размеры для планшетов */
  .glass-panel {
    padding: 1.25rem;
  }

  .glass-panel h4 {
    font-size: 1.15rem;
  }

  .btn {
    padding: 0.55rem 1.05rem;
    font-size: 0.875rem;
  }

  .form-control,
  .form-select {
    padding: 0.65rem 0.9rem;
    font-size: 0.925rem;
  }

  .table {
    font-size: 0.9rem;
  }

  .table thead th {
    padding: 0.75rem 0.6rem;
    font-size: 0.8rem;
  }

  .table tbody td {
    padding: 0.7rem 0.6rem;
  }

  /* Таблицы на планшетах - уменьшенные размеры, но сохраняем структуру */
  .table {
    font-size: 0.85rem;
  }

  .table thead th {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
  }

  .table tbody td {
    padding: 0.65rem 0.5rem;
  }

  .table tbody .btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.55rem;
  }
}

@media (max-width: 576px) {
  /* Базовые размеры для мобильных */
  html {
    font-size: 14px;
  }

  body {
    font-size: 0.9rem;
  }

  .sidebar {
    width: 100%;
    max-width: 100vw;
    padding: 1.5rem 1rem;
  }

  .sidebar-brand h4 {
    font-size: 1.1rem;
  }

  .sidebar-link {
    padding: 0.5rem 0.65rem;
    font-size: 0.9rem;
  }

  .sidebar-link .material-symbols {
    font-size: 1.1rem;
  }

  .topbar {
    padding: 0.75rem 1rem;
  }

  .topbar-left h5 {
    font-size: 0.95rem;
  }

  .topbar-right {
    gap: 0.5rem;
  }

  .topbar-btn {
    padding: 0.5rem;
    font-size: 0.85rem;
  }

  .topbar-btn .material-symbols {
    font-size: 1rem;
  }

  .topbar-btn span:not(.material-symbols) {
    display: none;
  }

  .shell-content {
    padding: 0.75rem;
  }

  /* Карточки и панели */
  .glass-panel {
    padding: 1rem !important;
    border-radius: 16px;
  }

  .glass-panel h4 {
    font-size: 1.1rem;
  }

  .glass-panel h6 {
    font-size: 0.95rem;
  }

  /* Кнопки */
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 10px;
  }

  .btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
  }

  .btn .material-symbols {
    font-size: 1rem;
  }

  /* Формы */
  .form-control,
  .form-select {
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    border-radius: 10px;
  }

  .form-label {
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
  }

  .form-text {
    font-size: 0.75rem;
  }

  /* Таблицы - карточный вид на мобильных */
  .table {
    font-size: 0.8rem;
    margin-bottom: 0;
    width: 100%;
    max-width: 100%;
    table-layout: auto;
  }

  .table thead {
    display: none !important; /* Скрываем заголовки на мобильных */
  }

  .table tbody {
    display: block;
    width: 100%;
  }

  .table tbody tr {
    display: block;
    width: 100%;
    margin-bottom: 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.6rem 0.4rem 0.6rem 0.6rem;
    position: relative;
    transition: all 0.2s ease;
    box-sizing: border-box;
  }

  .table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .table tbody td {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left !important;
    width: 100%;
    box-sizing: border-box;
    gap: 0.4rem;
    line-height: 1.3;
  }

  /* Значения в ячейках - справа, с переносом, компактные */
  .table tbody td > *:not(:first-child):not(input[type="checkbox"]):not(.btn) {
    text-align: right;
    flex: 1;
    word-break: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    max-width: calc(100% - 70px);
    font-size: 0.7rem;
    line-height: 1.3;
  }

  .table tbody td:last-of-type:not(:first-child) {
    border-bottom: none;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .table tbody td:before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted-color);
    font-size: 0.65rem;
    margin-right: 0.4rem;
    flex-shrink: 0;
    min-width: 60px;
    max-width: 70px;
    opacity: 0.8;
    word-break: break-word;
    line-height: 1.2;
  }

  /* Чекбоксы - в правом верхнем углу, не перекрывают контент */
  .table tbody tr:has(td:first-child input[type="checkbox"]) {
    padding-right: 1.8rem !important; /* Место для чекбокса - уменьшено */
  }

  .table tbody td:first-child {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    border: none;
    padding: 0;
    z-index: 2;
    width: auto;
    min-width: auto;
  }

  /* Если первая ячейка не чекбокс, убираем отступ */
  .table tbody tr:not(:has(td:first-child input[type="checkbox"])) {
    padding-right: 0.6rem !important;
  }

  .table tbody td:first-child:before {
    display: none;
  }

  .table tbody td:first-child input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
  }

  /* Для таблицы сессий (без чекбоксов) - уменьшаем отступы */
  #sessionsTable tbody tr {
    padding-right: 0.6rem !important;
  }

  /* Убираем отступ справа у ячеек, чтобы текст не перекрывался чекбоксом */
  /* Для таблиц с чекбоксами */
  #usersTable tbody td:not(:first-child),
  #serversTable tbody td:not(:first-child),
  #nodesTable tbody td:not(:first-child) {
    padding-right: 1.5rem; /* Место для чекбокса справа - уменьшено */
    max-width: calc(100% - 75px); /* Оставляем место для метки слева */
  }

  /* Для таблиц без чекбоксов (сессии) */
  #sessionsTable tbody td {
    padding-right: 0.4rem;
    max-width: calc(100% - 70px);
  }

  /* Показываем только первые 3-4 важных колонки + действия для компактности */
  .table tbody td:nth-child(n+5):not(:last-child) {
    display: none !important;
  }

  /* Для таблицы клиентов показываем: ID, Имя, Протокол, Активен, Действия */
  #usersTable tbody td:nth-child(n+6):not(:last-child) {
    display: none !important;
  }

  /* Для таблицы серверов показываем: ID, Имя, IP, Активен, Действия */
  #serversTable tbody td:nth-child(n+5):not(:last-child) {
    display: none !important;
  }

  /* Для таблицы нод показываем: ID, Страна, IP, Активна, Действия */
  #nodesTable tbody td:nth-child(n+5):not(:last-child) {
    display: none !important;
  }

  /* Для таблицы сессий показываем только важные колонки на мобильных */
  #sessionsTable tbody td:nth-child(5),
  #sessionsTable tbody td:nth-child(6),
  #sessionsTable tbody td:nth-child(7) {
    display: none !important; /* Скрываем трафик на мобильных */
  }

  /* Показываем: ID, Пользователь, Сервер, IP, Подключен, Статус */
  #sessionsTable tbody td {
    display: flex !important;
  }

  /* Колонка действий - всегда внизу, компактная */
  .table tbody td:last-child {
    display: flex !important;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.25rem;
    width: 100%;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
  }

  .table tbody td:last-child:before {
    display: none;
  }

  /* Кнопки действий - фиксированный размер, не растягиваются */
  .table tbody td:last-child {
    justify-content: center; /* Центрируем кнопки */
  }

  .table tbody td:last-child .btn {
    flex: 0 0 auto !important;
    min-width: 32px !important;
    max-width: 32px !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    font-size: 0.65rem;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px;
  }

  .table tbody td:last-child .btn .material-symbols {
    font-size: 1rem !important;
    margin: 0 !important;
    line-height: 1;
  }

  /* Убираем текст с кнопок, оставляем только иконки на мобильных */
  .table tbody td:last-child .btn span:not(.material-symbols),
  .table tbody td:last-child .btn:not(:has(.material-symbols)) {
    display: none !important;
  }

  /* Убираем все кроме иконок */
  .table tbody td:last-child .btn *:not(.material-symbols) {
    display: none !important;
  }

  /* Адаптивные таблицы */
  .table-responsive {
    overflow-x: visible !important;
    overflow-y: visible !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .table-responsive .table {
    min-width: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block;
  }

  /* Убеждаемся, что контейнеры не обрезают контент */
  .control-section,
  .glass-panel {
    overflow: visible !important;
  }

  /* Убираем горизонтальную прокрутку */
  .dashboard-page,
  .control-grid {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }

  /* Убеждаемся, что все контейнеры видны */
  .glass-panel *,
  .control-section *,
  .dashboard-page * {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Исправляем проблемы с видимостью контента */
  .glass-panel,
  .control-section,
  section {
    max-width: 100%;
    overflow: visible;
  }

  /* Пагинация и элементы управления */
  .d-flex.justify-content-between {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Селекты на странице */
  #usersPerPageSelect,
  #serversPerPageSelect,
  #nodesPerPageSelect {
    width: 100% !important;
    max-width: 100px;
  }

  /* Кнопки в таблицах - компактные */
  .table tbody .btn {
    font-size: 0.7rem;
    padding: 0.35rem 0.5rem;
    min-width: auto;
    border-radius: 8px;
  }

  .table tbody .btn .material-symbols {
    font-size: 0.85rem;
    margin: 0;
  }

  .table tbody .btn-sm {
    padding: 0.3rem 0.45rem;
    font-size: 0.65rem;
  }

  /* Кнопки действий над таблицей */
  .table-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .table-actions .btn {
    font-size: 0.75rem;
    padding: 0.45rem 0.65rem;
  }

  .table-actions .btn .material-symbols {
    font-size: 0.9rem;
  }

  /* Улучшенный вид для значений в ячейках */
  .table tbody td > *:not(:first-child):not(input[type="checkbox"]) {
    text-align: right;
    flex: 1;
    word-break: break-word;
  }

  /* Бейджи и статусы */
  .table tbody td .badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
  }

  /* Иконки в таблицах */
  .table tbody td .material-symbols:not(.btn .material-symbols) {
    font-size: 1rem;
  }

  /* Секции настроек */
  .settings-section {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 12px;
  }

  .settings-section-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
  }

  .settings-section-header h6 {
    font-size: 0.95rem;
  }

  .settings-section-header .material-symbols {
    font-size: 1.25rem;
  }

  /* Метрики и карточки */
  .metric-card {
    min-height: 180px;
  }

  .metric-card .glass-panel {
    padding: 1.25rem !important;
  }

  .metric-value {
    font-size: 1.75rem;
  }

  .metric-label {
    font-size: 0.7rem;
  }

  .metric-detail-item {
    font-size: 0.8rem;
  }

  .metric-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .metric-icon .material-symbols {
    font-size: 1.35rem;
  }

  /* Уведомления */
  .notification-list-item {
    padding: 0.85rem;
    margin-bottom: 0.5rem;
  }

  .notification-title {
    font-size: 0.9rem;
  }

  .notification-message {
    font-size: 0.85rem;
  }

  /* Модальные окна */
  .modal-dark {
    border-radius: 16px;
  }

  .modal-dark .modal-header {
    padding: 1rem;
  }

  .modal-dark .modal-title {
    font-size: 1rem;
  }

  .modal-dark .modal-body {
    padding: 1rem;
    font-size: 0.9rem;
  }

  .modal-dark .modal-footer {
    padding: 0.85rem 1rem;
  }

  /* Пагинация */
  .pagination .page-item .page-link {
    padding: 0.4rem 0.65rem;
    font-size: 0.85rem;
  }

  /* Фильтры */
  .filters-section {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .filter-row {
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }

  /* Чипы и бейджи */
  .chip {
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
  }

  .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }

  /* Иконки */
  .material-symbols {
    font-size: 1.1rem;
  }

  /* Отступы в строках */
  .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }

  .row > * {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .g-2 {
    gap: 0.5rem !important;
  }

  .g-3 {
    gap: 0.75rem !important;
  }

  .g-4 {
    gap: 1rem !important;
  }

  /* Заголовки */
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  h3 {
    font-size: 1.15rem;
  }

  h4 {
    font-size: 1.05rem;
  }

  h5 {
    font-size: 1rem;
  }

  h6 {
    font-size: 0.9rem;
  }

  /* Алерты */
  .alert {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    border-radius: 10px;
  }

  .alert .material-symbols {
    font-size: 1.1rem;
  }

  /* IP список */
  .ip-item {
    padding: 0.6rem 0.75rem;
  }

  .ip-item-address {
    font-size: 0.85rem;
  }

  .ip-item-comment {
    font-size: 0.75rem;
  }

  /* Статистика */
  .stat-item {
    padding: 0.6rem 0.85rem;
    min-width: 120px;
  }

  .stat-value {
    font-size: 1.25rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .stat-item .material-symbols {
    font-size: 1.5rem;
  }

  /* Секции с inline стилями */
  section.glass-panel[style*="padding"] {
    padding: 1rem !important;
    margin-bottom: 1rem !important;
  }

  /* Заголовки в секциях */
  .control-section header h4,
  section.glass-panel h4,
  section.glass-panel h5 {
    font-size: 1.05rem;
  }

  section.glass-panel h5 {
    font-size: 1rem;
  }

  section.glass-panel .material-symbols {
    font-size: 1.5rem;
  }

  /* Модальные окна - адаптация */
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }

  .modal-content {
    border-radius: 16px;
  }

  /* Колонки Bootstrap - адаптация на мобильных */
  @media (max-width: 576px) {
    .col-md-1,
    .col-md-2,
    .col-md-3,
    .col-md-4,
    .col-md-5,
    .col-md-6,
    .col-md-7,
    .col-md-8,
    .col-md-9,
    .col-md-10,
    .col-md-11,
    .col-md-12 {
      width: 100% !important;
      flex: 0 0 100% !important;
      max-width: 100% !important;
    }
  }

  /* Заголовки таблиц адаптивные - скрыты на мобильных */
  .table thead th {
    white-space: nowrap;
    font-size: 0.7rem;
  }

  /* Кнопки действий в таблицах */
  .table-actions {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .table-actions .btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
  }

  .table-actions .btn .material-symbols {
    font-size: 0.9rem;
  }

  /* Пагинация */
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Информационные блоки */
  .text-muted.small {
    font-size: 0.75rem;
  }

  /* Flex контейнеры */
  .d-flex.gap-2,
  .d-flex.gap-3 {
    gap: 0.5rem !important;
    flex-wrap: wrap;
  }

  /* Заголовки с иконками */
  header.d-flex h4,
  header.d-flex h5 {
    font-size: 1.05rem;
  }

  /* Кнопки в заголовках */
  header .btn {
    font-size: 0.85rem;
    padding: 0.5rem 0.85rem;
  }

  header .btn .material-symbols {
    font-size: 1rem;
  }
}

/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 375px) {
  html {
    font-size: 13px;
  }

  .shell-content {
    padding: 0.5rem;
  }

  .glass-panel {
    padding: 0.75rem !important;
  }

  .btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
  }

  .table {
    font-size: 0.8rem;
  }

  .table thead th,
  .table tbody td {
    padding: 0.5rem 0.35rem;
  }
}

/* Модальные окна */
.modal-dark {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  color: var(--text-color);
}

.modal-dark .modal-header {
  border-bottom: 1px solid var(--glass-border);
  padding: 1.5rem;
}

.modal-dark .modal-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.modal-dark .modal-body {
  padding: 1.5rem;
}

.modal-dark .modal-footer {
  border-top: 1px solid var(--glass-border);
  padding: 1.25rem 1.5rem;
}

.modal-backdrop.show {
  opacity: 0.7;
}

/* Усиление затемнения для вложенных модальных окон */
.modal-backdrop + .modal-backdrop {
  opacity: 0.85 !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Убираем просвечивание первого модального окна */
.modal.show {
  z-index: 1055;
}

.modal-backdrop {
  z-index: 1050;
}

.modal.show ~ .modal.show {
  z-index: 1065;
}

.modal-backdrop + .modal-backdrop {
  z-index: 1060;
}

/* Информационная сетка пользователя */
.info-category {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.info-category:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.info-category-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--card-text);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-category-title.collapsible {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  padding: 0.5rem;
  margin: -0.5rem -0.5rem 0.5rem -0.5rem;
  border-radius: 8px;
}

.info-category-title.collapsible:hover {
  background: rgba(255, 255, 255, 0.05);
}

.info-category-title .material-symbols {
  font-size: 1.2rem;
  opacity: 0.7;
}

.info-category-title .collapse-icon {
  margin-left: auto;
  transition: transform 0.3s ease;
}

.info-category-title[aria-expanded="true"] .collapse-icon {
  transform: rotate(180deg);
}

.user-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.info-comment {
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  min-height: 60px;
}

.server-info-compact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  font-size: 0.9rem;
}

[data-theme="light"] .server-info-compact {
  background: rgba(0, 0, 0, 0.03);
}

.server-info-compact div {
  display: flex;
  gap: 0.5rem;
}

.server-info-compact strong {
  min-width: 70px;
  color: var(--card-text);
  opacity: 0.7;
}

.server-info-detailed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

[data-theme="light"] .server-info-detailed {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.02) 100%);
}

.server-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.server-detail-row:last-child {
  border-bottom: none;
}

[data-theme="light"] .server-detail-row {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

.server-detail-row strong {
  color: var(--card-text);
  opacity: 0.7;
  font-size: 0.9rem;
  min-width: 120px;
}

.server-detail-row span {
  color: var(--card-text);
  font-size: 0.95rem;
  text-align: right;
}

/* Карточки ключей */
.key-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.key-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .key-card {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .key-card:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
}

.key-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.key-info {
  flex: 1;
}

.key-name {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--card-text);
}

.key-country {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted-color);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

[data-theme="light"] .key-country {
  background: rgba(0, 0, 0, 0.05);
}

.key-country .material-symbols {
  font-size: 1rem;
}

.key-actions {
  display: flex;
  gap: 0.5rem;
}

.key-url {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  overflow: hidden;
}

[data-theme="light"] .key-url {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.key-url code {
  color: var(--primary-color);
  font-size: 0.85rem;
  word-break: break-all;
  font-family: 'Courier New', monospace;
}

#keysContainer {
  max-height: 500px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

#keysContainer::-webkit-scrollbar {
  width: 6px;
}

#keysContainer::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

#keysContainer::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

#keysContainer::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

#qrCodeContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

#qrCodeContainer img {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-color);
  font-weight: 600;
}

.info-value {
  font-size: 1rem;
  color: var(--text-color);
  font-weight: 500;
}

.info-item-full {
  grid-column: 1 / -1;
}

.info-item-full .info-value {
  word-break: break-word;
  white-space: pre-wrap;
}

/* Пагинация */
.pagination {
  gap: 0.35rem;
  margin-top: 1.5rem;
}

.pagination .page-item .page-link {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-color);
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  transition: all 0.2s ease;
  font-weight: 500;
}

.pagination .page-item.active .page-link {
  background: linear-gradient(115deg, var(--primary), var(--accent));
  border-color: var(--primary);
  color: var(--primary-contrast);
  box-shadow: 0 4px 12px rgba(98, 147, 255, 0.3);
}

.pagination .page-item.disabled .page-link {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination .page-item:not(.disabled) .page-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Светлая тема для модальных окон */
[data-theme="light"] .modal-dark {
  background: var(--card-bg);
  color: var(--text-color);
}

[data-theme="light"] .modal-dark .modal-header,
[data-theme="light"] .modal-dark .modal-footer {
  border-color: var(--glass-border);
}

[data-theme="light"] .info-item {
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .pagination .page-item .page-link {
  background: rgba(15, 23, 42, 0.03);
  border-color: var(--glass-border);
  color: var(--text-color);
}

[data-theme="light"] .pagination .page-item:not(.disabled) .page-link:hover {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.2);
}

@media (max-width: 576px) {
  .auth-glass {
    padding: 2rem 1.25rem;
  }

  .theme-toggle {
    right: 1rem;
    top: 1rem;
  }
  
  .user-info-grid {
    grid-template-columns: 1fr;
  }
}

/* Кастомный селект */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select {
  position: relative;
  width: 100%;
  user-select: none;
}

.custom-select-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-color);
}

.custom-select-trigger:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.custom-select.active .custom-select-trigger {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(98, 147, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.custom-select-trigger .material-symbols {
  transition: transform 0.3s ease;
  font-size: 1.2rem;
  opacity: 0.7;
}

.custom-select.active .custom-select-trigger .material-symbols {
  transform: rotate(180deg);
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  max-height: 250px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select.active .custom-select-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-select-option {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.custom-select-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.custom-select-option.selected {
  background: rgba(98, 147, 255, 0.15);
  color: var(--primary-color);
  font-weight: 500;
}

.custom-select-option.selected::before {
  content: '✓';
  font-weight: bold;
  margin-right: 0.5rem;
}

/* Светлая тема для кастомного селекта */
[data-theme="light"] .custom-select-trigger {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(15, 23, 42, 0.2);
}

[data-theme="light"] .custom-select-trigger:hover {
  background-color: rgba(255, 255, 255, 1);
  border-color: rgba(15, 23, 42, 0.3);
}

[data-theme="light"] .custom-select-options {
  background-color: #ffffff;
  border-color: rgba(15, 23, 42, 0.15);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .custom-select-option:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .custom-select-option.selected {
  background-color: rgba(98, 147, 255, 0.1);
}

/* Скроллбар для опций */
.custom-select-options::-webkit-scrollbar {
  width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  margin: 4px;
}

.custom-select-options::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .custom-select-options::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .custom-select-options::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .custom-select-options::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Code Block для команд */
.code-block {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem;
  font-family: 'Courier New', monospace;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.code-block code {
  flex: 1;
  min-width: 0;
  word-break: break-all;
  font-size: 0.9rem;
}

.code-block .btn {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .code-block {
    padding: 0.85rem;
    border-radius: 10px;
  }

  .code-block code {
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .code-block {
    padding: 0.75rem;
    border-radius: 10px;
    flex-direction: column;
    align-items: stretch;
  }

  .code-block code {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }

  .code-block .btn {
    width: 100%;
    justify-content: center;
  }
}

[data-theme="light"] .code-block {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.code-block code {
  flex: 1;
  color: var(--primary-color);
  font-size: 0.9rem;
  word-break: break-all;
  user-select: all;
}

[data-theme="light"] .code-block code {
  color: var(--primary-color);
}

.code-block .btn {
  flex-shrink: 0;
  padding: 0.5rem 0.75rem;
}

.code-block .btn .material-symbols {
  font-size: 1rem;
}

/* Server List для выбора */
.server-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.server-item {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.server-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(2px);
}

.server-item.selected {
  background: rgba(98, 147, 255, 0.15);
  border-color: var(--primary-color);
}

.server-item .server-info {
  flex: 1;
}

.server-item .server-name {
  font-weight: 600;
  color: var(--card-text);
  margin-bottom: 0.25rem;
}

.server-item .server-details {
  font-size: 0.85rem;
  color: var(--muted-color);
}

.server-item .server-check {
  font-size: 1.5rem;
  color: var(--primary-color);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.server-item.selected .server-check {
  opacity: 1;
}

[data-theme="light"] .server-item {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .server-item:hover {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .server-item.selected {
  background: rgba(98, 147, 255, 0.1);
}

/* Metric Icon */
.metric-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-icon .material-symbols {
  font-size: 1.5rem;
  color: white;
}

.metric-card .d-flex.align-items-center {
  flex-shrink: 0;
  margin-bottom: 1rem;
}

.metric-card .flex-grow-1 {
  min-width: 0;
  flex: 1;
}

.metric-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  margin-top: auto;
  min-height: 0;
}

.metric-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-color);
  line-height: 1.5;
}

.metric-detail-item span:not(.material-symbols) {
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.metric-detail-item strong {
  color: var(--card-text);
  font-weight: 600;
}

.metric-detail-item .material-symbols {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  font-size: 1rem;
  margin-top: 0.125rem;
}

/* Traffic Stats */
.traffic-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.traffic-stat-item {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.traffic-stat-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}

.traffic-stat-item.highlight {
  background: linear-gradient(135deg, rgba(98, 147, 255, 0.1) 0%, rgba(98, 147, 255, 0.05) 100%);
  border-color: rgba(98, 147, 255, 0.3);
}

[data-theme="light"] .traffic-stat-item {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .traffic-stat-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .traffic-stat-item.highlight {
  background: linear-gradient(135deg, rgba(98, 147, 255, 0.15) 0%, rgba(98, 147, 255, 0.08) 100%);
}

.traffic-stat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.traffic-stat-header .material-symbols {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.traffic-stat-label {
  font-size: 0.9rem;
  color: var(--muted-color);
  font-weight: 500;
}

.traffic-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--card-text);
  font-variant-numeric: tabular-nums;
}

/* Protocol Stats */
.protocol-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.protocol-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.protocol-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.protocol-badge {
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.protocol-badge.udp {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.protocol-badge.tcp {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.protocol-stat-count {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--card-text);
}

.protocol-stat-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
}

[data-theme="light"] .protocol-stat-bar {
  background: rgba(0, 0, 0, 0.08);
}

.protocol-stat-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s ease;
}

.protocol-stat-bar-fill.udp {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.protocol-stat-bar-fill.tcp {
  background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
}

/* Country List */
.country-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
}

.country-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.country-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}

[data-theme="light"] .country-item {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .country-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.country-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.country-item-flag {
  font-size: 1.5rem;
}

.country-item-name {
  font-weight: 600;
  color: var(--card-text);
}

.country-item-count {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Platform List */
.platform-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.platform-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.platform-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}

[data-theme="light"] .platform-item {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .platform-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.platform-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.platform-item-icon {
  font-size: 1.5rem;
}

.platform-item-name {
  font-weight: 600;
  color: var(--card-text);
}

.platform-item-count {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Sessions by Servers */
.sessions-by-servers {
  min-height: 200px;
}

.sessions-by-servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.server-session-item {
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.server-session-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .server-session-item {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .server-session-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.server-session-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.server-session-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.server-session-icon {
  font-size: 2rem;
  color: var(--primary);
  flex-shrink: 0;
}

.server-session-details {
  flex: 1;
  min-width: 0;
}

.server-session-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--card-text);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-session-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted-color);
  flex-wrap: wrap;
}

.server-session-country {
  padding: 0.15rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-size: 0.75rem;
}

[data-theme="light"] .server-session-country {
  background: rgba(0, 0, 0, 0.05);
}

.server-session-count {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  margin-left: 1rem;
}

.server-session-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.server-session-label {
  font-size: 0.75rem;
  color: var(--muted-color);
  margin-top: 0.25rem;
  text-transform: lowercase;
}

.server-session-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.75rem;
}

[data-theme="light"] .server-session-bar {
  background: rgba(0, 0, 0, 0.05);
}

.server-session-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
  transition: width 0.3s ease;
  min-width: 2px;
}

@media (max-width: 768px) {
  .sessions-by-servers-grid {
    grid-template-columns: 1fr;
  }
  
  .server-session-item {
    padding: 1rem;
  }
  
  .server-session-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .server-session-count {
    align-items: flex-start;
    margin-left: 0;
  }
  
  .server-session-number {
    font-size: 1.5rem;
  }
}

/* Notification Feed */
.notification-feed {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 350px;
  overflow-y: auto;
}

.notification-feed li {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.notification-feed li:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .notification-feed li {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .notification-feed li:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* System Info */
.system-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.system-info-item {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.system-info-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .system-info-item {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .system-info-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.system-info-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted-color);
  font-weight: 500;
}

.system-info-label .material-symbols {
  font-size: 1rem;
  color: var(--primary-color);
}

.system-info-value {
  font-size: 0.9rem;
  color: var(--card-text);
  font-weight: 600;
}

/* Settings Page */
.settings-section {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.settings-section:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .settings-section {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .settings-section:hover {
  background: rgba(0, 0, 0, 0.04);
}

.settings-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--glass-border);
}

.settings-section-header .material-symbols {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.settings-section-header h6 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--card-text);
}

/* IP List */
.ip-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  border: 1px solid var(--glass-border);
}

[data-theme="light"] .ip-list {
  background: rgba(0, 0, 0, 0.03);
}

.ip-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.ip-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

[data-theme="light"] .ip-item {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .ip-item:hover {
  background: rgba(0, 0, 0, 0.06);
}

.ip-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.ip-item-icon {
  font-size: 1.25rem;
  color: var(--primary-color);
  flex-shrink: 0;
}

.ip-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.ip-item-address {
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--card-text);
}

.ip-item-comment {
  font-size: 0.85rem;
  color: var(--muted-color);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ip-item-comment .material-symbols {
  font-size: 0.9rem;
}

.ip-item-remove {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: #ef4444;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ip-item-remove:hover {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.5);
}

.ip-item-remove .material-symbols {
  font-size: 1rem;
}

/* Form text helpers */
.form-text {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
}

/* Input group enhancements */
.input-group .btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.input-group .btn .material-symbols {
  font-size: 1.1rem;
}

/* Alert enhancements */
.alert {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="light"] .alert-info {
  background: rgba(59, 130, 246, 0.1);
  color: #1e40af;
}

.alert .material-symbols {
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Notifications Page */
.notification-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
}

[data-theme="light"] .notification-stats {
  background: rgba(0, 0, 0, 0.02);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  flex: 1;
  min-width: 150px;
  transition: all 0.2s ease;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

[data-theme="light"] .stat-item {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .stat-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.stat-item .material-symbols {
  font-size: 2rem;
  color: var(--primary-color);
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--card-text);
  font-variant-numeric: tabular-nums;
}

/* Notification List Items */
.notification-list-item {
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.notification-list-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.notification-list-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

.notification-list-item:hover::before {
  opacity: 1;
}

.notification-list-item.read {
  opacity: 0.6;
  background: rgba(255, 255, 255, 0.015);
}

.notification-list-item.read:hover {
  opacity: 0.8;
}

[data-theme="light"] .notification-list-item {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .notification-list-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .notification-list-item.read {
  background: rgba(0, 0, 0, 0.015);
}

.notification-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.notification-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(98, 147, 255, 0.15);
  flex-shrink: 0;
}

.notification-icon .material-symbols {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.notification-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--card-text);
  margin-bottom: 0.25rem;
}

.notification-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted-color);
}

.notification-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.notification-meta-item .material-symbols {
  font-size: 1rem;
}

.notification-badge {
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.notification-badge.unread {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.notification-badge.read {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.notification-message {
  font-size: 0.9rem;
  color: var(--text-color);
  line-height: 1.6;
  margin-top: 0.75rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.notification-changes {
  margin-top: 0.5rem;
  padding-left: 0.5rem;
  border-left: 2px solid var(--primary-color);
}

.notification-change-item {
  margin: 0.4rem 0;
  padding: 0.3rem 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

.change-field {
  font-weight: 600;
  color: var(--muted-color);
}

.change-old {
  color: var(--text-color);
  opacity: 0.7;
  text-decoration: line-through;
  margin-right: 0.3rem;
}

.change-arrow {
  color: var(--primary-color);
  margin: 0 0.3rem;
  font-weight: 600;
}

.change-new {
  color: var(--primary-color);
  font-weight: 500;
}

@media (max-width: 576px) {
  .notification-message {
    font-size: 0.85rem;
  }

  .notification-change-item {
    font-size: 0.8rem;
    margin: 0.3rem 0;
  }

  .notification-changes {
    padding-left: 0.4rem;
    margin-top: 0.4rem;
  }
}

.notification-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.notification-actions .btn {
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
}

/* Loading Skeleton */
.loading-skeleton {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.skeleton-item {
  height: 120px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

[data-theme="light"] .skeleton-item {
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.03) 0%,
    rgba(0, 0, 0, 0.08) 50%,
    rgba(0, 0, 0, 0.03) 100%
  );
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

