@font-face {
  font-family: "TaktBounded";
  src: url("bounded-variable.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: light;
  --office-ink: #202128;
  --office-paper: #f2f3f6;
  --office-card: #ffffff;
  --office-line: #dfe1e7;
  --office-muted: #747782;
  --office-red: #ed1c24;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

.office-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.account-office-entry {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 20;
  padding: 7px 9px;
  color: rgba(32, 33, 40, .25);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: lowercase;
  opacity: .6;
  transition: color .16s ease, opacity .16s ease;
}

.account-office-entry:hover,
.account-office-entry:focus-visible {
  color: rgba(32, 33, 40, .72);
  opacity: 1;
}

.account-office-entry:focus-visible {
  border-radius: 6px;
  outline: 2px solid rgba(237, 28, 36, .45);
  outline-offset: 2px;
}

body.office-body {
  min-height: 100vh;
  margin: 0;
  background: var(--office-paper);
  color: var(--office-ink);
  font-family: Arial, Helvetica, sans-serif;
}

.office-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.office-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.office-brand {
  width: 124px;
  display: block;
}

.office-brand img {
  width: 100%;
  display: block;
}

.office-back,
.office-link {
  color: var(--office-muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.office-main {
  min-height: calc(100vh - 92px);
  padding: 34px 0 56px;
}

.office-login {
  width: min(480px, 100%);
  margin: clamp(34px, 9vh, 90px) auto 0;
  padding: clamp(28px, 5vw, 50px);
  border: 1px solid var(--office-line);
  border-radius: 26px;
  background: var(--office-card);
  box-shadow: 0 22px 80px rgba(32, 33, 40, .07);
}

.office-kicker {
  margin: 0 0 13px;
  color: var(--office-red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.office-login h1,
.office-dashboard h1 {
  margin: 0;
  font-family: "TaktBounded", Arial, sans-serif;
  font-size: clamp(38px, 7vw, 64px);
  line-height: .98;
  letter-spacing: -.045em;
}

.office-login__copy {
  margin: 20px 0 30px;
  color: var(--office-muted);
  font-size: 15px;
  line-height: 1.55;
}

.office-login form {
  display: grid;
  gap: 14px;
}

.office-login label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 750;
}

.office-login input {
  width: 100%;
  min-height: 56px;
  padding: 0 17px;
  border: 1px solid var(--office-line);
  border-radius: 14px;
  background: #fff;
  color: var(--office-ink);
  font: inherit;
  font-size: 18px;
}

.office-login input:focus-visible {
  border-color: var(--office-ink);
  outline: 3px solid rgba(32, 33, 40, .09);
}

.office-button {
  min-height: 54px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--office-ink);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.office-button:hover { background: #30313a; }
.office-button:disabled { cursor: wait; opacity: .58; }

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

.office-notice.is-error { color: #b8141b; }

.office-dashboard {
  padding-top: 20px;
}

.office-dashboard__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.office-dashboard__meta {
  margin: 18px 0 0;
  color: var(--office-muted);
  font-size: 15px;
  line-height: 1.5;
}

.office-logout {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--office-line);
  border-radius: 999px;
  background: #fff;
  color: var(--office-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.office-status {
  margin-top: 36px;
  padding: 18px 20px;
  border-left: 3px solid var(--office-red);
  border-radius: 0 14px 14px 0;
  background: #fff;
  color: var(--office-muted);
  line-height: 1.5;
}

.office-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.office-card {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--office-line);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  background: #fff;
}

button.office-card {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
}

.office-card--action {
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.office-card--action:hover {
  border-color: #bfc2ca;
  box-shadow: 0 12px 35px rgba(32, 33, 40, .08);
  transform: translateY(-2px);
}

.office-card--action:focus-visible,
.office-close:focus-visible,
.office-link-button:focus-visible,
.tender-item__remove:focus-visible {
  outline: 3px solid rgba(237, 28, 36, .18);
  outline-offset: 3px;
}

.office-card small {
  color: var(--office-red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.office-card h2 {
  margin: auto 0 10px;
  font-family: "TaktBounded", Arial, sans-serif;
  font-size: 26px;
  line-height: 1.05;
}

.office-card p {
  margin: 0;
  color: var(--office-muted);
  font-size: 14px;
  line-height: 1.5;
}

.office-card--action span {
  margin-top: 18px;
  color: var(--office-ink);
  font-size: 13px;
  font-weight: 800;
}

.office-notice--panel {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #f0b9bc;
  border-radius: 12px;
  background: #fff6f6;
}

.tender-panel {
  margin-top: 34px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--office-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 70px rgba(32, 33, 40, .06);
  scroll-margin-top: 20px;
}

.tender-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--office-line);
}

.tender-panel__head h2 {
  max-width: 720px;
  margin: 0;
  font-family: "TaktBounded", Arial, sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.03;
  letter-spacing: -.035em;
}

.office-close,
.office-link-button,
.tender-item__remove {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--office-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.office-close:hover,
.office-link-button:hover,
.tender-item__remove:hover { color: var(--office-ink); }

.tender-form {
  display: grid;
  gap: 30px;
  margin-top: 30px;
}

.tender-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.tender-form legend {
  margin-bottom: 18px;
  padding: 0;
  color: var(--office-ink);
  font-family: "TaktBounded", Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.tender-fields {
  display: grid;
  gap: 16px;
}

.tender-fields--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.tender-form label {
  display: grid;
  align-content: start;
  gap: 8px;
  color: var(--office-ink);
  font-size: 13px;
  font-weight: 750;
}

.tender-form label > span { color: var(--office-red); }

.tender-form label small {
  color: var(--office-muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
}

.tender-form input,
.tender-form select,
.tender-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--office-line);
  border-radius: 11px;
  background: #fff;
  color: var(--office-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 400;
}

.tender-form input[type="file"] {
  padding: 9px;
  font-size: 13px;
}

.tender-form textarea {
  min-height: 88px;
  resize: vertical;
}

.tender-form input:focus-visible,
.tender-form select:focus-visible,
.tender-form textarea:focus-visible {
  border-color: var(--office-ink);
  outline: 3px solid rgba(32, 33, 40, .08);
}

.tender-field--wide { grid-column: 1 / -1; }

.tender-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -10px 0 14px;
}

.tender-legend-row p {
  margin: 0;
  color: var(--office-muted);
  font-size: 13px;
}

.office-link-button { color: var(--office-red); }

.tender-items {
  display: grid;
  gap: 10px;
}

.tender-item {
  display: grid;
  grid-template-columns: 44px minmax(220px, 2fr) minmax(100px, .6fr) minmax(120px, .7fr) minmax(145px, .8fr) auto;
  align-items: end;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--office-line);
  border-radius: 14px;
  background: #fafbfc;
}

.tender-item__number {
  align-self: center;
  color: #b5b8c0;
  font-family: "TaktBounded", Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.tender-item__remove {
  min-height: 48px;
  padding: 0 4px;
  color: #a5484c;
}

.tender-item__remove:disabled {
  cursor: default;
  opacity: .25;
}

.tender-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding-top: 24px;
  border-top: 1px solid var(--office-line);
}

.tender-submit p {
  max-width: 620px;
  margin: 0;
  color: var(--office-muted);
  font-size: 13px;
  line-height: 1.5;
}

.tender-submit .office-button { flex: 0 0 auto; }
.tender-form__notice { margin: -16px 0 0; }

@media (max-width: 760px) {
  .office-shell { width: min(100% - 24px, 1180px); }
  .office-header { min-height: 74px; }
  .office-main { min-height: calc(100vh - 74px); padding-top: 16px; }
  .office-login { margin-top: 26px; border-radius: 20px; }
  .office-dashboard__top { display: block; }
  .office-logout { margin-top: 22px; }
  .office-grid { grid-template-columns: 1fr; }
  .office-card { min-height: 170px; }
  .tender-panel { border-radius: 18px; }
  .tender-panel__head { display: block; }
  .office-close { margin-top: 18px; }
  .tender-fields--two { grid-template-columns: 1fr; }
  .tender-field--wide { grid-column: auto; }
  .tender-legend-row { align-items: flex-start; }
  .tender-item { grid-template-columns: 34px 1fr; }
  .tender-item label,
  .tender-item__remove { grid-column: 2; }
  .tender-item__number { grid-row: 1; }
  .tender-submit { display: grid; }
  .tender-submit .office-button { width: 100%; }
  .account-office-entry { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .account-office-entry,
  .office-card--action { transition: none; }
}
