/* 动态系统补充样式：登录、表单、数据库页面 */

.logout-form {
  margin: 0;
  margin-left: auto;
  display: flex;
  padding: 0;
}

.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -8px 0 16px;
  padding: 11px 14px;
  border: 1px solid #cfe8e2;
  border-radius: 6px;
  background: #f1faf7;
  color: #0a4f4a;
  font-size: 12px;
}

.flash.warn {
  border-color: #f3ddbd;
  background: #fffaf1;
  color: #8a5a08;
}

.flash.err {
  border-color: #f0d2cd;
  background: #fdf4f2;
  color: #a5342a;
}

.flash-close {
  border: 0;
  background: transparent;
  color: currentColor;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
  padding: 0 2px;
}

.flash-close:hover {
  opacity: 1;
}

/* 登录页 */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(440px, 0.95fr);
  background: #f3f6f4;
}

.login-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 52px;
  color: #eaf6f2;
  background: #0b241f;
}

.login-visual::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 50%;
}

.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
}

.login-brand .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #0f766e;
  display: grid;
  place-items: center;
  color: #fff;
}

.login-brand strong {
  display: block;
  font-size: 15px;
  color: #f2faf7;
}

.login-brand span {
  display: block;
  margin-top: 2px;
  font-size: 8.5px;
  letter-spacing: 0.18em;
  color: #7f9f95;
  font-weight: 700;
}

.login-copy {
  position: relative;
  z-index: 1;
  max-width: 460px;
  margin: auto 0;
  padding: 48px 0;
}

.login-copy h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.18;
  letter-spacing: -0.035em;
  color: #f6fbf9;
}

.login-copy p {
  margin: 18px 0 0;
  max-width: 390px;
  font-size: 13px;
  line-height: 1.8;
  color: #9bb9af;
}

.login-points {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 11px;
  color: #8fb1a6;
}

.login-points span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-points i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2dd4bf;
  flex: none;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 40px 28px;
}

.login-card {
  width: min(380px, 100%);
  padding: 30px;
  border: 1px solid #e2e8e5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 33, 29, 0.04);
}

.login-kicker {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #98a39e;
}

.login-card h2 {
  margin: 8px 0 0;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.login-card .login-sub {
  margin: 6px 0 22px;
  font-size: 11.5px;
  color: #6f7d77;
}

.login-card .field {
  margin-bottom: 13px;
}

.login-card .input {
  height: 42px;
}

.login-error {
  margin: 0 0 14px;
  padding: 9px 10px;
  border: 1px solid #f0d2cd;
  border-radius: 6px;
  background: #fdf4f2;
  color: #a5342a;
  font-size: 11px;
  line-height: 1.5;
}

.login-hint {
  margin: 15px 0 0;
  padding-top: 13px;
  border-top: 1px dashed #e6ebe8;
  font-size: 10px;
  line-height: 1.6;
  color: #98a39e;
}

.login-hint code {
  font-family: var(--mono);
  color: #55756b;
  background: #f3f7f5;
  padding: 1px 4px;
  border-radius: 3px;
}

.login-foot {
  margin-top: 16px;
  text-align: center;
  font-size: 9.5px;
  color: #aab5b0;
}

/* 表单页 */
.form-page {
  max-width: 1080px;
}

.form-card {
  padding: 22px;
  border: 1px solid #e2e8e5;
  border-radius: 8px;
  background: #fff;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 22px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e6ebe8;
}

.form-actions .spacer {
  flex: 1;
}

.form-note {
  padding: 11px 12px;
  border: 1px solid #cfe8e2;
  border-radius: 6px;
  background: #f4fbf8;
  color: #426056;
  font-size: 10.5px;
  line-height: 1.65;
}

.form-note b {
  color: #0a4f4a;
}

.form-section-title {
  margin: 0 0 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #98a39e;
  text-transform: uppercase;
}

.field select.input,
select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236f7d77' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

textarea.input {
  height: auto;
  min-height: 76px;
  padding: 10px 12px;
  line-height: 1.55;
  resize: vertical;
}

.form-error {
  margin: 0 0 14px;
  padding: 9px 10px;
  border: 1px solid #f0d2cd;
  border-radius: 6px;
  background: #fdf4f2;
  color: #a5342a;
  font-size: 11px;
  line-height: 1.5;
}

.stock-hint {
  padding: 9px 10px;
  border: 1px solid #d7eae4;
  border-radius: 6px;
  background: #f4fbf8;
  color: #426056;
  font-size: 10.5px;
  line-height: 1.6;
}

.stock-hint.warn {
  border-color: #f3ddbd;
  background: #fffaf1;
  color: #8a5a08;
}

/* 筛选 */
.filter-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-form .search {
  width: 260px;
}

.filter-form .input,
.filter-form .select {
  height: 36px;
}

.filter-form .select {
  width: 140px;
}

.card-tools .filter-form .search {
  width: 200px;
}

.card-tools .filter-form .select {
  width: 104px;
}

.filter-spacer {
  flex: 1;
}

/* 表格里的操作 */
.inline-form {
  display: inline;
  margin: 0;
}

.table-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-content: flex-end;
}

