:root,
html[data-theme="akf-dark"] {
  color-scheme: dark;
  --akf-bg: #06101f;
  --akf-bg-alt: #0b203b;
  --akf-surface: rgba(10, 30, 55, .88);
  --akf-surface-soft: rgba(255, 255, 255, .055);
  --akf-surface-hover: rgba(255, 255, 255, .1);
  --akf-border: rgba(255, 255, 255, .15);
  --akf-text: #f7f9fc;
  --akf-muted: #b7c5d7;
  --akf-gold: #d8b76a;
  --akf-success: #32d583;
  --akf-warning: #fdb022;
  --akf-danger: #f97066;
  --akf-link: #8fc8ff;
  --akf-input-bg: rgba(3, 13, 27, .66);
  --akf-on-accent: #fff;
  --akf-focus: #8fc8ff;
  --akf-radius-sm: 10px;
  --akf-radius: 16px;
  --akf-radius-lg: 22px;
  --akf-shadow: 0 22px 60px rgba(0, 0, 0, .32);
  --akf-space: 8px;
  --akf-header-height: 78px;
  --akf-sidebar-collapsed: 72px;
  --akf-sidebar-expanded: 252px;
}

html[data-theme="light"] {
  color-scheme: light;
  --akf-bg: #eef7ff;
  --akf-bg-alt: #dceeff;
  --akf-surface: rgba(255, 255, 255, .94);
  --akf-surface-soft: #f5faff;
  --akf-surface-hover: #e5f2ff;
  --akf-border: #cfe2f3;
  --akf-text: #102a43;
  --akf-muted: #5d7890;
  --akf-gold: #9a6a10;
  --akf-success: #16794b;
  --akf-warning: #9a6700;
  --akf-danger: #b42318;
  --akf-link: #1769aa;
  --akf-input-bg: #fff;
  --akf-on-accent: #fff;
  --akf-focus: #1769aa;
  --akf-shadow: 0 18px 45px rgba(23, 105, 170, .12);
}

.akf-app-body,
.akf-app-shell {
  min-height: 100%;
}

