/* Poll Application Styles - Sneat Inspired */
:root {
  --bs-primary: #696cff;
  --bs-secondary: #8592a3;
  --bs-success: #71dd37;
  --bs-info: #03c3ec;
  --bs-warning: #ffb400;
  --bs-danger: #ff3e1d;
  --bs-light: #fcfdfd;
  --bs-dark: #233446;
  --bs-gray: #8592a3;
  --bs-gray-dark: #697a8d;
  --bs-primary-rgb: 105, 108, 255;
  --bs-secondary-rgb: 133, 146, 163;
  --bs-success-rgb: 113, 221, 55;
  --bs-info-rgb: 3, 195, 236;
  --bs-warning-rgb: 255, 180, 0;
  --bs-danger-rgb: 255, 62, 29;
  --bs-light-rgb: 252, 253, 253;
  --bs-dark-rgb: 35, 52, 70;
  
  /* Spacing variables for consistency */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;
  
  /* Border radius consistency */
  --border-radius-sm: 0.25rem;
  --border-radius: 0.375rem;
  --border-radius-lg: 0.5rem;
  --border-radius-xl: 1rem;
  
  /* Box shadow consistency */
  --box-shadow-sm: 0 0.125rem 0.25rem rgba(161, 172, 184, 0.4);
  --box-shadow: 0 0.25rem 0.5rem rgba(161, 172, 184, 0.4);
  --box-shadow-lg: 0 0.5rem 1rem rgba(161, 172, 184, 0.6);
}

/* Base Styles */
body {
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  background-color: #f5f5f9;
  color: #697a8d;
  line-height: 1.53;
  font-size: 0.9375rem;
}

/* Layout Styles */
.layout-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.layout-container {
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
}

.layout-page {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  overflow: hidden;
}

/* Menu Styles */
.layout-menu {
  width: 260px;
  background-color: #fff;
  box-shadow: var(--box-shadow-sm);
  transition: all 0.25s ease-in-out;
  z-index: 1001;
}

/* Search in sidebar styles */
.search-container {
  background-color: rgba(105, 108, 255, 0.04) !important;
  border-radius: var(--border-radius);
  margin: 0 0.75rem;
  padding: 0.5rem !important;
  cursor: default;
}

.search-container:hover {
  background-color: rgba(105, 108, 255, 0.06) !important;
  transform: none;
}

.search-container .form-control {
  background-color: transparent !important;
  color: #697a8d;
  font-size: 0.875rem;
}

.search-container .form-control:focus {
  background-color: transparent !important;
  border-color: transparent;
  box-shadow: none;
  color: var(--bs-primary);
}

.search-container .form-control::placeholder {
  color: #a1acb8;
  font-size: 0.875rem;
}

.search-container .bx-search {
  color: #a1acb8;
  font-size: 1rem;
}

/* Topic filter in sidebar styles */
.filter-container {
  background-color: rgba(105, 108, 255, 0.04) !important;
  border-radius: var(--border-radius);
  margin: 0 0.75rem;
  padding: 0.5rem !important;
  cursor: default;
}

.filter-container:hover {
  background-color: rgba(105, 108, 255, 0.06) !important;
  transform: none;
}

.filter-container .form-select {
  background-color: transparent !important;
  color: #697a8d;
  font-size: 0.875rem;
  border: none;
  box-shadow: none;
}

.filter-container .form-select:focus {
  background-color: transparent !important;
  border-color: transparent;
  box-shadow: none;
  color: var(--bs-primary);
}

.filter-container .bx-filter {
  color: #a1acb8;
  font-size: 1rem;
}

/* Poll names list styles */
.poll-names-container {
  margin: 0 0.75rem;
  padding: 0;
}

.poll-names-list {
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: var(--border-radius);
  background-color: rgba(105, 108, 255, 0.02);
  border: 1px solid rgba(105, 108, 255, 0.1);
}

.poll-names-list::-webkit-scrollbar {
  width: 4px;
}

.poll-names-list::-webkit-scrollbar-track {
  background: transparent;
}

.poll-names-list::-webkit-scrollbar-thumb {
  background: rgba(105, 108, 255, 0.2);
  border-radius: 2px;
}

.poll-names-list::-webkit-scrollbar-thumb:hover {
  background: rgba(105, 108, 255, 0.3);
}

