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

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 15px;
  background: #f5f5f5;
  color: #111;
  min-height: 100vh;
}

/* ── Layout ──────────────────────────────────────────── */
.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

nav h1 { font-size: 18px; font-weight: 600; }

/* ── Card ─────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 28px;
  margin-bottom: 24px;
}

.card h2 { font-size: 16px; margin-bottom: 20px; }

/* ── Login wrapper ────────────────────────────────────── */
.login-wrap {
  max-width: 380px;
  margin: 80px auto 0;
}

.login-wrap h1 { font-size: 20px; margin-bottom: 24px; text-align: center; }

/* ── Form elements ────────────────────────────────────── */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

label { font-size: 13px; font-weight: 500; color: #555; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"] {
  padding: 9px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
  outline: none;
}

input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.15); }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary   { background: #3b82f6; color: #fff; }
.btn-primary:hover { background: #2563eb; }
.btn-danger    { background: #ef4444; color: #fff; }
.btn-danger:hover  { background: #dc2626; }
.btn-success   { background: #22c55e; color: #fff; }
.btn-success:hover { background: #16a34a; }
.btn-ghost     { background: transparent; color: #555; border: 1px solid #d0d0d0; }
.btn-ghost:hover   { background: #f0f0f0; }
.btn-sm        { padding: 5px 10px; font-size: 13px; }
.btn-full      { width: 100%; justify-content: center; }

/* ── Table ────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }

th, td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e8e8e8;
  font-size: 14px;
}

th { font-weight: 600; font-size: 12px; color: #777; text-transform: uppercase; letter-spacing: .04em; }

tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

/* ── Status badge ─────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.badge-active  { background: #dcfce7; color: #15803d; }
.badge-deleted { background: #fee2e2; color: #b91c1c; }

/* ── Error / success messages ─────────────────────────── */
.msg {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}
.msg-error   { background: #fee2e2; color: #b91c1c; }
.msg-success { background: #dcfce7; color: #15803d; }

/* ── Short URL display ────────────────────────────────── */
.short-url { font-family: monospace; font-size: 13px; color: #3b82f6; }

/* ── Modal overlay ────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 10px;
  padding: 28px;
  width: 360px;
  max-width: 95vw;
}
.modal h3 { margin-bottom: 18px; font-size: 16px; }