.akf-app-body {
  margin: 0;
  color: var(--akf-text);
  background-color: var(--akf-bg);
  font-family: Bahnschrift, "Segoe UI", system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

.akf-app-shell {
  --akf-sidebar-width: var(--akf-sidebar-collapsed);
  --bs-body-color: var(--akf-text);
  --bs-body-bg: var(--akf-bg);
  --bs-secondary-color: var(--akf-muted);
  --bs-tertiary-color: var(--akf-muted);
  --bs-border-color: var(--akf-border);
  --bs-link-color: var(--akf-link);
  --bs-link-hover-color: color-mix(in srgb, var(--akf-link) 76%, var(--akf-text));
  --bs-emphasis-color: var(--akf-text);
  --bs-heading-color: var(--akf-text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--akf-text);
}

.akf-app-shell.is-expanded {
  --akf-sidebar-width: var(--akf-sidebar-expanded);
}

.akf-app-shell.is-minimal {
  --akf-sidebar-width: 0px;
}

.akf-app-shell.is-minimal .akf-app-main,
.akf-app-shell.is-minimal .akf-app-footer {
  margin-left: 0;
}

.akf-app-shell.is-minimal .akf-app-main {
  display: flow-root;
}

.akf-app-shell *,
.akf-app-shell *::before,
.akf-app-shell *::after {
  box-sizing: border-box;
}

.akf-app-topbar {
  position: fixed;
  z-index: 1040;
  inset: 0 0 auto 0;
  height: var(--akf-header-height);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px clamp(12px, 2.2vw, 24px);
  border-bottom: 1px solid var(--akf-border);
  background: color-mix(in srgb, var(--akf-surface) 92%, transparent);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.akf-app-brand {
  min-width: 0;
  height: 62px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--akf-text) !important;
  text-decoration: none !important;
}

.akf-app-brand__mark--wordmark {
  width: 64px;
  height: 62px;
  max-width: 64px;
  flex: 0 0 64px;
  display: grid;
  place-items: center;
  padding: 2px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #8fc8ff 28%, var(--akf-border));
  border-radius: 17px;
  background:
    radial-gradient(circle at 12% 50%, rgba(41, 154, 226, .16), transparent 38%),
    linear-gradient(135deg, #071a31, #0a2746);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .24);
}

.akf-app-brand__mark--wordmark img {
  display: block;
  width: 56px;
  height: 56px;
  max-width: 100%;
  object-fit: contain;
}

.akf-app-brand__copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.akf-app-brand__copy strong {
  color: var(--akf-text);
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 800;
  line-height: 1.05;
}

.akf-app-brand__copy > span {
  max-width: min(62vw, 520px);
  overflow: hidden;
  color: var(--akf-muted);
  font-size: clamp(11px, 1vw, 13px);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.akf-topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.akf-user-label {
  max-width: 280px;
  overflow: hidden;
  color: var(--akf-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.akf-icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--akf-border);
  border-radius: 13px;
  color: var(--akf-text);
  background: var(--akf-surface-soft);
  cursor: pointer;
  text-decoration: none;
}

.akf-icon-button:hover,
.akf-icon-button:focus-visible {
  border-color: color-mix(in srgb, var(--akf-gold) 55%, var(--akf-border));
  background: var(--akf-surface-hover);
  outline: none;
}

.akf-icon-button svg,
.akf-nav-icon svg {
  width: 20px;
  height: 20px;
}

.akf-theme-light-icon,
html[data-theme="light"] .akf-theme-dark-icon {
  display: none;
}

html[data-theme="light"] .akf-theme-light-icon {
  display: inline-flex;
}

.akf-mobile-menu {
  display: none;
}

.akf-app-sidebar {
  position: fixed;
  z-index: 1030;
  top: var(--akf-header-height);
  bottom: 0;
  left: 0;
  width: var(--akf-sidebar-width);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--akf-border);
  background: color-mix(in srgb, var(--akf-surface) 94%, transparent);
  overflow-x: hidden;
  overflow-y: auto;
  transition: width .2s ease, transform .2s ease;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.akf-sidebar-nav {
  display: grid;
  gap: 5px;
}

.akf-sidebar-tools {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--akf-border);
}

.akf-sidebar-tool {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.akf-nav-link {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--akf-muted) !important;
  text-decoration: none !important;
  white-space: nowrap;
}

.akf-nav-link:hover,
.akf-nav-link:focus-visible {
  color: var(--akf-text) !important;
  border-color: var(--akf-border);
  background: var(--akf-surface-hover);
  outline: none;
}

.akf-nav-link.is-active {
  color: var(--akf-text) !important;
  border-color: color-mix(in srgb, var(--akf-gold) 48%, transparent);
  background: color-mix(in srgb, var(--akf-gold) 14%, var(--akf-surface-soft));
}

.akf-nav-link.has-separator {
  margin-top: 8px;
  border-top-color: var(--akf-border);
}

.akf-nav-icon {
  width: 26px;
  min-width: 26px;
  display: inline-grid;
  place-items: center;
}

.akf-nav-label {
  opacity: 0;
  transition: opacity .14s ease;
}

.is-expanded .akf-nav-label {
  opacity: 1;
}

.akf-app-main {
  min-height: 0;
  flex: 1 0 auto;
  margin-left: var(--akf-sidebar-width);
  padding-top: calc(var(--akf-header-height) + 14px);
  transition: margin-left .2s ease;
}

.akf-app-footer {
  flex: 0 0 auto;
  margin-left: var(--akf-sidebar-width);
  padding: 22px 16px 26px;
  color: var(--akf-muted);
  text-align: center;
  font: 13px/1.5 Bahnschrift, "Segoe UI", system-ui, sans-serif;
  transition: margin-left .2s ease;
}

.akf-app-footer--compact {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  min-height: 52px;
  padding: 12px 18px;
  border-top: 1px solid var(--akf-border);
  background: color-mix(in srgb, var(--akf-surface) 72%, transparent);
}

.akf-app-footer--compact .akf-footer-legal {
  display: block;
  padding: 0;
  text-align: inherit;
}

.akf-footer-utility {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 13px;
}

.akf-footer-utility a {
  color: var(--akf-muted) !important;
  font-size: 12px;
  text-decoration: none;
}

.akf-footer-utility a:hover,
.akf-footer-utility a:focus-visible {
  color: var(--akf-link) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.akf-footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.akf-footer-social a {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--akf-border);
  border-radius: 11px;
  color: var(--akf-text) !important;
  background: var(--akf-surface-soft);
  text-decoration: none;
  transition: border-color .18s ease, color .18s ease, background-color .18s ease, transform .18s ease;
}

.akf-footer-social a:hover {
  color: var(--akf-link) !important;
  border-color: color-mix(in srgb, var(--akf-link) 48%, var(--akf-border));
  background: var(--akf-surface-hover);
  transform: translateY(-1px);
}

.akf-footer-social a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--akf-link) 48%, transparent);
  outline-offset: 3px;
}

