/* FAMOUS 備份與還原 — additive styles only; does not replace live index-LwDfVcNm.css */
/* 2026-12-02 介面優化：收緊手機層次，令備份清單更接近首屏。不改備份行為。 */

.nav-item .nav-new {
  margin-left: auto;
  background: #f4efe5;
  color: #8d7753;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 9px;
  letter-spacing: 0.5px;
}
.nav-item.active .nav-new {
  background: #3a372f;
  color: #d8c7a3;
}

.notice-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.notice-row svg { margin-top: 2px; color: #b09a72; flex-shrink: 0; }

/* Scope typography tightening to this page only. */
.backup-page .page-heading { margin-bottom: 12px; }
.backup-page .page-heading h1 { margin-bottom: 6px; }
.backup-page .notice {
  margin: 0 0 12px;
  padding: 8px 12px;
  line-height: 1.55;
}
.backup-page .panel { margin: 0; }
.backup-page .panel-body { padding: 0 21px 16px; }

.backup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.feature-list {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.feature-list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 11px;
  color: #726b60;
  line-height: 1.7;
  margin-bottom: 8px;
}
.feature-list li svg { color: #a08b68; margin-top: 2px; flex-shrink: 0; }

/* Compact one-glance summary; meaning kept, less vertical stack. */
.feature-list.feature-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.feature-list.feature-compact li {
  margin: 0;
  font-size: 10px;
  line-height: 1.3;
  color: #5e584e;
  background: #faf9f6;
  border: 1px solid #eeeae3;
  border-radius: 100px;
  padding: 5px 9px 5px 7px;
  align-items: center;
  gap: 5px;
}
.feature-list.feature-compact li svg { margin-top: 0; }

.path-box {
  font-size: 10px;
  color: #6e6150;
  background: #faf9f6;
  border: 1px solid #eeeae3;
  border-radius: 5px;
  padding: 8px 11px;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: normal;
  line-break: strict;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.path-box strong {
  display: block;
  color: #9a9184;
  font-weight: 400;
  font-size: 9px;
  margin-bottom: 2px;
  letter-spacing: 0.5px;
}
.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin-bottom: 12px;
}
.meta-item { font-size: 11px; color: #726b60; }
.meta-item label {
  display: block;
  font-size: 9px;
  color: #9a9184;
  margin-bottom: 3px;
  letter-spacing: 0.4px;
}
.meta-item strong { font-weight: 500; color: #3d3932; }
.disk-label {
  display: block;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.disk-checked {
  display: block;
  margin-top: 3px;
  color: #a69b8b;
  font-size: 9px;
  line-height: 1.45;
}
.switch {
  width: 36px;
  height: 20px;
  border-radius: 20px;
  border: 0;
  background: #d8d3c8;
  position: relative;
  flex-shrink: 0;
  padding: 0;
  cursor: pointer;
}
.switch.on { background: #20201e; }
.switch:disabled { opacity: 0.55; cursor: default; }
.switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px #00000022;
  pointer-events: none;
}
.switch.on .switch-knob { left: 19px; }
.schedule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.schedule-status {
  font-size: 11px;
  color: #726b60;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.schedule-head .btn { flex-shrink: 0; }
.warn-note {
  border: 1px solid #ebd1ca;
  background: #fdf3ef;
  border-radius: 5px;
  padding: 8px 10px;
  color: #a05540;
  font-size: 10px;
  line-height: 1.5;
  margin: 0 0 0;
  display: flex;
  gap: 7px;
  align-items: flex-start;
}
.warn-note svg { color: #b54a42; margin-top: 1px; flex-shrink: 0; }
.success-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid #d5e3d3;
  background: #f3f7f1;
  padding: 15px 16px;
  border-radius: 5px;
  margin-bottom: 16px;
  color: #5d7358;
  font-size: 12px;
  line-height: 1.7;
}
.success-banner strong { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; color: #3e5240; }
.success-banner .detail { font-size: 11px; color: #65816b; word-break: keep-all; overflow-wrap: normal; line-break: strict; }
.success-banner .detail span { display: block; }
.error-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid #ebd1ca;
  background: #fdf3ef;
  padding: 15px 16px;
  border-radius: 5px;
  margin-bottom: 16px;
  color: #a05540;
  font-size: 12px;
  line-height: 1.7;
}
.error-banner strong { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.progress-banner {
  border: 1px solid #e6dbc6;
  background: #f4efe5;
  color: #8d7753;
  padding: 15px 16px;
  border-radius: 5px;
  margin-bottom: 16px;
  font-size: 12px;
  line-height: 1.7;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.progress-banner strong { display: block; font-weight: 600; margin-bottom: 4px; }
.progress-track {
  height: 6px;
  background: #e7dfd0;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 12px;
  position: relative;
}
.progress-bar {
  position: absolute;
  height: 100%;
  width: 38%;
  background: #b5a07c;
  border-radius: 5px;
  animation: backup-indet 1.4s ease-in-out infinite;
}
@keyframes backup-indet {
  0% { left: -38%; }
  100% { left: 100%; }
}
.backup-table-wrap { overflow: hidden; max-width: 100%; }
.backup-table { table-layout: fixed; width: 100%; }
.backup-table col.col-file { width: 38%; }
.backup-table col.col-time { width: 22%; }
.backup-table col.col-size { width: 16%; }
.backup-table col.col-type { width: 12%; }
.backup-table col.col-action { width: 12%; }
.backup-table th:last-child, .backup-table td:last-child {
  width: 88px;
  text-align: right;
  white-space: nowrap;
}
.backup-table .table-main {
  display: block;
  color: #3d3932;
  font-weight: 500;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  line-break: strict;
}
.backup-table .table-sub {
  display: block;
  color: #a69b8b;
  font-size: 9px;
  margin-top: 4px;
  word-break: keep-all;
  overflow-wrap: normal;
  line-break: strict;
  white-space: normal;
  line-height: 1.6;
}
.list-summary {
  color: #a79a87;
  font-size: 10px;
  margin: 0;
  padding: 10px 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
  border-top: 1px solid #f1eee8;
}
.list-summary-count {
  margin: 0;
  color: #5e584e;
  font-weight: 500;
  font-size: 11px;
}
.list-summary-rule {
  margin: 0;
  color: #a79a87;
  font-size: 10px;
  line-height: 1.65;
  max-width: 36em;
}
.empty-bin {
  padding: 18px 20px;
  font-size: 11px;
  color: #a39785;
  line-height: 1.8;
  display: flex;
  align-items: center;
  gap: 10px;
}
.empty-bin svg { color: #b9a78a; }
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.confirm-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid #e7e5df;
  border-radius: 5px;
  background: #fff;
  font-size: 11px;
  color: #5a5042;
  line-height: 1.7;
  margin-bottom: 8px;
  cursor: pointer;
}
.confirm-check input { margin-top: 3px; accent-color: #20201e; }
.restore-id {
  background: #fff;
  border: 1px solid #eeeae3;
  border-radius: 5px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 11px;
  color: #726b60;
  line-height: 1.7;
}
.restore-id strong { display: block; color: #3d3932; font-weight: 500; margin-bottom: 4px; }
.sha {
  font-variant-numeric: tabular-nums;
  word-break: break-all;
  font-size: 9px;
  color: #a69b8b;
}

@media (max-width: 960px) {
  .backup-grid { grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
  /* Keep schedule facts in two columns so the card stays scannable on a phone. */
  .meta-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .backup-page .page-heading { margin-bottom: 8px; }
  .backup-page .page-heading h1 { font-size: 21px; margin-bottom: 4px; }
  .backup-page .page-heading p { font-size: 10px; }
  .backup-page .eyebrow { margin-bottom: 4px; }
  .backup-page .notice { font-size: 10px; padding: 7px 10px; margin-bottom: 8px; }
  .backup-page .panel-body { padding: 0 16px 12px; }
  .backup-page .panel-header { padding: 12px 16px 8px; }
  .backup-page .panel-subtitle { margin-top: 3px; }
  .path-box { margin-bottom: 8px; padding: 6px 10px; }
  .feature-list.feature-compact { margin-bottom: 8px; }
  .meta-grid { gap: 7px 12px; margin-bottom: 8px; }
  .schedule-head { margin-bottom: 8px; }
  .list-summary { padding: 8px 16px 10px; }
  .backup-grid { gap: 10px; margin-bottom: 10px; }
}


/* Google Drive status — 2026-12-02 */
.drive-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #eeeae3;
  background: #fff;
  border-radius: 7px;
  padding: 9px 12px;
  margin: 0 0 10px;
}
.drive-card-main {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.drive-card-main svg { margin-top: 1px; flex-shrink: 0; }
.drive-card strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #3d3932;
  line-height: 1.35;
}
.drive-card p {
  margin: 2px 0 0;
  font-size: 10px;
  line-height: 1.45;
  color: #7a7368;
}
.drive-card .btn { flex-shrink: 0; }
.drive-card.unlinked {
  border-color: #e6dbc6;
  background: #f4efe5;
}
.drive-card.unlinked svg { color: #8d7753; }
.drive-card.unlinked strong { color: #6f5c3c; }
.drive-card.linked {
  border-color: #d5e3d3;
  background: #f3f7f1;
}
.drive-card.linked svg { color: #5d7358; }
.drive-card.linked strong { color: #3e5240; }
.btn-text {
  background: none;
  border: 0;
  padding: 0;
  color: #8a8378;
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}
.path-line { display: block; margin-top: 2px; }
.path-line + .path-line { margin-top: 3px; }
.path-k {
  display: inline-block;
  white-space: nowrap;
  margin-right: 8px;
  color: #9a9184;
  font-size: 9px;
  letter-spacing: 0.3px;
}
.note-quiet {
  border: 1px solid #eeeae3;
  background: #faf9f6;
  border-radius: 5px;
  padding: 8px 10px;
  color: #726b60;
  font-size: 10px;
  line-height: 1.5;
  margin: 0;
  display: flex;
  gap: 7px;
  align-items: flex-start;
}
.note-quiet svg { color: #a08b68; margin-top: 1px; flex-shrink: 0; }
.warn-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid #ead9b8;
  background: #f8f3e8;
  padding: 13px 14px;
  border-radius: 5px;
  margin-bottom: 12px;
  color: #8a6a32;
  font-size: 12px;
  line-height: 1.7;
}
.warn-banner strong { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; color: #6d5324; }
.warn-banner .detail { font-size: 11px; color: #8a6a32; }
.warn-banner .banner-actions { margin-top: 10px; }
.progress-bar.determinate {
  animation: none;
  left: 0;
  width: var(--progress, 44%);
  background: #b5a07c;
}
.progress-meta {
  margin-top: 8px;
  font-size: 10px;
  color: #8d7753;
  font-variant-numeric: tabular-nums;
}
.drive-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 5px;
  font-size: 9px;
  letter-spacing: 0.2px;
  border-radius: 100px;
  padding: 2px 7px;
  border: 1px solid #d5e3d3;
  background: #f3f7f1;
  color: #4f6a4c;
  width: fit-content;
}
.drive-badge.pending {
  border-color: #e6dbc6;
  background: #f4efe5;
  color: #8d7753;
}
.drive-badge.failed {
  border-color: #ebd1ca;
  background: #fdf3ef;
  color: #a05540;
}
.auth-steps {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.auth-steps li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 11px;
  color: #5a5042;
  line-height: 1.55;
  margin-bottom: 8px;
  counter-increment: step;
}
.auth-steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 50%;
  background: #20201e;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.auth-field { margin-top: 4px; }

@media (max-width: 760px) {
  .backup-page .drive-card { margin-bottom: 8px; padding: 8px 10px; }
  .backup-page .warn-banner { margin-bottom: 10px; padding: 12px; }
}


/* 2026-12-02 UI polish: status chips, path wrap, disk meter, stacked list. Presentation only. */
.backup-status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.backup-status-chip {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  line-height: 1.3;
  color: #5e584e;
  background: #fff;
  border: 1px solid #eeeae3;
  border-radius: 100px;
  padding: 5px 9px;
  font-weight: 500;
}
.backup-status-chip.warn {
  border-color: #e6dbc6;
  background: #f4efe5;
  color: #8d7753;
}
.backup-status-chip.ok {
  border-color: #d5e3d3;
  background: #f3f7f1;
  color: #4f6a4c;
}
.path-breakable,
.backup-filename,
.backup-filepath {
  word-break: keep-all;
  overflow-wrap: normal;
  line-break: strict;
}
.backup-path-details {
  margin-top: 4px;
}
.backup-path-details summary {
  cursor: pointer;
  font-size: 9px;
  color: #8a8378;
  width: fit-content;
  list-style: none;
  user-select: none;
}
.backup-path-details summary::-webkit-details-marker,
.backup-path-details summary::marker { display: none; content: ""; }
.backup-path-details summary::after { content: " ▸"; font-size: 8px; }
.backup-path-details[open] summary::after { content: " ▾"; }
.backup-filename,
.backup-filepath {
  display: block;
  font-size: 9px;
  color: #8a7d6c;
  line-height: 1.55;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.disk-meter {
  height: 6px;
  background: #eeeae3;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 6px;
  max-width: 200px;
}
.disk-meter-bar {
  display: block;
  height: 100%;
  min-width: 0;
  background: #b5a07c;
  border-radius: 5px;
}
.warn-note-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.warn-note-body .btn { flex-shrink: 0; }

@media (max-width: 760px) {
  .backup-page .backup-status-bar { margin-bottom: 8px; }
  .backup-table-wrap { overflow: visible; }
  .backup-table col { width: auto; }
  .backup-table thead { display: none; }
  .backup-table,
  .backup-table tbody,
  .backup-table tr,
  .backup-table td {
    display: block;
    width: 100%;
  }
  .backup-table tr.backup-row {
    padding: 12px 16px 14px;
    border-bottom: 1px solid #f1eee8;
  }
  .backup-table td,
  .backup-table .data-table td,
  .data-table.backup-table td {
    padding: 0;
    width: 100% !important;
    text-align: left !important;
    white-space: normal !important;
    border-bottom: none;
  }
  .backup-table td.td-file .table-main {
    font-size: 14px;
    letter-spacing: 0.02em;
  }
  .backup-table td.td-time,
  .backup-table td.td-size,
  .backup-table td.td-type {
    display: inline-block;
    width: auto !important;
    margin-right: 10px;
    margin-top: 6px;
    vertical-align: baseline;
  }
  .backup-table td.td-time .table-main,
  .backup-table td.td-size .table-main {
    font-weight: 400;
    font-size: 11px;
    color: #726b60;
  }
  .backup-table td.td-time .table-sub {
    display: inline;
    margin: 0 0 0 4px;
  }
  .backup-table td.td-size .table-sub { display: none; }
  .backup-table td.td-action {
    margin-top: 10px;
    text-align: left !important;
    width: auto !important;
  }
  .list-summary { padding: 10px 16px 12px; }
}
