:root {
  --primary: #373478;
  --primary-glow: #4a46a3;
  --secondary: #f3a942;
  --background: #ffffff;
  --surface: #f0f5fb;
  --foreground: #0d0b07;
  --muted-foreground: #5a5670;
  --border: #e5eaf2;
  --success: #17803d;
  --danger: #dc2626;
  --warning: #b66a00;
  --radius: 6px;
  --sidebar-width: 276px;
  --sidebar-collapsed-width: 84px;
  --shadow-soft: 0 4px 20px -8px rgba(55, 52, 120, 0.18);
  --shadow-elegant: 0 14px 42px -18px rgba(55, 52, 120, 0.34);
  --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--surface);
  color: var(--foreground);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
textarea,
select {
  font: inherit;
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

button {
  border: 0;
}

.admin-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns var(--transition);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  min-width: 0;
  height: 100dvh;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(165deg, #29265f 0%, var(--primary) 54%, #454091 100%);
  color: #fff;
  box-shadow: 10px 0 30px rgba(26, 24, 67, 0.16);
  transition: width var(--transition), transform var(--transition), visibility var(--transition);
}

.sidebar-head {
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(8, 7, 36, 0.18);
}

.brand-mark img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand-copy,
.user-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.brand-copy {
  white-space: nowrap;
  transition: opacity var(--transition), width var(--transition);
}

.brand-copy strong {
  overflow: hidden;
  font-size: 0.98rem;
  font-weight: 800;
  text-overflow: ellipsis;
}

.brand-copy span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.73rem;
  letter-spacing: 0.04em;
}

.sidebar-collapse,
.topbar-menu,
.notification-link {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}

.sidebar-collapse {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-collapse:hover {
  background: rgba(243, 169, 66, 0.18);
  color: var(--secondary);
}

.sidebar-collapse svg,
.topbar-menu svg,
.notification-link svg,
.nav-icon svg,
.nav-chevron svg,
.menu-icon svg,
.menu-chevron svg {
  width: 19px;
  height: 19px;
}

.side-nav {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 7px;
  overflow-y: auto;
  padding: 18px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.side-link,
.nav-parent {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font-weight: 700;
  padding: 10px 12px;
  text-align: left;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}

.side-link:hover,
.nav-parent:hover,
.nav-group.is-open > .nav-parent {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.side-link.active {
  border-color: rgba(243, 169, 66, 0.35);
  background: var(--secondary);
  color: #17131a;
  box-shadow: 0 8px 22px rgba(14, 12, 47, 0.18);
}

.nav-icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
}

.nav-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nav-chevron {
  display: grid;
  margin-left: auto;
  place-items: center;
  color: rgba(255, 255, 255, 0.55);
  transition: transform var(--transition);
}

.nav-chevron svg {
  width: 16px;
  height: 16px;
}

.nav-group.is-open .nav-chevron {
  transform: rotate(90deg);
}

.nav-submenu {
  display: grid;
  max-height: 0;
  gap: 5px;
  overflow: hidden;
  opacity: 0;
  padding-left: 34px;
  pointer-events: none;
  transition: max-height 300ms ease, opacity var(--transition), margin var(--transition);
}

.nav-group.is-open .nav-submenu {
  max-height: 420px;
  margin: 6px 0 2px;
  opacity: 1;
  pointer-events: auto;
}

.nav-submenu .side-link {
  position: relative;
  min-height: 40px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 650;
  padding: 8px 11px;
}

.nav-submenu .side-link::before {
  position: absolute;
  left: -13px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  content: "";
}

.nav-submenu .side-link.active::before {
  background: var(--primary);
}

.nav-badge,
.notification-badge {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 999px;
  background: var(--secondary);
  color: #17131a;
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
}

.nav-badge {
  margin-left: auto;
}

.side-link.active .nav-badge {
  background: var(--primary);
  color: #fff;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  margin: 0 14px 14px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  font-weight: 700;
}

.sidebar-status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.13);
}

.sidebar-backdrop {
  display: none;
}

.admin-content {
  min-width: 0;
  padding: 18px clamp(16px, 2.2vw, 34px) 34px;
}

.admin-topbar {
  position: sticky;
  top: 12px;
  z-index: 45;
  display: flex;
  min-height: 66px;
  align-items: center;
  gap: 13px;
  margin-bottom: 24px;
  padding: 10px 12px 10px 18px;
  border: 1px solid rgba(229, 234, 242, 0.95);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.topbar-menu {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary);
}

.topbar-menu:hover,
.notification-link:hover {
  border-color: rgba(55, 52, 120, 0.24);
  background: rgba(55, 52, 120, 0.08);
}