.akf-footer-social svg {
  width: 21px;
  height: 21px;
}

.akf-footer-legal {
  display: grid;
  gap: 2px;
  max-width: 100%;
  padding-inline: 10px;
  text-align: center;
}

.akf-footer-legal p {
  margin: 0;
}

.akf-footer-legal p:first-child {
  color: var(--akf-text);
}

.akf-footer-creator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  margin-top: 10px;
  padding: 10px 14px 0;
  border-top: 1px solid var(--akf-border);
  color: var(--akf-muted);
  font-size: 12px;
  letter-spacing: .025em;
  text-align: center;
}

.akf-footer-creator__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.akf-footer-creator__link:hover .akf-footer-creator__brand,
.akf-footer-creator__link:focus-visible .akf-footer-creator__brand {
  color: var(--akf-link);
}

.akf-footer-creator__icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: var(--akf-link);
}

.akf-footer-creator__brand { color: var(--akf-text); }
.akf-footer-creator__brand strong { font-weight: 900; }

.akf-drawer-overlay {
  position: fixed;
  z-index: 1020;
  inset: 0;
  background: rgba(2, 8, 20, .64);
}

.akf-mobile-menu-float {
  position: fixed;
  z-index: 1025;
  top: 12px;
  left: 12px;
  box-shadow: var(--akf-shadow);
}

/* Shared cabinet form contrast contract for both moon and sun themes. */
.akf-app-shell :where(.form-label, label, legend) {
  color: var(--akf-text);
}

.akf-app-shell :where(.form-control, .form-select, .input-group-text) {
  color: var(--akf-text) !important;
  caret-color: var(--akf-text);
  border-color: var(--akf-border) !important;
  background-color: var(--akf-input-bg) !important;
}

.akf-app-shell :where(.form-control, textarea)::placeholder {
  color: var(--akf-muted) !important;
  opacity: .92;
}

.akf-app-shell .form-select option {
  color: var(--akf-text);
  background: var(--akf-surface);
}

.akf-app-shell :where(.form-control, .form-select):focus {
  color: var(--akf-text) !important;
  border-color: var(--akf-focus) !important;
  box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--akf-focus) 24%, transparent) !important;
}

.akf-app-shell :where(.form-control, .form-select):disabled,
.akf-app-shell :where(.form-control, textarea)[readonly] {
  color: var(--akf-muted) !important;
  background: var(--akf-surface-soft) !important;
  opacity: 1;
}

.akf-app-shell :where(.form-control, .form-select).is-invalid,
.akf-app-shell .was-validated :where(.form-control, .form-select):invalid {
  border-color: var(--akf-danger) !important;
}

