:root {
  --brand-red: #e62727;
  --brand-gold: #1e93ab;
  --brand-black: #172124;
  --brand-green: #1e93ab;
  --bg: #f3f2ec;
  --panel: #f3f2ec;
  --panel-alt: #dcdcdc;
  --line: #dcdcdc;
  --text: #172124;
  --muted: #5f6668;
  --accent: var(--brand-gold);
  --accent-dark: var(--brand-red);
  --success: var(--brand-green);
  --warning: var(--brand-red);
  --danger: var(--brand-red);
  --chart-heading: #1e93ab;
  --chart-pending: #e62727;
  --shadow: 0 18px 40px rgba(23, 33, 36, 0.18);
  --heading-blue: var(--brand-gold);
  --soft-blue: #f3f2ec;
  --soft-green: #e8f4f7;
  --soft-yellow: #dcdcdc;
  --soft-pink: #ffe4e4;
  --bangla-font: "Nikosh", "Noto Sans Bengali", "Vrinda", "SolaimanLipi", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    linear-gradient(135deg, rgba(30, 147, 171, 0.1) 0%, rgba(30, 147, 171, 0) 34%),
    linear-gradient(225deg, rgba(230, 39, 39, 0.08) 0%, rgba(230, 39, 39, 0) 36%),
    linear-gradient(180deg, #f3f2ec 0%, #eeeeea 48%, #dcdcdc 100%);
  background-attachment: fixed;
  color: var(--text);
  overflow-x: hidden;
  -webkit-tap-highlight-color: rgba(30, 147, 171, 0.2);
}

.idle-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
  z-index: 0;
}

.idle-orb {
  display: block;
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0;
}

.idle-orb-one {
  width: 280px;
  height: 280px;
  top: 12%;
  left: 8%;
  background: radial-gradient(circle, rgba(30, 147, 171, 0.16) 0%, rgba(30, 147, 171, 0.05) 70%, transparent 100%);
}

.idle-orb-two {
  width: 320px;
  height: 320px;
  right: 10%;
  top: 28%;
  background: radial-gradient(circle, rgba(230, 39, 39, 0.12) 0%, rgba(230, 39, 39, 0.04) 70%, transparent 100%);
}

.idle-orb-three {
  width: 240px;
  height: 240px;
  left: 34%;
  bottom: 8%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.04) 72%, transparent 100%);
}

body.pin-locked {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  max-width: 100%;
}

img,
svg,
canvas,
video {
  max-width: 100%;
  height: auto;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0 auto;
  padding: 18px;
}

body[data-page="all-factories"],
body[data-page="call-on"],
body[data-page="common-instruction"],
body[data-page="comprehensive-inspection"],
body[data-page="detail"],
body[data-page="factory-list"],
body[data-page="file-movement"],
body[data-page="leave-detail"],
body[data-page="major-commitment"],
body[data-page="zone-visit"],
body[data-page="zone-visit-detail"] {
  min-height: 100vh;
}

body[data-page="all-factories"] .page-shell,
body[data-page="call-on"] .page-shell,
body[data-page="common-instruction"] .page-shell,
body[data-page="comprehensive-inspection"] .page-shell,
body[data-page="detail"] .page-shell,
body[data-page="factory-list"] .page-shell,
body[data-page="file-movement"] .page-shell,
body[data-page="leave-detail"] .page-shell,
body[data-page="major-commitment"] .page-shell,
body[data-page="zone-visit"] .page-shell,
body[data-page="zone-visit-detail"] .page-shell {
  min-height: 100vh;
  width: 100%;
  padding: clamp(12px, 1.4vw, 18px);
}

body[data-page="all-factories"] .main-layout,
body[data-page="call-on"] .main-layout,
body[data-page="common-instruction"] .main-layout,
body[data-page="comprehensive-inspection"] .main-layout,
body[data-page="detail"] .main-layout,
body[data-page="factory-list"] .main-layout,
body[data-page="file-movement"] .main-layout,
body[data-page="leave-detail"] .main-layout,
body[data-page="major-commitment"] .main-layout,
body[data-page="zone-visit"] .main-layout,
body[data-page="zone-visit-detail"] .main-layout {
  min-height: calc(100vh - clamp(24px, 2.8vw, 36px));
  align-content: start;
}

body[data-page="dashboard"] {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #eef2f5 0%, #d8e0e7 100%);
}

body[data-page="dashboard"] .page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  max-width: none;
  padding: 10px;
}

.pin-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at 26% 22%, rgba(63, 155, 210, 0.16), transparent 30%),
    linear-gradient(135deg, #0f2d3f 0%, #12384d 48%, #0c2637 100%);
  backdrop-filter: none;
}

.pin-overlay::before {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%);
  opacity: 1;
  pointer-events: none;
}

.pin-overlay.hidden {
  display: none;
}

.pin-card {
  position: relative;
  z-index: 1;
  width: min(100%, 500px);
  padding: 44px 38px 40px;
  border-radius: 0;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  text-align: left;
  transform: rotate(-1.4deg);
}

.pin-card::before,
.pin-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0;
}

.pin-card::before {
  right: 34px;
  bottom: 34px;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: #2f8f3b;
  box-shadow: 0 14px 28px rgba(47, 143, 59, 0.26);
}

.pin-card::after {
  right: 55px;
  bottom: 55px;
  width: 18px;
  height: 10px;
  border-left: 4px solid #ffffff;
  border-bottom: 4px solid #ffffff;
  transform: rotate(-45deg);
}

.pin-overlay.pin-login-success .pin-card {
  animation: pinSuccessCard 0.76s ease forwards;
}

.pin-overlay.pin-login-success .pin-card::before {
  animation: pinSuccessBadge 0.56s ease 0.08s forwards;
}

.pin-overlay.pin-login-success .pin-card::after {
  animation: pinSuccessCheck 0.42s ease 0.22s forwards;
}

.pin-card > * {
  transform: rotate(1.4deg);
}

.pin-card h2 {
  margin: 0 0 28px;
  color: #101417;
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0;
}

.pin-card p {
  margin: 0 0 8px;
  color: #17202a;
  font-size: 0.9rem;
  font-style: italic;
  font-weight: 800;
}

.pin-form {
  display: grid;
  gap: 12px;
}

.pin-mode-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.pin-mode-button {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(169, 31, 44, 0.32);
  background: #ffffff;
  color: var(--brand-red);
  font-weight: 800;
  cursor: pointer;
}

.pin-mode-button.is-active,
.pin-mode-button:hover {
  background: var(--brand-red);
  color: #ffffff;
}

.pin-form .primary-button {
  width: 100%;
  max-width: 112px;
  min-height: 36px;
  border-radius: 5px;
  background: #1877e8;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: none;
}

.pin-form input,
.pin-form select {
  width: 100%;
  min-height: 38px;
  padding: 6px 10px;
  border-radius: 5px;
  border: 1px solid #cbd3dc;
  background: #ffffff;
  text-align: left;
  font-size: 1rem;
  letter-spacing: 0;
}

.pin-error {
  min-height: 20px;
  margin-top: 10px;
  color: var(--warning);
  font-size: 0.9rem;
  font-weight: 600;
}

.welcome-toast {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  pointer-events: none;
}

.welcome-toast.hidden {
  display: none;
}

.pin-shake {
  animation: pinScreenShake 0.38s ease-in-out;
}

.welcome-toast-inner {
  min-width: 280px;
  padding: 16px 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #f1d284;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
  text-align: center;
  animation: welcomeFade 2.4s ease forwards;
}

.welcome-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-red);
}

.welcome-text {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.94rem;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand shortcuts"
    "brand clock";
  align-items: flex-start;
  gap: 6px 14px;
  margin-bottom: 14px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
  border: 1px solid var(--line);
  border-top: 5px solid var(--brand-red);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

body[data-page="dashboard"] .topbar {
  margin-bottom: 0;
}

body[data-page="dashboard"] .dashboard-admin-chrome {
  overflow: hidden;
}

body[data-page="dashboard"] .dashboard-titlebar {
  min-height: 58px;
}

body[data-page="dashboard"] .brand-block {
  gap: 10px;
}

body[data-page="dashboard"] .brand-logo {
  width: 38px;
  height: 38px;
  padding: 3px;
  border-radius: 2px;
  background: #ffffff;
}

body[data-page="dashboard"] .clock-panel {
  min-width: 168px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  color: #ffffff;
  text-align: right;
}

body[data-page="dashboard"] .digital-clock {
  color: #ffffff;
  font-size: 1.08rem;
}

body[data-page="dashboard"] .digital-date {
  color: #d9edf9;
  font-size: 0.76rem;
}

.brand-block {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.32rem, 1.65vw, 1.88rem);
  color: var(--heading-blue);
  line-height: 1.2;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.clock-panel {
  grid-area: clock;
  justify-self: end;
  min-width: 210px;
  text-align: right;
  padding: 8px 12px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  backdrop-filter: none;
}

.clock-label {
  font-size: 0.8rem;
  color: var(--brand-gold);
  margin-bottom: 4px;
}

.digital-clock {
  font-size: clamp(1.5rem, 2.25vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand-gold);
}

.digital-date {
  margin-top: 4px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--brand-red);
}

.logout-button {
  min-height: 34px;
  padding: 0 14px;
}

.main-layout {
  display: grid;
  gap: 18px;
}

body[data-page="dashboard"] .main-layout {
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
}

.hero-row,
.filters-row,
.form-actions,
.section-heading,
.stats-grid,
.nav-sections,
.chart-card,
.section-actions {
  display: flex;
  gap: 14px;
}

.hero-row {
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
}

.primary-link,
.secondary-link,
.primary-button,
.ghost-button,
.table-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: 0.2s ease;
}

.primary-link,
.primary-button {
  background: var(--brand-gold);
  color: var(--brand-black);
  box-shadow: 0 8px 18px rgba(197, 150, 52, 0.16);
  font-weight: 700;
}

.primary-link:hover,
.primary-button:hover {
  background: var(--brand-red);
  color: #ffffff;
}

