
/* style.css */

/* Reset & 基础 */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: #f7f7f7;

  /* 让内容出现在视口 1/3 高度处（移动端用 svh 更稳） */
  min-height: 100svh;
  padding-top: calc(5svh + env(safe-area-inset-top, 0px));

  /* 不用 flex 居中，避免影响 1/3 定位 */
  display: block;
}

/* 兼容不支持 svh 的浏览器 */
@supports not (height: 1svh) {
  body {
    min-height: 100vh;
    padding-top: 33vh;
  }
}

/* 登录容器 */
.login-box {
  width: min(90%, 400px);
  margin: 0 auto;               /* 水平居中容器 */
  padding: 2rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  text-align: center;           /* 让按钮（行内/内联块）居中 */

  /* 进场动画 */
  animation: drop-in 0.7s ease-out both;
}

/* 输入框：圆角、淡灰边框、统一内边距 */
.login-box input {
  display: block;
  width: 100%;
  padding: 0.8rem;
  margin: 0.5rem 0;
  font-size: 1rem;

  border: 1px solid #b8b8b8;     /* 黑线改成灰色 */
  border-radius: 0.6rem;      /* 圆角 */
  outline: none;              /* 去掉点击时默认蓝色边框 */
  transition: border-color 0.3s, box-shadow 0.3s; /* 聚焦动画 */
}

/* 聚焦时边框加深，并加轻微阴影 */
.login-box input:focus {
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}



/* 按钮：横向并排居中（无需额外 div） */
.login-box button {
  display: inline-block;        /* 关键：让按钮走“行内流”，可并排 */
  min-width: 80px;
  padding: 0.8rem 1.5rem;
  margin: 0.5rem;               /* 按钮之间留空隙 */
  font-size: 1rem;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}
.login-box button:hover { background: #0056b3; }

/* 基本 btn（保持与现有按钮一致的尺寸/交互） */
button.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color .18s ease, transform .08s;
}