.akf-app-shell .form-control:-webkit-autofill,
.akf-app-shell .form-control:-webkit-autofill:hover,
.akf-app-shell .form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--akf-text) !important;
  box-shadow: 0 0 0 1000px var(--akf-input-bg) inset !important;
  transition: background-color 9999s ease-out 0s;
}

html[data-theme="light"] body.akf-app-body,
html[data-theme="light"] body.akf-app-body.bg-dark,
html[data-theme="light"] body.akf-app-body.bg-light {
  color: var(--akf-text) !important;
  background-color: var(--akf-bg) !important;
}

html[data-theme="light"] .akf-app-shell {
  color: var(--akf-text) !important;
}

html[data-theme="light"] .akf-app-shell :where(h1, h2, h3, h4, h5, h6, legend, caption),
html[data-theme="light"] .akf-app-shell :where(.text-light, .text-white, .text-body, .fw-bold, .fw-semibold) {
  color: var(--akf-text) !important;
}

html[data-theme="light"] .akf-app-shell :where(.text-muted, .text-secondary, .small, small, .muted, .mini, .helper, .summary) {
  color: var(--akf-muted) !important;
}

html[data-theme="light"] .akf-app-shell a:not(.btn):not(.btnx):not(.akf-nav-link):not(.akf-app-brand):not(.akf-footer-social a) {
  color: var(--akf-link);
}

html[data-theme="light"] .akf-app-shell :where(.card, .cardx, .card-glass, .panel, .sheet, .box, .glass, .modal-content, .dropdown-menu, .list-group-item) {
  color: var(--akf-text);
  border-color: var(--akf-border);
  background-color: var(--akf-surface);
}

html[data-theme="light"] .akf-app-shell input,
html[data-theme="light"] .akf-app-shell select,
html[data-theme="light"] .akf-app-shell textarea {
  color: var(--akf-text) !important;
  border-color: var(--akf-border) !important;
  background-color: var(--akf-input-bg) !important;
}

html[data-theme="light"] .akf-app-shell input::placeholder,
html[data-theme="light"] .akf-app-shell textarea::placeholder {
  color: var(--akf-muted) !important;
  opacity: .9;
}

html[data-theme="light"] .akf-app-shell select option {
  color: var(--akf-text) !important;
  background: #fff !important;
}

html[data-theme="light"] .akf-app-shell :where(input, select, textarea, button, a):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--akf-focus) 38%, transparent);
  outline-offset: 2px;
}

html[data-theme="light"] .akf-app-shell table,
html[data-theme="light"] .akf-app-shell .card,
html[data-theme="light"] .akf-app-shell .cardx,
html[data-theme="light"] .akf-app-shell .card-glass,
html[data-theme="light"] .akf-app-shell .panel,
html[data-theme="light"] .akf-app-shell .topbar,
html[data-theme="light"] .akf-app-shell .quick-nav,
html[data-theme="light"] .akf-app-shell .tabs,
html[data-theme="light"] .akf-app-shell .kv,
html[data-theme="light"] .akf-app-shell .modal-content,
html[data-theme="light"] .akf-app-shell .dropdown-menu {
  color: var(--akf-text);
  border-color: var(--akf-border);
  background-color: var(--akf-surface);
}

html[data-theme="light"] .akf-app-shell table {
  --bs-table-color: var(--akf-text);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--akf-border);
  --bs-table-striped-color: var(--akf-text);
  --bs-table-striped-bg: var(--akf-surface-soft);
  --bs-table-hover-color: var(--akf-text);
  --bs-table-hover-bg: var(--akf-surface-hover);
}

html[data-theme="light"] .akf-app-shell :where(th, td) {
  color: var(--akf-text);
  border-color: var(--akf-border);
}

html[data-theme="light"] .akf-app-shell :where(.form-control, .form-select, .input-group-text) {
  color: var(--akf-text) !important;
  border-color: var(--akf-border) !important;
  background-color: var(--akf-input-bg) !important;
}