.topbar-title {
  min-width: 0;
}

.topbar-kicker,
.panel-kicker {
  display: block;
  color: var(--primary);
  font-size: 0.69rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topbar-title h1 {
  overflow: hidden;
  margin: 0;
  color: var(--foreground);
  font-size: clamp(1.18rem, 2vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.22;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

.notification-link {
  position: relative;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--primary);
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  border: 2px solid #fff;
  font-size: 0.62rem;
}

.user-menu-wrapper {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--foreground);
  cursor: pointer;
  padding: 5px 9px 5px 6px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.user-menu-trigger:hover,
.user-menu-wrapper.is-open .user-menu-trigger {
  border-color: rgba(55, 52, 120, 0.32);
  box-shadow: 0 0 0 3px rgba(55, 52, 120, 0.08);
}

.user-badge {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  color: #fff;
  font-size: 0.83rem;
  font-weight: 900;
}

.user-name {
  max-width: 160px;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.user-role {
  color: var(--muted-foreground);
  font-size: 0.68rem;
}

.menu-chevron {
  color: var(--muted-foreground);
  transform: rotate(90deg);
  transition: transform var(--transition);
}

.menu-chevron svg {
  width: 14px;
  height: 14px;
}

.user-menu-wrapper.is-open .menu-chevron {
  transform: rotate(-90deg);
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  display: grid;
  width: 220px;
  gap: 3px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-elegant);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition);
}

.user-menu-wrapper.is-open .user-menu-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 0.84rem;
  font-weight: 700;
}

.user-menu-item:hover {
  background: var(--surface);
  color: var(--primary);
}

.user-menu-logout {
  color: var(--danger);
}

.menu-icon {
  display: grid;
  width: 20px;
  place-items: center;
}

.user-menu-divider,
.section-divider {
  width: 100%;
  height: 1px;
  margin: 4px 0;
  border: 0;
  background: var(--border);
}

.admin-page-region {
  position: relative;
  min-height: 260px;
}

.admin-page-region.is-loading [data-admin-page-content] {
  opacity: 0.42;
  pointer-events: none;
}

[data-admin-page-content] {
  transition: opacity 160ms ease;
}

.admin-content-loader {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}

.admin-content-loader[hidden] {
  display: none;
}

.admin-loader-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.admin-loader-logo {
  width: auto;
  height: 64px;
  animation: logoPulse 850ms ease-in-out infinite;
}

.admin-loader-spinner {
  width: 32px;
  height: 32px;
  border: 4px solid rgba(55, 52, 120, 0.8);
  border-top-color: var(--secondary);
  border-bottom-color: var(--secondary);
  border-radius: 50%;
  animation: admin-spin 700ms linear infinite;
}

@keyframes admin-spin {
  to { transform: rotate(360deg); }
}

@keyframes logoPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    opacity: 0.58;
    transform: scale(0.97);
    filter: brightness(1.18);
  }
}

.card,
.editor-panel,
.auth-card,
.stat-card,
.message-card,
.kv-item,
.static-setting-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.card {
  padding: clamp(18px, 2.2vw, 28px);
}

.card + .card,
.profile-shell > * + *,
.settings-grid > * + * {
  margin-top: 20px;
}