.shortcut-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid rgba(36, 91, 150, 0.5);
  background:
    linear-gradient(135deg, rgba(164, 203, 238, 0.34), rgba(164, 203, 238, 0) 44%),
    linear-gradient(180deg, #2f74b5 0%, #1d4f86 100%);
  color: #ffffff;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(29, 79, 134, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.shortcut-button:hover {
  border-color: rgba(84, 147, 210, 0.78);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 44%),
    linear-gradient(180deg, #4d97d8 0%, #245f9e 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 13px 24px rgba(36, 95, 158, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.top-shortcuts .shortcut-button::after,
.shortcut-button.is-animating::after {
  content: "";
  position: absolute;
  top: 0;
  left: -140%;
  width: 70%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: skewX(-22deg);
  animation: shortcutSweep 6s ease-in-out infinite;
  pointer-events: none;
}

.top-shortcuts {
  grid-area: shortcuts;
  justify-self: end;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  max-width: none;
}

.top-shortcuts .shortcut-button {
  min-height: 32px;
  padding: 0 8px;
  border-radius: 9px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 10px rgba(39, 66, 54, 0.08);
}

.page-shortcuts-overlay {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.visually-hidden-shortcut-link {
  display: none !important;
}

.mirrored-shortcuts {
  grid-area: auto;
  width: 100%;
  justify-self: auto;
  justify-content: flex-end;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(7px);
  box-shadow: 0 10px 20px rgba(29, 79, 134, 0.1);
}

.mirrored-shortcuts .home-nav-button {
  min-width: 52px;
  padding: 0 12px;
  font-size: 0;
  border-color: rgba(47, 143, 59, 0.7);
  background:
    linear-gradient(135deg, rgba(180, 224, 188, 0.32), rgba(180, 224, 188, 0) 44%),
    linear-gradient(180deg, #3fa454 0%, #2f8f3b 100%);
  box-shadow: 0 10px 20px rgba(47, 143, 59, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.mirrored-shortcuts .home-nav-button::before {
  content: "";
  width: 18px;
  height: 18px;
  display: block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11.5 12 4l9 7.5'/%3E%3Cpath d='M5 10.5V20h14v-9.5'/%3E%3Cpath d='M10 20v-5h4v5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.mirrored-shortcuts .home-nav-button:hover {
  border-color: rgba(58, 171, 79, 0.85);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 44%),
    linear-gradient(180deg, #56b86c 0%, #2f8f3b 100%);
  box-shadow: 0 13px 24px rgba(47, 143, 59, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.mirrored-shortcuts .shortcut-button {
  opacity: 0.82;
}

.mirrored-shortcuts .shortcut-button:hover,
.mirrored-shortcuts .shortcut-button.is-active {
  opacity: 1;
}

.mirrored-shortcuts .shortcut-button.is-active {
  border-color: rgba(169, 31, 44, 0.9);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 44%),
    linear-gradient(180deg, #c59634 0%, #a91f2c 100%);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(169, 31, 44, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.navigation-group .primary-button {
  position: relative;
  overflow: hidden;
  background: var(--brand-red);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(169, 31, 44, 0.14);
}

.navigation-group .primary-button:hover {
  background: var(--brand-black);
}

.navigation-group .primary-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-20deg);
  animation: buttonGlance 2.4s linear infinite;
}

.secondary-link,
.ghost-button {
  background: #f6ecd6;
  color: #111111;
  border-color: #d8bc75;
}

.secondary-link:hover,
.ghost-button:hover {
  background: var(--brand-gold);
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px;
  backdrop-filter: blur(2px);
}

.grid-two {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.section-heading {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.section-actions {
  flex-wrap: wrap;
  align-items: flex-end;
}

.section-heading h2,
.nav-sections h3 {
  margin: 0;
  color: var(--brand-red);
}

.instruction-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 600;
  color: #222222;
}

label span {
  font-size: 0.92rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfcfcf;
  border-radius: 12px;
  padding: 11px 12px;
  background: #ffffff;
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: #8a8a8a;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(197, 150, 52, 0.18);
  border-color: var(--accent);
}

textarea {
  resize: vertical;
}

#commonInstructionText,
#zoneVisitInstruction,
#instructionText,
#majorCommitmentSubject,
.progress-input,
.zone-visit-table td:nth-child(2),
.zone-visit-table td:nth-child(3),
body[data-page="detail"] td:nth-child(2),
body[data-page="detail"] td:nth-child(5) {
  font-family: var(--bangla-font);
  font-size: 1.02rem;
  line-height: 1.55;
}

textarea::spelling-error,
input[type="text"]::spelling-error,
input[type="search"]::spelling-error {
  text-decoration-color: #d93025;
  background-color: rgba(217, 48, 37, 0.14);
}

textarea::grammar-error,
input[type="text"]::grammar-error,
input[type="search"]::grammar-error {
  text-decoration-color: #d93025;
  background-color: rgba(217, 48, 37, 0.12);
}

.full-span {
  grid-column: 1 / -1;
}

.form-actions {
  margin-top: 16px;
}

.backup-card {
  padding: 16px 20px;
}

body[data-page="dashboard"] .card {
  overflow: hidden;
  padding: 0;
  border: 1px solid #a9b4be;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: none;
}

body[data-page="dashboard"] .section-heading {
  min-height: 34px;
  margin: 0;
  padding: 7px 10px;
  border-bottom: 1px solid #a9b4be;
  background: linear-gradient(180deg, #f3f6f9 0%, #d8e0e8 100%);
}

body[data-page="dashboard"] .section-heading h2 {
  margin: 0;
  color: #153c5f;
  font-size: 0.94rem;
  line-height: 1.2;
}

body[data-page="dashboard"] .backup-actions,
body[data-page="dashboard"] .backup-status {
  margin: 10px;
}

body[data-page="dashboard"] .primary-button,
body[data-page="dashboard"] .ghost-button {
  min-height: 31px;
  padding: 0 12px;
  border-radius: 2px;
  font-size: 0.8rem;
  box-shadow: none;
}

body[data-page="dashboard"] .primary-button {
  background: linear-gradient(180deg, #3f9bd2 0%, #1f6faa 100%);
  color: #ffffff;
}

body[data-page="dashboard"] .primary-button:hover {
  background: #155d90;
}

body[data-page="dashboard"] .ghost-button {
  border-color: #9caeba;
  background: linear-gradient(180deg, #ffffff 0%, #e5ebf0 100%);
  color: #24384b;
}

body[data-page="dashboard"] .pin-mode-button {
  min-height: 42px;
  border-radius: 10px;
}

body[data-page="dashboard"] .pin-mode-button.is-active,
body[data-page="dashboard"] .pin-mode-button:hover {
  background: var(--brand-red);
  color: #ffffff;
}

.pin-card .primary-button {
  width: 112px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 5px;
  background: #1877e8;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
}

.pin-card .primary-button:hover {
  background: #0f63c9;
}

.backup-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

body[data-page="dashboard"] .backup-actions > button {
  width: 150px;
}

.backup-actions .logout-button {
  margin-left: auto;
}

body[data-page="dashboard"] .backup-actions .logout-button {
  border: 1px solid #6f5a86;
  background: linear-gradient(180deg, #9b86b4 0%, #6f5a86 100%);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(111, 90, 134, 0.26);
}

body[data-page="dashboard"] .backup-actions .logout-button:hover {
  background: linear-gradient(180deg, #aa94c1 0%, #5e4b73 100%);
  color: #ffffff;
  transform: translateY(-1px);
}

.backup-status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.backup-status.is-success {
  color: var(--brand-green);
}

.backup-status.is-error {
  color: var(--brand-red);
}

.hidden {
  display: none;
}

.stats-grid {
  flex-wrap: wrap;
}

.stats-grid.compact .stat-box {
  min-height: 110px;
}

.stat-box {
  flex: 1;
  min-width: 150px;
  min-height: 126px;
  background: linear-gradient(180deg, #ffffff 0%, var(--soft-blue) 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.stat-box:nth-child(2) {
  background: linear-gradient(180deg, #ffffff 0%, var(--soft-green) 100%);
  border-color: #c9dec9;
}

.stat-box:nth-child(3) {
  background: linear-gradient(180deg, #ffffff 0%, var(--soft-pink) 100%);
  border-color: #dec2c7;
}

.stat-box:nth-child(2) strong {
  color: var(--success);
}

.stat-box:nth-child(3) strong {
  color: var(--warning);
}

.stat-box span {
  color: var(--muted);
  font-weight: 600;
}

.stat-box strong {
  font-size: 2rem;
  color: var(--heading-blue);
}

.chart-card {
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 18px;
}

.dashboard-card {
  padding: 12px 14px;
}

body[data-page="dashboard"] .dashboard-card {
  display: flex;
  min-height: 0;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(520px, 2fr);
  gap: 14px;
  align-items: stretch;
}

body[data-page="dashboard"] .dashboard-main-grid {
  flex: 1;
  min-height: 0;
  gap: 0;
}

.dashboard-chart-panel {
  min-height: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 247, 247, 0.96) 100%);
}

body[data-page="dashboard"] .dashboard-chart-panel {
  min-height: 0;
  padding: 10px;
  border: 0;
  border-right: 1px solid #a9b4be;
  border-radius: 0;
  background: #ffffff;
}

body[data-page="dashboard"] .dashboard-chart-panel:last-child {
  border-right: 0;
}

body[data-page="dashboard"] .chart-title {
  justify-self: stretch;
  margin: -10px -10px 8px;
  padding: 7px 10px;
  border-bottom: 1px solid #a9b4be;
  background: linear-gradient(180deg, #f3f6f9 0%, #d8e0e8 100%);
  color: #153c5f;
  font-size: 0.94rem;
  line-height: 1.2;
}

body[data-page="dashboard"] .chart-visual {
  border: 6px solid #ffffff;
  box-shadow: 0 0 0 1px #a9b4be, inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

body[data-page="dashboard"] .chart-visual::after {
  background: #f5f8fb;
  box-shadow: 0 0 0 1px #a9b4be;
}

body[data-page="dashboard"] .chart-legend {
  color: #34495c;
  font-size: 0.82rem;
}

body[data-page="dashboard"] .zone-inspection-bar-label {
  color: #24384b;
  font-size: 0.82rem;
}

body[data-page="dashboard"] .zone-inspection-bar-label strong {
  color: #1f6faa;
}

body[data-page="dashboard"] .zone-inspection-bar-track {
  height: 18px;
  border-radius: 2px;
  background: var(--chart-pending);
}

body[data-page="dashboard"] .zone-inspection-bar-fill {
  background: var(--chart-pending);
}

.dashboard-chart-panel {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "title"
    "chart"
    "action"
    "legend";
  align-content: center;
  align-items: center;
  justify-content: center;
  justify-items: center;
  gap: 8px;
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

.chart-title {
  grid-area: title;
  font-size: 0.92rem;
  color: var(--chart-heading);
  font-weight: 800;
}

.sick-grid {
  grid-template-columns: 1fr 0.9fr;
}

.sick-graph-panel {
  display: grid;
  gap: 14px;
}

.sick-graph-title {
  font-weight: 700;
  color: var(--brand-black);
}

#sickFactoryChart {
  width: 100%;
  max-width: 100%;
  min-height: 280px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.sick-legend {
  grid-template-columns: repeat(2, auto);
}

.sick-factory-row {
  cursor: pointer;
}

.sick-factory-row.is-selected td {
  background: var(--soft-yellow);
}

.chart-visual {
  grid-area: chart;
  width: clamp(190px, 17vw, 240px);
  height: clamp(190px, 17vw, 240px);
  border-radius: 50%;
  background: conic-gradient(var(--success) 0deg 0deg, #e4e4e4 0deg 360deg);
  border: 8px solid #ffffff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  position: relative;
}

.chart-visual::after {
  content: attr(data-label);
  position: absolute;
  inset: 50%;
  transform: translate(-50%, -50%);
  width: 46%;
  height: 46%;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, var(--soft-blue) 100%);
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  color: #111111;
  white-space: pre-line;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.chart-legend {
  grid-area: legend;
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 6px 12px;
  font-size: 0.86rem;
  color: var(--text);
  font-weight: 600;
}

.zone-inspection-bars {
  grid-area: chart;
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  align-self: stretch;
  align-content: center;
}

.zone-inspection-bar-row {
  display: grid;
  gap: 6px;
}

.zone-inspection-bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--brand-black);
}

.zone-inspection-bar-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-inspection-bar-label strong {
  color: #206a4b;
  font-size: 0.86rem;
}

.zone-inspection-bar-track {
  height: 22px;
  border-radius: 999px;
  background: var(--chart-pending);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.zone-inspection-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--success);
  min-width: 0;
}

#commonInstructionDetailsButton,
#zoneVisitDetailsButton {
  grid-area: action;
  align-self: center;
  justify-self: center;
  min-height: 34px;
  min-width: 110px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.84rem;
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
}

.legend-dot.completed {
  background: var(--success);
}

.legend-dot.pending {
  background: var(--chart-pending);
}

.navigation-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 16px;
}

.navigation-group {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-alt);
}

.navigation-group label {
  flex: 1;
}

.nav-search-wrap {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.sort-control {
  display: inline-grid;
  gap: 6px;
  min-width: 180px;
}

.sort-control span {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
}

.detail-selector {
  min-width: 320px;
}

.head-office-entry .nav-search-wrap button {
  min-width: 110px;
  min-height: 44px;
  padding: 0 16px;
}

.head-office-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  margin-bottom: 18px;
}

.print-options-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.report-actions-card {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #ffffff 0%, var(--soft-blue) 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.report-filter {
  min-width: 280px;
}

.report-filter span {
  font-size: 0.88rem;
}

.head-office-entry label {
  min-width: 240px;
  flex: 1;
}

.filters-row {
  flex-wrap: wrap;
  align-items: end;
}

.filters-row label {
  min-width: 180px;
  flex: 1;
}

.completion-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.completion-copy,
.completion-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 700;
}

.completion-copy strong {
  color: var(--success);
  font-size: 1.25rem;
}

.completion-track {
  position: relative;
  width: 100%;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--warning);
  border: 1px solid rgba(153, 45, 45, 0.2);
  box-shadow: inset 0 1px 2px rgba(109, 31, 31, 0.18);
}

.completion-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--success);
  transition: width 0.35s ease;
}

.completion-meta {
  justify-content: flex-end;
  font-size: 0.92rem;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1280px;
}

body[data-page="leave"] {
  overflow: hidden;
}

body[data-page="leave"] .page-shell {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 4px 8px 4px;
  overflow: hidden;
}

body[data-page="leave-detail"] .page-shell {
  width: 100%;
}

body[data-page="leave"] .detail-top-actions {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 0;
}

body[data-page="leave"] .leave-page {
  display: grid;
  flex: 1;
  gap: 4px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

body[data-page="leave"] .leave-split-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 8px;
  align-items: stretch;
  min-height: 0;
  height: 100%;
}

body[data-page="leave"] .leave-entry-card,
body[data-page="leave"] .leave-table-card {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

body[data-page="leave"] .leave-entry-card {
  align-content: start;
  grid-template-rows: auto auto 1fr;
  padding-top: 10px;
}

body[data-page="leave"] .leave-table-card {
  grid-template-rows: auto minmax(0, 1fr);
}

body[data-page="leave"] .leave-entry-panel {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body[data-page="leave"] .leave-entry-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-content: start;
}

body[data-page="leave"] .secondary-link,
body[data-page="leave"] .primary-button,
body[data-page="leave"] .ghost-button,
body[data-page="leave"] .table-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.82rem;
}

.leave-page .card {
  padding: 10px 12px;
}

body[data-page="leave"] .section-heading {
  margin-bottom: 6px;
  gap: 8px;
}

body[data-page="leave"] .leave-entry-card .section-heading {
  margin-bottom: 4px;
}

body[data-page="leave"] .section-heading h2,
body[data-page="leave"] .section-heading h3 {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.15;
}

body[data-page="leave"] .leave-entry-form label span {
  display: block;
  margin-bottom: 5px;
  font-size: 0.86rem;
  font-weight: 700;
}

body[data-page="leave"] .leave-entry-form input,
body[data-page="leave"] .leave-entry-form select {
  min-height: 38px;
  padding: 7px 10px;
  font-size: 0.88rem;
}

body[data-page="leave"] #leaveActionStatus {
  align-self: end;
  margin: 0;
}

.leave-entry-grid {
  display: grid;
  gap: 12px;
}

.leave-entry-grid {
  grid-template-columns: 1.5fr repeat(3, minmax(120px, 1fr));
}

.leave-actions {
  gap: 8px;
  margin-top: 4px;
}

body[data-page="leave"] .leave-actions .primary-button,
body[data-page="leave"] .leave-actions .ghost-button {
  min-width: 88px;
  padding: 0 10px;
}

body[data-page="leave"] table {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

body[data-page="leave"] .leave-table-card .table-wrap {
  display: flex;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

body[data-page="leave"] .leave-table-card table {
  height: auto;
}

body[data-page="leave"] th,
body[data-page="leave"] td {
  padding: 5px 7px;
  font-size: 0.8rem;
  line-height: 1.15;
}

body[data-page="leave"] th:nth-child(1),
body[data-page="leave"] td:nth-child(1) {
  width: auto;
}

body[data-page="leave"] th:nth-child(2),
body[data-page="leave"] td:nth-child(2) {
  width: 140px;
  text-align: center;
}

body[data-page="leave"] th:nth-child(3),
body[data-page="leave"] td:nth-child(3),
body[data-page="leave"] th:nth-child(4),
body[data-page="leave"] td:nth-child(4) {
  width: 210px;
}

body[data-page="leave"] .leave-action-group {
  display: flex;
  gap: 5px;
  justify-content: center;
  flex-wrap: wrap;
}

body[data-page="leave"] .leave-row-button {
  min-height: 24px;
  padding: 0 7px;
  border-radius: 7px;
  font-size: 0.68rem;
}

body[data-page="leave"] .leave-total-cell {
  display: grid;
  gap: 1px;
}

body[data-page="leave"] .leave-total-cell span {
  font-size: 0.72rem;
  color: #6b7280;
}

body[data-page="leave"] .page-shortcuts-overlay {
  justify-content: flex-end;
  margin-bottom: 4px;
}

body[data-page="leave"] .mirrored-shortcuts {
  justify-content: flex-end;
  padding: 8px 10px 10px;
  gap: 6px;
}

body[data-page="leave"] .mirrored-shortcuts .shortcut-button {
  min-height: 32px;
  padding: 0 8px;
  font-size: 0.72rem;
}

body[data-page="leave-detail"] .leave-detail-card {
  display: grid;
  gap: 12px;
}

body[data-page="leave-detail"] .leave-detail-heading {
  align-items: start;
}

body[data-page="leave-detail"] table {
  min-width: 0;
  table-layout: fixed;
}

body[data-page="leave-detail"] th,
body[data-page="leave-detail"] td {
  padding: 8px;
}

body[data-page="leave-detail"] th:nth-child(1),
body[data-page="leave-detail"] td:nth-child(1) {
  width: 8%;
  text-align: center;
}

body[data-page="leave-detail"] th:nth-child(2),
body[data-page="leave-detail"] td:nth-child(2) {
  width: 22%;
}

body[data-page="leave-detail"] th:nth-child(3),
body[data-page="leave-detail"] td:nth-child(3),
body[data-page="leave-detail"] th:nth-child(4),
body[data-page="leave-detail"] td:nth-child(4) {
  width: 18%;
}

body[data-page="leave-detail"] th:nth-child(5),
body[data-page="leave-detail"] td:nth-child(5) {
  width: 12%;
  text-align: center;
}

body[data-page="leave-detail"] th:nth-child(6),
body[data-page="leave-detail"] td:nth-child(6) {
  width: 22%;
}

body[data-page="leave-detail"] .leave-detail-date-input {
  width: 100%;
  min-height: 32px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #ffffff;
}

body[data-page="major-commitment"] .page-shell {
  width: 100%;
}

body[data-page="major-commitment"] .card {
  overflow: hidden;
}

body[data-page="major-commitment"] .detail-top-actions {
  display: flex;
  justify-content: flex-start;
}

body[data-page="major-commitment"] .secondary-link,
body[data-page="major-commitment"] .primary-button,
body[data-page="major-commitment"] .ghost-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.84rem;
}

.major-commitment-download-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  align-items: stretch;
}

.major-commitment-delete-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.major-commitment-delete-actions {
  margin-top: 0;
}

.major-commitment-download-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 247, 247, 0.96) 100%);
}

.major-commitment-download-panel .primary-button,
.major-commitment-download-panel .ghost-button {
  width: 100%;
}

.major-commitment-download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px 16px;
}

.major-commitment-range-actions {
  margin-top: 0;
}

.major-commitment-delete-actions .table-button:disabled {
  cursor: default;
  opacity: 0.58;
}

.major-commitment-status {
  margin-top: 10px;
  font-size: 0.86rem;
  font-weight: 700;
}

.major-commitment-status.is-success {
  color: var(--brand-green);
}

.major-commitment-status.is-error {
  color: var(--brand-red);
}

body[data-page="all-factories"] .page-shell,
body[data-page="call-on"] .page-shell,
body[data-page="common-instruction"] .page-shell,
body[data-page="factory-list"] .page-shell,
body[data-page="zone-visit-detail"] .page-shell,
body[data-page="zone-visit"] .page-shell {
  width: 100%;
}

body[data-page="all-factories"] .detail-top-actions,
body[data-page="call-on"] .detail-top-actions,
body[data-page="common-instruction"] .detail-top-actions,
body[data-page="factory-list"] .detail-top-actions,
body[data-page="zone-visit-detail"] .detail-top-actions,
body[data-page="zone-visit"] .detail-top-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

body[data-page="all-factories"] .secondary-link,
body[data-page="call-on"] .secondary-link,
body[data-page="common-instruction"] .secondary-link,
body[data-page="factory-list"] .secondary-link,
body[data-page="zone-visit"] .primary-button,
body[data-page="zone-visit-detail"] .secondary-link,
body[data-page="zone-visit"] .secondary-link {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.84rem;
}

body[data-page="all-factories"] .detail-top-actions .secondary-link,
body[data-page="call-on"] .detail-top-actions .secondary-link,
body[data-page="common-instruction"] .detail-top-actions .secondary-link,
body[data-page="factory-list"] .detail-top-actions .secondary-link,
body[data-page="zone-visit-detail"] .detail-top-actions .secondary-link,
body[data-page="zone-visit"] .detail-top-actions .secondary-link,
body[data-page="leave"] .detail-top-actions .secondary-link,
body[data-page="leave-detail"] .detail-top-actions .secondary-link,
body[data-page="major-commitment"] .detail-top-actions .secondary-link,
body[data-page="detail"] .detail-top-actions .secondary-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 9px;
  border: 1px solid rgba(36, 91, 150, 0.5);
  background:
    linear-gradient(135deg, rgba(164, 203, 238, 0.34), rgba(164, 203, 238, 0) 44%),
    linear-gradient(180deg, #2f74b5 0%, #1d4f86 100%);
  color: #ffffff;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(39, 66, 54, 0.08);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

body[data-page="all-factories"] .detail-top-actions .secondary-link:hover,
body[data-page="call-on"] .detail-top-actions .secondary-link:hover,
body[data-page="common-instruction"] .detail-top-actions .secondary-link:hover,
body[data-page="factory-list"] .detail-top-actions .secondary-link:hover,
body[data-page="zone-visit-detail"] .detail-top-actions .secondary-link:hover,
body[data-page="zone-visit"] .detail-top-actions .secondary-link:hover,
body[data-page="leave"] .detail-top-actions .secondary-link:hover,
body[data-page="leave-detail"] .detail-top-actions .secondary-link:hover,
body[data-page="major-commitment"] .detail-top-actions .secondary-link:hover,
body[data-page="detail"] .detail-top-actions .secondary-link:hover {
  border-color: rgba(84, 147, 210, 0.78);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 44%),
    linear-gradient(180deg, #4d97d8 0%, #245f9e 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 13px 24px rgba(36, 95, 158, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

body[data-page="call-on"] .call-on-card {
  overflow: hidden;
}

body[data-page="call-on"] .call-on-entry-card {
  overflow: hidden;
}

body[data-page="call-on"] table,
body[data-page="archives"] table {
  min-width: 100%;
  table-layout: fixed;
}

body[data-page="archives"] th:nth-child(1),
body[data-page="archives"] td:nth-child(1) {
  width: 18%;
}

body[data-page="archives"] th:nth-child(2),
body[data-page="archives"] td:nth-child(2) {
  width: 44%;
}

body[data-page="archives"] th:nth-child(3),
body[data-page="archives"] td:nth-child(3) {
  width: 20%;
}

body[data-page="archives"] th:nth-child(4),
body[data-page="archives"] td:nth-child(4) {
  width: 18%;
}

body[data-page="call-on"] .call-on-table-wrap,
body[data-page="archives"] .archive-table-wrap {
  max-height: 700px;
  overflow-y: auto;
  overflow-x: hidden;
}

body[data-page="call-on"] th:nth-child(1),
body[data-page="call-on"] td:nth-child(1) {
  width: 16%;
}

body[data-page="call-on"] th:nth-child(2),
body[data-page="call-on"] td:nth-child(2) {
  width: 34%;
}

body[data-page="call-on"] th:nth-child(3),
body[data-page="call-on"] td:nth-child(3) {
  width: 34%;
}

body[data-page="call-on"] th:nth-child(4),
body[data-page="call-on"] td:nth-child(4) {
  width: 16%;
}

body[data-page="call-on"] .call-on-page {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: start;
}

body[data-page="call-on"] .detail-top-actions {
  grid-column: 1 / -1;
}

body[data-page="call-on"] .call-on-status {
  margin: 12px 0 0;
  min-height: 20px;
  font-size: 0.95rem;
  font-weight: 600;
}

body[data-page="call-on"] .call-on-status.is-success {
  color: var(--brand-green);
}

body[data-page="call-on"] .call-on-status.is-error {
  color: var(--brand-red);
}

body[data-page="call-on"] .call-on-meta {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
}

body[data-page="call-on"] .call-on-file-note {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(10, 31, 68, 0.06);
  color: var(--ink-strong);
  font-size: 0.88rem;
  font-weight: 600;
}

body[data-page="call-on"] .call-on-file-cell,
body[data-page="archives"] .call-on-file-cell {
  display: grid;
  gap: 6px;
  min-width: 0;
}

body[data-page="call-on"] .call-on-file-actions,
body[data-page="archives"] .call-on-file-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

body[data-page="call-on"] .call-on-file-name,
body[data-page="archives"] .call-on-file-name {
  word-break: break-word;
  font-weight: 600;
}

body[data-page="call-on"] .call-on-download-button,
body[data-page="archives"] .call-on-download-button {
  width: fit-content;
  min-height: 28px;
  padding: 0 9px;
  font-size: 0.76rem;
  border-radius: 8px;
}

body[data-page="call-on"] .call-on-actions,
body[data-page="archives"] .call-on-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

body[data-page="call-on"] .call-on-table thead th,
body[data-page="archives"] .archive-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

body[data-page="call-on"] .call-on-table tbody tr,
body[data-page="archives"] .archive-table tbody tr {
  height: 64px;
}

body[data-page="call-on"] .call-on-table .table-button,
body[data-page="call-on"] .call-on-table .ghost-button,
body[data-page="archives"] .archive-table .table-button,
body[data-page="archives"] .archive-table .ghost-button {
  min-height: 28px;
  padding: 0 9px;
  font-size: 0.76rem;
  border-radius: 8px;
}

@media (max-width: 800px) {
  body[data-page="call-on"] .call-on-page,
  body[data-page="archives"] .archives-page {
    grid-template-columns: 1fr;
  }

  body[data-page="call-on"] .detail-top-actions,
  body[data-page="archives"] .detail-top-actions,
  body[data-page="archives"] .archives-card,
  body[data-page="archives"] .archives-entry-card {
    grid-column: auto;
  }

  body[data-page="call-on"] .section-heading {
    align-items: flex-start;
  }

  body[data-page="call-on"] .section-actions {
    width: 100%;
  }

  body[data-page="call-on"] th:nth-child(1),
  body[data-page="call-on"] td:nth-child(1) {
    width: 18%;
  }

  body[data-page="call-on"] th:nth-child(2),
  body[data-page="call-on"] td:nth-child(2) {
    width: 32%;
  }

  body[data-page="call-on"] th:nth-child(3),
  body[data-page="call-on"] td:nth-child(3) {
    width: 32%;
  }

  body[data-page="call-on"] th:nth-child(4),
  body[data-page="call-on"] td:nth-child(4) {
    width: 18%;
  }
}

body[data-page="call-on"] .call-on-entry-card textarea {
  resize: vertical;
}

body[data-page="call-on"] .call-on-entry-card input[type="text"],
body[data-page="call-on"] .call-on-entry-card input[type="date"],
body[data-page="call-on"] .call-on-entry-card textarea {
  width: 100%;
}

body[data-page="archives"] .archives-page {
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 12px;
}

body[data-page="archives"] .detail-top-actions {
  grid-column: 1 / -1;
}

body[data-page="archives"] .archives-card {
  grid-column: 1;
}

body[data-page="archives"] .archives-entry-card {
  grid-column: 2;
  align-self: start;
}

body[data-page="archives"] .archive-table td:nth-child(2) {
  font-weight: 700;
  line-height: 1.35;
}

body[data-page="archives"] .archive-table td:nth-child(3) {
  padding-left: 6px;
  padding-right: 6px;
}

body[data-page="archives"] .archive-table .call-on-file-actions {
  flex-wrap: nowrap;
  justify-content: center;
}

body[data-page="archives"] .archives-entry-card input[type="text"],
body[data-page="archives"] .archives-entry-card input[type="date"] {
  min-height: 38px;
  width: 100%;
}

.all-factories-card {
  overflow: hidden;
}

.all-factories-table-card {
  overflow: hidden;
}

.factory-entry-card {
  overflow: hidden;
}

.factory-entry-grid.zone-visit-entry-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 12px;
}

.zone-visit-date-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.zone-visit-date-insert-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.78rem;
  white-space: nowrap;
}

#zoneVisitConcern {
  min-height: auto;
}

.zone-visit-concern-field {
  margin-bottom: 2px;
}

.zone-visit-instruction-field textarea {
  min-height: 96px;
  resize: vertical;
}

.zone-visit-concern-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 10px 12px;
  border: 1px solid rgba(10, 31, 68, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.zone-visit-concern-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.zone-visit-concern-group-title {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(10, 31, 68, 0.58);
  margin-right: 4px;
}

.zone-visit-concern-option {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(10, 31, 68, 0.05);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-strong);
  cursor: pointer;
}

.zone-visit-concern-option input {
  width: 16px;
  height: 16px;
  margin: 0;
}

body[data-page="common-instruction"] .section-heading h2 {
  color: #206a4b;
}

body[data-page="common-instruction"] .factory-entry-grid label > span {
  color: #815a13;
}

body[data-page="common-instruction"] .all-factories-table-heading h2 {
  color: #7d4750;
}

body[data-page="common-instruction"] .common-instruction-sort-control {
  min-width: 190px;
  justify-self: end;
}

body[data-page="common-instruction"] .common-instruction-sort-control select {
  min-height: 38px;
  border-radius: 10px;
}

body[data-page="common-instruction"] .common-instruction-hq-department-group .zone-visit-concern-option {
  background: #e6f2ea;
  color: #1f6b48;
  border: 1px solid rgba(47, 143, 59, 0.22);
}

body[data-page="common-instruction"] .common-instruction-epz-group .zone-visit-concern-option {
  background: #f7edd7;
  color: #8a5d13;
  border: 1px solid rgba(197, 150, 52, 0.28);
}

body[data-page="common-instruction"] .common-instruction-project-group .zone-visit-concern-option {
  background: #f1e7ea;
  color: #884651;
  border: 1px solid rgba(169, 31, 44, 0.16);
}

body[data-page="common-instruction"] .common-instruction-table-box,
body[data-page="detail"] .common-instruction-table-box,
body[data-page="zone-visit-detail"] .common-instruction-table-box {
  width: 100%;
  box-sizing: border-box;
  min-height: 88px;
  padding: 4px;
  border: 2px solid #9fb1bf;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  overflow: hidden;
}

body[data-page="common-instruction"] .common-instruction-progress-box,
body[data-page="detail"] .common-instruction-progress-box,
body[data-page="zone-visit-detail"] .common-instruction-progress-box {
  height: 96px;
  border-color: #8fb7c9;
  background: #f7fcff;
}

body[data-page="common-instruction"] .common-instruction-progress-box:has(.save-progress-button:not(.hidden)),
body[data-page="detail"] .common-instruction-progress-box:has(.save-progress-button:not(.hidden)),
body[data-page="zone-visit-detail"] .common-instruction-progress-box:has(.save-progress-button:not(.hidden)) {
  height: 132px;
}

body[data-page="common-instruction"] .common-instruction-concern-box,
body[data-page="detail"] .common-instruction-concern-box,
body[data-page="zone-visit-detail"] .common-instruction-concern-box {
  display: flex;
  align-items: flex-start;
  color: #24384b;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  border-color: #d1b36f;
  background: #fff8e9;
}

body[data-page="common-instruction"] .common-instruction-progress-box .progress-input,
body[data-page="detail"] .common-instruction-progress-box .progress-input,
body[data-page="zone-visit-detail"] .common-instruction-progress-box .progress-input {
  width: 100%;
  height: 84px;
  min-height: 84px;
  max-height: 84px;
  box-sizing: border-box;
  resize: none;
  border-radius: 6px;
  background: #ffffff;
}

body[data-page="common-instruction"] .common-instruction-progress-box .progress-edit,
body[data-page="detail"] .common-instruction-progress-box .progress-edit,
body[data-page="zone-visit-detail"] .common-instruction-progress-box .progress-edit {
  width: 100%;
  min-width: 0;
  gap: 4px;
}

.concern-bullet-list {
  margin: 0;
  padding-left: 18px;
}

.concern-bullet-list li {
  margin: 0 0 4px;
}

.concern-bullet-list li:last-child {
  margin-bottom: 0;
}

body[data-page="common-instruction"] .zone-visit-table td:nth-child(3),
body[data-page="common-instruction"] .zone-visit-table td:nth-child(4),
body[data-page="zone-visit-detail"] .zone-visit-table td:nth-child(3),
body[data-page="zone-visit-detail"] .zone-visit-table td:nth-child(4),
body[data-page="detail"] td:nth-child(3),
body[data-page="detail"] td:nth-child(5) {
  padding: 14px 16px;
  vertical-align: top;
}

.zone-visit-table-wrap table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 14px;
}