html[data-theme="light"] .akf-app-shell :where(.nav-tabs, .nav-pills) .nav-link:not(.active) {
  color: var(--akf-link) !important;
}

html[data-theme="light"] .akf-app-shell :where(.btn-primary, .btn-success, .btn-danger, .btn-dark, .btn-main, .primary, .green, .red) {
  color: var(--akf-on-accent) !important;
}

html[data-theme="light"] .akf-app-shell :where(.alert-warning, .btn-warning, .orange) {
  color: #3f2a00 !important;
}

html[data-theme="light"] .akf-app-shell .modal-backdrop {
  background-color: #142033;
}

/*
 * Legacy səhifələrdə inline və hətta !important ağ mətn qaydaları var.
 * JS real fon kontrastını ölçüb bu iki sinifdən yalnız lazım olanı əlavə edir.
 */
html[data-theme="light"] .akf-app-shell .akf-auto-contrast-dark {
  color: var(--akf-text) !important;
}

html[data-theme="light"] .akf-app-shell .akf-auto-contrast-light {
  color: #fff !important;
}

/* Functional icon allowlist. Branding, flags, charts, QR/barcodes and media are
 * deliberately outside this list, so their original colours are preserved. */
html[data-theme="light"] .akf-app-shell :is(
  .akf-nav-icon,
  .akf-icon-button,
  .menu-icon,
  .quick-icon,
  .dashboard-icon,
  .action-icon,
  .card-icon,
  .akf-platform-card-icon,
  .icon,
  .nav-icon,
  .tab,
  .mini,
  .page-link,
  .input-group-text,
  .btnx,
  .btn-pill,
  .btn-soft
) {
  color: #111 !important;
}

html[data-theme="light"] .akf-app-shell :is(
  .menu-icon,
  .quick-icon,
  .dashboard-icon,
  .action-icon,
  .card-icon,
  .akf-platform-card-icon
) {
  border-color: #b7d9f2 !important;
  background: #dff0ff !important;
}

html[data-theme="light"] .akf-app-shell :is(
  .akf-nav-icon,
  .akf-icon-button,
  .menu-icon,
  .quick-icon,
  .dashboard-icon,
  .action-icon,
  .card-icon,
  .akf-platform-card-icon,
  .icon,
  .nav-icon,
  .tab,
  .mini,
  .page-link,
  .input-group-text,
  .btnx,
  .btn-pill,
  .btn-soft
) svg {
  color: inherit !important;
  opacity: 1 !important;
  filter: none !important;
  stroke: currentColor !important;
}

html[data-theme="light"] .akf-app-shell :is(
  .akf-nav-icon,
  .akf-icon-button,
  .menu-icon,
  .quick-icon,
  .dashboard-icon,
  .action-icon,
  .card-icon,
  .akf-platform-card-icon,
  .icon,
  .nav-icon,
  .tab,
  .mini,
  .page-link,
  .input-group-text,
  .btnx,
  .btn-pill,
  .btn-soft
) svg :is(path, line, polyline, polygon, circle, rect, ellipse) {
  color: inherit !important;
  stroke: currentColor !important;
}

html[data-theme="light"] .akf-app-shell :is(
  .akf-nav-icon,
  .akf-icon-button,
  .menu-icon,
  .quick-icon,
  .dashboard-icon,
  .action-icon,
  .card-icon,
  .akf-platform-card-icon,
  .icon,
  .nav-icon,
  .tab,
  .mini,
  .page-link,
  .input-group-text,
  .btnx,
  .btn-pill,
  .btn-soft
) svg [fill]:not([fill="none"]) {
  fill: currentColor !important;
}

html[data-theme="light"] .akf-app-shell :is(
  .menu-link,
  .quick-link,
  .dashboard-card,
  .action-card,
  .akf-platform-card
) {
  color: var(--akf-text) !important;
  border-color: var(--akf-border) !important;
  background: var(--akf-surface) !important;
  box-shadow: 0 8px 24px rgba(19, 77, 119, .1) !important;
}