.poll-name-item {
  display: block;
  padding: 0.5rem 0.75rem;
  color: #697a8d;
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.2;
  border-bottom: 1px solid rgba(105, 108, 255, 0.05);
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poll-name-item:last-child {
  border-bottom: none;
}

.poll-name-item:hover {
  background-color: rgba(105, 108, 255, 0.08);
  color: var(--bs-primary);
  text-decoration: none;
  padding-left: 1rem;
}

.poll-name-item.active {
  background-color: rgba(105, 108, 255, 0.1);
  color: var(--bs-primary);
  font-weight: 500;
}

/* Topic indicator styles */
.topic-indicator {
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.topic-color-dot {
  transition: all 0.2s ease-in-out;
}

.poll-name-item:hover .topic-color-dot {
  transform: scale(1.2);
  box-shadow: 0 0 0 2px rgba(105, 108, 255, 0.2);
}

.poll-title {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Empty state for poll names list */
.poll-names-empty {
  padding: 1rem 0.75rem;
  text-align: center;
  color: #a1acb8;
  font-size: 0.8125rem;
  font-style: italic;
}

/* Hide poll names list when empty */
.poll-names-list:empty {
  display: none;
}

/* User names list styles */
.user-names-container {
  margin: 0 0.75rem;
  padding: 0;
}

.user-names-list {
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: var(--border-radius);
  background-color: rgba(105, 108, 255, 0.02);
  border: 1px solid rgba(105, 108, 255, 0.1);
}

.user-names-list::-webkit-scrollbar {
  width: 4px;
}

.user-names-list::-webkit-scrollbar-track {
  background: transparent;
}

.user-names-list::-webkit-scrollbar-thumb {
  background: rgba(105, 108, 255, 0.2);
  border-radius: 2px;
}

.user-names-list::-webkit-scrollbar-thumb:hover {
  background: rgba(105, 108, 255, 0.3);
}

.user-name-item {
  display: block;
  padding: 0.5rem 0.75rem;
  color: #697a8d;
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.2;
  border-bottom: 1px solid rgba(105, 108, 255, 0.05);
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

.user-name-item:last-child {
  border-bottom: none;
}

.user-name-item:hover {
  background-color: rgba(105, 108, 255, 0.08);
  color: var(--bs-primary);
  text-decoration: none;
  padding-left: 1rem;
}

.user-name-item.active {
  background-color: rgba(105, 108, 255, 0.1);
  color: var(--bs-primary);
  font-weight: 500;
}

.user-name {
  font-weight: 500;
  color: #697a8d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-responses {
  font-size: 0.75rem;
  color: #a1acb8;
}

/* Empty state for user names list */
.user-names-empty {
  padding: 1rem 0.75rem;
  text-align: center;
  color: #a1acb8;
  font-size: 0.8125rem;
  font-style: italic;
}

/* Hide user names list when empty */
.user-names-list:empty {
  display: none;
}

.layout-menu-collapsed .layout-menu {
  width: 78px;
}

.app-brand {
  padding: var(--spacing-lg);
  display: flex;
  align-items: center;
  height: 70px;
  border-bottom: 1px solid #d9dee3;
}

.app-brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #697a8d;
}

.app-brand-text {
  color: #5d596c;
  font-size: 1.375rem;
  font-weight: 600;
}

.menu-inner {
  padding: 0;
  margin: 0;
  list-style: none;
}

.menu-item {
  position: relative;
}

.menu-link {
  display: flex;
  align-items: center;
  padding: 0.625rem var(--spacing-lg);
  color: #a1acb8;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  border-radius: var(--border-radius);
  margin: 0 0.75rem;
}

.menu-link:hover {
  color: var(--bs-primary);
  background-color: rgba(105, 108, 255, 0.04);
}

.menu-item.active > .menu-link {
  color: #fff;
  background-color: var(--bs-primary);
  box-shadow: 0 0.125rem 0.25rem 0 rgba(108, 255, 105, 0.4);
}

.menu-icon {
  margin-right: 0.75rem;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.menu-header {
  padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.menu-header-text {
  color: #a1acb8;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.menu-sub {
  display: none;
  padding-left: 0;
  margin: 0;
  list-style: none;
}

.menu-item.open > .menu-sub {
  display: block;
}

.menu-sub .menu-link {
  padding-left: 3.5rem;
  font-size: 0.9375rem;
}

/* Menu arrow styles */
.menu-arrow {
  margin-left: auto;
  font-size: 1rem;
  transition: transform 0.2s ease-in-out;
  color: #a1acb8;
}

.menu-item.open > .menu-link .menu-arrow {
  transform: rotate(90deg);
  color: var(--bs-primary);
}

.menu-link:hover .menu-arrow {
  color: var(--bs-primary);
}

.menu-item.active > .menu-link .menu-arrow {
  color: #fff;
}

/* Navbar Styles */
.layout-navbar {
  background-color: #fff;
  box-shadow: var(--box-shadow-sm);
  padding: 0 var(--spacing-lg);
  height: 70px;
  z-index: 1000;
}

.navbar-nav-right {
  margin-left: auto;
}

/* Content Styles */
.container-p-y {
  padding-top: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
}

/* Card Styles */
.card {
  background: #fff;
  border: 1px solid #d9dee3;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow-sm);
  margin-bottom: var(--spacing-lg);
  transition: all 0.15s ease-in-out;
}

.card:not(.dashboard-card):hover {
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-lg);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid #d9dee3;
  padding: var(--spacing-lg);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.card-body {
  padding: var(--spacing-lg);
}

.card-footer {
  background: transparent;
  border-top: 1px solid #d9dee3;
  padding: var(--spacing-lg);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.card-title {
  color: #5d596c;
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
  font-size: 1.125rem;
}

.card-subtitle {
  color: #a1acb8;
  font-size: 0.875rem;
  margin-bottom: var(--spacing-md);
}

/* Statistics Cards */
.stats-card {
  background: linear-gradient(135deg, var(--bs-primary) 0%, rgba(105, 108, 255, 0.8) 100%);
  color: #fff;
  border: none;
}

.stats-card .card-body {
  padding: 1.25rem;
}

.stats-number {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  line-height: 1.2;
}

.stats-label {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Avatar Styles */
.avatar {
  position: relative;
  display: inline-block;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0);
  border-radius: 50%;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-online:after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0.75rem;
  height: 0.75rem;
  background-color: var(--bs-success);
  border: 2px solid #fff;
  border-radius: 50%;
}

.avatar-sm {
  width: 32px;
  height: 32px;
}

/* Navbar Avatar - Pixel Perfect Sizing */
.navbar-dropdown .avatar {
  width: 40px;
  height: 40px;
}

.navbar-dropdown .avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* Dropdown Avatar Consistency */
.dropdown-menu .avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.dropdown-menu .avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* Dropdown menu item alignment */
.dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
}

.dropdown-item .d-flex {
  width: 100%;
  align-items: center;
}

/* Online status in dropdown */
.dropdown-menu .avatar-online:after {
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
}

/* Navbar User Dropdown Positioning */
.navbar-dropdown.dropdown-user {
  display: flex;
  align-items: center;
  height: 70px; /* Match navbar height */
}

.navbar-dropdown.dropdown-user .nav-link {
  display: flex;
  align-items: center;
  padding: 0;
  height: 40px;
  width: 40px;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s ease-in-out;
}

.navbar-dropdown.dropdown-user .nav-link:hover {
  background-color: rgba(105, 108, 255, 0.04);
  transform: scale(1.05);
}

/* Perfect alignment for navbar items */
.navbar-nav-right .navbar-nav {
  align-items: center;
}

.navbar-nav-right .nav-item {
  display: flex;
  align-items: center;
}

/* Online status indicator positioning */
.navbar-dropdown .avatar-online:after {
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
}

/* Button Styles */
.btn {
  display: inline-block;
  font-weight: 400;
  line-height: 1.53;
  color: #697a8d;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  border: 1px solid transparent;
  padding: 0.4375rem 1.25rem;
  font-size: 0.9375rem;
  border-radius: var(--border-radius);
  transition: all 0.15s ease-in-out;
}

.btn:hover {
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  color: #fff;
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.btn-primary:hover:not(:disabled) {
  color: #fff;
  background-color: rgba(105, 108, 255, 0.9);
  border-color: rgba(105, 108, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 0.25rem 0.5rem rgba(105, 108, 255, 0.4);
}

.btn-success {
  color: #fff;
  background-color: var(--bs-success);
  border-color: var(--bs-success);
}

.btn-success:hover:not(:disabled) {
  color: #fff;
  background-color: rgba(113, 221, 55, 0.9);
  border-color: rgba(113, 221, 55, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 0.25rem 0.5rem rgba(113, 221, 55, 0.4);
}

.btn-danger {
  color: #fff;
  background-color: var(--bs-danger);
  border-color: var(--bs-danger);
}

.btn-danger:hover:not(:disabled) {
  color: #fff;
  background-color: rgba(255, 62, 29, 0.9);
  border-color: rgba(255, 62, 29, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 0.25rem 0.5rem rgba(255, 62, 29, 0.4);
}

.btn-outline-primary {
  color: var(--bs-primary);
  border-color: var(--bs-primary);
  background-color: transparent;
}

.btn-outline-primary:hover:not(:disabled) {
  color: #fff;
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.btn-outline-secondary {
  color: var(--bs-secondary);
  border-color: var(--bs-secondary);
  background-color: transparent;
}

.btn-outline-secondary:hover:not(:disabled) {
  color: #fff;
  background-color: var(--bs-secondary);
  border-color: var(--bs-secondary);
}

.btn-outline-danger {
  color: var(--bs-danger);
  border-color: var(--bs-danger);
  background-color: transparent;
}

.btn-outline-danger:hover:not(:disabled) {
  color: #fff;
  background-color: var(--bs-danger);
  border-color: var(--bs-danger);
}

.btn-outline-success {
  color: var(--bs-success);
  border-color: var(--bs-success);
  background-color: transparent;
}

.btn-outline-success:hover:not(:disabled) {
  color: #fff;
  background-color: var(--bs-success);
  border-color: var(--bs-success);
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: var(--border-radius-sm);
}

.btn-lg {
  padding: 0.6875rem var(--spacing-lg);
  font-size: 1.0625rem;
  border-radius: var(--border-radius-lg);
}

/* Form Styles */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
  color: #5d596c;
  font-size: 0.9375rem;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.4375rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.53;
  color: #697a8d;
  background-color: #fff;
  background-image: none;
  border: 1px solid #d9dee3;
  border-radius: var(--border-radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  color: #697a8d;
  background-color: #fff;
  border-color: rgba(105, 108, 255, 0.4);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.25);
}

.form-control::placeholder {
  color: #a1acb8;
  opacity: 1;
}

.form-select {
  display: block;
  width: 100%;
  padding: 0.4375rem 2.25rem 0.4375rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.53;
  color: #697a8d;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23697a8d' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  border: 1px solid #d9dee3;
  border-radius: var(--border-radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-select:focus {
  border-color: rgba(105, 108, 255, 0.4);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.25);
}

.form-text {
  margin-top: var(--spacing-xs);
  font-size: 0.8125rem;
  color: #a1acb8;
}

/* Poll Specific Styles */
.option-card {
  transition: all 0.15s ease-in-out;
  border-color: #d9dee3 !important;
  cursor: pointer;
}

.option-card:hover {
  border-color: var(--bs-primary) !important;
  box-shadow: 0 0.125rem 0.25rem rgba(105, 108, 255, 0.4);
}

.form-check-input:checked + .form-check-label .option-card {
  border-color: var(--bs-primary) !important;
  background-color: rgba(105, 108, 255, 0.04);
}

/* Results Page Styles */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--bs-primary) 0%, rgba(105, 108, 255, 0.8) 100%) !important;
}

.progress-bar {
  transition: width 0.8s ease-in-out;
}

/* User List Container */
.user-list {
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: var(--spacing-xs);
  margin-right: calc(-1 * var(--spacing-xs));
}

.user-list::-webkit-scrollbar {
  width: 4px;
}

.user-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 2px;
}

.user-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 2px;
}

.user-list::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* User List Items */
.user-list-item {
  display: flex;
  align-items: center;
  padding: var(--spacing-xs) var(--spacing-sm);
  margin: 2px 0;
  border-radius: var(--border-radius-sm);
  transition: all 0.15s ease-in-out;
  min-width: 0;
  width: 100%;
}

.user-list-item:hover {
  background-color: rgba(105, 108, 255, 0.04);
  transform: translateX(2px);
}

.user-list-item .avatar-sm {
  flex-shrink: 0;
  margin-right: var(--spacing-sm);
}

.user-list-item .user-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* User Breakdown Panel */
.user-breakdown-panel {
  border: 2px solid #d9dee3;
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  transition: all 0.15s ease-in-out;
  height: 100%;
  min-height: 250px;
  overflow: hidden;
}

.user-breakdown-panel:hover {
  transform: translateY(-1px);
  box-shadow: var(--box-shadow);
}

.user-breakdown-panel.correct-answer {
  border-color: var(--bs-success);
  background-color: rgba(113, 221, 55, 0.02);
}

.user-breakdown-panel.correct-answer:hover {
  background-color: rgba(113, 221, 55, 0.04);
}

.user-breakdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid #e9ecef;
}

.user-breakdown-title {
  font-weight: 500;
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
}

.badge.bg-light {
  border: 1px solid #dee2e6;
}

/* Utility Classes */
.min-width-0 {
  min-width: 0;
}

.overflow-hidden {
  overflow: hidden;
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Prevent horizontal scrollbar in containers */
.no-horizontal-scroll {
  overflow-x: hidden;
}

.no-horizontal-scroll * {
  max-width: 100%;
  box-sizing: border-box;
}

/* Chart Styles */
.card canvas {
  max-height: 400px;
}

/* Chart Control Buttons */
.btn-group .btn-sm {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.btn-group .btn-sm:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.btn-group .btn-sm:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.btn-group .btn-sm:not(:first-child):not(:last-child) {
  border-radius: 0;
}

.card-header .btn-group {
  flex-shrink: 0;
}

.chart-loading {
  position: relative;
  overflow: hidden;
}

.chart-loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(105, 108, 255, 0.1),
    transparent
  );
  animation: shimmer 1.5s infinite;
  z-index: 1;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Responsive Design */
@media (max-width: 1399.98px) {
  .container-p-y {
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
  }
}

@media (max-width: 1199.98px) {
  .layout-menu {
    width: 78px;
  }
  
  .app-brand-text {
    display: none;
  }
  
  .menu-header-text {
    display: none;
  }
  
  .menu-sub .menu-link {
    padding-left: var(--spacing-lg);
  }
  
  /* Hide menu arrow in collapsed state */
  .menu-arrow {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .layout-menu {
    position: fixed;
    left: -260px;
    width: 260px;
    height: 100vh;
    z-index: 1002;
  }
  
  .layout-menu-expanded .layout-menu {
    left: 0;
  }
  
  .layout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
  }
  
  .layout-menu-expanded .layout-overlay {
    display: block;
  }
}

@media (max-width: 767.98px) {
  .card canvas {
    max-height: 300px;
  }
  
  .stats-number {
    font-size: 1.5rem;
  }
  
  .display-4 {
    font-size: 2rem;
  }
  
  .card-body {
    padding: var(--spacing-md);
  }
  
  .card-header {
    padding: var(--spacing-md);
  }
  
  .container-p-y {
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-md);
  }
  
  /* User breakdown responsive adjustments */
  .user-breakdown-panel {
    padding: var(--spacing-md);
    min-height: 200px;
  }
  
  .user-breakdown-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
  }
  
  .user-breakdown-title {
    font-size: 0.9rem;
  }
  
  .user-list {
    max-height: 150px;
  }
  
  .user-list-item {
    padding: var(--spacing-xs);
  }
  
  .user-name {
    font-size: 0.875rem;
  }
  
  /* Chart controls on mobile */
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }
  
  .card-header .btn-group {
    align-self: stretch;
  }
  
  .card-header .btn-group .btn-sm {
    flex: 1;
    font-size: 0.7rem;
  }
}

@media (max-width: 575.98px) {
  .btn {
    padding: 0.375rem var(--spacing-md);
    font-size: 0.875rem;
  }
  
  .btn-sm {
    padding: 0.25rem var(--spacing-sm);
    font-size: 0.75rem;
  }
  
  .stats-number {
    font-size: 1.25rem;
  }
}

/* Print Styles */
@media print {
  .btn, .dropdown, .layout-menu, .layout-navbar {
    display: none !important;
  }
  
  .layout-page {
    margin: 0 !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    break-inside: avoid;
  }
  
  .bg-gradient-primary {
    background: var(--bs-primary) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  .user-list {
    max-height: none !important;
    overflow: visible !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .card-title {
    font-size: 14pt;
    font-weight: bold;
  }
}

/* Stepper Styles */
.bs-stepper {
  background-color: transparent;
}

.bs-stepper-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg) 0;
  margin: 0 auto;
  max-width: 600px;
}

.step {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-trigger {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  cursor: default;
  transition: all 0.2s ease-in-out;
}

.step:not(.active) .step-trigger {
  opacity: 0.5;
}

.bs-stepper-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #d9dee3;
  color: #697a8d;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.3s ease-in-out;
  flex-shrink: 0;
}

.step.active .bs-stepper-circle {
  background-color: var(--bs-primary);
  color: #fff;
  box-shadow: 0 0.25rem 0.5rem rgba(105, 108, 255, 0.4);
  transform: scale(1.1);
}

.bs-stepper-label {
  display: flex;
  flex-direction: column;
  margin-left: 0.75rem;
  text-align: left;
}

.bs-stepper-title {
  font-weight: 500;
  font-size: 0.9375rem;
  color: #5d596c;
  margin-bottom: 0.125rem;
}

.bs-stepper-subtitle {
  font-size: 0.75rem;
  color: #a1acb8;
}

.step.active .bs-stepper-title {
  color: var(--bs-primary);
  font-weight: 600;
}

.step.active .bs-stepper-subtitle {
  color: var(--bs-primary);
  opacity: 0.8;
}

.line {
  flex: 1;
  height: 2px;
  background-color: #d9dee3;
  margin: 0 var(--spacing-md);
  position: relative;
  transition: all 0.3s ease-in-out;
}

.step.active ~ .line,
.step.active .line {
  background-color: var(--bs-primary);
}

.bs-stepper-content {
  padding-top: var(--spacing-lg);
}

.content {
  animation: fadeIn 0.3s ease-in-out;
}

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

/* Option number styling */
.option-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  font-weight: 600;
  color: var(--bs-primary);
  font-size: 0.9375rem;
}

/* Correct Answers Panel - Pixel Perfect Design */
.correct-answers-panel {
  background: #fff;
  border: 1px solid #d9dee3;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all 0.15s ease-in-out;
}

.correct-answers-panel:hover {
  border-color: rgba(113, 221, 55, 0.3);
  box-shadow: 0 0.125rem 0.25rem rgba(113, 221, 55, 0.15);
}

.correct-answers-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(113, 221, 55, 0.08) 0%, rgba(113, 221, 55, 0.04) 100%);
  border-bottom: 1px solid rgba(113, 221, 55, 0.15);
  font-size: 0.8125rem;
  color: #697a8d;
}