.zone-visit-table th:nth-child(1),
.zone-visit-table td:nth-child(1) {
  width: 11%;
}

.zone-visit-table th:nth-child(2),
.zone-visit-table td:nth-child(2) {
  width: 24%;
}

.zone-visit-table th:nth-child(3),
.zone-visit-table td:nth-child(3) {
  width: 24%;
}

.zone-visit-table th:nth-child(4),
.zone-visit-table td:nth-child(4) {
  width: 13%;
}

.zone-visit-table th:nth-child(5),
.zone-visit-table td:nth-child(5) {
  width: 12%;
}

.zone-visit-table th:nth-child(6),
.zone-visit-table td:nth-child(6) {
  width: 16%;
  text-align: center;
}

body[data-page="zone-visit-detail"] .all-factories-table-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 243, 232, 0.95) 100%);
}

body[data-page="zone-visit-detail"] .zone-visit-table thead th {
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(10, 31, 68, 0.96) 0%, rgba(25, 56, 105, 0.94) 100%);
  color: #ffffff;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body[data-page="zone-visit-detail"] .zone-visit-table tbody td {
  padding: 10px 12px;
  vertical-align: top;
  background: rgba(255, 255, 255, 0.88);
}

body[data-page="zone-visit-detail"] .zone-visit-table tbody tr.instruction-row.is-pending td {
  background: rgba(246, 231, 234, 0.9);
}

