/* =========================================================
   Aliarm - main.css
   兼容原有 HTML 结构，仅增强视觉 + 放大表格字体
   ========================================================= */

/* ---------- 基础 ---------- */
body {
	font-family: "Tahoma", "Bitstream Vera Sans", Verdana, Helvetica, Arial, sans-serif;
	font-size: 14px;
	color: #333;
	background: #f5f6f8;
	margin: 0;
	padding: 0;
}

a {
	color: #1a5fb4;
	text-decoration: none;
}
a:hover {
	color: #0d3d7a;
	text-decoration: underline;
}

/* ---------- 页面容器 ---------- */
#container {
	padding: 10px 15px 30px 15px;
	font-size: 14px;
	line-height: 1.55;
}

#container strong {
	font-size: inherit;   /* 让 b/strong 继承父级字体大小 */
}

/* ---------- 通用 input / select / button ---------- */
input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
	border: 1px solid #c8ccd4;
	border-radius: 4px;
	padding: 3px 6px;
	font-size: 14px;
	color: #333;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
	box-sizing: border-box;
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: #4a90e2;
	box-shadow: 0 0 0 2px rgba(74,144,226,.15);
}

input[type="button"],
input[type="submit"],
button {
	border: 1px solid #c8ccd4;
	border-radius: 4px;
	background: linear-gradient(to bottom, #ffffff, #f0f2f5);
	color: #333;
	padding: 3px 10px;
	font-size: 14px;
	cursor: pointer;
	transition: all .15s;
	margin: 1px 0;
}
input[type="button"]:hover,
input[type="submit"]:hover,
button:hover {
	background: linear-gradient(to bottom, #f7f9fc, #e4e8ee);
	border-color: #9aa4b2;
}
input[type="button"]:active,
input[type="submit"]:active,
button:active {
	background: #e4e8ee;
	box-shadow: inset 0 1px 2px rgba(0,0,0,.08);
}
input[type="button"][disabled],
input[type="submit"][disabled],
button[disabled] {
	background: #f2f3f5;
	color: #aaa;
	border-color: #ddd;
	cursor: not-allowed;
}

/* ---------- #newTask ---------- */
#newTask {
	font: small/1.5 "Tahoma", "Bitstream Vera Sans", Verdana, Helvetica, sans-serif;
	text-align: left;
	font-size: 100%;
	padding: 10px 0;
	color: #666;
}

/* =========================================================
   Table (grayTable)
   ========================================================= */

.grayTable {
	/* 容器本身不画框、不加背景、不加内边距 */
	display: inline-block;
	max-width: 100%;
	margin-top: 10px;
	box-sizing: border-box;
}

/* 卡片效果移到表格本体上 */
.grayTable table {
	background: #fff;
	border: 1px solid #b0b8c4 !important;   /* 外框与内框同色 */
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0,0,0,.04);
	overflow: hidden;
}

.grayTable table,
.grayTable td {
	border: 1px solid #b0b8c4 !important;   /* 内框统一颜色 */
	border-collapse: collapse;
	font-family: "Tahoma", "Bitstream Vera Sans", Verdana, Helvetica, sans-serif;
	font-size: 14px;
	line-height: 1.6;
}
.grayTable table {
	border: 1px solid #b0b8c4 !important;   /* 外框与内框同色 */
	border-radius: 4px;
	overflow: hidden;
	/* 不再强制 100% 宽 width: 100%;   */
}

/* 6 列的表格（订单列表）铺满 */
.grayTable table:has(thead th:nth-child(6)) {
	width: 100%;
}

