/* =========================================================
   KF39 PORTAL UI SYSTEM
   Visual-only refinements. No application logic is changed.
   ========================================================= */
:root {
  color-scheme: light;
  --kf-ink: #14243a;
  --kf-muted: #64748b;
  --kf-brand: #087bb5;
  --kf-brand-dark: #075985;
  --kf-line: #e4eaf2;
  --kf-surface: #ffffff;
  --kf-canvas: #f3f6fb;
  --kf-radius: 18px;
  --kf-shadow: 0 8px 28px rgba(15, 35, 62, .055);
  --kf-shadow-hover: 0 14px 34px rgba(15, 35, 62, .09);
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--kf-canvas);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  height: auto;
  overflow-x: hidden;
  background: var(--kf-canvas);
  color: var(--kf-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(8, 123, 181, .18);
  color: #0b2942;
}

:focus-visible {
  outline: 3px solid rgba(14, 165, 233, .34);
  outline-offset: 2px;
}

/* Login */
#login-view {
  background:
    radial-gradient(circle at 12% 14%, rgba(255,255,255,.15), transparent 27%),
    radial-gradient(circle at 90% 84%, rgba(14,165,233,.24), transparent 30%),
    linear-gradient(135deg, #075985 0%, #087bb5 48%, #0c4a6e 100%) !important;
}

#login-view > .relative.w-full.max-w-5xl {
  max-width: 1080px;
  min-height: 610px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 28px;
  box-shadow: 0 32px 90px rgba(3, 24, 48, .28);
}

#login-view > .relative.w-full.max-w-5xl > div:first-child {
  padding: clamp(28px, 4vw, 48px);
}

#login-view > .relative.w-full.max-w-5xl > div:last-child {
  background:
    radial-gradient(circle at 86% 12%, rgba(14,165,233,.20), transparent 30%),
    linear-gradient(145deg, #0b1b34 0%, #0a2b53 54%, #06446e 100%);
}

#login-view input {
  min-height: 48px;
  border-radius: 13px;
  border-width: 1.5px;
  border-color: #d7e4ef;
  background: #fbfdff;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

#login-view input:focus {
  border-color: #0786c5;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(8, 123, 181, .10);
}

#login-submit-btn {
  min-height: 50px;
  border-radius: 13px;
  background: linear-gradient(110deg, #087bb5, #0b91d0);
  box-shadow: 0 10px 22px rgba(8, 123, 181, .22);
  letter-spacing: .055em;
}

#login-submit-btn:hover {
  background: linear-gradient(110deg, #066b9f, #087bb5);
  box-shadow: 0 13px 26px rgba(8, 123, 181, .28);
  transform: translateY(-1px);
}

/* Dashboard canvas and layout */
#dashboard-view {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--kf-canvas);
}

#dashboard-view > div.flex-1 {
  min-width: 0;
  min-height: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--kf-canvas);
}

#dashboard-view main {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(16px, 2.2vw, 32px);
  background:
    radial-gradient(circle at 100% 0%, rgba(14,165,233,.045), transparent 28%),
    var(--kf-canvas);
}

#dashboard-view .app-page-view {
  width: 100%;
  max-width: 1680px;
  margin-inline: auto;
}

/* Sidebar */
#main-sidebar {
  width: 272px;
  background:
    radial-gradient(circle at 0% 0%, rgba(14,165,233,.12), transparent 30%),
    linear-gradient(180deg, #101f36 0%, #0c1a2f 52%, #0a1729 100%) !important;
  border-right: 1px solid rgba(148, 163, 184, .13) !important;
  box-shadow: 12px 0 32px rgba(8, 22, 40, .055);
}

#main-sidebar > div > div:first-child {
  min-height: 76px;
  padding: 17px 18px;
  border-bottom-color: rgba(148,163,184,.14);
}

#main-sidebar img {
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.18));
}

#sidebar-user-card {
  margin: 14px 12px 16px;
  padding: 12px;
  border-radius: 15px;
  background: rgba(255,255,255,.055) !important;
  border-color: rgba(148,163,184,.16) !important;
}

#sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(245,158,11,.15) !important;
}

#sidebar-menu-list {
  padding: 8px 12px 14px;
  scrollbar-color: rgba(148,163,184,.3) transparent;
}

#sidebar-menu-heading,
#sidebar-action-separator {
  padding: 13px 11px 8px;
  color: #8293aa;
  font-size: 9px;
  letter-spacing: .13em;
}

.sidebar-nav-item {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #c2cede;
  font-size: 12px;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.sidebar-nav-item:hover {
  background: rgba(255,255,255,.075);
  border-color: rgba(148,163,184,.12);
  color: #fff;
  transform: translateX(2px);
}

.sidebar-nav-item.active {
  background: linear-gradient(110deg, rgba(8,123,181,.34), rgba(37,99,235,.20)) !important;
  border: 1px solid rgba(56,189,248,.30) !important;
  color: #fff !important;
  box-shadow: inset 3px 0 0 #38bdf8, 0 6px 18px rgba(2,132,199,.10);
}

#main-sidebar > div > div:last-child {
  padding: 14px 12px 16px;
  border-top-color: rgba(148,163,184,.14);
}

#main-sidebar button[onclick="handleLogout()"] {
  min-height: 42px;
  border-radius: 12px;
  background: rgba(190, 24, 93, .12);
  border-color: rgba(251,113,133,.22);
}