.correct-answers-header i {
  color: var(--bs-success);
  font-size: 1rem;
  flex-shrink: 0;
}

.correct-answers-list {
  padding: 0.75rem;
  min-height: 120px;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
}

.correct-answers-list::-webkit-scrollbar {
  width: 6px;
}

.correct-answers-list::-webkit-scrollbar-track {
  background: #f5f5f9;
  border-radius: 3px;
}

.correct-answers-list::-webkit-scrollbar-thumb {
  background: rgba(113, 221, 55, 0.3);
  border-radius: 3px;
}

.correct-answers-list::-webkit-scrollbar-thumb:hover {
  background: rgba(113, 221, 55, 0.5);
}

/* Empty State */
.correct-answers-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  text-align: center;
  color: #a1acb8;
}

.correct-answers-empty i {
  font-size: 2.5rem;
  color: #d9dee3;
  margin-bottom: 0.75rem;
  opacity: 0.7;
}

.correct-answers-empty p {
  margin: 0;
  font-size: 0.875rem;
  color: #a1acb8;
}

/* Custom Checkbox Styling */
.correct-answer-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border: 1px solid #d9dee3;
  border-radius: var(--border-radius);
  background: #fff;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  position: relative;
}

.correct-answer-item:last-child {
  margin-bottom: 0;
}

.correct-answer-item:hover {
  border-color: var(--bs-success);
  background: rgba(113, 221, 55, 0.02);
  transform: translateX(2px);
}

.correct-answer-item.checked {
  border-color: var(--bs-success);
  background: linear-gradient(135deg, rgba(113, 221, 55, 0.1) 0%, rgba(113, 221, 55, 0.05) 100%);
  box-shadow: 0 0.125rem 0.25rem rgba(113, 221, 55, 0.2);
}

.correct-answer-item.checked::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--bs-success);
  border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.correct-answer-checkbox {
  position: relative;
  width: 20px;
  height: 20px;
  margin-right: 0.75rem;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--bs-success);
}

.correct-answer-checkbox:checked {
  background-color: var(--bs-success);
  border-color: var(--bs-success);
}

.correct-answer-label {
  flex: 1;
  font-size: 0.9375rem;
  color: #697a8d;
  cursor: pointer;
  user-select: none;
  line-height: 1.4;
}

.correct-answer-item.checked .correct-answer-label {
  color: #5d596c;
  font-weight: 500;
}

.correct-answer-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(113, 221, 55, 0.15);
  color: var(--bs-success);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease-in-out;
}

.correct-answer-item.checked .correct-answer-badge {
  opacity: 1;
  transform: scale(1);
}

