.activicode-auth-modal .modal-content {
  border: 1px solid rgba(154, 129, 232, 0.35);
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(155deg, #ffffff 0%, #f7f8fe 100%);
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.22);
}

.activicode-auth-modal .modal-header {
  border-bottom: 1px solid rgba(154, 129, 232, 0.2);
  padding: 1.2rem 1.4rem;
}

.activicode-auth-modal .modal-body {
  padding: 1.4rem;
}

.activicode-auth-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.auth-switch-btn {
  border: 1px solid rgba(154, 129, 232, 0.35);
  background: #ffffff;
  color: #111827;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-weight: 600;
  transition: 0.2s ease;
}

.auth-switch-btn:hover,
.auth-switch-btn.is-active {
  background: #9a81e8;
  border-color: #9a81e8;
  color: #ffffff;
}

.activicode-auth-social-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.activicode-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  background: #ffffff;
  color: #111827;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s ease;
}

.activicode-social-btn:hover {
  border-color: #111827;
  color: #111827;
  transform: translateY(-1px);
}

.activicode-social-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.activicode-social-btn.provider-google i {
  color: #ea4335;
}

.activicode-social-btn.provider-facebook i {
  color: #1877f2;
}

.activicode-auth-divider {
  text-align: center;
  margin: 1rem 0;
  position: relative;
}

.activicode-auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(15, 23, 42, 0.12);
}

.activicode-auth-divider span {
  position: relative;
  z-index: 1;
  background: #f7f8fe;
  padding: 0 0.8rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.activicode-auth-notice {
  display: none;
  border-radius: 12px;
  margin-bottom: 1rem;
  padding: 0.72rem 0.9rem;
  font-size: 0.92rem;
}

.activicode-auth-notice.is-visible {
  display: block;
}

.activicode-auth-notice.is-success {
  background: #ecfdf3;
  color: #14532d;
}

.activicode-auth-notice.is-error {
  background: #fef2f2;
  color: #991b1b;
}

.activicode-auth-notice.is-info {
  background: #eef2ff;
  color: #312e81;
}

.activicode-auth-form[hidden] {
  display: none !important;
}

.activicode-auth-modal.is-fallback-open {
  display: block;
  background: rgba(15, 23, 42, 0.45);
}

.activicode-dashboard-page {
  background: linear-gradient(180deg, #f6f8ff 0%, #eef2ff 100%);
  min-height: 72vh;
}

body.activicode-dashboard-view {
  --ac-dashboard-header-offset: 90px;
  --ac-dashboard-gap: 15px;
}

body.admin-bar.activicode-dashboard-view {
  --ac-dashboard-header-offset: 124px;
}

body.activicode-dashboard-view main {
  padding-top: var(--ac-dashboard-header-offset) !important;
  background: linear-gradient(180deg, #f6f8ff 0%, #eef2ff 100%) !important;
}

.activicode-dashboard-page.section-padding {
  margin-top: -1px !important;
  padding-top: var(--ac-dashboard-gap) !important;
  padding-bottom: 88px !important;
}

.activicode-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(252px, 292px) minmax(0, 1fr);
  gap: 1.4rem;
  align-items: start;
}

.activicode-dashboard-sidebar-wrap {
  min-width: 0;
  position: sticky;
  top: calc(var(--ac-dashboard-header-offset) + var(--ac-dashboard-gap));
  transform: none;
  align-self: start;
  justify-self: center;
  width: 100%;
  max-width: 292px;
}

.activicode-dashboard-sidebar {
  position: static;
  top: auto;
  transform: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(180deg, #101827 0%, #0a1020 100%);
  border: 1px solid rgba(154, 129, 232, 0.34);
  border-radius: 18px;
  padding: 0.8rem;
  box-shadow: 0 24px 45px rgba(2, 6, 23, 0.45);
  max-height: none;
  overflow: visible;
}

.dashboard-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.66rem 0.74rem;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(237, 242, 255, 0.9);
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: 0.2s ease;
  min-height: 52px;
  position: relative;
}

.dashboard-nav-link::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: #9a81e8;
  opacity: 0;
}

.dashboard-nav-link:hover,
.dashboard-nav-link.is-active {
  background: #ffffff;
  color: #5d41c8;
}

.dashboard-nav-link.is-active::before {
  opacity: 1;
}

.dashboard-nav-link-logout {
  margin-top: 0.35rem;
  color: #ffd7d7;
}

.dashboard-nav-link-logout:hover {
  background: rgba(185, 28, 28, 0.2);
  color: #991b1b;
}

.dashboard-nav-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: #d4c7ff;
  font-size: 1rem;
}