html[data-theme="light"] .akf-app-shell :is(
  .menu-link,
  .quick-link,
  .dashboard-card,
  .action-card,
  .akf-platform-card
):is(:hover, :focus-within) {
  color: var(--akf-text) !important;
  border-color: #7dbbe7 !important;
  background: #f7fbff !important;
}

/* Keep interface SVG icons compact throughout cabinet/admin pages. Logos,
 * uploaded media, charts, signatures, QR codes and barcodes are excluded. */
.akf-app-shell :is(
  .akf-nav-icon,
  .akf-icon-button,
  .menu-icon,
  .quick-icon,
  .dashboard-icon,
  .action-icon,
  .card-icon,
  .akf-platform-card-icon,
  .icon,
  .nav-icon,
  .tab,
  .mini,
  .page-link,
  .input-group-text,
  .btnx,
  .btn-pill,
  .btn-soft,
  .btn-main,
  .editbtn,
  .email-toggle-btn,
  .akf-photo-requirements__title,
  .search
) svg,
.akf-app-shell svg:is(.icon, .nav-icon, .action-icon, .card-icon) {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  flex: 0 0 20px;
}

/* Legacy dashboard/admin views assign white to every child with inline page
 * CSS. Keep functional controls readable without recolouring media or logos. */
html[data-theme="light"] .akf-app-shell :is(
  .notice,
  .vbadge,
  .license-icon-green,
  .label,
  .editbtn,
  .email-toggle-btn,
  .akf-photo-requirements__title,
  .brand-mark,
  .search
) svg,
html[data-theme="light"] .akf-app-shell .akf-app-footer svg {
  color: #111 !important;
  opacity: 1 !important;
  filter: none !important;
  stroke: currentColor !important;
}

html[data-theme="light"] .akf-app-shell :is(
  .notice,
  .vbadge,
  .license-icon-green,
  .label,
  .editbtn,
  .email-toggle-btn,
  .akf-photo-requirements__title,
  .brand-mark,
  .search
) svg [fill]:not([fill="none"]),
html[data-theme="light"] .akf-app-shell .akf-app-footer svg [fill]:not([fill="none"]) {
  fill: currentColor !important;
}

html[data-theme="light"] .akf-app-shell :is(
  .btn-primary,
  .btn-success,
  .btn-danger,
  .btn-dark,
  .btn-main,
  .primary,
  .green,
  .red
) :is(svg, svg *) {
  color: var(--akf-on-accent) !important;
  stroke: currentColor !important;
}

html[data-theme="akf-dark"] .akf-app-shell :where(
  .akf-nav-icon,
  .akf-icon-button,
  .icon,
  .nav-icon,
  .dashboard-icon,
  .quick-icon,
  .btnx,
  .btn-pill,
  .btn-soft,
  .btn-main
) svg {
  color: #fff;
  stroke: currentColor;
}

html[data-theme="light"] .akf-app-shell .small,
html[data-theme="light"] .akf-app-shell .muted,
html[data-theme="light"] .akf-app-shell .k,
html[data-theme="light"] .akf-app-shell .person-sub,
html[data-theme="light"] .akf-app-shell .summary,
html[data-theme="light"] .akf-app-shell .field label {
  color: var(--akf-muted) !important;
}

html[data-theme="light"] .akf-app-shell .btnx,
html[data-theme="light"] .akf-app-shell .tab,
html[data-theme="light"] .akf-app-shell .quick-link,
html[data-theme="light"] .akf-app-shell .page-link {
  color: var(--akf-text) !important;
  border-color: var(--akf-border);
  background: var(--akf-surface-soft);
}

html[data-theme="light"] .akf-app-shell .coach-table th,
html[data-theme="light"] .akf-app-shell .coach-table td {
  color: var(--akf-text);
  border-color: var(--akf-border);
}

html[data-theme="light"] .akf-app-shell .coach-table th {
  background: var(--akf-surface-soft);
}