/* Badge styling */
.bg-label-success {
  background-color: rgba(113, 221, 55, 0.12);
  color: var(--bs-success);
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.bg-label-secondary {
  background-color: rgba(133, 146, 163, 0.12);
  color: var(--bs-secondary);
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.bg-label-danger {
  background-color: rgba(255, 62, 29, 0.12);
  color: var(--bs-danger);
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Responsive stepper */
@media (max-width: 767.98px) {
  .bs-stepper-header {
    padding: var(--spacing-md) 0;
  }
  
  .bs-stepper-circle {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }
  
  .bs-stepper-label {
    display: none;
  }
  
  .line {
    margin: 0 var(--spacing-sm);
  }
  
  .step.active .bs-stepper-circle {
    transform: scale(1.05);
  }
}

@media (max-width: 575.98px) {
  .bs-stepper-circle {
    width: 28px;
    height: 28px;
    font-size: 0.8125rem;
  }
  
  .option-number {
    min-width: 20px;
    font-size: 0.875rem;
  }
}

/* Dashboard Hero Section */
.dashboard-hero {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(105, 108, 255, 0.08);
  margin-bottom: 2.5rem !important;
}

.dashboard-hero .display-6 {
  font-size: 2rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.dashboard-hero .lead {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.6;
  color: #697a8d;
}

/* Dashboard Cards */
.dashboard-cards {
  margin-bottom: 3rem;
}

.dashboard-card {
  background: #fff;
  border: 1px solid #e7e9ed;
  border-radius: 0.75rem;
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.dashboard-cards .col-lg-4:nth-child(1) .dashboard-card {
  animation-delay: 0.1s;
}

.dashboard-cards .col-lg-4:nth-child(2) .dashboard-card {
  animation-delay: 0.2s;
}

.dashboard-cards .col-lg-4:nth-child(3) .dashboard-card {
  animation-delay: 0.3s;
}

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

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--bs-primary), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(105, 108, 255, 0.12);
  border-color: rgba(105, 108, 255, 0.2);
}

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

/* Dashboard Card Icon */
.dashboard-card-icon-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  position: relative;
  transition: all 0.3s ease;
}

.dashboard-card-icon-wrapper i {
  font-size: 2rem;
  color: #fff;
  position: relative;
  z-index: 1;
}

.dashboard-card-icon-wrapper.primary {
  background: linear-gradient(135deg, #696cff 0%, #5f63f2 100%);
  box-shadow: 0 4px 16px rgba(105, 108, 255, 0.25);
}

.dashboard-card-icon-wrapper.warning {
  background: linear-gradient(135deg, #ffb400 0%, #ff9f00 100%);
  box-shadow: 0 4px 16px rgba(255, 180, 0, 0.25);
}

.dashboard-card-icon-wrapper.info {
  background: linear-gradient(135deg, #03c3ec 0%, #00b4d8 100%);
  box-shadow: 0 4px 16px rgba(3, 195, 236, 0.25);
}

.dashboard-card:hover .dashboard-card-icon-wrapper {
  transform: scale(1.05) rotate(3deg);
}

.dashboard-card:hover .dashboard-card-icon-wrapper.primary {
  box-shadow: 0 6px 24px rgba(105, 108, 255, 0.35);
}

.dashboard-card:hover .dashboard-card-icon-wrapper.warning {
  box-shadow: 0 6px 24px rgba(255, 180, 0, 0.35);
}

.dashboard-card:hover .dashboard-card-icon-wrapper.info {
  box-shadow: 0 6px 24px rgba(3, 195, 236, 0.35);
}

/* Dashboard Card Title */
.dashboard-card-title {
  font-size: 1.375rem;
  font-weight: 600;
  color: #5d596c;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Dashboard Card Description */
.dashboard-card-description {
  font-size: 0.9375rem;
  color: #697a8d;
  line-height: 1.65;
  margin-bottom: 1.5rem;
  flex-grow: 0;
}

/* Dashboard Card Features */
.dashboard-card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem 0;
  flex-grow: 1;
}

.dashboard-card-features li {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: #697a8d;
  line-height: 1.4;
}

.dashboard-card-features li i {
  font-size: 1.125rem;
  margin-right: 0.625rem;
  color: var(--bs-success);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.dashboard-card:hover .dashboard-card-features li i {
  transform: scale(1.1);
}

.dashboard-card-features li span {
  flex: 1;
}

/* Dashboard Card Action */
.dashboard-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid #e7e9ed;
  margin-top: auto;
  transition: all 0.3s ease;
}

.dashboard-card-action-text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--bs-primary);
  transition: all 0.3s ease;
}

.dashboard-card-action-icon {
  font-size: 1.5rem;
  color: var(--bs-primary);
  transition: all 0.3s ease;
}

.dashboard-card:hover .dashboard-card-action {
  border-top-color: rgba(105, 108, 255, 0.2);
}

.dashboard-card:hover .dashboard-card-action-text {
  color: #5f63f2;
}

.dashboard-card:hover .dashboard-card-action-icon {
  transform: translateX(4px);
  color: #5f63f2;
}

/* Dashboard Tips Card */
.dashboard-tips-card {
  background: linear-gradient(135deg, rgba(105, 108, 255, 0.05) 0%, rgba(105, 108, 255, 0.02) 100%);
  border: 1px solid rgba(105, 108, 255, 0.1);
  border-radius: 0.75rem;
  padding: 2rem;
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease 0.4s forwards;
  opacity: 0;
}

.dashboard-tips-card:hover {
  background: linear-gradient(135deg, rgba(105, 108, 255, 0.08) 0%, rgba(105, 108, 255, 0.03) 100%);
  border-color: rgba(105, 108, 255, 0.2);
  box-shadow: 0 4px 16px rgba(105, 108, 255, 0.08);
}

.dashboard-tips-icon {
  width: 56px;
  height: 56px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #696cff 0%, #5f63f2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(105, 108, 255, 0.25);
}

.dashboard-tips-icon i {
  font-size: 1.75rem;
  color: #fff;
}

.dashboard-tips-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #5d596c;
  margin-bottom: 1.25rem;
}

.dashboard-tip-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.dashboard-tip-item i {
  font-size: 1.25rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.dashboard-tip-item p {
  font-size: 0.875rem;
  color: #697a8d;
  line-height: 1.5;
}

.dashboard-tip-item strong {
  color: #5d596c;
  font-weight: 600;
}

/* Responsive Dashboard Styles */
@media (max-width: 991.98px) {
  .dashboard-hero .display-6 {
    font-size: 1.75rem;
  }
  
  .dashboard-hero .lead {
    font-size: 1rem;
  }
  
  .dashboard-card {
    padding: 1.5rem;
  }
  
  .dashboard-card-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 767.98px) {
  .dashboard-hero {
    padding: 1.5rem 0;
    margin-bottom: 2rem !important;
  }
  
  .dashboard-hero .display-6 {
    font-size: 1.5rem;
  }
  
  .dashboard-hero .lead {
    font-size: 0.9375rem;
  }
  
  .dashboard-card {
    padding: 1.25rem;
  }
  
  .dashboard-card-icon-wrapper {
    width: 64px;
    height: 64px;
  }
  
  .dashboard-card-icon-wrapper i {
    font-size: 1.75rem;
  }
  
  .dashboard-card-title {
    font-size: 1.125rem;
  }
  
  .dashboard-card-description {
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
  }
  
  .dashboard-card-features li {
    font-size: 0.8125rem;
    padding: 0.375rem 0;
  }
  
  .dashboard-tips-card {
    padding: 1.5rem;
  }
  
  .dashboard-tips-icon {
    width: 48px;
    height: 48px;
    margin-right: 1rem;
  }
  
  .dashboard-tips-icon i {
    font-size: 1.5rem;
  }
  
  .dashboard-tips-title {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .dashboard-tip-item {
    margin-bottom: 1rem;
  }
  
  .dashboard-tip-item:last-child {
    margin-bottom: 0;
  }
}

/* Polls Page Styles */
.polls-hero {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(105, 108, 255, 0.08);
  margin-bottom: 2.5rem !important;
}

.polls-hero .display-6 {
  font-size: 2rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.polls-hero .lead {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.6;
  color: #697a8d;
}

/* Polls Statistics Cards */
.polls-stats-cards {
  margin-bottom: 3rem;
}

.polls-stat-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e7e9ed;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.polls-stats-cards .col-lg-3:nth-child(1) .polls-stat-card {
  animation-delay: 0.1s;
}

.polls-stats-cards .col-lg-3:nth-child(2) .polls-stat-card {
  animation-delay: 0.2s;
}

.polls-stats-cards .col-lg-3:nth-child(3) .polls-stat-card {
  animation-delay: 0.3s;
}

.polls-stats-cards .col-lg-3:nth-child(4) .polls-stat-card {
  animation-delay: 0.4s;
}

.polls-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.polls-stat-card.primary::before {
  background: linear-gradient(90deg, transparent, var(--bs-primary), transparent);
}

.polls-stat-card.success::before {
  background: linear-gradient(90deg, transparent, var(--bs-success), transparent);
}

.polls-stat-card.warning::before {
  background: linear-gradient(90deg, transparent, var(--bs-warning), transparent);
}

.polls-stat-card.info::before {
  background: linear-gradient(90deg, transparent, var(--bs-info), transparent);
}

.polls-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(105, 108, 255, 0.12);
}

.polls-stat-card:hover::before {
  opacity: 1;
}

.polls-stat-icon {
  width: 64px;
  height: 64px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
  color: #fff;
  font-size: 1.75rem;
}

.polls-stat-card.primary .polls-stat-icon {
  background: linear-gradient(135deg, #696cff 0%, #5f63f2 100%);
  box-shadow: 0 4px 12px rgba(105, 108, 255, 0.25);
}

.polls-stat-card.success .polls-stat-icon {
  background: linear-gradient(135deg, #71dd37 0%, #67cc2f 100%);
  box-shadow: 0 4px 12px rgba(113, 221, 55, 0.25);
}

.polls-stat-card.warning .polls-stat-icon {
  background: linear-gradient(135deg, #ffb400 0%, #ff9f00 100%);
  box-shadow: 0 4px 12px rgba(255, 180, 0, 0.25);
}

.polls-stat-card.info .polls-stat-icon {
  background: linear-gradient(135deg, #03c3ec 0%, #00b4d8 100%);
  box-shadow: 0 4px 12px rgba(3, 195, 236, 0.25);
}

.polls-stat-card:hover .polls-stat-icon {
  transform: scale(1.05) rotate(-3deg);
}

.polls-stat-card.primary:hover .polls-stat-icon {
  box-shadow: 0 6px 20px rgba(105, 108, 255, 0.35);
}

.polls-stat-card.success:hover .polls-stat-icon {
  box-shadow: 0 6px 20px rgba(113, 221, 55, 0.35);
}

.polls-stat-card.warning:hover .polls-stat-icon {
  box-shadow: 0 6px 20px rgba(255, 180, 0, 0.35);
}

.polls-stat-card.info:hover .polls-stat-icon {
  box-shadow: 0 6px 20px rgba(3, 195, 236, 0.35);
}

.polls-stat-content {
  flex: 1;
  min-width: 0;
}

.polls-stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #5d596c;
  line-height: 1.2;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.polls-stat-label {
  font-size: 0.9375rem;
  color: #697a8d;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Polls Management Card */
.polls-management-card {
  background: #fff;
  border: 1px solid #e7e9ed;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(161, 172, 184, 0.15);
  animation: fadeInUp 0.6s ease 0.5s forwards;
  opacity: 0;
}

.polls-management-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, rgba(105, 108, 255, 0.03) 0%, rgba(105, 108, 255, 0.01) 100%);
  border-bottom: 1px solid #e7e9ed;
  flex-wrap: wrap;
  gap: 1rem;
}

.polls-management-title {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: #5d596c;
  letter-spacing: -0.01em;
}

.polls-management-title i {
  font-size: 1.5rem;
  color: var(--bs-primary);
}

.polls-filter-buttons {
  display: flex;
  gap: 0.5rem;
  background: rgba(105, 108, 255, 0.05);
  padding: 0.375rem;
  border-radius: 0.5rem;
}

.polls-filter-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border: none;
  background: transparent;
  color: #697a8d;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.polls-filter-btn i {
  font-size: 1.125rem;
}

.polls-filter-btn:hover {
  color: var(--bs-primary);
  background: rgba(105, 108, 255, 0.08);
}

.polls-filter-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #696cff 0%, #5f63f2 100%);
  box-shadow: 0 2px 8px rgba(105, 108, 255, 0.3);
}

.polls-management-body {
  padding: 2rem;
  min-height: 300px;
}

/* Responsive Polls Page Styles */
@media (max-width: 991.98px) {
  .polls-hero .display-6 {
    font-size: 1.75rem;
  }
  
  .polls-hero .lead {
    font-size: 1rem;
  }
  
  .polls-stat-card {
    padding: 1.5rem;
  }
  
  .polls-stat-icon {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }
  
  .polls-stat-number {
    font-size: 1.75rem;
  }
  
  .polls-management-header {
    padding: 1.25rem 1.5rem;
  }
  
  .polls-management-body {
    padding: 1.5rem;
  }
}

@media (max-width: 767.98px) {
  .polls-hero {
    padding: 1.5rem 0;
    margin-bottom: 2rem !important;
  }
  
  .polls-hero .display-6 {
    font-size: 1.5rem;
  }
  
  .polls-hero .lead {
    font-size: 0.9375rem;
  }
  
  .polls-stat-card {
    padding: 1.25rem;
  }
  
  .polls-stat-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }
  
  .polls-stat-number {
    font-size: 1.5rem;
  }
  
  .polls-stat-label {
    font-size: 0.875rem;
  }
  
  .polls-management-header {
    padding: 1.25rem;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .polls-filter-buttons {
    width: 100%;
  }
  
  .polls-filter-btn {
    flex: 1;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  .polls-management-body {
    padding: 1.25rem;
  }
}

/* Channels Page Styles */
.channels-hero {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(105, 108, 255, 0.08);
  margin-bottom: 2.5rem !important;
}

.channels-hero .display-6 {
  font-size: 2rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.channels-hero .lead {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.6;
  color: #697a8d;
}

/* Channels Statistics Cards */
.channels-stats-cards {
  margin-bottom: 3rem;
}

.channels-stat-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e7e9ed;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.channels-stats-cards .col-lg-3:nth-child(1) .channels-stat-card {
  animation-delay: 0.1s;
}

.channels-stats-cards .col-lg-3:nth-child(2) .channels-stat-card {
  animation-delay: 0.2s;
}

.channels-stats-cards .col-lg-3:nth-child(3) .channels-stat-card {
  animation-delay: 0.3s;
}

.channels-stats-cards .col-lg-3:nth-child(4) .channels-stat-card {
  animation-delay: 0.4s;
}

.channels-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.channels-stat-card.primary::before {
  background: linear-gradient(90deg, transparent, var(--bs-primary), transparent);
}

.channels-stat-card.success::before {
  background: linear-gradient(90deg, transparent, var(--bs-success), transparent);
}

.channels-stat-card.warning::before {
  background: linear-gradient(90deg, transparent, var(--bs-warning), transparent);
}

.channels-stat-card.info::before {
  background: linear-gradient(90deg, transparent, var(--bs-info), transparent);
}

.channels-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(105, 108, 255, 0.12);
}

.channels-stat-card:hover::before {
  opacity: 1;
}

.channels-stat-icon {
  width: 64px;
  height: 64px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
  color: #fff;
  font-size: 1.75rem;
}

.channels-stat-card.primary .channels-stat-icon {
  background: linear-gradient(135deg, #696cff 0%, #5f63f2 100%);
  box-shadow: 0 4px 12px rgba(105, 108, 255, 0.25);
}

.channels-stat-card.success .channels-stat-icon {
  background: linear-gradient(135deg, #71dd37 0%, #67cc2f 100%);
  box-shadow: 0 4px 12px rgba(113, 221, 55, 0.25);
}

.channels-stat-card.warning .channels-stat-icon {
  background: linear-gradient(135deg, #ffb400 0%, #ff9f00 100%);
  box-shadow: 0 4px 12px rgba(255, 180, 0, 0.25);
}

.channels-stat-card.info .channels-stat-icon {
  background: linear-gradient(135deg, #03c3ec 0%, #00b4d8 100%);
  box-shadow: 0 4px 12px rgba(3, 195, 236, 0.25);
}

.channels-stat-card:hover .channels-stat-icon {
  transform: scale(1.05) rotate(-3deg);
}

.channels-stat-content {
  flex: 1;
  min-width: 0;
}

.channels-stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #5d596c;
  line-height: 1.2;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.channels-stat-label {
  font-size: 0.9375rem;
  color: #697a8d;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Channels List Card */
.channels-list-card {
  background: #fff;
  border: 1px solid #e7e9ed;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(161, 172, 184, 0.15);
  animation: fadeInUp 0.6s ease 0.5s forwards;
  opacity: 0;
}

.channels-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, rgba(3, 195, 236, 0.03) 0%, rgba(3, 195, 236, 0.01) 100%);
  border-bottom: 1px solid #e7e9ed;
  flex-wrap: wrap;
  gap: 1rem;
}

.channels-list-title {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: #5d596c;
  letter-spacing: -0.01em;
}

.channels-list-title i {
  font-size: 1.5rem;
  color: var(--bs-info);
}

.channels-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(3, 195, 236, 0.1);
  color: var(--bs-info);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.channels-list-body {
  padding: 2rem;
}

/* Channels Grid */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.channel-card {
  background: #fff;
  border: 1px solid #e7e9ed;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  overflow: hidden;
}

.channel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(3, 195, 236, 0.15);
  border-color: rgba(3, 195, 236, 0.3);
}

.channel-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(3, 195, 236, 0.03) 0%, rgba(3, 195, 236, 0.01) 100%);
  border-bottom: 1px solid #e7e9ed;
}

.channel-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, var(--bs-info) 0%, #00b4d8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(3, 195, 236, 0.25);
}

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

.channel-card-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #5d596c;
  margin: 0 0 0.25rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-card-id {
  font-size: 0.8125rem;
  color: #a1acb8;
  margin: 0;
}

.channel-card-status {
  flex-shrink: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.status-badge.active {
  background: rgba(113, 221, 55, 0.12);
  color: var(--bs-success);
}

.status-badge.inactive {
  background: rgba(255, 62, 29, 0.12);
  color: var(--bs-danger);
}

.channel-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.channel-card-detail {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.channel-card-detail i {
  font-size: 1.125rem;
  color: var(--bs-info);
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.channel-card-detail > div {
  flex: 1;
  min-width: 0;
}

.detail-label {
  display: block;
  font-size: 0.75rem;
  color: #a1acb8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.detail-value {
  display: block;
  font-size: 0.9375rem;
  color: #5d596c;
  font-weight: 500;
}

.channel-card-footer {
  padding: 1rem 1.5rem;
  background: rgba(3, 195, 236, 0.02);
  border-top: 1px solid #e7e9ed;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-channel-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  flex: 1;
  min-width: 110px;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--bs-success) 0%, #67cc2f 100%);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(113, 221, 55, 0.25);
}

.btn-channel-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(113, 221, 55, 0.35);
}

.btn-channel-action i {
  font-size: 1rem;
}

.btn-channel-action-secondary {
  background: linear-gradient(135deg, var(--bs-primary) 0%, #5a5deb 100%);
  box-shadow: 0 2px 8px rgba(105, 108, 255, 0.25);
}

.btn-channel-action-secondary:hover {
  box-shadow: 0 4px 12px rgba(105, 108, 255, 0.35);
}

.btn-channel-action-danger {
  background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%);
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.25);
}

.btn-channel-action-danger:hover {
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.35);
  background: linear-gradient(135deg, #ff3838 0%, #ee2222 100%);
}

/* Scheduler status indicator - Minimalistic pixel-perfect design */
.scheduler-status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 8px;
  flex-shrink: 0;
}

/* Active scheduler - Success green */
.scheduler-status-indicator.active {
  background-color: #71dd37;
}

/* Inactive scheduler - Danger red */
.scheduler-status-indicator.inactive {
  background-color: #ff3e1d;
}

/* No scheduler - Neutral gray */
.scheduler-status-indicator.none {
  background-color: #8592a3;
}

/* Draggable poll items */
.poll-item {
  background: #fff;
  border: 1px solid #e7e9ed;
  border-radius: 0.375rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  cursor: move;
  transition: all 0.2s ease;
  position: relative;
}

.poll-item:hover {
  border-color: #696cff;
  box-shadow: 0 2px 4px rgba(105, 108, 255, 0.1);
}

.poll-item.drag-over {
  border-color: #696cff;
  border-style: dashed;
  background-color: rgba(105, 108, 255, 0.05);
}

.drag-handle {
  color: #8592a3;
  cursor: grab;
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  margin-right: 0.5rem;
}

.drag-handle:active {
  cursor: grabbing;
}

.poll-order-badge {
  display: inline-block;
  background: #696cff;
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

/* Empty State */
.channels-empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(3, 195, 236, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.empty-state-icon i {
  font-size: 2.5rem;
  color: var(--bs-info);
}

.empty-state-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #5d596c;
  margin-bottom: 0.75rem;
}

.empty-state-description {
  font-size: 1rem;
  color: #697a8d;
  margin-bottom: 2rem;
}

/* Responsive Channels Page Styles */
@media (max-width: 991.98px) {
  .channels-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 767.98px) {
  .channels-hero {
    padding: 1.5rem 0;
    margin-bottom: 2rem !important;
  }
  
  .channels-hero .display-6 {
    font-size: 1.5rem;
  }
  
  .channels-hero .lead {
    font-size: 0.9375rem;
  }
  
  .channels-stat-card {
    padding: 1.25rem;
  }
  
  .channels-stat-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }
  
  .channels-stat-number {
    font-size: 1.5rem;
  }
  
  .channels-list-header {
    padding: 1.25rem;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .channels-list-body {
    padding: 1.25rem;
  }
  
  .channels-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .channel-card-header {
    padding: 1.25rem;
  }
  
  .channel-card-body {
    padding: 1.25rem;
  }
}

/* Post Poll Modal Styles */
.post-poll-modal {
  border-radius: 1rem;
  overflow: hidden;
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.post-poll-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(113, 221, 55, 0.08) 0%, rgba(113, 221, 55, 0.03) 100%);
  border-bottom: 1px solid #e7e9ed;
}

.post-poll-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--bs-success) 0%, #67cc2f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.75rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(113, 221, 55, 0.3);
}

.post-poll-modal-title-wrapper {
  flex: 1;
  min-width: 0;
}

.post-poll-modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #5d596c;
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.01em;
}

.post-poll-modal-subtitle {
  font-size: 0.9375rem;
  color: #697a8d;
  margin: 0;
}

.btn-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #697a8d;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-modal-close:hover {
  background: rgba(255, 62, 29, 0.1);
  color: var(--bs-danger);
  transform: rotate(90deg);
}