body[data-page="zone-visit-detail"] .zone-visit-table tbody tr.instruction-row.is-completed td {
  background: rgba(231, 244, 234, 0.9);
}

body[data-page="zone-visit-detail"] .zone-visit-table tbody tr.instruction-row.is-pending:hover td {
  background: rgba(242, 219, 225, 0.96);
}

body[data-page="zone-visit-detail"] .zone-visit-table tbody tr.instruction-row.is-completed:hover td {
  background: rgba(220, 239, 226, 0.96);
}

body[data-page="zone-visit-detail"] .zone-visit-table td:nth-child(2),
body[data-page="zone-visit-detail"] .zone-visit-table td:nth-child(4) {
  line-height: 1.45;
}

body[data-page="zone-visit-detail"] .progress-input {
  min-height: 84px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
}

body[data-page="zone-visit-detail"] .zone-visit-status-select {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid #d9dfe8;
  box-shadow: none;
}

body[data-page="zone-visit-detail"] .zone-visit-status-pending {
  background: #f6e7ea;
  color: #a13c4d;
  border-color: #e6cbd1;
}

body[data-page="zone-visit-detail"] .zone-visit-status-completed {
  background: #e7f4ea;
  color: #2f6b43;
  border-color: #cfe3d4;
}

.zone-visit-row-actions {
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: center;
}

.zone-visit-row-actions .ghost-button,
.zone-visit-row-actions .table-button {
  min-height: 30px;
  min-width: 64px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 0.72rem;
}

.zone-visit-edit-button {
  border-color: rgba(10, 31, 68, 0.12);
  background: rgba(10, 31, 68, 0.06);
  color: var(--brand-black);
}

.zone-visit-edit-button:hover {
  background: rgba(10, 31, 68, 0.12);
}

.zone-visit-delete-button {
  background: #f6e7ea;
  border-color: #e6cbd1;
  color: #a13c4d;
}

.factory-entry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 14px;
}

.factory-entry-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.factory-pdf-actions {
  margin-top: 18px;
  justify-content: flex-end;
}

.factory-entry-status {
  margin-top: 10px;
  font-size: 0.88rem;
  font-weight: 700;
}

.factory-entry-status.is-success {
  color: var(--brand-green);
}

.factory-entry-status.is-error {
  color: var(--brand-red);
}

.epz-box-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.epz-box {
  appearance: none;
  width: 100%;
  display: grid;
  gap: 4px;
  min-height: 78px;
  align-content: center;
  text-align: left;
  padding: 10px 14px;
  border: 1px solid #d8bc75;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(169, 31, 44, 0.08), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #f7f2e6 100%);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.epz-box-with-chart {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "copy chart";
  align-items: center;
  gap: 8px;
}

.epz-box-copy {
  display: grid;
  grid-area: copy;
  gap: 3px;
  min-width: 0;
}

.epz-box:hover,
.epz-box.is-active {
  border-color: var(--brand-red);
  box-shadow: 0 12px 26px rgba(169, 31, 44, 0.14);
  transform: translateY(-1px);
}

.epz-box.is-active {
  background:
    linear-gradient(135deg, rgba(197, 150, 52, 0.2), transparent 44%),
    linear-gradient(180deg, #ffffff 0%, #f6ecd6 100%);
}

.epz-box span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.epz-box strong {
  color: var(--brand-red);
  font-size: 0.95rem;
  line-height: 1.12;
}

.epz-box em {
  color: var(--brand-black);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 700;
}

.zone-visit-grid-chart {
  grid-area: chart;
  width: 74px;
  height: 74px;
  min-width: 74px;
  border-width: 4px;
}

.zone-visit-grid-chart::after {
  width: 54%;
  height: 54%;
  font-size: 0.55rem;
  line-height: 1.08;
}

.visit-date-download-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.visit-date-empty {
  color: var(--muted);
  font-weight: 600;
}

.visit-date-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
  max-height: 1200px;
  opacity: 1;
  overflow: hidden;
  transform: translateY(0);
  transition: max-height 0.32s ease, opacity 0.24s ease, margin-top 0.24s ease, transform 0.24s ease;
}

.visit-date-list.hidden {
  display: grid;
  margin-top: 0;
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.visit-date-list-card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 247, 247, 0.96) 100%);
}

.visit-date-list-card h3 {
  margin: 0 0 8px;
  font-size: 0.94rem;
  color: var(--brand-red);
}

.visit-date-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.visit-date-list-heading .visit-date-list-heading-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.visit-date-list-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.visit-date-list-item {
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
}

.visit-date-list-row,
.visit-date-list-edit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.visit-date-list-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.visit-date-action-button {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.76rem;
}

.visit-date-list-input {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #ffffff;
  min-width: 148px;
}

body[data-page="zone-visit"] #showAllVisitDatesButton {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid #2f8f3b;
  background: linear-gradient(180deg, #49a85a 0%, #2f8f3b 100%);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(47, 143, 59, 0.16);
}

body[data-page="zone-visit"] #showAllVisitDatesButton:hover {
  border-color: #267230;
  background: linear-gradient(180deg, #3d9a4d 0%, #267230 100%);
  color: #ffffff;
}

.all-factories-table-heading {
  align-items: flex-start;
}

body[data-page="zone-visit-detail"] .all-factories-table-heading {
  justify-content: flex-start;
}

body[data-page="zone-visit-detail"] .zone-visit-download-actions {
  justify-content: flex-start;
  margin-top: 12px;
}

body[data-page="zone-visit-detail"] .zone-visit-download-button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.8rem;
}

