/* Sign in uses the same ink/orange/paper system. */
.login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1080px;
  padding: 0;
  margin: calc(var(--header) + 64px) auto 64px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  min-height: 610px;
}

.login-intro {
  background: var(--hero-bg);
  color: var(--hero-text);
  padding: 52px 46px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.login-intro .eyebrow {
  color: var(--hero-muted);
}

.login-intro h2 {
  font-size: 48px;
  line-height: 1.12;
  letter-spacing: -2.8px;
  margin: 40px 0 24px;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.login-intro h2 > span {
  color: var(--orange);
}

.login-intro > p {
  font-size: 13px;
  color: var(--hero-muted);
  max-width: 300px;
  position: relative;
  z-index: 1;
}

.login-steps {
  display: flex;
  gap: 24px;
  margin-top: auto;
  padding-top: 48px;
  position: relative;
  z-index: 1;
}

.login-steps > span {
  display: grid;
  gap: 8px;
  font-size: 10px;
  color: var(--orange);
}

.login-steps strong {
  font-size: 12px;
  font-weight: 450;
  color: var(--hero-muted);
}

.login-decoration {
  position: absolute;
  right: -16px;
  bottom: 26px;
  font-size: 260px;
  line-height: 1;
  color: var(--hero-decoration);
  pointer-events: none;
}

.login-panel {
  max-width: none;
  margin: 0;
  padding: 64px 46px;
  border: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-panel h1 {
  font-size: 31px;
  letter-spacing: -1.2px;
  margin: 0 0 12px;
}

.login-panel #loginHint {
  font-size: 12px;
  color: var(--subtle);
  margin-bottom: 28px;
}

.login-panel form,
.login-panel label {
  display: grid;
  gap: 8px;
}

.login-panel form {
  gap: 20px;
}

.login-panel input {
  width: 100%;
}

.login-panel .primary {
  width: 100%;
  margin-top: 6px;
}

#loginMessage {
  margin-top: 20px;
}

.workspace-main > p:last-child {
  font-size: 10px;
  color: var(--subtle);
  margin: 28px 0 0;
}

@media (min-width: 1800px) {
  .overview-card {
    padding: 24px;
  }
  .metric-value {
    font-size: 46px;
  }
}

@media (max-width: 1240px) and (min-width: 981px) {
  :root {
    --sidebar: 220px;
  }
  .workspace-main {
    padding: 28px 24px 56px;
  }
  .progress-panel {
    padding-left: 24px;
    padding-right: 24px;
  }
  .overview-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-value {
    margin: 16px 0 8px;
  }
  .overview-card {
    min-height: 160px;
  }
  .overview-heading {
    align-items: flex-start;
  }
  h1 {
    font-size: 35px;
  }
  .header-brand {
    min-width: 168px;
  }
}

@media (max-width: 980px) {
  :root {
    --header: 64px;
    --sidebar: 260px;
    --scroll-offset: 170px;
  }
  .app-header {
    padding: 0 20px;
    gap: 14px;
  }
  .header-brand {
    min-width: 0;
  }
  .header-context {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .menu-close {
    display: inline-flex;
    width: 44px;
    height: 44px;
    min-height: 44px;
  }
  .app-area {
    margin-left: 0;
  }
  .app-sidebar {
    transform: translateX(-100%);
    transition: none;
    box-shadow: none;
    z-index: 40;
    top: var(--header);
  }
  body.menu-open .app-sidebar {
    transform: translateX(0);
    transition: transform 0.18s;
    box-shadow: var(--drawer-shadow);
  }
  .sidebar-overlay:not([hidden]) {
    display: block;
    position: fixed;
    inset: var(--header) 0 0;
    width: 100%;
    height: calc(100dvh - var(--header));
    border: 0;
    border-radius: 0;
    background: var(--overlay);
    z-index: 35;
    padding: 0;
  }
  body.menu-open {
    overflow: hidden;
  }
  .workspace-main {
    padding: 28px 24px 56px;
  }
  .progress-panel {
    padding: 13px 24px 10px;
  }
  .progress-panel ol {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 22px;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
  .progress-panel li {
    flex: none;
  }
  .overview-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .overview-card {
    padding: 17px;
  }
  .metric-value {
    font-size: 34px;
  }
  .overview-heading h1 {
    font-size: 35px;
  }
  .login-layout {
    max-width: 860px;
    margin-left: 24px;
    margin-right: 24px;
  }
  .login-intro {
    padding: 40px 32px;
  }
  .login-panel {
    padding: 48px 32px;
  }
  .login-intro h2 {
    font-size: 42px;
  }
}

@media (max-width: 700px) {
  .overview-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-card {
    min-height: 158px;
  }
  .overview-heading {
    align-items: flex-start;
  }
  .overview-heading .primary {
    font-size: 11px;
    padding: 10px 12px;
    white-space: nowrap;
  }
  .overview-heading .primary .icon {
    width: 15px;
    height: 15px;
  }
  .overview-heading h1 {
    font-size: 31px;
  }
  .overview-heading .title {
    max-width: 440px;
  }
  .login-layout {
    grid-template-columns: 1fr;
    max-width: 500px;
    min-height: 0;
    margin-top: calc(var(--header) + 28px);
  }
  .login-intro {
    padding: 28px 30px;
  }
  .login-intro h2 {
    font-size: 36px;
    margin: 18px 0 14px;
    letter-spacing: -1.8px;
  }
  .login-intro > p {
    font-size: 12px;
    max-width: 330px;
  }
  .login-steps {
    padding-top: 14px;
    gap: 28px;
  }
  .login-decoration {
    font-size: 190px;
    bottom: 0;
  }
  .login-panel {
    padding: 32px 30px;
  }
  .login-panel h1 {
    font-size: 29px;
  }
  .header-account {
    gap: 10px;
  }
  #sessionName {
    max-width: 220px;
    font-size: 10px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --scroll-offset: 166px;
  }
  .app-header {
    padding: 0 12px;
    gap: 8px;
  }
  .brand {
    gap: 7px;
  }
  .brand strong {
    font-size: 18px;
  }
  .brand-mark {
    width: 27px;
    height: 27px;
    font-size: 23px;
  }
  .header-brand {
    gap: 4px;
  }
  .header-account {
    gap: 8px;
  }
  .header-account #sessionName {
    display: none;
  }
  #logout {
    font-size: 11px;
    min-height: 34px;
    padding: 5px 9px;
  }
  .workspace-main {
    padding: 24px 16px 48px;
  }
  .progress-panel {
    padding: 11px 16px 9px;
  }
  .progress-panel ol {
    font-size: 10px;
    gap: 18px;
  }
  .progress-panel p {
    font-size: 9px;
  }
  .overview-heading {
    display: block;
  }
  .overview-heading h1 {
    font-size: 32px;
    margin-top: 10px;
  }
  .overview-heading .primary {
    margin-top: 18px;
    min-height: 40px;
    font-size: 12px;
  }
  .title > p:last-child {
    font-size: 12px;
  }
  .workspace-greeting {
    font-size: 11px;
    margin: 14px 0 20px;
  }
  .overview-cards {
    gap: 10px;
  }
  .overview-card {
    padding: 16px 13px;
    min-height: 151px;
  }
  .metric-label {
    font-size: 10px;
    align-items: flex-start;
    gap: 5px;
  }
  .metric-label .icon {
    width: 14px;
    height: 14px;
  }
  .metric-value {
    font-size: 34px;
    margin: 16px 0 8px;
  }
  .overview-card p {
    font-size: 9px;
  }
  .metric-link {
    font-size: 9px;
    margin-top: 12px;
  }
  .metric-label > span:first-child {
    max-width: 125px;
  }
  .panel {
    padding: 18px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
  }
  h2 {
    font-size: 20px;
  }
  .section-head {
    gap: 14px;
  }
  .request-form,
  #purchaseForm,
  #poForm {
    padding: 16px 13px;
  }
  .queue-filter {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
    margin-top: 18px;
  }
  .rfq-toolbar {
    width: 100%;
    justify-content: space-between;
  }
  .rfq-toolbar > button {
    font-size: 12px;
  }
  .view-switch button,
  .rfq-list button {
    min-height: 44px;
  }
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .card {
    padding: 18px;
  }
  .drop {
    padding: 24px 14px;
  }
  .drop span {
    font-size: 10px;
    text-align: center;
  }
  .quote-controls {
    flex-direction: column;
  }
  .quote-offers td:first-child,
  .quote-offers th:first-child {
    min-width: 125px;
    max-width: 150px;
  }
  .quote-position-nav {
    gap: 8px;
  }
  .quote-position-nav > button {
    padding: 10px 12px;
  }
  .actions {
    gap: 10px;
  }
  .actions span {
    font-size: 11px;
  }
  .login-layout {
    margin-left: 16px;
    margin-right: 16px;
  }
  .login-intro {
    padding: 26px;
  }
  .login-panel {
    padding: 30px 26px;
  }
  .login-intro h2 {
    font-size: 34px;
  }
  .brand .brand-dot {
    color: var(--orange);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

.drop,
.file-control {
  position: relative;
}

.drop input[type="file"],
.file-control input[type="file"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.file-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  min-height: 40px;
  width: fit-content;
  padding: 8px 14px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--ink) !important;
  font-size: 12px !important;
  font-weight: 500;
  margin-top: 8px;
}

.drop:hover .file-pick,
.file-control:hover .file-pick {
  border-color: var(--border-focus);
}

.file-control .file-pick {
  justify-self: start;
  margin-top: 0;
}

.file-control:focus-within {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
  border-radius: 8px;
}

#quoteFileSelection {
  font-size: 11px;
  font-weight: 400;
}
