﻿/* MyWebAdminStudio — static site styles (loaded from /site.css) */

.site-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
}

:root {
  --bg: #f1f5f9;
  --bg-white: #ffffff;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --accent: #06b6d4;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(79, 70, 229, 0.15);
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 72px;
  --max-w: 1200px;
  --font: var(--font-geist-sans, "Segoe UI"), system-ui, sans-serif;
  --font-mono: var(--font-geist-mono, "Cascadia Code"), monospace;
  --header-bg: rgba(255, 255, 255, 0.92);
  --hero-bg: linear-gradient(160deg, #eef2ff 0%, #f8fafc 40%, #ecfeff 100%);
  --page-hero-bg: linear-gradient(160deg, #eef2ff 0%, #f8fafc 100%);
  --features-bg: linear-gradient(90deg, #eef2ff, #ecfeff);
  --input-border: #cbd5e1;
  --output-bg: #f8fafc;
  --output-color: #4338ca;
  --badge-border: #c7d2fe;
  --tool-hover-border: #c7d2fe;
  --btn-secondary-hover-bg: #f8fafc;
  --btn-secondary-hover-border: #cbd5e1;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.site-container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.site-logo:hover { opacity: 0.88; }

.site-logo__mark {
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}
.site-logo__mark svg { display: block; width: 100%; height: 100%; }

.site-logo__text { display: flex; flex-direction: column; line-height: 1.2; }

.site-logo__name {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.site-logo__name--dark { color: #fff; }

.site-logo__tagline {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-top: 2px;
}
.site-logo__tagline--dark { color: #67e8f9; }

.site-nav {
  display: none;
  align-items: center;
  gap: 4px;
}
@media (min-width: 768px) { .site-nav { display: flex; } }

/* Mega menu navigation */
.mega-menu-nav {
  display: none;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
  min-width: 0;
}
@media (min-width: 1024px) { .mega-menu-nav { display: flex; } }

.mega-menu {
  position: relative;
}

.mega-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.mega-menu__trigger:hover,
.mega-menu--open .mega-menu__trigger {
  color: var(--primary);
  background: var(--primary-light);
}
.mega-menu__trigger--active {
  color: var(--primary);
}

.mega-menu__chevron {
  transition: transform 0.2s;
  opacity: 0.6;
}
.mega-menu__chevron--open {
  transform: rotate(180deg);
}

.mega-menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: min(960px, calc(100vw - 48px));
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.12);
  z-index: 200;
  overflow: hidden;
  animation: megaMenuIn 0.15s ease-out;
}
@keyframes megaMenuIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.mega-menu__columns {
  display: grid;
  grid-template-columns: 260px 1fr;
  max-height: 480px;
}

.mega-menu__categories {
  border-right: 1px solid var(--border);
  padding: 12px 8px;
  overflow-y: auto;
  min-height: 0;
}

.mega-menu__col-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 4px 12px 8px;
}

.mega-menu__cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-menu__cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}
.mega-menu__cat-item:hover,
.mega-menu__cat-item--active {
  background: var(--primary-light);
  color: var(--primary);
}
.mega-menu__cat-icon { flex-shrink: 0; opacity: 0.75; }
.mega-menu__cat-name { flex: 1; min-width: 0; }
.mega-menu__cat-arrow { flex-shrink: 0; opacity: 0.4; }

.mega-menu__tools {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.mega-menu__tools-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.mega-menu__cat-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 4px 0 0;
  line-height: 1.4;
}

.mega-menu__view-all {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.mega-menu__view-all:hover { text-decoration: underline; }

.mega-menu__tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px 16px;
  align-content: start;
}

.mega-menu__tool-list li {
  min-width: 0;
}

.mega-menu__tool-link {
  display: block;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-muted);
  transition: all 0.15s;
}
.mega-menu__tool-link:hover {
  color: var(--primary);
  background: var(--primary-light);
}

/* Language mega-menu selector */
.lang-mega {
  position: relative;
  z-index: 210;
}

.lang-mega__trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-mega__trigger:hover,
.lang-mega--open .lang-mega__trigger {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.lang-mega__code { min-width: 1.25rem; }

.lang-mega__chevron {
  transition: transform 0.2s;
  opacity: 0.5;
}
.lang-mega__chevron--open { transform: rotate(180deg); }

.lang-mega__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(980px, calc(100vw - 24px));
  max-height: calc(100dvh - var(--header-h) - 12px);
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14);
  z-index: 300;
  overflow: hidden;
  animation: langMegaIn 0.15s ease-out;
}
@keyframes langMegaIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.lang-mega__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt, #f8fafc);
  flex-shrink: 0;
}