.grayTable thead th,
.grayTable tbody th {
	background: linear-gradient(to bottom, #fafbfc, #eef1f5);
	color: #444;
	padding: 8px 10px;
	border-left: 1px solid #b0b8c4 !important;
	border-bottom: 1px solid #b0b8c4 !important;
	font-weight: 600;
	font-size: 14px;
	text-align: left;
	white-space: nowrap;
}

.grayTable tbody th {
	background: #fafafb;
	border-top: 1px solid #b0b8c4 !important;
	text-align: left;
	font-weight: normal;
}

.grayTable tbody tr td {
	padding: 8px 10px;
	color: #555;
	font-size: 14px;
	line-height: 1.6;
	vertical-align: top;
	background: #fff;
	word-break: break-word;
	word-wrap: break-word;
}

.grayTable tbody tr:nth-child(even) td {
	background: #fafbfc;
}

.grayTable tbody tr:hover td {
	background: #bcd8f5 !important;
	color: #222;
}

.grayTable table tr.important td {
	background-color: #fdeefd !important;
}
.grayTable table tr.trRed td {
	background-color: #fde3e6 !important;
}
.grayTable table tr.trGreen td {
	background-color: #e2f7e8 !important;
}

.grayTable tfoot td,
.grayTable tfoot th {
	border-left: none;
	border-top: 1px solid #b0b8c4 !important;
	padding: 6px;
	background: #f7f9fb;
	color: #666;
	font-size: 14px;
}

.grayTable caption {
	text-align: left;
	font-size: 120%;
	padding: 8px 0;
	color: #333;
	font-weight: 600;
}

.grayTable table a:link,
.grayTable table a:visited {
	color: #1a5fb4;
}
.grayTable table a:hover {
	color: #0d3d7a;
	text-decoration: none;
}
.grayTable table a:active {
	color: #0d3d7a;
}

.grayTable table select,
.grayTable table input[type="text"],
.grayTable table input[type="password"],
.grayTable table textarea {
	font-size: 14px;
	padding: 3px 6px;
	margin: 2px 0;
}

.grayTable table input[type="button"],
.grayTable table input[type="submit"],
.grayTable table button {
	font-size: 14px;
	padding: 3px 9px;
	margin: 2px 0;
}

.grayTable tbody tr td:first-child {
	white-space: nowrap;
}

/* =========================================================
   分页 #page
   ========================================================= */
#page {
	font: 12px/16px arial;
	margin-top: 12px;
	padding: 6px 0;
	overflow: hidden;
}
#page span {
	float: left;
	margin: 0 3px;
	line-height: 24px;
	color: #888;
}
#page a {
	float: left;
	margin: 0 3px;
	border: 1px solid #d6dae0;
	border-radius: 4px;
	padding: 3px 9px;
	text-decoration: none;
	color: #444;
	background: #fff;
	transition: all .15s;
}
#page a:hover {
	color: #fff;
	background: #4a90e2;
	border-color: #4a90e2;
}
#page a.now_page {
	color: #fff;
	background: #1a5fb4;
	border-color: #1a5fb4;
	font-weight: 600;
}

/* =========================================================
   通用布局
   ========================================================= */
.clearBoth {
	clear: both;
}
.leftDiv {
	float: left;
}
.left2 {
	padding: 0 0 0 30px;
}
.topDiv-10 {
	padding: 10px 0 0 0;
}
.colorRed {
	color: #FF0000;
}

.currentLink a {
	color: #e74c3c !important;
	text-decoration: none;
	font-weight: 600;
}

.fontsmall50 { font-size: 50%; }
.fontsmall30 { font-size: 30%; }

/* =========================================================
   Invoice
   ========================================================= */
.invoice_top_head {
	font-size: 130%;
}
.invoice_font_120 {
	font-size: 120%;
	font-weight: bold;
}
.invoice_font_120 input {
	border: none;
	font-size: 120%;
	font-weight: bold;
}

/* =========================================================
   邮件内容
   ========================================================= */
#emailContent {
	font-family: Arial;
	font-size: 15px;
}

/* =========================================================
   搜索区 / 加订单区（不要背景框，保持干净 + 紧凑）
   ========================================================= */
#search {
	padding: 6px 0;
	margin-bottom: 6px;
	background: transparent;
	border: none;
	box-shadow: none;
}

#addOrder {
	padding: 0;
	margin-bottom: 6px;
	background: transparent;
	border: none;
	box-shadow: none;
}

#addOrder table {
	border: none;
	background: transparent;
	border-collapse: collapse;
	border-spacing: 0;
}

#addOrder table td {
	padding: 2px 7px;
	font-size: 14px;
	line-height: 1.25;
	vertical-align: middle;
	border: none;
	background: transparent;
}