/* 二维码 */
.qr-card .qr-url {
  margin-top: 6px;
  font-size: 9px;
  color: #66857b;
  line-height: 1.5;
}

.qr-card .qr-url,
.qr-card .qr-token {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.qr-card {
  min-width: 0;
  overflow: hidden;
}

.qr-actions .btn {
  min-width: 0;
}

.detail-side {
  min-width: 0;
}

.qr-card .qr-expire {
  margin-top: 4px;
  font-size: 8.5px;
  color: #98a39e;
}

.qr-actions form {
  display: contents;
}

/* 空表 */
.empty-row td {
  padding: 30px 14px !important;
  text-align: center;
  color: #98a39e;
  font-size: 11.5px;
}

/* 报工公共页补充 */
.public-body {
  margin: 0;
  min-height: 100vh;
  background: #dfe8e3;
  font-family: var(--font);
  color: var(--ink);
}

.report-form {
  display: block;
}

.report-form .qty-field {
  margin-bottom: 13px;
}

.report-form .report-field {
  margin-bottom: 10px;
}

.report-form .report-field:last-child {
  margin-bottom: 0;
}

.report-form .chips {
  margin-bottom: 4px;
}

.report-form .report-warning.show {
  display: flex;
}

.report-submit-error {
  margin: 10px 0 0;
  padding: 8px 9px;
  border: 1px solid #f0d2cd;
  border-radius: 6px;
  background: #fdf4f2;
  color: #a5342a;
  font-size: 10px;
  line-height: 1.5;
}

.report-done .state-card {
  margin-top: 16px;
}

.report-done .receipt-note {
  margin-top: 9px;
}

.report-done .sync-state {
  margin-left: auto;
  margin-right: auto;
}

.sync-state.failed {
  background: #fdf0ee;
  color: #c0392b;
}

.sync-state.failed .ico {
  color: currentColor;
}

.report-done .report-success {
  position: relative;
  min-height: calc(100vh - 0px);
}

/* 标签打印 */
.print-toolbar {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.label-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
  background: #e8eeeb;
}

.label-page .flight-label {
  box-shadow: 0 1px 2px rgba(20, 33, 29, 0.06);
}

/* 详情页 */
.detail-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-page-actions form {
  display: inline-flex;
  margin: 0;
}

.detail-page-actions .btn {
  height: 32px;
}

/* 响应式登录 */
@media (max-width: 980px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 220px;
    padding: 28px 26px;
  }

  .login-copy {
    padding: 22px 0 0;
  }

  .login-copy h1 {
    font-size: 28px;
  }

  .login-copy p {
    display: none;
  }

  .login-points {
    display: none;
  }

  .login-panel {
    padding: 28px 18px 40px;
  }
}

@media (max-width: 760px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .filter-form {
    align-items: stretch;
  }

  .filter-form .search {
    width: 100%;
  }

  .filter-form .select {
    flex: 1;
    width: auto;
  }
}
