:root {
  --bg: #f8f9fb;
  --surface: #ffffff;
  --ink: #172033;
  --muted: #5b6473;
  --accent: #ff6b35;
  --accent-2: #00a896;
  --accent-3: #3a86ff;
  --accent-soft: #ffe8df;
  --line: #dbe2ee;
  --danger: #b91c1c;
  --success: #166534;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 15%, #ffe7d8 0, #ffe7d800 36%),
    radial-gradient(circle at 80% 20%, #d8f7f2 0, #d8f7f200 34%),
    linear-gradient(180deg, #fdfefe 0%, #eef4fb 100%);
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header {
  background: linear-gradient(120deg, #1e2f57 0%, #253a6a 35%, #1a6ea5 100%);
  color: #fff;
  padding: 14px 0;
  border-bottom: 4px solid #58b0ef;
  box-shadow: 0 8px 22px rgba(24, 43, 84, 0.28);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

nav a {
  color: #d8efff;
  text-decoration: none;
  font-weight: 700;
}

main {
  padding: 28px 0 50px;
}

.hero,
.panel,
.auth-card,
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(19, 40, 78, 0.08);
}

.hero-rich {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 18px;
  background: linear-gradient(135deg, #fff7f2 0%, #f4fbff 100%);
}

.kicker {
  display: inline-block;
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1952a5;
}

.hero-copy h1 {
  margin: 0 0 8px;
  line-height: 1.2;
}

.hero-copy p {
  color: var(--muted);
}

.hero-art {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hero-art img,
.thumb-row img,
.dashboard-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #d4e5fb;
}

.hero-art img:first-child {
  grid-column: 1 / span 2;
  height: 190px;
}

.panel-grid,
.tool-grid,
.stats-row,
.thumb-row {
  display: grid;
  gap: 14px;
}

.panel-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-grid .panel {
  background: linear-gradient(170deg, #ffffff 0%, #f7fbff 100%);
}

.panel-icon h2 {
  margin-top: 10px;
}

.icon-chip {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: linear-gradient(120deg, #ffd8ca 0%, #fff0df 100%);
  border: 1px solid #ffd5b7;
}

.art-strip p,
.panel p {
  color: var(--muted);
}

.muted-line {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 0.92rem;
}

.chart-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
  padding: 8px;
}

.chart-wrap svg {
  width: 100%;
  min-width: 720px;
  height: auto;
  display: block;
}

.chart-axis-label {
  fill: #5b6473;
  font-size: 11px;
  font-family: "Nunito", "Segoe UI", sans-serif;
}

.thumb-row {
  margin-top: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tool-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 16px;
}

.panel-tool {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.panel-tool h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.tool-ico {
  font-size: 1.2rem;
}

.stats-row {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 16px;
}

.stat-card {
  background: linear-gradient(150deg, #ffffff 0%, #f2f8ff 100%);
}

.stat-card-vibrant {
  background: linear-gradient(125deg, #fff2ea 0%, #ffd9c8 100%);
  border-color: #ffcab2;
}

.stat-card-alt {
  background: linear-gradient(125deg, #dcfbf6 0%, #c5f2ea 100%);
  border-color: #9ce0d5;
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 4px 0 0;
}

.dashboard-banner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  background: linear-gradient(110deg, #eef8ff 0%, #ffeede 100%);
}

.dashboard-banner h2 {
  margin: 2px 0 6px;
}

.cta-row {
  display: flex;
  gap: 10px;
}

.button,
button {
  display: inline-block;
  background: linear-gradient(120deg, var(--accent) 0%, #ff8f56 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}

button:hover,
.button:hover {
  filter: brightness(1.03);
}

.button-alt {
  background: linear-gradient(120deg, #2f69f5 0%, #3f93ff 100%);
}

form {
  display: grid;
  gap: 8px;
}

label {
  display: grid;
  gap: 6px;
}

input {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid #cdd9eb;
}

select {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid #cdd9eb;
  background: #fff;
}

.tool-help {
  margin: 2px 0 0;
  color: #42506a;
  font-size: 0.93rem;
  line-height: 1.35;
}

.tool-preview {
  margin: 0 0 6px;
  padding: 8px 10px;
  border: 1px solid #d8e6f8;
  border-radius: 10px;
  background: linear-gradient(135deg, #f4f9ff 0%, #eef8ff 100%);
  color: #2a3e60;
  font-size: 0.88rem;
  line-height: 1.35;
}

.tool-preview strong {
  color: #1b4fa8;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.pricing-card {
  border: 1px solid #d9e4f4;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(155deg, #ffffff 0%, #f5f9ff 100%);
}

.pricing-name {
  margin: 0 0 4px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #2b5c9e;
  font-weight: 800;
}

.pricing-credits {
  margin: 0;
  color: #2e3d55;
}

.pricing-price {
  margin: 4px 0 10px;
  color: #203652;
}

.inline-form {
  display: inline;
}

.message {
  padding: 10px 12px;
  border-radius: 10px;
  margin: 0 0 12px;
}

.message.error {
  background: #fee2e2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.message.success {
  background: #dcfce7;
  color: var(--success);
  border: 1px solid #bbf7d0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table th,
table td {
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.admin-table-scroll {
  max-height: 340px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.admin-table-scroll table {
  margin: 0;
}

.admin-table-scroll thead th {
  position: sticky;
  top: 0;
  background: #f8fbff;
  z-index: 1;
}

@media (max-width: 900px) {
  .hero-rich,
  .dashboard-banner {
    grid-template-columns: 1fr;
  }

  .hero-art img:first-child {
    height: 160px;
  }
}

@media (max-width: 760px) {
  nav {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}

.admin-link {
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(120deg, #ffd770 0%, #ffb84a 100%);
  color: #2b1f00;
  font-weight: 800;
  border: 1px solid rgba(255, 215, 112, 0.35);
  box-shadow: 0 2px 10px rgba(255, 184, 74, 0.35);
}

.admin-link:hover {
  filter: brightness(1.04);
}

.auth-card {
  max-width: 520px;
  margin: 0 auto;
}

.auth-card h1 {
  margin-top: 0;
  margin-bottom: 8px;
}

.auth-form {
  margin-top: 12px;
}

.auth-switch {
  margin: 12px 0 0;
  color: var(--muted);
}

.auth-switch a {
  color: #1b4fa8;
  font-weight: 700;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

form button,
form .button {
  justify-self: start;
  width: auto;
}

.tool-list-grid {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid #d4e4fb;
  background: linear-gradient(140deg, #f6faff 0%, #eff6ff 100%);
  color: #26476f;
  font-size: 0.88rem;
  font-weight: 700;
}

@media (max-width: 760px) {
  .auth-card {
    max-width: 100%;
  }

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

.nav-inline-form {
  display: inline;
}

.nav-inline-form button {
  padding: 8px 12px;
}

.hamburger-menu {
  position: relative;
}

.hamburger-menu summary {
  list-style: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(216, 239, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 1.45rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.hamburger-menu summary::-webkit-details-marker {
  display: none;
}

.hamburger-menu[open] summary {
  background: rgba(255, 255, 255, 0.2);
}

.hamburger-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 250px;
  background: #ffffff;
  border: 1px solid #d6e0ef;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(17, 34, 66, 0.24);
  padding: 8px;
  z-index: 40;
  display: grid;
  gap: 4px;
}

.hamburger-menu-panel a,
.hamburger-menu-panel button {
  width: 100%;
  text-align: left;
  background: transparent;
  color: #1a2b4a;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 10px;
  font-weight: 700;
  text-decoration: none;
}

.hamburger-menu-panel a:hover,
.hamburger-menu-panel button:hover {
  background: #eff5ff;
  border-color: #d4e4fb;
  filter: none;
}

.hamburger-menu-panel .nav-inline-form {
  display: block;
}

.top-user-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(216, 239, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #e8f5ff;
  font-weight: 700;
}

.top-user-name {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-user-credits {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(11, 27, 56, 0.35);
  border: 1px solid rgba(122, 198, 255, 0.45);
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .top-user-meta {
    max-width: 170px;
    gap: 6px;
    padding: 5px 8px;
  }

  .top-user-name {
    max-width: 86px;
    font-size: 0.85rem;
  }

  .top-user-credits {
    font-size: 0.78rem;
    padding: 2px 6px;
  }
}