.post-poll-modal-body {
  padding: 2rem;
}

.post-poll-channel-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(3, 195, 236, 0.08) 0%, rgba(3, 195, 236, 0.03) 100%);
  border: 1px solid rgba(3, 195, 236, 0.2);
  border-radius: 0.75rem;
  margin-bottom: 2rem;
}

.post-poll-channel-info i {
  font-size: 1.75rem;
  color: var(--bs-info);
  flex-shrink: 0;
}

.post-poll-channel-info > div {
  flex: 1;
  min-width: 0;
}

.channel-info-label {
  display: block;
  font-size: 0.75rem;
  color: #a1acb8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.channel-info-name {
  display: block;
  font-size: 1.125rem;
  color: #5d596c;
  font-weight: 600;
}

.post-poll-section {
  margin-top: 1.5rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #5d596c;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.section-title i {
  color: var(--bs-primary);
}

.polls-loading-state {
  text-align: center;
  padding: 3rem 2rem;
}

.spinner-wrapper {
  margin-bottom: 1rem;
}

.loading-text {
  font-size: 0.9375rem;
  color: #697a8d;
  margin: 0;
}

.polls-selection-list {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.polls-selection-list::-webkit-scrollbar {
  width: 6px;
}

.polls-selection-list::-webkit-scrollbar-track {
  background: #f5f5f9;
  border-radius: 3px;
}

.polls-selection-list::-webkit-scrollbar-thumb {
  background: rgba(105, 108, 255, 0.3);
  border-radius: 3px;
}

.polls-selection-list::-webkit-scrollbar-thumb:hover {
  background: rgba(105, 108, 255, 0.5);
}

/* Poll Item in Modal */
.polls-selection-list .list-group-item {
  border: 1px solid #e7e9ed;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fff;
}

.polls-selection-list .list-group-item:hover {
  border-color: var(--bs-success);
  background: rgba(113, 221, 55, 0.04);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(113, 221, 55, 0.15);
}

.polls-selection-list .list-group-item:active {
  transform: scale(0.98);
}

.polls-error-state {
  text-align: center;
  padding: 3rem 2rem;
}

.error-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 62, 29, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.error-icon i {
  font-size: 2rem;
  color: var(--bs-danger);
}

.error-message {
  font-size: 1rem;
  color: #697a8d;
  margin: 0;
}

.post-poll-modal-footer {
  padding: 1.5rem 2rem;
  background: #f9fafb;
  border-top: 1px solid #e7e9ed;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Channel Details Modal Styles */
.channel-details-modal {
  border-radius: 1rem;
  overflow: hidden;
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.channel-details-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(3, 195, 236, 0.08) 0%, rgba(3, 195, 236, 0.03) 100%);
  border-bottom: 1px solid #e7e9ed;
}

.channel-details-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--bs-info) 0%, #00b4d8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.75rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(3, 195, 236, 0.3);
}

