.stats-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}

.stat-box {
  padding: 1.1rem 0.85rem 1rem;
  border-radius: 18px;
  text-align: center;
  border: 1px solid transparent;
}

.stat-box__icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 0.55rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
}

.stat-box--pink {
  background: linear-gradient(135deg, #fff0f3, #fff);
  border-color: #ffd6e0;
}
.stat-box--pink .stat-box__icon { background: #fff0f3; }
.stat-box--pink .stat-value { color: var(--accent); }

.stat-box--blue {
  background: linear-gradient(135deg, #e7f5ff, #fff);
  border-color: #c5e4ff;
}
.stat-box--blue .stat-box__icon { background: #e7f5ff; }
.stat-box--blue .stat-value { color: var(--accent-2); }

.stat-box--green {
  background: linear-gradient(135deg, #ebfbee, #fff);
  border-color: #c3fae8;
}
.stat-box--green .stat-box__icon { background: #ebfbee; }
.stat-box--green .stat-value { color: #40c057; }

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--accent);
}

.stat-value--sm {
  font-size: 0.95rem;
  color: var(--text);
}

.shorten-form,
.search-bar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 560px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.85rem;
}

.form-row label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 0.35rem;
}

.form-row input {
  width: 100%;
  height: 2.75rem;
  padding: 0 0.95rem;
  border: 1px solid #e8c4cf;
  border-radius: 14px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.form-row input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.15);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 0.35rem;
}

.search-bar {
  flex-direction: row;
  align-items: center;
  margin-bottom: 1rem;
}

.search-bar input {
  flex: 1;
  height: 2.75rem;
  padding: 0 0.95rem;
  border: 1px solid #e8c4cf;
  border-radius: 14px;
  font: inherit;
}

.shorten-result {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: #ebfbee;
  border: 1px solid #c3fae8;
  font-size: 0.9rem;
  line-height: 1.7;
  word-break: break-all;
}

.shorten-result.is-error {
  background: #fff5f5;
  border-color: #ffc9c9;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.55rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 600;
}

.data-table a {
  color: #1971c2;
  text-decoration: none;
}

.data-table a:hover {
  text-decoration: underline;
}

.cell-url {
  max-width: 280px;
  word-break: break-all;
}

.cell-actions {
  white-space: nowrap;
}

.copy-btn,
.btn-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.9rem;
  padding: 0 0.65rem;
  margin-left: 0.35rem;
  border: none;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.copy-btn {
  color: var(--accent-2);
  background: #e7f5ff;
}

.btn-mini--danger {
  color: #c92a2a;
  background: #fff5f5;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 1rem;
}

.pager__link,
.pager__current {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.45rem;
  border-radius: 10px;
  font-size: 0.85rem;
}

.pager__link {
  text-decoration: none;
  color: var(--accent);
  background: #fff0f3;
}

.pager__current {
  color: #fff;
  background: linear-gradient(135deg, #ff6b8a, #ffa8c5);
}

.alert {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  font-size: 0.9rem;
}

.alert--ok {
  background: #ebfbee;
  border: 1px solid #c3fae8;
}

.alert--warn {
  background: #fff4e6;
  border: 1px solid #ffd8a8;
}

.code-block {
  margin: 0;
  padding: 1rem 1.05rem 1.15rem;
  border-radius: 0;
  background: transparent;
  border: none;
  overflow-x: auto;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.8rem;
  line-height: 1.75;
  color: #e9ecef;
  white-space: pre-wrap;
  word-break: break-all;
}

.empty-hint {
  text-align: center;
  color: var(--text-soft);
  padding: 1.5rem 0;
}

.install-steps {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  line-height: 1.85;
  color: var(--text-soft);
}

.section-panel__body--wide {
  max-width: none;
}

.login-panel {
  max-width: 420px;
  margin: 0 auto 1rem;
}

.page--auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 2.5rem);
  padding: 2.5rem 1.25rem 2rem;
}

.login-shell {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 2.25rem 2rem 1.75rem;
  text-align: center;
}

.login-shell__hero {
  margin-bottom: 1.75rem;
  padding: 0 0.25rem;
}

.login-shell__body {
  padding: 0 0.15rem;
}

.login-shell__logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 1rem;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(255, 107, 138, 0.22));
}

.login-shell__title {
  margin: 0 0 0.5rem;
  font-family: "Noto Serif SC", serif;
  font-size: 1.5rem;
  line-height: 1.35;
  background: linear-gradient(90deg, #ff6b8a, #4dabf7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-shell__desc {
  margin: 0 auto;
  max-width: 18rem;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-soft);
}

.login-shell__alert {
  margin: 0 0 1.15rem;
  text-align: left;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  text-align: left;
}

.login-form .form-row {
  margin: 0;
}

.login-form .form-row input {
  width: 100%;
  height: 3rem;
  padding: 0 1.05rem;
  border: 1px solid #e8c4cf;
  border-radius: 14px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form .form-row input:-webkit-autofill,
.login-form .form-row input:-webkit-autofill:hover,
.login-form .form-row input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: var(--text);
}

.login-form .form-row input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.15);
}

.login-form .form-row input::placeholder {
  color: #adb5bd;
}

.login-form .form-row label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.login-form__actions {
  margin-top: 0.35rem;
  padding-top: 0.15rem;
}

