:root {
  --bg: #f4f6f8;
  --panel: #fff;
  --soft: #f8fafc;
  --text: #17202a;
  --muted: #687385;
  --line: #dce3ea;
  --primary: #246bfe;
  --primary-dark: #174fc1;
  --red: #d93025;
  --shadow: 0 16px 45px rgba(23, 32, 42, .08);
  --scroll-track: rgba(196, 221, 244, .72);
  --scroll-thumb: linear-gradient(180deg, #4f25e8, #0fa7f3);
}

* { box-sizing: border-box; }
html {
  min-width: 320px;
  background: #eaf6ff;
  scroll-behavior: auto;
  scrollbar-color: #2b7fe8 rgba(196, 221, 244, .72);
  scrollbar-width: thin;
}
html, body { margin: 0; min-height: 100%; font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif; color: var(--text); }
body { min-width: 320px; background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
form { margin: 0; }
img { display: block; max-width: 100%; }

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.template-rail::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.template-rail::-webkit-scrollbar-track {
  background: rgba(196, 221, 244, .72);
  border-radius: 999px;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.template-rail::-webkit-scrollbar-thumb {
  border: 2px solid rgba(196, 221, 244, .72);
  border-radius: 999px;
  background: linear-gradient(180deg, #4f25e8, #0fa7f3);
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.template-rail::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #643cf0, #25b8ff);
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

.alert { margin-bottom: 14px; padding: 10px 12px; border-radius: 6px; color: #842029; background: #f8d7da; font-size: 14px; }
.alert.inline { margin-bottom: 18px; }

.login-page {
  position: relative;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(32px, 5vw, 88px);
  place-items: center end;
  background: url("/static/images/laihai-template-library/login-bg.png") center / cover no-repeat;
  color: #fff;
}

.login-page__logo {
  position: absolute;
  z-index: 2;
  top: clamp(24px, 3vw, 48px);
  left: clamp(24px, 4vw, 72px);
  width: clamp(144px, 12vw, 228px);
  height: auto;
}

.login-panel {
  position: relative;
  z-index: 3;
  width: min(508px, 100%);
  padding: clamp(38px, 4.5vw, 66px);
  border: 1px solid rgb(255 255 255 / .2);
  border-radius: 28px;
  background: rgb(3 14 27 / .48);
  box-shadow: 0 0 48px rgb(24 170 255 / .22), inset 0 0 34px rgb(255 255 255 / .04);
  backdrop-filter: blur(12px);
}

.login-panel::before,
.login-panel::after {
  position: absolute;
  left: 36px;
  right: 36px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #16b7ff, transparent);
  content: "";
}

.login-panel::before { top: -1px; }
.login-panel::after { bottom: -1px; }
.login-panel h1 { margin: 0 0 16px; font-size: clamp(26px, 2vw, 33px); font-weight: 500; line-height: 1.25; }
.login-panel h1 span { color: #0aa7ff; }
.login-panel p { margin: 0 0 36px; color: rgb(255 255 255 / .78); font-size: 18px; }
.login-alert { border: 1px solid rgb(255 255 255 / .2); color: #fff; background: rgb(190 18 60 / .58); }

.login-panel__field {
  display: flex;
  align-items: center;
  height: 50px;
  margin-top: 24px;
  padding: 0 18px;
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: 7px;
  background: rgb(255 255 255 / .08);
  color: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.login-panel__field:focus-within {
  border-color: rgb(22 183 255 / .72);
  box-shadow: 0 0 0 3px rgb(22 183 255 / .12);
  background: rgb(255 255 255 / .1);
}

.login-page .field-icon { display: inline-flex; flex: 0 0 auto; }
.login-panel__field input {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  margin-left: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
  background: transparent !important;
  color: #fff;
}

.login-panel__field input::placeholder { color: rgb(255 255 255 / .54); }
.login-panel__field input:focus {
  border: 0;
  box-shadow: none;
  outline: 0;
}

.login-panel__field input:-webkit-autofill,
.login-panel__field input:-webkit-autofill:hover,
.login-panel__field input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  box-shadow: 0 0 0 1000px transparent inset !important;
  transition: background-color 9999s ease-in-out 0s;
  caret-color: #fff;
}

.login-panel__field--password input { padding-right: 10px; }
.password-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin-left: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgb(255 255 255 / .74);
  transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: #fff;
  background: rgb(255 255 255 / .12);
  outline: none;
}

.password-toggle:active { transform: scale(.96); }
.password-toggle__icon--hide { display: none; }
.password-toggle.is-visible .password-toggle__icon--show { display: none; }
.password-toggle.is-visible .password-toggle__icon--hide { display: block; }

.login-panel button[type="submit"] {
  width: 100%;
  height: 48px;
  margin-top: 24px;
  border-radius: 10px;
  background: linear-gradient(90deg, #4f25e8, #0da9f3);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 28px rgb(16 116 255 / .28);
  transition: transform .2s ease, box-shadow .2s ease;
}

.login-panel button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgb(16 116 255 / .36);
}

.login-panel__tip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
  color: rgb(255 255 255 / .58);
  font-size: 14px;
}

.login-panel__tip::before,
.login-panel__tip::after {
  height: 1px;
  flex: 1;
  background: rgb(255 255 255 / .56);
  content: "";
}

.home-page {
  min-height: 100vh;
  overflow: hidden;
  background: #eaf6ff;
}

.hero {
  position: relative;
  min-height: 48vw;
  padding: clamp(112px, 12vw, 238px) 24px clamp(42px, 5vw, 76px);
  background: url("/static/images/laihai-template-library/home-header-bg.png") center / cover no-repeat;
  text-align: center;
}

.home-header {
  position: absolute;
  z-index: 2;
  top: clamp(18px, 2.6vw, 42px);
  left: clamp(18px, 4vw, 72px);
  right: clamp(18px, 4vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.home-page .home-header img {
  width: clamp(128px, 12vw, 214px);
  height: auto;
}

.home-user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #07182b;
  font-size: 14px;
  font-weight: 700;
}

.home-page .home-user a,
.home-page .home-user button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgb(11 68 118 / .18);
  border-radius: 999px;
  background: rgb(255 255 255 / .72);
  color: #102033;
  backdrop-filter: blur(8px);
}

.hero__title {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #07182b;
  font-size: clamp(36px, 5.2vw, 86px);
  font-style: italic;
  font-weight: 900;
  line-height: 1.12;
}

.hero__subtitle {
  position: relative;
  z-index: 1;
  margin: 26px 0 34px;
  color: #0d1e31;
  font-size: clamp(16px, 1.55vw, 28px);
}

.library-search {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 18px;
}

.home-page .search-box {
  display: flex;
  align-items: center;
  width: min(1280px, 86vw);
  height: clamp(72px, 7.2vw, 140px);
  margin: 0 auto;
  padding: 0 clamp(28px, 4vw, 66px);
  border-radius: clamp(20px, 2vw, 34px);
  background: rgb(255 255 255 / .76);
  box-shadow: 0 20px 70px rgb(52 123 194 / .22);
  color: #07182b;
  backdrop-filter: blur(10px);
}

.home-page .search-box svg { flex: 0 0 auto; }
.home-page .search-box input {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  margin-left: clamp(18px, 3vw, 44px);
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
  background: transparent !important;
  color: #19283a;
  font-size: clamp(17px, 1.6vw, 30px);
}

.home-page .search-box input::placeholder { color: rgb(37 44 52 / .48); }
.home-page .search-box input:focus {
  border: 0;
  box-shadow: none;
  outline: 0;
}

.home-page .search-box input:-webkit-autofill,
.home-page .search-box input:-webkit-autofill:hover,
.home-page .search-box input:-webkit-autofill:focus {
  -webkit-text-fill-color: #19283a;
  box-shadow: 0 0 0 1000px transparent inset !important;
  transition: background-color 9999s ease-in-out 0s;
  caret-color: #19283a;
}

.home-page .library-filter {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 16px;
}

.home-page .filter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.home-page .industry-select {
  min-width: 180px;
  min-height: 44px;
  padding: 0 clamp(22px, 3vw, 36px) 0 18px;
  border: 1px solid rgb(7 24 43 / .16);
  border-radius: 999px;
  background: rgb(255 255 255 / .84) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2307111f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center no-repeat;
  color: #132235;
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 600;
  appearance: none;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.home-page .industry-select:focus {
  border-color: #078cff;
  box-shadow: 0 0 0 3px rgb(7 140 255 / .18);
  outline: none;
}

.home-page .industry-select option {
  font-weight: 400;
  background: #fff;
  color: #132235;
}

.home-page .category-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px clamp(20px, 3vw, 58px);
  margin-top: 30px;
}

.home-page .category-tabs a {
  color: #161f2a;
  font-size: clamp(16px, 1.6vw, 28px);
  transition: color .2s ease, transform .2s ease;
}

.home-page .category-tabs a.active,
.home-page .category-tabs a:hover {
  color: #078cff;
  transform: translateY(-2px);
}

.library-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: min(1180px, calc(100vw - 48px));
  margin: 34px auto 0;
}

.library-stats div {
  padding: 18px;
  border: 1px solid rgb(41 118 181 / .14);
  border-radius: 8px;
  background: rgb(255 255 255 / .72);
  box-shadow: 0 14px 32px rgb(24 93 161 / .08);
}

.library-stats strong { display: block; color: #07182b; font-size: 28px; }
.library-stats span { color: #506176; font-size: 13px; }
.library-empty {
  width: min(980px, calc(100vw - 40px));
  margin: 44px auto;
  padding: 34px;
  border: 1px dashed rgb(52 123 194 / .35);
  border-radius: 8px;
  background: rgb(255 255 255 / .68);
  color: #506176;
  text-align: center;
}

.home-page .template-section {
  position: relative;
  z-index: 2;
  display: grid;
  gap: clamp(34px, 5vw, 78px);
  padding: 40px 0 72px;
}

.home-page .template-rail {
  width: 100%;
  overflow: hidden;
  overscroll-behavior: contain;
  padding: 18px 0 26px;
  user-select: none;
}

.home-page .template-rail__track {
  display: flex;
  gap: clamp(28px, 3vw, 58px);
  width: max-content;
  padding: 0;
  will-change: transform;
}

.home-page .showcase-card {
  width: clamp(260px, 24vw, 460px);
  min-width: 0;
  flex: 0 0 auto;
}

.home-page .showcase-card__viewport {
  position: relative;
  display: block;
  height: clamp(400px, 42vw, 780px);
  overflow: hidden;
  border: 2px solid rgb(255 255 255 / .72);
  border-radius: 20px;
  background: #111827;
  box-shadow: 0 24px 54px rgb(24 93 161 / .28);
  transition: transform .28s ease, box-shadow .28s ease;
}

.home-page .showcase-card__viewport::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgb(0 0 0 / .28)), radial-gradient(circle at 50% 42%, transparent 44%, rgb(0 0 0 / .18));
  content: "";
  opacity: 0;
  transition: opacity .28s ease;
}

.home-page .showcase-card__image {
  width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 1s ease;
  will-change: transform;
}

.home-page .showcase-card:hover .showcase-card__viewport {
  transform: translateY(-8px) scale(1.018);
  box-shadow: 0 28px 70px rgb(22 123 232 / .34), 0 0 0 1px #0fa7f3;
}

.home-page .showcase-card:hover .showcase-card__viewport::after { opacity: 1; }
.home-page .showcase-card:hover .showcase-card__image {
  transform: translateY(calc(-100% + clamp(400px, 42vw, 780px)));
  transition-duration: 10s;
}

.home-page .showcase-card:hover .showcase-card__demo {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.home-page .showcase-card__demo {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 118px;
  height: 46px;
  border: 1px solid rgb(255 255 255 / .78);
  border-radius: 999px;
  background: linear-gradient(90deg, #4027dd, #0fa7f3);
  color: #fff;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -40%) scale(.92);
  transition: opacity .24s ease, transform .24s ease;
}

.home-page .showcase-card__title {
  margin: 18px 0 0;
  color: #0a1422;
  font-size: clamp(19px, 1.6vw, 28px);
  text-align: center;
}

.tag,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.tag {
  color: #255185;
  background: #e9f3ff;
}

.home-page .site-footer {
  padding: 36px 20px 54px;
  color: #07111f;
  font-size: clamp(18px, 1.6vw, 28px);
  text-align: center;
}

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px; border-radius: 6px; font-weight: 700; background: #eef2f6; }
.btn.primary { color: #fff; background: var(--primary); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.ghost { border: 1px solid var(--line); background: #fff; }
.btn.danger { color: #fff; background: var(--red); }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 13px; }
.hint { margin: 18px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); background: var(--bg); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #111827; color: #e5edf7; }
.brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; color: #fff; font-weight: 800; background: var(--primary); }
.brand-row h2 { margin: 0; font-size: 20px; }
.brand-row p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.sidebar .brand-row { margin: 0; padding: 24px 20px; }
.sidebar .brand-row p { color: #93a4b8; }
.nav { display: grid; gap: 6px; padding: 8px 12px; }
.nav a { display: flex; align-items: center; min-height: 42px; padding: 0 12px; border-radius: 6px; color: #cbd5e1; }
.nav a.active, .nav a:hover { color: #fff; background: rgba(255,255,255,.1); }
.sidebar-footer { margin-top: auto; padding: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.user-pill { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 14px; font-weight: 800; background: #2f80ed; }
.user-pill strong { display: block; }
.user-pill span { color: #93a4b8; font-size: 12px; }

.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 74px; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(244,246,248,.92); backdrop-filter: blur(12px); }
.topbar h1 { margin: 0; font-size: 22px; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.content { padding: 28px; }
.content.narrow { max-width: 920px; }

.form-grid, .panel-form { display: grid; gap: 16px; }
.panel-form { grid-template-columns: 1fr 1fr; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
label { display: grid; gap: 7px; color: #344054; font-size: 13px; font-weight: 650; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 11px 12px; color: var(--text); background: #fff; outline: none; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(36,107,254,.14); }
.full { grid-column: 1 / -1; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.stat strong { display: block; font-size: 28px; }
.stat span { color: var(--muted); font-size: 13px; }
.filters { display: grid; grid-template-columns: minmax(220px, 1fr) 160px 160px 92px; gap: 12px; margin-bottom: 18px; }

.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.template-card { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: 0 8px 22px rgba(23,32,42,.04); }
.thumb { position: relative; aspect-ratio: 16 / 10; min-height: 188px; background: var(--soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .badge { position: absolute; top: 10px; left: 10px; }
.template-body { display: grid; gap: 12px; padding: 15px; }
.template-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.template-title h2 { margin: 0; font-size: 16px; }
.template-body p { min-height: 42px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.meta-row, .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions { justify-content: flex-end; }
.badge.active { color: #0f5132; background: #d1e7dd; }
.badge.disabled { color: #842029; background: #f8d7da; }
.badge.role { color: #4338ca; background: #e0e7ff; }
.empty { padding: 34px; border: 1px dashed #c9d4df; border-radius: 8px; color: var(--muted); text-align: center; background: #fff; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: min(1180px, calc(100vw - 48px)); margin: 0 auto 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.app-shell .pagination { width: auto; margin: 20px 0 0; }
.pagination-summary { color: var(--muted); font-size: 13px; }
.pagination-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pagination a, .pagination span.current, .pagination span.disabled { min-width: 34px; min-height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border-radius: 6px; font-size: 13px; font-weight: 700; }
.pagination a { border: 1px solid var(--line); background: #fff; }
.pagination a:hover, .pagination span.current { color: #fff; border-color: var(--primary); background: var(--primary); }
.pagination span.disabled { color: #9aa5b1; background: #eef2f6; }

.panel { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--soft); }
.panel-head h2 { margin: 0; font-size: 16px; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: #526071; font-size: 12px; font-weight: 800; background: var(--soft); }
tr:last-child td { border-bottom: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }

.preview-frame { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.preview-hero { min-height: 360px; display: grid; align-items: end; padding: 36px; color: #fff; background-position: center; background-size: cover; }
.preview-hero h2 { max-width: 680px; margin: 0 0 12px; font-size: clamp(34px, 5vw, 58px); line-height: 1.08; }
.preview-hero p { max-width: 620px; margin: 0; color: rgba(255,255,255,.84); font-size: 17px; line-height: 1.7; }
.preview-content { padding: 30px; }
.preview-blocks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.preview-block { min-height: 110px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.preview-block strong { display: block; margin-bottom: 8px; }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .sidebar-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .template-grid, .stats-grid, .library-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .login-page { place-items: end center; padding: 112px 20px 30px; }
  .hero { min-height: 640px; padding-top: 128px; }
  .home-page .showcase-card { width: min(72vw, 340px); }
  .home-page .showcase-card__viewport { height: 500px; }
  .home-page .showcase-card:hover .showcase-card__image { transform: translateY(calc(-100% + 500px)); }
}

@media (max-width: 720px) {
  .content { padding: 20px; }
  .topbar, .sidebar-footer { align-items: stretch; flex-direction: column; padding: 18px 20px; }
  .filters, .panel-form, .template-grid, .stats-grid, .preview-blocks, .dashboard-grid, .library-stats { grid-template-columns: 1fr; }
  .pagination { align-items: stretch; flex-direction: column; width: calc(100vw - 32px); }
  .pagination-links { justify-content: center; }
.table-wrap { overflow-x: auto; }
.table-wrap { overscroll-behavior: contain; }
  table { min-width: 680px; }
}

@media (max-width: 560px) {
  .login-panel { padding: 30px 22px; border-radius: 22px; }
  .home-page .home-header { align-items: flex-start; flex-direction: column; }
  .home-page .home-user { flex-wrap: wrap; }
  .home-page .search-box { width: calc(100vw - 32px); }
  .home-page .category-tabs { gap: 12px 18px; }
  .home-page .hero__title { font-size: 36px; }
}