.card-heading-row,
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-heading,
.subheading,
.dashboard-section-title,
.chart-title {
  margin: 0;
  color: var(--foreground);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-heading {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.subheading {
  margin-bottom: 16px;
  font-size: 1rem;
}

.dashboard-section-title {
  margin: 4px 0 12px;
  color: var(--primary);
  font-size: 1.14rem;
}

.section-note,
.help-text,
.muted {
  color: var(--muted-foreground);
}

.section-note {
  max-width: 760px;
  margin: 5px 0 0;
  font-size: 0.88rem;
}

.help-text {
  font-size: 0.77rem;
}

.grid,
.form-grid,
.settings-grid,
.profile-grid,
.stats-grid,
.charts-row,
.resource-grid,
.kv-list,
.static-settings-grid {
  display: grid;
  gap: 18px;
}

.form-grid,
.two-column,
.profile-grid,
.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.compact-grid {
  gap: 14px;
}

.form-grid .full,
.settings-grid > .full {
  grid-column: 1 / -1;
}

.three-column {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.field label,
.field > span,
.label {
  color: #302d4f;
  font-size: 0.8rem;
  font-weight: 800;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="url"],
input[type="file"],
textarea,
select {
  width: 100%;
  min-height: 45px;
  border: 1px solid #d8e0ec;
  border-radius: var(--radius);
  outline: 0;
  background: #fff;
  color: var(--foreground);
  padding: 10px 12px;
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input[type="file"] {
  padding: 8px;
}

input::placeholder,
textarea::placeholder {
  color: #8a94a6;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #bfcadd;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(55, 52, 120, 0.11);
}

input:disabled,
textarea:disabled,
select:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.editor-panel {
  padding: 20px;
  box-shadow: none;
}

.section-divider {
  margin: 22px 0;
}

.actions,
.inline-actions,
.sticky-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.sticky-actions {
  position: sticky;
  bottom: 12px;
  z-index: 25;
  justify-content: flex-end;
  margin-top: 24px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-elegant);
}

.btn,
.icon-btn,
.filter-btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 9px 15px;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.btn-primary {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  color: #fff;
  box-shadow: 0 8px 20px -12px rgba(55, 52, 120, 0.75);
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-secondary,
.filter-btn {
  border-color: var(--border);
  background: #fff;
  color: var(--primary);
}

.btn-secondary:hover,
.filter-btn:hover {
  border-color: rgba(55, 52, 120, 0.28);
  background: rgba(55, 52, 120, 0.06);
}

.btn-danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  opacity: 0.9;
}

.icon-btn {
  width: 40px;
  min-width: 40px;
  padding: 8px;
  border-color: var(--border);
  background: #fff;
  color: var(--primary);
}

.icon-btn:hover {
  border-color: rgba(55, 52, 120, 0.3);
  background: var(--surface);
}

.inline-actions form {
  display: inline-flex;
  margin: 0;
}

.table-shell,
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

.data-table,
table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td,
th,
td {
  padding: 14px 15px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.data-table th,
th {
  background: #f8faff;
  color: #4f4b67;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td,
td {
  color: #25223d;
  font-size: 0.86rem;
}

.data-table tbody tr:last-child td,
tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover td {
  background: #fbfcff;
}

.status,
.static-pills span {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 850;
  padding: 4px 9px;
  white-space: nowrap;
}

.status-published,
.status-read {
  background: rgba(23, 128, 61, 0.1);
  color: var(--success);
}

.status-draft {
  background: rgba(90, 86, 112, 0.11);
  color: var(--muted-foreground);
}

.status-new {
  background: rgba(243, 169, 66, 0.17);
  color: #9a5900;
}

.empty-state {
  padding: 44px 20px;
  color: var(--muted-foreground);
  text-align: center;
}

.stats-grid,
.dashboard-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
}

.stat-card,
.stat-card-modern {
  display: flex;
  min-height: 106px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  border-color: rgba(55, 52, 120, 0.24);
  box-shadow: var(--shadow-elegant);
}

.stat-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.stat-info .label {
  color: var(--muted-foreground);
  font-size: 0.69rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stat-info .value {
  color: var(--foreground);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 850;
  line-height: 1;
}

.stat-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: var(--radius);
}

.stat-icon svg {
  width: 21px;
  height: 21px;
}

.charts-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

.charts-row-wide {
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
}

.chart-card {
  min-width: 0;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 310px;
}

.chart-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -8px 0 16px;
}

.filter-btn {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 0.75rem;
}

.filter-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.resource-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resource-card,
.message-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.message-card {
  margin-bottom: 14px;
}

.kv-list,
.static-settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kv-item,
.static-setting-card {
  padding: 16px;
}

.kv-item .label,
.static-setting-card .label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted-foreground);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kv-item .value,
.static-setting-card .value {
  overflow-wrap: anywhere;
  font-weight: 750;
}

.static-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.static-pills span {
  background: var(--surface);
  color: var(--primary);
}

.image-preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.preview-image {
  width: 76px;
  height: 58px;
  flex: 0 0 76px;
  border-radius: var(--radius);
  object-fit: cover;
}

.blog-section-block {
  position: relative;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fbfcff;
}

.list-clean {
  margin: 0;
  padding-left: 18px;
}

.auth-shell {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 12% 10%, rgba(243, 169, 66, 0.24), transparent 30%),
    radial-gradient(circle at 88% 90%, rgba(74, 70, 163, 0.3), transparent 34%),
    linear-gradient(145deg, #29265f, var(--primary));
}

.auth-card {
  width: min(100%, 460px);
  padding: clamp(22px, 5vw, 34px);
  box-shadow: 0 24px 70px rgba(13, 11, 60, 0.28);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.auth-brand img {
  width: 58px;
  height: 58px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  object-fit: contain;
  padding: 5px;
}

.auth-brand strong {
  display: block;
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 1.22rem;
  font-weight: 850;
}

.toast-viewport {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 120;
  display: grid;
  width: min(380px, calc(100vw - 28px));
  gap: 10px;
}

.toast {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  align-items: start;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-elegant);
  animation: toast-in 220ms ease both;
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }

.toast-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: var(--radius);
  font-weight: 900;
}

.toast-success .toast-icon {
  background: rgba(23, 128, 61, 0.1);
  color: var(--success);
}

.toast-error .toast-icon {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}

.toast-content strong {
  display: block;
  font-size: 0.86rem;
}

.toast-content p {
  margin: 2px 0 0;
  color: var(--muted-foreground);
  font-size: 0.78rem;
}

.toast-close {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 1.25rem;
}

.toast-close:hover {
  background: var(--surface);
  color: var(--foreground);
}

.toast-leaving {
  animation: toast-out 200ms ease both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateX(16px); }
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 14, 50, 0.52);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.confirm-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.confirm-dialog {
  display: grid;
  width: min(100%, 440px);
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 28px 80px rgba(10, 8, 45, 0.32);
  transform: translateY(8px) scale(0.98);
  transition: transform var(--transition);
}