#addOrder table tr {
	line-height: 1.25;
}

#addOrder table input[type="text"] {
	padding: 2px 5px;
	height: 22px;
	line-height: 1;
	box-sizing: border-box;
}

#addOrder table input[type="button"] {
	padding: 2px 8px;
	height: 24px;
	line-height: 1;
	box-sizing: border-box;
	margin: 0;
}

#addOrder table a {
	font-weight: normal;
	color: #1a5fb4;
	display: inline-block;
	padding-right: 4px;
}

/* 表格顶部标题 */
.grayTable > b,
.grayTable b {
	color: #1a5fb4;
}

/* 滚动条美化（Webkit） */
::-webkit-scrollbar {
	width: 10px;
	height: 10px;
}
::-webkit-scrollbar-track {
	background: #f0f2f5;
}
::-webkit-scrollbar-thumb {
	background: #c8ccd4;
	border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
	background: #a5adba;
}

/* =========================================
   修复 .grayTable 表格外边框颜色问题
   范围：仅限 class="grayTable" 内部的表格
   ========================================= */

/* 1. 锁定 .grayTable 内部的 table */
.grayTable table {
    /* 强制合并边框，消除双线 */
    border-collapse: collapse !important;
    /* 移除 table 标签本身可能存在的深色外框 */
    border: none !important; 
    /* 清除干扰项 */
    border-radius: 0 !important;
    box-shadow: none !important;
    background-color: transparent !important; /* 防止背景色干扰边框视觉 */
}

/* 2. 统一内部单元格（内边框）为浅灰色 */
.grayTable table td, 
.grayTable table th {
    /* 这里的 #ccc 是标准的浅灰色，与你截图中的内边框颜色接近 */
    border: 1px solid #ccc !important;
}

/* 3. 【关键】模拟外边框：给最外圈的单元格补上边框 */

/* 上边框：第一行 */
.grayTable table tr:first-child th,
.grayTable table tr:first-child td {
    border-top: 1px solid #ccc !important;
}

/* 下边框：最后一行 */
.grayTable table tr:last-child th,
.grayTable table tr:last-child td {
    border-bottom: 1px solid #ccc !important;
}

/* 左边框：每行的第一个单元格 */
.grayTable table tr th:first-child,
.grayTable table tr td:first-child {
    border-left: 1px solid #ccc !important;
}

/* 右边框：每行的最后一个单元格 */
.grayTable table tr th:last-child,
.grayTable table tr td:last-child {
    border-right: 1px solid #ccc !important;
}


/* =========================================
   修复打印/PDF 时表格最右侧边框过细的问题
   原理：仅针对打印模式，强制加粗每一行最后一个单元格的右边框
   ========================================= */

@media print {
    /* 1. 锁定 .grayTable 内部的表格 */
    .grayTable table {
        /* 确保打印时边框也是合并模式，防止出现双线 */
        border-collapse: collapse !important;
    }

    /* 2. 核心修复：精准加粗最右侧边框 */
    /* 使用 :last-child 选中每一行的最后一个单元格 (td 或 th) */
    .grayTable table tr td:last-child,
    .grayTable table tr th:last-child {
        /* 
           将右边框强制设为 2px。
           在打印渲染中，collapse 模式容易“吃掉”边缘的 0.5-1px，
           设为 2px 可以抵消这种损耗，使最终打印出来的视觉粗细与内部的 1px 保持一致。
           颜色保持 #ccc 与你现有的内边框一致。
        */
        border-right: 2px solid #ccc !important; 
    }
}

/* =========================================
   修复 .grayTable 中 td 内容不换行/溢出问题
   ========================================= */

.grayTable table td {
    /* 1. 允许文字正常换行（覆盖可能存在的 nowrap） */
    white-space: normal !important; 
    
    /* 2. 核心修复：当内容（如长单词、链接）超过 td 宽度时，强制在任意字符处断开换行 */
    word-wrap: break-word !important;      
    overflow-wrap: break-word !important;  
    
    /* 3. 双重保险：隐藏任何可能溢出的像素，确保不侵入隔壁 td */
    overflow: hidden !important; 
}