* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f1f5f9;
  color: #0f172a;
  min-height: 100vh;
}

.page { max-width: 960px; margin: 0 auto; padding: 20px 16px 48px; }

.header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.logo {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #25f4ee);
  color: #fff; font-weight: 800; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}

h1 { font-size: 1.35rem; font-weight: 800; }
h2 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.header p { color: #64748b; font-size: 0.85rem; margin-top: 4px; }
.header code { background: #e2e8f0; padding: 1px 6px; border-radius: 4px; font-size: 0.8rem; }

.link-home {
  margin-left: auto;
  color: #2563eb;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.hint { color: #94a3b8; font-size: 0.85rem; margin-bottom: 12px; }

.field { display: block; margin-bottom: 14px; font-size: 0.85rem; font-weight: 600; color: #475569; }
.field input {
  display: block; width: 100%; margin-top: 6px;
  padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px;
  font-size: 0.95rem; font-weight: 400;
}
.field-hint { display: block; font-weight: 400; color: #94a3b8; font-size: 0.78rem; margin-top: 4px; }

.message { padding: 8px 10px; border-radius: 8px; font-size: 0.85rem; margin-top: 8px; }
.message.error { background: #fef2f2; color: #991b1b; }
.message.ok { background: #ecfdf5; color: #065f46; }

.btn-primary, .btn-secondary, .btn-muted, .btn-danger {
  border: none; border-radius: 10px; padding: 10px 16px;
  font-weight: 600; cursor: pointer; font-size: 0.9rem;
}
.btn-primary { background: #2563eb; color: #fff; width: 100%; }
.btn-secondary { background: #e2e8f0; color: #1e293b; }
.btn-muted { background: transparent; color: #64748b; border: 1px solid #cbd5e1; }
.btn-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; padding: 6px 10px; font-size: 0.8rem; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.sum-label { display: block; font-size: 0.72rem; text-transform: uppercase; color: #94a3b8; }
.summary-grid strong { font-size: 1.1rem; }

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

.settings-form .btn-primary { width: auto; margin-top: 4px; }

.table-wrap { overflow-x: auto; }
.files-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.files-table th, .files-table td {
  text-align: left; padding: 10px 8px; border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}
.files-table th { color: #64748b; font-weight: 600; font-size: 0.75rem; text-transform: uppercase; }
.file-name { font-family: ui-monospace, monospace; font-size: 0.78rem; word-break: break-all; }
.file-meta { color: #64748b; font-size: 0.75rem; margin-top: 2px; }

@media (max-width: 640px) {
  .summary-grid { grid-template-columns: 1fr; }
}
