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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f3f4f6;
  color: #111827;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #111827;
  color: #f9fafb;
}

.brand {
  font-weight: bold;
  font-size: 18px;
  color: #f9fafb;
}

.brand span {
  color: #60a5fa;
}

.btn-link {
  margin-left: 10px;
  color: #e5e7eb;
  font-size: 14px;
}

.btn-link:hover {
  color: #ffffff;
}

.page {
  padding: 20px;
  min-height: calc(100vh - 80px);
}

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

.card {
  background: #ffffff;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.centered {
  max-width: 420px;
  margin: 40px auto;
}

h1 {
  font-size: 24px;
  margin-bottom: 15px;
}

h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.form label {
  display: block;
  margin: 10px 0 4px;
  font-size: 14px;
}

.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form textarea,
.form select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.form textarea {
  resize: vertical;
}

.form button {
  margin-top: 15px;
}

.btn-primary,
.btn-secondary,
.btn-disabled {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 4px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: #2563eb;
  color: white;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: #6b7280;
  color: white;
}

.btn-disabled {
  background: #9ca3af;
  color: #f9fafb;
  cursor: not-allowed;
}

.muted {
  color: #6b7280;
}

.small {
  font-size: 12px;
}

.alert {
  padding: 8px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 14px;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-size: 14px;
}

.table th,
.table td {
  border: 1px solid #e5e7eb;
  padding: 8px;
  text-align: left;
}

.table th {
  background: #f9fafb;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.tool-card {
  background: #ffffff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tool-logo {
  max-width: 80px;
  max-height: 80px;
  object-fit: contain;
  margin-bottom: 10px;
}

.tool-logo-large {
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
  margin-bottom: 15px;
}

.tool-actions {
  margin-top: 10px;
}

.footer {
  text-align: center;
  padding: 12px 0;
  font-size: 13px;
  color: #9ca3af;
}

.menu-list {
  list-style: none;
  padding-left: 0;
}

.menu-list li {
  margin: 8px 0;
}

.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-block {
  background: #111827;
  color: #e5e7eb;
  padding: 10px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-all;
}

.topbar .user-info {
  font-size: 14px;
  margin-right: 8px;
}

@media (max-width: 600px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .topbar-right {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
}