/* Top bar */
#dashboard-view header {
  min-height: 70px;
  padding: 12px clamp(16px, 2.2vw, 32px);
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid #e7edf4;
  box-shadow: 0 4px 18px rgba(15,35,62,.035);
  backdrop-filter: blur(14px);
}

#page-header-title {
  color: #13243a;
  font-size: clamp(13px, 1.15vw, 16px);
  letter-spacing: -.02em;
}

#page-header-badge {
  border-radius: 999px;
  background: #eff6ff;
  border-color: #dbeafe;
  color: #1d4ed8;
}

#cloud-sync-status {
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 11px;
  background: #effaf5;
  border-color: #d3f0df;
  color: #16734b;
}

/* Content surfaces */
#dashboard-view .app-page-view .bg-white[class*="rounded-"]:not(#pdf-printable-category-board):not(#pdf-printable-winner) {
  border-color: var(--kf-line);
  box-shadow: var(--kf-shadow);
}

#dashboard-view .app-page-view .bg-white[class*="rounded-"]:not(#pdf-printable-category-board):not(#pdf-printable-winner):hover {
  box-shadow: var(--kf-shadow-hover);
}

#dashboard-view .app-page-view h3 {
  letter-spacing: -.025em;
}


/* KPI cards */
#dashboard-view #view-main-judging section.grid > div {
  position: relative;
  min-height: 108px;
  padding: 17px 18px;
  border: 1px solid var(--kf-line);
  border-radius: 16px;
  background: linear-gradient(155deg, #fff 0%, #fbfdff 100%);
  box-shadow: 0 5px 18px rgba(15,35,62,.045);
  transition: transform .18s ease, box-shadow .18s ease;
}

#dashboard-view #view-main-judging section.grid > div:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15,35,62,.075);
}

#dashboard-view #view-main-judging section.grid > div p {
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
}

/* Search, filters and form controls */
#dashboard-view input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
#dashboard-view select,
#dashboard-view textarea {
  min-height: 40px;
  border-color: #dce5ef;
  border-radius: 11px;
  background-color: #fff;
  color: #1e293b;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

#dashboard-view input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
#dashboard-view select:focus,
#dashboard-view textarea:focus {
  border-color: #38a3d4;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(8,123,181,.11);
}

#dashboard-view input::placeholder,
#dashboard-view textarea::placeholder {
  color: #9aa8b8;
}

#dashboard-view label {
  letter-spacing: .015em;
}

#dashboard-view button {
  -webkit-tap-highlight-color: transparent;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

#dashboard-view button:focus-visible,
#login-view button:focus-visible {
  outline: 3px solid rgba(14,165,233,.36);
  outline-offset: 2px;
}

#dashboard-view button:not(:disabled):active {
  transform: translateY(1px);
}

/* Tables */
#dashboard-view table:not(#pdf-printable-category-board table):not(#pdf-printable-winner table):not(#view-medal-eo table) {
  border-collapse: separate;
  border-spacing: 0;
  color: #26364a;
}

#dashboard-view table:not(#pdf-printable-category-board table):not(#pdf-printable-winner table):not(#view-medal-eo table) thead th {
  background: #f5f8fc;
  color: #5b6b80;
  border-bottom: 1px solid #e3eaf2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .075em;
  line-height: 1.45;
  vertical-align: middle;
}

#dashboard-view table:not(#pdf-printable-category-board table):not(#pdf-printable-winner table):not(#view-medal-eo table) tbody td {
  border-bottom: 1px solid #edf1f6;
  vertical-align: middle;
}

#dashboard-view table:not(#pdf-printable-category-board table):not(#pdf-printable-winner table):not(#view-medal-eo table) tbody tr:last-child td {
  border-bottom: 0;
}

#dashboard-view table:not(#pdf-printable-category-board table):not(#pdf-printable-winner table):not(#view-medal-eo table) tbody tr:hover {
  background: #f8fbff;
}

#main-judging-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

#main-judging-table th,
#main-judging-table td {
  padding: 12px 13px;
}

#main-judging-table td {
  line-height: 1.5;
}

#main-judging-table .table-input {
  min-height: 34px;
  border-radius: 9px;
}

/* Category tabs and compact filter controls */
#category-tabs-container > button,
#category-tabs-container > div {
  flex-shrink: 0;
}

#category-tabs-container button {
  min-height: 38px;
  border-radius: 11px;
  font-weight: 700;
}

#table-mode-header {
  background: linear-gradient(90deg, #eff8ff, #f7fbff);
  border-bottom-color: #dceefa;
}

#dashboard-view .overflow-x-auto {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

/* Modal surfaces */
#modal-manual-awards,
#score-modal,
#confirmation-modal,
#confirm-assignment-modal,
#import-participant-modal,
#edit-judge-account-modal,
#admin-edit-modal,
#add-participant-modal,
#welcome-stream-modal,
#photo-modal,
#server-loading-overlay,
#confirm-modal,
#assignment-reset-confirm-modal {
  padding: clamp(12px, 3vw, 24px);
}

#modal-manual-awards > div,
#score-modal > div,
#confirmation-modal > div,
#confirm-assignment-modal > div,
#import-participant-modal > div,
#edit-judge-account-modal > div,
#admin-edit-modal > div,
#add-participant-modal > div,
#welcome-stream-modal > div,
#photo-modal > div,
#confirm-modal > div,
#assignment-reset-confirm-modal > div {
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(2, 12, 27, .25);
}