.dashboard-nav-link:hover .dashboard-nav-icon,
.dashboard-nav-link.is-active .dashboard-nav-icon {
  background: #9a81e8;
  color: #ffffff;
}

.dashboard-nav-icon i {
  line-height: 1;
}

.activicode-dashboard-main {
  min-width: 0;
}

.activicode-dashboard-card {
  border: 1px solid rgba(154, 129, 232, 0.22);
  border-radius: 20px;
  background: #ffffff;
  padding: 1.2rem;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.dashboard-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
}

.dashboard-count {
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ece7ff;
  color: #452f92;
  font-weight: 700;
}

.dashboard-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: #eff6ff;
  color: #1d4ed8;
}

.dashboard-post-list {
  display: grid;
  gap: 1rem;
}

.dashboard-post-card {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  background: #ffffff;
  padding: 0.95rem;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.06);
}

.dashboard-post-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.dashboard-post-author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.dashboard-post-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.dashboard-post-author strong {
  display: block;
  color: #111827;
  line-height: 1.2;
}

.dashboard-post-author time {
  font-size: 0.78rem;
  color: #6b7280;
}

.dashboard-post-text {
  margin-bottom: 0.8rem;
  color: #374151;
  line-height: 1.65;
}

.dashboard-post-media {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 0.8rem;
}

.dashboard-post-media img {
  display: block;
  width: 100%;
  height: auto;
}

.dashboard-post-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
}

.dashboard-post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.95rem;
  color: #6b7280;
  font-size: 0.85rem;
}

.dashboard-post-actions i {
  margin-right: 0.25rem;
}

.dashboard-inline-label {
  font-size: 0.85rem;
  color: #1f2937;
  font-weight: 600;
}

.dashboard-chip.type-formation {
  background: #ecfeff;
  color: #0f766e;
}

.dashboard-chip.type-promotion {
  background: #fef3c7;
  color: #92400e;
}

.dashboard-chip.type-product {
  background: #dcfce7;
  color: #166534;
}

.dashboard-chip.type-publication {
  background: #ede9fe;
  color: #5b21b6;
}

.dashboard-message-list {
  display: grid;
  gap: 0.75rem;
}

.dashboard-message-item,
.dashboard-promo-item {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  background: #ffffff;
  padding: 0.9rem;
}

.dashboard-message-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.7rem;
}

.dashboard-status {
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.24rem 0.65rem;
  background: #e5e7eb;
  color: #1f2937;
}

.dashboard-status.status-nouveau {
  background: #fee2e2;
  color: #b91c1c;
}

.dashboard-status.status-en_cours {
  background: #fef3c7;
  color: #92400e;
}

.dashboard-status.status-traite,
.dashboard-status.status-repondu,
.dashboard-status.status-paid {
  background: #dcfce7;
  color: #166534;
}

.dashboard-inline-notice {
  min-height: 1.4em;
  font-size: 0.9rem;
  color: #4b5563;
}

.dashboard-inline-notice.is-success {
  color: #166534;
}

.dashboard-inline-notice.is-error {
  color: #991b1b;
}

.dashboard-promo-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.activicode-dashboard-table th {
  color: #4b5563;
  font-size: 0.9rem;
  font-weight: 700;
}

.activicode-dashboard-table td {
  vertical-align: middle;
  color: #111827;
}

@media (max-width: 1199px) {
  .dashboard-promo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991px) {
  .activicode-dashboard-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .activicode-dashboard-page.section-padding {
    margin-top: -1px !important;
    padding-top: var(--ac-dashboard-gap) !important;
    padding-bottom: 70px !important;
  }

  .activicode-dashboard-sidebar-wrap {
    position: static;
    top: auto;
    left: auto;
    width: auto;
    transform: none;
    align-self: auto;
    top: auto;
  }

  .activicode-dashboard-sidebar {
    position: static;
    transform: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    max-height: none;
    overflow: visible;
  }

  .dashboard-nav-link {
    min-height: 44px;
  }

  .activicode-dashboard-card {
    padding: 1rem;
  }
}

@media (max-width: 782px) {
  body.admin-bar.activicode-dashboard-view {
    --ac-dashboard-header-offset: 136px;
  }
}

@media (max-width: 767px) {
  .activicode-auth-social-row {
    grid-template-columns: 1fr;
  }

  .activicode-dashboard-page.section-padding {
    margin-top: -1px !important;
    padding-top: var(--ac-dashboard-gap) !important;
    padding-bottom: 56px !important;
  }

  .dashboard-message-top,
  .dashboard-card-head,
  .dashboard-post-head,
  .dashboard-post-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .activicode-dashboard-sidebar {
    grid-template-columns: 1fr;
  }
}