html[data-theme="akf-dark"] .akf-certificates-admin .cardx,
html[data-theme="akf-dark"] .akf-certificates-admin .editor-wrap,
html[data-theme="akf-dark"] .akf-certificates-admin .ql-toolbar.ql-snow,
html[data-theme="akf-dark"] .akf-certificates-admin .smallbox {
  color: var(--akf-text);
  border-color: var(--akf-border);
  background: var(--akf-surface);
}

html[data-theme="akf-dark"] .akf-certificates-admin .ql-editor,
html[data-theme="akf-dark"] .akf-certificates-admin .form-label,
html[data-theme="akf-dark"] .akf-certificates-admin .section-title,
html[data-theme="akf-dark"] .akf-certificates-admin .helper,
html[data-theme="akf-dark"] .akf-certificates-admin .muted {
  color: var(--akf-text);
}

html[data-theme="akf-dark"] .akf-certificates-admin .ql-stroke {
  stroke: var(--akf-text);
}

html[data-theme="akf-dark"] .akf-certificates-admin .ql-fill {
  fill: var(--akf-text);
}

html[data-theme="akf-dark"] .akf-certificates-admin .ql-picker {
  color: var(--akf-text);
}

html[data-theme="akf-dark"] .akf-exam-manager {
  --ink: var(--akf-text);
  --muted: var(--akf-muted);
  --line: var(--akf-border);
  --soft: var(--akf-surface-soft);
  --blue: var(--akf-gold);
}

html[data-theme="akf-dark"] .akf-exam-manager .sheet,
html[data-theme="akf-dark"] .akf-exam-manager .sheetHead,
html[data-theme="akf-dark"] .akf-exam-manager .info,
html[data-theme="akf-dark"] .akf-exam-manager .athlete,
html[data-theme="akf-dark"] .akf-exam-manager .event,
html[data-theme="akf-dark"] .akf-exam-manager input,
html[data-theme="akf-dark"] .akf-exam-manager select,
html[data-theme="akf-dark"] .akf-exam-manager textarea,
html[data-theme="akf-dark"] .akf-exam-manager input[readonly] {
  color: var(--akf-text);
  border-color: var(--akf-border);
  background: var(--akf-surface);
}

html[data-theme="akf-dark"] .akf-event-accreditation-page {
  --card: var(--akf-surface);
  --line: var(--akf-border);
  --muted: var(--akf-muted);
  --text: var(--akf-text);
  --soft: var(--akf-surface-soft);
}

html[data-theme="akf-dark"] .akf-event-accreditation-page .cardx,
html[data-theme="akf-dark"] .akf-event-accreditation-page .photo-thumb,
html[data-theme="akf-dark"] .akf-event-accreditation-page .photo-preview-admin,
html[data-theme="akf-dark"] .akf-event-accreditation-page .crop-preview,
html[data-theme="akf-dark"] .akf-event-accreditation-page .modal-content,
html[data-theme="akf-dark"] .akf-event-accreditation-page .table thead th {
  color: var(--akf-text);
  border-color: var(--akf-border);
  background: var(--akf-surface);
}

.akf-app-shell td,
.akf-app-shell .person,
.akf-app-shell .value,
.akf-app-shell .kv .v {
  overflow-wrap: anywhere;
  word-break: normal;
}

.akf-app-shell .license-workflow-panel {
  position: relative;
  margin-top: 12px;
  padding: 14px 16px;
  overflow: hidden;
  border-color: rgba(84, 190, 255, .5) !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(70, 205, 255, .2), transparent 42%),
    linear-gradient(135deg, rgba(17, 91, 160, .38), rgba(3, 38, 78, .72)) !important;
  box-shadow: 0 18px 44px rgba(0, 31, 69, .26), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.akf-app-shell .license-workflow-head {
  align-items: center;
  padding: 0 0 12px;
  border-bottom-color: rgba(128, 211, 255, .24);
}

