/* ==========================================================================
   XectiQ Admin — Modern UI Layer v3.6
   File: public/assets/css/admin-modern.css

   Load this file AFTER admin.css. It upgrades scale, spacing, typography,
   cards, forms, tables, responsive behavior, motion and branding while
   preserving the existing administration markup and logic.
   ========================================================================== */

:root {
  --adm-bg: #f4f6fa;
  --adm-card: #fff;
  --adm-ink: #142238;
  --adm-muted: #718096;
  --adm-line: #e3e8f0;
  --adm-blue: var(--admin-blue, #1a63e9);
  --adm-nav: #071629;
  --adm-radius: 16px;
  --adm-radius-lg: 22px;
  --adm-shadow: 0 12px 34px rgba(11, 31, 61, 0.07);
  --adm-shadow-lg: 0 24px 70px rgba(11, 31, 61, 0.12);
}
body {
  background: var(--adm-bg);
  color: var(--adm-ink);
  font-family:
    "Inter",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
.admin-shell {
  grid-template-columns: 260px minmax(0, 1fr);
}
.admin-sidebar {
  padding: 18px 13px;
  background:
    radial-gradient(circle at 20% 0, rgba(46, 119, 244, 0.22), transparent 30%),
    linear-gradient(180deg, #071629, #081d35);
  box-shadow: 10px 0 40px rgba(5, 20, 40, 0.06);
}
.admin-brand {
  min-height: 64px;
  gap: 12px;
  padding: 0 9px 18px;
}
.admin-brand > .admin-brand-visual {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, #337af0, #5e64f2);
  font-size: 13px;
}
.admin-brand strong {
  font-size: 13px;
  letter-spacing: -0.02em;
}
.admin-brand small {
  color: #7187a3;
  font-size: 8px;
}
.admin-sidebar nav {
  gap: 4px;
  margin-top: 18px;
}
.admin-sidebar nav a,
.admin-sidebar-footer a {
  min-height: 44px;
  gap: 11px;
  padding: 0 12px;
  border-radius: 12px;
  color: #a3b4c9;
  font-size: 10px;
  font-weight: 750;
}
.admin-sidebar nav a > span,
.admin-sidebar-footer a > span {
  width: 20px;
  display: grid;
  place-items: center;
  color: #6f89a7;
  font-size: 14px;
}
.admin-sidebar nav a:hover,
.admin-sidebar-footer a:hover {
  background: rgba(255, 255, 255, 0.07);
}
.admin-sidebar nav a.active {
  background: linear-gradient(
    135deg,
    rgba(55, 126, 245, 0.35),
    rgba(52, 93, 170, 0.18)
  );
  box-shadow:
    inset 3px 0 #5b95ff,
    0 8px 24px rgba(0, 0, 0, 0.08);
}
.admin-sidebar nav a.active > span {
  color: #8db6ff;
}

.admin-topbar {
  min-height: 72px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(224, 230, 238, 0.95);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px) saturate(160%);
}
.admin-topbar > div:nth-child(2) span {
  color: #8d99aa;
  font-size: 8px;
}
.admin-topbar > div:nth-child(2) strong {
  margin-top: 2px;
  font-size: 14px;
  letter-spacing: -0.02em;
}
.admin-topbar > button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--adm-line);
  border-radius: 12px;
  background: #fff;
  color: var(--adm-ink);
}
.admin-account > .admin-account-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #eaf2ff;
  color: var(--adm-blue);
}
.admin-account strong {
  font-size: 10px;
}
.admin-account small {
  color: #8a97a8;
  font-size: 8px;
}
.admin-content {
  max-width: 1480px;
  padding: 28px;
}
.admin-footer {
  min-height: 54px;
  padding: 0 28px;
  border-top: 1px solid var(--adm-line);
  color: #8b98a8;
}

.admin-page-heading {
  margin-bottom: 22px;
  align-items: end;
}
.admin-page-heading > div:first-child > span {
  color: var(--adm-blue);
  font-size: 8px;
  letter-spacing: 0.11em;
}
.admin-page-heading h1 {
  margin: 5px 0 4px;
  font-size: 31px;
  letter-spacing: -0.045em;
}
.admin-page-heading p {
  color: var(--adm-muted);
  font-size: 10px;
}

.admin-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid var(--adm-line);
  border-radius: 11px;
  background: #fff;
  color: #42536a;
  font-size: 9px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(10, 31, 63, 0.03);
  transition: 0.2s ease;
}
.admin-button:hover {
  transform: translateY(-1px);
  border-color: #bfcde0;
  color: var(--adm-blue);
}
.admin-button.primary {
  border-color: var(--adm-blue);
  background: var(--adm-blue);
  color: #fff;
  box-shadow: 0 10px 22px rgba(26, 99, 233, 0.2);
}
.admin-button.secondary {
  background: #f6f8fb;
}
.admin-button.danger {
  border-color: #efcbd1;
  background: #fff4f5;
  color: #ad3b4f;
}
.admin-button.ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.admin-alert {
  min-height: 50px;
  padding: 12px 14px;
  border-radius: 13px;
  font-size: 9px;
  box-shadow: 0 6px 18px rgba(10, 31, 63, 0.035);
}
.admin-alert.success {
  border-color: #c4e5d4;
  background: #f2faf6;
  color: #17674a;
}
.admin-alert.warning {
  border-color: #eadca8;
  background: #fff9e8;
  color: #785b09;
}
.admin-alert.error {
  border-color: #ebc7ce;
  background: #fff3f5;
  color: #9e394c;
}

.admin-content-card,
.admin-panel,
.admin-form-card,
.admin-table-card,
.admin-edit-card,
.admin-empty-card {
  border: 1px solid var(--adm-line);
  border-radius: var(--adm-radius-lg);
  background: #fff;
  box-shadow: var(--adm-shadow);
}
.admin-content-card,
.admin-panel,
.admin-form-card,
.admin-edit-card {
  padding: 20px;
}

.admin-stat-grid {
  gap: 14px;
}
.admin-stat-grid > * {
  overflow: hidden;
  position: relative;
  border: 1px solid var(--adm-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--adm-shadow);
}
.admin-stat-grid > *::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--adm-blue), #6f63f4);
}
.admin-stat-grid strong {
  letter-spacing: -0.04em;
}

.admin-dashboard-grid,
.admin-card-grid,
.admin-media-grid,
.branding-grid {
  gap: 16px;
}
.admin-quick-actions a {
  border-radius: 14px;
}
.admin-list > * {
  border-color: #edf0f5;
}