.confirm-modal.is-open .confirm-dialog {
  transform: translateY(0) scale(1);
}

.confirm-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
  font-size: 1.2rem;
  font-weight: 900;
}

.confirm-dialog h2 {
  margin: 0;
  font-size: 1.1rem;
}

.confirm-dialog p {
  margin: 5px 0 0;
  color: var(--muted-foreground);
  font-size: 0.86rem;
}

.confirm-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 5px;
}

body.sidebar-collapsed .admin-shell {
  grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
}

body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .nav-text,
body.sidebar-collapsed .nav-badge,
body.sidebar-collapsed .nav-chevron,
body.sidebar-collapsed .sidebar-footer .nav-text,
body.sidebar-collapsed .nav-submenu {
  display: none;
}

body.sidebar-collapsed .sidebar-head,
body.sidebar-collapsed .brand,
body.sidebar-collapsed .side-link,
body.sidebar-collapsed .nav-parent,
body.sidebar-collapsed .sidebar-footer {
  justify-content: center;
}

body.sidebar-collapsed .sidebar-head {
  flex-direction: column;
  padding-inline: 10px;
}

body.sidebar-collapsed .brand {
  flex: 0;
}

body.sidebar-collapsed .side-nav {
  padding-inline: 10px;
}

body.sidebar-collapsed .side-link,
body.sidebar-collapsed .nav-parent {
  padding-inline: 10px;
}

body.sidebar-collapsed .sidebar-footer {
  margin-inline: 10px;
}