.all-factories-meta {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

body[data-page="factory-list"] table {
  min-width: 760px;
  table-layout: fixed;
}

body[data-page="factory-list"] th:nth-child(1),
body[data-page="factory-list"] td:nth-child(1) {
  width: 88px;
  text-align: center;
}

body[data-page="factory-list"] th:nth-child(2),
body[data-page="factory-list"] td:nth-child(2) {
  width: 42%;
}

body[data-page="factory-list"] th:nth-child(4),
body[data-page="factory-list"] td:nth-child(4) {
  width: 170px;
}

body[data-page="factory-list"] th:nth-child(5),
body[data-page="factory-list"] td:nth-child(5) {
  width: 112px;
  text-align: center;
}

.factory-row-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: nowrap;
}

.factory-row-actions .ghost-button,
.factory-row-actions .table-button {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 700;
}

body[data-page="detail"] .card {
  overflow: hidden;
}

body[data-page="detail"] .detail-top-actions {
  display: flex;
  justify-content: flex-start;
}

body[data-page="detail"] .secondary-link {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.84rem;
}

body[data-page="detail"] .section-heading {
  margin-bottom: 10px;
}

body[data-page="detail"] .section-heading h2 {
  font-size: 1.12rem;
}

body[data-page="detail"] .section-actions {
  gap: 10px;
}

body[data-page="detail"] .primary-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.84rem;
}

body[data-page="detail"] .sort-control {
  min-width: 150px;
  gap: 4px;
}

body[data-page="detail"] .sort-control span {
  font-size: 0.78rem;
}

body[data-page="detail"] .sort-control select {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.84rem;
}

body[data-page="detail"] .table-wrap {
  overflow-x: hidden;
}

body[data-page="detail"] table {
  min-width: 0;
  table-layout: fixed;
  font-size: 0.88rem;
}

body[data-page="detail"] th:nth-child(5),
body[data-page="detail"] td:nth-child(5) {
  width: 22%;
}

body[data-page="detail"] th:nth-child(1),
body[data-page="detail"] td:nth-child(1) {
  width: 42px;
  text-align: center;
}

body[data-page="detail"] th:nth-child(2),
body[data-page="detail"] td:nth-child(2) {
  width: 24%;
}

body[data-page="detail"] th:nth-child(3),
body[data-page="detail"] td:nth-child(3) {
  width: 14%;
}

body[data-page="detail"] th:nth-child(4),
body[data-page="detail"] td:nth-child(4) {
  width: 84px;
}

body[data-page="detail"] th:nth-child(6),
body[data-page="detail"] td:nth-child(6) {
  width: 102px;
}

body[data-page="detail"] th:nth-child(7),
body[data-page="detail"] td:nth-child(7) {
  width: 116px;
}

body[data-page="detail"] th,
body[data-page="detail"] td {
  padding: 8px;
  overflow-wrap: anywhere;
}

thead {
  background: var(--brand-black);
}

th,
td {
  border: 1px solid #dadada;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #ffffff;
  font-size: 0.92rem;
}

tbody tr:nth-child(even) {
  background: #f7f7f7;
}

.instruction-row.is-completed td {
  background: var(--soft-green);
}

.instruction-row.is-completed:nth-child(even) td {
  background: #dfeede;
}

.instruction-row.is-completed:hover td {
  background: #d6e9d5;
}

.instruction-row.is-pending td {
  background: var(--soft-pink);
}

.instruction-row.is-pending:nth-child(even) td {
  background: #ecd8dc;
}

.instruction-row.is-pending:hover td {
  background: #e5cfd4;
}

.status-select,
.table-input {
  min-width: 130px;
}

.progress-edit {
  display: grid;
  gap: 8px;
  min-width: 420px;
}

body[data-page="detail"] .progress-edit {
  min-width: 0;
  gap: 6px;
}

body[data-page="detail"] .status-select,
body[data-page="detail"] .table-input {
  min-width: 0;
}

body[data-page="detail"] .progress-input {
  min-height: 64px;
  font-size: 0.86rem;
}

body[data-page="detail"] .table-button {
  width: 100%;
  min-width: 0;
  padding: 0 8px;
}

.delete-action {
  display: grid;
  gap: 6px;
}

.delete-options {
  display: grid;
  gap: 5px;
}

.delete-options.hidden {
  display: none;
}

.delete-option-button {
  min-height: 30px;
  padding: 0 7px;
  border: 1px solid #d8bc75;
  border-radius: 8px;
  background: var(--soft-blue);
  color: #111111;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.delete-option-button:hover {
  background: var(--brand-gold);
}

.delete-option-button:disabled {
  cursor: default;
  opacity: 0.58;
}

.delete-option-button.is-danger {
  border-color: #dec2c7;
  background: var(--soft-pink);
  color: var(--brand-red);
}

.delete-option-button.is-danger:hover {
  background: #e5cfd4;
}

.progress-log {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
  text-align: left;
}

.progress-log-entry {
  display: block;
  padding: 0 0 5px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  line-height: 1.4;
}

.progress-log-entry:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.progress-log-date {
  color: var(--brand-red);
  font-size: 0.8rem;
  font-weight: 800;
  margin-right: 6px;
  white-space: nowrap;
}

.progress-log-text {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.35;
}

.progress-input {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  border-radius: 10px;
  font-size: 0.92rem;
}

.save-progress-button {
  justify-self: start;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #c9dec9;
  background: var(--soft-green);
  color: var(--brand-green);
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.save-progress-button:hover {
  background: #dfeede;
}

.table-button {
  min-height: 36px;
  padding: 0 12px;
  background: var(--soft-pink);
  color: var(--danger);
  border-color: #dec2c7;
  border-radius: 10px;
}

.table-button:hover {
  background: #e5cfd4;
}

body[data-page="file-movement"] .main-layout {
  gap: 14px;
}

body[data-page="file-movement"] {
  background:
    linear-gradient(180deg, #eef2f5 0%, #d8e0e7 100%);
}

body[data-page="file-movement"] .page-shell {
  max-width: none;
  padding: 10px;
}

.file-admin-shell {
  color: #1c2733;
}

.file-admin-chrome {
  border: 1px solid #7f909f;
  background: #f5f7f9;
  box-shadow: 0 12px 26px rgba(22, 38, 54, 0.16);
}

.file-admin-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 50px;
  padding: 8px 14px;
  background: linear-gradient(180deg, #225d8d 0%, #173f64 100%);
  color: #ffffff;
}

.file-admin-titlebar > div {
  display: grid;
  gap: 2px;
}

.file-admin-product {
  color: #d9edf9;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.file-admin-titlebar strong {
  font-size: 1.05rem;
}

.file-admin-home {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
}

body[data-page="file-movement"].file-user-session #fileTrackingBackHome {
  display: none !important;
}

body[data-page="file-movement"].file-admin-session .file-admin-sidebar button:not([data-file-panel-target="dashboard"]) {
  display: none !important;
}

.file-admin-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 36px;
  border-top: 1px solid #7390a7;
  border-bottom: 1px solid #9aa8b4;
  background: linear-gradient(180deg, #e9edf1 0%, #cbd4dc 100%);
}

.file-admin-tabs span,
.file-admin-tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  border: 0;
  border-right: 1px solid #aab6c0;
  background: transparent;
  color: #23384d;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.file-admin-tabs button.has-count::after,
.file-admin-sidebar button.has-count::after {
  content: attr(data-count);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #b34b36;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
}

.file-admin-tabs span.is-active,
.file-admin-tabs button.is-active {
  background: #ffffff;
  color: #0f4772;
  box-shadow: inset 0 3px 0 #2d80bd;
}

.file-admin-workbench {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.file-admin-sidebar {
  display: grid;
  align-content: start;
  gap: 1px;
  min-height: 100%;
  border: 1px solid #a9b4be;
  background: #d7e0e8;
}

.file-admin-sidebar button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-bottom: 1px solid #b7c2cc;
  background: linear-gradient(180deg, #f9fbfc 0%, #e6ebef 100%);
  color: #263b50;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.file-admin-sidebar button.is-active {
  background: #2d80bd;
  color: #ffffff;
}

body[data-page="file-movement"] .card {
  border: 1px solid #a9b4be;
  border-radius: 2px;
  box-shadow: none;
  padding: 0;
  background: #ffffff;
}

body[data-page="file-movement"] .section-heading {
  min-height: 34px;
  margin: 0;
  padding: 7px 10px;
  border-bottom: 1px solid #a9b4be;
  background: linear-gradient(180deg, #f3f6f9 0%, #d8e0e8 100%);
}

body[data-page="file-movement"] .section-heading h2,
body[data-page="file-movement"] .section-heading h3 {
  margin: 0;
  color: #153c5f;
  font-size: 0.94rem;
  line-height: 1.2;
}

body[data-page="file-movement"] label > span {
  color: #34495c;
  font-size: 0.78rem;
  font-weight: 800;
}

body[data-page="file-movement"] input,
body[data-page="file-movement"] select,
body[data-page="file-movement"] textarea {
  min-height: 31px;
  padding: 5px 8px;
  border-color: #aab6c0;
  border-radius: 2px;
  background: #ffffff;
  color: #1c2733;
  font-size: 0.84rem;
}

body[data-page="file-movement"] .primary-button,
body[data-page="file-movement"] .ghost-button,
body[data-page="file-movement"] .table-button {
  min-height: 31px;
  padding: 0 12px;
  border-radius: 2px;
  font-size: 0.8rem;
}

body[data-page="file-movement"] .primary-button {
  background: linear-gradient(180deg, #3f9bd2 0%, #1f6faa 100%);
  color: #ffffff;
  box-shadow: none;
}

body[data-page="file-movement"] .primary-button:hover {
  background: #155d90;
}

body[data-page="file-movement"] .ghost-button,
body[data-page="file-movement"] .table-button {
  border-color: #9caeba;
  background: linear-gradient(180deg, #ffffff 0%, #e5ebf0 100%);
  color: #24384b;
}

.file-login-card {
  max-width: 720px;
  margin: 16px auto 0;
  overflow: hidden;
}

.file-login-card .section-heading {
  margin-bottom: 0;
}

.file-login-card .section-heading h2 {
  font-size: 0.94rem;
}

.file-login-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 10px;
}

.file-login-form label {
  gap: 4px;
}

.file-login-form input,
.file-login-form select {
  min-height: 31px;
  padding: 5px 8px;
  border-radius: 2px;
  font-size: 0.84rem;
}

.file-login-form .primary-button {
  min-height: 31px;
  padding: 0 14px;
  border-radius: 2px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.file-signup-divider {
  margin: 0;
  padding: 8px 10px;
  border-top: 1px solid #a9b4be;
  border-bottom: 1px solid #c5cdd4;
  background: #edf2f6;
  color: #153c5f;
  font-weight: 800;
  font-size: 0.84rem;
}

.file-signup-form {
  display: grid;
  gap: 12px;
  padding: 10px;
}

.file-login-card .status-message {
  margin: 0 10px 10px;
}

select option {
  color: #1c2733;
  background: #ffffff;
  font-weight: 500;
}

select optgroup {
  color: #153c5f;
  background: #edf2f6;
  font-weight: 800;
}

.file-urgent-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 31px;
  padding-top: 16px;
  color: #153c5f;
  font-weight: 800;
}

.file-urgent-check input {
  width: 15px;
  height: 15px;
  accent-color: #1f6faa;
}

.file-send-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.72fr) minmax(240px, 1.2fr) auto auto;
  align-items: end;
  gap: 8px;
  padding: 10px;
}

.file-send-grid label {
  min-width: 0;
  gap: 4px;
}

.file-send-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.file-send-actions .primary-button,
.file-send-actions .ghost-button {
  min-height: 31px;
  padding: 0 12px;
  white-space: nowrap;
}

.file-movement-workspace {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 10px;
}

.file-movement-workspace.hidden {
  display: none;
}

.file-movement-header-card {
  display: grid;
  gap: 0;
}

.file-admin-panel {
  display: grid;
  gap: 10px;
}

.file-admin-panel.hidden {
  display: none;
}

body[data-page="file-movement"] .section-heading .section-actions {
  margin-left: auto;
}

body[data-page="file-movement"] #fileMovementLogoutButton {
  background: linear-gradient(180deg, #8b1e2d 0%, #5c111d 100%);
  border-color: #4f0d17;
  color: #ffffff;
}

body[data-page="file-movement"] #fileMovementLogoutButton:hover {
  background: #4f0d17;
}

.file-settings-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1fr);
  gap: 10px;
  padding: 10px;
}

.file-settings-box {
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid #b7c2cc;
  background: #f8fafc;
  padding: 10px;
}

.file-settings-box.hidden {
  display: none;
}

.file-settings-box h4 {
  margin: 0;
  color: #153c5f;
  font-size: 0.9rem;
}

.file-settings-account {
  display: grid;
  gap: 8px;
}

.file-settings-account > div {
  border: 1px solid #c5cdd4;
  background: #ffffff;
  padding: 8px 10px;
}