#dashboard-view #toast-banner {
  border-radius: 13px;
  border: 1px solid var(--kf-line);
  box-shadow: 0 8px 24px rgba(15,35,62,.08);
}

/* Progress and status indicators */
#dashboard-view [role="progressbar"],
#dashboard-view .rounded-full.overflow-hidden {
  overflow: hidden;
}

#dashboard-view .animate-pulse {
  animation-duration: 2.2s;
}

/* Small screen refinements */
@media (max-width: 1024px) {
  #main-sidebar {
    width: min(84vw, 300px) !important;
    max-width: 300px !important;
    border-right: 1px solid rgba(148,163,184,.2) !important;
  }

  #dashboard-view > div.flex-1 {
    width: 100%;
  }
}

@media (max-width: 768px) {
  #dashboard-view header {
    min-height: 62px;
    padding: 10px 13px;
  }

  #dashboard-view main {
    padding: 15px 12px 24px;
  }

  #dashboard-view .app-page-view {
    gap: 16px;
  }

  #dashboard-view .app-page-view .bg-white[class*="rounded-"]:not(#pdf-printable-category-board):not(#pdf-printable-winner) {
    border-radius: 15px;
  }

  #dashboard-view #view-main-judging section.grid > div {
    min-height: 96px;
    padding: 13px;
  }

  #cloud-sync-status {
    padding: 5px 8px;
    font-size: 9px;
  }

  #main-judging-cards-mobile > div {
    border-radius: 13px;
  }

  #login-view {
    align-items: flex-start;
    padding: 16px;
  }

  #login-view > .relative.w-full.max-w-5xl {
    min-height: 0;
    margin-block: auto;
    border-radius: 22px;
  }

  #login-view > .relative.w-full.max-w-5xl > div:first-child {
    padding: 25px 22px;
  }

  #login-view > .relative.w-full.max-w-5xl > div:last-child {
    padding: 24px 22px;
  }
}

@media (max-width: 480px) {
  #page-header-title {
    max-width: 48vw;
    font-size: 12px;
  }

  #page-header-badge {
    display: none;
  }

  #dashboard-view main {
    padding-inline: 10px;
  }

  #login-view .text-4xl,
  #login-view .sm\:text-5xl {
    font-size: 2rem;
    line-height: 1.08;
  }

  #login-view > .relative.w-full.max-w-5xl > div:last-child {
    min-height: 250px;
  }
}

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


/* =========================================================
   REKAP MATRIKS PENILAIAN PESERTA
   ========================================================= */
.scoring-matrix-scroll {
  max-height: min(68vh, 820px);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.scoring-matrix-table {
  min-width: 1340px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.scoring-matrix-table th,
.scoring-matrix-table td {
  border-right: 1px solid #e7edf4;
  border-bottom: 1px solid #e7edf4;
  vertical-align: middle;
}

.scoring-matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  height: 68px;
  padding: 10px 8px;
  text-align: center;
  font-size: 10px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: .035em;
  text-transform: uppercase;
  box-shadow: 0 2px 5px rgba(15, 35, 62, .08);
}

.scoring-matrix-table .matrix-company-heading,
.scoring-matrix-table .matrix-participant-heading {
  background: #14243a;
  color: #fff;
  text-align: left;
}

.scoring-matrix-table .matrix-company-heading {
  position: sticky;
  left: 0;
  z-index: 9;
  width: 190px;
  min-width: 190px;
  max-width: 190px;
  padding-left: 14px;
}

.scoring-matrix-table .matrix-participant-heading {
  position: sticky;
  left: 190px;
  z-index: 9;
  width: 230px;
  min-width: 230px;
  max-width: 230px;
  padding-left: 14px;
}

.scoring-matrix-table .matrix-category-heading {
  width: 115px;
  min-width: 115px;
  max-width: 115px;
  overflow-wrap: anywhere;
}

.scoring-matrix-table .matrix-company-cell {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 190px;
  min-width: 190px;
  max-width: 190px;
  padding: 12px 14px;
  background: #f1f6fb;
  text-align: left;
  vertical-align: top;
  box-shadow: 3px 0 7px rgba(15, 35, 62, .035);
}

.scoring-matrix-table .matrix-company-name {
  color: #14243a;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.scoring-matrix-table .matrix-company-count {
  display: inline-block;
  margin-top: 7px;
  padding: 3px 7px;
  border: 1px solid #d7e3ef;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-size: 9px;
  font-weight: 800;
}

.scoring-matrix-table .matrix-participant-cell {
  position: sticky;
  left: 190px;
  z-index: 3;
  width: 230px;
  min-width: 230px;
  max-width: 230px;
  padding: 11px 14px;
  background: #fff;
  text-align: left;
  box-shadow: 3px 0 7px rgba(15, 35, 62, .025);
}

.scoring-matrix-table .matrix-participant-name {
  color: #1e293b;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.scoring-matrix-table .matrix-participant-meta {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 9px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.scoring-matrix-table .matrix-participant-meta span {
  padding-inline: 3px;
  color: #cbd5e1;
}

.scoring-matrix-table .matrix-status-cell {
  width: 115px;
  min-width: 115px;
  max-width: 115px;
  padding: 9px 7px;
  text-align: center;
  background: #fff;
}

.scoring-matrix-table .matrix-participant-row:hover .matrix-participant-cell,
.scoring-matrix-table .matrix-participant-row:hover .matrix-status-cell {
  background-color: #f8fbff;
}

.scoring-matrix-table .matrix-participant-row:hover .matrix-company-cell {
  background-color: #eaf2fa;
}

.matrix-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 58px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.matrix-status-complete {
  border-color: #a7f3d0;
  background: #d1fae5;
  color: #047857;
}

.matrix-status-pending {
  border-color: #fcd34d;
  background: #fef3c7;
  color: #a16207;
}

.matrix-not-applicable {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
}

.matrix-empty-state {
  padding: 36px 16px !important;
  color: #94a3b8;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 640px) {
  .scoring-matrix-scroll {
    max-height: 64vh;
  }

  .scoring-matrix-table {
    min-width: 1210px;
  }

  .scoring-matrix-table .matrix-company-heading,
  .scoring-matrix-table .matrix-company-cell {
    width: 155px;
    min-width: 155px;
    max-width: 155px;
  }

  .scoring-matrix-table .matrix-participant-heading,
  .scoring-matrix-table .matrix-participant-cell {
    left: 155px;
    width: 205px;
    min-width: 205px;
    max-width: 205px;
  }

  .scoring-matrix-table .matrix-category-heading,
  .scoring-matrix-table .matrix-status-cell {
    width: 106px;
    min-width: 106px;
    max-width: 106px;
  }
}

/* =========================================================
   KF39 RESPONSIVE UI V2 — LAPTOP, TABLET & ANDROID-STYLE JUDGE FLOW
   Presentation-only improvements; scoring and API behaviour stay intact.
   ========================================================= */

:root {
  --kf-mobile-gutter: 14px;
  --kf-touch-size: 46px;
}

html,
body,
#root,
#kf39-legacy-app {
  width: 100%;
  max-width: 100%;
  min-width: 320px;
}

