:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --border: #d9dde3;
  --text: #1c2330;
  --muted: #667085;
  --accent: #1f6feb;
  --accent-text: #ffffff;
  --danger: #b42318;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header h1 {
  margin: 0;
  font-size: 18px;
}

.account {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.centered {
  max-width: 420px;
  margin: 64px auto;
  text-align: center;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
  flex: 1 1 160px;
}

.field.actions {
  flex-direction: row;
  gap: 8px;
  flex: 0 0 auto;
}

label {
  font-size: 13px;
  color: var(--muted);
}

input, select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: inherit;
}

button {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: inherit;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

button:hover:not(:disabled) { background: #f0f2f5; }
button:disabled { opacity: 0.5; cursor: default; }

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

button.primary:hover:not(:disabled) { background: #1a5fd0; }

.link-button {
  border: none;
  background: none;
  color: var(--accent);
  padding: 0;
  text-decoration: underline;
}

.link-button:hover { background: none; }

.status {
  min-height: 1.6em;
  margin: 16px 2px;
  color: var(--muted);
  font-size: 14px;
}

.status.error { color: var(--danger); }

.table-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

th {
  background: #fafbfc;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
}

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

td.wrap { white-space: normal; min-width: 180px; }

.file-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.file-links a {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
}

.file-links a:hover { background: #f0f2f5; }

.file-links .size {
  color: var(--muted);
  margin-left: 4px;
  font-size: 12px;
}

.empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.more {
  margin-top: 20px;
  text-align: center;
}