.btn--block {
  width: 100%;
  min-width: 0;
  height: 3rem;
}

.login-shell__foot {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(255, 140, 160, 0.28);
}

.login-shell__back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.login-shell__back:hover {
  color: #e64980;
  text-decoration: none;
}

.footer-minimal {
  width: 100%;
  max-width: 400px;
  margin: 1rem auto 0;
  padding: 0.25rem 0 0.5rem;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text-soft);
}

.footer-minimal a {
  color: #1971c2;
  text-decoration: none;
}

.footer-minimal a:hover {
  text-decoration: underline;
}

.page.page--qr {
  max-width: 460px;
  width: 100%;
}

.page--qr {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  min-height: calc(100vh - 2.5rem);
  padding: 2rem 1rem 1.75rem;
}

.qr-page {
  width: 100%;
  margin: 0;
  padding: 1.35rem 1.65rem 1.65rem;
}

.qr-page__toolbar {
  margin: -0.15rem 0 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed rgba(255, 140, 160, 0.28);
}

.qr-page__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem 0.4rem 0.65rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--accent);
  background: #fff0f3;
  border: 1px solid #ffd6e0;
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.qr-page__back:hover {
  transform: translateX(-2px);
  background: #ffe3ec;
  box-shadow: 0 6px 16px rgba(255, 107, 138, 0.18);
  text-decoration: none;
  color: var(--accent);
}

.qr-page__hero {
  text-align: center;
  margin-bottom: 1.35rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 140, 160, 0.12);
}

.qr-page__logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin: 0 auto 0.85rem;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(255, 107, 138, 0.22));
}

.qr-page__title {
  margin: 0 0 0.45rem;
  font-family: "Noto Serif SC", serif;
  font-size: 1.45rem;
  line-height: 1.35;
  background: linear-gradient(90deg, #ff6b8a, #4dabf7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.qr-page__desc {
  margin: 0 auto;
  max-width: 22rem;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-soft);
}

.qr-page__desc code {
  font-size: 0.82rem;
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  background: #fff5f7;
  color: #e64980;
}

.qr-page__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.qr-page__badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #e64980;
  background: linear-gradient(135deg, #fff0f3 0%, #ffe3ec 100%);
  border: 1px solid rgba(255, 107, 138, 0.22);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-page__badge--blue {
  color: #1971c2;
  background: linear-gradient(135deg, #e7f5ff 0%, #d0ebff 100%);
  border-color: rgba(77, 171, 247, 0.28);
}

.qr-page__frame {
  position: relative;
  padding: 1.25rem 1rem;
  margin-bottom: 1.15rem;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff8fa 0%, #f5faff 100%);
  border: 1px solid rgba(255, 140, 160, 0.14);
}

.qr-page__link {
  padding: 0.95rem 1rem;
  margin-bottom: 1.15rem;
  border-radius: 14px;
  background: #fafbfc;
  border: 1px solid #eef1f4;
  text-align: left;
}

.qr-page__link-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #868e96;
  margin-bottom: 0.35rem;
}

.qr-page__link-url {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1971c2;
  text-decoration: none;
  word-break: break-all;
  line-height: 1.5;
}

.qr-page__link-url:hover {
  text-decoration: underline;
}

.qr-page__link-target {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-page__form {
  text-align: left;
  margin-bottom: 1.15rem;
}

.qr-page__form-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.45rem;
}

.qr-page__form-hint {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  color: #adb5bd;
  line-height: 1.5;
}

.qr-page__input {
  height: 2.85rem;
}

.qr-page__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.qr-page__actions .btn--ghost {
  grid-column: 1 / -1;
}

.qr-page__actions--single {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.qr-page__actions--single .btn {
  width: 100%;
}

.qr-share-mount {
  margin-top: 1rem;
}

.qr-share {
  text-align: center;
}

.qr-share--page {
  text-align: left;
}

.qr-share__preview {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
}

.qr-share__canvas {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(43, 52, 69, 0.1);
  border: 4px solid #fff;
  background: #fff;
}

.qr-share__loading {
  padding: 2.5rem 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  text-align: center;
}

.qr-share__caption-row {
  text-align: left;
  margin-bottom: 0.85rem;
}

.qr-share__caption-row label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 0.45rem;
}

.qr-share__caption-input {
  width: 100%;
  height: 2.75rem;
  padding: 0 0.95rem;
  border: 1px solid #e8c4cf;
  border-radius: 14px;
  font: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.qr-share__caption-input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.15);
}

.qr-share__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.btn-mini--qr {
  color: #7048e8;
  background: #f3f0ff;
  text-decoration: none;
  margin-right: 0.25rem;
}

.btn-mini--qr:hover {
  color: #5f3dc4;
}

@media (max-width: 720px) {
  .page--auth,
  .page--qr {
    min-height: auto;
    padding: 1.5rem 0.85rem 1.75rem;
  }

  .login-shell,
  .qr-page {
    padding: 1.35rem 1.15rem 1.35rem;
  }

  .qr-page__frame {
    padding: 1rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .stats-summary {
    grid-template-columns: 1fr;
  }

  .search-bar {
    flex-direction: column;
  }

  .search-bar .btn {
    width: 100%;
  }
}
