:root {
  --ts-purple: #262541;
  --ts-purple-dark: #1d1c35;
  --ts-purple-soft: rgba(255, 255, 255, 0.08);
  --ts-purple-border: rgba(255, 255, 255, 0.12);
  
  --ts-red: #d7263d;

  --admin-bg: #f6f7f9;
  --admin-card-bg: #ffffff;
  --admin-border: #e5e7eb;
  --admin-border-soft: #eef0f4;

  --admin-text: #111827;
  --admin-muted: #6b7280;
  --admin-soft-text: #4b5563;

  --admin-sidebar-width: 200px;

  --admin-radius-sm: 5px;
  --admin-radius-md: 10px;
  --admin-radius-lg: 14px;
  --admin-radius-xl: 18px;

  --admin-shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.06);
  --admin-shadow-md: 0 8px 24px rgba(17, 24, 39, 0.04);
  --admin-shadow-lg: 0 12px 30px rgba(17, 24, 39, 0.08);
}

/* ----------------------
   BASE
---------------------- */

body {
  background: var(--admin-bg);
  color: var(--admin-text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--ts-purple) !important;
  font-weight: 700;
}

a {
  color: var(--ts-purple);
}

.card-body a {
  color: var(--ts-purple) !important;
}

.text-dark {
  color: var(--ts-purple) !important;
}

.form-label {
  font-weight: 600;
  color: #1f2937;
}

.form-control,
.form-select {
  border-radius: var(--admin-radius-md);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--ts-purple);
  box-shadow: 0 0 0 0.2rem rgba(38, 37, 65, 0.12);
}

.btn.btn-dark,
.admin-topbar-button {
  background: var(--ts-purple) !important;
  border-color: var(--ts-purple) !important;
  border-radius: var(--admin-radius-sm);
  font-weight: 600;
}

.btn.btn-dark:hover,
.admin-topbar-button:hover {
  background: var(--ts-purple-dark) !important;
  border-color: var(--ts-purple-dark) !important;
}

.tox-tinymce {
  border-radius: 12px !important;
  border-color: #d1d5db !important;
}

/* ----------------------
   ADMIN LAYOUT
---------------------- */

.admin-shell {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
  width: 100%;
  background: var(--admin-bg);
}

.admin-shell .sidebar {
  flex: 0 0 var(--admin-sidebar-width);
  width: var(--admin-sidebar-width) !important;
  min-width: var(--admin-sidebar-width);
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
  overflow-y: auto;
  background-color: var(--ts-purple);
  color: #fff;
  z-index: 20;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
}

.admin-content {
  flex: 1 1 auto;
  min-width: 0;
  background: var(--admin-bg);
  display: flex;
  flex-direction: column;
}

.admin-main {
  flex: 1 1 auto;
  min-height: calc(100vh - 56px);
  padding: 1.5rem;
  background: var(--admin-bg);
  overflow: visible;
}

.flex-grow-1 {
  margin-left: 0 !important;
  height: auto !important;
  display: flex;
  flex-direction: column;
}

/* ----------------------
   SIDEBAR
---------------------- */

.sidebar .sidebar-brand {
  padding: 0.5rem 0.5rem 1rem;
  margin-bottom: 0.75rem;
  text-align: center;
  border-bottom: 1px solid var(--ts-purple-border);
}

.sidebar .sidebar-brand img {
  width: 110px;
  height: auto;
}

.sidebar .nav {
  gap: 0.15rem;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.55rem;
  color: rgba(255, 255, 255, 0.78) !important;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--admin-radius-sm);
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.sidebar .nav-link:hover {
  background: var(--ts-purple-soft);
  color: #fff !important;
}

.sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff !important;
}

