:root {
  --page-bg: #ececef;
  --panel-bg: rgba(255, 255, 255, 0.94);
  --panel-border: rgba(63, 77, 138, 0.10);
  --card-bg: rgba(255, 255, 255, 0.98);
  --card-border: rgba(63, 77, 138, 0.10);
  --primary: #44518f;
  --primary-dark: #2f3d75;
  --text: #4c568f;
  --muted: #6f78a8;
  --shadow-soft: 0 8px 20px rgba(46, 59, 116, 0.06);
  --shadow-panel: 0 12px 28px rgba(46, 59, 116, 0.07);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--page-bg);
}

.dashboard-body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: #ececef;
}

.page-art {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.watermark-logo {
  position: absolute;
  top: 18px;
  left: 24px;
  width: 340px;
  height: 120px;
  background-image: url("/static/img/distinctit.png");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.06;
}

.dashboard-shell {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.site-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 20px;
}

.admin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  background: rgba(68, 81, 143, 0.96);
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  font-weight: 700;
  font-size: 14px;
}

.intro-panel,
.search-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-panel);
}

.intro-panel {
  border-radius: 24px;
  padding: 26px;
  width: 100%;
  margin-bottom: 18px;
}

.intro-kicker {
  display: inline-block;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(68, 81, 143, 0.08);
  color: var(--primary);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.intro-panel h2 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 34px;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.intro-subtitle {
  margin-top: 10px;
  font-size: 16px;
  color: var(--muted);
}

.intro-copy {
  margin-top: 14px;
  max-width: 680px;
  line-height: 1.62;
  color: #626c9f;
  font-size: 14px;
}

.search-panel {
  border-radius: 18px;
  padding: 14px;
  width: 100%;
  margin-bottom: 28px;
}

.search-input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(68, 81, 143, 0.12);
  border-radius: 14px;
  background: rgba(255,255,255,0.98);
  color: var(--primary-dark);
  font-size: 16px;
  outline: none;
}

.search-input::placeholder {
  color: #7d86b7;
}

.category-block {
  margin-bottom: 26px;
}

.section-header {
  margin-bottom: 12px;
}

.section-header h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 16px;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 200px;
  padding: 18px 18px 16px;
  border-radius: 22px;
  text-decoration: none;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 4px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg, #6f81cc 0%, #5668b1 42%, #33427e 100%);
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(46, 59, 116, 0.10);
}

.tool-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: linear-gradient(145deg, rgba(116, 134, 208, 0.16), rgba(68, 81, 143, 0.08));
  border: 1px solid rgba(63, 77, 138, 0.10);
}

.tool-card h4 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 18px;
  line-height: 1.2;
}

.tool-card p {
  margin: 0;
  flex-grow: 1;
  line-height: 1.55;
  color: #606a9d;
  font-size: 13px;
}

.tool-card span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.admin-page {
  background:
    radial-gradient(circle at top left, rgba(59, 83, 168, 0.10), transparent 26%),
    linear-gradient(180deg, #f4f6fb 0%, #eef2f9 100%);
  color: var(--primary-dark);
}

.container {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.narrow {
  width: min(850px, calc(100% - 32px));
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

h1 {
  margin: 0 0 6px 0;
  font-size: 32px;
  color: var(--primary-dark);
}

h2 {
  margin: 0 0 14px 0;
  color: var(--primary-dark);
}

h3 {
  margin: 0;
}

p {
  margin: 0;
}

.muted {
  color: #6f78a8;
}

.panel {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(77, 94, 168, 0.12);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  padding: 24px;
}

input[type="text"],
input[type="url"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(77, 94, 168, 0.14);
  background: rgba(255,255,255,0.94);
  color: var(--primary-dark);
  margin: 8px 0 16px 0;
  outline: none;
}

textarea {
  resize: vertical;
}

label {
  display: block;
  margin-top: 6px;
  font-weight: 700;
  color: var(--primary-dark);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  font-weight: 400;
}

.checkbox-row input {
  width: auto;
  margin: 0;
}

.button,
button {
  background: linear-gradient(145deg, #5c6fb8 0%, #46579f 100%);
  border: none;
  color: white;
  padding: 12px 16px;
  border-radius: 14px;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.button.secondary,
button.secondary,
.danger-outline {
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(77, 94, 168, 0.16);
  color: var(--primary-dark);
  box-shadow: none;
}

.danger-outline {
  color: #d94841;
}

.flash {
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(77, 94, 168, 0.12);
}

.flash.success {
  background: rgba(47, 158, 68, 0.10);
  color: #1f6f31;
}

.flash.error {
  background: rgba(217, 72, 65, 0.10);
  color: #8f2f2a;
}

.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(77, 94, 168, 0.10);
  vertical-align: top;
}

th {
  color: var(--primary-dark);
}

.truncate {
  max-width: 380px;
  word-break: break-word;
}

.action-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.action-row.wrap {
  flex-wrap: wrap;
}

.tiny-button,
.tiny-link {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.86);
  color: var(--primary-dark);
  border: 1px solid rgba(77, 94, 168, 0.16);
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
  box-shadow: none;
}

.tiny-button.danger {
  background: rgba(217, 72, 65, 0.12);
  color: #8f2f2a;
  border-color: rgba(217, 72, 65, 0.18);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 20px;
}

.category-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(77, 94, 168, 0.10);
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-panel {
  width: min(520px, 100%);
}

.spacer-sm {
  height: 12px;
}

a {
  color: var(--primary);
}

@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dashboard-shell,
  .container,
  .narrow {
    width: min(100% - 20px, 1400px);
    padding-top: 20px;
  }

  .intro-panel {
    padding: 22px 18px;
  }

  .intro-panel h2 {
    font-size: 28px;
  }

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

  .watermark-logo {
    width: 220px;
    height: 80px;
    opacity: 0.05;
  }
}
\n
.favicon-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.fallback-emoji {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 24px;
}