.file-settings-account span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.file-settings-account strong {
  display: block;
  margin-top: 3px;
  color: #153c5f;
}

.file-settings-form {
  display: grid;
  gap: 8px;
}

.file-user-strip,
.file-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 8px;
  padding: 10px;
}

.file-user-strip > div,
.file-stat-box {
  padding: 8px 10px;
  border: 1px solid #b7c2cc;
  border-radius: 2px;
  background: linear-gradient(180deg, #ffffff 0%, #edf3f8 100%);
}

.file-user-strip span,
.file-stat-box span,
.file-name-cell span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.file-user-strip strong {
  display: block;
  margin-top: 4px;
  color: #153c5f;
}

.file-stat-box strong {
  display: block;
  margin-top: 2px;
  color: #1f6faa;
  font-size: 1.25rem;
}

.file-movement-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.file-entry-card,
.file-inbox-card {
  min-width: 0;
}

.file-entry-card .status-message {
  margin: 0 10px 10px;
}

.file-table-wrap table,
.file-movement-table {
  min-width: 900px;
}

.file-table-wrap {
  border: 0;
  border-radius: 0;
}

.file-movement-table {
  border-collapse: collapse;
}

.file-movement-table th {
  border-bottom: 1px solid #a9b4be;
  background: linear-gradient(180deg, #eef3f7 0%, #d4dde5 100%);
  color: #21384d;
  font-size: 0.78rem;
}

.file-movement-table td {
  border-bottom: 1px solid #d4dbe2;
  color: #1c2733;
  font-size: 0.82rem;
}

.file-movement-table tr:nth-child(even) td {
  background: #f8fafc;
}

.file-movement-table th,
.file-movement-table td {
  vertical-align: top;
}

.file-name-cell {
  display: grid;
  gap: 4px;
}

.file-name-cell strong {
  color: var(--text);
}

#fileMovementFileName,
.file-name-cell strong,
.file-report-output td:nth-child(2) {
  font-family: var(--bangla-font);
}

.file-row-actions {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.file-row-actions .primary-button,
.file-row-actions .ghost-button,
.file-movement-table .primary-button,
.file-movement-table .ghost-button,
.file-movement-table .table-button {
  min-height: 30px;
  padding: 0 10px;
  white-space: nowrap;
}

.file-tracker-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 240px);
  gap: 8px;
  margin: 0;
  padding: 10px;
  border-bottom: 1px solid #d4dbe2;
}

.file-report-form {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(140px, 0.7fr) minmax(220px, 1.2fr) minmax(150px, 0.8fr) auto;
  align-items: end;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid #d4dbe2;
}

.file-report-output {
  display: grid;
  gap: 10px;
}

.file-report-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
  padding: 10px;
}

.file-report-meta {
  padding: 0 10px 10px;
  color: #526272;
  font-size: 0.82rem;
  font-weight: 700;
}

.file-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 2px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  background: #6f8190;
}

.file-status.received {
  background: #2d80bd;
}

.file-status.closed {
  background: #3d4954;
}

.file-status.in-transit,
.file-status.incoming {
  background: #b34b36;
}

.file-status.sent {
  background: #8a6a1f;
}

.file-status-cell {
  display: grid;
  gap: 5px;
  min-width: 160px;
}

.file-status-cell span:not(.file-status) {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.file-flow-chart {
  display: grid;
  gap: 0;
  min-width: 260px;
}

.file-flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  padding-bottom: 12px;
}

.file-flow-step::after {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 0;
  left: 13px;
  width: 2px;
  background: #bcc9d4;
}

.file-flow-step:last-child {
  padding-bottom: 0;
}

.file-flow-step:last-child::after {
  display: none;
}

.file-flow-marker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 2px;
  background: #2d80bd;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

.file-flow-step-closed .file-flow-marker {
  background: #3d4954;
}

.file-flow-content {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid #c5cdd4;
  border-radius: 2px;
  background: #ffffff;
}

.file-flow-content strong {
  color: #153c5f;
  font-size: 0.86rem;
}

.file-flow-content span,
.file-flow-empty {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.file-history-list {
  display: grid;
  gap: 10px;
}

.file-notification-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(360px, 1.18fr);
  gap: 10px;
  padding: 10px;
}

.file-notification-box {
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid #b7c2cc;
  background: #f8fafc;
  padding: 10px;
  min-height: 240px;
}

.file-notification-single {
  margin: 10px;
}

.file-notification-box h4 {
  margin: 0;
  color: #153c5f;
  font-size: 0.9rem;
}

.file-history-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-green);
  border-radius: 10px;
  background: #ffffff;
}

.file-history-item strong {
  color: var(--brand-red);
}

.file-history-item span,
.file-history-item em,
.file-history-item p {
  color: var(--muted);
  font-size: 0.9rem;
}

.file-history-item em {
  font-style: normal;
}

.file-history-item p {
  margin: 2px 0 0;
}

.file-notification-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.empty-cell {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

@keyframes buttonGlance {
  0% {
    left: -120%;
  }
  100% {
    left: 160%;
  }
}

@keyframes shortcutColorShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes shortcutSweep {
  0% {
    left: -140%;
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  52% {
    opacity: 1;
  }
  100% {
    left: 150%;
    opacity: 0;
  }
}

@keyframes welcomeFade {
  0% {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }
  18% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  82% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px) scale(0.99);
  }
}