.admin-nav-heading {
  margin: 1rem 0 0.35rem;
  padding: 0 0.5rem;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.admin-nav-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.admin-nav-label i {
  width: 16px;
  font-size: 0.92rem;
  opacity: 0.9;
}

.admin-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

/* ----------------------
   TOPBAR
---------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 56px;
  flex-shrink: 0;
  background-color: #fff !important;
  color: var(--ts-purple);
  display: flex;
  justify-content: space-between !important;
  align-items: center;
  box-shadow: var(--admin-shadow-sm);
  font-size: 0.9rem;
}

.admin-topbar-left {
  display: flex;
  align-items: center;
  min-width: 1px;
}

.admin-mobile-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  background: var(--ts-purple);
  color: #fff;
  border: 0;
  border-radius: var(--admin-radius-sm);
  font-weight: 600;
  line-height: 1;
}

.admin-mobile-sidebar-toggle:hover,
.admin-mobile-sidebar-toggle:focus {
  background: var(--ts-purple-dark);
  color: #fff;
  outline: none;
}

/* ----------------------
   USER MENU
---------------------- */

.admin-user-menu {
  position: relative;
}

.admin-user-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.45rem 0.25rem 0.25rem;
  background: #fff;
  color: var(--ts-purple);
  border: 1px solid #e5e5e5;
  border-radius: var(--admin-radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.admin-user-menu-button:hover,
.admin-user-menu-button:focus {
  background: #f7f7fb;
  color: var(--ts-purple);
  outline: none;
}

.admin-user-menu-avatar,
.admin-user-menu-avatar-img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50px;
  flex: 0 0 auto;
}

.admin-user-menu-avatar {
  background: var(--ts-purple);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}

.admin-user-menu-avatar-img {
  object-fit: cover;
  background: #f3f3f8;
}

.admin-user-menu-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-dropdown {
  min-width: 210px;
  padding: 0.45rem;
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.admin-user-dropdown .dropdown-header {
  padding: 0.55rem 0.75rem;
  color: var(--ts-purple);
  font-size: 0.78rem;
  line-height: 1.35;
}

.admin-user-dropdown .dropdown-header strong {
  color: var(--ts-purple);
  font-size: 0.9rem;
}

.admin-user-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.75rem;
  color: var(--ts-purple);
  border-radius: var(--admin-radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-user-dropdown .dropdown-item:hover {
  background: #f3f3f8;
  color: var(--ts-purple);
}

.admin-user-dropdown .dropdown-item.text-danger {
  color: #dc3545 !important;
}

.admin-user-dropdown .dropdown-divider {
  margin: 0.35rem 0;
}

/* ----------------------
   MOBILE ADMIN APP FEEL
---------------------- */

.admin-mobile-title {
  color: var(--ts-purple);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.admin-topbar-actions {
  min-width: 0;
}

.admin-topbar-icon-link {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f7f7fb;
  font-size: 1rem;
}

.admin-topbar-icon-link:hover {
  background: #eeeeF6;
  color: var(--ts-purple) !important;
}

.admin-topbar-notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #d7263d;
  border: 2px solid #fff;
  border-radius: 50%;
  display: block;
}

@media (max-width: 991px) {
    
.new-post {
    display: none !important;
}
    
  .admin-shell {
    display: block;
  }

  .admin-content {
    width: 100%;
    min-height: 100vh;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 58px;
    padding: 0.65rem 0.85rem !important;
    gap: 0.75rem;
    border-bottom: 1px solid #e9e9ef !important;
    box-shadow: 0 4px 14px rgba(17, 24, 39, 0.06);
  }

  .admin-topbar-left {
    gap: 0.65rem;
  }

  .admin-topbar-actions {
    gap: 0.45rem !important;
  }

  .admin-mobile-sidebar-toggle {
    width: 38px;
    height: 38px;
    justify-content: center;
    padding: 0;
    border-radius: 999px;
  }

  .admin-mobile-sidebar-toggle span {
    display: none;
  }

  .admin-mobile-sidebar-toggle i {
    font-size: 1.2rem;
  }

  .admin-shell .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(84vw, 290px) !important;
    min-width: 0;
    height: 100vh;
    min-height: 100vh;
    z-index: 1050;
    padding: 1rem 0.85rem;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 18px 0 34px rgba(0, 0, 0, 0.2);
  }

  body.admin-mobile-sidebar-open .admin-shell .sidebar {
    transform: translateX(0);
  }

  .admin-mobile-sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(16, 16, 24, 0.45);
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(2px);
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  body.admin-mobile-sidebar-open .admin-mobile-sidebar-overlay {
    opacity: 1;
    visibility: visible;
  }

  body.admin-mobile-sidebar-open {
    overflow: hidden;
  }

  .sidebar .sidebar-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.5rem 0.9rem;
  }

  .sidebar .sidebar-brand img {
    width: 118px !important;
  }

  .sidebar .nav {
    gap: 0.25rem;
  }

  .sidebar .nav-link {
    min-height: 44px;
    padding: 0.72rem 0.72rem;
    font-size: 0.92rem;
    border-radius: 10px;
  }

  .admin-nav-label {
    gap: 0.65rem;
  }

  .admin-nav-label i {
    width: 20px;
    font-size: 1rem;
  }

  .admin-nav-badge {
    min-width: 20px;
    height: 20px;
    font-size: 0.72rem;
  }

  .admin-main {
    padding: 1rem;
    min-height: auto;
  }

  .admin-user-menu-name {
    display: none !important;
  }

  .admin-user-menu-button {
    padding: 0.2rem;
    border-radius: 999px;
    border-color: #ececf2;
  }

  .admin-user-menu-avatar,
  .admin-user-menu-avatar-img {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 575px) {
  .topbar {
    padding: 0.6rem 0.75rem !important;
  }

  .admin-main {
    padding: 0.8rem;
  }

  .admin-mobile-title {
    font-size: 0.9rem;
  }

  .admin-topbar-button {
    min-width: 38px;
    width: 38px;
    height: 38px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0;
  }

  .admin-topbar-button::before {
    content: "+";
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 700;
  }

  .admin-topbar-icon-link {
    width: 38px;
    height: 38px;
  }

  .admin-user-dropdown {
    min-width: 230px;
  }
}

/* ----------------------
   MEDIA
---------------------- */

.media-preview img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
}

.media-url {
  font-size: 12px;
  word-break: break-all;
}

.copy-btn {
  width: 100%;
}

/* ----------------------
   GENERATE LOADER
---------------------- */

.ts-generate-loader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(18, 18, 18, 0.78);
  backdrop-filter: blur(4px);
}

.ts-generate-loader-content {
  max-width: 420px;
  padding: 2rem;
  text-align: center;
  color: #fff;
}

.ts-generate-loader-content h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #fff !important;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ts-generate-loader-content p {
  margin: 0;
  color: #fff !important;
  font-size: 0.98rem;
  line-height: 1.5;
}

.ts-loader-spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: #ffffff;
  animation: tsSpin 0.85s linear infinite;
}

@keyframes tsSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ----------------------
   RECIPIENT AUTOCOMPLETE
---------------------- */