.channel-details-modal-title-wrapper {
  flex: 1;
  min-width: 0;
}

.channel-details-modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #5d596c;
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.01em;
}

.channel-details-modal-subtitle {
  font-size: 0.9375rem;
  color: #697a8d;
  margin: 0;
}

.channel-details-modal-body {
  padding: 2rem;
  min-height: 200px;
}

.channel-details-modal-footer {
  padding: 1.5rem 2rem;
  background: #f9fafb;
  border-top: 1px solid #e7e9ed;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Modal Backdrop */
.modal-backdrop.show {
  opacity: 0.6;
}

/* Responsive Modal Styles */
@media (max-width: 767.98px) {
  .post-poll-modal-header,
  .channel-details-modal-header {
    padding: 1.5rem;
    flex-wrap: wrap;
  }
  
  .post-poll-modal-icon,
  .channel-details-modal-icon {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
  
  .post-poll-modal-title,
  .channel-details-modal-title {
    font-size: 1.25rem;
  }
  
  .post-poll-modal-subtitle,
  .channel-details-modal-subtitle {
    font-size: 0.875rem;
  }
  
  .post-poll-modal-body,
  .channel-details-modal-body {
    padding: 1.5rem;
  }
  
  .post-poll-channel-info {
    padding: 1rem;
  }
  
  .polls-selection-list {
    max-height: 300px;
  }
  
  .post-poll-modal-footer,
  .channel-details-modal-footer {
    padding: 1rem 1.5rem;
    flex-direction: column;
  }
  
  .post-poll-modal-footer .btn,
  .channel-details-modal-footer .btn {
    width: 100%;
  }
}

/* Analytics Page Styles */
.analytics-hero {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(105, 108, 255, 0.08);
  margin-bottom: 2.5rem !important;
}

.analytics-hero .display-6 {
  font-size: 2rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.analytics-hero .lead {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.6;
  color: #697a8d;
}

/* Analytics Filters */
.analytics-filters {
  margin-bottom: 3rem;
}

.analytics-filter-card {
  background: #fff;
  border: 1px solid #e7e9ed;
  border-radius: 0.75rem;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.analytics-filters .col-lg-4:nth-child(1) .analytics-filter-card {
  animation-delay: 0.1s;
}

.analytics-filters .col-lg-4:nth-child(2) .analytics-filter-card {
  animation-delay: 0.2s;
}

.analytics-filters .col-lg-4:nth-child(3) .analytics-filter-card {
  animation-delay: 0.3s;
}

.analytics-filter-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(105, 108, 255, 0.12);
  border-color: rgba(105, 108, 255, 0.2);
}

.filter-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--bs-primary) 0%, #5f63f2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.75rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(105, 108, 255, 0.25);
  transition: all 0.3s ease;
}

.filter-card-icon.user {
  background: linear-gradient(135deg, var(--bs-warning) 0%, #ff9f00 100%);
  box-shadow: 0 4px 12px rgba(255, 180, 0, 0.25);
}

.analytics-filter-card:hover .filter-card-icon {
  transform: scale(1.05) rotate(-3deg);
}

.filter-card-content {
  flex: 1;
  min-width: 0;
}

.filter-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #5d596c;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.filter-select {
  border: 1px solid #d9dee3;
  border-radius: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  color: #697a8d;
  transition: all 0.2s ease;
  background-color: #fff;
}

.filter-select:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.1);
  outline: none;
}

/* Clear Filters Button */
.analytics-filter-card.action {
  padding: 0;
  overflow: hidden;
}

.btn-clear-filters {
  width: 100%;
  height: 100%;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, rgba(133, 146, 163, 0.08) 0%, rgba(133, 146, 163, 0.03) 100%);
  border: none;
  color: #697a8d;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-clear-filters i {
  font-size: 2rem;
  transition: transform 0.3s ease;
}

.btn-clear-filters:hover {
  background: linear-gradient(135deg, rgba(255, 62, 29, 0.12) 0%, rgba(255, 62, 29, 0.06) 100%);
  color: var(--bs-danger);
}

.btn-clear-filters:hover i {
  transform: rotate(180deg);
}

/* Analytics Section Cards */
.analytics-section-card {
  background: #fff;
  border: 1px solid #e7e9ed;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(161, 172, 184, 0.15);
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.analytics-section-card.department {
  animation-delay: 0.4s;
}

.analytics-section-card.weak-spots {
  animation-delay: 0.5s;
}

.analytics-section-card.users {
  animation-delay: 0.6s;
}

.analytics-section-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.75rem 2rem;
  background: linear-gradient(135deg, rgba(105, 108, 255, 0.08) 0%, rgba(105, 108, 255, 0.03) 100%);
  border-bottom: 1px solid #e7e9ed;
}

.analytics-section-header.danger {
  background: linear-gradient(135deg, rgba(255, 62, 29, 0.08) 0%, rgba(255, 62, 29, 0.03) 100%);
}

.analytics-section-header.success {
  background: linear-gradient(135deg, rgba(113, 221, 55, 0.08) 0%, rgba(113, 221, 55, 0.03) 100%);
}

.section-header-icon {
  width: 56px;
  height: 56px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--bs-primary) 0%, #5f63f2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.75rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(105, 108, 255, 0.3);
}