@keyframes pinScreenShake {
  0% { transform: translateX(0); }
  15% { transform: translateX(-10px); }
  30% { transform: translateX(10px); }
  45% { transform: translateX(-8px); }
  60% { transform: translateX(8px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

@keyframes pinSuccessCard {
  0% {
    transform: rotate(-1.4deg) scale(1);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  }
  45% {
    transform: rotate(0deg) scale(1.035);
    box-shadow: 0 30px 80px rgba(47, 143, 59, 0.32);
  }
  100% {
    transform: rotate(0deg) scale(0.98);
    opacity: 0;
  }
}

@keyframes pinSuccessBadge {
  0% {
    opacity: 0;
    transform: scale(0.35);
  }
  70% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pinSuccessCheck {
  0% {
    opacity: 0;
    transform: rotate(-45deg) scale(0.55);
  }
  100% {
    opacity: 1;
    transform: rotate(-45deg) scale(1);
  }
}


.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 28px 0;
}

.site-footer {
  margin-top: 20px;
  padding: 16px 20px;
  text-align: center;
  color: #ffffff;
  font-weight: 500;
  font-size: 0.86rem;
  background: var(--brand-black);
  border: 1px solid var(--brand-black);
  border-radius: 16px;
}

.import-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.import-note.is-success {
  color: var(--brand-green);
}

.import-note.is-error {
  color: var(--brand-red);
}

.acts-match {
  background: var(--brand-gold);
  color: var(--brand-black);
  padding: 0 2px;
  border-radius: 4px;
}

.acts-row.is-selected td {
  background: var(--soft-yellow);
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) {
  background:
    linear-gradient(180deg, #eef2f5 0%, #d8e0e7 100%);
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) .page-shell {
  max-width: none;
  padding: 10px;
}

.page-shortcuts-overlay.file-admin-chrome {
  display: block;
  margin-bottom: 10px;
}

.page-shortcuts-overlay .file-admin-tabs {
  justify-content: flex-start;
  max-width: none;
  overflow-x: auto;
}

.top-shortcuts.file-admin-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  padding: 0;
  border-radius: 0;
  background: #3b3f46;
}

.top-shortcuts.file-admin-tabs .shortcut-button {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 6px;
  border: 0;
  border-right: 1px solid #9a927f;
  border-radius: 0;
  background: linear-gradient(180deg, #e7dfcf 0%, #b8ad97 100%);
  box-shadow: none;
  color: #7b101b;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
}

.top-shortcuts.file-admin-tabs .shortcut-button:hover,
.top-shortcuts.file-admin-tabs .shortcut-button.is-active {
  background: linear-gradient(180deg, #5a5f68 0%, #343941 100%);
  color: #ffffff;
  box-shadow: inset 0 3px 0 #d6c7a8;
}

.top-shortcuts.file-admin-tabs .shortcut-button::after {
  display: none;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) .main-layout {
  gap: 10px;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) .card {
  overflow: hidden;
  padding: 0;
  border: 1px solid #a9b4be;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: none;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) .card > *:not(.section-heading):not(.table-wrap) {
  margin: 10px;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) .section-heading {
  min-height: 34px;
  margin: 0;
  padding: 7px 10px;
  border-bottom: 1px solid #a9b4be;
  background: linear-gradient(180deg, #f3f6f9 0%, #d8e0e8 100%);
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) .section-heading h2,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .section-heading h3,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .nav-sections h3 {
  margin: 0;
  color: #153c5f;
  font-size: 0.94rem;
  line-height: 1.2;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) label > span {
  color: #34495c;
  font-size: 0.78rem;
  font-weight: 800;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) input,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) select,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) textarea {
  min-height: 31px;
  padding: 5px 8px;
  border-color: #aab6c0;
  border-radius: 2px;
  background: #ffffff;
  color: #1c2733;
  font-size: 0.84rem;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) .primary-button,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .ghost-button,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .secondary-link,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .table-button,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .save-progress-button {
  min-height: 31px;
  padding: 0 12px;
  border-radius: 2px;
  font-size: 0.8rem;
  box-shadow: none;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) .primary-button {
  background: linear-gradient(180deg, #3f9bd2 0%, #1f6faa 100%);
  color: #ffffff;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) .primary-button:hover {
  background: #155d90;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) .ghost-button,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .secondary-link,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .table-button,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .save-progress-button {
  border-color: #9caeba;
  background: linear-gradient(180deg, #ffffff 0%, #e5ebf0 100%);
  color: #24384b;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) .table-wrap {
  border: 0;
  border-radius: 0;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) table {
  border-collapse: collapse;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) th {
  border-bottom: 1px solid #a9b4be;
  background: linear-gradient(180deg, #eef3f7 0%, #d4dde5 100%);
  color: #21384d;
  font-size: 0.78rem;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) td {
  border-bottom: 1px solid #d4dbe2;
  color: #1c2733;
  font-size: 0.82rem;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) tr:nth-child(even) td {
  background: #f8fafc;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) .status-message,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .all-factories-meta,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .call-on-meta {
  color: #526272;
  font-size: 0.82rem;
}

body[data-page="leave"] .leave-page,
body[data-page="leave"] .leave-split-layout {
  height: auto;
}

body[data-page="leave"] .leave-page {
  align-content: start;
  grid-template-rows: auto auto;
}

@media (max-width: 980px) {
  body[data-page="dashboard"] .dashboard-titlebar {
    align-items: flex-start;
  }

  body[data-page="dashboard"] .clock-panel {
    align-self: stretch;
    text-align: left;
  }

  .topbar,
  .grid-two {
    grid-template-columns: 1fr;
    display: grid;
  }

  .topbar {
    grid-template-areas:
      "brand"
      "shortcuts"
      "clock";
  }

  .brand-block {
    align-items: flex-start;
  }

  .clock-panel {
    justify-self: stretch;
    text-align: left;
  }

  .backup-actions .logout-button {
    margin-left: 0;
  }

  .instruction-form .form-grid {
    grid-template-columns: 1fr;
  }

  .full-span {
    grid-column: auto;
  }

  .navigation-groups {
    grid-template-columns: 1fr;
  }

  .leave-toolbar,
  .leave-entry-grid,
  .factory-entry-grid {
    grid-template-columns: 1fr;
  }

  .major-commitment-delete-layout,
  .major-commitment-download-layout,
  .major-commitment-download-grid,
  .epz-box-grid {
    grid-template-columns: 1fr;
  }

  .epz-box-with-chart {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "chart";
  }

  .zone-visit-grid-chart {
    justify-self: start;
  }

  .top-shortcuts {
    justify-self: stretch;
    justify-content: flex-start;
    max-width: none;
  }

  .top-shortcuts .shortcut-button {
    flex: 1 1 140px;
  }

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

  .dashboard-chart-panel {
    padding: 18px;
  }

  .dashboard-chart-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "chart"
      "action"
      "legend";
  }

  .navigation-group {
    flex-wrap: wrap;
  }

  .sick-grid {
    grid-template-columns: 1fr;
  }

  .file-admin-titlebar,
  .file-admin-tabs {
    flex-wrap: wrap;
  }

  .file-admin-tabs span,
  .file-admin-tabs button {
    flex: 1 1 120px;
    min-height: 34px;
  }

  .file-admin-sidebar {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  .file-login-form,
  .file-send-grid,
  .file-report-form,
  .file-settings-grid,
  .file-movement-grid,
  .file-movement-workspace,
  .file-tracker-filter,
  .file-user-strip,
  .file-stat-grid,
  .file-report-summary,
  .file-notification-grid,
  .file-row-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body {
    background-attachment: scroll;
  }

  .page-shell,
  body[data-page="dashboard"] .page-shell,
  body:not([data-page="dashboard"]):not([data-page="file-movement"]) .page-shell,
  body[data-page="file-movement"] .page-shell {
    padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  }

  .pin-overlay {
    align-items: flex-start;
    overflow-y: auto;
    padding: max(14px, env(safe-area-inset-top)) 10px max(14px, env(safe-area-inset-bottom));
  }

  .pin-card {
    width: 100%;
    max-width: 420px;
    padding: 18px;
    border-radius: 8px;
    transform: none;
  }

  .pin-card > * {
    transform: none;
  }

  .welcome-toast {
    left: 10px;
    right: 10px;
    transform: none;
  }

  .welcome-toast-inner {
    min-width: 0;
    width: 100%;
  }

  .file-admin-titlebar,
  body[data-page="dashboard"] .dashboard-titlebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
  }

  .brand-block {
    min-width: 0;
  }

  .brand-block strong,
  .file-admin-titlebar strong {
    overflow-wrap: anywhere;
  }

  body[data-page="dashboard"] .clock-panel,
  .clock-panel {
    justify-self: stretch;
    min-width: 0;
    text-align: left;
  }

  .top-shortcuts.file-admin-tabs,
  .page-shortcuts-overlay .file-admin-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 150px;
    grid-template-columns: none;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .top-shortcuts.file-admin-tabs .shortcut-button,
  .file-admin-tabs button,
  .file-admin-tabs span {
    min-width: 150px;
    min-height: 38px;
    padding: 0 10px;
    white-space: nowrap;
  }

  .section-heading,
  .section-actions,
  .filters-row,
  .form-actions,
  .backup-actions,
  .file-send-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .section-actions > *,
  .form-actions > *,
  .backup-actions > *,
  .file-send-actions > *,
  .detail-top-actions > * {
    width: 100%;
  }

  .card,
  body[data-page="file-movement"] .card,
  body:not([data-page="dashboard"]):not([data-page="file-movement"]) .card {
    border-radius: 2px;
  }

  .card {
    padding: 12px;
  }

  body:not([data-page="dashboard"]):not([data-page="file-movement"]) .card {
    padding: 0;
  }

  .primary-link,
  .secondary-link,
  .primary-button,
  .ghost-button,
  .table-button,
  .save-progress-button,
  .delete-option-button {
    min-height: 40px;
    padding-left: 12px;
    padding-right: 12px;
  }

  input,
  select,
  textarea {
    min-height: 40px;
    font-size: 16px;
  }

  .table-wrap,
  .file-table-wrap,
  .zone-visit-table-wrap {
    overflow-x: auto;
  }

  table {
    min-width: 760px;
  }

  body[data-page="detail"] table,
  .zone-visit-table,
  .file-movement-table {
    min-width: 820px;
  }

  .file-movement-workspace {
    grid-template-columns: 1fr;
  }

  .file-admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 2px;
    background: #d8e0e7;
    -webkit-overflow-scrolling: touch;
  }

  .file-admin-sidebar button {
    min-width: max-content;
    white-space: nowrap;
  }

  .file-user-strip,
  .file-stat-grid,
  .file-report-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .file-send-grid,
  .file-row-actions,
  .file-report-form,
  .file-settings-grid,
  .file-tracker-filter,
  .factory-entry-grid,
  .zone-visit-entry-grid {
    grid-template-columns: 1fr;
  }

  .file-row-actions .primary-button,
  .file-row-actions .ghost-button,
  .file-movement-table .primary-button,
  .file-movement-table .ghost-button,
  .file-movement-table .table-button {
    white-space: normal;
  }

  body[data-page="leave"] {
    overflow: auto;
  }

  body[data-page="leave"] .page-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }
}

body:is(
  [data-page="all-factories"],
  [data-page="factory-list"],
  [data-page="zone-visit"],
  [data-page="zone-visit-detail"],
  [data-page="common-instruction"],
  [data-page="call-on"],
  [data-page="archives"],
  [data-page="detail"],
  [data-page="leave"],
  [data-page="leave-detail"],
  [data-page="major-commitment"]
) {
  background: linear-gradient(180deg, #eef2f5 0%, #d8e0e7 100%);
}

body:is(
  [data-page="all-factories"],
  [data-page="factory-list"],
  [data-page="zone-visit"],
  [data-page="zone-visit-detail"],
  [data-page="common-instruction"],
  [data-page="call-on"],
  [data-page="archives"],
  [data-page="detail"],
  [data-page="leave"],
  [data-page="leave-detail"],
  [data-page="major-commitment"]
) .card {
  border: 1px solid #a9b4be;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: none;
}

body:is(
  [data-page="all-factories"],
  [data-page="factory-list"],
  [data-page="zone-visit"],
  [data-page="zone-visit-detail"],
  [data-page="common-instruction"],
  [data-page="call-on"],
  [data-page="archives"],
  [data-page="detail"],
  [data-page="leave"],
  [data-page="leave-detail"],
  [data-page="major-commitment"]
) .section-heading {
  border-bottom: 1px solid #a9b4be;
  background: linear-gradient(180deg, #f3f6f9 0%, #d8e0e8 100%);
}

body:is(
  [data-page="all-factories"],
  [data-page="factory-list"],
  [data-page="zone-visit"],
  [data-page="zone-visit-detail"],
  [data-page="common-instruction"],
  [data-page="call-on"],
  [data-page="archives"],
  [data-page="detail"],
  [data-page="leave"],
  [data-page="leave-detail"],
  [data-page="major-commitment"]
) .section-heading h2,
body:is(
  [data-page="all-factories"],
  [data-page="factory-list"],
  [data-page="zone-visit"],
  [data-page="zone-visit-detail"],
  [data-page="common-instruction"],
  [data-page="call-on"],
  [data-page="archives"],
  [data-page="detail"],
  [data-page="leave"],
  [data-page="leave-detail"],
  [data-page="major-commitment"]
) .section-heading h3 {
  color: #153c5f;
}

body:is(
  [data-page="all-factories"],
  [data-page="factory-list"],
  [data-page="zone-visit"],
  [data-page="zone-visit-detail"],
  [data-page="common-instruction"],
  [data-page="call-on"],
  [data-page="archives"],
  [data-page="detail"],
  [data-page="leave"],
  [data-page="leave-detail"],
  [data-page="major-commitment"]
) label > span,
body:is(
  [data-page="all-factories"],
  [data-page="factory-list"],
  [data-page="zone-visit"],
  [data-page="zone-visit-detail"],
  [data-page="common-instruction"],
  [data-page="call-on"],
  [data-page="archives"],
  [data-page="detail"],
  [data-page="leave"],
  [data-page="leave-detail"],
  [data-page="major-commitment"]
) .all-factories-meta,
body:is(
  [data-page="all-factories"],
  [data-page="factory-list"],
  [data-page="zone-visit"],
  [data-page="zone-visit-detail"],
  [data-page="common-instruction"],
  [data-page="call-on"],
  [data-page="archives"],
  [data-page="detail"],
  [data-page="leave"],
  [data-page="leave-detail"],
  [data-page="major-commitment"]
) .call-on-meta {
  color: #526272;
}

body:is(
  [data-page="all-factories"],
  [data-page="factory-list"],
  [data-page="zone-visit"],
  [data-page="zone-visit-detail"],
  [data-page="common-instruction"],
  [data-page="call-on"],
  [data-page="archives"],
  [data-page="detail"],
  [data-page="leave"],
  [data-page="leave-detail"],
  [data-page="major-commitment"]
) th {
  background: linear-gradient(180deg, #eef3f7 0%, #d4dde5 100%);
  color: #21384d;
}

body:is(
  [data-page="all-factories"],
  [data-page="factory-list"],
  [data-page="zone-visit"],
  [data-page="zone-visit-detail"],
  [data-page="common-instruction"],
  [data-page="call-on"],
  [data-page="archives"],
  [data-page="detail"],
  [data-page="leave"],
  [data-page="leave-detail"],
  [data-page="major-commitment"]
) .primary-button {
  background: linear-gradient(180deg, #3f9bd2 0%, #1f6faa 100%);
  color: #ffffff;
}

body:is(
  [data-page="all-factories"],
  [data-page="factory-list"],
  [data-page="zone-visit"],
  [data-page="zone-visit-detail"],
  [data-page="common-instruction"],
  [data-page="call-on"],
  [data-page="archives"],
  [data-page="detail"],
  [data-page="leave"],
  [data-page="leave-detail"],
  [data-page="major-commitment"]
) .ghost-button,
body:is(
  [data-page="all-factories"],
  [data-page="factory-list"],
  [data-page="zone-visit"],
  [data-page="zone-visit-detail"],
  [data-page="common-instruction"],
  [data-page="call-on"],
  [data-page="archives"],
  [data-page="detail"],
  [data-page="leave"],
  [data-page="leave-detail"],
  [data-page="major-commitment"]
) .table-button,
body:is(
  [data-page="all-factories"],
  [data-page="factory-list"],
  [data-page="zone-visit"],
  [data-page="zone-visit-detail"],
  [data-page="common-instruction"],
  [data-page="call-on"],
  [data-page="archives"],
  [data-page="detail"],
  [data-page="leave"],
  [data-page="leave-detail"],
  [data-page="major-commitment"]
) .secondary-link {
  border-color: #9caeba;
  background: linear-gradient(180deg, #ffffff 0%, #e5ebf0 100%);
  color: #24384b;
}

@media (max-width: 430px) {
  .pin-mode-selector,
  .file-user-strip,
  .file-stat-grid,
  .file-report-summary {
    grid-template-columns: 1fr;
  }

  .digital-clock {
    font-size: 1.25rem;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .section-heading h2,
  .section-heading h3,
  body:not([data-page="dashboard"]):not([data-page="file-movement"]) .section-heading h2,
  body:not([data-page="dashboard"]):not([data-page="file-movement"]) .section-heading h3 {
    font-size: 0.9rem;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
    line-height: 1.45;
  }

  .page-shell,
  body[data-page="dashboard"] .page-shell,
  body[data-page="file-movement"] .page-shell,
  body:not([data-page="dashboard"]):not([data-page="file-movement"]) .page-shell {
    padding: 6px !important;
  }

  .main-layout,
  body[data-page="dashboard"] .main-layout,
  body[data-page="file-movement"] .main-layout,
  body:not([data-page="dashboard"]):not([data-page="file-movement"]) .main-layout {
    gap: 8px;
  }

  .section-heading {
    gap: 8px;
    min-height: 42px;
    padding: 9px 10px !important;
  }

  .section-heading h2,
  .section-heading h3,
  body:not([data-page="dashboard"]):not([data-page="file-movement"]) .section-heading h2,
  body:not([data-page="dashboard"]):not([data-page="file-movement"]) .section-heading h3 {
    font-size: 1rem !important;
    line-height: 1.25;
  }

  label > span,
  body:not([data-page="dashboard"]):not([data-page="file-movement"]) label > span {
    font-size: 0.9rem !important;
  }

  input,
  select,
  textarea,
  body:not([data-page="dashboard"]):not([data-page="file-movement"]) input,
  body:not([data-page="dashboard"]):not([data-page="file-movement"]) select,
  body:not([data-page="dashboard"]):not([data-page="file-movement"]) textarea {
    min-height: 44px;
    font-size: 16px !important;
  }

  .primary-button,
  .ghost-button,
  .table-button,
  .secondary-link,
  .save-progress-button,
  .delete-option-button,
  body:not([data-page="dashboard"]):not([data-page="file-movement"]) .primary-button,
  body:not([data-page="dashboard"]):not([data-page="file-movement"]) .ghost-button,
  body:not([data-page="dashboard"]):not([data-page="file-movement"]) .table-button,
  body:not([data-page="dashboard"]):not([data-page="file-movement"]) .secondary-link,
  body:not([data-page="dashboard"]):not([data-page="file-movement"]) .save-progress-button {
    min-height: 44px;
    font-size: 0.95rem !important;
  }

  .top-shortcuts.file-admin-tabs,
  .page-shortcuts-overlay .file-admin-tabs {
    grid-auto-columns: minmax(132px, 42vw);
  }

  .top-shortcuts.file-admin-tabs .shortcut-button,
  .file-admin-tabs button,
  .file-admin-tabs span {
    min-width: 132px;
    min-height: 44px;
    font-size: 0.82rem !important;
    white-space: normal;
  }

  .table-wrap,
  .file-table-wrap,
  .zone-visit-table-wrap,
  body[data-page="detail"] .table-wrap,
  body[data-page="leave"] .leave-table-card .table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  table,
  body[data-page="detail"] table,
  .zone-visit-table,
  .file-movement-table {
    min-width: 760px;
  }

  th,
  td,
  body:not([data-page="dashboard"]):not([data-page="file-movement"]) th,
  body:not([data-page="dashboard"]):not([data-page="file-movement"]) td {
    font-size: 0.88rem !important;
    line-height: 1.35;
  }

  .call-on-actions,
  body[data-page="archives"] .call-on-actions,
  .call-on-file-actions,
  body[data-page="archives"] .archive-table .call-on-file-actions,
  .factory-row-actions,
  .zone-visit-row-actions,
  .leave-action-group {
    flex-wrap: wrap;
  }

  body[data-page="archives"] .archive-table .call-on-file-actions {
    gap: 4px;
  }

  body[data-page="call-on"] .call-on-download-button,
  body[data-page="archives"] .call-on-download-button {
    min-height: 36px;
    padding: 0 8px;
  }

  .backup-actions .logout-button {
    margin-left: 0;
  }

  body[data-page="dashboard"] .backup-actions > button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shortcut-button,
  .top-shortcuts .shortcut-button::after,
  .shortcut-button.is-animating::after {
    animation: none;
  }
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) {
  background: linear-gradient(180deg, #eef2f5 0%, #d8e0e7 100%) !important;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) .card {
  border: 1px solid #a9b4be !important;
  border-radius: 2px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) .section-heading {
  border-bottom: 1px solid #a9b4be !important;
  background: linear-gradient(180deg, #f3f6f9 0%, #d8e0e8 100%) !important;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) .section-heading h2,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .section-heading h3,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) label > span {
  color: #153c5f !important;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) th {
  background: linear-gradient(180deg, #eef3f7 0%, #d4dde5 100%) !important;
  color: #21384d !important;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) .primary-button {
  background: linear-gradient(180deg, #3f9bd2 0%, #1f6faa 100%) !important;
  color: #ffffff !important;
}

body:not([data-page="dashboard"]):not([data-page="file-movement"]) .ghost-button,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .table-button,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .secondary-link,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .save-progress-button {
  border-color: #9caeba !important;
  background: linear-gradient(180deg, #ffffff 0%, #e5ebf0 100%) !important;
  color: #24384b !important;
}

html,
body,
.page-shell,
body[data-page="dashboard"] .page-shell,
body[data-page="file-movement"] .page-shell,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .page-shell {
  width: 100%;
  max-width: none !important;
}

.main-layout,
body[data-page="dashboard"] .main-layout,
body[data-page="file-movement"] .main-layout,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .main-layout {
  width: 100%;
}

/* Red, warm white, gray, and teal theme inspired by the provided Color Hunt palette. */
:root {
  --lux-navy: #1e93ab;
  --lux-navy-2: #176f82;
  --lux-navy-3: #e62727;
  --lux-gold: #e62727;
  --lux-gold-light: #f3f2ec;
  --lux-gold-dark: #b91f1f;
  --lux-cream: #f3f2ec;
  --lux-cream-2: #dcdcdc;
  --lux-ink: #172124;
  --lux-muted: #5f6668;
  --lux-line: #dcdcdc;
}

body,
body[data-page="dashboard"],
body[data-page="file-movement"],
body:not([data-page="dashboard"]):not([data-page="file-movement"]) {
  background:
    radial-gradient(circle at 6% 7%, rgba(230, 39, 39, 0.1) 0 1px, transparent 2px) 0 0 / 18px 18px,
    radial-gradient(circle at 92% 4%, rgba(30, 147, 171, 0.14), transparent 22%),
    linear-gradient(135deg, #f3f2ec 0%, #eeeeea 54%, #dcdcdc 100%) !important;
  color: var(--lux-ink);
  -webkit-tap-highlight-color: rgba(230, 39, 39, 0.18);
}

.idle-background {
  opacity: 0.55;
}

.idle-orb-one {
  background: radial-gradient(circle, rgba(230, 39, 39, 0.12) 0%, rgba(230, 39, 39, 0.04) 66%, transparent 100%);
}

.idle-orb-two {
  background: radial-gradient(circle, rgba(30, 147, 171, 0.14) 0%, rgba(30, 147, 171, 0.05) 66%, transparent 100%);
}

.idle-orb-three {
  background: radial-gradient(circle, rgba(220, 220, 220, 0.6) 0%, rgba(220, 220, 220, 0.12) 72%, transparent 100%);
}

.topbar,
.file-admin-chrome,
.page-shortcuts-overlay.file-admin-chrome,
body[data-page="dashboard"] .dashboard-admin-chrome,
body[data-page="file-movement"] .file-admin-chrome {
  border: 1px solid rgba(220, 220, 220, 0.7);
  background: linear-gradient(180deg, #1e93ab 0%, #176f82 100%);
  box-shadow: 0 18px 42px rgba(23, 33, 36, 0.2);
}

.topbar h1,
.file-admin-titlebar strong {
  color: #ffffff;
}

.subtitle,
.file-admin-product,
.digital-date,
body[data-page="dashboard"] .digital-date {
  color: rgba(255, 255, 255, 0.78);
}

.clock-label,
.digital-clock,
body[data-page="dashboard"] .digital-clock {
  color: #f3f2ec;
}

.file-admin-titlebar,
body[data-page="dashboard"] .dashboard-titlebar {
  background:
    linear-gradient(105deg, rgba(243, 242, 236, 0.22), transparent 34%),
    linear-gradient(180deg, var(--lux-navy-2) 0%, var(--lux-navy) 100%);
  color: #ffffff;
}

.top-shortcuts.file-admin-tabs,
.mirrored-shortcuts,
.file-admin-tabs {
  border-color: rgba(220, 220, 220, 0.72);
  background: linear-gradient(180deg, #f3f2ec 0%, #dcdcdc 100%);
}

.shortcut-button,
.top-shortcuts.file-admin-tabs .shortcut-button,
.file-admin-tabs button,
.file-admin-tabs span {
  border-color: rgba(30, 147, 171, 0.5);
  background:
    linear-gradient(135deg, rgba(243, 242, 236, 0.38), transparent 42%),
    linear-gradient(180deg, #f3f2ec 0%, #dcdcdc 100%);
  color: #172124;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 8px 18px rgba(23, 33, 36, 0.12);
}

.shortcut-button:hover,
.shortcut-button.is-active,
.top-shortcuts.file-admin-tabs .shortcut-button:hover,
.top-shortcuts.file-admin-tabs .shortcut-button.is-active,
.file-admin-tabs button.is-active,
.file-admin-tabs span.is-active {
  background:
    linear-gradient(135deg, rgba(243, 242, 236, 0.18), transparent 38%),
    linear-gradient(180deg, var(--lux-navy) 0%, var(--lux-navy-2) 100%);
  color: #ffffff;
  box-shadow: inset 0 3px 0 var(--lux-gold), 0 10px 22px rgba(23, 33, 36, 0.18);
}

.card,
body[data-page="dashboard"] .card,
body[data-page="file-movement"] .card,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .card {
  border: 1px solid rgba(220, 220, 220, 0.95) !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #ffffff 0%, var(--lux-cream) 100%) !important;
  box-shadow: 0 18px 38px rgba(23, 33, 36, 0.16) !important;
}

.section-heading,
body[data-page="dashboard"] .section-heading,
body[data-page="file-movement"] .section-heading,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .section-heading {
  border-bottom: 1px solid rgba(220, 220, 220, 0.85) !important;
  background:
    linear-gradient(105deg, rgba(230, 39, 39, 0.16), transparent 38%),
    linear-gradient(180deg, var(--lux-navy-2) 0%, var(--lux-navy) 100%) !important;
}

.section-heading h2,
.section-heading h3,
.nav-sections h3,
body[data-page="dashboard"] .section-heading h2,
body[data-page="file-movement"] .section-heading h2,
body[data-page="file-movement"] .section-heading h3,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .section-heading h2,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .section-heading h3,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .nav-sections h3 {
  color: #ffffff !important;
}

label,
body[data-page="file-movement"] label > span,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) label > span,
.all-factories-meta,
.call-on-meta,
.status-message,
.import-note,
.backup-status,
.empty-state {
  color: var(--lux-muted) !important;
}

.section-heading label,
.section-heading label > span,
.section-heading .all-factories-meta,
.section-heading .call-on-meta,
.section-heading .status-message {
  color: rgba(255, 255, 255, 0.82) !important;
}

.chart-legend,
body[data-page="dashboard"] .chart-legend,
.zone-inspection-bar-label {
  color: var(--lux-muted) !important;
}

.zone-inspection-bar-label strong,
body[data-page="dashboard"] .zone-inspection-bar-label strong {
  color: var(--lux-navy) !important;
}

input,
select,
textarea,
body[data-page="file-movement"] input,
body[data-page="file-movement"] select,
body[data-page="file-movement"] textarea,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) input,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) select,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) textarea {
  border-color: rgba(220, 220, 220, 0.95);
  background: #ffffff;
  color: var(--lux-ink);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--lux-navy);
  outline: 2px solid rgba(30, 147, 171, 0.24);
}

.primary-link,
.primary-button,
body[data-page="dashboard"] .primary-button,
body[data-page="file-movement"] .primary-button,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .primary-button {
  border-color: var(--lux-gold-dark) !important;
  background:
    linear-gradient(135deg, rgba(243, 242, 236, 0.22), transparent 42%),
    linear-gradient(180deg, #e62727 0%, #b91f1f 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(230, 39, 39, 0.2) !important;
}

.primary-link:hover,
.primary-button:hover,
body[data-page="dashboard"] .primary-button:hover,
body[data-page="file-movement"] .primary-button:hover,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .primary-button:hover {
  background: linear-gradient(180deg, var(--lux-navy) 0%, var(--lux-navy-2) 100%) !important;
  color: #ffffff !important;
}

.secondary-link,
.ghost-button,
.table-button,
.save-progress-button,
.delete-option-button,
body[data-page="dashboard"] .ghost-button,
body[data-page="file-movement"] .ghost-button,
body[data-page="file-movement"] .table-button,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .ghost-button,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .table-button,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .secondary-link,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) .save-progress-button {
  border-color: rgba(220, 220, 220, 0.95) !important;
  background: linear-gradient(180deg, #ffffff 0%, var(--lux-cream) 100%) !important;
  color: #172124 !important;
}

.secondary-link:hover,
.ghost-button:hover,
.table-button:hover,
.save-progress-button:hover,
.delete-option-button:hover {
  background: linear-gradient(180deg, var(--lux-navy) 0%, var(--lux-navy-2) 100%) !important;
  color: #ffffff !important;
}

.table-wrap,
.file-table-wrap,
.zone-visit-table-wrap {
  border-color: rgba(220, 220, 220, 0.95);
}

thead,
th,
body[data-page="dashboard"] .chart-title,
body[data-page="file-movement"] th,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) th {
  background:
    linear-gradient(105deg, rgba(230, 39, 39, 0.14), transparent 40%),
    linear-gradient(180deg, var(--lux-navy-2) 0%, var(--lux-navy) 100%) !important;
  color: #ffffff !important;
}

th,
td {
  border-color: rgba(220, 220, 220, 0.9);
}

td,
body:not([data-page="dashboard"]):not([data-page="file-movement"]) td {
  color: var(--lux-ink);
}

tbody tr:nth-child(even),
body:not([data-page="dashboard"]):not([data-page="file-movement"]) tr:nth-child(even) td {
  background: rgba(220, 220, 220, 0.35);
}

.instruction-row.is-completed td,
.instruction-row.is-completed:nth-child(even) td {
  background: rgba(30, 147, 171, 0.14);
}

.instruction-row.is-pending td,
.instruction-row.is-pending:nth-child(even) td {
  background: rgba(230, 39, 39, 0.12);
}

.chart-title,
.sick-graph-title,
.zone-inspection-bar-label strong,
.progress-log-date,
.welcome-title {
  color: var(--lux-navy);
}

.chart-visual {
  background: conic-gradient(var(--brand-green) 0deg 0deg, #dcdcdc 0deg 360deg);
  border-color: var(--lux-cream);
  box-shadow: 0 12px 24px rgba(23, 33, 36, 0.16), inset 0 0 0 1px rgba(220, 220, 220, 0.9);
}

.chart-visual::after,
body[data-page="dashboard"] .chart-visual::after {
  background: linear-gradient(180deg, #ffffff 0%, #f3f2ec 100%);
  color: #172124;
}

.zone-inspection-bar-track {
  background: #dcdcdc;
}

.zone-inspection-bar-fill {
  background: linear-gradient(90deg, var(--lux-navy) 0%, #7fc2cf 100%);
}

.site-footer {
  border-color: rgba(220, 220, 220, 0.72);
  background: linear-gradient(180deg, var(--lux-navy-2) 0%, var(--lux-navy) 100%);
  color: #ffffff;
}

.pin-overlay {
  background:
    radial-gradient(circle at 74% 8%, rgba(243, 242, 236, 0.22), transparent 26%),
    linear-gradient(135deg, #176f82 0%, var(--lux-navy) 52%, var(--lux-navy-3) 100%);
}

.pin-card,
.welcome-toast-inner,
.progress-log,
.dashboard-chart-panel,
body[data-page="dashboard"] .dashboard-chart-panel {
  border-color: rgba(220, 220, 220, 0.95);
  background: linear-gradient(180deg, #ffffff 0%, var(--lux-cream) 100%);
}

.pin-card .primary-button {
  background: linear-gradient(180deg, #e62727 0%, #b91f1f 100%) !important;
  color: #ffffff !important;
}

