/* 公司云盘 (2026-10-10, docs/company-drive.md; 2026-10-12 界面改版): the path bar, a folder's heading, its 说明 (a Markdown
   subset built from text nodes), the folder and file tables and the dialogs. Icons are inline SVG data, no extra requests. */
/* 页头按钮组（.page-actions）、操作对象（.dialog-subject）、键值面板、详情底栏和固定操作列都用 app.css 的共享类 */
/* 2026-11-24 iOS 风格：图标用 mask 画，颜色取设计变量（文件夹用强调色、核心用琥珀色、文件用灰色），深色模式下跟着变；原来是写死颜色的彩色 SVG，深色底上是一块亮色。 */

/* 路径条：白底的一条（同卡片，无边框），前面一个文件夹图标，像文件管理器的地址栏 */
.drive-crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0;margin:-6px 0 20px;padding:9px 14px;font-size:13px;color:var(--muted);background:var(--surface);border:0;border-radius:12px;box-shadow:var(--shadow-sm)}
.drive-crumbs::before{content:"";flex:none;width:16px;height:16px;margin-right:2px;background-color:var(--primary);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' fill-opacity='.2' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/%3E%3C/svg%3E") center/16px no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' fill-opacity='.2' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/%3E%3C/svg%3E") center/16px no-repeat}
.drive-crumbs strong{font-weight:600;color:var(--text);overflow-wrap:anywhere}
.drive-crumbs .button.link{min-height:0;font-size:13px;font-weight:500;text-align:left;white-space:normal;overflow-wrap:anywhere}
.drive-sep{color:var(--border-strong)}

/* 文件夹标题：名称、级别和“设为…”按钮一行，级别说明另起一行 */
.drive-folder-head{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;align-items:center;gap:6px 10px;margin-bottom:20px}
.drive-folder-head>h2{grid-area:1/1;margin:0;font-size:19px;overflow-wrap:anywhere}
.drive-folder-head>.badge{grid-area:1/2}
.drive-folder-head>.muted{grid-area:2/1/3/-1;font-size:13px}
.drive-folder-head>.button{grid-area:1/4}

/* 说明：可读的行宽，标题、代码块与正文层次分明 */
.drive-note{max-width:860px;font-size:14px;line-height:1.8;color:var(--text-2);overflow-wrap:anywhere}
.drive-note h3,.drive-note h4{margin:20px 0 8px;line-height:1.5;color:var(--text)}
.drive-note h3{font-size:15px}
.drive-note h4{font-size:14px}
.drive-note h3:first-child,.drive-note h4:first-child{margin-top:0}
.drive-note p{margin:0 0 10px;white-space:pre-wrap}
.drive-note ul,.drive-note ol{margin:0 0 12px;padding-left:22px}
.drive-note li+li{margin-top:2px}
.drive-note strong{color:var(--text)}
.drive-note code,.drive-note pre,.drive-text{font-family:var(--mono);font-size:12px}
.drive-note code{background:var(--fill);border:0;border-radius:6px;padding:1px 5px}
.drive-note pre,.drive-text{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--field-bg);border:0;border-radius:12px;padding:12px 14px;line-height:1.7;color:var(--text-2)}
.drive-note pre{margin:0 0 12px}
/* 查看文件：全文直接排在弹窗里，由弹窗内容区整体滚动（与邮件内容、合同全文一致），不再嵌一层滚动框 */
.drive-text{margin:0}

/* 文件夹与文件表：名称列占满，其余列按内容收紧；名称前加图标（核心文件夹用琥珀色，与“核心”徽标同色） */
.drive-table td:not(:first-child),.drive-table th:not(:first-child){width:1%;white-space:nowrap}
.drive-table .table-actions{flex-wrap:nowrap}
[data-testid=drive-folders] table{min-width:0}
[data-testid=drive-files] table{min-width:640px}
.drive-name{justify-content:flex-start;align-items:flex-start;gap:10px;text-align:left;white-space:normal;overflow-wrap:anywhere;font-weight:600}
.drive-name::before{content:"";flex:none;width:18px;height:18px;margin-top:1px;background-color:var(--primary);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' fill-opacity='.2' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/%3E%3C/svg%3E") center/18px no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' fill-opacity='.2' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/%3E%3C/svg%3E") center/18px no-repeat}
tr:has([data-level=core]) .drive-name::before{background-color:var(--warning)}
[data-testid=drive-files] td:first-child{min-width:240px}
/* 逐页整理（2026-11-12）：大小靠右、用等宽数字，上下几行好比较；修改时间也用等宽数字 */
[data-testid=drive-files] :is(th,td):nth-child(2){text-align:right}
[data-testid=drive-files] td:is(:nth-child(2),:nth-child(3)){font-variant-numeric:tabular-nums}
[data-testid=drive-files] td:first-child .table-title,[data-testid=drive-files] td:first-child .table-sub{position:relative;max-width:520px;padding-left:28px}
[data-testid=drive-files] td:first-child .table-title{color:var(--text);font-weight:500}
[data-testid=drive-files] td:first-child .table-title::before{content:"";position:absolute;left:0;top:1px;width:18px;height:18px;background-color:var(--muted);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z' fill='%23000' fill-opacity='.1'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4M16 13H8M16 17H8M10 9H8'/%3E%3C/svg%3E") center/18px no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z' fill='%23000' fill-opacity='.1'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4M16 13H8M16 17H8M10 9H8'/%3E%3C/svg%3E") center/18px no-repeat}

/* 核心文件弹窗：文件名和路径是 .dialog-subject，左侧多一把琥珀色的锁（与“核心”徽标同色），一眼看出是核心文件；
   动态码与原因之间留出间距 */
[data-testid^=drive-core-]>.dialog-subject{position:relative;padding-left:44px}
[data-testid^=drive-core-]>.dialog-subject::before{content:"";position:absolute;left:14px;top:13px;width:18px;height:18px;background-color:var(--warning);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2' fill='%23000' fill-opacity='.18'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center/18px no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2' fill='%23000' fill-opacity='.18'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center/18px no-repeat}
[data-testid^=drive-core-] .form-grid+label{margin-top:16px}
/* 查看文件（.detail-stack，子项间距由 gap 决定）：提示条不再带自己的上下外边距 */
[data-testid=drive-view]>.notice{margin:0}

@media(max-width:760px){
  .drive-crumbs{margin-top:0}
  .drive-folder-head{grid-template-columns:auto minmax(0,1fr)}
  .drive-folder-head>h2{grid-area:1/1/2/-1;font-size:18px}
  .drive-folder-head>.badge{grid-area:2/1}
  .drive-folder-head>.muted{grid-area:2/2}
  .drive-folder-head>.button{grid-area:3/1/4/-1;justify-self:start;margin-top:4px}
  /* 手机：文件夹表的两个按钮上下叠放、等宽，把宽度让给文件夹名；左边与“操作”表头对齐 */
  [data-testid=drive-folders] .table-actions{flex-direction:column;align-items:stretch}
}
