:root {
  --orange: #df5b19;
  --orange-dark: #b94710;
  --ink: #171717;
  --muted: #707070;
  --line: #e8e2dd;
  --soft: #fff4ee;
  --paper: #ffffff;
  --bg: #fbfaf8;
  --green: #1d8f5f;
  --red: #c93b35;
  --shadow: 0 14px 34px rgba(38, 28, 21, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #fff 0%, var(--bg) 52%, #f5f0ec 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.76);
  position: relative;
  overflow: hidden;
}

.screen {
  min-height: 100vh;
  padding: 24px 20px 92px;
}

.login-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 32px 24px;
}

.official-login {
  width: min(100%, 720px);
  margin: 0 auto;
}

.login-language-wrap {
  display: flex;
  justify-content: flex-end;
}

.brand {
  text-align: center;
}

.brand-logo {
  display: block;
  width: min(250px, 78vw);
  height: auto;
  margin: 0 auto;
}

.brand-mark {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: #4f4f4f;
  font-size: 31px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.brand-mark span {
  color: var(--orange);
}

.brand small {
  display: block;
  margin-top: 2px;
  color: #777;
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.login-card,
.panel,
.stat-card,
.report-card,
.contact-card,
.quick-card,
.modal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.login-card {
  padding: 20px;
}

.login-choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.login-choice-card {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  padding: 18px;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.login-choice-card:hover,
.admin-login-btn:hover {
  border-color: rgba(223, 91, 25, 0.45);
  box-shadow: 0 18px 36px rgba(38, 28, 21, 0.12);
  transform: translateY(-1px);
}

.login-choice-card span {
  color: var(--orange-dark);
  font-size: 22px;
  font-weight: 900;
}

.admin-login-btn {
  width: min(100%, 260px);
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf7;
  color: #4f4a46;
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(38, 28, 21, 0.08);
}

.login-back-btn {
  width: 100%;
  margin-top: 10px;
}

.title {
  margin: 14px 0 6px;
  font-size: 28px;
  line-height: 1.12;
  text-align: center;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  text-align: center;
}

.field {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.field label {
  color: #4f4a46;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  color: var(--ink);
  outline: none;
}

.field textarea {
  min-height: 86px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(223, 91, 25, 0.13);
}

.primary-btn,
.secondary-btn,
.danger-btn,
.icon-btn {
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
}

.primary-btn {
  width: 100%;
  margin-top: 18px;
  background: var(--orange);
  color: #fff;
}

.secondary-btn {
  background: var(--soft);
  color: var(--orange-dark);
  padding: 0 14px;
}

.danger-btn {
  background: #fff0ef;
  color: var(--red);
  padding: 0 14px;
}

.icon-btn {
  width: 48px;
  background: #f1eeee;
  color: #373737;
  border-radius: 50%;
  font-size: 24px;
}

.icon-btn svg {
  width: 27px;
  height: 27px;
}

.hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.demo-code,
.code-sent {
  margin-top: 12px;
  border-radius: 8px;
  padding: 12px;
  background: var(--soft);
  color: var(--orange-dark);
  font-weight: 800;
  text-align: center;
}

.topbar {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.topbar .icon-btn {
  grid-column: 1;
}

.topbar .brand {
  grid-column: 2;
  justify-self: center;
}

.topbar .language-select {
  grid-column: 3;
  justify-self: end;
}

.topbar .brand-mark {
  font-size: 24px;
  letter-spacing: 3px;
}

.topbar .brand-logo {
  width: 178px;
}

.user-chip {
  max-width: 156px;
  overflow: hidden;
  color: var(--muted);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.language-select {
  width: 64px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  outline: none;
}

.language-select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(223, 91, 25, 0.13);
}

.hero h1 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.13;
  text-align: center;
}

.hero p {
  margin: 0 0 12px;
  color: var(--muted);
  text-align: center;
}

.factory-badge {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 20px;
  border: 1px solid rgba(223, 91, 25, 0.24);
  border-radius: 8px;
  background: var(--soft);
  color: var(--orange-dark);
  padding: 9px 16px;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-card {
  display: grid;
  grid-template-columns: 50px 1fr;
  align-items: center;
  min-height: 100px;
  padding: 14px;
  box-shadow: none;
}

.clickable-card {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.clickable-card:active {
  transform: scale(0.98);
}

.stat-icon,
.quick-icon,
.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--orange);
  font-size: 25px;
}

.stat-card strong {
  display: block;
  color: var(--orange);
  font-size: 26px;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.2;
}

.stat-card small {
  display: block;
  margin-top: 4px;
  color: var(--orange);
  font-size: 12px;
}

.panel {
  margin-top: 18px;
  padding: 16px;
}

.panel h2,
.section-title {
  margin: 0 0 14px;
  font-size: 21px;
}

.chart {
  height: 218px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 10px;
  border-bottom: 1px solid #cfc8c1;
  padding: 24px 8px 0;
  background: repeating-linear-gradient(to top, transparent, transparent 48px, rgba(0, 0, 0, 0.07) 49px);
}

.bar-wrap {
  display: grid;
  align-items: end;
  gap: 8px;
  height: 100%;
}

.bar {
  min-height: 12px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #f28b35, var(--orange));
  position: relative;
  overflow: visible;
}

.bar b {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  color: #191919;
  font-size: 11px;
  white-space: nowrap;
}

.bar-breakdown {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: max-content;
  max-width: 104px;
  display: grid;
  gap: 2px;
  transform: translateX(-50%);
  pointer-events: none;
}

.bar-breakdown span {
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.72);
  color: #5b2d14;
  padding: 1px 4px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

.bar-label {
  color: #484848;
  font-size: 12px;
  text-align: center;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.quick-card {
  min-height: 98px;
  padding: 10px 6px;
  display: grid;
  place-items: center;
  gap: 6px;
  box-shadow: none;
  text-align: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.quick-icon {
  width: 42px;
  height: 42px;
  font-size: 22px;
}

.contact-card {
  display: grid;
  gap: 13px;
  padding: 16px;
  box-shadow: none;
}

.contact-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.contact-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.contact-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
}

.contact-icon {
  width: 36px;
  height: 36px;
  font-size: 18px;
}

.contact-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 4px;
}

.contact-actions a {
  margin-top: 0;
  text-decoration: none;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: min(100%, 460px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  padding: 9px 12px 16px;
  backdrop-filter: blur(12px);
}

.bottom-nav.admin-nav {
  grid-template-columns: repeat(4, 1fr);
  padding-inline: 8px;
}

.bottom-nav.client-nav {
  grid-template-columns: repeat(4, 1fr);
  padding-inline: 8px;
}

.nav-btn {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7a7a7a;
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 58px;
  font-size: 12px;
}

.admin-nav .nav-btn,
.client-nav .nav-btn {
  font-size: 11px;
}

.nav-btn svg {
  width: 25px;
  height: 25px;
}

.admin-nav .nav-btn svg,
.client-nav .nav-btn svg {
  width: 23px;
  height: 23px;
}

.nav-btn.active {
  color: var(--orange);
}

.desktop-admin-tools {
  display: none;
}

.chat-fab {
  position: fixed;
  right: max(18px, calc((100vw - 460px) / 2 + 18px));
  bottom: 92px;
  z-index: 8;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--orange);
  color: #fff;
  box-shadow: 0 14px 30px rgba(223, 91, 25, 0.28);
}

.chat-fab svg {
  width: 27px;
  height: 27px;
}

.chat-fab span {
  position: absolute;
  top: -4px;
  right: -3px;
  min-width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.month-filter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 7px;
  margin: 0 0 14px;
}

.month-filter.single-filter {
  grid-template-columns: 1fr;
}

.month-filter label {
  color: #4f4a46;
  font-size: 13px;
  font-weight: 800;
}

.month-filter select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  font-weight: 800;
  outline: none;
}

@media (max-width: 420px) {
  .month-filter {
    grid-template-columns: 1fr;
  }
}

.month-filter select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(223, 91, 25, 0.13);
}

.report-list {
  display: grid;
  gap: 12px;
}

.report-card {
  padding: 14px;
  box-shadow: none;
}

.report-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.report-head h3 {
  margin: 0;
  font-size: 17px;
}

.badge {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.badge.waiting {
  background: #fff4d9;
  color: #916300;
}

.badge.approved {
  background: #e8f7ef;
  color: var(--green);
}

.badge.rejected {
  background: #fff0ef;
  color: var(--red);
}

.report-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.metric {
  border-radius: 8px;
  background: #faf7f4;
  padding: 10px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
}

.worker-total-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.worker-total {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf7;
  padding: 12px;
  text-align: left;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.worker-total:hover {
  border-color: rgba(223, 91, 25, 0.42);
  box-shadow: 0 10px 22px rgba(38, 28, 21, 0.08);
  transform: translateY(-1px);
}

.worker-total span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.worker-total strong {
  display: block;
  margin-top: 6px;
  color: var(--orange-dark);
  font-size: 20px;
}

.factory-list,
.factory-month-list {
  display: grid;
  gap: 12px;
}

.factory-select-card {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  align-content: center;
  background: #fff;
  padding: 16px;
  text-align: left;
  box-shadow: none;
}

.factory-select-card strong {
  color: var(--ink);
  font-size: 20px;
}

.factory-select-card span {
  color: var(--orange-dark);
  font-weight: 800;
}

.admin-calendar-wrap {
  margin-top: 14px;
}

.total-panel {
  text-align: center;
}

.total-panel h2 {
  margin-bottom: 6px;
  text-transform: capitalize;
}

.total-number {
  color: var(--orange);
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
}

.monthly-approval-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 16px 0 8px;
}

.monthly-approval-actions .primary-btn,
.monthly-approval-actions .secondary-btn {
  margin-top: 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
}

.calendar-day {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  align-content: center;
  gap: 4px;
  background: #fff;
  padding: 6px 4px;
  text-align: center;
  color: inherit;
}

.calendar-day span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.calendar-day strong {
  color: #4f4a46;
  font-size: 14px;
}

.calendar-day small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.worker-calendar-grid .calendar-day {
  align-content: start;
  min-height: 82px;
  padding-top: 7px;
}

.worker-calendar-grid .calendar-day small {
  line-height: 1.2;
}

.calendar-day.has-total {
  border-color: rgba(223, 91, 25, 0.28);
  background: var(--soft);
}

.calendar-day.has-total strong {
  color: var(--orange-dark);
}

.calendar-day.day-approved {
  border-color: rgba(29, 143, 95, 0.35);
  background: #e8f7ef;
}

.calendar-day.day-approved strong,
.calendar-day.day-approved small {
  color: var(--green);
}

.calendar-day.day-rejected {
  border-color: rgba(201, 59, 53, 0.32);
  background: #fff0ef;
}

.calendar-day.day-rejected strong,
.calendar-day.day-rejected small {
  color: var(--red);
}

.calendar-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}

.calendar-total span {
  color: var(--muted);
  font-weight: 800;
}

.calendar-total strong {
  color: var(--orange-dark);
  font-size: 20px;
}

.thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 12px;
  padding-bottom: 2px;
}

.thumb-button {
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 8px;
  flex: 0 0 auto;
}

.thumb-button img,
.thumbs img {
  width: 74px;
  height: 74px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.thumb-button:focus-visible {
  outline: 3px solid rgba(223, 91, 25, 0.28);
  outline-offset: 2px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.stacked-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.stacked-actions .primary-btn,
.stacked-actions .secondary-btn,
.stacked-actions .danger-btn {
  width: 100%;
  margin-top: 0;
}

.worker-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.worker-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fffaf7;
}

.worker-row .danger-btn {
  min-height: 38px;
}

.decision-btn {
  min-height: 58px;
  border: 1px solid transparent;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: #fff;
  font-weight: 900;
  line-height: 1.1;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.decision-btn svg {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.decision-btn:active {
  transform: scale(0.98);
}

.decision-approve {
  color: var(--orange-dark);
  border-color: rgba(223, 91, 25, 0.28);
  background: linear-gradient(180deg, #fffaf7 0%, var(--soft) 100%);
  box-shadow: 0 10px 22px rgba(223, 91, 25, 0.13);
}

.decision-reject {
  color: #2c2c2c;
  border-color: #ddd7d2;
  background: linear-gradient(180deg, #fff 0%, #f6f3f0 100%);
}

.decision-reject svg {
  color: #8d8a87;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: end center;
  background: rgba(23, 23, 23, 0.28);
  padding: 18px;
}

.modal-card {
  width: min(100%, 420px);
  max-height: 88vh;
  overflow: auto;
  padding: 18px;
}

.modal-card h2 {
  margin: 0 0 8px;
}

.modal-card p {
  color: var(--muted);
  margin: 0 0 12px;
}

.photo-modal {
  place-items: center;
  background: rgba(12, 12, 12, 0.82);
}

.photo-viewer {
  width: min(100%, 430px);
  max-height: 88vh;
  position: relative;
}

.photo-viewer img {
  width: 100%;
  max-height: 88vh;
  display: block;
  border-radius: 8px;
  object-fit: contain;
  background: #111;
}

.photo-close {
  position: absolute;
  top: -12px;
  right: -4px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  box-shadow: var(--shadow);
}

.chat-card {
  display: grid;
  gap: 12px;
}

.notification-list {
  display: grid;
  gap: 8px;
}

.notification-list h3 {
  margin: 0;
  font-size: 16px;
}

.notification-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf7;
  padding: 10px;
}

.notification-item strong,
.notification-item span {
  display: block;
}

.notification-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.chat-thread {
  max-height: 260px;
  overflow: auto;
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf7f4;
  padding: 10px;
}

.chat-message {
  width: fit-content;
  max-width: 86%;
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
}

.chat-message.own {
  justify-self: end;
  background: var(--soft);
}

.chat-message strong {
  display: block;
  color: var(--orange-dark);
  font-size: 12px;
}

.chat-message p {
  margin: 4px 0 0;
  color: var(--ink);
}

.chat-form {
  display: grid;
  gap: 10px;
}

.chat-form textarea {
  width: 100%;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  resize: vertical;
}

.approval-day-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.approval-day-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf7;
  padding: 10px;
}

.approval-day-row span {
  font-weight: 800;
}

.approval-day-row strong {
  color: var(--orange-dark);
}

.empty {
  border: 1px dashed #d9cec5;
  border-radius: 8px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.admin-only {
  display: none;
}

.is-admin .admin-only {
  display: initial;
}

@media (max-width: 370px) {
  .screen {
    padding-inline: 14px;
  }

  .stats-grid,
  .report-meta,
  .worker-total-grid {
    grid-template-columns: 1fr;
  }

  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  body {
    background: #f6f3f0;
  }

  .app-shell {
    width: 100%;
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.86);
    overflow: visible;
  }

  .screen {
    padding: 32px 32px 48px 252px;
  }

  .login-screen {
    width: min(100%, 520px);
    margin: 0 auto;
    padding: 48px 24px;
  }

  .official-login {
    width: min(100%, 760px);
  }

  .official-login .brand-logo {
    width: min(310px, 58vw);
  }

  .login-choice-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 6;
    grid-template-columns: 1fr auto 1fr;
    margin: -32px -32px 28px -24px;
    padding: 24px 32px 18px 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }

  .topbar .icon-btn {
    display: none;
  }

  .topbar .brand-logo {
    width: 240px;
  }

  .topbar .language-select {
    justify-self: end;
  }

  .hero {
    text-align: left;
  }

  .hero h1,
  .hero p {
    text-align: left;
  }

  .hero h1 {
    font-size: 34px;
  }

  .factory-badge {
    margin-left: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }

  .stat-card {
    min-height: 112px;
    padding: 18px;
  }

  .panel {
    padding: 20px;
  }

  .chart {
    height: 270px;
  }

  .quick-grid {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }

  .bottom-nav,
  .bottom-nav.admin-nav,
  .bottom-nav.client-nav {
    position: fixed;
    top: 24px;
    bottom: 24px;
    left: 24px;
    width: 204px;
    transform: none;
    grid-template-columns: 1fr;
    grid-auto-rows: min-content;
    align-content: start;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    padding: 18px 12px;
    box-shadow: var(--shadow);
  }

  .nav-btn,
  .admin-nav .nav-btn,
  .client-nav .nav-btn {
    min-height: 52px;
    grid-template-columns: 28px 1fr;
    place-items: center start;
    padding: 0 12px;
    font-size: 14px;
  }

  .nav-btn svg,
  .admin-nav .nav-btn svg,
  .client-nav .nav-btn svg {
    width: 23px;
    height: 23px;
  }

  .nav-btn.active {
    background: var(--soft);
  }

  .desktop-admin-tools {
    display: grid;
    gap: 8px;
    border-top: 1px solid var(--line);
    margin-top: 10px;
    padding-top: 10px;
  }

  .chat-fab {
    right: 32px;
    bottom: 32px;
  }

  .toolbar {
    margin-bottom: 18px;
  }

  .month-filter {
    gap: 12px;
    margin-bottom: 18px;
  }

  .report-list,
  .factory-list,
  .factory-month-list {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }

  .contact-card {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }

  .contact-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
  }

  .worker-total-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .calendar-grid {
    gap: 10px;
  }

  .calendar-day {
    min-height: 72px;
  }

  .modal {
    place-items: center;
  }

  .modal-card {
    width: min(100%, 560px);
  }

  .chat-card {
    width: min(100%, 620px);
  }
}
