/* 发票抬头本子（账户资料页 /member/profile 的 #invoice-titles，2026-10-09 用户要求「发票抬头需要新增」）。
   表格与操作按钮的外观与地址管理页（member-address.css 的 .addr-table）同源，但那份样式表本页不加载
   （本页 headExtra 只有 city-select.css），所以这里写一份 it- 前缀的同源样式，类名一律带前缀 ——
   这个站里 commerce.css / marketplace-compact.css 有大量无作用域规则，短通用名会被整条接管。

   ⚠️ 三条必须显式写、否则会被全站规则吃掉（本页也加载商城壳的 commerce.css / platform.css）：
   1. `.it-search` 是 <input> ⇒ `input,select,textarea{border:1px solid #ccc!important;border-radius:4px!important;
      padding:9px 12px!important;min-height:42px}` 会盖掉本地规则 ⇒ 带 !important；
   2. 表单里的提交按钮是 <button> 且不在 .offer-head-right 里 ⇒ 拿不到 workbench.css 那条
      `.offer-head-right button.offer-new` 的清除规则，要自己清 min-height / border / appearance；
   3. `.profile-form-grid select` 与同排 input 同尺寸（42px / 圆角 9）⇒ 同样带 !important。 */

.it-tip {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 6px;
    background: #fff7f5;
    color: #8a5a00;
    font-size: 13px
}

/* 作者样式里的 display 会盖掉 UA 的 [hidden]{display:none}（本仓老坑，见 .merchant-tabs[hidden]） */
.it-tip[hidden] {
    display: none
}

/* 类型筛选一行 + 右侧搜索框（2026-10-16 用户：「全部 3 / 企业 1 / 个人改为下拉框选择」）：
   三个类型页签换成行首一个下拉（#invoiceTitleTypeFilter），档位计数并进选项文案。
   ⚠️ 下拉走 GRUI.enhanceSelect 增强 ⇒ 看得见的是 .gr-select-trigger，所以**触发器**也要压到
   与旁边搜索框同高（34px），否则 44px 的默认触发器在这一行里冒头（同档期页 #calendarStatusFilter 的处理）。 */
#invoiceTitleFilter {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    /* 与卡头拉开（2026-10-16 用户：「it-filter 筛选框行需要有上边距」）—— 这一行是卡头之后的
       第一个元素（中间的 .it-tip 平时 hidden 不占高），上边距只能由它自己出
       （同 #calendarFilter 的 `12px 0 0`；下边距由 .it-table-wrap 的 12px 承担）。 */
    margin-top: 12px
}

.it-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #5f6874;
    white-space: nowrap
}

/* 原生 select（组件没加载时的降级形态 / 增强前那一瞬）：与本行搜索框同高同边框 */
.it-item select {
    height: 34px;
    min-height: 0 !important;
    padding: 0 10px !important;
    border: 1px solid #d8dbe0 !important;
    border-radius: 8px !important;
    background: #fff;
    color: #313a46;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer
}

/* 130px 起步：档位文案带计数（「全部（3）」），窄了会被省略号截断成「全部（…」 */
#invoiceTitleFilter .gr-select {
    min-width: 130px
}

#invoiceTitleFilter .gr-select-trigger {
    min-height: 34px !important;
    padding: 0 10px !important;
    border-color: #d8dbe0;
    border-radius: 8px;
    font-size: 13px
}

/* 搜索框（2026-10-16 用户：「搜索框宽度短一些」）：原来 flex:1 会一路撑到行尾，现在给固定宽（240px）。
   ⚠️ 不能再挂 margin-left:auto —— 用户 2026-10-16 追加「都靠左」，那一句原本会把搜索框推到行右端
   （下拉 / 搜索框 / 重置三件按顺序紧挨着排）。 */
.it-search {
    flex: 0 0 auto;
    width: 240px;
    min-width: 0;
    height: 34px;
    min-height: 0 !important;
    padding: 0 12px !important;
    border: 1px solid #d8dbe0 !important;
    border-radius: 8px !important;
    font-size: 13px
}

/* 「重置」按钮（2026-10-16 用户：「还需要个重置按钮」）：用站内统一的 .gr-btn（同「我的租赁订单」
   / 「发票管理」两个筛选栏里的那颗），只把尺寸压到与本行 34px 的下拉 / 搜索框齐平 ——
   .gr-btn 自身是 `padding:9px 18px`，再被 commerce.css 的 `body button{min-height:42px}` 撑到 42px。
   本选择器带 id（1,1,0）高于 `body button`(0,0,2)/(0,1,1)，不必 !important。 */
#invoiceTitleFilter .gr-btn {
    height: 34px;
    min-height: 0;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 13px
}

.it-search:focus {
    border-color: #e7272d !important;
    box-shadow: 0 0 0 3px rgba(231, 39, 45, .08)
}

/* 表单：字段复用本页的 .profile-form-grid（label + 42px 输入框），这里只补下拉与按钮行 */
.profile-form-grid select {
    box-sizing: border-box;
    width: 100%;
    height: 42px;
    padding: 0 13px !important;
    border: 1px solid #ececf0 !important;
    border-radius: 9px !important;
    background: #fff;
    font-size: 13.5px;
    font-family: inherit;
    outline: none;
    cursor: pointer
}