body {
  overflow-x: clip;
}

#dashboard-view,
#dashboard-view > div.flex-1,
#dashboard-view main,
#dashboard-view .app-page-view,
#view-main-judging {
  min-width: 0;
}

#dashboard-view > div.flex-1 {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

#dashboard-view main {
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
}

/* Laptop and large tablet: balanced reading width and clearer surfaces */
@media (min-width: 769px) {
  #dashboard-view main {
    padding: clamp(20px, 2.25vw, 36px);
  }

  #view-main-judging {
    gap: 20px;
  }

  #view-main-judging #main-judging-table {
    min-width: 980px;
  }

  #score-modal > div {
    width: min(100%, 700px);
    max-height: min(92dvh, 900px);
    border-radius: 24px;
  }

  #score-modal-header {
    min-height: 76px;
  }

  #modal-form {
    min-height: 0;
    overscroll-behavior: contain;
  }

  .score-input-card {
    padding: 15px 14px;
  }

  #modal-juri1,
  #modal-juri2,
  #modal-juri3 {
    min-height: 52px;
    font-size: 19px;
  }
}

/* Tablet and phone navigation */
@media (max-width: 1024px) {
  #main-sidebar {
    position: fixed !important;
    inset: 0 auto 0 0;
    width: min(84vw, 320px) !important;
    max-width: 320px !important;
    height: 100dvh;
    transform: translateX(-105%);
    z-index: 61;
    border-radius: 0 22px 22px 0;
    transition: transform .24s cubic-bezier(.2, .8, .2, 1);
  }

  #main-sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  #mobile-sidebar-overlay {
    z-index: 60;
    backdrop-filter: blur(3px);
  }

  #dashboard-view > div.flex-1 {
    width: 100%;
    height: 100dvh;
  }

  #dashboard-view header {
    min-height: 64px;
    padding-inline: 14px;
  }
}

/* Main judging screen — app-like responsive cards and controls */
#view-main-judging #category-tabs-container {
  min-width: 0;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

#view-main-judging #category-tabs-container::-webkit-scrollbar {
  display: none;
}

#view-main-judging #category-tabs-container > button {
  min-height: 42px;
  scroll-snap-align: start;
  border-radius: 999px;
  padding-inline: 15px;
}

#view-main-judging #search-input {
  min-height: 46px;
}

#main-judging-cards-mobile {
  min-width: 0;
  padding: 10px;
}

#main-judging-cards-mobile .jury-mobile-card {
  padding: 15px;
  border-radius: 18px;
  border-color: #e4eaf2;
  box-shadow: 0 5px 16px rgba(15, 35, 62, .045);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

#main-judging-cards-mobile .jury-mobile-card:active {
  transform: scale(.995);
}

.jury-progress-pill {
  min-height: 24px;
  white-space: nowrap;
}

.jury-card-progress {
  padding: 10px 11px;
  border: 1px solid #e7edf4;
  border-radius: 12px;
  background: #f8fafc;
}

.jury-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.jury-progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0ea5e9, #10b981);
  transition: width .25s ease;
}

#main-judging-cards-mobile .jury-mobile-card > div:last-child button {
  min-height: 48px;
  border-radius: 13px;
  font-size: 13px;
  box-shadow: 0 5px 12px rgba(180, 83, 9, .13);
}