.lang-mega__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.lang-mega__subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.lang-mega__current {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-light);
}

.lang-mega__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Small regions (Americas, Middle East, Africa) share one horizontal row */
.lang-mega__compact-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.lang-mega__region {
  min-width: 0;
}

.lang-mega__region--wide {
  width: 100%;
}

.lang-mega__region-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 6px 2px;
}

.lang-mega__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lang-mega__grid--wide {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .lang-mega__grid--wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lang-mega__compact-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .lang-mega__panel { width: calc(100vw - 16px); }
  .lang-mega__grid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lang-mega__compact-row { grid-template-columns: 1fr; }
  .lang-mega__head { flex-direction: column; align-items: flex-start; }
}

.lang-mega__option {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}
.lang-mega__option:hover {
  background: var(--primary-light);
  border-color: rgba(79, 70, 229, 0.15);
  color: var(--primary);
}
.lang-mega__option--active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.lang-mega__option-code {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.625rem;
  min-width: 1.375rem;
  padding: 2px 4px;
  border-radius: 4px;
  text-align: center;
  background: var(--bg-alt, #f1f5f9);
  color: var(--text-muted);
}
.lang-mega__option--active .lang-mega__option-code {
  background: var(--primary);
  color: #fff;
}

.lang-mega__option-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-mega__option-check {
  flex-shrink: 0;
  color: var(--primary);
}

/* Legacy lang-select (unused) */
.lang-select {
  position: relative;
  z-index: 10;
}

.lang-select__trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-select__trigger:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.lang-select__code { min-width: 1.25rem; }

.lang-select__chevron {
  transition: transform 0.2s;
  opacity: 0.5;
}
.lang-select__chevron--open { transform: rotate(180deg); }

.lang-select__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  max-height: min(420px, 70vh);
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  z-index: 300;
}

.lang-select__option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.lang-select__option:hover,
.lang-select__option--active {
  background: var(--primary-light);
  color: var(--primary);
}
.lang-select__option-code {
  font-weight: 700;
  font-size: 0.6875rem;
  min-width: 1.5rem;
  color: var(--text-muted);
}
.lang-select__option--active .lang-select__option-code { color: var(--primary); }

.site-nav__link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
}
.site-nav__link:hover {
  color: var(--primary);
  background: var(--primary-light);
}
.site-nav__link--active {
  color: var(--primary);
  background: var(--primary-light);
}

.site-header__actions {
  display: none;
  align-items: center;
  gap: 12px;
}
@media (min-width: 768px) { .site-header__actions { display: flex; } }

.site-header__end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}
.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.site-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text);
  cursor: pointer;
}
@media (min-width: 768px) { .site-menu-btn { display: none; } }

