:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-2: #eef3f1;
  --ink: #151718;
  --muted: #66706c;
  --line: #dbe3df;
  --teal: #00ad9f;
  --teal-strong: #008a80;
  --blue: #2b6fe0;
  --red: #c43d4b;
  --amber: #b56a00;
  --shadow: 0 20px 45px rgba(15, 33, 33, 0.08);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(0, 173, 159, 0.09), rgba(255, 255, 255, 0) 260px),
    var(--bg);
}

body.auth-locked {
  overflow: hidden;
}

body.auth-locked .app-shell {
  display: none;
}

body:not(.auth-locked) .auth-screen {
  display: none;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(360px, 520px);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  padding: clamp(24px, 6vw, 72px);
  background:
    linear-gradient(135deg, rgba(0, 173, 159, 0.16), rgba(255, 255, 255, 0) 48%),
    linear-gradient(180deg, #f8fbfa, #edf4f2);
}

.auth-visual {
  display: grid;
  align-content: center;
  min-height: min(640px, 72vh);
  border: 1px solid rgba(0, 173, 159, 0.18);
  border-radius: 18px;
  padding: clamp(28px, 5vw, 64px);
  color: #071c1a;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(238, 248, 246, 0.74)),
    repeating-linear-gradient(90deg, rgba(0, 173, 159, 0.08) 0 1px, transparent 1px 44px);
  box-shadow: var(--shadow);
}

.auth-mark {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border-radius: 16px;
  color: #00211f;
  background: linear-gradient(135deg, #20e2cf, #9af2d0);
  font-size: 26px;
  font-weight: 900;
}

.auth-visual h1 {
  margin-top: 28px;
  max-width: 680px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 0.98;
}

.auth-visual p {
  margin-top: 18px;
  max-width: 560px;
  color: var(--muted);
  font-size: 19px;
}

.auth-card {
  display: grid;
  gap: 18px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(24px, 4vw, 38px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 70px rgba(17, 40, 38, 0.16);
}

.auth-card-heading {
  display: grid;
  gap: 7px;
  margin-bottom: 4px;
}

.auth-card-heading span {
  color: var(--teal-strong);
  font-size: 13px;
  font-weight: 800;
}

.auth-card-heading strong {
  font-size: 30px;
  line-height: 1.1;
}

.auth-message {
  min-height: 22px;
  color: var(--muted);
  font-size: 14px;
}

.auth-message.error {
  color: var(--red);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a.secondary,
a.primary {
  text-decoration: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  color: #031918;
  background: linear-gradient(135deg, #20e2cf, #95f0c7);
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.hint,
.quiet,
.metric span,
.panel-heading span,
.empty-state p,
.meta {
  color: var(--muted);
}

.primary,
.secondary,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius);
  font-weight: 650;
  white-space: nowrap;
}

.primary {
  color: #001d1b;
  background: var(--teal);
}

.primary:hover {
  background: #18c6b8;
}

.secondary {
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--surface);
}

.secondary:hover {
  border-color: #b8c5c0;
}

.danger {
  color: #fff;
  background: var(--red);
}

.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.full {
  width: 100%;
}

.icon-btn {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  font-size: 20px;
  line-height: 1;
}

.icon-btn:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.side-section {
  display: grid;
  gap: 10px;
}

.side-actions {
  display: grid;
  gap: 8px;
}

.side-actions .secondary {
  width: 100%;
  min-width: 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.account-list {
  display: grid;
  gap: 8px;
}

.account-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 11px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: inherit;
  text-align: left;
  background: transparent;
}

.account-item:hover,
.account-item.active {
  border-color: var(--line);
  background: var(--surface);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9aa4a0;
}

.status-dot.ok {
  background: var(--teal-strong);
}

.status-dot.error {
  background: var(--red);
}

.status-dot.loading {
  background: var(--amber);
}

.account-name,
.site-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.account-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace {
  display: grid;
  align-content: start;
  gap: 20px;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.1;
}

h2 {
  font-size: 18px;
}

.topbar p {
  margin-top: 8px;
  color: var(--muted);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}

.metric {
  display: grid;
  gap: 7px;
  min-height: 86px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(24, 38, 35, 0.04);
}

.metric strong {
  font-size: 28px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px 160px;
  gap: 12px;
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
}

textarea {
  padding: 12px;
  resize: vertical;
}

.file-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px;
  background: var(--surface);
}

.file-label,
#deployFileLabel {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal-strong);
  box-shadow: 0 0 0 3px rgba(0, 173, 159, 0.18);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
}

.deploy-records-panel {
  overflow: hidden;
}

.record-table {
  min-width: 860px;
}

.record-site {
  display: grid;
  gap: 4px;
}

.record-site a {
  width: fit-content;
}

.panel,
.detail-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

tr.selectable {
  cursor: pointer;
}

tr.selectable:hover td,
tr.selected td {
  background: #f1f8f6;
}

.site-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.domain-line {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #21403d;
  background: #dff6f1;
  font-size: 12px;
  font-weight: 800;
}

.pill.error {
  color: #7e1e29;
  background: #ffe1e5;
}

.pill.warn {
  color: #6d4100;
  background: #ffefd4;
}

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

.detail-panel {
  padding: 18px;
  align-self: start;
  position: sticky;
  top: 20px;
}

.detail-view {
  display: grid;
  gap: 16px;
}

.detail-title {
  display: grid;
  gap: 4px;
}

.detail-title h2 {
  overflow-wrap: anywhere;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-list div {
  display: grid;
  gap: 3px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.empty-state {
  display: grid;
  min-height: 260px;
  place-content: center;
  gap: 8px;
  text-align: center;
}

.dialog {
  width: min(520px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dialog.wide {
  width: min(760px, calc(100vw - 28px));
}

.dialog::backdrop {
  background: rgba(9, 20, 19, 0.42);
}

.dialog form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

menu {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  padding: 0;
}

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

.form-section-title {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.split-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.link-row input {
  min-width: 0;
}

.order-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.order-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #f8fbfa;
}

.order-item a {
  color: inherit;
  text-decoration: none;
}

.order-money {
  font-weight: 800;
  white-space: nowrap;
}

.template-file-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.console-output {
  min-height: 170px;
  max-height: 360px;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  color: #d7fff8;
  background: #10201f;
  white-space: pre-wrap;
}

.progress-box {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--muted);
  background: #f8fbfa;
  white-space: pre-wrap;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(440px, calc(100vw - 40px));
  padding: 13px 15px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: 160ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.front-body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(0, 173, 159, 0.12), rgba(255, 255, 255, 0) 320px),
    #f6f7f4;
}

.front-login {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(340px, 460px);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  min-height: 100vh;
  padding: clamp(24px, 6vw, 76px);
}

.front-hero {
  display: grid;
  align-content: center;
  min-height: min(620px, 72vh);
  border-radius: 18px;
  padding: clamp(28px, 5vw, 64px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(229, 246, 242, 0.72)),
    repeating-linear-gradient(90deg, rgba(0, 173, 159, 0.08) 0 1px, transparent 1px 46px);
  box-shadow: var(--shadow);
}

.front-hero h1 {
  margin-top: 26px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
}

.front-hero p {
  margin-top: 16px;
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
}

.front-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(24px, 4vw, 36px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 28px 70px rgba(17, 40, 38, 0.14);
}

.front-card p {
  color: var(--muted);
}

.front-login-btn {
  min-height: 46px;
}

.front-dashboard {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.front-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.front-record-section {
  display: grid;
  gap: 10px;
}

.front-record-list {
  display: grid;
  gap: 8px;
}

.front-record-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
}

.front-record-item:hover {
  border-color: var(--teal-strong);
  background: #f1f8f6;
}

.front-main {
  display: grid;
  align-content: start;
  gap: 20px;
  padding: 30px;
}

.front-profile-panel {
  overflow: hidden;
}

.front-template-panel {
  overflow: hidden;
}

.front-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.template-choice {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
}

.template-choice:hover {
  border-color: var(--teal-strong);
  background: #f1f8f6;
}

.template-choice strong,
.template-choice span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-choice span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.front-deploy-result {
  margin: 0 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #f8fbfa;
  overflow-wrap: anywhere;
}

.front-profile {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
  align-items: start;
}

.front-profile img {
  width: 92px;
  height: 92px;
  border-radius: 18px;
  object-fit: cover;
  background: var(--surface-2);
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }

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

  .detail-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .front-login,
  .front-dashboard {
    grid-template-columns: 1fr;
  }

  .front-nav {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .auth-screen {
    grid-template-columns: 1fr;
    align-content: center;
    overflow-y: auto;
  }

  .auth-visual {
    min-height: auto;
    padding: 24px;
  }

  .auth-visual h1 {
    font-size: 38px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workspace {
    padding: 20px;
  }

  .topbar {
    display: grid;
  }

  .side-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metrics,
  .toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .search-wrap {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .front-login,
  .front-main,
  .front-nav {
    padding: 16px;
  }

  .front-hero {
    display: none;
  }

  .front-profile {
    grid-template-columns: 1fr;
  }

  .auth-screen {
    padding: 16px;
  }

  .auth-visual {
    display: none;
  }

  .workspace,
  .sidebar {
    padding: 16px;
  }

  h1 {
    font-size: 25px;
  }

  .metrics,
  .toolbar,
  .template-file-grid,
  .front-template-grid,
  .console-row,
  .link-row {
    grid-template-columns: 1fr;
  }

  menu {
    width: 100%;
  }

  menu button {
    flex: 1;
  }

  .side-actions {
    grid-template-columns: 1fr;
  }
}

/* Snacked 1:1 dashboard layer. Keep this at the end so it wins over the old UI. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body.snacked-admin,
body.snacked-front {
  background: #f7f8fa !important;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.auth-locked .manager-wrapper {
  display: none !important;
}

.snacked-auth {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100dvh;
  overflow-y: auto;
  padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  place-items: center;
  background:
    radial-gradient(circle at top left, rgba(53, 94, 252, 0.16), transparent 32rem),
    linear-gradient(135deg, #f7f8fa 0%, #eef3ff 100%);
}

.snacked-auth .auth-card {
  display: block;
  width: min(460px, 100%);
  border: 0;
  padding: 0;
  background: #fff;
}

.logo-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #355efc, #5b41d9);
  font-weight: 800;
}

.manager-wrapper.wrapper {
  background: #f7f8fa;
}

.top-header {
  border-bottom: 1px solid #e7eaf0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(35, 45, 62, 0.06);
}

.top-header .navbar {
  min-height: 68px;
}

.top-header .searchbar .form-control {
  width: min(480px, 48vw);
  height: 38px;
  border-radius: 999px;
  background: #f8f9fb;
}

.top-header .navbar .nav-link {
  display: grid;
  min-width: 40px;
  min-height: 40px;
  place-items: center;
  border-radius: 10px;
}

.sidebar-wrapper {
  border-right: 1px solid #e7eaf0;
  background: #fff !important;
}

.sidebar-wrapper .sidebar-header {
  height: 68px;
  border-bottom: 1px solid #e7eaf0;
}

.sidebar-wrapper .logo-text {
  color: #355efc;
  font-size: 24px;
  font-weight: 500;
}

.sidebar-wrapper .metismenu a {
  min-height: 44px;
  border-radius: 4px;
  color: #666f7b;
}

.sidebar-wrapper .metismenu li.mm-active > a,
.sidebar-wrapper .metismenu a:hover {
  color: #355efc;
  background: #e9edff;
}

.sidebar-wrapper .menu-label {
  margin: 16px 0 8px;
  color: #b0b5bf;
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
}

.sidebar-panel {
  min-width: 0;
}

.sidebar-wrapper .account-list,
.front-record-list {
  display: grid;
  gap: 8px;
}

.sidebar-wrapper .account-list .empty-state {
  min-height: auto;
  place-content: stretch;
  border: 1px dashed #d8dde8;
  border-radius: 8px;
  padding: 12px;
  text-align: left;
  background: #f8f9fb;
}

.sidebar-wrapper .account-list .empty-state p {
  margin: 0;
  color: #6c757d;
  font-size: 12px;
  line-height: 1.55;
}

.sidebar-wrapper .account-list .storage-warning {
  border-color: #ffd8a8;
  background: #fff8ef;
}

.sidebar-wrapper .account-item,
.front-record-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  border: 1px solid #e7eaf0;
  border-radius: 8px;
  padding: 10px;
  color: #2f3640;
  text-align: left;
  text-decoration: none;
  background: #fff;
}

.sidebar-wrapper .account-item:hover,
.sidebar-wrapper .account-item.active,
.front-record-item:hover {
  border-color: #355efc;
  box-shadow: 0 6px 18px rgba(53, 94, 252, 0.10);
}

.front-record-title {
  text-decoration: none;
}

.front-record-title:hover {
  color: #355efc !important;
}

.front-record-item .bx {
  color: #8a94a6;
  font-size: 18px;
}

.front-page-view {
  display: grid;
  gap: 1.5rem;
}

.front-record-page {
  overflow: hidden;
}

.front-record-page-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.front-record-table {
  min-width: 560px;
}

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

.front-record-table .record-site {
  min-width: 220px;
}

.front-record-table .record-site a {
  display: block;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.front-record-table .btn {
  white-space: nowrap;
}

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

.front-record-actions button {
  min-width: 64px;
  border: 0;
  border-radius: 6px;
  padding: 7px 14px;
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.front-record-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.front-record-copy {
  background: #355efc;
}

.front-record-delete {
  background: #dc3545;
}

.front-record-empty {
  padding: 34px 18px;
  color: #6c757d;
  text-align: center;
}

.account-name,
.site-name,
.template-choice strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-meta,
.domain-line,
.template-choice span {
  display: block;
  overflow: hidden;
  color: #6c757d;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #adb5bd;
}

.status-dot.ok {
  background: #198754;
}

.status-dot.loading {
  background: #ffc107;
}

.status-dot.error {
  background: #dc3545;
}

.page-content {
  min-height: 100dvh;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
}

.front-dashboard.wrapper {
  display: block;
  min-height: 100dvh;
}

.snacked-metrics {
  display: flex;
  flex-wrap: nowrap !important;
  gap: 0;
  overflow-x: visible;
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 0;
}

.snacked-metrics > .col {
  flex: 1 1 0 !important;
  width: 0 !important;
  max-width: none !important;
}

.snacked-split-card.metric,
.snacked-split-card {
  display: block;
  min-height: auto;
  gap: 0;
  border: 0 !important;
  border-radius: 10px;
  padding: 0;
  background: #fff;
  box-shadow: 0 4px 14px rgba(35, 45, 62, 0.08);
}

.snacked-split-card .card-body {
  padding: 8px !important;
}

.snacked-split-card .snacked-split-soft {
  min-height: 100px;
  background: #dfe5ff;
}

.snacked-split-card .snacked-split-blue {
  min-height: 100px;
  background: #355efc;
}

.snacked-split-card p {
  margin: 0 0 14px;
  color: #293445;
  font-size: 14px;
}

.snacked-split-card h4 {
  margin: 0;
  color: #355efc;
  font-size: 24px;
  font-weight: 500;
}

.snacked-split-card svg {
  display: block;
  width: 100%;
  height: 42px;
}

.snacked-split-card svg path {
  fill: none;
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
}

.snacked-toolbar,
.snacked-content-grid {
  display: block;
}

.snacked-content-grid {
  display: flex;
}

.card.panel,
.detail-panel {
  min-width: 0;
  overflow: hidden;
  border: 0 !important;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(35, 45, 62, 0.08);
}

.detail-panel {
  position: sticky;
  top: 82px;
}

.detail-view {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-list div {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e7eaf0;
}

.detail-list dt {
  color: #6c757d;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.table-responsive {
  -webkit-overflow-scrolling: touch;
}

.table-responsive table {
  min-width: 760px;
}

.record-table {
  min-width: 860px !important;
}

tr.selectable {
  cursor: pointer;
}

tr.selectable:hover td,
tr.selected td {
  background: rgba(53, 94, 252, 0.06);
}

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

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  color: #2742b8;
  background: #e2e7ff;
  font-size: 12px;
  font-weight: 700;
}

.pill.error {
  color: #842029;
  background: #f8d7da;
}

.pill.warn {
  color: #664d03;
  background: #fff3cd;
}

.primary,
.secondary,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 6px;
  padding: 0 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.primary {
  color: #fff;
  background: #355efc;
}

.secondary {
  color: #293445;
  border: 1px solid #d8dde8;
  background: #fff;
}

.danger {
  color: #fff;
  background: #dc3545;
}

.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.icon-btn {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #6c757d;
  background: transparent;
  font-size: 22px;
  line-height: 1;
}

.dialog {
  width: min(540px, calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  border: 0;
  border-radius: 12px;
  padding: 0;
  color: #293445;
  background: #fff;
  box-shadow: 0 18px 55px rgba(35, 45, 62, 0.22);
}

.dialog.wide {
  width: min(780px, calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)));
}

#easyPayDialog.dialog.wide {
  width: min(1180px, calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)));
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.dialog form {
  display: grid;
  max-height: inherit;
  gap: 16px;
  overflow: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-heading h2 {
  margin: 0;
  font-size: 18px;
}

.dialog label {
  display: grid;
  gap: 7px;
  color: #6c757d;
  font-size: 13px;
  font-weight: 700;
}

.dialog input,
.dialog select,
.dialog textarea,
.link-row input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d8dde8;
  border-radius: 6px;
  padding: 0 12px;
  color: #293445;
  background: #fff;
  outline: none;
}

.dialog textarea {
  padding: 12px;
  resize: vertical;
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  color: #293445 !important;
}

.check-row input {
  width: 18px !important;
  min-height: 18px !important;
}

.hint,
.quiet,
.meta {
  color: #6c757d;
}

.file-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid #d8dde8;
  border-radius: 6px;
  padding: 7px;
  background: #fff;
}

#deployFileLabel {
  min-width: 0;
  overflow: hidden;
  color: #6c757d;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.console-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 12px;
}

.template-file-grid,
.front-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.template-choice {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 104px;
  border: 1px solid #d8dde8;
  border-radius: 8px;
  padding: 14px;
  color: #293445;
  text-align: left;
  background: #fff;
}

.template-choice:hover {
  border-color: #355efc;
  box-shadow: 0 8px 24px rgba(53, 94, 252, 0.10);
}

.template-choice.is-disabled,
.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.front-deploy-result {
  margin: 0 18px 18px;
  border: 1px solid #d8dde8;
  border-radius: 8px;
  padding: 12px;
  background: #f8f9fb;
  overflow-wrap: anywhere;
}

.front-profile {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.front-profile img {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  object-fit: cover;
  background: #f1f3f5;
}

.form-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid #d8dde8;
  color: #6c757d;
  font-size: 13px;
  font-weight: 800;
}

.link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.order-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.order-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #d8dde8;
  border-radius: 8px;
  padding: 10px;
  background: #f8f9fb;
}

.order-money {
  font-weight: 800;
  white-space: nowrap;
}

.console-output,
.progress-box {
  min-height: 120px;
  border: 1px solid #d8dde8;
  border-radius: 8px;
  padding: 12px;
  white-space: pre-wrap;
}

.console-output {
  max-height: 360px;
  overflow: auto;
  color: #d8f7ff;
  background: #17202a;
}

.progress-box {
  color: #6c757d;
  background: #f8f9fb;
}

.simple-pay-form {
  gap: 18px;
}

.simple-pay-form menu {
  justify-content: flex-start;
}

.pay-inline-field {
  display: grid !important;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 0 !important;
  align-items: stretch;
  color: #293445 !important;
}

.pay-inline-field > span {
  display: flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid #d8dde8;
  border-right: 0;
  border-radius: 6px 0 0 6px;
  padding: 0 12px;
  background: #f3f5f8;
}

.pay-inline-field > select {
  border-radius: 0 6px 6px 0;
}

.progress-box.compact {
  min-height: auto;
}

.toast {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 2000;
  max-width: min(440px, calc(100vw - 40px));
  border-radius: 10px;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1199.98px) {
  .detail-panel {
    position: static;
  }
}

@media (max-width: 991.98px) {
  .page-content {
    padding: 1rem;
  }

  .top-header .navbar {
    padding-left: calc(0.75rem + env(safe-area-inset-left));
    padding-right: calc(0.75rem + env(safe-area-inset-right));
  }

  .top-header .searchbar .form-control {
    width: min(420px, 72vw);
  }

  .template-file-grid,
  .front-template-grid {
    grid-template-columns: 1fr;
  }

  .snacked-metrics {
    flex-wrap: wrap !important;
    overflow-x: visible;
    padding-bottom: 4px;
  }

  .snacked-metrics > .col {
    flex: 0 0 50% !important;
    width: 50% !important;
  }
}

@media (max-width: 575.98px) {
  .snacked-auth {
    align-items: start;
    padding-top: max(16px, env(safe-area-inset-top));
  }

  .snacked-auth .auth-card {
    margin-top: 10dvh;
  }

  .page-content h1 {
    font-size: 24px;
  }

  .snacked-metrics > .col {
    flex: 0 0 100% !important;
    width: 100% !important;
  }

  .top-header .searchbar .form-control {
    width: calc(100vw - 92px);
  }

  .console-row,
  .link-row,
  .front-profile {
    grid-template-columns: 1fr;
  }

  .file-picker {
    align-items: stretch;
    flex-direction: column;
  }

  #deployFileLabel {
    white-space: normal;
  }

  menu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  menu button {
    width: 100%;
  }

  .dialog form {
    padding: 16px;
  }

  .order-item {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .order-money {
    grid-column: 2;
  }
}

.front-profile-compact {
  margin-bottom: 1rem;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(53, 94, 252, 0.08), rgba(255, 255, 255, 0) 52%),
    #fff;
}

.front-profile-compact .card-body {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
}

.front-profile-compact .front-profile-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.front-profile-compact .front-profile-row img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  background: #eef2ff;
  box-shadow: 0 8px 22px rgba(53, 94, 252, 0.16);
}

.front-profile-main {
  min-width: 0;
}

.front-profile-kicker {
  display: block;
  margin-bottom: 2px;
  color: #6c757d;
  font-size: 12px;
  font-weight: 700;
}

.front-profile-main h2 {
  margin: 0;
  overflow: hidden;
  color: #202938;
  font-size: 18px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.front-profile-main p {
  margin: 4px 0 0;
  color: #6c757d;
  font-size: 13px;
}

.front-profile-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  color: #198754;
  background: #eaf7ef;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.front-profile-meta {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
}

.front-profile-meta div {
  min-width: 0;
  border: 1px solid #e7eaf0;
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.72);
}

.front-profile-meta span {
  display: block;
  margin-bottom: 4px;
  color: #6c757d;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.front-profile-meta strong {
  display: block;
  overflow: hidden;
  color: #202938;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.front-template-status {
  width: fit-content;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.front-template-status.is-alert {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 999px;
  padding: 5px 14px 5px 11px;
  color: #b42318 !important;
  background:
    linear-gradient(135deg, rgba(255, 247, 237, 0.98), rgba(255, 241, 242, 0.96) 58%, rgba(255, 255, 255, 0.96)),
    #fff7ed;
  box-shadow:
    0 10px 26px rgba(251, 146, 60, 0.16),
    0 0 0 4px rgba(251, 146, 60, 0.07);
  font-weight: 850;
  letter-spacing: 0.02em;
  animation: frontStatusPulse 1.8s ease-in-out infinite;
}

.front-template-status.is-alert::before {
  content: "";
  position: relative;
  z-index: 1;
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.12), 0 0 16px rgba(239, 68, 68, 0.42);
}

.front-template-status.is-alert::after {
  content: "";
  position: absolute;
  inset: -24px auto -24px -36%;
  width: 34%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.66), transparent);
  animation: frontStatusShine 2.4s ease-in-out infinite;
}

@keyframes frontStatusPulse {
  0%,
  100% {
    box-shadow:
      0 10px 26px rgba(251, 146, 60, 0.16),
      0 0 0 4px rgba(251, 146, 60, 0.07);
  }
  50% {
    box-shadow:
      0 14px 32px rgba(251, 146, 60, 0.24),
      0 0 0 5px rgba(251, 146, 60, 0.10);
  }
}

@keyframes frontStatusShine {
  0% {
    left: -36%;
  }
  46%,
  100% {
    left: 108%;
  }
}

.front-line-panel {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 18px;
  align-items: center;
  margin: 24px 0 8px;
  border: 1px solid rgba(53, 94, 252, 0.12);
  border-radius: 12px;
  padding: 16px 18px 14px;
  background:
    linear-gradient(135deg, rgba(53, 94, 252, 0.06), rgba(255, 255, 255, 0.95) 58%, rgba(20, 184, 132, 0.06)),
    #fff;
  box-shadow: 0 14px 34px rgba(32, 41, 56, 0.06);
}

.front-line-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.front-line-icon {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #355efc, #14b884);
  box-shadow: 0 12px 24px rgba(53, 94, 252, 0.20);
}

.front-line-icon i {
  font-size: 21px;
}

.front-line-head h2 {
  color: #202938;
  font-weight: 850;
}

.front-line-head span:not(.front-line-icon) {
  display: block;
  color: #536071;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.front-line-grid {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding-top: 11px;
}

.front-line-choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 34px;
  border: 1px solid #dbe3f2;
  border-radius: 999px;
  padding: 0 18px;
  color: #4b5565;
  background: #fff;
  box-shadow: 0 6px 16px rgba(32, 41, 56, 0.05);
  white-space: nowrap;
}

.front-line-choice:hover {
  border-color: rgba(53, 94, 252, 0.48);
  color: #355efc;
  box-shadow: 0 10px 22px rgba(53, 94, 252, 0.10);
}

.front-line-badge {
  position: absolute;
  left: 50%;
  top: -13px;
  min-width: 76px;
  max-width: 116px;
  transform: translateX(-50%);
  overflow: hidden;
  border-radius: 999px;
  padding: 2px 10px;
  color: #fff;
  background: linear-gradient(135deg, #ff5c5c, #f43f5e);
  box-shadow: 0 7px 14px rgba(244, 63, 94, 0.18);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.front-line-number {
  overflow: hidden;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
}

.front-line-choice::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 8px;
  height: 13px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-55%) rotate(45deg) scale(0.78);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.front-line-choice.is-selected {
  min-width: 98px;
  border-color: transparent;
  padding-right: 32px;
  color: #fff;
  background: linear-gradient(135deg, #355efc, #4f46e5);
  box-shadow: 0 12px 28px rgba(53, 94, 252, 0.24);
}

.front-line-choice.is-selected::after {
  opacity: 1;
  transform: translateY(-55%) rotate(45deg) scale(1);
}

.front-line-choice.is-selected .front-line-badge {
  background: linear-gradient(135deg, #ef4444, #fb7185);
}

.front-line-choice.is-disabled {
  opacity: 0.54;
  pointer-events: none;
}

.front-line-choice.is-disabled .front-line-badge {
  color: #8a94a6;
  background: #eef2f7;
  box-shadow: none;
}

@media (max-width: 991.98px) {
  .front-line-panel {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .front-line-panel {
    margin-top: 18px;
    padding: 14px 12px;
  }

  .front-line-grid {
    flex-wrap: wrap;
    row-gap: 18px;
  }
}

.front-auth-domain-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(360px, 1.28fr);
  gap: 18px;
  align-items: center;
  margin: 32px 0 0;
  border: 1px solid rgba(53, 94, 252, 0.16);
  border-radius: 12px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(53, 94, 252, 0.10), rgba(7, 193, 96, 0.07) 44%, rgba(255, 255, 255, 0.92)),
    #fff;
  box-shadow:
    0 18px 42px rgba(32, 41, 56, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.84) inset;
}

.front-auth-domain-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.front-auth-domain-icon {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #355efc, #14b884);
  box-shadow: 0 14px 28px rgba(53, 94, 252, 0.24);
}

.front-auth-domain-icon i {
  font-size: 23px;
}

.front-auth-domain-head h2 {
  color: #202938;
  font-weight: 800;
}

.front-auth-domain-head span:not(.front-auth-domain-icon) {
  display: block;
  color: #6c757d;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.front-auth-domain-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 58px;
  overflow: hidden;
  border: 1px solid rgba(53, 94, 252, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 14px 30px rgba(53, 94, 252, 0.08),
    0 0 0 4px rgba(53, 94, 252, 0.035);
}

.front-auth-domain-control:focus-within {
  border-color: rgba(53, 94, 252, 0.66);
  box-shadow:
    0 18px 36px rgba(53, 94, 252, 0.13),
    0 0 0 4px rgba(53, 94, 252, 0.10);
}

.front-auth-domain-prefix,
.front-auth-domain-lock {
  display: inline-flex;
  align-items: center;
  min-height: 58px;
  color: #355efc;
  background: rgba(53, 94, 252, 0.07);
  font-size: 13px;
  font-weight: 800;
}

.front-auth-domain-prefix {
  border-right: 1px solid rgba(53, 94, 252, 0.12);
  padding: 0 16px;
}

.front-auth-domain-lock {
  justify-content: center;
  width: 54px;
  border-left: 1px solid rgba(53, 94, 252, 0.12);
}

.front-auth-domain-lock i {
  font-size: 20px;
}

.front-auth-domain-control input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 16px;
  color: #202938;
  background: transparent;
  font-size: 17px;
  font-weight: 750;
}

.front-auth-domain-control input::placeholder {
  color: #9aa4b2;
  font-weight: 650;
}

@media (max-width: 575.98px) {
  .front-profile-compact .card-body {
    padding: 14px;
  }

  .front-profile-compact .front-profile-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
  }

  .front-profile-compact .front-profile-row img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .front-profile-state {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .front-profile-meta {
    grid-template-columns: 1fr;
  }

  .front-auth-domain-panel {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 20px;
    padding: 14px;
  }

  .front-auth-domain-control {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .front-auth-domain-prefix {
    display: none;
  }

  .front-auth-domain-control input {
    font-size: 15px;
    padding-left: 14px;
  }
}

body.front-loader-open {
  overflow: hidden;
}

.front-loader-preview {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 24px 18px;
  background:
    radial-gradient(circle at 50% 38%, rgba(71, 85, 105, 0.42), rgba(2, 6, 23, 0.78) 58%),
    rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(5px);
}

.front-loader-preview.is-hidden {
  display: none;
}

.front-loader-shell {
  position: relative;
  width: min(82vw, 372px, calc((100dvh - 48px) * 0.49));
  aspect-ratio: 9 / 18.35;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 42px;
  background:
    linear-gradient(145deg, #202938, #07111f 42%, #111827),
    #0f172a;
  box-shadow:
    0 34px 82px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 0 7px rgba(15, 23, 42, 0.32);
}

.front-loader-shell::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 3;
  width: 120px;
  height: 24px;
  transform: translateX(-50%);
  border-radius: 0 0 16px 16px;
  background: #07111f;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.front-loader-shell::after {
  content: "";
  position: absolute;
  top: 23%;
  right: -5px;
  width: 4px;
  height: 62px;
  border-radius: 0 6px 6px 0;
  background: linear-gradient(180deg, #1f2937, #0b1220);
  box-shadow: -1px 0 0 rgba(255, 255, 255, 0.08) inset;
}

.front-loader-head {
  position: absolute;
  inset: auto -6px calc(100% + 14px) auto;
  z-index: 4;
  display: block;
}

.front-loader-head > div {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.front-loader-close {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.64);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.front-loader-close:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(37, 99, 235, 0.78);
}

.front-loader-close i {
  font-size: 20px;
  line-height: 1;
}

.front-loader-screen {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 30px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.10),
    0 0 0 1px rgba(15, 23, 42, 0.10) inset;
}

.front-loader-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.template-choice.is-loading {
  border-color: #355efc;
  box-shadow: 0 8px 24px rgba(53, 94, 252, 0.14);
}

.template-choice {
  position: relative;
  overflow: hidden;
  padding-right: 56px;
}

.template-choice::before,
.template-choice::after {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.template-choice::before {
  content: "";
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, #355efc, #14b884);
  box-shadow: 0 10px 22px rgba(53, 94, 252, 0.26);
  transform: scale(0.78);
}

.template-choice::after {
  content: "";
  top: 20px;
  right: 24px;
  width: 9px;
  height: 15px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg) scale(0.78);
  transform-origin: center;
}

.template-choice.is-selected {
  border-color: #355efc;
  background:
    linear-gradient(135deg, rgba(53, 94, 252, 0.08), rgba(20, 184, 132, 0.06)),
    #fff;
  box-shadow: 0 10px 28px rgba(53, 94, 252, 0.13);
}

.template-choice.is-selected::before,
.template-choice.is-selected::after {
  opacity: 1;
  transform: scale(1);
}

.template-choice.is-selected::after {
  transform: rotate(45deg) scale(1);
}

@media (max-width: 575.98px) {
  .front-loader-preview {
    align-items: center;
    justify-items: center;
    padding:
      calc(max(14px, env(safe-area-inset-top)) + 46px)
      max(10px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  .front-loader-shell {
    width: min(
      88vw,
      calc((100dvh - 104px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * 0.49)
    );
    border-radius: 38px;
    padding: 12px;
  }

  .front-loader-shell::before {
    top: 12px;
    width: 104px;
    height: 22px;
  }

  .front-loader-screen {
    border-radius: 27px;
  }

  .front-loader-head {
    position: fixed;
    inset:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      auto
      auto;
    z-index: 6;
  }

  .front-loader-close {
    width: 42px;
    height: 42px;
  }
}
