@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600&family=Inter:wght@400;500;600&display=swap');

:root {
  --ink: #171A2B;
  --paper: #F3F4F7;
  --panel: #FFFFFF;
  --accent: #3F5EFB;
  --accent-deep: #2A3FC4;
  --accent-2: #17B890;
  --line: #DCDFE6;
  --muted: #6B7280;
  --danger: #C43D3D;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.4em;
}

a { color: var(--accent-deep); }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

.topnav a {
  margin-left: 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.topnav a:hover { color: var(--ink); }

.center-column {
  max-width: 460px;
  margin: 64px auto;
  padding: 0 20px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 32px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.96rem;
  background: #fff;
  color: var(--ink);
}

.field input:focus, .field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--accent-deep); }
.btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.secondary:hover { border-color: var(--ink); }
.btn.small { padding: 6px 14px; font-size: 0.85rem; }

.msg {
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.msg.error { background: #FBEAEA; color: var(--danger); border: 1px solid #F1C9C9; }
.msg.success { background: #E8F8F3; color: #0F7A5C; border: 1px solid #BEE9DA; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.82rem;
  background: #FAFAFC;
}

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

.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 40px 0 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.muted { color: var(--muted); font-size: 0.9rem; }

.link-list {
  display: grid;
  gap: 12px;
}

.link-row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.link-row .url {
  font-family: monospace;
  font-size: 0.82rem;
  color: var(--accent-deep);
  word-break: break-all;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}

.hero {
  text-align: center;
  padding: 24px 0 8px;
}

.hero h1 { font-size: 1.9rem; }

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 40px 0;
}