.admin-table-card {
  overflow: hidden;
}
.admin-table-toolbar {
  min-height: 58px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--adm-line);
  background: #fbfcfe;
}
.admin-table-toolbar input,
.admin-table-toolbar select {
  height: 38px;
  border: 1px solid var(--adm-line);
  border-radius: 10px;
  background: #fff;
  color: var(--adm-ink);
}
.admin-table-scroll {
  overflow: auto;
}
.admin-table-card table {
  min-width: 760px;
  border-collapse: collapse;
}
.admin-table-card th {
  padding: 11px 13px;
  background: #f8fafc;
  color: #7e8c9f;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.admin-table-card td {
  padding: 12px 13px;
  border-top: 1px solid #edf1f5;
  color: #42536a;
  font-size: 9px;
  vertical-align: middle;
}
.admin-table-card tbody tr:hover {
  background: #fbfdff;
}
.admin-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 7px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-status.published,
.admin-status.active,
.admin-status.completed {
  background: #ebf8f2;
  color: #166d4e;
}
.admin-status.draft,
.admin-status.pending {
  background: #fff7e8;
  color: #8b620e;
}
.admin-status.archived,
.admin-status.inactive {
  background: #f1f3f6;
  color: #667486;
}
.admin-status.rejected,
.admin-status.error {
  background: #fff0f2;
  color: #a9374b;
}

.admin-form-grid {
  gap: 15px;
}
.admin-form-card label > span,
.admin-edit-card label > span {
  margin-bottom: 5px;
  color: #5e6f84;
  font-size: 8px;
  font-weight: 800;
}
.admin-form-card input,
.admin-form-card select,
.admin-form-card textarea,
.admin-edit-card input,
.admin-edit-card select,
.admin-edit-card textarea,
.request-update-form select {
  border: 1px solid var(--adm-line);
  border-radius: 11px;
  background: #fff;
  color: var(--adm-ink);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.admin-form-card input,
.admin-form-card select,
.admin-edit-card input,
.admin-edit-card select {
  min-height: 42px;
}
.admin-form-card textarea,
.admin-edit-card textarea {
  min-height: 100px;
}
.admin-form-card input:focus,
.admin-form-card select:focus,
.admin-form-card textarea:focus,
.admin-edit-card input:focus,
.admin-edit-card select:focus,
.admin-edit-card textarea:focus {
  border-color: rgba(26, 99, 233, 0.48);
  box-shadow: 0 0 0 4px rgba(26, 99, 233, 0.07);
  outline: 0;
}
.upload-drop {
  border: 1px dashed #c7d1df;
  border-radius: 16px;
  background: #fafbfd;
}
.upload-drop:hover {
  border-color: #8fb2e8;
  background: #f6f9ff;
}
.admin-image-preview {
  overflow: hidden;
  border-radius: 14px;
  background: #f4f6f9;
}
.admin-image-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--adm-line);
  border-radius: 10px;
  background: #fff;
  color: #66778c;
}
.icon-button:hover {
  border-color: #b8c8dc;
  color: var(--adm-blue);
}
.inline-actions {
  gap: 6px;
}

.rich-toolbar {
  padding: 8px;
  border: 1px solid var(--adm-line);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #f8fafc;
}
.rich-toolbar button {
  border: 1px solid var(--adm-line);
  border-radius: 8px;
  background: #fff;
  color: #506178;
}
.rich-editor {
  min-height: 260px;
  padding: 15px;
  border: 1px solid var(--adm-line);
  border-radius: 0 0 12px 12px;
  background: #fff;
}

.admin-empty,
.admin-table-empty {
  padding: 30px;
  color: #78879a;
}
.activity-mark,
.quick-admin-mark,
.category-dot {
  box-shadow: none;
}