.recipient-field-wrap {
  position: relative;
}

.recipient-composer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.45rem 0.65rem;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  cursor: text;
}

.recipient-composer:focus-within {
  border-color: var(--ts-purple);
  box-shadow: 0 0 0 0.2rem rgba(38, 37, 65, 0.12);
}

.recipient-composer.is-disabled {
  background: #f3f4f6;
  cursor: not-allowed;
}

.recipient-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.recipient-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  background: var(--ts-purple);
  color: #fff;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
}

.recipient-pill button {
  width: 18px;
  height: 18px;
  padding: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  border: 0;
  border-radius: 50%;
  line-height: 1;
  cursor: pointer;
}

.recipient-search-input {
  flex: 1;
  min-width: 180px;
  padding: 0.35rem 0;
  background: transparent;
  border: 0;
  outline: 0;
}

.recipient-suggestions {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 9999;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.12);
}

.recipient-suggestions.is-visible {
  display: block;
}

.recipient-suggestion {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  background: #fff;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.recipient-suggestion:hover {
  background: #f4f4f7;
}

.recipient-suggestion-name {
  color: var(--admin-text);
  font-weight: 700;
}

.recipient-suggestion-meta {
  color: var(--admin-muted);
  font-size: 0.85rem;
}

.recipient-limit-warning {
  color: #dc3545;
  font-weight: 600;
}

/* ----------------------
   MESSAGE COMPOSE
---------------------- */

.message-compose-page {
  width: 100%;
}

.message-compose-header h1 {
  color: var(--admin-text);
  font-weight: 700;
}

.compose-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.25rem;
  align-items: start;
}

.compose-main-card,
.compose-side-card,
.message-card,
.messages-toolbar,
.messages-empty,
.message-card-full,
.reply-panel,
.message-action-card,
.message-details-card,
.posts-filter-card,
.posts-table-shell,
.posts-empty {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-border);
  box-shadow: var(--admin-shadow-md);
}

.compose-main-card,
.compose-side-card {
  border-radius: var(--admin-radius-xl);
}

.compose-main-card {
  min-width: 0;
}

.compose-side-card {
  position: sticky;
  top: 1rem;
  padding: 1rem;
}

.compose-section {
  padding: 1.25rem;
}

.compose-section-heading {
  margin-bottom: 1rem;
}

.compose-section-heading h2,
.compose-send-summary h2,
.reply-panel-heading h2,
.message-action-card h2,
.message-details-card h2 {
  margin: 0 0 0.25rem;
  color: var(--admin-text);
  font-size: 1rem;
  font-weight: 700;
}

.compose-section-heading p,
.reply-panel-heading p {
  margin: 0;
  color: var(--admin-muted);
  font-size: 0.9rem;
}

.compose-admin-box,
.compose-send-summary {
  padding: 1rem;
  background: #f8f8fb;
  border: 1px solid #e4e4ee;
  border-radius: var(--admin-radius-lg);
}

.compose-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
}

.compose-check .form-check-input {
  margin-left: 0;
  margin-top: 0.2rem;
}

.compose-check .form-check-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: var(--admin-text);
}