.analytics-section-header.danger .section-header-icon {
  background: linear-gradient(135deg, var(--bs-danger) 0%, #e63919 100%);
  box-shadow: 0 4px 12px rgba(255, 62, 29, 0.3);
}

.analytics-section-header.success .section-header-icon {
  background: linear-gradient(135deg, var(--bs-success) 0%, #67cc2f 100%);
  box-shadow: 0 4px 12px rgba(113, 221, 55, 0.3);
}

.section-header-content {
  flex: 1;
  min-width: 0;
}

.section-title {
  font-size: 1.375rem;
  font-weight: 600;
  color: #5d596c;
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 0.9375rem;
  color: #697a8d;
  margin: 0;
}

.analytics-section-body {
  padding: 2rem;
  min-height: 200px;
}

/* Analytics Loading State */
.analytics-loading-state {
  text-align: center;
  padding: 3rem 2rem;
}

.analytics-loading-state .spinner-wrapper {
  margin-bottom: 1rem;
}

.analytics-loading-state .loading-text {
  font-size: 0.9375rem;
  color: #697a8d;
  margin: 0;
}

/* Analytics Empty State */
.analytics-empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.analytics-empty-state .empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(105, 108, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.analytics-empty-state .empty-icon i {
  font-size: 2.5rem;
  color: var(--bs-primary);
}

.analytics-empty-state h5 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #5d596c;
  margin-bottom: 0.75rem;
}

.analytics-empty-state p {
  font-size: 1rem;
  color: #697a8d;
  margin: 0;
}

/* Responsive Analytics Styles */
@media (max-width: 991.98px) {
  .analytics-hero .display-6 {
    font-size: 1.75rem;
  }
  
  .analytics-hero .lead {
    font-size: 1rem;
  }
  
  .analytics-filter-card {
    padding: 1.25rem;
  }
  
  .filter-card-icon {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
  
  .analytics-section-header {
    padding: 1.5rem;
  }
  
  .section-header-icon {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 1.125rem;
  }
  
  .section-subtitle {
    font-size: 0.875rem;
  }
  
  .analytics-section-body {
    padding: 1.5rem;
  }
}

@media (max-width: 767.98px) {
  .analytics-hero {
    padding: 1.5rem 0;
    margin-bottom: 2rem !important;
  }
  
  .analytics-hero .display-6 {
    font-size: 1.5rem;
  }
  
  .analytics-hero .lead {
    font-size: 0.9375rem;
  }
  
  .analytics-filter-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
  
  .filter-card-content {
    width: 100%;
  }
  
  .btn-clear-filters {
    min-height: 100px;
  }
  
  .analytics-section-header {
    padding: 1.25rem;
    flex-direction: column;
    text-align: center;
  }
  
  .section-header-icon {
    margin: 0 auto;
  }
  
  .analytics-section-body {
    padding: 1.25rem;
  }
}

/* ================================
   Users Page Styles
   ================================ */

/* Users Hero Header */
.users-hero {
  padding: 2rem 0;
  animation: fadeInUp 0.5s ease-out;
}

.users-hero h2 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #696cff 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.users-hero .lead {
  font-size: 1.125rem;
  color: #697a8d;
  line-height: 1.7;
}

/* Users Statistics Cards */
.users-stats-cards {
  animation: fadeInUp 0.6s ease-out;
}

.users-stat-card {
  background: #fff;
  border-radius: var(--border-radius-lg);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--box-shadow-sm);
  border: 1px solid rgba(75, 70, 92, 0.05);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.users-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-color) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.users-stat-card:hover::before {
  opacity: 1;
}

.users-stat-card.primary {
  --accent-color: #696cff;
}

.users-stat-card.success {
  --accent-color: #71dd37;
}

.users-stat-card.info {
  --accent-color: #03c3ec;
}

.users-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.75rem 2rem rgba(161, 172, 184, 0.3);
  border-color: var(--accent-color);
}

.users-stat-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.users-stat-card.primary .users-stat-icon {
  background: linear-gradient(135deg, rgba(105, 108, 255, 0.1) 0%, rgba(105, 108, 255, 0.05) 100%);
  color: #696cff;
}

.users-stat-card.success .users-stat-icon {
  background: linear-gradient(135deg, rgba(113, 221, 55, 0.1) 0%, rgba(113, 221, 55, 0.05) 100%);
  color: #71dd37;
}

.users-stat-card.info .users-stat-icon {
  background: linear-gradient(135deg, rgba(3, 195, 236, 0.1) 0%, rgba(3, 195, 236, 0.05) 100%);
  color: #03c3ec;
}

.users-stat-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, var(--accent-color) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.users-stat-card:hover .users-stat-icon::before {
  opacity: 0.1;
}

.users-stat-content {
  flex: 1;
}

.users-stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #4b465c;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.users-stat-label {
  font-size: 0.875rem;
  color: #a8aaae;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Users Filter Section */
.users-filters {
  animation: fadeInUp 0.7s ease-out;
}

.users-filter-card {
  background: #fff;
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--box-shadow-sm);
  border: 1px solid rgba(75, 70, 92, 0.05);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
  height: 100%;
}

.users-filter-card:hover {
  box-shadow: var(--box-shadow);
  border-color: rgba(105, 108, 255, 0.2);
}

.filter-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius);
  background: linear-gradient(135deg, rgba(105, 108, 255, 0.1) 0%, rgba(105, 108, 255, 0.05) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #696cff;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.filter-card-icon.department {
  background: linear-gradient(135deg, rgba(255, 180, 0, 0.1) 0%, rgba(255, 180, 0, 0.05) 100%);
  color: #ffb400;
}

.filter-card-content {
  flex: 1;
}

.filter-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #697a8d;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.filter-input,
.filter-select {
  border: 1px solid #d9dee3;
  border-radius: var(--border-radius);
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  color: #697a8d;
  transition: all 0.2s ease;
}

.filter-input:focus,
.filter-select:focus {
  border-color: #696cff;
  box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.1);
}

.users-filter-card.action {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.users-filter-buttons {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  padding: 1.5rem;
}

.users-filter-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: #f5f5f9;
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  color: #697a8d;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.users-filter-btn i {
  font-size: 1.5rem;
}

.users-filter-btn:hover {
  background: #ededf5;
  border-color: rgba(105, 108, 255, 0.2);
  color: #696cff;
}

.users-filter-btn.active {
  background: linear-gradient(135deg, #696cff 0%, #5f63ff 100%);
  border-color: #696cff;
  color: #fff;
  box-shadow: 0 4px 12px rgba(105, 108, 255, 0.3);
}

.users-filter-btn.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(105, 108, 255, 0.4);
}

/* Users List Card */
.users-list-card {
  background: #fff;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-sm);
  border: 1px solid rgba(75, 70, 92, 0.05);
  overflow: hidden;
  animation: fadeInUp 0.8s ease-out;
}

.users-list-header {
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #f8f7fa 0%, #fafbfc 100%);
  border-bottom: 1px solid rgba(75, 70, 92, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.users-list-title {
  display: flex;
  align-items: center;
  font-size: 1.125rem;
  font-weight: 700;
  color: #4b465c;
  gap: 0.5rem;
}

.users-list-title i {
  font-size: 1.5rem;
  color: #696cff;
}

.users-count-badge {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #696cff 0%, #5f63ff 100%);
  color: #fff;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 700;
  min-width: 50px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(105, 108, 255, 0.2);
}

.users-list-body {
  padding: 2rem;
}

.users-loading-state {
  text-align: center;
  padding: 4rem 2rem;
}

.spinner-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.loading-text {
  color: #a8aaae;
  font-size: 1rem;
  margin-bottom: 0;
}

/* Users Empty State */
.users-empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(105, 108, 255, 0.1) 0%, rgba(105, 108, 255, 0.05) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #696cff;
}

.empty-state-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #4b465c;
  margin-bottom: 0.75rem;
}

.empty-state-description {
  font-size: 1rem;
  color: #a8aaae;
  max-width: 500px;
  margin: 0 auto;
}

/* Responsive Design for Users Page */
@media (max-width: 992px) {
  .users-hero h2 {
    font-size: 2rem;
  }
  
  .users-hero .lead {
    font-size: 1rem;
  }
  
  .users-stat-card {
    padding: 1.5rem 1.25rem;
  }
  
  .users-stat-icon {
    width: 56px;
    height: 56px;
    font-size: 1.75rem;
  }
  
  .users-stat-number {
    font-size: 1.75rem;
  }
  
  .users-filter-card {
    padding: 1.25rem;
  }
  
  .users-filter-buttons {
    padding: 1.25rem;
  }
  
  .users-list-header {
    padding: 1.25rem 1.5rem;
  }
  
  .users-list-body {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .users-hero {
    padding: 1.5rem 0;
  }
  
  .users-hero h2 {
    font-size: 1.75rem;
  }
  
  .users-stat-card {
    flex-direction: row;
    padding: 1.25rem;
  }
  
  .users-stat-icon {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
  
  .users-stat-number {
    font-size: 1.5rem;
  }
  
  .users-filter-card {
    padding: 1rem;
  }
  
  .filter-card-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
  
  .users-filter-buttons {
    flex-direction: column;
    padding: 1rem;
  }
  
  .users-list-header {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .users-list-title {
    justify-content: center;
  }
  
  .users-list-body {
    padding: 1rem;
  }
}

/* ================================
   Topics Page Styles
   ================================ */

/* Topics Hero Header */
.topics-hero {
  padding: 2rem 0;
  animation: fadeInUp 0.5s ease-out;
}

.topics-hero h2 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #696cff 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.topics-hero .lead {
  font-size: 1.125rem;
  color: #697a8d;
  line-height: 1.7;
}

/* Topics Statistics Cards */
.topics-stats-cards {
  animation: fadeInUp 0.6s ease-out;
}

.topics-stat-card {
  background: #fff;
  border-radius: var(--border-radius-lg);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--box-shadow-sm);
  border: 1px solid rgba(75, 70, 92, 0.05);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.topics-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-color) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.topics-stat-card:hover::before {
  opacity: 1;
}

.topics-stat-card.primary {
  --accent-color: #696cff;
}

.topics-stat-card.success {
  --accent-color: #71dd37;
}

.topics-stat-card.info {
  --accent-color: #03c3ec;
}

.topics-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.75rem 2rem rgba(161, 172, 184, 0.3);
  border-color: var(--accent-color);
}