.it-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f1f3
}

/* 2026-10-16 用户：「新增抬头改为弹窗录入表单」⇒ 表单由脚本搬进 GRUI.dialog 的 .gr-dialog-body
   （js/member-invoice-titles.js 的 openForm；模板里那块 <form> 的 DOM 契约没变）。
   上面那道「上边距 + 分隔线」原本是卡内内联展开时与列表拉开距离用的，弹窗正文自带内边距
   （.gr-dialog-body 是 20px 22px），再来一道就成了凭空多出来的横线。 */
.gr-dialog-body .it-form {
    margin-top: 0;
    padding-top: 0;
    border-top: 0
}

/* 「字段名颜色要为黑色」（2026-10-16 用户：「新增发票抬头弹窗 字段名颜色要为黑色」）：
   表单复用本页 .profile-form-grid，那条 `.profile-form-grid label{color:#55585f}` 是给账户资料页的灰字，
   弹窗里要黑字 ⇒ 只压发票抬头这一块（账户资料页自己的字段名用户没点名、不动）。
   要调深浅就改这一行（#1b1b1f = 站内墨色）。
   ⚠️ 必填红星不受影响：`.required-star::before` 自带 color（merchant-commerce.css，workbenchHead 已加载本页），
   而且它作用在 ::before 上、比这里这条更具体（元素伪类 vs 元素）。 */
#invoiceTitleForm .profile-form-grid label>span {
    color: #1b1b1f
}

/* 「设为默认抬头」：.profile-form-grid label 是 flex column，这里改成一行（复选框 + 文字） */
.profile-form-grid label.it-default {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    color: #4c5461
}

.profile-form-grid label.it-default input {
    width: 15px;
    height: 15px;
    min-height: 0;
    margin: 0;
    flex: 0 0 auto;
    accent-color: #e7272d
}

.it-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap
}

/* 提交按钮复用了列表页头部的 .offer-new，但它落在表单里（不在 .offer-head-right 内）→
   自己清掉 <button> 的默认外观（同 workbench.css 的 `.offer-head-right button.offer-new`）。 */
.it-form-actions button.offer-new {
    min-height: 0;
    border: 0;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer
}

.it-form-actions .it-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    min-height: 0;
    padding: 0 16px;
    border: 1px solid #d8dbe0;
    border-radius: 8px;
    background: #fff;
    color: #313a46;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer
}

.it-form-actions .it-cancel:hover {
    border-color: #c9131b;
    color: #c9131b
}

.it-form-actions em {
    font-style: normal;
    font-size: 13px;
    color: #d62027
}

.it-table-wrap {
    margin-top: 12px;
    overflow-x: auto
}

.it-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px
}

.it-table th,
.it-table td {
    padding: 12px 12px;
    border-bottom: 1px solid #f0f1f3;
    color: #4c5461;
    text-align: left;
    vertical-align: middle
}

.it-table th {
    background: #f7f8fa;
    color: #5f6874;
    font-weight: 700;
    white-space: nowrap
}

.it-table td b {
    color: #313a46
}

.it-table tbody tr:last-child td {
    border-bottom: 0
}

.it-table tbody tr:hover td {
    background: #fcfcfd
}

.it-table td.op {
    white-space: nowrap
}

/* ⚠️ min-height / display 必须显式写：commerce.css 的 `body button` 会把按钮撑成 42px 高的胖按钮、
   表格行高直接翻倍（同 member-address.css 的 .addr-table td.op button 注释）。
   本条 (0,2,2) 高于 `body button`(0,0,2)，压得住。 */
.it-table td.op button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    min-height: 0;
    margin-right: 8px;
    padding: 5px 12px;
    border: 1px solid #d8dbe0;
    border-radius: 6px;
    background: #fff;
    color: #313a46;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s
}

.it-table td.op button:hover {
    border-color: #c9131b;
    color: #c9131b
}

.it-table td.op button.danger {
    border-color: #f0b4b7;
    color: #c9131b
}

.it-table td.op button.danger:hover {
    background: #fdf3f3
}

.it-op-done {
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
    color: #8b95a5;
    font-size: 13px
}

.it-muted {
    color: #8b95a5
}

.it-table-empty {
    padding: 26px 0 !important;
    color: #8b95a5;
    text-align: center
}

/* 类型标签：个人 = 白底描边、企业 = 浅红底红字；「默认」列用同款浅红（原型就是 tag-line / tag-red 两支） */
.it-table td .it-tag {
    display: inline-block;
    padding: 1px 6px;
    border: 1px solid #ececf0;
    border-radius: 4px;
    background: #fff;
    color: #5a636e;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.6;
    white-space: nowrap
}

.it-table td .it-tag.enterprise,
.it-table td .it-tag.default {
    border-color: #ffd9d2;
    background: #fff1ed;
    color: #c9131b
}