#view-main-judging #filter-all,
#view-main-judging #filter-finish,
#view-main-judging #filter-process,
#view-main-judging #filter-pending {
  min-height: 38px;
  padding-inline: 10px;
  white-space: nowrap;
}

/* Native-feeling scoring sheet on mobile */
#score-modal {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#score-modal > div {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#score-modal-header {
  position: relative;
  z-index: 3;
  min-height: 72px;
}

.score-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
}

#modal-form {
  flex: 1 1 auto;
  min-height: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.score-target-card {
  border-radius: 16px;
  box-shadow: inset 3px 0 0 #0ea5e9;
}

.score-input-card {
  min-width: 0;
  border-radius: 15px;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.score-input-card:focus-within {
  border-color: #38a3d4;
  background: #f0f9ff;
  box-shadow: 0 0 0 3px rgba(8, 123, 181, .08);
}

.score-input-card input {
  min-height: 48px;
  padding-inline: 5px;
  font-variant-numeric: tabular-nums;
}

.score-average-card {
  min-height: 58px;
  border-radius: 15px;
}

.score-average-card #modal-avg {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.score-photo-actions > button {
  min-height: 48px;
  border-radius: 13px;
  line-height: 1.25;
}

#modal-dropzone {
  min-height: 112px;
  border-radius: 15px;
}

.score-modal-footer {
  background: #fff;
}

.score-cancel-button,
.score-submit-button {
  min-height: 48px;
  border-radius: 13px;
}

.score-submit-button {
  background: linear-gradient(110deg, #087bb5, #0b91d0);
  box-shadow: 0 7px 16px rgba(8, 123, 181, .2);
}

/* Confirmation step uses the same mobile full-screen pattern */
#confirmation-modal > div {
  max-height: min(92dvh, 820px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (max-width: 768px) {
  #dashboard-view header {
    min-height: 60px;
    padding: 8px 11px;
  }

  #dashboard-view header > div:first-child > button {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  #dashboard-view main {
    padding: 13px 11px calc(22px + env(safe-area-inset-bottom));
  }

  #view-main-judging {
    gap: 13px;
  }

  #view-main-judging section.grid > div {
    min-height: 92px;
    padding: 12px;
    border-radius: 16px;
  }

  #view-main-judging section.grid > div span {
    white-space: normal;
    line-height: 1.3;
  }

  #view-main-judging #category-tabs-container > button {
    min-height: 42px;
    font-size: 11px;
  }

  #view-main-judging #search-input {
    min-height: 48px;
    font-size: 16px !important;
  }

  #view-main-judging #filter-all,
  #view-main-judging #filter-finish,
  #view-main-judging #filter-process,
  #view-main-judging #filter-pending {
    min-height: 40px;
    font-size: 10px;
  }

  #main-judging-cards-mobile .jury-mobile-card {
    padding: 14px;
    gap: 12px;
  }

  #main-judging-cards-mobile .jury-mobile-card h4 {
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  #main-judging-cards-mobile .jury-mobile-card .grid.grid-cols-4 > div {
    min-width: 0;
    padding: 8px 4px;
    border-radius: 10px;
  }

  #main-judging-cards-mobile .jury-mobile-card .grid.grid-cols-4 strong {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
  }

  #view-main-judging #table-showing-count + span {
    display: none;
  }

  /* Score modal becomes a full-screen Android-style input page */
  #score-modal {
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    background: #f6f8fc !important;
    backdrop-filter: none !important;
  }

  #score-modal > div {
    width: 100% !important;
    max-width: none !important;
    height: 100dvh;
    max-height: 100dvh !important;
    min-height: 0;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #f6f8fc;
  }

  #score-modal-header {
    min-height: calc(72px + env(safe-area-inset-top));
    padding: calc(10px + env(safe-area-inset-top)) 16px 12px;
    background: #10243d;
    box-shadow: 0 3px 14px rgba(8, 22, 40, .16);
  }

  #score-modal-header h3 {
    font-size: 15px;
    letter-spacing: -.01em;
  }

  #score-modal-header p {
    font-size: 11px;
  }

  .score-modal-close {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    border-radius: 15px;
  }

  #modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 15px 0;
    overflow-y: auto;
    background: #f6f8fc;
  }

  .score-target-card {
    padding: 15px !important;
    border-radius: 17px !important;
    background: #fff !important;
    border-color: #dbeafe !important;
    box-shadow: 0 4px 14px rgba(15, 35, 62, .045), inset 3px 0 0 #0ea5e9;
  }

  #modal-company {
    font-size: 15px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  #modal-circle {
    font-size: 12px;
    line-height: 1.4;
  }

  .score-input-section {
    padding: 15px;
    border: 1px solid #e4eaf2;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 35, 62, .035);
  }

  .score-input-section > div:first-child label {
    font-size: 11px;
  }

  .score-input-grid {
    gap: 9px !important;
  }

  .score-input-card {
    padding: 10px 7px !important;
    border-radius: 13px !important;
    background: #f5f8fc !important;
  }

  .score-input-card label {
    min-height: 20px;
    font-size: 11px !important;
    font-weight: 800 !important;
  }

  .score-input-card input {
    min-height: 54px;
    padding: 8px 2px;
    border: 1.5px solid #d8e2ee;
    border-radius: 12px;
    font-size: 19px !important;
    font-weight: 800;
    background: #fff;
  }

  .score-average-card {
    min-height: 64px;
    padding: 14px 16px !important;
    border-radius: 16px !important;
    background: #eaf6ff !important;
    border-color: #cfe9fb !important;
  }

  .score-average-card > span:first-child {
    font-size: 12px;
  }

  .score-average-card #modal-avg {
    font-size: 25px;
  }

  .score-photo-section {
    padding: 15px;
    margin-top: 0 !important;
    border: 1px solid #e4eaf2;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 35, 62, .035);
  }

  .score-photo-section > div:first-child label {
    font-size: 11px;
  }

  .score-photo-actions {
    gap: 8px;
    margin-top: 10px;
  }

  .score-photo-actions > button {
    min-width: 0;
    min-height: 54px;
    padding: 8px 6px !important;
    flex-direction: column;
    gap: 4px;
    font-size: 10px !important;
    text-align: center;
    border-radius: 13px !important;
  }

  #modal-dropzone {
    min-height: 116px;
    padding: 13px !important;
    border-radius: 14px !important;
  }

  .score-modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: grid !important;
    grid-template-columns: minmax(92px, .75fr) minmax(0, 1.5fr);
    gap: 9px !important;
    margin: auto -15px 0;
    padding: 12px 15px calc(12px + env(safe-area-inset-bottom)) !important;
    border-top: 1px solid #e2e8f0 !important;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -7px 22px rgba(15, 35, 62, .07);
    backdrop-filter: blur(12px);
  }

  .score-cancel-button,
  .score-submit-button {
    min-height: 50px;
    padding: 10px 12px !important;
    font-size: 12px !important;
    border-radius: 14px !important;
  }

  .score-submit-button {
    font-weight: 800 !important;
  }

  /* Confirmation page on phone */
  #confirmation-modal {
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    background: #f6f8fc !important;
    backdrop-filter: none !important;
  }

  #confirmation-modal > div {
    width: 100% !important;
    max-width: none !important;
    height: 100dvh;
    max-height: 100dvh !important;
    padding: 22px 16px calc(16px + env(safe-area-inset-bottom)) !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  #confirmation-modal > div > div:last-child {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 9px;
    margin-top: auto;
  }

  #confirmation-modal > div > div:last-child button {
    min-height: 50px;
    border-radius: 14px;
    font-size: 11px;
  }
}