.compose-check .form-check-label span,
.compose-send-summary ul {
  color: var(--admin-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.compose-send-summary ul {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
}

.compose-send-summary li + li {
  margin-top: 0.35rem;
}

.compose-actions {
  display: flex;
  gap: 0.6rem;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--admin-border-soft);
}

.compose-actions .btn {
  flex: 1;
  font-weight: 600;
}

/* ----------------------
   MESSAGES LIST
---------------------- */

.messages-header h1 {
  color: var(--admin-text);
  font-weight: 700;
}

.messages-tabs {
  display: inline-flex;
  padding: 0.35rem;
  background: #f4f4f7;
  border-radius: 999px;
}

.messages-tabs .nav-link {
  padding: 0.5rem 1rem;
  color: #374151;
  border-radius: 999px;
  font-weight: 600;
}

.messages-tabs .nav-link.active {
  background: var(--ts-purple);
  color: #fff;
}

.messages-tabs .badge {
  background: rgba(255, 255, 255, 0.2);
}

.messages-toolbar {
  padding: 0.75rem 1rem;
  border-radius: var(--admin-radius-lg);
}

.messages-toolbar .form-select {
  min-width: 180px;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.message-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.75rem;
  align-items: stretch;
  overflow: hidden;
  border-radius: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.message-card:hover {
  transform: translateY(-1px);
  border-color: #c9c8d8;
  box-shadow: var(--admin-shadow-lg);
}

.message-card-check {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  border-right: 1px solid var(--admin-border-soft);
}

.message-card-main {
  padding: 1rem 1.1rem;
  cursor: pointer;
}

.message-card-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.message-card-sender {
  color: var(--admin-text);
  font-weight: 700;
}

.message-card-date {
  color: var(--admin-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.message-card-subject {
  margin-bottom: 0.45rem;
  color: #1f2937;
  font-size: 1rem;
  line-height: 1.4;
}

.message-card-meta {
  font-size: 0.82rem;
}

.message-card-unread {
  border-left: 5px solid var(--ts-purple);
}

.message-card-unread .message-card-subject {
  font-weight: 700;
}

.message-card-pinned {
  border-color: #e8d28a;
  background: linear-gradient(90deg, #fffaf0 0%, #ffffff 22%);
}

.message-pin {
  display: inline-flex;
  align-items: center;
  margin-right: 0.4rem;
  padding: 0.15rem 0.45rem;
  background: #fff0b3;
  color: #5f4800;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
}

.message-status-read {
  color: var(--admin-muted);
}

.message-status-unread {
  color: var(--ts-purple);
  font-weight: 700;
}

.messages-empty {
  padding: 2rem;
  text-align: center;
  color: var(--admin-muted);
  border: 1px dashed #cfd2dc;
  border-radius: 16px;
}

.messages-empty h5 {
  color: var(--admin-text);
  font-weight: 700;
}

/* ----------------------
   MESSAGE VIEW
---------------------- */

.message-view-page {
  width: 100%;
}

.message-view-header {
  margin-bottom: 1.25rem;
}

.message-back-link {
  display: inline-flex;
  margin-bottom: 0.75rem;
  color: var(--admin-muted);
  text-decoration: none;
  font-weight: 600;
}

.message-back-link:hover {
  color: var(--ts-purple);
}

.message-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.message-title-row h1 {
  margin: 0;
  color: var(--admin-text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.message-subtitle {
  margin: 0.5rem 0 0;
  color: var(--admin-muted);
}

.message-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.message-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.message-badge-pinned {
  background: #fff0b3;
  color: #5f4800;
}

.message-badge-read {
  background: #eef0f4;
  color: #4b5563;
}

.message-badge-unread {
  background: var(--ts-purple);
  color: #fff;
}

.message-view-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 1.25rem;
  align-items: start;
}

.message-main-panel {
  min-width: 0;
}

.message-card-full,
.reply-panel,
.message-action-card,
.message-details-card {
  border-radius: var(--admin-radius-xl);
}

.message-card-full {
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.message-card-full-pinned {
  border-color: #e8d28a;
  background: linear-gradient(90deg, #fffaf0 0%, #ffffff 24%);
}

.message-card-topline {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  padding: 1rem 1.1rem;
  background: rgba(249, 250, 251, 0.72);
  border-bottom: 1px solid var(--admin-border-soft);
}

.message-avatar {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ts-purple);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
}

.message-meta-main {
  min-width: 0;
}

.message-meta-line {
  display: flex;
  gap: 0.45rem;
  color: var(--admin-muted);
  font-size: 0.9rem;
}

.message-meta-line strong {
  color: var(--admin-text);
}

.message-date-pill {
  padding: 0.35rem 0.7rem;
  background: #fff;
  color: var(--admin-muted);
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.message-body-content {
  padding: 1.35rem;
  color: #1f2937;
  line-height: 1.7;
}

.message-body-content p:last-child {
  margin-bottom: 0;
}

.reply-panel {
  padding: 1.25rem;
}

.reply-panel-disabled {
  background: #f9fafb;
  border-style: dashed;
}

.reply-panel-heading {
  margin-bottom: 1rem;
}

.message-side-panel {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message-action-card,
.message-details-card {
  padding: 1rem;
}

.message-action-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1rem;
}

.message-action-list .btn {
  font-weight: 600;
}

.message-details-card dl {
  margin: 1rem 0 0;
}

.message-details-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--admin-border-soft);
}

.message-details-card dt {
  color: var(--admin-muted);
  font-weight: 600;
}

.message-details-card dd {
  margin: 0;
  color: var(--admin-text);
  font-weight: 600;
  text-align: right;
}

/* ----------------------
   POSTS
---------------------- */

.posts-page {
  width: 100%;
}

.posts-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  padding: 1.5rem;
}

.posts-kicker {
  margin: 0 0 0.35rem;
  color: var(--ts-purple);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.posts-hero h1 {
  margin: 0;
  color: var(--admin-text);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.posts-hero-text {
  margin: 0.4rem 0 0;
  color: var(--admin-muted);
}

.posts-create-button {
  font-weight: 600;
  white-space: nowrap;
}

.posts-filter-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px auto;
  gap: 0.9rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 16px;
}

.posts-filter-actions {
  display: flex;
  gap: 0.5rem;
}

.posts-filter-actions .btn {
  font-weight: 600;
}

.posts-results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--admin-soft-text);
}

.posts-active-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.posts-active-filters span {
  display: inline-flex;
  padding: 0.25rem 0.55rem;
  background: #f4f4f7;
  color: var(--admin-soft-text);
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.posts-table-shell {
  overflow: hidden;
  border-radius: var(--admin-radius-xl);
}

.posts-table-header,
.posts-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 130px 120px 150px;
  gap: 1rem;
}

.posts-table-header {
  padding: 0.8rem 1rem;
  background: #f8f8fb;
  color: var(--admin-muted);
  border-bottom: 1px solid var(--admin-border);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.posts-table-body {
  display: flex;
  flex-direction: column;
}

.posts-table-row {
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--admin-border-soft);
  transition: background 0.15s ease;
}

.posts-table-row:last-child {
  border-bottom: 0;
}

.posts-table-row:hover {
  background: #fbfbfd;
}

.posts-table-post {
  min-width: 0;
}

.posts-table-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.25rem;
}

.posts-table-title {
  color: var(--admin-text);
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.posts-table-title:hover {
  color: var(--ts-purple);
  text-decoration: underline;
}

.posts-table-tagline {
  max-width: 760px;
  margin: 0;
  color: var(--admin-soft-text);
  font-size: 0.9rem;
  line-height: 1.45;
}

.posts-table-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.35rem;
  color: #8a8f9d;
  font-size: 0.8rem;
}

.posts-table-date {
  color: var(--admin-soft-text);
  font-size: 0.88rem;
  white-space: nowrap;
}

.posts-table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
}

.posts-table-actions .btn {
  font-weight: 600;
}

.post-type-pill,
.post-featured-pill,
.post-status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.post-type-pill {
  background: #f4f4f7;
  color: var(--ts-purple);
}

.post-featured-pill {
  background: #fff0b3;
  color: #5f4800;
}

.post-status-draft {
  background: #fff3cd;
  color: #664d03;
}

.post-status-pending {
  background: #dff4ff;
  color: #075985;
}

.post-status-published {
  background: #dcfce7;
  color: #166534;
}

.post-status-unknown {
  background: #eef0f4;
  color: var(--admin-soft-text);
}

.posts-empty {
  padding: 2.5rem;
  text-align: center;
  border: 1px dashed #cfd2dc;
  border-radius: var(--admin-radius-xl);
}

.posts-empty h2 {
  margin: 0 0 0.35rem;
  color: var(--admin-text);
  font-size: 1.25rem;
  font-weight: 700;
}

.posts-empty p {
  margin: 0 0 1rem;
  color: var(--admin-muted);
}

.posts-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.posts-page-numbers {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.posts-pagination a,
.posts-pagination span {
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.65rem;
  background: #fff;
  color: #374151;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}

.posts-pagination a:hover {
  border-color: var(--ts-purple);
  color: var(--ts-purple);
}

.posts-pagination a.is-active {
  background: var(--ts-purple);
  border-color: var(--ts-purple);
  color: #fff;
}

.posts-pagination .is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.posts-page-link {
  min-width: 92px !important;
}

/* ----------------------
   MOBILE DRAWER
---------------------- */

.admin-mobile-sidebar-overlay {
  display: none;
}

/* ----------------------
   RESPONSIVE
---------------------- */

@media (max-width: 1050px) {
  .posts-filter-card {
    grid-template-columns: 1fr 1fr;
  }

  .posts-filter-main {
    grid-column: 1 / -1;
  }
}

@media (max-width: 992px) {
  .compose-grid,
  .message-view-grid {
    grid-template-columns: 1fr;
  }

  .compose-side-card,
  .message-side-panel {
    position: static;
  }
}

@media (max-width: 991px) {
  .admin-shell {
    display: block;
  }

  .admin-shell .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(82vw, 280px) !important;
    min-width: 0;
    height: 100vh;
    min-height: 100vh;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 14px 0 30px rgba(0, 0, 0, 0.18);
  }

  body.admin-mobile-sidebar-open .admin-shell .sidebar {
    transform: translateX(0);
  }

  .admin-mobile-sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(0, 0, 0, 0.38);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  body.admin-mobile-sidebar-open .admin-mobile-sidebar-overlay {
    opacity: 1;
    visibility: visible;
  }

  body.admin-mobile-sidebar-open {
    overflow: hidden;
  }

  .admin-content {
    width: 100%;
    min-height: 100vh;
  }

  .topbar {
    z-index: 1000;
    min-height: auto;
    padding: 0.75rem 1rem !important;
    gap: 0.75rem;
  }

  .topbar > .d-flex {
    gap: 0.65rem !important;
    min-width: 0;
  }

  .admin-topbar-button {
    white-space: nowrap;
  }

  .admin-user-menu-name {
    display: none !important;
  }

  .sidebar .sidebar-brand {
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
  }

  .sidebar .nav-link {
    padding: 0.65rem 0.6rem;
    font-size: 0.86rem;
  }

  main,
  .admin-main {
    min-height: auto;
    padding: 1rem;
  }
}

@media (max-width: 980px) {
  .posts-table-header {
    display: none;
  }

  .posts-table-row {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    align-items: start;
  }

  .posts-table-type,
  .posts-table-status,
  .posts-table-date {
    display: inline-flex;
  }

  .posts-table-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .posts-hero {
    flex-direction: column;
  }

  .posts-create-button {
    width: 100%;
  }

  .posts-filter-card {
    grid-template-columns: 1fr;
  }

  .posts-filter-actions {
    flex-direction: column;
  }

  .posts-results-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .posts-active-filters {
    justify-content: flex-start;
  }

  .posts-table-actions {
    width: 100%;
  }

  .posts-table-actions .btn {
    flex: 1;
  }

  .posts-pagination {
    flex-wrap: wrap;
  }
}

@media (max-width: 700px) {
  .messages-header,
  .message-compose-header {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .message-card {
    grid-template-columns: 38px 1fr;
  }

  .message-card-top,
  .message-title-row {
    flex-direction: column;
    gap: 0.25rem;
  }

  .message-card-date {
    white-space: normal;
  }

  .message-badges {
    justify-content: flex-start;
  }

  .messages-toolbar {
    align-items: stretch !important;
  }

  .messages-toolbar .form-select {
    min-width: 0;
  }

  .message-card-topline {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .message-date-pill {
    grid-column: 1 / -1;
    justify-self: flex-start;
  }
}

@media (max-width: 650px) {
  .compose-section,
  .compose-side-card {
    padding: 1rem;
  }

  .compose-actions {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .admin-main {
    padding: 0.85rem;
  }

  .posts-hero,
  .posts-filter-card,
  .compose-main-card,
  .compose-side-card,
  .message-card-full,
  .reply-panel,
  .message-action-card,
  .message-details-card {
    border-radius: 14px;
  }

  .posts-hero,
  .posts-filter-card,
  .compose-section,
  .reply-panel,
  .message-body-content {
    padding: 1rem;
  }

  .messages-tabs {
    width: 100%;
  }

  .messages-tabs .nav-item {
    flex: 1;
  }

  .messages-tabs .nav-link {
    width: 100%;
    text-align: center;
  }

  .messages-toolbar {
    flex-direction: column;
  }

  .messages-toolbar > div {
    width: 100%;
  }

  .messages-toolbar .form-select,
  .messages-toolbar .btn {
    width: 100%;
  }

  .message-card-main {
    padding: 0.9rem;
  }

  .message-card-check {
    align-items: flex-start;
    padding-top: 1rem;
  }

  .message-meta-line {
    flex-direction: column;
    gap: 0.05rem;
  }

  .posts-pagination {
    justify-content: flex-start;
  }

  .posts-page-link {
    width: 100%;
  }

  .posts-page-numbers {
    width: 100%;
    flex-wrap: wrap;
  }

  .recipient-search-input {
    min-width: 120px;
  }
}

/* ----------------------
   DASHBOARD
---------------------- */

.dashboard-page {
  width: 100%;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top right, rgba(38, 37, 65, 0.08), transparent 34%),
    #fff;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-xl);
  box-shadow: var(--admin-shadow-md);
}

.dashboard-hero-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.dashboard-greeting-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f7;
  border-radius: 18px;
  font-size: 1.8rem;
}

.dashboard-kicker,
.dashboard-panel-kicker {
  margin: 0 0 0.25rem;
  color: var(--admin-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-hero h1 {
  margin: 0;
  color: var(--admin-text);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.dashboard-hero p:not(.dashboard-kicker) {
  margin: 0.35rem 0 0;
  color: var(--admin-muted);
}

.dashboard-hero-actions {
  display: flex;
  gap: 0.6rem;
  flex: 0 0 auto;
}

.dashboard-hero-actions .btn {
  font-weight: 600;
}

/* ----------------------
   DASHBOARD TICKER
---------------------- */

.dashboard-ticker-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid var(--admin-border);
  border-left: 4px solid #f59e0b;
  border-radius: var(--admin-radius-xl);
  box-shadow: var(--admin-shadow-md);
}

.dashboard-ticker-label {
  color: var(--ts-purple);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dashboard-ticker {
  min-width: 0;
}

.dashboard-ticker-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.dashboard-ticker-content {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.dashboard-ticker-badges {
  display: flex;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.dashboard-alert-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.dashboard-alert-new {
  background: #e0f2fe;
  color: #075985;
}

.dashboard-alert-breaking {
  background: #fee2e2;
  color: #991b1b;
}

.dashboard-ticker-copy {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  color: var(--admin-soft-text);
  font-size: 0.92rem;
}

.dashboard-ticker-copy a {
  min-width: 0;
  color: var(--admin-text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-ticker-copy a:hover {
  color: var(--ts-purple);
  text-decoration: underline;
}

.dashboard-ticker-date {
  color: var(--admin-muted);
  white-space: nowrap;
}

.dashboard-ticker-button {
  flex: 0 0 auto;
  color: #fff !important;
}

/* ----------------------
   DASHBOARD PANELS
---------------------- */

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

.dashboard-panel {
  min-width: 0;
  padding: 1.15rem;
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-xl);
  box-shadow: var(--admin-shadow-md);
}

.dashboard-panel-wide {
  grid-column: 1 / -1;
}

.dashboard-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-panel-header h2 {
  margin: 0;
  color: var(--admin-text);
  font-size: 1.05rem;
  font-weight: 700;
}

.dashboard-panel-link {
  color: var(--admin-muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-panel-link:hover {
  color: var(--ts-purple);
  text-decoration: underline;
}

/* ----------------------
   DASHBOARD LISTS
---------------------- */

.dashboard-latest-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.dashboard-latest-item,
.dashboard-ranked-item {
  display: flex;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.8rem;
  background: #f9fafb;
  border: 1px solid var(--admin-border-soft);
  border-radius: 14px;
  color: var(--admin-text);
  text-decoration: none;
}

.dashboard-latest-item:hover,
.dashboard-ranked-link:hover {
  background: #f4f4f7;
  color: var(--ts-purple);
}

.dashboard-list-number {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0f766e;
  color: #fff;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
}

.dashboard-ranked-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dashboard-ranked-item strong {
  display: block;
  color: var(--admin-text);
  line-height: 1.35;
}

.dashboard-ranked-item span:not(.dashboard-list-number) {
  display: block;
  margin-top: 0.15rem;
  color: var(--admin-muted);
  font-size: 0.85rem;
}

/* ----------------------
   DASHBOARD HEALTH
---------------------- */

.dashboard-health-list {
  display: grid;
  gap: 0.65rem;
}

.dashboard-health-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  background: #f9fafb;
  border: 1px solid var(--admin-border-soft);
  border-radius: 14px;
}

.dashboard-health-item span {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef0f4;
  color: var(--admin-text);
  border-radius: 14px;
  font-weight: 700;
}

.dashboard-health-item.needs-attention {
  background: #fffaf0;
  border-color: #f6e2b6;
}

.dashboard-health-item.needs-attention span {
  background: #f59e0b;
  color: #fff;
}

.dashboard-health-item p {
  margin: 0;
  color: var(--admin-soft-text);
  line-height: 1.35;
}

.dashboard-empty-text {
  margin: 0;
  color: var(--admin-muted);
}

/* ----------------------
   DASHBOARD RESPONSIVE
---------------------- */

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

  .dashboard-latest-list {
    grid-template-columns: 1fr;
  }

  .dashboard-ticker-card {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
}

@media (max-width: 700px) {
  .dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem;
  }

  .dashboard-hero-main {
    align-items: flex-start;
  }

  .dashboard-hero-actions {
    width: 100%;
    flex-direction: column;
  }

  .dashboard-hero-actions .btn {
    width: 100%;
  }

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

  .dashboard-ticker-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-ticker-content {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
    width: 100%;
  }

  .dashboard-ticker-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
    width: 100%;
  }

  .dashboard-ticker-copy a {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  .dashboard-ticker-button {
    width: 100%;
  }

  .dashboard-panel {
    padding: 1rem;
  }

  .dashboard-panel-header {
    flex-direction: column;
    gap: 0.4rem;
  }
}

@media (max-width: 480px) {
  .dashboard-greeting-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 1.45rem;
  }

  .dashboard-hero h1 {
    font-size: 1.45rem;
  }

  .dashboard-latest-item,
  .dashboard-ranked-item,
  .dashboard-health-item {
    padding: 0.75rem;
  }
}

/* =========================================================
   TRUE MOBILE APP MODE
   Paste at the VERY BOTTOM of admin CSS
========================================================= */

@media (max-width: 991px) {
  html {
    font-size: 18px;
  }

  body {
    background: #f3f4f7;
    font-size: 1rem;
    -webkit-text-size-adjust: 100%;
  }

  .admin-shell {
    display: block;
    min-height: 100vh;
    background: #f3f4f7;
  }

  .admin-content {
    width: 100%;
    min-height: 100vh;
    background: #f3f4f7;
  }

  .admin-main,
  main {
    padding: 1rem;
    min-height: auto;
    background: #f3f4f7;
  }

  /* ----------------------
     APP TOP BAR
  ---------------------- */

  .topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 76px;
    padding: 0.85rem 1rem !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e6e7ee !important;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  }

  .admin-mobile-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
  }

  .admin-topbar-left {
    gap: 0.8rem;
  }

  .admin-topbar-actions {
    gap: 0.55rem !important;
  }

  .admin-mobile-sidebar-toggle,
  .admin-topbar-icon-link,
  .admin-topbar-button {
    width: 54px;
    height: 54px;
    min-width: 54px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    font-size: 1.35rem;
    box-shadow: none;
  }

  .admin-mobile-sidebar-toggle {
    background: var(--ts-purple);
    color: #fff;
  }

  .admin-mobile-sidebar-toggle span {
    display: none;
  }

  .admin-mobile-sidebar-toggle i {
    font-size: 1.55rem;
  }

  .admin-user-menu-button {
    width: 54px;
    height: 54px;
    padding: 0;
    border-radius: 18px;
    justify-content: center;
  }

  .admin-user-menu-name {
    display: none !important;
  }

  .admin-user-menu-avatar,
  .admin-user-menu-avatar-img {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }

  /* ----------------------
     FULL SCREEN APP MENU
  ---------------------- */

  .admin-shell .sidebar {
    position: fixed;
    inset: 0;
    width: 100vw !important;
    max-width: none !important;
    min-width: 0;
    height: 100vh;
    min-height: 100vh;
    z-index: 1050;
    padding: 1.4rem 1.2rem 2rem;
    background: var(--ts-purple);
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    overflow-y: auto;
    box-shadow: none;
  }

  body.admin-mobile-sidebar-open .admin-shell .sidebar {
    transform: translateX(0);
  }

  .admin-mobile-sidebar-overlay {
    display: none !important;
  }

  body.admin-mobile-sidebar-open {
    overflow: hidden;
  }

  .sidebar .sidebar-brand {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0 1.4rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .sidebar .sidebar-brand img {
    width: 170px !important;
    max-width: 60vw;
  }

  .admin-nav-heading {
    margin: 1.5rem 0 0.65rem;
    padding: 0 0.5rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.09em;
  }

  .sidebar .nav {
    gap: 0.65rem;
  }

  .sidebar .nav-link {
    min-height: 72px;
    padding: 1.1rem 1rem;
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.88) !important;
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.2;
  }

  .sidebar .nav-link:hover,
  .sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.16);
    color: #fff !important;
  }

  .admin-nav-label {
    gap: 1rem;
  }

  .admin-nav-label i {
    width: 34px;
    font-size: 1.55rem;
  }

  .admin-nav-badge {
    min-width: 32px;
    height: 32px;
    padding: 0 0.65rem;
    font-size: 0.95rem;
    font-weight: 800;
  }

  /* ----------------------
     APP-LIKE TYPOGRAPHY
  ---------------------- */

  h1,
  .dashboard-hero h1,
  .posts-hero h1,
  .messages-header h1,
  .message-compose-header h1,
  .message-title-row h1 {
    font-size: 2rem !important;
    line-height: 1.12;
    letter-spacing: -0.04em;
  }

  h2,
  .dashboard-panel-header h2,
  .compose-section-heading h2,
  .reply-panel-heading h2,
  .message-action-card h2,
  .message-details-card h2 {
    font-size: 1.35rem !important;
    line-height: 1.2;
  }

  p,
  .posts-hero-text,
  .dashboard-hero p:not(.dashboard-kicker),
  .compose-section-heading p,
  .reply-panel-heading p,
  .message-subtitle {
    font-size: 1.05rem;
    line-height: 1.55;
  }

  .dashboard-kicker,
  .dashboard-panel-kicker,
  .posts-kicker {
    font-size: 0.9rem;
    font-weight: 800;
  }

  /* ----------------------
     APP CARDS
  ---------------------- */

  .dashboard-hero,
  .dashboard-panel,
  .dashboard-ticker-card,
  .posts-hero,
  .posts-filter-card,
  .posts-table-shell,
  .compose-main-card,
  .compose-side-card,
  .message-card,
  .message-card-full,
  .reply-panel,
  .message-action-card,
  .message-details-card,
  .messages-toolbar,
  .messages-empty,
  .posts-empty {
    border-radius: 24px;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  }

  .dashboard-hero,
  .posts-hero,
  .dashboard-panel,
  .dashboard-ticker-card,
  .posts-filter-card,
  .compose-section,
  .compose-side-card,
  .reply-panel,
  .message-action-card,
  .message-details-card,
  .message-body-content {
    padding: 1.35rem;
  }

  .dashboard-grid,
  .dashboard-latest-list,
  .compose-grid,
  .message-view-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* ----------------------
     APP BUTTONS AND FORMS
  ---------------------- */

  .btn,
  .form-control,
  .form-select {
    min-height: 56px;
    font-size: 1.05rem;
    border-radius: 16px;
  }

  .btn {
    padding: 0.85rem 1rem;
    font-weight: 700;
  }

  .btn-sm {
    min-height: 48px;
    padding: 0.7rem 0.9rem;
    font-size: 1rem;
  }

  .form-label {
    font-size: 1.02rem;
    font-weight: 700;
  }

  /* ----------------------
     POSTS AS APP CARDS
  ---------------------- */

  .posts-table-header {
    display: none;
  }

  .posts-table-body {
    gap: 1rem;
    padding: 0;
  }

  .posts-table-shell {
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  .posts-table-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 24px;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  }

  .posts-table-title {
    font-size: 1.2rem;
    line-height: 1.3;
  }

  .posts-table-tagline {
    font-size: 1.02rem;
    line-height: 1.55;
  }

  .posts-table-meta,
  .posts-table-date {
    font-size: 0.95rem;
  }

  .posts-table-actions {
    width: 100%;
    justify-content: stretch;
  }

  .posts-table-actions .btn {
    flex: 1;
  }

  .post-type-pill,
  .post-featured-pill,
  .post-status-pill {
    padding: 0.42rem 0.75rem;
    font-size: 0.9rem;
  }

  /* ----------------------
     DASHBOARD APP FEEL
  ---------------------- */

  .dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-hero-main {
    align-items: flex-start;
    gap: 1rem;
  }

  .dashboard-greeting-icon {
    width: 66px;
    height: 66px;
    border-radius: 22px;
    font-size: 2rem;
  }

  .dashboard-hero-actions {
    width: 100%;
    flex-direction: column;
  }

  .dashboard-hero-actions .btn {
    width: 100%;
  }

  .dashboard-latest-item,
  .dashboard-ranked-item,
  .dashboard-health-item {
    padding: 1.15rem;
    border-radius: 20px;
  }

  .dashboard-list-number {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .dashboard-health-item span {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 1.1rem;
  }

  .dashboard-ranked-item strong,
  .dashboard-latest-item strong {
    font-size: 1.08rem;
  }

  .dashboard-ranked-item span:not(.dashboard-list-number),
  .dashboard-health-item p {
    font-size: 1rem;
  }

  /* ----------------------
     MESSAGES APP FEEL
  ---------------------- */

  .messages-tabs {
    width: 100%;
    padding: 0.45rem;
    border-radius: 999px;
  }

  .messages-tabs .nav-item {
    flex: 1;
  }

  .messages-tabs .nav-link {
    width: 100%;
    min-height: 54px;
    padding: 0.8rem 1rem;
    font-size: 1.05rem;
    font-weight: 800;
    text-align: center;
  }

  .message-card {
    grid-template-columns: 56px 1fr;
  }

  .message-card-main {
    padding: 1.2rem;
  }

  .message-card-sender,
  .message-card-subject {
    font-size: 1.12rem;
  }

  .message-card-date,
  .message-card-meta {
    font-size: 0.95rem;
  }

  .message-avatar {
    width: 58px;
    height: 58px;
    font-size: 1.2rem;
  }

  .message-body-content {
    font-size: 1.05rem;
  }
}

@media (max-width: 575px) {
  html {
    font-size: 19px;
  }

  .admin-main,
  main {
    padding: 0.9rem;
  }

  .topbar {
    min-height: 78px;
  }

  .admin-mobile-title {
    font-size: 1.3rem;
  }

  .sidebar .nav-link {
    min-height: 78px;
    font-size: 1.38rem;
    border-radius: 22px;
  }

  .admin-nav-label i {
    width: 38px;
    font-size: 1.7rem;
  }

  h1,
  .dashboard-hero h1,
  .posts-hero h1,
  .messages-header h1,
  .message-compose-header h1,
  .message-title-row h1 {
    font-size: 2.15rem !important;
  }

  .btn,
  .form-control,
  .form-select {
    min-height: 60px;
    font-size: 1.08rem;
  }
}