.topics-stat-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.topics-stat-card.primary .topics-stat-icon {
  background: linear-gradient(135deg, rgba(105, 108, 255, 0.1) 0%, rgba(105, 108, 255, 0.05) 100%);
  color: #696cff;
}

.topics-stat-card.success .topics-stat-icon {
  background: linear-gradient(135deg, rgba(113, 221, 55, 0.1) 0%, rgba(113, 221, 55, 0.05) 100%);
  color: #71dd37;
}

.topics-stat-card.info .topics-stat-icon {
  background: linear-gradient(135deg, rgba(3, 195, 236, 0.1) 0%, rgba(3, 195, 236, 0.05) 100%);
  color: #03c3ec;
}

.topics-stat-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, var(--accent-color) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.topics-stat-card:hover .topics-stat-icon::before {
  opacity: 0.1;
}

.topics-stat-content {
  flex: 1;
}

.topics-stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #4b465c;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.topics-stat-label {
  font-size: 0.875rem;
  color: #a8aaae;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Topics List Card */
.topics-list-card {
  background: #fff;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-sm);
  border: 1px solid rgba(75, 70, 92, 0.05);
  overflow: hidden;
  animation: fadeInUp 0.7s ease-out;
}

.topics-list-header {
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #f8f7fa 0%, #fafbfc 100%);
  border-bottom: 1px solid rgba(75, 70, 92, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topics-list-title {
  display: flex;
  align-items: center;
  font-size: 1.125rem;
  font-weight: 700;
  color: #4b465c;
  gap: 0.5rem;
}

.topics-list-title i {
  font-size: 1.5rem;
  color: #696cff;
}

.topics-count-badge {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #696cff 0%, #5f63ff 100%);
  color: #fff;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 700;
  min-width: 50px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(105, 108, 255, 0.2);
}

.topics-list-body {
  padding: 2rem;
}

.topics-loading-state {
  text-align: center;
  padding: 4rem 2rem;
}

/* Topic Cards */
.topic-card {
  background: #fff;
  border: 1px solid rgba(75, 70, 92, 0.08);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.topic-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0.75rem 2rem rgba(161, 172, 184, 0.25);
  border-color: rgba(105, 108, 255, 0.3);
}

.topic-card.inactive {
  opacity: 0.6;
}

.topic-card-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(75, 70, 92, 0.05);
  background: linear-gradient(135deg, #fafbfc 0%, #fff 100%);
}

.topic-color-badge {
  width: 56px;
  height: 56px;
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.topic-card:hover .topic-color-badge {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.topic-card-menu {
  margin-left: auto;
}

.btn-topic-menu {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f5f5f9;
  color: #697a8d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-topic-menu:hover {
  background: #696cff;
  color: #fff;
  box-shadow: 0 4px 12px rgba(105, 108, 255, 0.3);
}

.topic-card-body {
  padding: 1.5rem;
  flex: 1;
}

.topic-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #4b465c;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.topic-card-description {
  font-size: 0.9375rem;
  color: #697a8d;
  line-height: 1.6;
  margin-bottom: 0;
}

.topic-card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(75, 70, 92, 0.05);
  background: #fafbfc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topic-card-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #697a8d;
}

.topic-card-stat i {
  font-size: 1.125rem;
  color: #a8aaae;
}

/* Topics Empty State */
.topics-empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

/* Topic Modals */
.topic-modal .topic-modal-header {
  padding: 2rem;
  background: linear-gradient(135deg, #f8f7fa 0%, #fafbfc 100%);
  border-bottom: 1px solid rgba(75, 70, 92, 0.08);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topic-modal .topic-modal-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  box-shadow: var(--box-shadow);
}

.topic-modal .topic-modal-icon.create {
  background: linear-gradient(135deg, #696cff 0%, #5f63ff 100%);
  color: #fff;
}

.topic-modal .topic-modal-icon.edit {
  background: linear-gradient(135deg, #03c3ec 0%, #00b8d9 100%);
  color: #fff;
}

.topic-modal .topic-modal-icon.delete {
  background: linear-gradient(135deg, #ff3e1d 0%, #ff1744 100%);
  color: #fff;
}

.topic-modal .topic-modal-title-wrapper {
  flex: 1;
}

.topic-modal .topic-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #4b465c;
  margin-bottom: 0.25rem;
}

.topic-modal .topic-modal-subtitle {
  font-size: 0.875rem;
  color: #a8aaae;
  margin-bottom: 0;
}

.topic-modal .topic-modal-body {
  padding: 2rem;
}

.topic-modal .topic-modal-footer {
  padding: 1.5rem 2rem;
  background: #fafbfc;
  border-top: 1px solid rgba(75, 70, 92, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.color-picker-wrapper .form-control-color {
  width: 80px;
  height: 48px;
  border-radius: var(--border-radius);
  cursor: pointer;
}

.color-picker-wrapper .form-control {
  flex: 1;
}

/* Responsive Design for Topics Page */
@media (max-width: 992px) {
  .topics-hero h2 {
    font-size: 2rem;
  }
  
  .topics-hero .lead {
    font-size: 1rem;
  }
  
  .topics-stat-card {
    padding: 1.5rem 1.25rem;
  }
  
  .topics-stat-icon {
    width: 56px;
    height: 56px;
    font-size: 1.75rem;
  }
  
  .topics-stat-number {
    font-size: 1.75rem;
  }
  
  .topics-list-header {
    padding: 1.25rem 1.5rem;
  }
  
  .topics-list-body {
    padding: 1.5rem;
  }
  
  .topic-card-header {
    padding: 1.25rem;
  }
  
  .topic-color-badge {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
  
  .topic-card-body {
    padding: 1.25rem;
  }
}

@media (max-width: 768px) {
  .topics-hero {
    padding: 1.5rem 0;
  }
  
  .topics-hero h2 {
    font-size: 1.75rem;
  }
  
  .topics-stat-card {
    flex-direction: row;
    padding: 1.25rem;
  }
  
  .topics-stat-icon {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
  
  .topics-stat-number {
    font-size: 1.5rem;
  }
  
  .topics-list-header {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .topics-list-title {
    justify-content: center;
  }
  
  .topics-list-body {
    padding: 1rem;
  }
  
  .topic-card-header {
    padding: 1rem;
  }
  
  .topic-color-badge {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
  
  .topic-card-body {
    padding: 1rem;
  }
  
  .topic-card-footer {
    padding: 0.875rem 1rem;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  
  .topic-modal .topic-modal-header {
    padding: 1.5rem;
    flex-wrap: wrap;
  }
  
  .topic-modal .topic-modal-icon {
    width: 56px;
    height: 56px;
    font-size: 1.75rem;
  }
  
  .topic-modal .topic-modal-title {
    font-size: 1.25rem;
  }
  
  .topic-modal .topic-modal-body {
    padding: 1.5rem;
  }
  
  .topic-modal .topic-modal-footer {
    padding: 1.25rem 1.5rem;
    flex-direction: column;
    align-items: stretch;
  }
  
  .topic-modal .topic-modal-footer .btn {
    width: 100%;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Styles */
.btn:focus,
.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.25);
}

.dashboard-card:focus-within {
  outline: 2px solid rgba(105, 108, 255, 0.5);
  outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .card {
    border-width: 2px;
  }
  
  .btn {
    border-width: 2px;
  }
  
  .dashboard-card {
    border-width: 2px;
  }
}
/* AI Analysis Section Styles */
.ai-analysis .analytics-section-header {
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  padding: 1.5rem;
}

.ai-analysis .section-header-icon {
  background-color: rgba(255, 255, 255, 0.2);
}

.ai-analysis-results {
  animation: fadeInUp 0.4s ease-out;
}

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

.ai-analysis-results .card {
  transition: all 0.3s ease;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.ai-analysis-results .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-lg);
}

.ai-analysis-results .list-group-item {
  border: 1px solid rgba(161, 172, 184, 0.15);
  margin-bottom: 0.5rem;
  border-radius: var(--border-radius) !important;
  transition: all 0.2s ease;
}

.ai-analysis-results .list-group-item:hover {
  background-color: rgba(105, 108, 255, 0.03);
  border-color: rgba(105, 108, 255, 0.3);
  transform: translateX(5px);
}

.ai-analysis-results h6 {
  color: #233446;
  font-weight: 600;
}

.ai-analysis-results .badge {
  font-weight: 500;
  letter-spacing: 0.3px;
}

.ai-analysis-results .border-4 {
  border-width: 4px !important;
}

/* Loading state for AI analysis */
#run-ai-analysis-btn .bx-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Responsive adjustments for AI analysis */
@media (max-width: 768px) {
  .ai-analysis .analytics-section-header {
    flex-direction: column;
    text-align: center;
  }
  
  .ai-analysis .analytics-section-header .ms-auto {
    margin-left: 0 !important;
    margin-top: 1rem;
    width: 100%;
  }
  
  .ai-analysis .analytics-section-header .btn {
    width: 100%;
  }
  
  .ai-analysis-results .col-md-8,
  .ai-analysis-results .col-md-4 {
    text-align: center !important;
  }
}