/* Login */
.login-body {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 10% 15%,
      rgba(51, 122, 240, 0.2),
      transparent 30%
    ),
    linear-gradient(135deg, #061427, #0a2748);
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 600px) minmax(0, 1fr);
  padding: 0;
}
.login-panel {
  width: auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: 18px 0 55px rgba(5, 20, 40, 0.12);
}
.login-art {
  background:
    radial-gradient(
      circle at 75% 20%,
      rgba(102, 139, 255, 0.25),
      transparent 35%
    ),
    linear-gradient(145deg, #0a2342, #0a315f);
}
.login-brand > span {
  border-radius: 13px;
}
.login-copy h1 {
  letter-spacing: -0.05em;
}
.login-form input {
  min-height: 46px;
  border: 1px solid var(--adm-line);
  border-radius: 12px;
}
.login-form input:focus {
  border-color: rgba(26, 99, 233, 0.5);
  box-shadow: 0 0 0 4px rgba(26, 99, 233, 0.08);
  outline: 0;
}

@media (max-width: 900px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    width: min(290px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.22s cubic-bezier(0.2, 0.75, 0.25, 1);
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.2);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-topbar > button {
    display: grid;
    place-items: center;
  }
  .admin-content {
    padding: 20px 16px;
  }
  .admin-topbar {
    padding: 0 16px;
  }
  .admin-account div {
    display: none;
  }
  .admin-footer {
    padding: 0 16px;
  }
  .admin-page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .admin-page-heading h1 {
    font-size: 27px;
  }
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-art {
    display: none;
  }
  .login-panel {
    width: 100%;
    max-width: 620px;
    min-height: 100vh;
    margin: auto;
    border-radius: 0;
  }
}
@media (max-width: 620px) {
  .admin-topbar {
    min-height: 64px;
  }
  .admin-topbar > div:nth-child(2) span {
    display: none;
  }
  .admin-content {
    padding-top: 18px;
  }
  .admin-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-form-grid,
  .admin-dashboard-grid,
  .admin-card-grid,
  .admin-media-grid,
  .branding-grid {
    grid-template-columns: 1fr !important;
  }
  .admin-content-card,
  .admin-panel,
  .admin-form-card,
  .admin-edit-card {
    padding: 16px;
    border-radius: 18px;
  }
  .admin-table-card {
    border-radius: 18px;
  }
  .admin-footer {
    display: grid;
    gap: 2px;
    padding-block: 12px;
  }
}

/* ==========================================================================
   XectiQ Admin UI — V3.0 Design System
   Purpose: legible 100% zoom, stronger hierarchy, better density and motion.
   This layer intentionally overrides the v1/v2 compatibility styles above.
   ========================================================================== */
:root {
  --adm-bg: #f3f6fb;
  --adm-bg-soft: #f8faff;
  --adm-card: #ffffff;
  --adm-card-soft: #fbfcff;
  --adm-ink: #10233f;
  --adm-ink-2: #2b405d;
  --adm-muted: #6b7d94;
  --adm-subtle: #8c9aae;
  --adm-line: #dce5f0;
  --adm-line-strong: #cbd7e5;
  --adm-blue: var(--admin-blue, #1769e8);
  --adm-blue-2: #0e58cb;
  --adm-blue-soft: #eaf2ff;
  --adm-nav: #071a30;
  --adm-nav-2: #0a2949;
  --adm-success: #14805e;
  --adm-warning: #b66b10;
  --adm-danger: #b53e53;
  --adm-radius-sm: 12px;
  --adm-radius: 16px;
  --adm-radius-lg: 22px;
  --adm-radius-xl: 28px;
  --adm-shadow-xs: 0 2px 10px rgba(17, 39, 71, 0.04);
  --adm-shadow: 0 14px 38px rgba(17, 39, 71, 0.07);
  --adm-shadow-lg: 0 26px 70px rgba(17, 39, 71, 0.13);
  --adm-ease: cubic-bezier(0.2, 0.75, 0.2, 1);
}

html {
  font-size: 16px;
}
body.admin-body {
  min-width: 320px;
  color: var(--adm-ink);
  background:
    radial-gradient(
      circle at 93% 0%,
      rgba(41, 112, 236, 0.075),
      transparent 24rem
    ),
    var(--adm-bg);
  font-size: 15px;
  line-height: 1.55;
}

/* Global interactive behavior */
.admin-body a,
.admin-body button,
.admin-body input,
.admin-body select,
.admin-body textarea,
.admin-body summary {
  transition:
    color 0.2s var(--adm-ease),
    background-color 0.2s var(--adm-ease),
    border-color 0.2s var(--adm-ease),
    box-shadow 0.2s var(--adm-ease),
    transform 0.2s var(--adm-ease),
    opacity 0.2s var(--adm-ease);
}
.admin-body button,
.admin-body summary,
.admin-body select {
  cursor: pointer;
}
.admin-body ::selection {
  background: rgba(23, 105, 232, 0.18);
}
.admin-body :focus-visible {
  outline: 3px solid rgba(23, 105, 232, 0.22);
  outline-offset: 3px;
}

/* App shell */
.admin-shell {
  grid-template-columns: 284px minmax(0, 1fr);
  background: transparent;
}
.admin-sidebar {
  width: auto;
  padding: 20px 16px 18px;
  background:
    radial-gradient(
      circle at 25% -5%,
      rgba(67, 139, 255, 0.24),
      transparent 22rem
    ),
    linear-gradient(180deg, #07172a 0%, #08233f 58%, #092946 100%);
  box-shadow: 12px 0 42px rgba(7, 28, 52, 0.08);
}
.admin-brand {
  min-height: 76px;
  gap: 13px;
  padding: 4px 10px 20px;
}
.admin-brand > .admin-brand-visual {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: linear-gradient(135deg, #3c84fb, #1b64df 65%, #685ef4);
  box-shadow: 0 12px 30px rgba(38, 112, 232, 0.31);
  font-size: 15px;
  letter-spacing: -0.03em;
}
.admin-brand strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.admin-brand small {
  margin-top: 4px;
  color: #8198b3;
  font-size: 11px;
  font-weight: 550;
}
.admin-sidebar nav {
  gap: 6px;
  margin-top: 21px;
}
.admin-sidebar nav a,
.admin-sidebar-footer a {
  min-height: 49px;
  gap: 12px;
  padding: 0 14px;
  border-radius: 13px;
  color: #afc0d5;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.admin-sidebar nav a > span,
.admin-sidebar-footer a > span {
  width: 22px;
  color: #7f9bb9;
  font-size: 15px;
}
.admin-sidebar nav a:hover,
.admin-sidebar-footer a:hover {
  background: rgba(255, 255, 255, 0.075);
  color: #fff;
  transform: translateX(2px);
}
.admin-sidebar nav a.active {
  background: linear-gradient(
    135deg,
    rgba(47, 122, 240, 0.44),
    rgba(42, 102, 194, 0.25)
  );
  color: #fff;
  box-shadow:
    inset 3px 0 #67a1ff,
    0 10px 24px rgba(0, 0, 0, 0.11);
}
.admin-sidebar nav a.active > span {
  color: #a4c7ff;
}
.admin-sidebar-footer {
  gap: 5px;
  padding-top: 16px;
}

.admin-topbar {
  min-height: 82px;
  gap: 17px;
  padding: 0 32px;
  border-bottom-color: rgba(214, 224, 237, 0.92);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(22px) saturate(155%);
}
.admin-topbar > button {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  font-size: 16px;
}
.admin-topbar > div:nth-child(2) span {
  color: #7c8da3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.105em;
}
.admin-topbar > div:nth-child(2) strong {
  margin-top: 2px;
  color: var(--adm-ink);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.admin-account {
  gap: 11px;
}
.admin-account > .admin-account-avatar {
  width: 43px;
  height: 43px;
  border-radius: 13px;
  background: linear-gradient(145deg, #edf4ff, #e4efff);
  box-shadow: inset 0 0 0 1px #dbe7fa;
  font-size: 13px;
}
.admin-account strong {
  font-size: 13px;
  font-weight: 750;
}
.admin-account small {
  margin-top: 2px;
  font-size: 11px;
}

.admin-main {
  background: transparent;
}
.admin-content {
  width: min(1600px, 100%);
  max-width: 1600px;
  padding: 34px 34px 44px;
}
.admin-footer {
  min-height: 62px;
  padding: 0 34px;
  color: #8997a8;
  font-size: 11px;
}

/* Page headings */
.admin-page-heading {
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
}
.admin-page-heading > div:first-child > span,
.admin-back {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.admin-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: var(--adm-blue);
  letter-spacing: 0.02em;
  text-transform: none;
}
.admin-page-heading h1 {
  margin: 7px 0 5px;
  font-size: clamp(34px, 2.25vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}
.admin-page-heading p {
  max-width: 760px;
  color: var(--adm-muted);
  font-size: 14px;
  line-height: 1.55;
}
.admin-page-heading > div:last-child {
  gap: 10px;
}

/* Buttons */
.admin-button {
  min-height: 46px;
  gap: 8px;
  padding: 0 17px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: var(--adm-shadow-xs);
}
.admin-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(19, 46, 84, 0.09);
}
.admin-button:active {
  transform: translateY(0) scale(0.985);
}
.admin-button.primary {
  background: linear-gradient(135deg, var(--adm-blue), #276ff0);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(23, 105, 232, 0.24);
}
.admin-button.primary:hover {
  background: linear-gradient(135deg, var(--adm-blue-2), #1b61da);
}
.admin-button.secondary {
  border-color: var(--adm-line-strong);
  background: rgba(255, 255, 255, 0.94);
  color: #314762;
}
.admin-button.ghost {
  background: #f4f7fb;
}
.admin-button.danger {
  background: #fff4f6;
}

/* Alerts */
.admin-alert {
  min-height: 58px;
  margin-bottom: 22px;
  padding: 14px 17px;
  border-radius: 15px;
  font-size: 13px;
  line-height: 1.55;
}

/* Cards / panels */
.admin-content-card,
.admin-panel,
.admin-form-card,
.admin-table-card,
.admin-edit-card,
.admin-empty-card {
  border-color: var(--adm-line);
  border-radius: var(--adm-radius-lg);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--adm-shadow);
}
.admin-panel,
.admin-content-card,
.admin-edit-card {
  transition:
    transform 0.22s var(--adm-ease),
    box-shadow 0.22s var(--adm-ease),
    border-color 0.22s var(--adm-ease);
}
.admin-content-card:hover {
  transform: translateY(-3px);
  border-color: #cbd9e9;
  box-shadow: 0 20px 50px rgba(17, 39, 71, 0.11);
}

/* Dashboard stats */
.admin-stat-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.admin-stat-grid > * {
  min-height: 128px;
  gap: 15px;
  padding: 20px;
  border-radius: 20px;
  border-color: var(--adm-line);
  box-shadow: var(--adm-shadow);
  transition:
    transform 0.22s var(--adm-ease),
    box-shadow 0.22s var(--adm-ease),
    border-color 0.22s var(--adm-ease);
}
.admin-stat-grid > *::after {
  height: 4px;
}
.admin-stat-grid > *:hover {
  transform: translateY(-4px);
  border-color: #ccdae9;
  box-shadow: 0 22px 48px rgba(17, 39, 71, 0.1);
}
.admin-stat-grid article > span,
.admin-stat-grid > * > span {
  width: 49px;
  height: 49px;
  border-radius: 14px;
  font-size: 19px;
}
.admin-stat-grid small {
  color: #7c8b9f;
  font-size: 12px;
  font-weight: 650;
}
.admin-stat-grid strong {
  margin-top: 5px;
  font-size: 34px;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.admin-dashboard-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(380px, 0.85fr);
  gap: 18px;
}
.admin-panel {
  min-height: 300px;
  padding: 23px;
}
.admin-panel > header {
  padding-bottom: 17px;
}
.admin-panel header span,
.admin-form-card header span {
  font-size: 10px;
  letter-spacing: 0.11em;
}
.admin-panel header h2,
.admin-form-card header h2 {
  margin-top: 5px;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.admin-panel header a {
  font-size: 12px;
  font-weight: 800;
}
.admin-list article {
  min-height: 72px;
  gap: 13px;
  padding: 12px 0;
}
.admin-list strong {
  font-size: 13px;
}
.admin-list small {
  margin-top: 4px;
  font-size: 11px;
}
.activity-mark {
  font-size: 28px;
}
.admin-empty {
  padding: 46px 16px;
  font-size: 13px;
}
.admin-quick-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.admin-quick-actions a {
  min-height: 100px;
  gap: 13px;
  padding: 18px;
  border-radius: 18px;
  box-shadow: var(--adm-shadow-xs);
  transition:
    transform 0.22s var(--adm-ease),
    border-color 0.22s var(--adm-ease),
    box-shadow 0.22s var(--adm-ease);
}
.admin-quick-actions a:hover {
  transform: translateY(-3px);
  border-color: #c6d7eb;
  box-shadow: var(--adm-shadow);
}
.admin-quick-actions a > span {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  font-size: 17px;
}
.admin-quick-actions strong {
  font-size: 13px;
}
.admin-quick-actions small {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.4;
}
.admin-quick-actions b {
  font-size: 18px;
}

/* Tables and searches */
.admin-table-card {
  overflow: hidden;
}
.admin-table-toolbar {
  min-height: 76px;
  gap: 18px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #fff, #fbfcfe);
}
.admin-table-toolbar > label {
  width: min(470px, 100%);
  height: 48px;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--adm-line-strong);
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(15, 40, 74, 0.02);
}
.admin-table-toolbar > label:focus-within {
  border-color: rgba(23, 105, 232, 0.58);
  box-shadow: 0 0 0 4px rgba(23, 105, 232, 0.08);
}
.admin-table-toolbar label span {
  color: #7e8fa5;
  font-size: 17px;
}
.admin-table-toolbar input {
  font-size: 14px;
}
.admin-table-toolbar > span {
  color: #7e8da1;
  font-size: 12px;
  font-weight: 750;
}
.admin-table-scroll {
  scrollbar-width: thin;
  scrollbar-color: #c8d5e4 transparent;
}
.admin-table-scroll table,
.admin-table-card table {
  min-width: 900px;
}
.admin-table-scroll th,
.admin-table-card th {
  padding: 14px 17px;
  background: #f7f9fc;
  color: #728197;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.075em;
}
.admin-table-scroll td,
.admin-table-card td {
  padding: 15px 17px;
  color: #425672;
  font-size: 13px;
  line-height: 1.45;
}
.admin-table-scroll td strong,
.admin-table-card td strong {
  color: var(--adm-ink);
  font-size: 13px;
  font-weight: 750;
}
.admin-table-scroll td small,
.admin-table-card td small {
  max-width: 340px;
  margin-top: 4px;
  color: #8290a3;
  font-size: 11px;
}
.admin-table-card tbody tr {
  transition: background-color 0.18s ease;
}
.admin-table-card tbody tr:hover {
  background: #f8fbff;
}
.admin-service-cell {
  gap: 13px;
}
.admin-service-cell img {
  width: 76px;
  height: 50px;
  border-radius: 11px;
  box-shadow: 0 4px 14px rgba(17, 39, 71, 0.1);
}
.admin-status {
  min-height: 29px;
  padding: 0 10px;
  font-size: 10px;
  letter-spacing: 0.055em;
}
.icon-button {
  width: 39px;
  height: 39px;
  border-radius: 11px;
  font-size: 14px;
}
.icon-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(17, 39, 71, 0.08);
}
.admin-table-empty {
  padding: 52px 20px;
  font-size: 13px;
}

/* Forms */
.admin-form-card > section {
  padding: 30px;
}
.admin-form-card > section + section {
  border-top-color: #e7edf4;
}
.admin-form-card header {
  margin-bottom: 22px;
}
.admin-form-card > footer {
  gap: 10px;
  padding: 19px 30px;
  background: #f8fafd;
}
.admin-form-grid {
  gap: 18px;
}
.admin-form-grid label > span,
.admin-media-grid label > span,
.admin-form-card label > span,
.admin-edit-card label > span {
  margin-bottom: 7px;
  color: #52677f;
  font-size: 12px;
  font-weight: 750;
}
.admin-form-grid input,
.admin-form-grid select,
.admin-form-grid textarea,
.admin-media-grid input,
.admin-media-grid select,
.admin-form-card input,
.admin-form-card select,
.admin-form-card textarea,
.admin-edit-card input,
.admin-edit-card select,
.admin-edit-card textarea,
.request-update-form select,
.request-update-form input {
  border-color: var(--adm-line-strong);
  border-radius: 13px;
  color: var(--adm-ink);
  font-size: 14px;
}
.admin-form-grid input,
.admin-form-grid select,
.admin-media-grid input,
.admin-form-card input,
.admin-form-card select,
.admin-edit-card input,
.admin-edit-card select {
  min-height: 48px;
  height: 48px;
  padding: 0 13px;
}
.admin-form-grid textarea,
.admin-form-card textarea,
.admin-edit-card textarea {
  min-height: 118px;
  padding: 12px 13px;
  line-height: 1.6;
}
.admin-form-grid small,
.admin-media-grid small,
.admin-form-card label small,
.admin-edit-card label small {
  margin-top: 6px;
  color: #8593a6;
  font-size: 11px;
  line-height: 1.55;
}
.admin-form-grid input:focus,
.admin-form-grid select:focus,
.admin-form-grid textarea:focus,
.admin-form-card input:focus,
.admin-form-card select:focus,
.admin-form-card textarea:focus,
.admin-edit-card input:focus,
.admin-edit-card select:focus,
.admin-edit-card textarea:focus {
  border-color: rgba(23, 105, 232, 0.58);
  box-shadow: 0 0 0 4px rgba(23, 105, 232, 0.085);
}
.checkbox-field {
  gap: 10px;
  min-height: 48px;
}
.checkbox-field input {
  width: 18px !important;
  height: 18px !important;
  accent-color: var(--adm-blue);
}
.admin-media-grid {
  gap: 24px;
}
.admin-image-preview {
  min-height: 230px;
  border-radius: 18px;
  font-size: 13px;
}
.admin-image-preview img {
  max-height: 320px;
  object-fit: cover;
}
.upload-drop {
  padding: 22px;
  border-radius: 17px;
}
.upload-drop:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(17, 39, 71, 0.06);
}
.upload-drop b {
  margin-top: 10px;
  font-size: 12px;
}
.narrow-form {
  max-width: 820px;
}
.color-field {
  grid-template-columns: 56px 1fr;
  gap: 9px;
}
.setting-preview-title {
  margin-bottom: 9px;
  font-size: 12px;
}
.logo-preview,
.favicon-preview {
  min-height: 180px;
}
.favicon-preview img {
  max-width: 88px;
  max-height: 88px;
}

/* Split pages / collapsible editors */
.admin-split {
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 20px;
}
.sticky-form {
  top: 104px;
}
.admin-stack {
  gap: 14px;
}
.admin-edit-card > summary {
  min-height: 92px;
  gap: 14px;
  padding: 15px 18px;
}
.admin-edit-card > summary:hover {
  background: #fbfdff;
}
.admin-edit-card summary strong {
  font-size: 14px;
}
.admin-edit-card summary small {
  margin-top: 4px;
  color: #8090a5;
  font-size: 11px;
}
.admin-edit-card summary > b {
  font-size: 16px;
  transition: transform 0.2s var(--adm-ease);
}
.admin-edit-card[open] summary > b {
  transform: rotate(180deg);
}
.admin-edit-card[open] summary {
  background: #f8fbff;
}
.admin-edit-card > form:not(.delete-inline) {
  padding: 24px;
}
.category-dot,
.quick-admin-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 11px;
}
.inline-actions {
  gap: 9px;
  margin-top: 18px;
}
.delete-inline {
  padding: 0 24px 22px;
}
.delete-inline button {
  font-size: 12px;
}

/* Content cards / promotions / images */
.admin-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.admin-content-card > img {
  height: 220px;
  transition: transform 0.35s var(--adm-ease);
}
.admin-content-card:hover > img {
  transform: scale(1.025);
}
.admin-content-card > div {
  padding: 21px;
}
.admin-content-card h2 {
  min-height: auto;
  margin: 13px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}
.admin-content-card p {
  min-height: auto;
  color: #65788f;
  font-size: 13px;
  line-height: 1.62;
}
.admin-content-card small {
  margin-top: 11px;
  font-size: 11px;
}
.admin-card-actions {
  gap: 8px;
  margin-top: 17px;
  padding-top: 16px;
}
.promotion-edit summary > img {
  width: 104px;
  height: 66px;
  border-radius: 12px;
}

/* Linked service documents */
.linked-service-documents > div:first-child,
.linked-service-documents article,
.service-assets-locked {
  border-radius: 15px;
}
.linked-service-documents > div:first-child strong,
.linked-service-documents article strong,
.service-assets-locked strong {
  font-size: 13px;
}
.linked-service-documents article span,
.service-assets-locked span {
  font-size: 11px;
}

/* Request management */
.request-admin-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 18px;
}
.request-admin-summary a {
  min-height: 94px;
  padding: 17px 18px;
  border-radius: 17px;
  box-shadow: var(--adm-shadow-xs);
}
.request-admin-summary a:hover {
  transform: translateY(-3px);
  border-color: #c8d8e9;
  box-shadow: var(--adm-shadow);
}
.request-admin-summary span {
  font-size: 12px;
}
.request-admin-summary strong {
  margin-top: 6px;
  font-size: 30px;
}
.request-filter select {
  height: 45px;
  padding: 0 35px 0 12px;
  border-radius: 12px;
  font-size: 13px;
}
.request-update-form {
  min-width: 430px;
  grid-template-columns: 125px minmax(150px, 1fr) auto;
  gap: 7px;
}
.request-update-form select,
.request-update-form input,
.request-update-form button {
  height: 40px;
  border-radius: 10px;
  font-size: 12px;
}
.request-update-form input {
  padding: 0 10px;
}
.request-update-form button {
  padding: 0 13px;
  border-color: var(--adm-blue);
  background: var(--adm-blue);
  color: #fff;
  font-weight: 800;
}

/* Rich editor */
.rich-editor-wrap {
  border-radius: 15px;
}
.rich-toolbar {
  gap: 7px;
  padding: 10px;
}
.rich-toolbar button {
  min-width: 38px;
  height: 36px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 12px;
}
.rich-editor {
  min-height: 420px;
  padding: 22px;
  font-size: 14px;
  line-height: 1.75;
}
.rich-editor h2 {
  font-size: 24px;
}

/* Password controls */
.password-field input {
  border-radius: 13px 0 0 13px !important;
}
.password-field button {
  width: 74px;
  border-radius: 0 13px 13px 0;
  font-size: 12px;
}

/* Empty states */
.admin-empty-card {
  padding: 58px 26px;
}
.admin-empty-card > span {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-size: 23px;
}
.admin-empty-card h2 {
  margin: 17px 0 7px;
  font-size: 20px;
}
.admin-empty-card p {
  font-size: 13px;
}

/* Login */
.login-shell {
  grid-template-columns: minmax(500px, 650px) minmax(0, 1fr);
}
.login-panel {
  padding: clamp(44px, 6vw, 92px);
}
.login-brand {
  gap: 12px;
  margin-bottom: 56px;
}
.login-brand > span {
  width: 49px;
  height: 49px;
  border-radius: 15px;
  font-size: 15px;
}
.login-brand strong {
  font-size: 15px;
}
.login-brand small {
  font-size: 11px;
}
.login-copy > span {
  font-size: 11px;
}
.login-copy h1 {
  margin: 10px 0 12px;
  font-size: clamp(40px, 4vw, 54px);
}
.login-copy p {
  margin-bottom: 30px;
  font-size: 14px;
}
.login-form {
  gap: 17px;
}
.login-form label > span {
  margin-bottom: 7px;
  font-size: 12px;
}
.login-form input {
  height: 50px;
  padding: 0 14px;
  border-radius: 13px;
  font-size: 14px;
}
.login-form > button {
  height: 50px;
  padding: 0 17px;
  border-radius: 13px;
  font-size: 13px;
}
.login-help {
  margin-top: 20px;
  font-size: 11px;
}
.login-back {
  margin-top: 28px;
  font-size: 12px;
}
.login-art {
  padding: 72px;
}
.login-art > div > span {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  font-size: 27px;
}
.login-art h2 {
  margin: 28px 0 22px;
  font-size: clamp(44px, 4vw, 62px);
}
.login-art ul {
  gap: 15px;
  font-size: 14px;
}

/* First-render motion for primary admin content. */
.admin-content > * {
  animation: admin-enter 0.42s var(--adm-ease) both;
}
.admin-content > *:nth-child(2) {
  animation-delay: 0.035s;
}
.admin-content > *:nth-child(3) {
  animation-delay: 0.07s;
}
.admin-content > *:nth-child(4) {
  animation-delay: 0.105s;
}
@keyframes admin-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Large desktop refinement */
@media (min-width: 1600px) {
  .admin-content {
    padding-left: 38px;
    padding-right: 38px;
  }
  .admin-stat-grid > * {
    min-height: 134px;
  }
  .admin-dashboard-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(420px, 0.8fr);
  }
}

@media (max-width: 1439px) {
  .admin-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .admin-sidebar {
    padding-inline: 13px;
  }
  .admin-sidebar nav a,
  .admin-sidebar-footer a {
    font-size: 13px;
  }
  .admin-content {
    padding: 30px 28px 40px;
  }
  .admin-topbar {
    padding-inline: 28px;
  }
  .admin-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .admin-stat-grid > * {
    min-height: 116px;
  }
  .admin-dashboard-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  }
}

@media (max-width: 1180px) {
  .admin-dashboard-grid {
    grid-template-columns: 1fr;
  }
  .admin-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-split {
    grid-template-columns: 380px minmax(0, 1fr);
  }
  .request-admin-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    width: min(310px, 88vw);
    padding: 18px 15px;
    box-shadow: 26px 0 70px rgba(2, 18, 38, 0.26);
  }
  .admin-sidebar nav a,
  .admin-sidebar-footer a {
    min-height: 50px;
    font-size: 14px;
  }
  .admin-topbar {
    min-height: 72px;
    padding: 0 18px;
  }
  .admin-topbar > button {
    display: grid;
    place-items: center;
  }
  .admin-content {
    padding: 24px 18px 36px;
  }
  .admin-footer {
    padding: 0 18px;
  }
  .admin-page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .admin-page-heading h1 {
    font-size: clamp(31px, 7vw, 38px);
  }
  .admin-page-heading > div:last-child {
    flex-wrap: wrap;
  }
  .admin-split {
    grid-template-columns: 1fr;
  }
  .sticky-form {
    position: static;
  }
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-panel {
    max-width: 680px;
  }
}

@media (max-width: 680px) {
  body.admin-body {
    font-size: 14px;
  }
  .admin-topbar > div:nth-child(2) span {
    display: none;
  }
  .admin-topbar > div:nth-child(2) strong {
    font-size: 14px;
  }
  .admin-account div {
    display: none;
  }
  .admin-content {
    padding: 21px 14px 32px;
  }
  .admin-page-heading {
    margin-bottom: 22px;
  }
  .admin-page-heading h1 {
    font-size: 30px;
  }
  .admin-page-heading p {
    font-size: 13px;
  }
  .admin-page-heading > div:last-child {
    width: 100%;
  }
  .admin-page-heading .admin-button {
    flex: 1 1 auto;
  }
  .admin-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .admin-stat-grid > * {
    min-height: 112px;
    padding: 16px 14px;
  }
  .admin-stat-grid article > span,
  .admin-stat-grid > * > span {
    width: 43px;
    height: 43px;
  }
  .admin-stat-grid strong {
    font-size: 29px;
  }
  .admin-quick-actions,
  .admin-card-grid,
  .admin-form-grid,
  .admin-media-grid,
  .branding-grid,
  .request-admin-summary {
    grid-template-columns: 1fr !important;
  }
  .admin-form-grid .wide {
    grid-column: auto;
  }
  .admin-panel {
    min-height: 0;
    padding: 18px;
  }
  .admin-content-card,
  .admin-panel,
  .admin-form-card,
  .admin-edit-card {
    border-radius: 18px;
  }
  .admin-form-card > section {
    padding: 22px 16px;
  }
  .admin-form-card > footer {
    padding: 15px 16px;
  }
  .admin-form-card > footer .admin-button {
    flex: 1;
  }
  .admin-table-toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 13px;
  }
  .admin-table-toolbar > label {
    width: 100%;
  }
  .admin-table-scroll th {
    font-size: 10px;
  }
  .admin-table-scroll td {
    font-size: 12px;
  }
  .admin-edit-card > summary {
    min-height: 82px;
    grid-template-columns: auto 1fr auto;
    padding: 13px 14px;
  }
  .admin-edit-card summary > .admin-status {
    display: none;
  }
  .category-dot,
  .quick-admin-mark {
    width: 46px;
    height: 46px;
  }
  .request-update-form {
    min-width: 380px;
  }
  .admin-footer {
    display: grid;
    gap: 3px;
    padding-block: 13px;
  }
  .login-panel {
    padding: 34px 22px;
  }
  .login-brand {
    margin-bottom: 42px;
  }
  .login-copy h1 {
    font-size: 36px;
  }
}

