:root { --brand-cyan: #00B2E3; --brand-teal: #0084A3; --brand-orange: #FF6400; --brand-tint: #def5fb; --brand-link: #00647c; --charcoal: #2b2a29; --ink: #18252a; --surface: #eff5f7; color-scheme: light; font-family: "Noto Sans TC", system-ui, "PingFang TC", sans-serif; color: var(--ink); background: var(--surface); }
* { box-sizing: border-box; }
body { margin: 0; }
.login-brand { background: var(--charcoal); color: white; font-weight: 700; }
.login-brand > div, main { max-width: 62rem; margin: auto; padding: 1.1rem 1.4rem; }
main { padding-top: 2rem; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 1rem; }
h2 { font-size: 1.25rem; margin: 0 0 1rem; }
section { background: white; border: 1px solid #cbdadf; border-radius: 1rem; padding: 1.4rem; margin-bottom: 1rem; }
.login { max-width: 28rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
label { display: block; font-weight: 600; margin-bottom: 1rem; }
input, textarea, select { display: block; width: 100%; font: inherit; color: inherit; background: white; border: 1px solid #8ca6b1; border-radius: .45rem; padding: .65rem; margin-top: .4rem; }
textarea { min-height: 5rem; resize: vertical; }
.checkbox input { display: inline; width: auto; }
button, .button { display: inline-block; border: 1px solid transparent; border-radius: .45rem; padding: .6rem 1rem; font: inherit; font-weight: 650; color: var(--ink); background: var(--brand-cyan); cursor: pointer; text-decoration: none; white-space: nowrap; }
button:disabled { opacity: .65; cursor: wait; }
.secondary { background: white; color: var(--brand-link); border-color: #8ca6b1; }
.account + .account, li + li { border-top: 1px solid #dbe5e8; padding-top: 1rem; margin-top: 1rem; }
.account strong { display: block; margin-bottom: .65rem; }
ul { list-style: none; padding: 0; margin: 0; }
li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; overflow-wrap: anywhere; }
li span { display: block; color: #44616e; }
a { color: var(--brand-link); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.workspace { display: grid; grid-template-columns: 14rem minmax(0, 1fr); min-height: 100vh; background: #fff; }
.rail { display: flex; flex-direction: column; gap: 2rem; padding: 1.5rem 1rem; background: #f4f8fa; border-right: 1px solid #e0eaee; }
.rail a { color: var(--ink); text-decoration: none; }
.rail .brand { display: flex; align-items: center; gap: .65rem; font-size: 1.2rem; font-weight: 750; padding: .25rem .5rem; }
.brand span { color: var(--brand-link); background: var(--brand-tint); border-radius: .55rem; padding: .28rem .5rem; }
.rail nav { display: grid; gap: .3rem; }
.rail nav a { border-radius: .55rem; padding: .65rem .75rem; }
.rail nav span { display: inline-block; width: 1.4rem; }
.rail nav a:hover { background: #e8f1f4; }
.rail nav [aria-current="page"] { background: var(--brand-tint); color: var(--brand-link); font-weight: 750; }
.rail-account { margin-top: auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; border-top: 1px solid #dbe5e8; padding: 1rem .25rem 0; overflow-wrap: anywhere; }
.rail-account button { padding: .4rem .65rem; }
.work-main { width: 100%; max-width: 84rem; padding: 1.6rem clamp(1rem, 4vw, 3.75rem); }
.work-heading h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.2; margin: 2rem 0 .7rem; }
.drive-search { display: flex; gap: .55rem; max-width: 40rem; }
.drive-search label { flex: 1; min-width: 0; margin: 0; }
.drive-search input { margin: 0; background: #f4f8fa; border-color: #d7e5eb; }
.drive-search button { background: #e0f3f8; color: var(--brand-link); }
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem .7rem; margin: 0 0 1.2rem; overflow-wrap: anywhere; }
.drive-actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: .65rem; margin-bottom: 1.4rem; }
.drive-tool summary { color: var(--brand-link); background: #f2f8fa; border: 1px solid #d5e6ec; border-radius: .5rem; padding: .6rem .85rem; font-weight: 700; cursor: pointer; }
.drive-tool:first-child summary { background: var(--brand-cyan); color: var(--ink); border-color: var(--brand-cyan); }
.drive-tool form { margin-top: .6rem; padding: .85rem; background: #f7fafb; border: 1px solid #dbe9ed; border-radius: .55rem; max-width: min(100%, 26rem); }
#upload-status:empty { display: none; }
.file-panel { padding: 0; border: 1px solid #dce7eb; border-radius: .75rem; overflow: hidden; }
.file-panel-top { padding: .9rem 1rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .7rem; }
.file-panel-top span, .row-actions span { color: #496771; font-size: .9rem; }
.table-wrap { overflow-x: auto; }
.file-table { border-collapse: collapse; width: 100%; text-align: left; }
.file-table th, .file-table td { padding: .75rem 1rem; border-top: 1px solid #e3edf0; vertical-align: top; }
.file-table th { background: #f4f8fa; font-size: .875rem; color: #3c5964; }
.file-table td:nth-child(2) { white-space: nowrap; }
.file-table td:last-child { width: 1%; }
.file-name { display: flex; align-items: center; gap: .65rem; min-width: 10rem; overflow-wrap: anywhere; }
.file-name a { font-weight: 700; }
.file-type { background: #e0f3f8; color: var(--brand-link); border-radius: .35rem; padding: .32rem .4rem; white-space: nowrap; font-size: .78rem; font-weight: 750; }
.row-actions { display: flex; align-items: flex-start; gap: .65rem; }
.download, .item-tools summary { white-space: nowrap; padding: .32rem .4rem; color: var(--brand-link); font-weight: 700; }
.item-tools summary { cursor: pointer; }
.tool-body { width: clamp(12rem, 30vw, 22rem); padding: .75rem; background: #f4f8fa; border-radius: .5rem; }
.tool-body form { margin-bottom: .8rem; }
.tool-body label { margin-bottom: .5rem; }
.tool-body h3 { font-size: 1rem; margin: 0; }
.share-tools { border-block: 1px solid #dbe5e8; padding-block: .7rem; margin-bottom: .7rem; overflow-wrap: anywhere; }
.grant-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.file-empty { min-height: 14rem; padding: 1rem; border-top: 1px solid #e3edf0; display: grid; place-content: center; text-align: center; color: #496771; }
.drive-search input:focus { border-color: var(--brand-teal); }
:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: 3px; }
@media (max-width: 680px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .rail { gap: .65rem; padding: .85rem 1rem; border-right: 0; border-bottom: 1px solid #dce7eb; }
  .rail nav { display: flex; flex-wrap: wrap; }
  .rail-account { justify-content: flex-start; padding-top: .5rem; }
  .file-table th, .file-table td { padding: .6rem .65rem; }
}

.login-brand { background: #fff; border-bottom: 1px solid #dce7eb; }
.login-brand img, .rail .brand img { display: block; width: 10.25rem; max-width: 100%; height: auto; }
.workspace { background: #f5f8fa; grid-template-columns: 14.5rem minmax(0, 1fr); }
.rail { background: #fff; gap: 1.5rem; padding-top: 1.7rem; }
.rail .brand { min-height: 3.5rem; }
.work-main { align-self: start; margin: 0; max-width: 80rem; padding: 2rem clamp(1rem, 3vw, 3rem); }
.work-heading h1 { margin: 1rem 0 1.25rem; font-weight: 750; letter-spacing: -.035em; }
.drive-search + .work-heading h1 { margin-top: 1.6rem; }
.drive-search input { background: #fff; }
.page-actions { margin: 0 0 1rem; }
.file-panel { box-shadow: 0 3px 12px #21445508; }
.file-table td { vertical-align: middle; }
.file-table tbody tr:hover { background: #f8fcfd; }
.file-table th { font-weight: 700; }
.state { display: inline-block; border-radius: .4rem; padding: .14rem .45rem; color: #455560; background: #edf1f3; font-size: .9rem; }
.state-on { color: #07586a; background: #e0f4f8; }
.account-table td:last-child { white-space: nowrap; }
.audit-table td { white-space: nowrap; }
.audit-table td:last-child { width: auto; }
.audit-pagination { display: flex; gap: 1rem; }
dialog { width: min(32rem, calc(100% - 2rem)); max-height: 85vh; padding: 0; border: 1px solid #d1e1e8; border-radius: 1rem; color: var(--ink); box-shadow: 0 20px 55px #142d4460; }
dialog::backdrop { background: #16304880; }
.dialog-heading { position: sticky; z-index: 1; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: #fff; padding: 1rem 1.25rem; border-bottom: 1px solid #dce7eb; }
.dialog-heading h2 { margin: 0; overflow-wrap: anywhere; }
.dialog-heading button { padding: .2rem .55rem; font-size: 1.25rem; }
.dialog-content { padding: 1.25rem; white-space: normal; }
.dialog-content .tool-body { width: auto; padding: 0; background: transparent; }
.dialog-content p { font-size: .925rem; color: #496771; }
.row-actions { align-items: center; }
.row-actions button { padding: .35rem .6rem; }
@media (max-width: 680px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .rail { padding-top: .8rem; gap: .7rem; }
  .rail .brand { min-height: 0; }
  .rail .brand img { width: 8.5rem; }
  .work-main { padding-top: 1rem; }
}

.drop-zone { padding: 1rem; border: 2px dashed #95c9d8; border-radius: .65rem; background: #f5fcfe; cursor: pointer; }
.drop-zone input { margin-top: .8rem; }
.drop-zone.drag-active, .file-panel.drag-active { outline: 2px solid var(--brand-teal); outline-offset: -2px; background: var(--brand-tint); }
#upload-selection { max-height: 5rem; overflow: auto; overflow-wrap: anywhere; }
#upload-selection:empty { display: none; }

.inline-upload { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.inline-upload p { margin: 0 0 .65rem; overflow-wrap: anywhere; }
.inline-upload p:empty { display: none; }
.inline-upload button { margin-bottom: .65rem; }
.inline-upload button[hidden] { display: none; }

.signin {
  display: grid;
  place-items: center;
  max-width: none;
  min-height: 100vh;
  padding: clamp(1rem, 4vw, 3rem);
  background: radial-gradient(ellipse at 12% 5%, #d9f4fb, transparent 50%), #f2f7fa;
}
.signin-shell {
  width: min(100%, 57rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #dce8ef;
  border-radius: 1.65rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 64px #12364c16;
}
.signin-brand {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-content: center;
  gap: 1.3rem;
  padding: clamp(1.8rem, 5vw, 4rem);
  background: linear-gradient(145deg, #edfaff 8%, #c6effb 72%, #a7e8f8);
}
.signin-brand::before, .signin-brand::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 24rem;
  height: 24rem;
  border: 1px solid #0084a337;
  border-radius: 50%;
  right: -12rem;
  bottom: -16rem;
  box-shadow: 0 0 0 1.6rem #ffffff45, 0 0 0 3.2rem #ffffff36;
}
.signin-brand::after { width: .65rem; height: .65rem; background: var(--brand-orange); border: none; box-shadow: none; right: 2.1rem; bottom: 2.1rem; }
.signin-brand img { width: min(100%, 15rem); height: auto; }
.signin-brand p { font-weight: 750; font-size: clamp(1.2rem, 2.75vw, 1.8rem); color: #084860; margin: 0; }
.signin-card { border: 0; border-radius: 0; margin: 0; padding: clamp(1.6rem, 5vw, 4rem); }
.signin-card h1 { font-size: clamp(1.65rem, 3vw, 2.15rem); margin-bottom: 1.7rem; }
.signin-card input { background: #f8fbfc; border-color: #a9c3ce; }
.signin-card button { margin-top: .3rem; width: 100%; min-height: 2.75rem; }

.customer-shell { min-height: 100vh; background: linear-gradient(180deg, #eaf6fb 0, #f5f8fa 19rem); }
.customer-top { background: #fff; border-bottom: 1px solid #dce9ef; }
.customer-top-inner {
  max-width: 77rem;
  margin: auto;
  min-height: 4.65rem;
  padding: .65rem clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.customer-brand img { display: block; width: 9rem; max-width: 100%; height: auto; }
.customer-account { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.customer-name { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-avatar { display: grid; place-items: center; flex: 0 0 1.95rem; height: 1.95rem; border-radius: 50%; background: #e1f5fa; color: #005e75; font-weight: 750; }
.customer-account button { margin-left: .3rem; padding: .35rem .6rem; white-space: nowrap; }
.customer-main { max-width: 77rem; padding: clamp(1.4rem, 4vw, 3.65rem) clamp(1rem, 3vw, 2rem); }
.customer-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 1.1rem; margin-bottom: 1.45rem; }
.customer-heading h1 { margin: 0; font-size: clamp(1.7rem, 3.5vw, 2.65rem); line-height: 1.16; overflow-wrap: anywhere; }
.customer-heading .crumbs { margin-bottom: .65rem; font-size: .95rem; }
.customer-heading .drive-search { width: min(100%, 25rem); }
.customer-main .file-panel { border-radius: 1rem; box-shadow: 0 10px 28px #1644600c; }
.customer-main .file-panel-top { padding: 1.05rem 1.15rem; }
.customer-main .file-table td { height: 4rem; }
.file-table th:last-child { min-width: 5rem; white-space: nowrap; }
.file-table th:nth-child(2) { min-width: 4.3rem; }
.customer-main .file-name { min-width: 7rem; }
.customer-main .file-name a { text-decoration: none; }
.customer-main .file-name a:hover { text-decoration: underline; }
.file-type.type-folder { position: relative; width: 1.65rem; height: 1.07rem; flex: none; border-radius: .2rem; background: #007c98; }
.type-folder::before { content: ''; position: absolute; top: -.26rem; left: 0; width: .72rem; height: .36rem; border-radius: .18rem .18rem 0 0; background: #007c98; }
.type-folder span { display: none; }
.type-document { min-width: 2.65rem; text-align: center; }
.customer-main .download { padding: .4rem .65rem; border-radius: .45rem; background: #e0f4fa; text-decoration: none; }
.customer-main .download:hover { background: #c8edf8; }
.customer-main .row-actions span { white-space: nowrap; }

@media (max-width: 630px) {
  .signin-shell { grid-template-columns: 1fr; border-radius: 1.1rem; }
  .signin-brand { gap: .55rem; padding: 1.35rem 1.6rem; }
  .signin-brand img { width: 10rem; }
  .signin-brand p { font-size: 1rem; }
  .signin-card { padding: 1.5rem 1.6rem 1.85rem; }
  .customer-name { max-width: 6rem; }
  .customer-main .file-table th, .customer-main .file-table td { padding-inline: .65rem; }
}
.customer-action { white-space: nowrap; padding: .35rem .6rem; text-decoration: none; font-weight: 700; }
.customer-account { flex-wrap: wrap; justify-content: flex-end; }
.security-notice { color: #822d08; border: 1px solid #f1cdb9; background: #fff5ef; padding: .65rem .8rem; border-radius: .5rem; }
.enrollment-key { user-select: all; overflow-wrap: anywhere; font-size: 1rem; }
.recovery-codes { margin-bottom: 1rem; user-select: all; }
.client-ips { display: flex; flex-wrap: wrap; gap: .5rem; border-top: 1px solid #e3edf0; padding: .85rem 1rem; }
.client-ips code { padding: .22rem .45rem; border-radius: .35rem; color: var(--brand-link); background: var(--brand-tint); overflow-wrap: anywhere; }
.file-table .item-time { white-space: nowrap; }
.file-table td.item-time { color: #496771; font-variant-numeric: tabular-nums; }
.lifecycle-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: .7rem; }
.client-ips p { flex-basis: 100%; margin: 0; }
.page-actions > a { margin-right: .65rem; }
.enrollment-qr { display: block; width: auto; max-width: 100%; height: auto; image-rendering: pixelated; margin: .8rem 0; border: 1px solid #dce7eb; border-radius: .65rem; background: #fff; }
.enrollment-manual { margin: .75rem 0 1rem; }
.enrollment-manual summary { color: var(--brand-link); cursor: pointer; }
.signin-card .login-restart { margin-top: .6rem; }

.client-overview, .security-grid { display: grid; align-items: start; gap: 1rem; }
.client-overview { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.security-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.client-overview > section { margin-bottom: 1.15rem; }
.client-overview .file-panel-top { min-height: 3.6rem; }
.panel-title, .panel-actions, .settings-title { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.panel-title strong, .settings-title h2 { font-size: 1.125rem; margin: 0; }
.panel-actions a { text-decoration: none; font-size: .9rem; }
.panel-actions a:hover { text-decoration: underline; }
.account-panel .file-panel-top { min-height: 4rem; }
.settings-card { padding: 1.35rem; border-color: #dce7eb; border-radius: .85rem; }
.settings-title { justify-content: space-between; margin-bottom: .85rem; }
.settings-card p { color: #496771; margin: .6rem 0 1rem; }
.danger-button { background: #a33120; color: #fff; }
.customer-context { margin: 0 0 .4rem; color: #00647c; font-size: .95rem; font-weight: 700; }
@media (max-width: 780px) {
  .client-overview, .security-grid { grid-template-columns: minmax(0, 1fr); }
  .client-overview { gap: 0; }
}

.work-heading { margin: 1.5rem 0 1.2rem; }
.work-heading h1, .drive-search + .work-heading h1 { margin: 0; }
.heading-row { display: flex; align-items: center; justify-content: space-between; gap: .65rem 1rem; flex-wrap: wrap; }
.heading-action { padding: .45rem .72rem; }
.crumbs { margin: 0 0 .65rem; font-size: .875rem; }
.crumbs ol { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; }
.crumbs li, .crumbs li + li { margin: 0; padding: 0; border: 0; display: flex; align-items: center; gap: .4rem; }
.crumbs li + li::before { content: ''; width: .35rem; height: .35rem; border: solid #78939f; border-width: 1px 1px 0 0; transform: rotate(45deg); margin-right: .12rem; }
.crumbs a { text-decoration: none; border-radius: .35rem; padding: .18rem .32rem; color: var(--brand-link); font-weight: 650; }
.crumbs a:hover { background: #e1f1f5; }
.view-tabs { display: flex; align-items: center; gap: .15rem; padding: .2rem; border: 1px solid #dce8ee; border-radius: .65rem; background: #f2f6f8; }
.panel-actions .view-tabs a { white-space: nowrap; color: #3e5967; text-decoration: none; font-weight: 650; padding: .32rem .65rem; border-radius: .44rem; }
.panel-actions .view-tabs a:hover { background: #e5eff4; }
.panel-actions .view-tabs [aria-current] { background: #fff; color: #00586e; box-shadow: 0 1px 3px #1f445825; }
.account-panel .panel-actions > button { padding: .46rem .78rem; font-size: .94rem; }