.akf-app-shell .license-workflow-copy {
  min-width: 0;
  max-width: 850px;
  display: grid;
  gap: 5px;
}

.akf-app-shell .license-workflow-copy > strong {
  font-size: 16px;
  letter-spacing: .01em;
}

.akf-app-shell .license-workflow-audience {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid rgba(123, 216, 255, .42);
  border-radius: 999px;
  color: #dff6ff;
  background: rgba(21, 136, 201, .24);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.akf-app-shell .license-workflow-stats {
  margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  border-color: rgba(128, 211, 255, .18);
  background: rgba(1, 29, 60, .22);
}

html[data-theme="light"] .akf-app-shell .license-workflow-panel {
  border-color: #7dbfe8 !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(86, 183, 232, .2), transparent 44%),
    linear-gradient(135deg, #e4f4ff, #cfeaff) !important;
  box-shadow: 0 18px 42px rgba(20, 96, 143, .14), inset 0 1px 0 rgba(255, 255, 255, .9);
}

html[data-theme="light"] .akf-app-shell .license-workflow-audience {
  color: #0b4f7b !important;
  border-color: #86c5eb;
  background: #d7efff;
}

html[data-theme="light"] .akf-app-shell .license-workflow-head {
  border-bottom-color: rgba(23, 105, 170, .2);
}

html[data-theme="light"] .akf-app-shell .license-workflow-stats {
  border-color: rgba(23, 105, 170, .16);
  background: rgba(255, 255, 255, .42);
}

@media (max-width: 600px) {
  .akf-app-shell .license-workflow-panel {
    padding: 12px;
  }

  .akf-app-shell .license-workflow-head .btnx {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .akf-app-shell :where(input, select, textarea) {
    box-sizing: border-box;
    max-width: 100%;
    font-size: 16px;
  }

  .akf-app-shell :where(.container, .container-fluid, .row, .card, .cardx, .panel, .glass) {
    min-width: 0;
  }

  .akf-mobile-menu {
    display: inline-grid;
  }

  .akf-desktop-collapse,
  .akf-user-label {
    display: none;
  }

  .akf-app-sidebar {
    width: min(86vw, 310px);
    transform: translateX(-104%);
    box-shadow: var(--akf-shadow);
  }

  .akf-app-shell.is-drawer-open .akf-app-sidebar {
    transform: translateX(0);
  }

  .akf-nav-label {
    opacity: 1;
  }

  .akf-app-main,
  .akf-app-footer {
    margin-left: 0;
  }

  .akf-app-main {
    padding-top: calc(var(--akf-header-height) + 12px);
  }

  .akf-app-footer--compact {
    min-height: 0;
    padding: 11px 12px;
  }
}

@media (max-width: 420px) {
  :root {
    --akf-header-height: 68px;
  }

  .akf-icon-button {
    width: 40px;
    height: 40px;
  }

  .akf-app-topbar {
    gap: 8px;
    padding-inline: 10px;
  }

  .akf-app-brand {
    height: 52px;
    gap: 9px;
  }

  .akf-app-brand__mark--wordmark {
    width: 52px;
    height: 52px;
    max-width: 52px;
    flex-basis: 52px;
    border-radius: 14px;
  }

  .akf-app-brand__mark--wordmark img {
    width: 46px;
    height: 44px;
  }

  .akf-app-brand__copy strong {
    font-size: 15px;
  }

  .akf-app-brand__copy > span {
    max-width: min(42vw, 220px);
    font-size: 10px;
    white-space: normal;
  }
}

@media print {
  html,
  body,
  .akf-app-body {
    color: #000 !important;
    background: #fff !important;
  }

  .akf-app-topbar,
  .akf-mobile-menu,
  .akf-app-sidebar,
  .akf-drawer-overlay,
  .akf-app-footer {
    display: none !important;
  }

  .akf-app-main {
    margin: 0 !important;
    padding: 0 !important;
  }
}
