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

:root {
  --accent:  #0070d2;
  --border:  #e2e4e9;
  --bg:      #f5f6f8;
  --text:    #1a1d23;
  --muted:   #6b7280;
  --radius:  8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg);
  min-height: 100vh;
}

.btn {
  display: inline-flex; align-items: center;
  border: none; border-radius: var(--radius);
  font-size: 13px; font-weight: 500;
  padding: 6px 14px; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; padding: 9px 20px; font-size: 14px; }
.btn-primary:hover { background: #005fb2; }
.btn-ghost   { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--border); color: var(--text); }
.btn-sm { font-size: 12px; padding: 4px 10px; }
.hidden { display: none !important; }
.error  { color: #d93025; font-size: 12px; margin-top: 8px; }
.muted  { color: var(--muted); font-size: 13px; margin-bottom: 16px; }

/* Top bar */
.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px; background: #fff; border-bottom: 1px solid var(--border);
}
.logo { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.logo-icon { width: 28px; height: 28px; flex-shrink: 0; }

/* Layout */
.page { min-height: 100vh; display: flex; flex-direction: column; }
.main {
  flex: 1; max-width: 640px; width: 100%;
  margin: 40px auto; padding: 0 24px;
}

/* Sections */
.section { margin-bottom: 8px; }
.section h2 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }

.divider {
  border-top: 1px solid var(--border); margin: 32px 0;
}

/* Services list */
.services-list { display: flex; flex-direction: column; gap: 10px; }

.service-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
  text-decoration: none; color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.service-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,112,210,.1);
}
.service-card-title { font-weight: 500; font-size: 14px; }
.service-card-meta  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.service-card-arrow { color: var(--muted); font-size: 18px; }

.loading { color: var(--muted); font-size: 13px; padding: 8px 0; }
.empty   { color: var(--muted); font-size: 13px; font-style: italic; }

/* Create form */
#create-form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 13px; font-weight: 500; color: var(--muted); }
.field input {
  padding: 8px 10px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px;
  background: #fff; color: var(--text);
}
.field input:focus { outline: none; border-color: var(--accent); }

/* Spinner */
.spinner {
  width: 20px; height: 20px; margin-top: 12px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
