/* LinkMint — site styles */

:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f1f5f9;
  --card: #ffffff;
  --accent: #10b981;
  --accent-dark: #059669;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(15, 23, 42, .07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 18px; }
.wrap.narrow { max-width: 680px; }
.pad { padding-top: 32px; padding-bottom: 48px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }

/* ---------- nav ---------- */
.nav { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.navin { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -.4px; }
.brand:hover { text-decoration: none; }
.nav nav { display: flex; align-items: center; gap: 18px; }
.nav nav a { color: #475569; font-size: 15px; font-weight: 500; }
.btn-sm {
  background: var(--accent); color: #fff !important; padding: 8px 16px;
  border-radius: 8px; font-weight: 600; font-size: 14px;
}
.btn-sm:hover { background: var(--accent-dark); text-decoration: none; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(160deg, #0f172a 0%, #134e4a 100%);
  padding: 60px 0 72px; color: #fff; text-align: center;
}
.herotitle { font-size: 40px; line-height: 1.15; margin: 0 0 12px; font-weight: 800; letter-spacing: -1px; }
.herosub { margin: 0 auto 30px; color: #94a3b8; font-size: 17px; max-width: 520px; }

/* ---------- cards ---------- */
.card {
  background: var(--card); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); margin-bottom: 22px;
}
.shortcard { text-align: left; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.h1 { font-size: 26px; margin: 0 0 6px; font-weight: 700; letter-spacing: -.4px; }
.h2 { font-size: 18px; margin: 22px 0 12px; font-weight: 700; }
.h2:first-child { margin-top: 0; }

/* ---------- forms ---------- */
input, select, textarea {
  width: 100%; padding: 12px 13px; font-size: 15px; font-family: inherit;
  border: 1px solid #cbd5e1; border-radius: 9px; outline: none;
  background: #fff; color: var(--ink);
}
textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(16, 185, 129, .15);
}
.form label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 14px 0 5px; }
.form label:first-of-type { margin-top: 0; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.hint code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

.btn {
  display: inline-block; padding: 12px 22px; border: 0; border-radius: 9px;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: inherit; margin-top: 16px;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn.full { width: 100%; }
.linkbtn {
  background: none; border: 0; color: var(--accent-dark); font-size: 14px;
  cursor: pointer; padding: 3px 6px; font-family: inherit;
}
.linkbtn.danger { color: var(--danger); }
.hp { position: absolute; left: -9999px; }

.shortform .urlin { font-size: 16px; padding: 15px; }
.aliasrow { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.aliasrow .prefix { font-size: 14px; color: var(--muted); white-space: nowrap; }
.aliasrow .aliasin { flex: 1; }
.aliasrow .btn { margin-top: 0; white-space: nowrap; }
.form.inline { display: flex; gap: 10px; flex-wrap: wrap; }
.form.inline input { flex: 1; min-width: 180px; }
.form.inline .btn { margin-top: 0; }

.result { background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 10px; padding: 16px; }
.result .lbl { font-size: 12px; font-weight: 700; color: var(--accent-dark); text-transform: uppercase; letter-spacing: .5px; }
.result .out { display: flex; gap: 8px; margin-top: 8px; }
.result .out input { font-weight: 600; }
.result .out .btn { margin-top: 0; white-space: nowrap; }
.orig { margin: 10px 0 0; font-size: 13px; color: var(--muted); word-break: break-all; }

/* ---------- flash ---------- */
.flash { padding: 12px 15px; border-radius: 9px; margin: 14px 0; font-size: 14px; }
.flash.ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.flash.err { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 46px auto; }
.feat { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.feat .ico { font-size: 28px; }
.feat h3 { margin: 10px 0 6px; font-size: 17px; }
.feat p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- stats ---------- */
.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stat .v { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.stat .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }

/* ---------- dashboard / admin nav ---------- */
.dashhead { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; }
.subnav a {
  padding: 8px 14px; border-radius: 8px; background: #fff; color: #475569;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow);
}
.subnav a.on { background: var(--accent); color: #fff; }
.subnav a:hover { text-decoration: none; }
.wrapnav { margin-bottom: 22px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.pills a { padding: 7px 14px; border-radius: 20px; background: #f1f5f9; color: #475569; font-size: 13px; font-weight: 600; }
.pills a.on { background: var(--accent); color: #fff; }
.pills a:hover { text-decoration: none; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; }
td.trunc { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.pill.pending { background: #fef3c7; color: #92400e; }
.pill.paid { background: #d1fae5; color: #065f46; }
.pill.rejected { background: #fee2e2; color: #991b1b; }

/* ---------- flow pages ---------- */
body.bare { background: var(--bg); }
.flowbar { background: #fff; border-bottom: 1px solid var(--line); }
.flowbarin { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.steps { display: flex; align-items: center; gap: 6px; }
.dot {
  width: 28px; height: 28px; border-radius: 50%; background: #e2e8f0; color: #94a3b8;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.dot.now { background: var(--accent); color: #fff; }
.dot.done { background: #a7f3d0; color: #065f46; }
.bar { width: 26px; height: 3px; background: #e2e8f0; border-radius: 2px; }
.bar.done { background: #a7f3d0; }
.flowwrap { padding: 24px 18px 48px; }
.flowcard { border-left: 4px solid var(--accent); }
.waitrow { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.waitrow .lbl { font-size: 17px; font-weight: 700; }
.cta { min-width: 150px; text-align: right; }
.tick {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: #ecfdf5; border: 3px solid var(--accent);
  font-size: 20px; font-weight: 800; color: var(--accent-dark);
}
.cta .btn { margin-top: 0; }
.tick.tick-wait {
  border-color: #cbd5e1; background: #f8fafc; color: #94a3b8;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.scrollend { text-align: center; padding: 26px 0 60px; }
.scrollhint { font-size: 13px; color: var(--muted); }
.scrollend.hidden { display: none; }
.adbox { margin: 0 0 22px; text-align: center; min-height: 0; }
.adbox:empty { display: none; }
.adnote {
  margin: 0 0 8px; text-align: center; font-size: 13px; font-weight: 600;
  color: var(--muted); letter-spacing: .2px;
}
.stickybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: #fff; border-top: 1px solid var(--line); padding: 8px;
  text-align: center; box-shadow: 0 -2px 12px rgba(15, 23, 42, .08);
}
.stickybar:empty { display: none; }

.stepgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 8px; }
.steplbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }

/* ---------- posts ---------- */
.post h1 { font-size: 27px; margin: 0 0 8px; line-height: 1.25; letter-spacing: -.5px; }
.postimg { width: 100%; height: auto; border-radius: 10px; margin: 14px 0; }
.postbody { font-size: 16px; color: #334155; }
.postbody p { margin: 0 0 14px; }
.postgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.postcard { display: block; color: inherit; margin-bottom: 0; }
.postcard:hover { text-decoration: none; transform: translateY(-2px); transition: transform .15s; }
.postcard h3 { margin: 0 0 6px; font-size: 17px; }
.postcard .thumb { width: 100%; border-radius: 8px; margin-bottom: 10px; }
.postcard .date { font-size: 12px; color: var(--muted); }

/* ---------- footer ---------- */
.foot { background: #0f172a; color: #94a3b8; padding: 30px 0; margin-top: 40px; font-size: 14px; }
.foot p { margin: 0 0 6px; }
.foot .links { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: #cbd5e1; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .features, .postgrid { grid-template-columns: 1fr 1fr; }
  .statgrid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .herotitle { font-size: 29px; }
  .features, .postgrid, .statgrid { grid-template-columns: 1fr; }
  .aliasrow { flex-direction: column; align-items: stretch; }
  .aliasrow .prefix { display: none; }
  .aliasrow .btn { width: 100%; }
  .result .out { flex-direction: column; }
  .result .out .btn { width: 100%; }
  .navin { height: 56px; }
  .nav nav { gap: 12px; }
  .nav nav a { font-size: 14px; }
  .waitrow { flex-direction: column; align-items: stretch; }
  .cta { text-align: center; }
  .cta .btn { width: 100%; }
}