/* 橙黄色：重新查询 */
button.btn.btn-warning {
  background: #ff9800;
  box-shadow: 0 2px 6px rgba(255,152,0,0.18);
}
button.btn.btn-warning:hover { background: #e68900; }

/* 红色：退出登录 */
button.btn.btn-danger {
  background: #f44336;
  box-shadow: 0 2px 6px rgba(244,67,54,0.18);
}
button.btn.btn-danger:hover { background: #d32f2f; }





/* 进场动画关键帧 */
@keyframes drop-in {
  from { opacity: 0; transform: translateY(-38px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 关怀式动效：尊重系统“减少动画”设置 */
@media (prefers-reduced-motion: reduce) {
  .login-box { animation: none; }
}

.copyright-text {

  margin: 0 auto;
  text-align: center;
  color: #999;
  font-size: 14px;
}



.message-box {
  position: fixed;
  width: 280px;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.8rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  color: #fff;
  background-color: rgba(220, 53, 69, 0.9); /* 半透明红色 */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 9999;
  text-align: center;
}

.message-box.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.message-box.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(-10px);
}

.message-box.success {
  background-color: rgba(40, 167, 69, 0.9); /* 半透明绿色 */
}

.message-box.error {
  background-color: rgba(220, 53, 69, 0.9); /* 半透明红色 */
}




body {
    font-family: 微软雅黑;    
    font-size: 12pt;
    margin: 0;
    padding: 20px;
    background-color: #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
        /* 解决跨平台字体渲染差异 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.every-order-header {
    height: 80px;
    display: flex;
    align-items: center;
}

.every-qrcode {
    /* 占据 25% 的空间 */
    flex: 0 0 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 移除 max-width: 25%; */
}

.every-company {
    /* 占据 75% 的空间  flex: 1 0 75%; */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    /* 移除 max-width: 75%; */
}
.every-company .name {
    font-size: 12pt;
    font-family: 微软雅黑;
}

.every-company .client {
    font-size: 10pt;
    font-family: 微软雅黑;
}

/* 打印样式 */
@media print {
    body {
        background-color: #fff;
    }

    .outbound-document {
        border: 1px solid #000;
        page-break-after: always;
        /* 确保每个出库单打印在单独一页 */
        margin: 0;
        box-shadow: none;
        
    }
}

.outbound-document {
    min-width: 10cm;
    max-width: 15cm;
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px;
    margin-bottom: 10px;
    box-sizing: border-box;
    /* 确保 padding 不会增加总宽度 */
    position: relative; /* 新增：为伪元素定位提供基准 */
    overflow: hidden; /* 确保旋转的伪元素不会溢出边界 */
}
.outbound-document.hide-watermark::before {
    display: none;
}

/* 新增: 预览模式的伪元素 */
.outbound-document::before {
    content: "预览模式，禁止用于出库"; /* 伪元素内容 */
    position: absolute; /* 绝对定位 */
    top: 50%; /* 垂直居中 */
    left: 50%; /* 水平居中 */
    transform: translate(-50%, -50%) rotate(30deg); /* 居中并旋转 */
    color: rgba(255, 0, 0, 0.5); /* 半透明灰色 */
    font-size: 32px;
    font-weight: bold;
    white-space: nowrap; /* 确保文本不换行 */
    z-index: 100; /* 确保它在其他内容上方 */
    pointer-events: none; /* 确保它不影响鼠标事件 */
}


.header-divider {
    border: none;
    height: 1px;
    background-color: #ddd;
    margin: 10px 0;
}

.header,
.footer {
    display: flex;
    font-size: 10pt;
    justify-content: center; /* 居中对齐 */
    gap: 10px; /* 增加元素之间的间距 */
    color:gray;
    margin-bottom: 10px;
}

.footer div {
    /* 如果需要，可以为每个子div设置单独的样式 */
    text-align: center;
}

.info {
    display: flex;
    flex-wrap: wrap;
    font-size: 14px;
    margin-bottom: 10px;

}

.info-item {
    font-size: 11pt;
    font-family: 微软雅黑;
    flex: 0 0 50%;
    margin-bottom: 2px; /* 减少间距 */
    box-sizing: border-box;
}

.info-item-full-wrapped {
    flex: 0 0 100%;
    margin-bottom: 2px;
    box-sizing: border-box;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12pt;
    margin-bottom: 10px;
    
}

.details-table th,
.details-table td {
    border: 1px solid #000000;
    padding: 2px; /* 减少间距 */
    text-align: center; /* 添加这行 */
}

.details-table th {
    background-color: #f2f2f2;
    font-weight: normal;
    /*font-weight: bold;*/
    text-align: center; /* 添加这行 */
}

.summary {
    font-size: 12pt;
    text-align: center;
    margin-bottom: 2px;
}





/*
* .top-qr-code: 主容器，使用 flexbox 居中对齐所有子元素。
*/
.top-qr-code {
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    flex-wrap: wrap; /* 允许在小屏幕上换行 */
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px;
    margin-bottom: 10px;
    box-sizing: border-box;
    /* 确保 padding 不会增加总宽度 */
    position: relative; /* 新增：为伪元素定位提供基准 */
    overflow: hidden; /* 确保旋转的伪元素不会溢出边界 */
}

/*
* .qr-code-container: 包含二维码和 ID 的容器
*/
.qr-code-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-right: 20px;
}

/* 统一设置所有文本的字体 */
.top-qr-code .out-factory-id,
.top-qr-code .ExtPrintPage_Lable,
.top-qr-code .PageHeadPrintTime {
    font-family: '微软雅黑', sans-serif;
    text-align: center; /* 确保所有文本居中 */
}

/* 单独设置字体大小 */
.top-qr-code .out-factory-id {
    font-size: 12pt;
}

.top-qr-code .ExtPrintPage_Lable {
    font-size: 20pt;
}

.top-qr-code .PageHeadPrintTime {
    font-size: 16pt;
}

/*
* top-qr-code-img: 图片样式
*/
.top-qr-code img {
    max-width: 72px; /* 限制最大宽度 */
    height: auto; /* 保持图片比例 */
}

.top-qr-code-img {
    /* 占据 75% 的空间  flex: 1 0 75%; */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}