@media (max-width: 1180px) {
  .stats-grid,
  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .charts-row,
  .charts-row-wide {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1100px) {
  .admin-shell,
  body.sidebar-collapsed .admin-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(292px, 88vw);
    transform: translateX(-104%);
    visibility: hidden;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
    visibility: visible;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    width: 100%;
    height: 100%;
    background: rgba(15, 14, 50, 0.48);
    cursor: default;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.sidebar-collapsed .brand-copy,
  body.sidebar-collapsed .nav-text,
  body.sidebar-collapsed .nav-badge,
  body.sidebar-collapsed .nav-chevron,
  body.sidebar-collapsed .sidebar-footer .nav-text {
    display: initial;
  }

  body.sidebar-collapsed .nav-submenu {
    display: grid;
  }

  body.sidebar-collapsed .sidebar-head,
  body.sidebar-collapsed .brand,
  body.sidebar-collapsed .side-link,
  body.sidebar-collapsed .nav-parent,
  body.sidebar-collapsed .sidebar-footer {
    justify-content: flex-start;
  }

  body.sidebar-collapsed .sidebar-head {
    flex-direction: row;
    padding-inline: 16px;
  }

  body.sidebar-collapsed .brand {
    flex: 1;
  }

  body.sidebar-collapsed .side-nav {
    padding-inline: 14px;
  }

  body.sidebar-collapsed .side-link,
  body.sidebar-collapsed .nav-parent {
    padding-inline: 12px;
  }

  body.sidebar-collapsed .sidebar-footer {
    margin-inline: 14px;
  }

  .topbar-menu {
    display: inline-grid;
  }

  .admin-content {
    width: 100%;
    padding: 14px clamp(12px, 2.5vw, 24px) 28px;
  }

  .admin-topbar {
    top: 8px;
  }
}

@media (max-width: 760px) {
  .admin-content {
    padding-inline: 12px;
  }

  .admin-topbar {
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px;
  }

  .topbar-kicker,
  .user-info,
  .menu-chevron {
    display: none;
  }

  .user-menu-trigger {
    min-height: 42px;
    padding: 4px;
  }

  .form-grid,
  .two-column,
  .three-column,
  .profile-grid,
  .settings-grid,
  .kv-list,
  .static-settings-grid,
  .resource-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-heading-row,
  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .card-heading-row .actions,
  .page-header .actions {
    width: 100%;
  }

  .card-heading-row .btn,
  .page-header .btn {
    flex: 1;
  }

  .card {
    padding: 16px;
  }

  .stats-grid,
  .dashboard-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .chart-container {
    height: 250px;
  }

  .sticky-actions {
    bottom: 8px;
  }

  .sticky-actions .btn {
    flex: 1;
  }

  .data-table th,
  .data-table td,
  th,
  td {
    padding: 12px;
    white-space: nowrap;
  }

  td[data-wrap],
  .data-table td:nth-child(2) {
    min-width: 190px;
    white-space: normal;
  }
}

@media (max-width: 520px) {
  .topbar-title h1 {
    max-width: 44vw;
  }

  .notification-link,
  .topbar-menu,
  .user-badge {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .toast-viewport {
    top: 10px;
    right: 10px;
    width: calc(100vw - 20px);
  }

  .confirm-dialog {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 17px;
  }

  .confirm-icon {
    width: 38px;
    height: 38px;
  }

  .confirm-actions {
    flex-direction: column-reverse;
  }

  .confirm-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 2026 admin interface refresh */
:root {
  --primary: #2467d6;
  --primary-glow: #3385ed;
  --secondary: #f0a13a;
  --surface: #f4f7fb;
  --foreground: #172033;
  --muted-foreground: #667085;
  --border: #e3e8f0;
  --shadow-soft: 0 8px 24px -18px rgba(25, 52, 91, 0.28);
  --shadow-elegant: 0 20px 50px -26px rgba(25, 52, 91, 0.36);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

.brand-copy strong,
.topbar-title h1,
.section-heading,
.subheading,
.dashboard-section-title,
.chart-title,
.stat-info .value,
.auth-card h2,
.auth-visual-copy h1 {
  font-weight: 700;
}

.side-link,
.nav-parent,
.btn,
.icon-btn,
.filter-btn,
.user-menu-item,
.user-name,
.field label,
.field > span,
.label {
  font-weight: 600;
}

.sidebar {
  background: linear-gradient(180deg, #173d86 0%, #245fbf 100%);
  box-shadow: 8px 0 28px rgba(25, 52, 91, 0.12);
}

.side-link,
.nav-parent {
  position: relative;
  border: 0;
  color: rgba(255, 255, 255, 0.78);
}

.side-link:hover,
.nav-parent:hover,
.nav-group.is-open > .nav-parent {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.07);
}

.side-link.active {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: none;
}

.side-link.active::after {
  position: absolute;
  right: 12px;
  bottom: 5px;
  left: 12px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  content: "";
}

.nav-submenu .side-link.active::after {
  right: 11px;
  left: 11px;
  background: var(--secondary);
}

.nav-submenu .side-link.active::before {
  background: var(--secondary);
}

.side-link.active .nav-badge {
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary);
}

.admin-content {
  --content-gutter: clamp(16px, 2.2vw, 34px);
  padding: 0 var(--content-gutter) 34px;
}

.admin-topbar {
  position: static;
  top: auto;
  min-height: 74px;
  margin: 0 calc(var(--content-gutter) * -1) 26px;
  padding: 13px var(--content-gutter);
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.topbar-kicker,
.panel-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.topbar-title h1 {
  font-size: clamp(1.28rem, 2vw, 1.72rem);
}

.card,
.editor-panel,
.stat-card,
.message-card,
.kv-item,
.static-setting-card {
  box-shadow: var(--shadow-soft);
}

.card {
  padding: clamp(20px, 2.4vw, 30px);
}

.section-heading {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.section-note {
  font-size: 0.92rem;
}

.content-list-header {
  align-items: center;
  margin-bottom: 20px;
}

.content-list-header .btn {
  flex: 0 0 auto;
}

.btn,
.icon-btn,
.filter-btn {
  font-size: 0.88rem;
}

.btn-primary {
  background: var(--primary);
  box-shadow: 0 8px 18px -12px rgba(36, 103, 214, 0.8);
}

.btn-primary:hover {
  background: #1c59be;
  opacity: 1;
}

.icon-btn.btn-danger {
  border-color: rgba(220, 38, 38, 0.26);
  background: #fff;
  color: var(--danger);
  box-shadow: none;
}

.icon-btn.btn-danger:hover {
  border-color: rgba(220, 38, 38, 0.45);
  background: rgba(220, 38, 38, 0.07);
  color: #b91c1c;
  opacity: 1;
}

.chart-filters {
  margin: 0;
}

.chart-filters-right {
  justify-content: flex-end;
  margin-left: auto;
}

.filter-btn {
  position: relative;
  min-height: 36px;
  border-color: transparent;
  background: transparent;
  color: var(--muted-foreground);
  padding: 7px 11px;
}

.filter-btn:hover {
  border-color: transparent;
  background: rgba(36, 103, 214, 0.06);
  color: var(--primary);
}

.filter-btn.active {
  border-color: transparent;
  background: rgba(36, 103, 214, 0.08);
  color: var(--primary);
  box-shadow: inset 0 -2px 0 var(--primary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="url"],
input[type="file"],
textarea,
select {
  min-height: 49px;
  border-color: #dbe3ee;
  background: #fbfcfe;
  padding: 11px 14px;
}

textarea {
  min-height: 132px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(36, 103, 214, 0.1);
}

.field {
  gap: 8px;
}

.field label,
.field > span,
.label {
  color: #344054;
  font-size: 0.87rem;
}

.help-text {
  font-size: 0.81rem;
}

.modern-form {
  position: relative;
}

.modern-form .form-grid {
  gap: 20px;
}

.modern-form .section-heading {
  margin-top: 2px;
}

.modern-form input[type="file"] {
  border-style: dashed;
  background: #f8fbff;
}

.modern-form .checkbox-row {
  min-height: 44px;
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 8px 12px;
}

.modern-form > .actions:last-child,
.modern-form > .sticky-actions:last-child {
  margin-top: 22px !important;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.editor-panel.modern-form,
.settings-grid.modern-form .editor-panel {
  background: #fff;
}

.table-wrap,
.table-shell {
  border-color: var(--border);
  box-shadow: 0 8px 22px -22px rgba(25, 52, 91, 0.4);
}

.data-table th,
.data-table td,
th,
td {
  padding: 15px 16px;
}

.data-table th,
th {
  background: #f7f9fc;
  color: #667085;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.data-table td,
td {
  font-size: 0.9rem;
}

.empty-state-action {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px dashed #cfd8e6;
  border-radius: var(--radius);
  background: #fbfcfe;
  padding: 42px 24px;
}

.empty-state-action .empty-state-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: rgba(36, 103, 214, 0.09);
  color: var(--primary);
  font-size: 1.55rem;
  font-weight: 500;
}

.empty-state-action strong {
  color: var(--foreground);
  font-size: 1.08rem;
}

.empty-state-action p {
  max-width: 440px;
  margin: 0 0 8px;
  text-align: center;
}

/* Messages */
.messages-page {
  min-width: 0;
}

.inbox-count {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted-foreground);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
}

.message-list {
  display: grid;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.message-list-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  transition: background-color var(--transition), opacity var(--transition), transform var(--transition);
}

.message-list-item:last-child {
  border-bottom: 0;
}

.message-list-item:hover {
  background: #fbfcfe;
}

.message-list-item.is-unread {
  background: rgba(36, 103, 214, 0.035);
  box-shadow: inset 3px 0 0 var(--primary);
}

.message-list-item.is-removing,
tr.is-removing {
  opacity: 0;
  transform: translateX(12px);
}

.message-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: rgba(36, 103, 214, 0.1);
  color: var(--primary);
  font-weight: 700;
}

.message-avatar-large {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  font-size: 1.05rem;
}

.message-list-content {
  min-width: 0;
}

.message-list-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.message-list-heading h3 {
  margin: 0;
  color: var(--foreground);
  font-size: 1rem;
  font-weight: 700;
}

.message-list-heading span,
.message-list-heading time {
  color: var(--muted-foreground);
  font-size: 0.8rem;
}

.message-list-heading time {
  flex: 0 0 auto;
}

.message-list-content > p {
  display: -webkit-box;
  overflow: hidden;
  margin: 8px 0 10px;
  color: #475467;
  font-size: 0.9rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.message-list-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--muted-foreground);
  font-size: 0.78rem;
}

.message-list-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: center;
}

.message-list-actions form,
.message-thread-footer form {
  display: inline-flex;
  margin: 0;
}

.message-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 20px;
  align-items: start;
}

.message-thread-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.message-thread-header > .status {
  margin-left: auto;
}

.message-bubble {
  margin: 24px 0;
  border: 1px solid #dbe6f5;
  border-radius: var(--radius);
  background: #f6f9fe;
  color: #344054;
  padding: clamp(18px, 2.4vw, 26px);
  line-height: 1.8;
}

.message-response-actions,
.message-thread-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.message-thread-footer {
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.message-contact-card {
  position: sticky;
  top: 20px;
}

.contact-detail-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
}

.contact-detail-list > div {
  display: grid;
  gap: 3px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.contact-detail-list > div:last-child {
  border-bottom: 0;
}

.contact-detail-list span {
  color: var(--muted-foreground);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.contact-detail-list strong {
  overflow-wrap: anywhere;
  color: #344054;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Login */
.auth-page {
  min-height: 100dvh;
  background: #eef4fc;
}

.auth-shell {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: clamp(16px, 3vw, 38px);
  background:
    radial-gradient(circle at 8% 8%, rgba(36, 103, 214, 0.11), transparent 28%),
    radial-gradient(circle at 92% 88%, rgba(51, 133, 237, 0.12), transparent 30%),
    #eef4fc;
}

.auth-layout {
  display: grid;
  width: min(1180px, 100%);
  min-height: min(720px, calc(100dvh - 76px));
  grid-template-columns: minmax(0, 1.12fr) minmax(400px, 0.88fr);
  overflow: hidden;
  border: 1px solid rgba(211, 222, 238, 0.9);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 34px 90px -42px rgba(19, 54, 105, 0.48);
}

.auth-visual {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(28px, 4vw, 52px);
  background: #fff;
}

.auth-visual-brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 11px;
}

.auth-visual-logo {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.auth-visual-logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.auth-visual-brand strong,
.auth-visual-brand small {
  display: block;
}

.auth-visual-brand strong {
  color: var(--foreground);
  font-size: 0.98rem;
  font-weight: 700;
}

.auth-visual-brand small {
  color: var(--muted-foreground);
  font-size: 0.73rem;
}

.auth-illustration {
  position: relative;
  display: grid;
  min-height: 320px;
  flex: 1;
  place-items: center;
  margin: 20px 0 12px;
}

.illustration-window {
  position: relative;
  z-index: 2;
  width: min(430px, 78%);
  overflow: hidden;
  border: 1px solid #dce5f1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 26px 52px -28px rgba(26, 72, 137, 0.38);
  transform: perspective(900px) rotateY(-7deg) rotateX(2deg);
}

.illustration-window-bar {
  display: flex;
  gap: 6px;
  padding: 11px 13px;
  border-bottom: 1px solid #edf1f6;
  background: #fafcff;
}

.illustration-window-bar span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cfd8e6;
}

.illustration-window-body {
  display: grid;
  min-height: 220px;
  grid-template-columns: 72px 1fr;
}

.illustration-sidebar {
  background: linear-gradient(180deg, #1e5fc4, #2f80e8);
}

.illustration-content {
  padding: 24px;
  background: #f8fafd;
}

.illustration-heading {
  width: 46%;
  height: 11px;
  border-radius: 999px;
  background: #cbd6e5;
}

.illustration-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.illustration-stats i {
  height: 54px;
  border: 1px solid #e1e7f0;
  border-radius: 7px;
  background: #fff;
}

.illustration-chart {
  display: flex;
  height: 92px;
  align-items: flex-end;
  gap: 11px;
  margin-top: 18px;
  border: 1px solid #e1e7f0;
  border-radius: 7px;
  background: #fff;
  padding: 15px 18px;
}

.illustration-chart b {
  display: block;
  width: 14%;
  border-radius: 4px 4px 1px 1px;
  background: #4a90eb;
}

.illustration-chart b:nth-child(1) { height: 30%; }
.illustration-chart b:nth-child(2) { height: 55%; }
.illustration-chart b:nth-child(3) { height: 42%; }
.illustration-chart b:nth-child(4) { height: 78%; }
.illustration-chart b:nth-child(5) { height: 64%; }

.illustration-person {
  position: absolute;
  right: 7%;
  bottom: 12%;
  z-index: 3;
  width: 104px;
  height: 154px;
}

.illustration-head,
.illustration-body,
.illustration-arm {
  position: absolute;
  display: block;
}

.illustration-head {
  top: 0;
  left: 31px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f0b58f;
}

.illustration-body {
  top: 30px;
  left: 19px;
  width: 66px;
  height: 104px;
  border-radius: 28px 28px 12px 12px;
  background: linear-gradient(180deg, #1d5ebf, #173f87);
  transform: rotate(-4deg);
}

.illustration-arm {
  top: 58px;
  left: -5px;
  width: 62px;
  height: 18px;
  border-radius: 999px;
  background: #f0b58f;
  transform: rotate(-25deg);
}

.illustration-orbit {
  position: absolute;
  border: 1px solid rgba(36, 103, 214, 0.12);
  border-radius: 50%;
}

.illustration-orbit-one {
  width: 360px;
  height: 360px;
}

.illustration-orbit-two {
  width: 470px;
  height: 470px;
}

.auth-visual-copy {
  position: relative;
  z-index: 2;
  max-width: 560px;
}

.auth-eyebrow,
.auth-kicker {
  display: block;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-visual-copy h1 {
  margin: 8px 0 8px;
  color: var(--foreground);
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  line-height: 1.17;
  letter-spacing: -0.035em;
}

.auth-visual-copy p {
  max-width: 520px;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.98rem;
}

.auth-panel {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(26px, 4vw, 54px);
  background: linear-gradient(150deg, #1479e8 0%, #1d65cd 58%, #174da7 100%);
}

.auth-panel::before,
.auth-panel::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 50%;
  content: "";
}

.auth-panel::before {
  right: -130px;
  bottom: -180px;
  width: 420px;
  height: 420px;
}

.auth-panel::after {
  right: -80px;
  bottom: -125px;
  width: 320px;
  height: 320px;
}

.auth-card {
  position: relative;
  z-index: 2;
  width: min(100%, 440px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 10px;
  background: #fff;
  padding: clamp(28px, 4vw, 42px);
  box-shadow: 0 28px 70px -34px rgba(3, 37, 90, 0.65);
}

.auth-card h2 {
  margin: 7px 0 4px;
  color: var(--foreground);
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  letter-spacing: -0.025em;
}

.auth-intro {
  margin: 0 0 26px;
  color: var(--muted-foreground);
  font-size: 0.94rem;
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.auth-mobile-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.auth-mobile-brand strong {
  color: var(--foreground);
  font-size: 1rem;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 2;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #8a97aa;
  transform: translateY(-50%);
  pointer-events: none;
}

.auth-input-icon svg {
  width: 19px;
  height: 19px;
}

.auth-form input {
  min-height: 52px;
  padding-left: 44px;
}

.auth-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 2px;
}

.auth-security-note {
  margin: 20px 0 0;
  color: #8490a2;
  font-size: 0.76rem;
  text-align: center;
}

@media (max-width: 1100px) {
  .admin-content {
    --content-gutter: clamp(12px, 2.5vw, 24px);
    padding: 0 var(--content-gutter) 28px;
  }

  .admin-topbar {
    top: auto;
  }

  .auth-layout {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.9fr);
  }

  .illustration-person {
    right: 2%;
  }
}

@media (max-width: 900px) {
  .auth-shell {
    padding: 18px;
  }

  .auth-layout {
    width: min(560px, 100%);
    min-height: auto;
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-visual {
    display: none;
  }

  .auth-panel {
    min-height: calc(100dvh - 36px);
    padding: 24px;
  }

  .auth-mobile-brand {
    display: flex;
  }

  .message-detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .message-contact-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .admin-topbar {
    margin-bottom: 18px;
    padding: 10px var(--content-gutter);
  }

  .content-list-header {
    align-items: stretch;
  }

  .content-list-header .btn {
    width: 100%;
  }

  .chart-filters-right {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .message-list-item {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 15px;
  }

  .message-avatar {
    width: 42px;
    height: 42px;
  }

  .message-list-heading {
    display: grid;
    gap: 3px;
  }

  .message-list-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    padding-left: 56px;
  }

  .message-thread-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .message-thread-header > .status {
    margin-left: 68px;
  }

  .message-response-actions .btn,
  .message-thread-footer > .btn {
    flex: 1;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  .auth-shell {
    padding: 0;
  }

  .auth-layout {
    width: 100%;
    border: 0;
    border-radius: 0;
  }

  .auth-panel {
    min-height: 100dvh;
    padding: 18px;
  }

  .auth-card {
    padding: 26px 20px;
  }

  .message-list-actions {
    justify-content: stretch;
    padding-left: 0;
  }

  .message-list-actions .btn:not(.icon-btn) {
    flex: 1;
  }

  .message-thread-footer {
    align-items: stretch;
  }

  .message-thread-footer > .btn {
    width: calc(100% - 52px);
  }
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* Persistent admin header and unified loading indicator */
.admin-topbar{position:sticky!important;top:0!important;z-index:60!important;margin:0 calc(var(--content-gutter, 24px) * -1) 26px!important;}
.admin-content-loader .loader-spinner,.admin-content-loader::before{border-color:rgba(55,52,120,.22);border-top-color:var(--primary);border-right-color:var(--secondary);}
.table-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}.table-actions-heading{text-align:right}
