:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-subtle: #f8f9fa;
  --border: #e5e7eb;
  --border-strong: #dadce0;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --blue: #1a73e8;
  --blue-hover: #1557b0;
  --green: #137333;
  --green-bg: #e6f4ea;
  --amber: #b06000;
  --amber-bg: #fef7e0;
  --red: #c5221f;
  --red-bg: #fce8e6;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 48px 24px 56px;
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: "Google Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

.container {
  max-width: 960px;
  margin: 0 auto;
}

.header {
  text-align: center;
  margin-bottom: 36px;
}

.drive-logo {
  width: 52px;
  height: 52px;
  display: inline-block;
  margin-bottom: 14px;
}

h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.subtitle {
  margin: 8px 0 0;
  font-size: 14.5px;
  color: var(--text-secondary);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 22px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.badge.ready {
  background: var(--green-bg);
  border-color: #ceead6;
  color: var(--green);
}

.badge.warn {
  background: var(--amber-bg);
  border-color: #fde293;
  color: var(--amber);
}

.badge.error {
  background: var(--red-bg);
  border-color: #fad2cf;
  color: var(--red);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.row-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.input,
.select {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-primary);
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus,
.select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--blue);
  color: #ffffff;
  border: 1px solid var(--blue);
}

.btn-primary:hover:not(:disabled) {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
  box-shadow: 0 1px 3px rgba(26, 115, 232, 0.25);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-subtle);
  border-color: #bdc1c6;
}

.btn-danger {
  background: var(--red);
  color: #ffffff;
  border: 1px solid var(--red);
}

.btn-danger:hover:not(:disabled) {
  background: #a50e0e;
  border-color: #a50e0e;
}

.btn-link {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.btn-link:hover {
  background: var(--surface-subtle);
  color: var(--text-primary);
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  gap: 4px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.seg-btn.active {
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.helper-note {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.tip-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--amber-bg);
  border: 1px solid #fde293;
  color: #7c4a03;
  font-size: 12.5px;
  line-height: 1.5;
}

.tip-box code {
  background: rgba(255, 255, 255, 0.7);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.alert-banner {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--red-bg);
  border: 1px solid #fad2cf;
  color: var(--red);
  font-size: 13.5px;
}

.actions-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.phase-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.phase-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.phase-pill.active {
  background: #e8f0fe;
  border-color: #d2e3fc;
  color: var(--blue);
}

.phase-pill.done {
  background: var(--green-bg);
  border-color: #ceead6;
  color: var(--green);
}

.phase-pill.error {
  background: var(--red-bg);
  border-color: #fad2cf;
  color: var(--red);
}

.progress-message {
  font-size: 13.5px;
  color: var(--text-primary);
}

.progress-pct {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: #f1f3f4;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--blue);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.progress-fill.done {
  background: var(--green);
}

.progress-fill.error {
  background: var(--red);
}

.log-feed {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  max-height: 150px;
  overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-secondary);
}

.log-line {
  padding: 2px 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.log-line.error {
  color: var(--red);
}

.log-time {
  color: #80868b;
  margin-right: 8px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.table-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.search-input {
  width: 260px;
  max-width: 100%;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-primary);
  background: #ffffff;
  outline: none;
}

.search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-primary);
  background: #ffffff;
  outline: none;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

th {
  padding: 10px 12px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px;
  border-bottom: 1px solid #f1f3f4;
  vertical-align: top;
  word-break: break-word;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: #fafbfc;
}

.col-check {
  width: 38px;
  text-align: center;
}

.file-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-secondary);
}

.renamed-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: #e8f0fe;
  color: var(--blue);
  vertical-align: middle;
}

.folder-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.empty-state {
  text-align: center;
  padding: 36px 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(32, 33, 36, 0.42);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.modal h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
}

.modal p {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.footer {
  margin-top: 28px;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  margin: 0 10px;
}

.footer a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.legal-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.legal-card h2 {
  margin: 24px 0 8px;
  font-size: 16.5px;
  font-weight: 600;
}

.legal-card h2:first-of-type {
  margin-top: 8px;
}

.legal-card p,
.legal-card li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.hidden {
  display: none !important;
}