@media (max-width: 420px) {
  :root {
    --kf-mobile-gutter: 11px;
  }

  #dashboard-view main {
    padding-inline: 9px;
  }

  #page-header-title {
    max-width: 55vw;
    font-size: 11px;
  }

  #view-main-judging section.grid {
    gap: 8px;
  }

  #view-main-judging section.grid > div {
    min-height: 88px;
    padding: 10px;
  }

  #main-judging-cards-mobile {
    padding: 8px;
  }

  #main-judging-cards-mobile .jury-mobile-card {
    padding: 12px;
    border-radius: 16px;
  }

  #main-judging-cards-mobile .jury-mobile-card .grid.grid-cols-4 {
    gap: 5px;
  }

  #main-judging-cards-mobile .jury-mobile-card .grid.grid-cols-4 > div {
    padding-inline: 2px;
  }

  #main-judging-cards-mobile .jury-mobile-card .grid.grid-cols-4 span {
    font-size: 8px;
  }

  #main-judging-cards-mobile .jury-mobile-card .grid.grid-cols-4 strong {
    font-size: 11px;
  }

  #view-main-judging #filter-all,
  #view-main-judging #filter-finish,
  #view-main-judging #filter-process,
  #view-main-judging #filter-pending {
    padding-inline: 6px;
    font-size: 9px;
  }

  #score-modal-header {
    padding-inline: 13px;
  }

  #modal-form {
    padding-inline: 11px;
  }

  .score-target-card,
  .score-input-section,
  .score-photo-section {
    padding: 12px !important;
  }

  .score-input-grid {
    gap: 6px !important;
  }

  .score-input-card {
    padding: 8px 5px !important;
  }

  .score-input-card input {
    min-height: 52px;
    font-size: 18px !important;
  }

  .score-modal-footer {
    margin-inline: -11px;
    padding-inline: 11px !important;
  }
}

@media (max-width: 350px) {
  .score-input-grid {
    grid-template-columns: 1fr !important;
  }

  .score-input-card {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
  }

  .score-input-card label {
    margin: 0 !important;
    text-align: left !important;
  }

  .score-input-card input {
    min-height: 48px;
  }

  .score-photo-actions > button {
    font-size: 9px !important;
  }
}

@media (max-height: 640px) and (max-width: 768px) {
  #score-modal-header {
    min-height: 60px;
    padding-top: calc(6px + env(safe-area-inset-top));
    padding-bottom: 8px;
  }

  #modal-form {
    gap: 10px;
    padding-top: 10px;
  }

  .score-target-card,
  .score-input-section,
  .score-photo-section {
    padding: 10px !important;
  }

  .score-input-card input {
    min-height: 44px;
  }

  #modal-dropzone {
    min-height: 84px;
  }
}

@media (hover: none) and (pointer: coarse) {
  #dashboard-view button,
  #dashboard-view input,
  #dashboard-view select,
  #dashboard-view textarea {
    touch-action: manipulation;
  }

  #dashboard-view button {
    -webkit-tap-highlight-color: transparent;
  }
}