.site-mobile-nav {
  border-top: 1px solid var(--border);
  background: var(--bg-white);
  padding: 16px 24px 20px;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.site-mobile-nav a,
.site-mobile-nav button {
  font-family: inherit;
}
.site-mobile-nav__home {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.site-mobile-nav__home:hover { background: var(--primary-light); color: var(--primary); }

.site-mobile-nav__group { margin-bottom: 4px; }

.site-mobile-nav__group-btn,
.site-mobile-nav__cat-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.site-mobile-nav__group-btn:hover,
.site-mobile-nav__cat-btn:hover { background: var(--primary-light); color: var(--primary); }

.site-mobile-nav__cat-btn {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding-left: 24px;
}

.site-mobile-nav__chevron--open { transform: rotate(180deg); }

.site-mobile-nav__categories { padding-left: 8px; }

.site-mobile-nav__tools {
  padding: 4px 0 8px 36px;
}
.site-mobile-nav__tools a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}
.site-mobile-nav__tools a:hover { background: var(--primary-light); color: var(--primary); }

.site-mobile-nav__view-all {
  font-weight: 600 !important;
  color: var(--primary) !important;
  font-size: 0.8125rem !important;
  margin-bottom: 4px;
}

.site-mobile-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text-muted);
}
.site-mobile-nav a:hover { background: var(--primary-light); color: var(--primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #0891b2 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.5);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--text);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
}
.btn-secondary:hover {
  border-color: var(--btn-secondary-hover-border);
  background: var(--btn-secondary-hover-bg);
}

.btn-sm { padding: 9px 18px; font-size: 0.8125rem; }

.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
  border-bottom: 1px solid var(--border);
  padding: 64px 0 72px;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr 1fr; }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-white);
  border: 1px solid var(--badge-border);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
  margin-bottom: 24px;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0 0 20px;
}

