
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f0f2f5;
  color: #1a1a1a;
  min-height: 100vh;
}

/* HEADER */
.header {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 860px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { font-size: 20px; }
.logo-text { font-size: 16px; color: #555; }
.logo-text strong { color: #1a1a1a; }
.header-stats { display: flex; gap: 16px; font-size: 13px; color: #888; }

/* MAIN */
.main { max-width: 860px; margin: 32px auto; padding: 0 16px; display: flex; flex-direction: column; gap: 24px; }

/* CARD */
.card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 32px;
  border: 1px solid #e8e8e8;
}
.card-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
}
.card-header h2 { font-size: 20px; font-weight: 700; }

/* BADGE */
.badge-green {
  background: #e6f9f0; color: #1a8a56;
  font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
}

/* STEPS */
.steps {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 6px;
}
.step {
  width: 36px; height: 36px; border-radius: 50%;
  background: #f0f0f0; border: 2px solid #e0e0e0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #bbb;
  position: relative; transition: all 0.3s; flex-shrink: 0;
}
.step .step-check { display: none; }
.step .step-num   { display: block; }
.step.active {
  background: #1a8a56; border-color: #1a8a56; color: #fff;
}
.step.active .step-check { display: block; }
.step.active .step-num   { display: none; }
.step-line {
  flex: 1; height: 4px; background: #e0e0e0; transition: background 0.3s;
}
.step-line.active { background: #1a8a56; }
.step-labels {
  display: flex; justify-content: space-between;
  font-size: 12px; color: #999; margin-bottom: 24px;
  padding: 0 2px;
}

/* FORM */
.form-section { margin-bottom: 20px; }
label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 6px; }
.required { color: #e53935; }
input[type=text], input[type=url], textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid #e0e0e0; border-radius: 10px;
  font-size: 14px; color: #1a1a1a; background: #fafafa;
  transition: border 0.2s;
  outline: none;
}
input:focus, textarea:focus { border-color: #1a8a56; background: #fff; }
textarea { resize: vertical; }
.hint { font-size: 12px; color: #aaa; margin-top: 5px; }

.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; }

.input-prefix-row {
  display: flex; align-items: center;
  border: 1.5px solid #e0e0e0; border-radius: 10px;
  background: #fafafa; overflow: hidden;
}
.input-prefix {
  padding: 10px 12px; background: #f0f0f0;
  font-size: 13px; color: #888; white-space: nowrap;
  border-right: 1.5px solid #e0e0e0;
}
.input-prefix-row input {
  border: none; background: transparent; border-radius: 0; flex: 1;
}
.input-prefix-row input:focus { border: none; }

/* BUTTONS */
.btn-primary {
  background: #1a1a1a; color: #fff;
  border: none; border-radius: 10px;
  padding: 12px 28px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover  { background: #333; }
.btn-primary:active { transform: scale(0.98); }

.btn-outline {
  background: #fff; color: #1a8a56;
  border: 1.5px solid #1a8a56; border-radius: 10px;
  padding: 10px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background 0.2s;
}
.btn-outline:hover { background: #e6f9f0; }

.form-actions { margin-top: 8px; }

/* RESULT */
.result-box {
  background: #e6f9f0; border: 1.5px solid #1a8a56;
  border-radius: 12px; padding: 16px 20px; margin-top: 16px;
}
.result-inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.result-label { font-size: 13px; font-weight: 600; color: #1a8a56; }
.result-link { font-size: 14px; font-weight: 700; color: #0d6e43; text-decoration: none; flex: 1; }
.result-link:hover { text-decoration: underline; }
.btn-copy {
  background: #1a8a56; color: #fff;
  border: none; border-radius: 8px;
  padding: 6px 14px; font-size: 13px; cursor: pointer;
}

/* TIP BAR */
.tip-bar {
  margin-top: 20px; padding: 10px 16px;
  background: #f8f8f8; border-radius: 8px;
  font-size: 13px; color: #888;
  border: 1px solid #efefef;
}

/* TABLE */
.table-card { padding: 24px 28px; }
.table-card .card-header { margin-bottom: 16px; }
.search-input {
  margin-left: auto; width: 220px;
  padding: 8px 12px; border: 1.5px solid #e0e0e0;
  border-radius: 8px; font-size: 13px; background: #fafafa;
}
.search-input:focus { border-color: #1a8a56; outline: none; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; padding: 10px 12px;
  border-bottom: 2px solid #f0f0f0;
  font-size: 12px; font-weight: 700; color: #999; text-transform: uppercase;
}
td { padding: 12px; border-bottom: 1px solid #f5f5f5; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

.short-link { color: #1a8a56; font-weight: 600; text-decoration: none; }
.short-link:hover { text-decoration: underline; }
.target-cell a { color: #888; text-decoration: none; font-size: 12px; }
.target-cell a:hover { color: #333; }
.og-cell { display: flex; align-items: center; gap: 8px; max-width: 220px; }
.og-thumb { width: 40px; height: 28px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.og-cell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #555; }
.clicks-cell { font-weight: 700; color: #1a1a1a; }
.date-cell { color: #aaa; font-size: 12px; white-space: nowrap; }
.btn-delete {
  background: #fff5f5; color: #c0392b;
  border: 1px solid #fce4e4; border-radius: 6px;
  padding: 4px 10px; font-size: 12px; cursor: pointer;
}
.btn-delete:hover { background: #fce4e4; }
.btn-copy-sm {
  background: #f0f0f0; color: #555;
  border: none; border-radius: 6px;
  padding: 3px 8px; font-size: 11px; cursor: pointer; margin-left: 4px;
}
.btn-copy-sm:hover { background: #e0e0e0; }

@media (max-width: 600px) {
  .card { padding: 20px 16px; }
  .input-row { flex-direction: column; }
  .step-labels { font-size: 10px; }
  .search-input { width: 100%; margin-left: 0; margin-top: 8px; }
  .card-header { flex-direction: column; align-items: flex-start; }
}