body:has(#score-modal:not(.hidden)),
body:has(#confirmation-modal:not(.hidden)) {
  overflow: hidden;
}

@media (max-width: 768px) {
  #view-main-judging div:has(> #search-input) {
    width: 100%;
    max-width: none;
  }

  #view-main-judging div:has(> #filter-all) {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #modal-form > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0 !important;
  }
}


/* =========================================================
   KF39 LOGOUT CONFIRMATION + MOBILE TYPOGRAPHY ACCESSIBILITY
   ========================================================= */
.logout-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(8, 22, 40, .68);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}

.logout-success-overlay:not(.hidden) {
  display: flex;
}

.logout-success-card {
  border: 1px solid rgba(226, 232, 240, .96);
  box-shadow: 0 28px 90px rgba(2, 12, 27, .30);
  animation: kf39-logout-pop .28s cubic-bezier(.2, .8, .2, 1) both;
}

.logout-success-icon {
  color: #059669;
  background: linear-gradient(145deg, #dcfce7, #d1fae5);
  box-shadow: 0 0 0 8px rgba(16, 185, 129, .08);
}

.logout-success-kicker {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.logout-success-confirmation {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
}

.logout-success-button {
  min-height: 50px;
  background: linear-gradient(110deg, #087bb5, #0b91d0);
  box-shadow: 0 8px 18px rgba(8, 123, 181, .20);
}

.logout-success-button:focus-visible {
  outline: 3px solid rgba(14, 165, 233, .42);
  outline-offset: 3px;
}

@keyframes kf39-logout-pop {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 768px) {
  /* Login controls remain readable on phones as well. */
  #login-view label { font-size: 12px !important; }
  #login-view input { font-size: 16px !important; min-height: 50px; }
  #login-submit-btn { min-height: 52px; font-size: 14px !important; }
  #login-view .text-\[11px\] { font-size: 12px !important; }

  /* Dashboard headings and information: readable without zooming. */
  #page-header-title { font-size: 14px !important; }
  #view-main-judging section.grid > div span:first-child { font-size: 11px !important; line-height: 1.35; }
  #view-main-judging section.grid > div p { font-size: clamp(21px, 6vw, 25px) !important; }
  #view-main-judging #category-tabs-container > button { font-size: 12px !important; }
  #view-main-judging #category-assignment-info { font-size: 11px !important; }
  #view-main-judging #table-mode-title { font-size: 12px !important; }
  #view-main-judging #table-mode-badge { font-size: 10px !important; }
  #view-main-judging #table-showing-count { font-size: 12px !important; }
  #view-main-judging #search-input { font-size: 16px !important; }

  /* Participant cards */
  #main-judging-cards-mobile .jury-mobile-card h4 { font-size: 15px !important; line-height: 1.4; }
  #main-judging-cards-mobile .jury-mobile-card p { font-size: 13px !important; line-height: 1.4; }
  #main-judging-cards-mobile .jury-mobile-card > div:first-child span { font-size: 11px !important; }
  #main-judging-cards-mobile .jury-card-progress span,
  #main-judging-cards-mobile .jury-card-progress strong { font-size: 12px !important; }
  #main-judging-cards-mobile .jury-mobile-card .grid.grid-cols-4 span { font-size: 10px !important; line-height: 1.25; }
  #main-judging-cards-mobile .jury-mobile-card .grid.grid-cols-4 strong { font-size: 14px !important; }
  #main-judging-cards-mobile .jury-mobile-card > div:last-child button { min-height: 50px; font-size: 14px !important; }

  /* Filters stay compact but legible on narrow phones. */
  #view-main-judging #filter-all,
  #view-main-judging #filter-finish,
  #view-main-judging #filter-process,
  #view-main-judging #filter-pending {
    min-height: 42px;
    padding-inline: 5px;
    font-size: 10px !important;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  /* Increase text and control size in the judge scoring form. */
  #score-modal-header h3 { font-size: 16px !important; }
  #score-modal-header p { font-size: 12px !important; }
  #modal-company { font-size: 16px !important; }
  #modal-circle { font-size: 13px !important; }
  .score-input-section > div:first-child label { font-size: 12px !important; }
  .score-input-section > div:first-child span { font-size: 11px !important; }
  .score-input-card label { font-size: 12px !important; }
  .score-input-card input { font-size: 21px !important; }
  .score-average-card > span:first-child { font-size: 13px !important; }
  .score-average-card #modal-avg { font-size: 26px !important; }
  .score-photo-section > div:first-child label { font-size: 12px !important; }
  .score-photo-section > div:first-child span { font-size: 12px !important; }
  .score-photo-actions > button { font-size: 11px !important; }
  .score-modal-footer button { font-size: 13px !important; }
  #confirmation-modal h4 { font-size: 17px !important; }
  #confirmation-modal p { font-size: 13px !important; }

  /* Common action buttons and toast messages */
  #dashboard-view #toast-banner { font-size: 13px !important; line-height: 1.45; }
  #main-sidebar .sidebar-nav-item { min-height: 46px; font-size: 13px !important; }
  #main-sidebar button[onclick="handleLogout()"] { min-height: 48px; font-size: 13px !important; }

  .logout-success-card { max-width: 360px; padding: 25px 21px; border-radius: 25px; }
  .logout-success-card h3 { font-size: 27px; }
  .logout-success-card #logout-success-message { font-size: 14px; }
  .logout-success-confirmation { font-size: 13px; }
}

@media (max-width: 420px) {
  #page-header-title { font-size: 13px !important; }
  #main-judging-cards-mobile .jury-mobile-card { padding: 13px !important; }
  #main-judging-cards-mobile .jury-mobile-card h4 { font-size: 14px !important; }
  #main-judging-cards-mobile .jury-mobile-card .grid.grid-cols-4 span { font-size: 9px !important; }
  #main-judging-cards-mobile .jury-mobile-card .grid.grid-cols-4 strong { font-size: 13px !important; }
  #view-main-judging #filter-all,
  #view-main-judging #filter-finish,
  #view-main-judging #filter-process,
  #view-main-judging #filter-pending { font-size: 9.5px !important; }
  .score-photo-actions > button { font-size: 10px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .logout-success-card { animation: none !important; }
}


@media (max-width: 768px) {
  /* Keep status filters horizontally scrollable instead of shrinking labels. */
  #view-main-judging div:has(> #filter-all) {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  #view-main-judging div:has(> #filter-all)::-webkit-scrollbar { display: none; }
  #view-main-judging #filter-all,
  #view-main-judging #filter-finish,
  #view-main-judging #filter-process,
  #view-main-judging #filter-pending {
    flex: 0 0 auto;
    min-width: 62px;
    padding-inline: 11px;
    font-size: 11px !important;
    white-space: nowrap;
  }
}

@media (max-width: 420px) {
  #main-judging-cards-mobile .jury-mobile-card .grid.grid-cols-4 span { font-size: 10px !important; }
  #view-main-judging #filter-all,
  #view-main-judging #filter-finish,
  #view-main-judging #filter-process,
  #view-main-judging #filter-pending { font-size: 11px !important; }
}

body:has(#logout-success-modal:not(.hidden)) { overflow: hidden; }

/* =========================================================
   KF39 MOBILE TABLE SCROLL + ROLE-AWARE NAVBAR IDENTITY
   ========================================================= */
.kf39-horizontal-table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto !important;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #eef2f7;
  border-radius: 14px;
}

.kf39-horizontal-table-scroll:focus-visible {
  outline: 3px solid rgba(14, 165, 233, .32);
  outline-offset: 2px;
}

.kf39-horizontal-table-scroll table {
  width: 100%;
  table-layout: auto;
}

.kf39-manage-table {
  min-width: 940px !important;
}

.kf39-progress-table {
  min-width: 760px !important;
}

.kf39-horizontal-table-scroll th,
.kf39-horizontal-table-scroll td {
  white-space: nowrap;
}

.kf39-table-scroll-hint {
  display: none;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: #64748b;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
}

.kf39-table-scroll-hint i {
  color: #0284c7;
  font-size: 12px;
}

.navbar-user-profile {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  max-width: 250px;
  padding: 5px 11px 5px 6px;
  border: 1px solid #e4eaf2;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff, #f8fbff);
  box-shadow: 0 3px 10px rgba(15, 35, 62, .045);
}

.navbar-user-avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid #dbeafe;
  border-radius: 50%;
  overflow: visible;
  color: #075985;
  background: #eaf5ff;
  font-size: 16px;
}

.navbar-user-avatar--admin {
  padding: 2px;
  border-color: #bfdbfe;
  background: #fff;
}

.navbar-user-avatar--judge {
  color: #7c2d12;
  border-color: #fed7aa;
  background: linear-gradient(145deg, #fff7ed, #ffedd5);
}

.navbar-kf39-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.navbar-kf39-fallback {
  color: #075985;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: -.04em;
}

.navbar-stream-number {
  position: absolute;
  right: -4px;
  bottom: -3px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #0f766e;
  box-shadow: 0 2px 5px rgba(15, 23, 42, .16);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.navbar-user-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.navbar-user-role {
  color: #64748b;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .075em;
  white-space: nowrap;
}

.navbar-user-name {
  max-width: 185px;
  overflow: hidden;
  color: #172b45;
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  #view-manage-judges,
  #view-score-progress,
  #view-manage-judges > div,
  #view-score-progress > div {
    min-width: 0;
    max-width: 100%;
  }

  #view-manage-judges > div,
  #view-score-progress > div {
    padding: 16px !important;
    border-radius: 20px !important;
  }

  .kf39-table-scroll-hint {
    display: flex;
  }

  .kf39-horizontal-table-scroll {
    width: 100%;
    max-width: 100%;
    overscroll-behavior-inline: contain;
  }

  .kf39-manage-table {
    min-width: 940px !important;
  }

  .kf39-progress-table {
    min-width: 760px !important;
  }

  .navbar-user-profile {
    gap: 7px;
    max-width: 160px;
    padding: 4px 8px 4px 5px;
  }

  .navbar-user-avatar {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  .navbar-user-name { max-width: 100px; font-size: 10px; }
  .navbar-user-role { font-size: 8px; }
}

@media (max-width: 420px) {
  .navbar-user-profile {
    padding: 3px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .navbar-user-copy {
    display: none;
  }

  .navbar-user-avatar {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  #dashboard-view header {
    gap: 6px;
    padding-inline: 10px;
  }

  #page-header-title {
    max-width: 46vw;
  }
}