.gradient-text {
  background: linear-gradient(135deg, #4f46e5 0%, #0891b2 55%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 0 32px;
  line-height: 1.7;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__panel {
  background: #1e293b;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.8;
  display: none;
}
@media (min-width: 1024px) { .hero__panel { display: block; } }

.hero__panel-dots {
  display: flex;
  gap: 7px;
  margin-bottom: 16px;
}
.hero__panel-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.hero__panel-dots span:nth-child(1) { background: #f87171; }
.hero__panel-dots span:nth-child(2) { background: #fbbf24; }
.hero__panel-dots span:nth-child(3) { background: #34d399; }

.hero__panel .cmd { color: #818cf8; }
.hero__panel .out { color: #34d399; }
.hero__panel .dim { color: #64748b; }

.hero__status {
  position: absolute;
  top: -12px;
  right: -12px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #047857;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.hero__panel-wrap { position: relative; }

.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
}
@media (min-width: 640px) { .stats-bar { grid-template-columns: repeat(4, 1fr); } }

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }

.stat-item__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 10px;
  margin-bottom: 10px;
}

.stat-item__value {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text);
}

.stat-item__label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.section { padding: 72px 0; }
.section--alt { background: var(--bg-white); }

.section__header {
  text-align: center;
  margin-bottom: 48px;
}

.section__title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--text);
}

.section__subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin: 0;
}

.category-grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 640px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .category-grid { grid-template-columns: repeat(4, 1fr); } }

.category-card {
  display: block;
  padding: 28px 24px;
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: all 0.25s;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.category-card__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  margin-bottom: 18px;
  color: #fff;
}
.category-card__icon--system { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.category-card__icon--network { background: linear-gradient(135deg, #10b981, #14b8a6); }
.category-card__icon--database { background: linear-gradient(135deg, #f59e0b, #f97316); }
.category-card__icon--security { background: linear-gradient(135deg, #f43f5e, #ec4899); }
.category-card__icon--email { background: linear-gradient(135deg, #8b5cf6, #a855f7); }
.category-card__icon--domain { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.category-card__icon--ip { background: linear-gradient(135deg, #f97316, #ea580c); }
.category-card__icon--netdiag { background: linear-gradient(135deg, #84cc16, #65a30d); }
.category-card__icon--subnet { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.category-card__icon--ssl { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.category-card__icon--http { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.category-card__icon--linux { background: linear-gradient(135deg, #22c55e, #16a34a); }
.category-card__icon--windows { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.category-card__icon--postgresql { background: linear-gradient(135deg, #336791, #2d5a7b); }
.category-card__icon--mysql { background: linear-gradient(135deg, #00758f, #f29111); }
.category-card__icon--devops { background: linear-gradient(135deg, #7c3aed, #4f46e5); }
.category-card__icon--logmon { background: linear-gradient(135deg, #0d9488, #14b8a6); }
.category-card__icon--datafmt { background: linear-gradient(135deg, #4f46e5, #6366f1); }
.category-card__icon--configgen { background: linear-gradient(135deg, #d97706, #f59e0b); }
.category-card__icon--compliance { background: linear-gradient(135deg, #475569, #64748b); }
.category-card__icon--aiadmin { background: linear-gradient(135deg, #c026d3, #a855f7); }

.category-card__title {
  font-size: 1.125rem;
  font-weight: 800;
  margin: 0 0 8px;
}

.category-card__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 16px;
  line-height: 1.55;
}

.category-card__link { font-size: 0.8125rem; font-weight: 700; }
.category-card--system .category-card__link { color: #2563eb; }
.category-card--network .category-card__link { color: #059669; }
.category-card--database .category-card__link { color: #d97706; }
.category-card--security .category-card__link { color: #e11d48; }
.category-card--email .category-card__link { color: #7c3aed; }
.category-card--domain .category-card__link { color: #0891b2; }
.category-card--ip .category-card__link { color: #ea580c; }
.category-card--netdiag .category-card__link { color: #65a30d; }
.category-card--subnet .category-card__link { color: #4f46e5; }
.category-card--ssl .category-card__link { color: #0d9488; }
.category-card--http .category-card__link { color: #0284c7; }
.category-card--linux .category-card__link { color: #16a34a; }
.category-card--windows .category-card__link { color: #2563eb; }
.category-card--postgresql .category-card__link { color: #336791; }
.category-card--mysql .category-card__link { color: #00758f; }
.category-card--devops .category-card__link { color: #7c3aed; }
.category-card--logmon .category-card__link { color: #0d9488; }
.category-card--datafmt .category-card__link { color: #4f46e5; }
.category-card--configgen .category-card__link { color: #d97706; }
.category-card--compliance .category-card__link { color: #475569; }
.category-card--aiadmin .category-card__link { color: #c026d3; }

.tools-grid {
  display: grid;
  gap: 18px;
}
@media (min-width: 640px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tools-grid { grid-template-columns: repeat(3, 1fr); } }

.tool-card {
  display: block;
  padding: 24px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: all 0.25s;
}
.tool-card:hover {
  border-color: var(--tool-hover-border);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.tool-card__top { display: flex; align-items: flex-start; gap: 14px; }

.tool-card__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}
.tool-card__icon--system { background: #dbeafe; color: #2563eb; }
.tool-card__icon--network { background: #d1fae5; color: #059669; }
.tool-card__icon--database { background: #fef3c7; color: #d97706; }
.tool-card__icon--security { background: #ffe4e6; color: #e11d48; }
.tool-card__icon--email { background: #ede9fe; color: #7c3aed; }
.tool-card__icon--domain { background: #cffafe; color: #0891b2; }
.tool-card__icon--ip { background: #ffedd5; color: #ea580c; }
.tool-card__icon--netdiag { background: #ecfccb; color: #65a30d; }
.tool-card__icon--subnet { background: #e0e7ff; color: #4f46e5; }
.tool-card__icon--ssl { background: #ccfbf1; color: #0d9488; }
.tool-card__icon--http { background: #e0f2fe; color: #0284c7; }
.tool-card__icon--linux { background: #dcfce7; color: #16a34a; }
.tool-card__icon--windows { background: #dbeafe; color: #2563eb; }
.tool-card__icon--postgresql { background: #e2e8f0; color: #336791; }
.tool-card__icon--mysql { background: #fff7ed; color: #00758f; }
.tool-card__icon--devops { background: #ede9fe; color: #7c3aed; }
.tool-card__icon--logmon { background: #ccfbf1; color: #0d9488; }
.tool-card__icon--datafmt { background: #e0e7ff; color: #4f46e5; }
.tool-card__icon--configgen { background: #fef3c7; color: #d97706; }
.tool-card__icon--compliance { background: #f1f5f9; color: #475569; }
.tool-card__icon--aiadmin { background: #fae8ff; color: #c026d3; }

.tool-card__cat {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-light);
}

.tool-card__name {
  font-size: 1rem;
  font-weight: 800;
  margin: 4px 0 6px;
}

.tool-card__desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.tool-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.2s;
}
.tool-card:hover .tool-card__cta { opacity: 1; }

.features-strip {
  background: var(--features-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
}

.features-list {
  display: grid;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 768px) { .features-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-list { grid-template-columns: repeat(4, 1fr); } }

.features-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.features-list li svg { flex-shrink: 0; color: #10b981; margin-top: 2px; }

.cta-banner {
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 40%, #0891b2 100%);
  padding: 72px 24px;
  text-align: center;
}

.cta-banner__title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 900;
  color: #fff;
  margin: 0 0 14px;
}

.cta-banner__desc {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 520px;
  margin: 0 auto 28px;
}

.cta-banner .btn {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.page-hero {
  background: var(--page-hero-bg);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}

.page-hero__badge {
  display: inline-block;
  padding: 5px 12px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.page-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  margin: 0 0 10px;
}

.page-hero__desc {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 600px;
}

.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 64px 0 0;
  margin-top: auto;
}

.site-footer__grid {
  display: grid;
  gap: 40px;
  padding-bottom: 48px;
}
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .site-footer__grid { grid-template-columns: 1.5fr 1.2fr 0.9fr 0.8fr; } }

.site-footer__categories-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 24px;
}
@media (min-width: 480px) {
  .site-footer__categories-cols { grid-template-columns: 1fr 1fr; }
}

.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 0 64px;
}

.legal-page__title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 32px;
  color: var(--text);
}

.legal-page__section {
  margin-bottom: 28px;
}

.legal-page__section h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text);
}

.legal-page__section p {
  margin: 0 0 12px;
  line-height: 1.7;
  color: var(--text-muted);
}

.site-footer__brand p {
  margin: 16px 0 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #64748b;
}

.site-footer__heading {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f1f5f9;
  margin: 0 0 18px;
}

.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__links li { margin-bottom: 10px; }

.site-footer__links a {
  font-size: 0.875rem;
  color: #94a3b8;
  transition: color 0.2s;
}
.site-footer__links a:hover { color: #22d3ee; }

.site-footer__bottom {
  border-top: 1px solid #1e293b;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: #64748b;
}
@media (min-width: 640px) {
  .site-footer__bottom { flex-direction: row; justify-content: space-between; }
}

.ui-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.ui-card__title {
  font-size: 1.0625rem;
  font-weight: 800;
  margin: 0 0 20px;
}

.ui-input-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.ui-input,
.ui-textarea,
.ui-select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-white);
}
.ui-input:focus,
.ui-textarea:focus,
.ui-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.ui-textarea { font-family: var(--font-mono); min-height: 120px; resize: vertical; }

.ui-output {
  background: var(--output-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--output-color);
  overflow: auto;
  word-break: break-all;
}

.ui-output--green { color: #047857; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}
.back-link:hover { background: var(--primary-light); color: var(--primary); }

.section-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
}

.pill-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
}

/* ─── Dark mode ─── */
html[data-theme="dark"] {
  --bg: #0f172a;
  --bg-white: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --primary: #818cf8;
  --primary-light: #312e81;
  --accent: #22d3ee;
  --border: #334155;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(15, 23, 42, 0.95);
  --hero-bg: linear-gradient(160deg, #1e1b4b 0%, #0f172a 40%, #0c4a6e 100%);
  --page-hero-bg: linear-gradient(160deg, #1e1b4b 0%, #0f172a 100%);
  --features-bg: linear-gradient(90deg, #1e1b4b, #0c4a6e);
  --input-border: #475569;
  --output-bg: #0f172a;
  --output-color: #a5b4fc;
  --badge-border: #4338ca;
  --tool-hover-border: #6366f1;
  --btn-secondary-hover-bg: #334155;
  --btn-secondary-hover-border: #475569;
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="dark"] .site-logo__name { color: #f1f5f9; }

html[data-theme="dark"] .tool-card__icon--system { background: #1e3a5f; color: #93c5fd; }
html[data-theme="dark"] .tool-card__icon--network { background: #064e3b; color: #6ee7b7; }
html[data-theme="dark"] .tool-card__icon--database { background: #78350f; color: #fcd34d; }
html[data-theme="dark"] .tool-card__icon--security { background: #881337; color: #fda4af; }

html[data-theme="dark"] .hero__status {
  background: #064e3b;
  border-color: #059669;
  color: #6ee7b7;
}

html[data-theme="dark"] .ui-output--green { color: #6ee7b7; }

html[data-theme="dark"] .category-card--system .category-card__link { color: #93c5fd; }
html[data-theme="dark"] .category-card--network .category-card__link { color: #6ee7b7; }
html[data-theme="dark"] .category-card--database .category-card__link { color: #fcd34d; }
html[data-theme="dark"] .category-card--security .category-card__link { color: #fda4af; }
html[data-theme="dark"] .tool-card__icon--email { background: #4c1d95; color: #c4b5fd; }
html[data-theme="dark"] .category-card--email .category-card__link { color: #c4b5fd; }
html[data-theme="dark"] .tool-card__icon--domain { background: #164e63; color: #67e8f9; }
html[data-theme="dark"] .category-card--domain .category-card__link { color: #67e8f9; }
html[data-theme="dark"] .tool-card__icon--ip { background: #7c2d12; color: #fdba74; }
html[data-theme="dark"] .category-card--ip .category-card__link { color: #fdba74; }
html[data-theme="dark"] .tool-card__icon--netdiag { background: #365314; color: #bef264; }
html[data-theme="dark"] .category-card--netdiag .category-card__link { color: #bef264; }
html[data-theme="dark"] .tool-card__icon--subnet { background: #312e81; color: #a5b4fc; }
html[data-theme="dark"] .category-card--subnet .category-card__link { color: #a5b4fc; }
html[data-theme="dark"] .tool-card__icon--ssl { background: #134e4a; color: #5eead4; }
html[data-theme="dark"] .category-card--ssl .category-card__link { color: #5eead4; }
html[data-theme="dark"] .tool-card__icon--http { background: #0c4a6e; color: #7dd3fc; }
html[data-theme="dark"] .tool-card__icon--linux { background: #14532d; color: #86efac; }
html[data-theme="dark"] .tool-card__icon--windows { background: #1e3a8a; color: #93c5fd; }
html[data-theme="dark"] .tool-card__icon--postgresql { background: #1e293b; color: #94a3b8; }
html[data-theme="dark"] .tool-card__icon--mysql { background: #431407; color: #fdba74; }
html[data-theme="dark"] .tool-card__icon--devops { background: #4c1d95; color: #c4b5fd; }
html[data-theme="dark"] .category-card--http .category-card__link { color: #7dd3fc; }
html[data-theme="dark"] .category-card--linux .category-card__link { color: #86efac; }
html[data-theme="dark"] .category-card--windows .category-card__link { color: #93c5fd; }
html[data-theme="dark"] .category-card--postgresql .category-card__link { color: #94a3b8; }
html[data-theme="dark"] .category-card--mysql .category-card__link { color: #fdba74; }
html[data-theme="dark"] .category-card--devops .category-card__link { color: #c4b5fd; }
html[data-theme="dark"] .tool-card__icon--logmon { background: #134e4a; color: #5eead4; }
html[data-theme="dark"] .category-card--logmon .category-card__link { color: #5eead4; }
html[data-theme="dark"] .tool-card__icon--datafmt { background: #312e81; color: #a5b4fc; }
html[data-theme="dark"] .category-card--datafmt .category-card__link { color: #a5b4fc; }
html[data-theme="dark"] .tool-card__icon--configgen { background: #78350f; color: #fcd34d; }
html[data-theme="dark"] .category-card--configgen .category-card__link { color: #fcd34d; }
html[data-theme="dark"] .tool-card__icon--compliance { background: #334155; color: #cbd5e1; }
html[data-theme="dark"] .category-card--compliance .category-card__link { color: #cbd5e1; }
html[data-theme="dark"] .tool-card__icon--aiadmin { background: #701a75; color: #f0abfc; }
html[data-theme="dark"] .category-card--aiadmin .category-card__link { color: #f0abfc; }

html[data-theme="light"] {
  color-scheme: light;
}

/* ── Admin panel ── */
.admin-shell {
  min-height: 100vh;
  background: var(--bg);
}

.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 20px 14px;
  overflow-y: auto;
}

.admin-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.admin-logo__mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.admin-logo__mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.admin-logo__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.admin-logo__name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-logo__tagline {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.admin-sidebar__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 28px;
  padding: 0 6px 16px;
  border-bottom: 1px solid var(--border);
}

.admin-sidebar__badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  padding: 3px 10px;
  border-radius: 999px;
}

.admin-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.admin-sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}

.admin-sidebar__link:hover {
  background: var(--bg);
  color: var(--text);
}

.admin-sidebar__link--active {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
  font-weight: 600;
}

.admin-sidebar__footer {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-sidebar__email {
  font-size: 12px;
  color: var(--text-muted);
  padding: 0 12px 10px;
  word-break: break-all;
  margin: 0;
}

.admin-sidebar__logout {
  color: #ef4444;
}

.admin-main {
  margin-left: 260px;
  min-height: 100vh;
  min-width: 0;
}

.admin-main__inner {
  width: 100%;
  max-width: none;
  padding: 28px 32px 48px;
}

.admin-header {
  margin-bottom: 24px;
}

.admin-header__title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
  line-height: 1.2;
}

.admin-header__subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

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

.admin-stat {
  padding: 20px !important;
}

.admin-stat__label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.admin-stat__value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.admin-stat__value--ok { color: #22c55e; }
.admin-stat__value--bad { color: #ef4444; }

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-empty {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

.admin-status-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.8;
  color: var(--text-muted);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.admin-toolbar .ui-input {
  margin-bottom: 0;
  min-width: 220px;
}

.admin-toolbar .ui-select {
  margin-bottom: 0;
  min-width: 160px;
}

.admin-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-badge--ok {
  background: #dcfce7;
  color: #166534;
}

.admin-badge--off {
  background: #fee2e2;
  color: #991b1b;
}

.admin-badge--role {
  background: var(--primary-light);
  color: var(--primary);
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-btn-sm {
  font-size: 13px;
  padding: 6px 12px;
}

.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-note {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 16px;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--hero-bg);
}

.admin-login__card {
  width: 100%;
  max-width: 420px;
}

.admin-login__subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 24px;
}

.admin-login__error {
  color: #ef4444;
  font-size: 14px;
  margin: 0 0 16px;
}

.admin-settings {
  display: grid;
  gap: 24px;
}

.admin-settings__email {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 20px;
}

.admin-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.admin-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.admin-msg {
  font-size: 14px;
  margin: 0 0 16px;
  color: var(--primary);
}

html[data-theme="dark"] {
  --surface: #1e293b;
}

html[data-theme="dark"] .admin-badge--ok {
  background: #14532d;
  color: #86efac;
}

html[data-theme="dark"] .admin-badge--off {
  background: #7f1d1d;
  color: #fca5a5;
}

.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.admin-settings-grid__wide {
  grid-column: 1 / -1;
}

.admin-form-card {
  margin-bottom: 24px;
}

.admin-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.admin-roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.admin-role-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.admin-perms-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-table__meta {
  font-size: 12px;
  color: var(--text-muted);
}

.admin-badge--warn {
  background: #fef3c7;
  color: #92400e;
}

.admin-link-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.admin-link-btn:hover {
  background: var(--surface);
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.admin-pagination__info {
  font-size: 14px;
  color: var(--text-muted);
}

.admin-toolbar--wrap {
  flex-wrap: wrap;
}

.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.admin-modal {
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15);
}

.admin-modal__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
}

.admin-modal__desc {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.admin-modal__scope {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.admin-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
}

.admin-locale-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-muted, #f8fafc);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.admin-locale-grid__actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.admin-locale-grid__actions button {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

.admin-checkbox--compact {
  margin-bottom: 0;
  font-size: 13px;
}

.admin-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.admin-logo-preview {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--bg-muted, #f8fafc);
}

.admin-logo-preview img {
  max-height: 48px;
  width: auto;
}

.admin-code-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

html[data-theme="dark"] .admin-badge--warn {
  background: #78350f;
  color: #fde68a;
}

html[data-theme="dark"] .admin-locale-grid {
  background: #0f172a;
}

.admin-settings-tabs {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: var(--bg-muted, #f1f5f9);
  border: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
  border-bottom: none;
}

.admin-tabs__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.admin-tabs__btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.6);
}

.admin-tabs__btn--active {
  background: var(--surface, #fff);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.admin-settings-panel {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.admin-settings-panel__footer {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.admin-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.admin-logo-slot {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: var(--bg-muted, #f8fafc);
}

.admin-logo-slot__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.admin-logo-slot__head strong {
  font-size: 14px;
}

.admin-logo-slot__head span {
  font-size: 12px;
  color: var(--text-muted);
}

.admin-logo-slot__preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  margin-bottom: 12px;
  padding: 12px;
  background: var(--surface, #fff);
  border-radius: 8px;
  border: 1px dashed var(--border);
}

.admin-logo-slot__preview img {
  max-height: 48px;
  max-width: 100%;
  object-fit: contain;
}

.admin-logo-slot__preview--favicon img {
  max-height: 32px;
  max-width: 32px;
}

.admin-logo-slot__preview span {
  font-size: 12px;
  color: var(--text-muted);
}

.admin-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.admin-upload-btn input {
  display: none;
}

.admin-upload-btn:hover {
  border-color: var(--primary);
}

.admin-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.admin-icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99, 102, 241, 0.06);
}

.admin-icon-btn--primary {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--primary);
}

.admin-icon-btn--danger:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.admin-icon-btn--ghost {
  background: transparent;
}

.admin-icon-btn--disabled,
.admin-icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.admin-actions--icons {
  gap: 6px;
}

.admin-category-path {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  line-height: 1.3;
}

.admin-category-path__sep {
  display: none;
}

.admin-category-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.admin-role-footer {
  margin-top: 4px;
}

html[data-theme="dark"] .admin-tabs {
  background: #0f172a;
}

html[data-theme="dark"] .admin-tabs__btn--active {
  background: var(--surface, #1e293b);
}

html[data-theme="dark"] .admin-logo-slot {
  background: #0f172a;
}

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

@media (max-width: 900px) {
  .admin-sidebar {
    position: relative;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .admin-main {
    margin-left: 0;
  }
  .admin-main__inner {
    padding: 20px 16px 32px;
  }
  .admin-form-row {
    grid-template-columns: 1fr;
  }
}
