@font-face {
  font-family: lato;
  font-style: normal;
  font-weight: 400;
  src: url(../fonts/Lato.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  font-display: swap;
}

:root {
  --brand:      #57b846;
  --brand-dark: #3d9430;
  --bg:         #f0f4f8;
  --card-bg:    #ffffff;
  --text:       #1a202c;
  --text-muted: #718096;
  --border:     #e2e8f0;
  --nav-bg:     #1a202c;
}

/* ── base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

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

/* ── navbar ───────────────────────────────────────────────── */
.navbar-shrink {
  background: var(--nav-bg) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
  padding: .75rem 1.5rem;
}

.navbar-shrink .navbar-brand {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand) !important;
  letter-spacing: -.4px;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.navbar-shrink .nav-link {
  color: rgba(255,255,255,.7) !important;
  font-size: .9rem;
  padding: .4rem .75rem !important;
  border-radius: 6px;
  transition: color .15s, background .15s;
}

.navbar-shrink .nav-link:hover {
  color: #fff !important;
  background: rgba(255,255,255,.08);
}

.navbar-shrink .navbar-toggler {
  border-color: rgba(255,255,255,.2);
}

.navbar-shrink .navbar-toggler-icon {
  filter: invert(1) opacity(.7);
}

/* ── hero (index page) ────────────────────────────────────── */
.sk-hero {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.sk-hero-inner {
  width: 100%;
  max-width: 580px;
}

.sk-hero-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .4rem;
}

.sk-hero-sub {
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 1.75rem;
}

/* ── card ─────────────────────────────────────────────────── */
.sk-card {
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  border: 1px solid var(--border);
  padding: 2rem;
}

/* ── url form ─────────────────────────────────────────────── */
.sk-input-row {
  display: flex;
  gap: .5rem;
}

.sk-input-row .form-control {
  border-radius: 8px;
  border: 1.5px solid var(--border);
  padding: .7rem 1rem;
  font-size: 1rem;
  flex: 1;
  background: var(--bg);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
  outline: none;
}

.sk-input-row .form-control::placeholder { color: var(--text-muted); }

.sk-input-row .form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(87,184,70,.18);
  background: #fff;
}

.btn-brand {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .7rem 1.4rem;
  font-size: .95rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: background .15s, transform .1s;
  text-decoration: none;
}

.btn-brand:hover  { background: var(--brand-dark); color: #fff; }
.btn-brand:active { transform: scale(.97); }

/* ── result box ───────────────────────────────────────────── */
.sk-result {
  margin-top: 1.25rem;
  background: #f0faf0;
  border: 1.5px solid #b7e2b3;
  border-radius: 8px;
  padding: .9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.sk-result-url {
  font-size: .95rem;
  color: var(--brand-dark);
  font-weight: 600;
  word-break: break-all;
  flex: 1;
}

.btn-copy {
  background: transparent;
  border: 1.5px solid var(--brand);
  color: var(--brand);
  border-radius: 6px;
  padding: .3rem .75rem;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  transition: background .15s, color .15s;
}

.btn-copy:hover,
.btn-copy.copied {
  background: var(--brand);
  color: #fff;
}

.btn-copy--sm {
  padding: .2rem .5rem;
  font-size: .75rem;
  flex-shrink: 0;
}

/* ── recent links (index) ─────────────────────────────────── */
.sk-recent {
  margin-top: 1.5rem;
}

.sk-recent-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: .6rem;
}

.sk-recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.sk-recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .6rem .9rem;
  transition: border-color .15s;
}

.sk-recent-item:hover { border-color: #b7e2b3; }

.sk-recent-left {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  overflow: hidden;
  flex: 1;
}

.sk-recent-short {
  font-size: .875rem;
  font-weight: 600;
  color: var(--brand-dark);
  text-decoration: none;
  white-space: nowrap;
}

.sk-recent-short:hover { text-decoration: underline; }

.sk-recent-orig {
  font-size: .75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sk-recent-right {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

.sk-recent-clicks {
  font-size: .75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .25rem;
}

/* ── status badges (stats) ────────────────────────────────── */
.status-badge {
  display: inline-block;
  border-radius: 20px;
  padding: .2rem .65rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.status-2xx  { background: #e8f5e9; color: #2e7d32; }
.status-3xx  { background: #e3f2fd; color: #1565c0; }
.status-4xx  { background: #fff3e0; color: #e65100; }
.status-5xx  { background: #fce4ec; color: #b71c1c; }
.status-none { background: #f1f5f9; color: #94a3b8; font-weight: 400; }

/* ── stats page ───────────────────────────────────────────── */
.sk-page {
  padding: 2.5rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.sk-page-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.5rem;
}

.sk-page-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.sk-count-badge {
  background: var(--brand);
  color: #fff;
  border-radius: 20px;
  padding: .15rem .65rem;
  font-size: .8rem;
  font-weight: 700;
}

.sk-table-card {
  background: var(--card-bg);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  border: 1px solid var(--border);
}

.sk-table-card .table {
  margin-bottom: 0;
}

.sk-table-card .table thead th {
  background: var(--nav-bg);
  color: rgba(255,255,255,.75);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 600;
  border: none;
  padding: .85rem 1.1rem;
  white-space: nowrap;
}

.sk-table-card .table tbody tr {
  transition: background .1s;
}

.sk-table-card .table tbody tr:hover {
  background: #f7fbf6;
}

.sk-table-card .table td {
  border-color: var(--border);
  padding: .8rem 1.1rem;
  vertical-align: middle;
  font-size: .9rem;
}

.sk-table-card .table tbody tr:last-child td {
  border-bottom: none;
}

.cell-id   { color: var(--text-muted); width: 60px; }
.cell-orig { max-width: 320px; }
.cell-orig span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.short-link {
  color: var(--brand-dark);
  font-weight: 600;
  text-decoration: none;
}

.short-link:hover { text-decoration: underline; }

.badge-clicks {
  background: #e8f5e9;
  color: var(--brand-dark);
  border-radius: 20px;
  padding: .2rem .65rem;
  font-size: .8rem;
  font-weight: 700;
  display: inline-block;
}

.sk-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.sk-empty i {
  font-size: 2.5rem;
  display: block;
  margin-bottom: .75rem;
  opacity: .5;
}

/* ── login page overrides ─────────────────────────────────── */
.container-login100 {
  background: linear-gradient(135deg, #e8f5e9 0%, #f0faf0 100%);
  min-height: 100vh;
}

.wrap-login100 {
  box-shadow: 0 8px 48px rgba(0,0,0,.13);
  border-radius: 16px;
}

.login100-form-title {
  font-family: lato, sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--text);
}

/* ── responsive ───────────────────────────────────────────── */
@media (max-width: 576px) {
  .sk-input-row { flex-direction: column; }
  .btn-brand    { width: 100%; justify-content: center; }
  .sk-result    { flex-direction: column; align-items: flex-start; }
  .sk-hero-title { font-size: 1.5rem; }
}
