@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #f8fafc;
  color: #0f172a;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* --- Card --- */
.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  padding: 1.75rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  height: 2.75rem;
  padding: 0 1.25rem;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  user-select: none;
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
}

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

.btn-primary {
  background: #0f172a;
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: #1e293b;
}

.btn-outline {
  background: transparent;
  color: #334155;
  border-color: #e2e8f0;
}
.btn-outline:hover:not(:disabled) {
  background: #f1f5f9;
}

.btn-danger {
  background: transparent;
  color: #dc2626;
  border-color: #fecaca;
}
.btn-danger:hover:not(:disabled) {
  background: #dc2626;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: #64748b;
  border: none;
}
.btn-ghost:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-sm {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
}

.btn-xs {
  height: 1.75rem;
  padding: 0 0.625rem;
  font-size: 0.7rem;
}

.btn svg {
  flex-shrink: 0;
}

/* --- Inputs --- */
input[type="text"],
input[type="url"],
input[type="password"] {
  width: 100%;
  height: 2.75rem;
  padding: 0 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 0.875rem;
  font-family: inherit;
  color: #0f172a;
  transition: border-color 0.15s;
  outline: none;
}

input:focus {
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15,23,42,0.08);
}

input::placeholder {
  color: #94a3b8;
}

select {
  width: 100%;
  height: 2.75rem;
  padding: 0 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 0.875rem;
  font-family: inherit;
  color: #0f172a;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

select:focus {
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15,23,42,0.08);
}

/* --- Form Group --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  padding: 0.3rem 0.7rem;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1;
  background: #0f172a;
  color: #fff;
}

.badge-secondary {
  background: #f1f5f9;
  color: #334155;
}

/* --- Table --- */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  padding: 0.875rem 1.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

tbody td {
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem;
  border-bottom: 1px solid #f1f5f9;
}

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

tbody tr:hover {
  background: #f1f5f9;
}

/* --- Muted text --- */
.text-muted {
  color: #64748b;
  font-size: 0.875rem;
}

/* --- Code --- */
code {
  font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  background: #f1f5f9;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 1.7;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* --- Alert --- */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

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

/* --- Empty state --- */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: #64748b;
  font-size: 0.875rem;
}
