:root {
  --blue: #1a5fb4;
  --blue-dark: #12406e;
  --gray: #f4f6f8;
  --border: #d9dee3;
  --danger: #c0392b;
  --text: #23292f;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0;
  background: var(--gray);
  color: var(--text);
}

header {
  background: var(--blue);
  color: white;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1 { font-size: 18px; margin: 0; }
header a { color: white; text-decoration: none; font-size: 13px; font-weight: 600; }

.badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: #2ecc7133;
  color: #d6ffe6;
}

.panel {
  max-width: 900px;
  margin: 24px auto;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
}

nav.tabs {
  max-width: 900px;
  margin: 16px auto 0;
  display: flex;
  gap: 8px;
}
nav.tabs a {
  padding: 8px 14px;
  border-radius: 6px 6px 0 0;
  background: white;
  border: 1px solid var(--border);
  border-bottom: none;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
nav.tabs a.active { background: var(--blue); color: white; }

form { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; }
label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 600;
  gap: 4px;
  color: #4a5560;
}
label.checkbox { flex-direction: row; align-items: center; gap: 6px; }

input, select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  min-width: 180px;
}

button, .btn {
  background: var(--blue);
  color: white;
  border: none;
  padding: 9px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}
button:hover, .btn:hover { background: var(--blue-dark); }
button.danger, .btn.danger { background: var(--danger); }
button.danger:hover, .btn.danger:hover { background: #922419; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
#currentPath, .path-box {
  font-family: monospace;
  background: var(--gray);
  padding: 6px 10px;
  border-radius: 6px;
  flex: 1;
  min-width: 200px;
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 14px; }
tr:hover td { background: #f0f4f8; }
td.name a { color: var(--blue); text-decoration: none; font-weight: 600; }
td.name a:hover { text-decoration: underline; }

.upload-status {
  margin-bottom: 16px;
  padding: 10px 12px;
  background: var(--gray);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.upload-status-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #4a5560;
  margin-bottom: 6px;
}
.upload-filename {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}
.upload-phase {
  font-weight: 400;
  color: #8a94a0;
  margin-left: 8px;
}
.progress-bar {
  width: 100%;
  height: 10px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--blue);
  border-radius: 999px;
  transition: width 0.15s ease-out;
}
.progress-bar-fill.error { background: var(--danger); }

.msg { font-size: 13px; margin-top: 10px; min-height: 16px; padding: 10px; border-radius: 6px; }
.msg.error { color: var(--danger); background: #fdecea; }
.msg.ok { color: #1c7c3c; background: #e9f9ee; }

.sync-buttons { display: flex; gap: 10px; }
pre.log {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 12px;
  border-radius: 6px;
  font-size: 12px;
  overflow-x: auto;
  max-height: 300px;
}