@media (max-width: 420px) {
  .admin-stat-grid {
    grid-template-columns: 1fr;
  }
  .admin-stat-grid > * {
    min-height: 96px;
  }
  .admin-quick-actions {
    grid-template-columns: 1fr;
  }
  .admin-button {
    min-height: 45px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-body *,
  .admin-body *::before,
  .admin-body *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 900px) {
  body.admin-nav-open {
    overflow: hidden;
  }
  body.admin-nav-open::after {
    content: "";
    position: fixed;
    z-index: 45;
    inset: 0;
    background: rgba(3, 16, 34, 0.48);
    backdrop-filter: blur(3px);
    animation: admin-overlay-in 0.18s ease both;
  }
  .admin-sidebar {
    z-index: 50;
  }
  .admin-topbar {
    z-index: 40;
  }
}
@keyframes admin-overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Structural safeguards for headings and compact legacy markup */
.admin-page-heading > div:first-child {
  display: block;
  min-width: 0;
}
.admin-page-heading > div:first-child > * {
  display: block;
}
.admin-page-heading > div:first-child > span,
.admin-page-heading > div:first-child > .admin-back {
  width: fit-content;
}
.admin-page-heading > div:last-child:empty {
  display: none;
}
.admin-table-card td.actions .icon-button {
  flex: 0 0 auto;
}
.activity-mark i {
  font-size: 8px;
}

/* ==============================================================
   ADMINISTRATION BRANDING — V3.5
   ==============================================================

   Used by:
   - Sidebar logo
   - Sidebar XQ fallback
   - Topbar account logo
   - Topbar account initial fallback

   Important:
   Older admin styles contain:

       .admin-brand > .admin-brand-visual { ... }

   That selector also matches .admin-brand-visual.

   The rules below intentionally override its background,
   border-radius and shadow so the wrapper itself remains neutral.
   ============================================================== */

/* ==============================================================
   SIDEBAR BRAND
   ============================================================== */

.admin-brand {
  display: flex;
  align-items: center;

  gap: 12px;
}

/* --------------------------------------------------------------
   Neutral sidebar logo wrapper

   Explicit selector specificity is important because older CSS
   targets direct span children of .admin-brand.
   -------------------------------------------------------------- */

.admin-brand > .admin-brand-visual {
  width: 48px;
  height: 48px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 48px;

  overflow: hidden;

  padding: 0;

  border: 0;
  border-radius: 14px;

  /*
     * Remove styles inherited from old:
     * .admin-brand > .admin-brand-visual
     */
  background: transparent;

  /*
     * No shadow on the outer logo/fallback wrapper.
     */
  box-shadow: none;

  color: inherit;

  font-size: inherit;
}

/* ==============================================================
   SIDEBAR — CONFIGURED LOGO
   ============================================================== */

.admin-brand-logo {
  display: block;

  width: 100%;
  height: 100%;

  padding: 5px;

  border: 0;
  border-radius: 14px;

  background: rgba(255, 255, 255, 0.96);

  object-fit: contain;
  object-position: center;

  /*
     * Logo remains clean and flat.
     */
  box-shadow: none;
}

/* ==============================================================
   SIDEBAR — XQ FALLBACK
   ============================================================== */

.admin-brand-mark {
  width: 100%;
  height: 100%;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin: 0;
  padding: 0;

  border: 0;
  border-radius: 14px;

  background: linear-gradient(135deg, #2f7bf6 0%, #1769e8 55%, #1757d7 100%);

  color: #ffffff;

  font-size: 14px;
  font-weight: 800;

  line-height: 1;

  letter-spacing: -0.03em;

  /*
     * Important:
     * User requested a flat fallback without shadow.
     */
  box-shadow: none;
}

/* ==============================================================
   SIDEBAR BRAND COPY
   ============================================================== */

.admin-brand-copy {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 2px;
}

.admin-brand-copy strong {
  overflow: hidden;

  color: #ffffff;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-brand-copy small {
  overflow: hidden;

  color: #8198b3;

  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==============================================================
   TOPBAR ACCOUNT
   ============================================================== */

.admin-account {
  display: flex;
  align-items: center;

  gap: 11px;

  margin-left: auto;
}

/* --------------------------------------------------------------
   Account avatar wrapper

   Supports either:
   - Website logo
   - Administrator initial
   -------------------------------------------------------------- */

.admin-account > .admin-account-avatar {
  width: 44px;
  height: 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 44px;

  overflow: hidden;

  margin: 0;
  padding: 0;

  border: 1px solid #dbe7fa;
  border-radius: 13px;

  background: linear-gradient(145deg, #edf4ff, #e4efff);

  color: var(--adm-blue);

  font-size: 13px;
  font-weight: 800;

  line-height: 1;

  /*
     * Keep the account icon visually flat.
     */
  box-shadow: none;
}

/* ==============================================================
   TOPBAR — LOGO STATE
   ============================================================== */

.admin-account > .admin-account-avatar.has-logo {
  padding: 4px;

  border-color: #dce5f0;

  background: #ffffff;
}

/* Configured logo */
.admin-account-logo {
  display: block;

  width: 100%;
  height: 100%;

  border-radius: 9px;

  object-fit: contain;
  object-position: center;

  background: #ffffff;

  box-shadow: none;
}

/* ==============================================================
   TOPBAR — INITIAL FALLBACK
   ============================================================== */

.admin-account-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  color: var(--adm-blue);

  font-size: 13px;
  font-weight: 800;

  line-height: 1;
}

/* ==============================================================
   TOPBAR ACCOUNT COPY
   ============================================================== */

.admin-account-copy {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 2px;
}

.admin-account-copy strong {
  max-width: 180px;

  overflow: hidden;

  color: var(--adm-ink);

  font-size: 13px;
  font-weight: 750;

  line-height: 1.3;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-account-copy small {
  max-width: 220px;

  overflow: hidden;

  color: #8594a8;

  font-size: 11px;
  font-weight: 500;

  line-height: 1.35;

  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==============================================================
   INTERACTION
   ============================================================== */

.admin-brand-logo,
.admin-account-logo {
  transition:
    transform 180ms var(--adm-ease),
    opacity 180ms var(--adm-ease);
}

.admin-brand:hover .admin-brand-logo {
  transform: scale(1.035);
}

.admin-account:hover .admin-account-logo {
  transform: scale(1.035);
}

/* ==============================================================
   TABLET / MOBILE
   ============================================================== */

@media (max-width: 900px) {
  .admin-brand > .admin-brand-visual {
    width: 46px;
    height: 46px;

    flex-basis: 46px;

    border-radius: 13px;
  }

  .admin-brand-logo,
  .admin-brand-mark {
    border-radius: 13px;
  }
}

/* ==============================================================
   SMALL MOBILE
   ============================================================== */

@media (max-width: 680px) {
  /*
     * Keep only the logo/avatar visible in the topbar when space
     * becomes limited.
     */

  .admin-account-copy {
    display: none;
  }

  .admin-account > .admin-account-avatar {
    width: 40px;
    height: 40px;

    flex-basis: 40px;

    border-radius: 12px;
  }

  .admin-account-logo {
    border-radius: 8px;
  }
}

/* ==============================================================
   VERY SMALL MOBILE
   ============================================================== */

@media (max-width: 420px) {
  .admin-brand > .admin-brand-visual {
    width: 44px;
    height: 44px;

    flex-basis: 44px;
  }

  .admin-account > .admin-account-avatar {
    width: 38px;
    height: 38px;

    flex-basis: 38px;
  }
}

/* ==========================================================================
   XectiQ Admin — Sidebar + Topbar Branding Final Layer v3.6
   ==========================================================================

   This block intentionally loads last. It fixes the legacy direct-span selector
   conflict, removes unwanted logo/text shadows, improves sidebar readability,
   and supports the configured logo in the topbar account area.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Sidebar brand
   -------------------------------------------------------------------------- */
.admin-sidebar .admin-brand {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar .admin-brand > .admin-brand-visual {
  width: 48px !important;
  height: 48px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit;
  font-size: inherit;
  line-height: 1;
}

.admin-sidebar .admin-brand-logo {
  display: block;
  width: 48px;
  height: 48px;
  padding: 4px;
  border: 0;
  border-radius: 14px;
  background: #ffffff;
  object-fit: contain;
  object-position: center;
  box-shadow: none !important;
  transition:
    transform 180ms var(--adm-ease),
    opacity 180ms var(--adm-ease);
}

.admin-sidebar .admin-brand-mark {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #2f7bf6 0%, #1769e8 55%, #1757d7 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  box-shadow: none !important;
}

/* Supports both the current <span> copy and the recommended <div> copy. */
.admin-sidebar .admin-brand > .admin-brand-copy {
  width: auto !important;
  height: auto !important;
  min-width: 0;
  display: flex !important;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit;
  font-size: inherit;
  letter-spacing: normal;
}

.admin-sidebar .admin-brand-copy strong {
  display: block;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: none;
}

.admin-sidebar .admin-brand-copy small {
  display: block;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: #91a7c0;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: none;
}

.admin-sidebar .admin-brand:hover .admin-brand-logo {
  transform: scale(1.025);
}

/* --------------------------------------------------------------------------
   Sidebar navigation typography and icons
   -------------------------------------------------------------------------- */
.admin-sidebar nav {
  gap: 6px;
  margin-top: 20px;
}

.admin-sidebar nav a,
.admin-sidebar-footer a {
  min-height: 50px;
  gap: 12px;
  padding: 0 14px;
  border-radius: 13px;
  color: #b6c7d9;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-shadow: none;
}

.admin-sidebar nav a > span,
.admin-sidebar-footer a > span {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #82a0bf;
  font-size: 15px;
  line-height: 1;
}

.admin-sidebar nav a > span i,
.admin-sidebar-footer a > span i {
  width: 18px;
  color: inherit;
  text-align: center;
}

.admin-sidebar nav a:hover,
.admin-sidebar-footer a:hover {
  background: rgba(255, 255, 255, 0.065);
  color: #ffffff;
  transform: translateX(2px);
  box-shadow: none;
}

.admin-sidebar nav a:hover > span,
.admin-sidebar-footer a:hover > span {
  color: #b5d2f4;
}

.admin-sidebar nav a.active {
  background: linear-gradient(
    135deg,
    rgba(42, 111, 221, 0.5),
    rgba(31, 85, 166, 0.32)
  );
  color: #ffffff;
  box-shadow: inset 3px 0 0 #65a1ff;
}

.admin-sidebar nav a.active > span {
  color: #b8d7ff;
}

.admin-sidebar nav a.active:hover {
  transform: none;
}

/* --------------------------------------------------------------------------
   Topbar account logo / fallback
   -------------------------------------------------------------------------- */
.admin-account {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-left: auto;
}

.admin-account > .admin-account-avatar {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 1px solid #dbe7fa;
  border-radius: 13px;
  background: linear-gradient(145deg, #edf4ff, #e4efff);
  color: var(--adm-blue);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
}

.admin-account > .admin-account-avatar.has-logo {
  padding: 4px;
  border-color: #dce5f0;
  background: #ffffff;
}

.admin-account-logo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 9px;
  background: #ffffff;
  object-fit: contain;
  object-position: center;
  box-shadow: none;
  transition:
    transform 180ms var(--adm-ease),
    opacity 180ms var(--adm-ease);
}

.admin-account:hover .admin-account-logo {
  transform: scale(1.025);
}

.admin-account-initial {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--adm-blue);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.admin-account-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-account-copy strong {
  max-width: 180px;
  overflow: hidden;
  color: var(--adm-ink);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-account-copy small {
  max-width: 220px;
  overflow: hidden;
  color: #8594a8;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Responsive branding
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .admin-sidebar .admin-brand > .admin-brand-visual,
  .admin-sidebar .admin-brand-logo,
  .admin-sidebar .admin-brand-mark {
    width: 46px !important;
    height: 46px !important;
  }

  .admin-sidebar .admin-brand > .admin-brand-visual {
    flex-basis: 46px;
  }
}

@media (max-width: 680px) {
  .admin-account-copy {
    display: none;
  }

  .admin-account > .admin-account-avatar {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 12px;
  }

  .admin-account-logo {
    border-radius: 8px;
  }
}

@media (max-width: 420px) {
  .admin-sidebar .admin-brand > .admin-brand-visual,
  .admin-sidebar .admin-brand-logo,
  .admin-sidebar .admin-brand-mark {
    width: 44px !important;
    height: 44px !important;
  }

  .admin-sidebar .admin-brand > .admin-brand-visual {
    flex-basis: 44px;
  }

  .admin-account > .admin-account-avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
}
