@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  src: url(/fonts/nunito-variable.woff2) format('woff2');
}

:root {
  --bg-color: #fff;
  --text-color: hsl(200, 35%, 25%);
  --color-primary: hsl(207, 90%, 54%);
  --outline-color: hsl(188, 100%, 54%);
  --button-bg: linear-gradient(to right, #e0e0e0, #bdbdbd);
  --button-bg-box-shadow-color: rgba(160, 160, 160, 0.5);
  --button-bg-primary: linear-gradient(to right, hsl(207, 90%, 61%), hsl(218, 100%, 58%));
  --button-bg-primary-box-shadow-color: hsla(207, 90%, 61%, 0.5);
  --button-bg-secondary: linear-gradient(to right, hsl(262, 47%, 55%), hsl(265, 100%, 46%));
  --button-bg-secondary-box-shadow-color: hsla(258, 58%, 42%, 0.5);
  --button-bg-danger: linear-gradient(to right, hsl(0, 84%, 58%), hsl(0, 78%, 50%));
  --button-bg-danger-box-shadow-color: hsla(0, 58%, 42%, 0.5);
  --button-bg-success: linear-gradient(to right, hsl(130, 58%, 45%), hsl(130, 67%, 45%));
  --button-bg-success-box-shadow-color: hsla(128, 80%, 48%, 0.5);
  --button-action-shadow-color: hsla(200, 15%, 60%, 0.12);
  --underline-color: hsl(200, 35%, 65%);
  --secondary-text-color: hsl(200, 14%, 60%);
  --send-icon-hover-color: hsl(262, 52%, 47%);
  --send-spinner-icon-color: hsl(200, 15%, 70%);
  --success-icon-color: hsl(144, 40%, 57%);
  --error-icon-color: hsl(0, 86%, 63%);
  --copy-icon-color: hsl(144, 40%, 57%);
  --copy-icon-bg-color: hsl(144, 100%, 96%);
  --copy-icon-shadow-color: hsla(200, 15%, 60%, 0.12);
  --focus-outline-color: hsla(207, 90%, 61%, 0.5);
  --checkbox-bg-color: hsl(262, 47%, 63%);
  --input-shadow-color: hsla(200, 15%, 70%, 0.2);
  --input-hover-shadow-color: hsla(200, 15%, 70%, 0.4);
  --input-label-color: hsl(200, 35%, 25%);
  --table-bg-color: hsl(200, 12%, 95%);
  --table-shadow-color: hsla(200, 20%, 70%, 0.3);
  --table-tr-border-color: hsl(200, 14%, 94%);
  --table-tr-hover-bg-color: hsl(200, 14%, 98%);
  --table-head-tr-border-color: hsl(200, 14%, 90%);
  --table-status-gray-bg-color: hsl(200, 12%, 95%);
  --keyframe-slidey-offset: 0;
}

/* ANIMATIONS */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fadein {
  from { opacity: 0 }
  to { opacity: 1 }
}

@keyframes slidey {
  from { transform: translateY(var(--keyframe-slidey-offset)) }
  to { transform: translateY(0) }
}

@keyframes tooltip {
  to { opacity: 0.9; transform: translate(-50%, 0); }
}

/* GENERAL */
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  font: 16px/1.45 'Nunito', sans-serif;
  overflow-x: hidden;
  color: var(--text-color);
}

* {
  box-sizing: border-box;
  outline-color: var(--outline-color);

}

*::-moz-focus-inner {
  border: none;
}

.hidden {
  display: none;
}

hr {
  width: 100%;
  height: 2px;
  outline: none;
  border: none;
  background-color: hsl(200, 20%, 92%);
}

span.bold { font-weight: bold; }
span.underline { border-bottom: 2px dotted #999; }

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

.align-center {
  display: flex;
  align-items: center;
}

a,
button.link {
  color: var(--color-primary);
  border-bottom: 1px dotted transparent;
  text-decoration: none;
  transition: all 0.2s ease-out;
  cursor: pointer;
}

a:hover,
button.link:hover {
  border-bottom-color: var(--color-primary);
}

a.wrapper-only {
  color: inherit;
}

a.nav {
  color: inherit;
  padding-bottom: 2px;
}

a.nav:hover,
a.nav.active {
  color: var(--color-primary);
}

.language-selector {
  display: inline-flex;
  align-items: center;
  color: inherit;
  font-size: 13px;
}

.language-selector select {
  width: 25%;
  min-width: 108px;
  height: 34px;
  padding: 0 24px 0 8px;
  color: var(--text-color);
  background: white;
  border: 1px solid hsl(200, 14%, 88%);
  border-radius: 8px;
  font: inherit;
}

a.button,
button {
  position: relative;
  width: auto;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  font-size: 13px;
  font-weight: normal;
  text-align: center;
  line-height: 1;
  word-break: keep-all;
  color: #444;
  border: none;
  border-radius: 100px;
  transition: all 0.4s ease-out;
  cursor: pointer;
  overflow: hidden;
  background: var(--button-bg);
  box-shadow: 0 5px 6px var(--button-bg-box-shadow-color);
}

a.button.primary,
button.primary {
  color: white;
  background: var(--button-bg-primary);
  box-shadow: 0 5px 6px var(--button-bg-primary-box-shadow-color);
}

a.button.secondary,
button.secondary {
  color: white;
  background: var(--button-bg-secondary);
  box-shadow: 0 5px 6px var(--button-bg-secondary-box-shadow-color);
}

a.button.danger,
button.danger {
  color: white;
  background: var(--button-bg-danger);
  box-shadow: 0 5px 6px var(--button-bg-danger-box-shadow-color);
}

a.button.success,
button.success {
  color: white;
  background: var(--button-bg-success);
  box-shadow: 0 5px 6px var(--button-bg-success-box-shadow-color);
}

a.button:focus,
a.button:hover,
a.button.active,
button:focus,
button:hover {
  box-shadow: 0 6px 15px var(--button-bg-box-shadow-color);
  transform: translateY(-2px) scale(1.02, 1.02);
}

a.button.primary:focus,
a.button.primary:hover,
a.button.primary.active,
button.primary:focus,
button.primary:hover {
  box-shadow: 0 6px 15px var(--button-bg-primary-box-shadow-color);
}

a.button.secondary:focus,
a.button.secondary:hover,
a.button.secondary.active,
button.secondary:focus,
button.secondary:hover {
  box-shadow: 0 6px 15px var(--button-bg-secondary-box-shadow-color);
}

a.button.danger:focus,
a.button.danger:hover,
button.danger:focus,
button.danger:hover {
  box-shadow: 0 6px 15px var(--button-bg-danger-box-shadow-color);
}

a.button.success:focus,
a.button.success:hover,
button.success:focus,
button.success:hover {
  box-shadow: 0 6px 15px var(--button-bg-success-box-shadow-color);
}

a.button:disabled,
button:disabled { cursor: default; }
a.button:disabled:hover,
button:disabled:hover { transform: none; }

a.button svg.with-text,
a.button span svg,
button svg.with-text,
button span svg {
  width: 1.1em;
  height: auto;
  margin-right: 0.5rem;
  stroke: white;
  stroke-width: 2;
}

a.button.action,
button.action {
  padding: 5px;
  width: 24px;
  height: 24px;
  box-shadow: 0 2px 1px var(--button-action-shadow-color);
}

a.button.action:disabled,
button.action:disabled {
  background: none;
  box-shadow: none;
}

a.button.action svg,
button.action svg {
  width: 100%;
  margin-right: 0;
}

a.button.action.delete,
button.action.delete {
  background: hsl(0, 100%, 96%);
}

a.button.action.delete svg,
button.action.delete svg {
  stroke-width: 2;
  stroke: hsl(0, 100%, 69%);
}

a.button.action.edit,
button.action.edit {
  background: hsl(46, 100%, 94%);
}

a.button.action.edit svg,
button.action.edit svg {
  stroke-width: 2.5;
  stroke: hsl(46, 90%, 50%);
}

a.button.action.qrcode,
button.action.qrcode {
  background: hsl(0, 0%, 94%);
}

a.button.action.qrcode svg,
button.action.qrcode svg {
  fill: hsl(0, 0%, 35%);
  stroke: none;
}

a.button.action.stats,
button.action.stats {
  background: hsl(260, 100%, 96%);
}

a.button.action.stats svg,
button.action.stats svg {
  stroke-width: 2.5;
  stroke: hsl(260, 100%, 69%);
}

a.button.action.monitor,
button.action.monitor {
  background: hsl(196, 100%, 95%);
}

a.button.action.monitor svg,
button.action.monitor svg {
  stroke-width: 2.3;
  stroke: hsl(196, 78%, 43%);
}

a.button.action.select,
button.action.select {
  background: hsl(140, 70%, 94%);
}

a.button.action.select svg,
button.action.select svg {
  stroke-width: 2.5;
  stroke: hsl(142, 66%, 38%);
}

a.button.action.ban,
button.action.ban {
  background: hsl(10, 100%, 96%);
}

a.button.action.ban svg,
button.action.ban svg {
  stroke-width: 2;
  stroke: hsl(10, 100%, 40%);
}

a.button.action.password sv,
button.action.password svg,
a.button.action.banned svg,
button.action.banned svg {
  stroke-width: 2.5;
  stroke: #bbb;
}

button.nav,
button.activity-nav {
  box-sizing: border-box;
  width: auto;
  height: 28px;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: none;
  border-radius: 4px;
  box-shadow: 0 0px 10px rgba(100, 100, 100, 0.1);
  background: none;
  background-color: white;
  transition: all 0.2s ease-in-out;
  font-size: 12px;
  cursor: pointer;
}

button.nav:disabled,
button.activity-nav:disabled {
  background-color: #f6f6f6;
  box-shadow: 0 0px 5px rgba(150, 150, 150, 0.1);
  opacity: 0.9;
  color: #bbb;
  cursor: default;
}

button.nav svg,
button.activity-nav svg {
  width: 14px;
  height: auto;
}

button.nav svg,
button.activity-nav svg { stroke-width: 2.5; }

button.nav:hover,
button.activity-nav:hover { transform: translateY(-2px); }
button.nav:disabled:hover,
button.activity-nav:disabled:hover { transform: none; }

button.table {
  height: 32px;
  padding: 0 1rem;
  font-size: 12px;
  border-radius: 3px;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 2px var(--button-bg-box-shadow-color);
}

a.button.table {
  height: 32px;
  padding: 0 1rem;
  font-size: 12px;
  border-radius: 3px;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 2px var(--button-bg-box-shadow-color);
}

a.button.table:hover,
button.table:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 2px var(--button-bg-box-shadow-color);
}

a.button.table.primary,
button.table.primary,
button.primary:focus,
button.primary:hover {
  box-shadow: 0 1px 2px var(--button-bg-primary-box-shadow-color);
}

a.button.table.secondary,
button.table.secondary,
button.secondary:focus,
button.secondary:hover {
  box-shadow: 0 1px 2px var(--button-bg-secondary-box-shadow-color);
}

a.button.table.danger,
button.table.danger,
button.danger:focus,
button.danger:hover {
  box-shadow: 0 1px 2px var(--button-bg-danger-box-shadow-color);
}

a.button.table.success,
button.table.success,
button.success:focus,
button.success:hover {
  box-shadow: 0 1px 2px var(--button-bg-success-box-shadow-color);
}

button.link {
  position: relative;
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 0 2px 0;
  font-size: 1rem;
  font-weight: normal;
  border-radius: 0;
  text-align: left;
  line-height: normal;
  word-break: normal;
  cursor: pointer;
  background: none;
  box-shadow: none;
}

button.link:hover {
  box-shadow: none;
  transform: none;
}

button.link span {
  height: 1rem;
}

button.link svg {
  stroke: var(--color-primary);
}

svg.spinner {
  animation: spin 1s linear infinite, fadein 0.3s ease-in-out;
}

input {
  filter: none;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  box-sizing: border-box;
  width: 240px;
  height: 44px;
  padding: 0 24px;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: #444;
  background-color: white;
  border: none;
  border-radius: 100px;
  border-bottom: 5px solid #f5f5f5;
  border-bottom-width: 5px;
  box-shadow: 0 10px 35px var(--input-shadow-color);
  transition: all 0.5s ease-out;
}


input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  outline: none;
  box-shadow: 0 20px 35px var(--input-hover-shadow-color);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder {
  font-size: 14px;
  letter-spacing: 0.05em;
  color: #888;
}

.error input[type="text"],
.error input[type="email"],
.error input[type="password"] {
  border-bottom-color: rgba(250, 10, 10, 0.8);
  box-shadow: 0 10px 15px hsla(0, 100%, 75%, 0.2);
}

select {
  position: relative;
  width: 240px;
  height: 44px;
  padding: 0 24px;
  font-size: 15px;
  box-sizing: border-box;
  letter-spacing: 0.05em;
  color: #444;
  background-color: white;
  box-shadow: 0 10px 35px var(--input-shadow-color);
  border: none;
  border-radius: 100px;
  border-bottom: 5px solid #f5f5f5;
  border-bottom-width: 5px;
  transition: all 0.5s ease-out;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%235c666b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat, repeat;
  background-position: right 1.2em top 50%, 0 0;
  background-size: 1em auto, 100%;
}

select:focus {
  outline: none;
  box-shadow: 0 20px 35px var(--input-hover-shadow-color)
}

.error select {
  border-bottom-color: rgba(250, 10, 10, 0.8);
  box-shadow: 0 10px 15px hsla(0, 100%, 75%, 0.2);
}

input[type="checkbox"] {
  position: relative;
  width: 1rem;
  height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background-color: white;
  box-shadow: 0 2px 4px rgba(50, 50, 50, 0.2);
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

input[type="checkbox"]:focus {
  outline: 3px solid var(--focus-outline-color);
}

input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  display: block;
  border-radius: 2px;
  background-color: var(--checkbox-bg-color);
  box-shadow: 0 2px 4px rgba(50, 50, 50, 0.2);
  cursor: pointer;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  transition: all 0.1s ease-in-out;
}

input[type="checkbox"]:checked:after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

input.table-input,
select.table-input {
  width: auto;
  height: 32px;
  font-size: 13px;
  padding: 0 1.5rem;
  border-radius: 3px;
  border-bottom-width: 2px;
}

select.table-input {
  width: 150px;
}

input.table-input::placeholder {
  font-size: 13px;
}

select:has(option[value=""]:checked) {
  letter-spacing: 0.05em;
  color: #888;
}

label {
  display: flex;
  color: var(--input-label-color);
  font-size: 1rem;
  flex-direction: column;
  align-items: flex-start;
  font-weight: bold;
}

label input {
  margin-top: 0.5rem;
}

label.checkbox { 
  flex-direction: row;
  align-items: center;
  cursor: pointer;
  font-weight: normal;
}

label.checkbox input[type="checkbox"] {
  margin: 0 0.75rem 2px 0;
}

p.error,
p.success {
  display: flex;
  align-items: center;
  font-weight: normal;
  animation: fadein 0.3s ease-in-out;
}

p.error { color: red; }
p.success { color: #0ea30e; }

table {
  width: 100%;
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 6px 15px var(--table-shadow-color);
  text-align: center;
  overflow: auto;
}

table tr {
  flex: 1 1 auto;
}

table tr,
table th,
table td,
table thead,
table tfoot {
  display: flex;
  overflow: hidden;
}

table tbody,
table tr {
  overflow: visible;
}

table tbody,
table thead,
table tfoot {
  flex-direction: column;
}

table tr {
  padding: 0 0.5rem;
  border-bottom: 1px solid var(--table-tr-border-color);
}

table th,
table td {
  flex-basis: 0;
  padding: 0.75rem;
}

table td {
  position: relative;
  white-space: nowrap;
  font-size: 15px;
  align-items: center;
}

table tbody {
  border-bottom-right-radius: 12px;
  border-bottom-left-radius: 12px;
  animation: fadein 0.3s ease-in-out;
}

table tbody + tfoot {
  border: none;
}

table thead {
  background-color: var(--table-bg-color);
  border-top-right-radius: 12px;
  border-top-left-radius: 12px;
  font-weight: bold;
}

table thead tr {
  border-bottom: 1px solid var(--table-head-tr-border-color);
}

table tfoot {
  background-color: var(--table-bg-color);
  border-bottom-right-radius: 12px;
  border-bottom-left-radius: 12px;
}

table tr.loading-placeholder {
  flex: 1 1 auto;
  justify-content: center;
  animation: fadein 0.3s ease-in-out;
}

table tr.loading-placeholder td {
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 300;
}

table select {
  margin-right: 1rem;
}

table .tab { 
  display: flex; 
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

table .tab a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 1rem;
  margin: 0;
  font-size: 12px;
  color: var(--text-color);
  border: none;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  box-shadow: 0 0px 10px rgba(100, 100, 100, 0.1);
  font-weight: normal;
  transition: all 0.2s ease-in-out;
}

table .tab a:first-child { margin-left: 0}

table .tab a.active {
  background-color: #f6f6f6;
  box-shadow: 0 0px 5px rgba(150, 150, 150, 0.1);
  color: #aaa;
  font-weight: bold;
  opacity: 0.9;
  cursor: default;
}

table .tab a:not(.active):hover {
  transform: translateY(-2px);
}

.dialog {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background-color: rgba(50, 50, 50, 0.8);
  z-index: 1000;
  animation: fadein 0.2s ease-in-out;
}

.dialog.open { display: flex; }

.dialog .box {
  min-width: 450px;
  max-width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 2rem;
  background-color: white;
  border-radius: 8px;
  --keyframe-slidey-offset: -30px;
  animation: slidey 0.2s ease-in-out;
}

.dialog.qrcode .box {
  min-width: auto;
  padding: 2rem;
}

.dialog.qrcode .content-wrapper {
  align-items: center;
}

.dialog.qrcode .qrcode-footer {
  max-width: none;
  margin: 1rem 0 0.8rem;
  color: hsl(205, 16%, 38%);
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: nowrap;
}

.dialog.qrcode .qrcode-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.dialog.qrcode .qrcode-download {
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.dialog.qrcode .qrcode-download:hover,
.dialog.qrcode .qrcode-download:focus {
  color: var(--send-icon-hover-color);
  text-decoration: underline;
}

.dialog.qrcode .qrcode-manage {
  color: hsl(262, 52%, 47%);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.dialog.qrcode .qrcode-manage:hover,
.dialog.qrcode .qrcode-manage:focus {
  text-decoration: underline;
}

.dialog .content-wrapper {
  display: flex;
  flex-direction: column;
}

.dialog .loading {
  display: none;
  width: 24px;
  height: 24px;
  margin: 3rem 0;
  animation: fadein 0.2s ease-in-out;
}

.dialog.htmx-request .loading {
  display: block;
}

.dialog.htmx-request .content-wrapper {
  display: none;
}

.qrcode-page {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  align-items: start;
  min-height: calc(100vh - 96px);
  border-top: 1px solid hsl(200, 14%, 92%);
  background: hsl(200, 14%, 98%);
}

.qrcode-sidebar {
  align-self: start;
  border-right: 1px solid hsl(200, 14%, 90%);
  background: #fff;
}

.qrcode-sidebar-header {
  margin-top: 0.75rem;
  padding: 0 1.25rem 0.5rem;
}

.qrcode-sidebar h1,
.qrcode-no-selection h1 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.25;
}

.qrcode-add-button {
  width: 100%;
  height: 42px;
  margin-top: 0;
  padding: 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
}

.qrcode-list-form {
  margin: 0;
  --checkbox-bg-color: var(--color-primary);
}

.qrcode-list-tools,
.qrcode-bulk-actions {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem 0.75rem;
}

.qrcode-bulk-actions {
  grid-template-columns: minmax(0, 1fr) auto auto;
  color: var(--secondary-text-color);
  font-size: 0.84rem;
}

.qrcode-bulk-actions[hidden] {
  display: none;
}

.qrcode-select-all {
  display: flex;
  justify-content: center;
}

.qrcode-search {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 0.75rem;
  border: 1px solid hsl(200, 14%, 88%);
  border-radius: 6px;
  color: var(--text-color);
  font: inherit;
}

.qrcode-cancel-selection,
.qrcode-delete-selection {
  height: 30px;
  padding: 0 0.75rem;
  font-size: 0.78rem;
}

.qrcode-bulk-actions .qrcode-cancel-selection {
  color: #111;
  background: #fff;
  box-shadow: 0 2px 5px hsla(200, 15%, 60%, 0.2);
}

.qrcode-bulk-actions .qrcode-cancel-selection:hover,
.qrcode-bulk-actions .qrcode-cancel-selection:focus {
  color: #111;
  background: #fff;
  box-shadow: 0 3px 8px hsla(200, 15%, 60%, 0.28);
}

.qrcode-list {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  gap: 0.35rem;
}

.qrcode-list-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
}

.qrcode-row-checkbox {
  justify-self: center;
}

.qrcode-list-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.8rem;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 6px;
}

.qrcode-list-item:hover,
.qrcode-list-item.active {
  background: hsl(207, 90%, 96%);
}

.qrcode-list-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
}

.qrcode-list-item small,
.qrcode-empty,
.qrcode-no-selection p {
  color: var(--secondary-text-color);
}

.qrcode-empty {
  margin: 0.5rem;
  font-size: 0.9rem;
}

.qrcode-detail-shell {
  align-self: start;
  min-width: 0;
  padding: 1.25rem;
}

.qrcode-detail-header {
  margin-bottom: 1rem;
}

.qrcode-detail-header h1 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.25;
}

.qrcode-detail-grid {
  align-items: start;
}

.qrcode-config {
  display: grid;
  grid-template-columns: minmax(360px, 2fr) minmax(220px, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.qrcode-config-panel,
.qrcode-preview-panel,
.qrcode-no-selection {
  align-self: start;
  padding: 1.25rem;
  border: 1px solid hsl(200, 14%, 90%);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px hsla(200, 15%, 60%, 0.12);
}

.qrcode-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.qrcode-field label {
  color: var(--input-label-color);
  font-size: 0.84rem;
  font-weight: 700;
}

.qrcode-field input,
.qrcode-field select {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.65rem;
  border: 1px solid hsl(200, 14%, 88%);
  border-radius: 6px;
  background: #fff;
  color: var(--text-color);
  font: inherit;
}

.qrcode-field input[readonly] {
  background: hsl(200, 14%, 97%);
}

.qrcode-field input[type="color"] {
  padding: 0.2rem;
}

.qrcode-advanced h2 {
  margin: 0.25rem 0 1rem;
  font-size: 1rem;
}

.qrcode-save-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.qrcode-save-button {
  min-width: 112px;
}

.qrcode-save-message {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: right;
}

.qrcode-save-message.success {
  color: #0f7a3b;
}

.qrcode-save-message.error {
  color: #c62828;
}

.qrcode-color-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.qrcode-preview-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.qrcode-preview {
  display: grid;
  place-items: center;
  width: min(100%, 280px);
  aspect-ratio: 1;
}

.qrcode-preview canvas,
.qrcode-preview img,
.qrcode-preview svg {
  max-width: 100%;
  height: auto;
}

.qrcode-preview-footer {
  margin: -0.25rem 0 0;
  color: hsl(205, 16%, 38%);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}

.qrcode-preview-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 1rem;
  color: #fff;
  background: var(--button-bg-primary);
  border-radius: 6px;
  box-shadow: 0 4px 12px var(--button-bg-primary-box-shadow-color);
  font-weight: 700;
  text-decoration: none;
}

.qrcode-preview-download:hover,
.qrcode-preview-download:focus {
  color: #fff;
  transform: translateY(-1px);
}

.qrcode-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.8rem 1rem 1rem;
  border-top: 1px solid hsl(200, 14%, 92%);
  color: var(--secondary-text-color);
  font-size: 0.84rem;
}

.qrcode-pagination a {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
}

.qrcode-pagination span {
  color: hsl(200, 10%, 72%);
}

@media (max-width: 860px) {
  .qrcode-page,
  .qrcode-config {
    grid-template-columns: 1fr;
  }

  .qrcode-page {
    min-height: auto;
  }

  .qrcode-sidebar {
    border-right: 0;
    border-bottom: 1px solid hsl(200, 14%, 90%);
  }

  .qrcode-list-item {
    min-width: 0;
  }

  .qrcode-color-row {
    grid-template-columns: 1fr;
  }
}

.dialog .loading svg {
  animation: spin 1s linear infinite;
}

.dialog .content {
  display: flex;
  flex-direction: column;
  animation: fadein 0.2s ease-in-out;
}

.dialog .content h2 {
  font-weight: bold !important;
  margin-bottom: 0.5rem !important;
  margin-top: 0;
}

.dialog .content .buttons {
  display: flex;
  align-items: center;
  margin-top: 1.5rem;
}

.dialog .content .buttons button { margin-right: 2rem; }
.dialog .content .buttons button:last-of-type { margin-right: 0; }

.dialog .content {
  align-items: center;
}

.dialog .content #dialog-error {
  margin-top: 1rem;
  margin-bottom: -1rem;
}

.dialog .content .icon {
  width: 48px;
  height: 48px;
  border-radius: 100%;
  padding: 5px;
  margin-bottom: 1.5rem;
  border: 2px solid;
}

.dialog .content .icon svg {
  width: 100%;
  height: auto;
}

.dialog .content .icon.success {
  border-color: var(--success-icon-color);
}

.dialog .content .icon.success svg {
  stroke-width: 2;
  stroke: var(--success-icon-color);
}

.dialog .content .icon.error {
  border-color: var(--error-icon-color);
}

.dialog .content .icon.error svg {
  stroke-width: 1.5;
  stroke: var(--error-icon-color);
}

.dialog .content svg.spinner {
  display: none;
  width: 24px;
  margin: 0.5rem 0;
}
.dialog .content.htmx-request svg.spinner { display: block; }
.dialog .content.htmx-request button { display: none; }

.dialog .content label { margin: 0.5rem 0; }

.dialog .content input[type="text"],
.dialog .content input[type="password"],
.dialog .content input[type="email"],
.dialog .content select {
  width: 320px;
  height: 48px;
}

.inputs { display: flex; align-items: flex-start; margin-bottom: 1rem; }
.inputs label { flex: 0 0 0; margin-right: 1rem; }
.inputs label:last-child { margin-right: 0; }

.search-input-wrapper {
  position: relative;
}

.search-input-wrapper button {
  position: absolute;
  display: none;
  right: 0;
  top: 50%;
  width: auto;
  height: auto;
  padding: 3px;
  margin: 0;
  background-color: transparent;
  background: none;
  box-shadow: none;
  transform: translateY(-50%);
  cursor: pointer;
  margin-right: 0.25rem;
  transition: all 0.2s ease-in-out;
}

.search-input-wrapper button:hover {
  transform: translateY(-55%);
}

.search-input-wrapper svg {
  width: 0.9rem;
  height: auto;
  stroke-width: 2;
  stroke: #888;
}

[data-tooltip] {
  position: relative;
  overflow: visible;
}

[data-tooltip]:before,
[data-tooltip]:after {
  position: absolute;
  left: 50%;
  display: none;
  font-size: 11px;
  line-height: 1;
  opacity: 0;
  transform: translate(-50%, -0.5rem);
}

[data-tooltip]:before {
  content: "";
  border: 4px solid transparent;
  top: -4px;
  border-bottom-width: 0;
  border-top-color: #333;
  z-index: 1001;
}

[data-tooltip]:after {
  content: attr(data-tooltip);
  top: -25px;
  text-align: center;
  min-width: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 5px 7px;
  border-radius: 4px;
  box-shadow: 0 1em 2em -0.5em rgba(0, 0, 0, 0.35);
  background: #333;
  color: #fff;
  z-index: 1000;
}

[data-tooltip]:hover:before,
[data-tooltip]:hover:after {
  display: block;
}

[data-tooltip]:before,
[data-tooltip]:after,
[data-tooltip]:hover:before,
[data-tooltip]:hover:after {
  animation: tooltip 300ms ease-out forwards;
}

/* DISTINCT */

.main-wrapper {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-direction: column;
}

.section-container {
  max-width: 90%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 1rem;
}

#settings {
  width: 1380px;
  max-width: 100%;
}

.htmx-spinner .spinner { display: none; }
.htmx-spinner.htmx-request button svg { display: none; }
.htmx-spinner.htmx-request .spinner { display: block; }

/* LOGIN & SIGNUP */

form#login-signup {
  width: min(900px, 100%);
  max-width: 100%;
  flex: 1 1 auto;
  display: flex;
  padding: 0 16px;
  flex-direction: column;
  margin: 3rem 0 0;
}

form#login-signup .login-form-intro {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  text-align: left;
  margin: 0 0 2rem;
  width: max-content;
  max-width: calc(100vw - 32px);
}

form#login-signup .login-form-intro h1,
form#login-signup .login-form-intro p {
  margin: 0 0 0.65rem;
  color: var(--text-color);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 300;
  line-height: 1.25;
  white-space: nowrap;
  text-align: left;
}

form#login-signup .login-form-intro h1 strong {
  font-weight: 700;
}

form#login-signup .login-form-intro p {
  margin: 0;
}

form#login-signup .login-form-intro p span {
  color: var(--color-primary);
  font-weight: 300;
}

form#login-signup .login-form-intro p span.login-demo-separator {
  color: var(--text-color);
}

form#login-signup label { margin-bottom: 2rem; }

form#login-signup .auth-label-line {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  white-space: nowrap;
}

form#login-signup .auth-field-note {
  font-weight: 300;
}

form#login-signup input,
form#login-signup select {
  width: 100%;
  height: 72px;
  margin-top: 1rem;
  padding: 0 3rem;
  font-size: 16px;
  border-radius: 100px;
}

form#login-signup .login-password-wrapper {
  position: relative;
  display: block;
  margin-top: 1rem;
}

form#login-signup .login-password-wrapper input {
  margin-top: 0;
  padding-right: 4.75rem;
}

form#login-signup .login-password-toggle {
  position: absolute;
  top: 50%;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  min-width: 44px;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  background: transparent;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  transform: translateY(-50%);
}

form#login-signup .login-password-toggle:hover,
form#login-signup .login-password-toggle:focus {
  box-shadow: none;
  transform: translateY(-50%);
}

form#login-signup .login-password-toggle svg {
  width: 22px;
  height: 22px;
}

form#login-signup .buttons-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

form#login-signup .buttons-wrapper button,
form#login-signup .buttons-wrapper a.button {
  height: 56px;
  flex: 0 0 48%;
  padding: 0 1rem 2px;
  margin: 0;
}

form#login-signup .buttons-wrapper button.full,
form#login-signup .buttons-wrapper a.button.full { flex-basis: 100%; }

form#login-signup .auth-separator {
  width: 100%;
  display: flex;
  align-items: center;
  margin: 0 0 1.5rem;
  color: var(--secondary-text-color);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.08em;
}

form#login-signup .auth-separator::before,
form#login-signup .auth-separator::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background-color: hsl(200, 20%, 86%);
}

form#login-signup .auth-separator span {
  padding: 0 1rem;
}

form#login-signup a.forgot-password {
  align-self: flex-start;
  font-size: 14px;
}

form#login-signup > label,
form#login-signup > .buttons-wrapper,
form#login-signup > .auth-separator,
form#login-signup > a.forgot-password,
form#login-signup > p.error {
  width: 420px;
  max-width: 100%;
  align-self: center;
}

form#login-signup svg.spinner {  display: none; }
form#login-signup.htmx-request:not(.signup) .login svg { display: none; } 
form#login-signup.htmx-request:not(.signup) .login svg.spinner { display: block; } 
form#login-signup.htmx-request.signup .signup svg { display: none; } 
form#login-signup.htmx-request.signup .signup svg.spinner { display: block; } 
form#login-signup.htmx-request .error { opacity: 0; }

form#login-signup p.error {
  margin-bottom: 0;
}

.admin-form-title {
  font-size: 26px;
  font-weight: 300;
  margin: 0 0 3rem;
  text-align: center;
}

.login-signup-message {
  flex: 1 1 auto;
  margin-top: 3rem;
}

.login-signup-message h1 {
  font-weight: 300;
  font-size: 24px;
}

/* HEADER */

header {
  box-sizing: border-box;
  margin: 0;
  width: 1380px;
  max-width: 100%;
  padding: 0 1rem;
  height: 102px;
  justify-content: space-between;
  align-items: center;
  display: flex;
  border-bottom: 1px solid #e7eef5;
}

header .logo-wrapper {
  display: flex;
  align-items: center;
}

header a.logo {
  position: relative;
  display: flex;
  align-items: center;
  font-size: 30px;
  font-weight: bold;
  text-decoration: none;
  border: none;
  margin: 0;
  padding: 0;
}

header a.logo:hover { border: none; color: inherit; }

header .logo-user-email {
  max-width: 260px;
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  color: var(--secondary-text-color);
  font-size: 16px;
  font-weight: normal;
}

header .logo-user-lines {
  min-width: 0;
  display: inline-flex;
  flex-direction: column;
  line-height: 1.05;
}

header .logo-user-email-line,
header .logo-user-plan-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

header .logo-user-plan-line {
  font-size: 12px;
  text-align: center;
}

.inline-login-as-form {
  display: inline;
}

.inline-remove-agency-user-form {
  display: inline-flex;
  margin-left: 0.5rem;
  vertical-align: middle;
}


header .logo img {
  width: auto;
  height: 60px;
  margin: 0 6px 0 0;
  padding: 0;
}

header .logo-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.05;
  margin-right: 0.5rem;
}

header .logo-title-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

header .logo-site-name {
  font-size: 26px;
  font-weight: 700;
}

header .logo-beta-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 0.65rem;
  color: #fff;
  background: linear-gradient(135deg, hsl(262, 87%, 55%), hsl(265, 90%, 48%));
  border-radius: 999px;
  box-shadow: 0 4px 10px hsla(262, 70%, 45%, 0.22);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  transform: translateY(-6px);
}

header .logo-tagline {
  color: var(--secondary-text-color);
  font-size: 11px;
  font-style: italic;
  font-weight: normal;
  letter-spacing: 0.04em;
  margin-left: 12px;
}

header ul.logo-links {
  list-style: none;
  display: flex;
  align-items: flex-end;
  margin: 0 0 0 0.5rem;
  padding: 0;
}

header ul.logo-links li {
  padding: 2px 0 0;
  margin: 0 0 0 32px;
}

header ul.logo-links li a {
  font-size: 1rem;
}

header nav {
  display: flex;
  justify-content: flex-end;
  margin-left: auto;
}

header nav ul {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
}

header nav ul li {
  margin: 0 0 0 1.15rem;
  padding: 0;
  white-space: nowrap;
}

header nav ul li:last-child { margin-left: 0; }

/* SHORTENER */

main {
  width: 1380px;
  max-width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1rem;
  margin-top: 1rem;
}

main #shorturl {
  display: flex;
  align-items: center;
  margin: 1rem 0 3rem;
}

.shortener-panel {
  width: 100%;
  padding: 1.5rem;
  border: none;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 15px 70px rgba(0, 0, 0, 0.1);
}

.shortener-panel #shorturl {
  justify-content: center;
  text-align: center;
  margin: 0 0 2.25rem;
}

main #shorturl h1 {
  margin: 0;
  border-bottom: 2px dotted transparent;
  font-weight: 300;
  font-size: 2rem;
}

main #shorturl h1.dashboard-headline {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(1rem, 1.65vw, 1.55rem);
  line-height: 1.25;
}

main #shorturl h1.dashboard-headline strong {
  font-weight: 700;
}

main #shorturl h1.link {
  cursor: pointer;
  border-bottom-color: var(--underline-color);
  transition: opacity 0.3s ease-in-out;
  --keyframe-slidey-offset: -10px;
  animation: fadein 0.2s ease-in-out, slidey 0.2s ease-in-out;
}

main #shorturl h1.link:hover {
  opacity: 0.8;
}

.clipboard {
  width: 35px;
  height: 35px;
  display: flex;
  margin-right: 1rem;
}

.clipboard button {
  width: 100%;
  height: 100%;
  display: flex;
  margin: 0;
  padding: 7px;
  box-shadow: none;
  outline: none;
  border: none;
  background: none;
  border-radius: 100%;
  background-color: var(--copy-icon-bg-color);
  transition: transform 0.4s ease-out;
  box-shadow: 0 2px 1px var(--copy-icon-shadow-color);
  cursor: pointer;
  --keyframe-slidey-offset: -10px;
  animation: slidey 0.2s ease-in-out;
}

.clipboard.small { width: 24px; height: 24px; }
.clipboard.small button { width: 24px; height: 24px; padding: 5px; }

.clipboard button:hover,
.clipboard button:focus {
  transform: translateY(-2px) scale(1.02, 1.02);
}

.clipboard button:focus {
  outline: 3px solid var(--focus-outline-color);
}

.clipboard svg {
  stroke: var(--copy-icon-color);
  width: 100%;
  height: auto;
}

.clipboard svg.copy {
  stroke-width: 2.5;
}

.clipboard svg.check {
  display: none;
  padding: 3px;
  stroke-width: 3;
  --keyframe-slidey-offset: -10px;
  animation: slidey 0.2s ease-in-out;
}

.clipboard.copied button {
  background-color: transparent;
  box-shadow: none;
}


.clipboard.copied button { display: none; }
.clipboard.copied svg.check { display: block; }

main #shorturl h1 span {
  border-bottom: 1px dotted #999;
}

main form {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
}

main form input#target {
  position: relative;
  width: 100%;
  height: 72px;
  display: flex;
  padding: 0 330px 0 40px;
  font-size: 20px;
}

main form input#target::placeholder {
  font-size: 17px;
}

main form p.error {
  font-size: 13px;
  margin-left: 0.5rem;
}

main form .target-wrapper p.error {
  font-size: 15px;
  margin-left: 1rem;
  margin-bottom: 0;
}

main form .target-wrapper {
  position: relative;
  width: 100%;
  height: auto;
}

main form button.submit {
  position: absolute;
  cursor: pointer;
  right: 1.5rem;
  top: 14px;
  min-width: 132px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0;
  border: 0;
  border-radius: 12px;
  padding: 0.75rem 1.1rem;
  background: var(--button-bg-primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 25px var(--input-shadow-color);
  outline: none;
}

main form button.submit:focus,
main form button.submit:hover {
  outline: none;
  box-shadow: 0 6px 15px var(--button-bg-primary-box-shadow-color);
}

main form button.submit svg.spinner {
  display: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

main form.htmx-request button.submit svg.spinner { display: block; }

main form .target-wrapper.template-selected input#target {
  padding-right: 330px;
}

.select-template-link {
  position: absolute;
  right: 11rem;
  top: 36px;
  transform: translateY(-50%);
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  z-index: 1;
}

.select-template-link.disabled {
  color: hsl(204, 10%, 58%);
  cursor: not-allowed;
  font-weight: 600;
}

.selected-template-note {
  margin: 0.5rem 0 0 1rem;
  color: hsl(205, 24%, 36%);
  font-size: 13px;
}

.template-page {
  width: min(1320px, calc(100% - 2rem));
  margin: 2rem auto 4rem;
}

.template-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 2rem;
  align-items: start;
}

.template-form-panel {
  min-width: 0;
}

.template-preview-panel {
  grid-column: 2;
  justify-self: end;
  width: 100%;
}

.template-form-panel,
.template-preview-panel,
.template-list {
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
}

.template-form-panel h1,
.template-preview-panel h2,
.template-list h2 {
  margin-top: 0;
}

.template-preview-panel h2 {
  margin-bottom: 0.75rem;
}

.template-form-panel form,
.template-actions-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.template-form-panel form {
  gap: 1rem;
}

.template-form-panel form > label {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}

.template-form-panel form > label.template-textarea-row {
  align-items: start;
}

.template-form-panel form > label.template-textarea-row textarea {
  margin-top: 0;
}

.template-form-panel input,
.template-form-panel select,
.template-form-panel textarea {
  width: 100%;
  min-height: 42px;
  border: none;
  border-radius: 21px;
  padding: 0 1rem;
  background: hsl(0, 0%, 98%);
  box-shadow: var(--input-box-shadow);
}

.template-form-panel textarea {
  min-height: 90px;
  padding-top: 0.8rem;
  border-radius: 8px;
  resize: vertical;
}

.template-actions-form label {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
}

.template-actions-form small {
  grid-column: 2;
  color: hsl(204, 16%, 50%);
  font-weight: 400;
  overflow-wrap: anywhere;
}

.template-actions-form small a {
  font-weight: 400;
}

.template-phone-preview {
  position: relative;
  overflow: hidden;
  min-height: 440px;
  border-radius: 28px;
  background: linear-gradient(180deg, hsl(210, 50%, 97%), hsl(210, 34%, 91%));
  border: 6px solid hsl(208, 28%, 18%);
}

.template-preview-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.template-preview-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  padding: 2rem 1.25rem;
  text-align: center;
}

.template-preview-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 0.5rem;
  border-radius: 50%;
  object-fit: cover;
}

.template-preview-content a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
}

.template-powered-by {
  margin-top: 0.5rem;
  color: hsl(204, 16%, 50%);
  font-size: 12px;
  font-weight: 600;
}

.template-public-url {
  margin: 0.75rem 0 0.25rem;
  overflow-wrap: anywhere;
}

.template-public-url-heading {
  display: inline;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 400;
  vertical-align: baseline;
}

.template-qr {
  display: block;
  width: min(100%, 360px);
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0.25rem auto 0;
  object-fit: contain;
}

.template-list {
  margin-top: 2rem;
  width: 100%;
  overflow: hidden;
}

.template-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.template-list table {
  display: table;
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

.template-list thead {
  display: table-header-group;
}

.template-list tbody {
  display: table-row-group;
}

.template-list tr {
  display: table-row;
  padding: 0;
}

.template-list tbody tr.selected {
  background: hsla(207, 90%, 61%, 0.08);
  box-shadow: inset 4px 0 0 var(--color-primary);
}

.template-list th,
.template-list td {
  display: table-cell;
  flex-basis: auto;
  overflow: visible;
}

.template-name-column {
  width: 18%;
}

.template-type-column {
  width: 17%;
}

.template-definition-column {
  width: 26%;
}

.template-url-column {
  width: 26.5%;
}

.template-actions-column {
  width: 12.5%;
}

.template-list th,
.template-list td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: middle;
}

.template-list td:nth-child(2) {
  overflow-wrap: anywhere;
}

.template-list th:nth-child(3),
.template-list td:nth-child(3) {
  white-space: nowrap;
}

.template-list-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
}

.template-list-actions a.button.action,
.template-list-actions button.action {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  padding: 5px;
}

.template-list-actions a.button.action svg,
.template-list-actions button.action svg {
  display: block;
  width: 100%;
  height: 100%;
}

.template-list-actions form {
  margin: 0;
}

.template-list .pagination {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

#shortener-checkboxes {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
  --checkbox-bg-color: var(--color-primary);
}

#shortener-checkboxes label.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0;
}

#shortener-checkboxes label.checkbox input {
  margin: 0;
}

.batch-import-button {
  margin-left: 1.5rem;
  border: 0;
  border-radius: 12px;
  padding: 0.75rem 1.1rem;
  background: var(--button-bg-primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 25px var(--input-shadow-color);
}

.batch-import-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.batch-import-button:not(:disabled):hover,
.batch-import-button:not(:disabled):focus {
  box-shadow: 0 6px 15px var(--button-bg-primary-box-shadow-color);
}

.batch-import-dialog {
  width: min(680px, calc(100vw - 2rem));
  border: 1px solid rgba(79, 112, 156, 0.18);
  border-radius: 18px;
  padding: 0;
  color: #1b2735;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
  box-shadow: 0 30px 90px rgba(2, 12, 27, 0.42), 0 0 0 8px rgba(255, 255, 255, 0.42);
}

.batch-import-dialog::backdrop {
  background: rgba(15, 30, 48, 0.34);
  backdrop-filter: blur(5px) saturate(0.85);
}

.batch-import-dialog-content {
  padding: 1.5rem;
}

.batch-import-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.batch-import-dialog-header h2,
.batch-import-status h3 {
  margin: 0;
  color: #132235;
}

.batch-import-close {
  border: 0;
  background: transparent;
  color: #607083;
  cursor: pointer;
  font-size: 1.7rem;
  line-height: 1;
}

.batch-import-status p,
.batch-import-progress p {
  color: #5c6b7a;
}

.batch-import-progress progress {
  width: 100%;
  height: 0.85rem;
}

.batch-import-errors {
  max-height: 260px;
  overflow: auto;
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255, 80, 80, 0.08);
  color: var(--error-icon-color);
}

.batch-import-errors ul {
  margin: 0;
  padding-left: 1.25rem;
}

.batch-import-errors li + li {
  margin-top: 0.5rem;
}

.batch-import-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

#advanced-options {
  width: calc(100% - 2.25rem);
  display: flex;
  flex-direction: column;
  margin-left: 2.25rem;
  margin-top: 1.5rem;
}

#advanced-options.hidden { display: none; }

.advanced-input-wrapper {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 0.75rem 1rem;
}

.advanced-input-wrapper label {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: 0.55rem;
  flex: 1 1 0;
  min-width: 0;
}

.advanced-input-wrapper.link-protection-inputs {
  display: grid;
  grid-template-columns: minmax(150px, 1.05fr) minmax(170px, 1.2fr) minmax(150px, 1fr) minmax(130px, 0.9fr) minmax(170px, 1.1fr);
  gap: 0.55rem 0.75rem;
}

.advanced-input-wrapper.schedule-inputs {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(160px, 0.95fr) minmax(165px, 0.95fr) minmax(210px, 1.2fr);
  gap: 0.55rem 0.75rem;
}

.advanced-input-wrapper label.expire-in,
.advanced-input-wrapper label.start-at,
.advanced-input-wrapper label.expire-times,
.advanced-input-wrapper label.description,
.advanced-input-wrapper label.otp-type-field,
.advanced-input-wrapper label.otp-destination-field {
  flex: none;
}

.advanced-input-wrapper label .error,
.advanced-input-wrapper label p.error {
  grid-column: 2;
  margin-top: 0.35rem;
}

.advanced-input-wrapper .oidc-fields,
.advanced-input-wrapper .utm-fields {
  display: grid;
  grid-template-columns: max-content minmax(260px, 1.25fr) minmax(220px, 1fr) minmax(190px, 0.8fr);
  gap: 0.4rem 0.75rem;
  align-items: center;
  grid-column: 1 / -1;
  margin-top: 0;
  min-width: 0;
}

.advanced-input-wrapper .utm-fields {
  grid-template-columns: max-content repeat(5, minmax(130px, 1fr));
}

.advanced-input-wrapper .oidc-fields p,
.advanced-input-wrapper .utm-fields p {
  margin: 0;
  color: var(--text-color);
  font-weight: 700;
}

.advanced-input-wrapper .oidc-fields label,
.advanced-input-wrapper .utm-fields label {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: 0.55rem;
  padding-right: 0;
  font-weight: 400;
  min-width: 0;
}

.advanced-security-checkboxes {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 0.35rem;
  margin-bottom: 0;
  --checkbox-bg-color: var(--color-primary);
}

.advanced-security-checkboxes label.checkbox {
  flex: 0 0 auto;
}

.advanced-security-checkboxes .advanced-tag-field {
  display: grid;
  grid-template-columns: max-content minmax(220px, 1fr);
  align-items: center;
  column-gap: 0.55rem;
  flex: 1 1 340px;
  min-width: 260px;
  font-weight: 400;
}

.advanced-security-checkboxes .advanced-tag-field input {
  width: 100%;
  margin-top: 0;
  min-width: 0;
}

.advanced-security-checkboxes .advanced-tag-field p.error {
  grid-column: 2;
  margin-top: 0.35rem;
}

.advanced-input-wrapper label input,
.advanced-input-wrapper label select,
.advanced-input-wrapper .oidc-fields input,
.advanced-input-wrapper .utm-fields input {
  width: 100%;
  margin-top: 0;
  min-width: 0;
}

#advanced-options input[name="start_at"],
#advanced-options .scheduled-redirect-inputs input[type="date"],
#advanced-options .scheduled-redirect-inputs input[type="time"] {
  height: 32px;
}

.start-at-timezone {
  grid-column: 2;
  margin: 0.35rem 0 0;
  color: var(--secondary-text-color);
  font-size: 12px;
}

.os-overrides,
.geo-overrides,
.language-overrides {
  margin-top: -0.35rem;
  margin-bottom: 1rem;
}

.geo-overrides + .language-overrides {
  margin-top: -0.75rem;
}

#advanced-options .os-overrides,
#advanced-options .geo-overrides,
#advanced-options .scheduled-redirect-inputs,
#advanced-options .language-overrides {
  margin-top: 0;
  margin-bottom: 0;
}

#advanced-options .link-protection-inputs + .os-overrides,
#advanced-options .link-protection-inputs + .geo-overrides {
  margin-top: 0.25rem;
}

#advanced-options .advanced-redirects-block {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0.25rem 0 0;
  width: 100%;
}

#advanced-options .advanced-redirects-block .os-overrides,
#advanced-options .advanced-redirects-block .geo-overrides,
#advanced-options .advanced-redirects-block .scheduled-redirect-inputs,
#advanced-options .advanced-redirects-block .language-overrides {
  margin: 0;
}

#advanced-options .advanced-redirects-block .os-overrides + .geo-overrides {
  margin-top: -1.5rem !important;
}

#advanced-options .geo-overrides + .language-overrides {
  margin-top: 0;
}

#advanced-options .geo-overrides + .scheduled-redirect-inputs,
#advanced-options .scheduled-redirect-inputs + .language-overrides {
  margin-top: 0.25rem;
}

#advanced-options .os-overrides + .geo-overrides {
  margin-top: 0.25rem;
}

#advanced-options .scheduled-redirect-inputs + .language-overrides {
  margin-top: -1.25rem;
}

#advanced-options .language-overrides + .schedule-inputs {
  margin-top: 0.95rem;
}

#advanced-options .os-overrides-status,
#advanced-options .geo-overrides-status,
#advanced-options .language-overrides-status {
  margin: 0;
}

#advanced-options .os-overrides-status:empty,
#advanced-options .geo-overrides-status:empty,
#advanced-options .language-overrides-status:empty {
  display: none;
}

#advanced-options .os-overrides-table.hidden,
#advanced-options .geo-overrides-table.hidden,
#advanced-options .language-overrides-table.hidden {
  display: none;
}

.os-overrides-status,
.geo-overrides-status,
.language-overrides-status {
  margin: -0.25rem 0 0.75rem 0.5rem;
  font-size: 13px;
  color: var(--secondary-text-color);
}

.os-overrides-status:empty,
.geo-overrides-status:empty,
.language-overrides-status:empty {
  display: none;
}

.os-overrides-status.error,
.geo-overrides-status.error,
.language-overrides-status.error {
  color: var(--error-icon-color);
}

#os_target.needs-value,
#geo_target.needs-value,
#language_target.needs-value {
  box-shadow: 0 0 0 3px hsla(0, 86%, 63%, 0.18), 0 5px 15px var(--input-hover-shadow-color);
}

.os-inputs,
.geo-inputs,
.language-inputs,
.scheduled-redirect-inputs {
  align-items: flex-end;
  flex-wrap: nowrap;
  margin-bottom: 0;
  box-sizing: border-box;
  max-width: 100%;
}

.os-inputs label:first-child,
.geo-inputs label:first-child,
.language-inputs label:first-child {
  flex: 0 0 260px;
}

#advanced-options .language-inputs label:first-child {
  flex-basis: 320px;
}

.os-inputs label:nth-child(2),
.geo-inputs label:nth-child(2),
.language-inputs label:nth-child(2) {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.os-inputs label:nth-child(2) input,
.geo-inputs label:nth-child(2) input,
.language-inputs label:nth-child(2) input {
  width: 100%;
}

.os-inputs button.os-add,
.geo-inputs button.geo-add,
.language-inputs button.language-add,
.scheduled-redirect-inputs button.scheduled-redirect-add {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin-top: 1.75rem;
  margin-bottom: 0;
  padding: 0;
  gap: 0.4rem;
  justify-content: center;
}

.os-inputs button.os-add svg,
.geo-inputs button.geo-add svg,
.language-inputs button.language-add svg,
.scheduled-redirect-inputs button.scheduled-redirect-add svg {
  width: 16px;
  height: 16px;
}

.os-inputs button.os-add span,
.geo-inputs button.geo-add span,
.language-inputs button.language-add span,
.scheduled-redirect-inputs button.scheduled-redirect-add span {
  display: none;
}

.scheduled-redirect-inputs {
  display: grid;
  width: 100%;
  grid-template-columns: max-content 190px 112px 190px 112px minmax(0, 1fr) 44px;
  gap: 0.45rem 0.65rem;
  align-items: center;
}

.scheduled-redirect-inputs p {
  margin: 0;
  color: var(--text-color);
  font-weight: 700;
  white-space: nowrap;
}

.scheduled-redirect-inputs label {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: 0.45rem;
  min-width: 0;
  font-weight: 400;
  box-sizing: border-box;
}

.scheduled-redirect-inputs label:nth-of-type(5) {
  display: block;
  width: 100%;
}

.scheduled-redirect-inputs input {
  width: 100%;
  margin-top: 0;
  min-width: 0;
  box-sizing: border-box;
}

.scheduled-redirect-inputs button.scheduled-redirect-add {
  align-self: center;
  margin-top: 0;
  margin-bottom: 0;
}

.os-overrides-table,
.geo-overrides-table,
.language-overrides-table {
  width: calc(100% - 0.5rem);
  margin: 0 0 0 0.5rem;
  box-shadow: none;
}

.os-overrides-table tr,
.geo-overrides-table tr,
.language-overrides-table tr {
  padding: 0;
}

.os-overrides-table th,
.os-overrides-table td,
.geo-overrides-table th,
.geo-overrides-table td,
.language-overrides-table th,
.language-overrides-table td {
  flex: 1 1 0;
  padding: 0.5rem 0.75rem;
}

.os-overrides-table th,
.geo-overrides-table th,
.language-overrides-table th {
  font-weight: normal;
}

.os-overrides-table th:nth-child(2),
.os-overrides-table td:nth-child(2),
.geo-overrides-table th:nth-child(2),
.geo-overrides-table td:nth-child(2),
.language-overrides-table th:nth-child(2),
.language-overrides-table td:nth-child(2) {
  flex: 3 3 0;
}

.os-overrides-table th:last-child,
.os-overrides-table td:last-child,
.geo-overrides-table th:last-child,
.geo-overrides-table td:last-child,
.language-overrides-table th:last-child,
.language-overrides-table td:last-child {
  flex: 0 0 96px;
  justify-content: flex-end;
}

/* MAIN TABLE */

#main-table-wrapper {
  width: 1380px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  align-items: flex-start;
  padding: 0 1rem;
  margin: 3rem 0 7.5rem;
}

#main-table-wrapper.admin-table-wrapper {
  margin-bottom: 2.5rem;
}

.admin-table-heading {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-table-heading h2 {
  margin-bottom: 0 !important;
}

.admin-tool-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.admin-tool-link {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
}

#main-table-wrapper h2 {
  font-weight: 300;
  margin-bottom: 1rem;
}

#main-table-wrapper table thead,
#main-table-wrapper table tbody,
#main-table-wrapper table tfoot {
  min-width: 1150px;
}

#main-table-wrapper tr {
  padding: 0 0.5rem;
}

#main-table-wrapper th,
#main-table-wrapper td {
  padding: 1rem;
}

#main-table-wrapper td {
  font-size: 1rem;
}


#main-table-wrapper table .original-url { flex: 7 7 0; }
#main-table-wrapper:not(.admin-table-wrapper) table .original-url {
  flex: 1 1 560px;
  min-width: 0;
}
#main-table-wrapper table .created-at { flex: 2.5 2.5 0; }
#main-table-wrapper:not(.admin-table-wrapper) table .created-at { flex: 0 0 150px; }
#main-table-wrapper table .short-link { flex: 3 3 0; }
#main-table-wrapper:not(.admin-table-wrapper) table .short-link {
  flex: 0 0 170px;
  max-width: 170px;
}
#main-table-wrapper.admin-table-wrapper table .short-link { overflow: visible; }
#main-table-wrapper table .views { flex: 1 1 0; justify-content: flex-end; }
#main-table-wrapper:not(.admin-table-wrapper) table .views { flex: 0 0 96px; }
#main-table-wrapper table .actions { flex: 3 3 0; justify-content: flex-end; overflow: visible; }
#main-table-wrapper:not(.admin-table-wrapper) table .actions { flex: 0 0 180px; }
#main-table-wrapper table .actions a.button,
#main-table-wrapper table .actions button { margin-right: 0.5rem; }
#main-table-wrapper table .actions a.button:last-child,
#main-table-wrapper table .actions button:last-child { margin-right: 0; }

#main-table-wrapper.links-table-wrapper table .original-url {
  flex: 1 1 auto !important;
  min-width: 490px;
}

#main-table-wrapper.links-table-wrapper table .created-at {
  flex: 0 0 140px !important;
}

#main-table-wrapper.links-table-wrapper table .short-link {
  flex: 0 0 240px !important;
  max-width: 240px;
  overflow: visible;
}

#main-table-wrapper.links-table-wrapper table .short-link a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#main-table-wrapper.links-table-wrapper table .views {
  flex: 0 0 96px !important;
}

#main-table-wrapper.links-table-wrapper table .actions {
  flex: 0 0 210px !important;
}

#main-table-wrapper table .users-id { flex: 3 3 0; justify-content: flex-end; }
#main-table-wrapper table .users-email { flex: 9 9 0; }
#main-table-wrapper table .users-created-at { flex: 4 4 0; }
#main-table-wrapper table .users-updated-at { flex: 4 4 0; }
#main-table-wrapper table .users-verified { flex: 3 3 0; overflow: visible; }
#main-table-wrapper table .users-role { flex: 2 2 0; overflow: visible; }
#main-table-wrapper table .users-links-count { flex: 3 3 0; justify-content: flex-end; overflow: visible; }
#main-table-wrapper table .users-actions { flex: 2 2 0; }

#main-table-wrapper table .domains-id { flex: 2 2 0; justify-content: flex-end; }
#main-table-wrapper table .domains-address { flex: 7 7 0; }
#main-table-wrapper table .domains-homepage { flex: 5 5 0; }
#main-table-wrapper table .domains-created-at { flex: 3 3 0; }
#main-table-wrapper table .domains-links-count { flex: 3 3 0; justify-content: flex-end; overflow: visible; }
#main-table-wrapper table .domains-actions { flex: 2 2 0; }

#main-table-wrapper table .activity-created-at { flex: 3 3 0; }
#main-table-wrapper table .activity-category { flex: 2 2 0; overflow: visible; }
#main-table-wrapper table .activity-action { flex: 5 5 0; }
#main-table-wrapper table .activity-user { flex: 4 4 0; }
#main-table-wrapper table .activity-target { flex: 6 6 0; }
#main-table-wrapper table .activity-domain { flex: 3 3 0; }
#main-table-wrapper table .activity-status { flex: 1 1 0; justify-content: flex-end; }

#main-table-wrapper table td.original-url,
#main-table-wrapper table td.created-at,
#main-table-wrapper.admin-table-wrapper table td.short-link,
#main-table-wrapper table td.users-email,
#main-table-wrapper table td.domains-address,
#main-table-wrapper table td.activity-created-at,
#main-table-wrapper table td.activity-action,
#main-table-wrapper table td.users-created-at, 
#main-table-wrapper table td.users-verified { 
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

table .short-link-wrapper { display: flex; align-items: center; }

#main-table-wrapper table td .description {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 14px;
  color: #888;
}
#main-table-wrapper table td .description a {
  color: #aaa;
  border-bottom-color: #aaa;
}

#main-table-wrapper table td.original-url.broken-link a {
  color: var(--error-icon-color);
  border-bottom-color: var(--error-icon-color);
}

#main-table-wrapper table td.original-url.forbidden-link a {
  color: #555;
  border-bottom-color: #555;
}

#main-table-wrapper table td .description svg {
  stroke: #aaa;
  stroke-width: 2;
  width: 0.85em;
  margin-right: 0.25rem;
}
#main-table-wrapper table td .description span { color: #aaa; }
#main-table-wrapper table td .description a:hover { border-bottom-color: transparent; }

#main-table-wrapper table td.activity-target {
  align-items: flex-start;
  justify-content: center;
  line-height: 1.35;
  overflow: visible;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

#main-table-wrapper table .activity-action-value {
  display: flex;
  align-items: center;
  min-width: 0;
}

#main-table-wrapper table .activity-action-value .clipboard {
  flex: 0 0 auto;
}

#main-table-wrapper table .activity-action-value span {
  overflow-wrap: anywhere;
}

#main-table-wrapper table .status {
  font-size: 11px;
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 12px;
  margin-top: 0.25rem;
}

#main-table-wrapper table .status:first-child {
  margin-top: 0;
}

#main-table-wrapper table .status.gray { background-color: var(--table-status-gray-bg-color); }
#main-table-wrapper table .status.green { background-color: hsl(102.4, 100%, 93.3%); }
#main-table-wrapper table .status.red { background-color: hsl(0, 100%, 96.7%); }

#main-table-wrapper table tr.no-data {
  flex: 1 1 auto; 
  justify-content: center;
  animation: fadein 0.3s ease-in-out;
}

#main-table-wrapper table.htmx-request tbody tr { opacity: 0.5; }
#main-table-wrapper table tr.loading-placeholder { opacity: 0.6 !important; }

#main-table-wrapper table tr.loading-placeholder td,
#main-table-wrapper table tr.no-data td {
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 300;
}

#main-table-wrapper table tr.loading-placeholder svg.spinner {
  width: 1rem;
  height: auto;
  margin-right: 0.5rem;
  stroke-width: 1.5;
}

#main-table-wrapper table thead tr.controls {
  justify-content: space-between;
  gap: 1rem;
}

#main-table-wrapper table thead tr.controls.with-filters {
  align-items: flex-start;
  flex-wrap: wrap;
}
#main-table-wrapper table tfoot tr.controls { justify-content: flex-end; }

#main-table-wrapper table th.search {
  flex: 1 1 auto;
  align-items: center;
  gap: 0.75rem;
}

#main-table-wrapper table th.search input.search {
  flex: 0 1 360px;
  max-width: 360px;
}

#main-table-wrapper table th.original-url .header-hint {
  margin-left: 0.5rem;
  font-weight: 400;
}

#main-table-wrapper table th.filters {
  flex: 1 1 760px;
  min-width: 0;
  flex-direction: column;
  align-items: start;
}

#main-table-wrapper table th.filters > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

#main-table-wrapper table th.filters > div:last-child { margin-bottom: 0; }

#main-table-wrapper table th.nav {
  flex: 0 0 auto;
  align-items: center;
}

#main-table-wrapper table tr.controls .checkbox {
  margin-left: 1rem;
  font-size: 15px;
}

#main-table-wrapper table .limit,
#main-table-wrapper table .pagination {
  display: flex;
  align-items: center;
}

#main-table-wrapper table button.nav { margin-right: 0.75rem; }
#main-table-wrapper table button.nav:last-child { margin-right: 0; }

#main-table-wrapper table .nav-divider {
  height: 20px;
  width: 1px;
  opacity: 0.4;
  background-color: #888;
  margin: 0 1.5rem;
}

.activity-log-table-wrapper {
  width: 1200px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  align-items: flex-start;
  padding: 0 1rem;
  margin: 0 0 7.5rem;
}

.activity-log-table-wrapper h2 {
  font-weight: 300;
  margin-bottom: 1rem;
}

.activity-log-table-wrapper table thead,
.activity-log-table-wrapper table tbody,
.activity-log-table-wrapper table tfoot {
  min-width: 1000px;
}

.activity-log-table-wrapper tr { padding: 0 0.5rem; }

.activity-log-table-wrapper th,
.activity-log-table-wrapper td { padding: 1rem; }

.activity-log-table-wrapper td { font-size: 1rem; }

.activity-log-table-wrapper table .activity-created-at { flex: 3 3 0; }
.activity-log-table-wrapper table .activity-category { flex: 2 2 0; overflow: visible; }
.activity-log-table-wrapper table .activity-action { flex: 5 5 0; }
.activity-log-table-wrapper table .activity-user { flex: 4 4 0; }
.activity-log-table-wrapper table .activity-target { flex: 6 6 0; }
.activity-log-table-wrapper table .activity-domain { flex: 3 3 0; }
.activity-log-table-wrapper table .activity-status { flex: 1 1 0; justify-content: flex-end; }

.activity-log-table-wrapper table td.activity-created-at,
.activity-log-table-wrapper table td.activity-action {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.activity-log-table-wrapper table td .description {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 14px;
  color: #888;
}

.activity-log-table-wrapper table tr.no-data {
  flex: 1 1 auto;
  justify-content: center;
  animation: fadein 0.3s ease-in-out;
}

.activity-log-table-wrapper table.htmx-request tbody tr { opacity: 0.5; }
.activity-log-table-wrapper table tr.loading-placeholder { opacity: 0.6 !important; }

.activity-log-table-wrapper table tr.loading-placeholder td,
.activity-log-table-wrapper table tr.no-data td {
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 300;
}

.activity-log-table-wrapper table tr.loading-placeholder svg.spinner {
  width: 1rem;
  height: auto;
  margin-right: 0.5rem;
  stroke-width: 1.5;
}

.activity-log-table-wrapper table thead tr.controls {
  justify-content: space-between;
}

.activity-log-table-wrapper table thead tr.controls.with-filters {
  align-items: flex-end;
}

.activity-log-table-wrapper table tfoot tr.controls {
  justify-content: flex-end;
}

.activity-log-table-wrapper table th.filters {
  flex: 1 1 auto;
  flex-direction: column;
  align-items: start;
}

.activity-log-table-wrapper table th.filters > div {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.activity-log-table-wrapper table th.filters > div:last-child { margin-bottom: 0; }

.activity-log-table-wrapper table th.nav {
  flex: 0 0 auto;
  align-items: center;
}

.activity-log-table-wrapper table .limit,
.activity-log-table-wrapper table .pagination {
  display: flex;
  align-items: center;
}

.activity-log-table-wrapper table button.activity-nav { margin-right: 0.75rem; }
.activity-log-table-wrapper table button.activity-nav:last-child { margin-right: 0; }

.activity-log-table-wrapper table .nav-divider {
  height: 20px;
  width: 1px;
  opacity: 0.4;
  background-color: #888;
  margin: 0 1.5rem;
}

#main-table-wrapper table tbody tr:hover {
  background-color: var(--table-tr-hover-bg-color);
}

#main-table-wrapper table tbody td.right-fade:after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 16px;
  background: linear-gradient(to left, white, rgba(255, 255, 255, 0.001));
}

#main-table-wrapper table tbody tr:hover td.right-fade:after {
  background: linear-gradient(to left, var(--table-tr-hover-bg-color), rgba(255, 255, 255, 0.001));
}

#main-table-wrapper table .clipboard { margin-right: 0.5rem; }
#main-table-wrapper table .clipboard svg.check { width: 24px; }

#main-table-wrapper table .short-link .clipboard button[data-tooltip]:before,
#main-table-wrapper table .short-link .clipboard button[data-tooltip]:after {
  transform: translate(-50%, 0.5rem);
}

#main-table-wrapper table .short-link .clipboard button[data-tooltip]:before {
  top: calc(100% + 4px);
  border-top-width: 0;
  border-top-color: transparent;
  border-bottom-color: #333;
}

#main-table-wrapper table .short-link .clipboard button[data-tooltip]:after {
  top: calc(100% + 12px);
}

#main-table-wrapper table tr.edit {
  background-color: #fafafa;
  --checkbox-bg-color: var(--color-primary);
}

#main-table-wrapper table tr.edit td { 
  width: 100%;
  padding: 2rem 1.5rem;
  flex-basis: auto;
}
#main-table-wrapper table tr.edit td form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#main-table-wrapper table tr.edit td form > div {
  width: 100%;
  display: flex;
  align-items: start;
}

#main-table-wrapper table tr.edit label { margin: 0 0.5rem 1rem; }
#main-table-wrapper table tr.edit label:first-child { margin-left: 0; }
#main-table-wrapper table tr.edit label:last-child { margin-right: 0; }

#main-table-wrapper table tr.edit .edit-primary-row {
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  min-width: 980px;
}

#main-table-wrapper table tr.edit .edit-primary-row label {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: 0.45rem;
  margin: 0 0 0.6rem;
  min-width: 0;
  text-align: left;
}

#main-table-wrapper table tr.edit .edit-target-geo {
  display: flex;
  flex-direction: column;
  flex: 1 1 100%;
  min-width: 0;
  margin: 0 0 0.6rem;
}

#main-table-wrapper table tr.edit .edit-target-geo label {
  grid-template-columns: max-content minmax(0, 1fr);
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

#main-table-wrapper table tr.edit .edit-target-template-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

#main-table-wrapper table tr.edit .edit-target-template-wrapper input {
  flex: 1 1 auto;
  min-width: 0;
}

#main-table-wrapper table tr.edit .edit-select-template-link {
  flex: 0 0 auto;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

#main-table-wrapper table tr.edit .edit-domain-field {
  flex: 0 0 190px;
  margin-left: 0;
}

#main-table-wrapper table tr.edit .edit-address-field {
  flex: 0 0 230px;
}

#main-table-wrapper table tr.edit .edit-password-field {
  flex: 0 0 210px;
}

#main-table-wrapper table tr.edit .edit-otp-type-field {
  flex: 0 0 190px;
}

#main-table-wrapper table tr.edit .edit-otp-destination-field {
  flex: 1 1 280px;
  min-width: 240px;
}

#main-table-wrapper table tr.edit .edit-oidc-row,
#main-table-wrapper table tr.edit .edit-utm-row {
  display: grid;
  grid-template-columns: max-content minmax(260px, 1.25fr) minmax(220px, 1fr) minmax(190px, 0.8fr);
  gap: 0.4rem 0.75rem;
  align-items: center;
  flex-wrap: initial;
  margin-bottom: 0.35rem;
}

#main-table-wrapper table tr.edit .edit-utm-row {
  grid-template-columns: max-content repeat(5, minmax(130px, 1fr));
}

#main-table-wrapper table tr.edit .edit-oidc-label,
#main-table-wrapper table tr.edit .edit-utm-label {
  margin: 0;
  color: var(--text-color);
  font-weight: 700;
}

#main-table-wrapper table tr.edit .edit-oidc-discovery-field,
#main-table-wrapper table tr.edit .edit-oidc-client-field,
#main-table-wrapper table tr.edit .edit-oidc-sso-name-field,
#main-table-wrapper table tr.edit .edit-utm-field {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: 0.55rem;
  margin: 0;
  min-width: 0;
}

#main-table-wrapper table tr.edit .edit-oidc-discovery-field {
  flex: none;
}

#main-table-wrapper table tr.edit .edit-oidc-client-field {
  flex: none;
}

#main-table-wrapper table tr.edit .edit-oidc-sso-name-field {
  flex: none;
}

#main-table-wrapper table tr.edit .edit-oidc-row .edit-field-label,
#main-table-wrapper table tr.edit .edit-utm-row .edit-field-label {
  font-weight: 400;
}

#main-table-wrapper table tr.edit .edit-schedule-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(160px, 0.95fr) minmax(165px, 0.95fr) minmax(210px, 1.2fr);
  gap: 0.55rem 0.75rem;
  align-items: center;
}

#main-table-wrapper table tr.edit .edit-schedule-row label {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: 0.55rem;
  margin: 0 0 0.5rem;
  min-width: 0;
}

#main-table-wrapper table tr.edit .edit-field-label {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-left: 1rem;
  overflow: hidden;
  color: var(--text-color);
  font-size: inherit;
  line-height: 1.25rem;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#main-table-wrapper table tr.edit input {
  height: 44px;
  padding: 0 1.5rem;
  font-size: 15px;
}

#main-table-wrapper table tr.edit select {
  width: 100%;
  height: 44px;
  padding: 0 2rem 0 1rem;
  color: var(--text-color);
  background: white;
  border: none;
  border-radius: 100px;
  box-shadow: 0 5px 12px var(--input-shadow-color);
  font: inherit;
  font-size: 14px;
}

#main-table-wrapper table tr.edit .edit-primary-row input,
#main-table-wrapper table tr.edit .edit-primary-row select {
  margin-top: 0;
  padding-left: 1rem;
  text-align: left;
  text-indent: 0;
}

#main-table-wrapper table tr.edit label > .edit-field-label + input,
#main-table-wrapper table tr.edit label > .edit-field-label + select {
  margin-top: 0.5rem;
  padding-left: 1rem;
  text-align: left;
}

#main-table-wrapper table tr.edit .edit-primary-row label > .edit-field-label + input,
#main-table-wrapper table tr.edit .edit-primary-row label > .edit-field-label + select {
  margin-top: 0;
}

#main-table-wrapper table tr.edit .edit-primary-row .edit-field-label {
  width: auto;
  padding-left: 0;
}

#main-table-wrapper table tr.edit .edit-oidc-row label > .edit-field-label + input,
#main-table-wrapper table tr.edit .edit-utm-row label > .edit-field-label + input,
#main-table-wrapper table tr.edit .edit-schedule-row label > .edit-field-label + input,
#main-table-wrapper table tr.edit .edit-schedule-row label > .edit-field-label + select {
  margin-top: 0;
}

#main-table-wrapper table tr.edit input,
#main-table-wrapper table tr.edit input + p {
  width: 240px;
  max-width: 100%;
  font-size: 14px;
  text-wrap: wrap;
  text-align: left;
}

#main-table-wrapper table tr.edit input[name="target"],
#main-table-wrapper table tr.edit input[name="target"] + p,
#main-table-wrapper table tr.edit input[name="description"],
#main-table-wrapper table tr.edit input[name="description"] + p {
  width: 420px;
}

#main-table-wrapper table tr.edit .edit-primary-row input[name="target"],
#main-table-wrapper table tr.edit .edit-primary-row input[name="target"] + p {
  width: 100%;
}

#main-table-wrapper table tr.edit .edit-address-field input,
#main-table-wrapper table tr.edit .edit-password-field input,
#main-table-wrapper table tr.edit .edit-otp-destination-field input,
#main-table-wrapper table tr.edit .edit-oidc-discovery-field input,
#main-table-wrapper table tr.edit .edit-oidc-client-field input,
#main-table-wrapper table tr.edit .edit-oidc-sso-name-field input,
#main-table-wrapper table tr.edit .edit-utm-field input {
  width: 100%;
}

#main-table-wrapper table tr.edit .edit-primary-row .edit-target-field input {
  width: 100%;
}

#main-table-wrapper table tr.edit .edit-os-overrides,
#main-table-wrapper table tr.edit .edit-geo-overrides,
#main-table-wrapper table tr.edit .edit-language-overrides,
#main-table-wrapper table tr.edit .edit-scheduled-redirects {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#main-table-wrapper table tr.edit .edit-os-overrides-table,
#main-table-wrapper table tr.edit .edit-geo-overrides-table,
#main-table-wrapper table tr.edit .edit-language-overrides-table,
#main-table-wrapper table tr.edit .edit-scheduled-redirect-table {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: -0.35rem 0 1rem;
  box-shadow: none;
}

#main-table-wrapper table tr.edit .edit-scheduled-redirect-table,
#main-table-wrapper table tr.edit .edit-scheduled-redirect-table tbody {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#main-table-wrapper table tr.edit .edit-os-overrides-table tr,
#main-table-wrapper table tr.edit .edit-geo-overrides-table tr,
#main-table-wrapper table tr.edit .edit-language-overrides-table tr,
#main-table-wrapper table tr.edit .edit-scheduled-redirect-table tr {
  padding: 0;
  box-sizing: border-box;
  max-width: 100%;
}

#main-table-wrapper table tr.edit .edit-scheduled-redirect-table tr.edit-scheduled-redirect-row {
  display: grid;
  width: 100%;
  grid-template-columns: 170px minmax(0, 1fr) 100px minmax(0, 1fr) 100px minmax(0, 1.4fr) 72px;
  align-items: center;
  column-gap: 0.45rem;
}

#main-table-wrapper table tr.edit .edit-os-overrides-table td,
#main-table-wrapper table tr.edit .edit-geo-overrides-table td,
#main-table-wrapper table tr.edit .edit-language-overrides-table td,
#main-table-wrapper table tr.edit .edit-scheduled-redirect-table td {
  padding: 0.45rem 0.6rem;
  flex: 1 1 0;
  text-align: left;
}

#main-table-wrapper table tr.edit .edit-scheduled-redirect-table td {
  min-width: 0;
  padding: 0.45rem 0;
  flex: initial;
  box-sizing: border-box;
}

#main-table-wrapper table tr.edit .edit-os-overrides-table td.edit-override-label,
#main-table-wrapper table tr.edit .edit-geo-overrides-table td.edit-override-label,
#main-table-wrapper table tr.edit .edit-language-overrides-table td.edit-override-label {
  flex: 0 0 170px;
  color: var(--text-color);
  font-weight: 700;
  white-space: nowrap;
}

#main-table-wrapper table tr.edit .edit-scheduled-redirect-table td.edit-override-label {
  color: var(--text-color);
  font-weight: 700;
  white-space: nowrap;
}

#main-table-wrapper table tr.edit .edit-os-overrides-table td:nth-child(3),
#main-table-wrapper table tr.edit .edit-geo-overrides-table td:nth-child(3),
#main-table-wrapper table tr.edit .edit-language-overrides-table td:nth-child(3) {
  flex: 1 1 auto;
  min-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#main-table-wrapper table tr.edit .edit-os-overrides-table td:nth-child(2),
#main-table-wrapper table tr.edit .edit-geo-overrides-table td:nth-child(2),
#main-table-wrapper table tr.edit .edit-language-overrides-table td:nth-child(2) {
  flex: 0 0 190px;
  min-width: 190px;
}

#main-table-wrapper table tr.edit .edit-scheduled-redirect-table td:nth-child(2),
#main-table-wrapper table tr.edit .edit-scheduled-redirect-table td:nth-child(4) {
  flex: initial;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: 0.4rem;
}

#main-table-wrapper table tr.edit .edit-scheduled-redirect-table td:nth-child(3),
#main-table-wrapper table tr.edit .edit-scheduled-redirect-table td:nth-child(5) {
  flex: initial;
}

#main-table-wrapper table tr.edit .edit-scheduled-redirect-table td:nth-child(6) {
  flex: initial;
  overflow: hidden;
  text-overflow: ellipsis;
}

#main-table-wrapper table tr.edit .edit-os-overrides-table td:last-child,
#main-table-wrapper table tr.edit .edit-geo-overrides-table td:last-child,
#main-table-wrapper table tr.edit .edit-language-overrides-table td:last-child {
  flex: 0 0 72px;
  justify-content: flex-end;
  overflow: visible;
}

#main-table-wrapper table tr.edit .edit-scheduled-redirect-table td:last-child {
  flex: initial;
  justify-content: flex-end;
  overflow: visible;
}

#main-table-wrapper table tr.edit .edit-os-overrides-table button.action,
#main-table-wrapper table tr.edit .edit-geo-overrides-table button.action,
#main-table-wrapper table tr.edit .edit-language-overrides-table button.action,
#main-table-wrapper table tr.edit .edit-scheduled-redirect-table button.action {
  width: 24px;
  height: 24px;
  padding: 5px;
  margin-right: 0.35rem;
}

#main-table-wrapper table tr.edit .edit-os-overrides-table button.action:last-child,
#main-table-wrapper table tr.edit .edit-geo-overrides-table button.action:last-child,
#main-table-wrapper table tr.edit .edit-language-overrides-table button.action:last-child,
#main-table-wrapper table tr.edit .edit-scheduled-redirect-table button.action:last-child {
  margin-right: 0;
}

#main-table-wrapper table tr.edit .edit-os-overrides-table button.action.add,
#main-table-wrapper table tr.edit .edit-geo-overrides-table button.action.add,
#main-table-wrapper table tr.edit .edit-language-overrides-table button.action.add,
#main-table-wrapper table tr.edit .edit-scheduled-redirect-table button.action.add {
  background: hsl(144, 100%, 96%);
}

#main-table-wrapper table tr.edit .edit-os-overrides-table button.action.add svg,
#main-table-wrapper table tr.edit .edit-geo-overrides-table button.action.add svg,
#main-table-wrapper table tr.edit .edit-language-overrides-table button.action.add svg,
#main-table-wrapper table tr.edit .edit-scheduled-redirect-table button.action.add svg {
  stroke-width: 2.5;
  stroke: hsl(144, 40%, 45%);
}

#main-table-wrapper table tr.edit .edit-os-overrides-status,
#main-table-wrapper table tr.edit .edit-geo-overrides-status,
#main-table-wrapper table tr.edit .edit-language-overrides-status {
  margin: -0.35rem 0 1rem;
  font-size: 13px;
  color: var(--secondary-text-color);
}

#main-table-wrapper table tr.edit .edit-os-overrides-status:empty,
#main-table-wrapper table tr.edit .edit-geo-overrides-status:empty,
#main-table-wrapper table tr.edit .edit-language-overrides-status:empty {
  display: none;
}

#main-table-wrapper table tr.edit .edit-scheduled-redirect-table input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 32px;
  margin-top: 0;
  padding: 0 0.75rem;
  font-size: 13px;
}

#main-table-wrapper table tr.edit input[name="start_at"] {
  height: 32px;
  padding: 0 0.75rem;
  font-size: 13px;
}

#main-table-wrapper table tr.edit .edit-scheduled-redirect-table .edit-field-label {
  display: inline-block;
  margin-right: 0.35rem;
  font-size: 13px;
  white-space: nowrap;
}

#main-table-wrapper table tr.edit label.checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0 0.75rem 2px 0;
  padding: 0;
}

#main-table-wrapper table tr.edit label.checkbox {
  flex-direction: row;
  align-items: center;
  font-weight: normal;
  font-size: 1rem;
}

#main-table-wrapper table tr.edit .edit-tag-field {
  display: grid;
  grid-template-columns: max-content minmax(220px, 1fr);
  align-items: center;
  column-gap: 0.55rem;
  flex: 1 1 340px;
  min-width: 260px;
  margin-top: -8px;
}

#main-table-wrapper table tr.edit .edit-tag-field input {
  width: 100%;
  height: 32px;
  padding: 0 0.75rem;
  margin: 0;
}

#main-table-wrapper table tr.edit .edit-os-overrides-status.error,
#main-table-wrapper table tr.edit .edit-geo-overrides-status.error,
#main-table-wrapper table tr.edit .edit-language-overrides-status.error {
  color: var(--error-icon-color);
}

#main-table-wrapper table tr.edit input.edit-os-target-input,
#main-table-wrapper table tr.edit input.edit-geo-target-input,
#main-table-wrapper table tr.edit input.edit-language-target-input {
  width: 100%;
  height: 32px;
  padding: 0 0.75rem;
}

#main-table-wrapper table tr.edit select.edit-os-select,
#main-table-wrapper table tr.edit select.edit-geo-country-select,
#main-table-wrapper table tr.edit select.edit-language-select {
  width: 100%;
  height: 32px;
  padding: 0 1.75rem 0 0.75rem;
  font-size: 13px;
  border-bottom-width: 2px;
  border-radius: 3px;
  background-position: right 0.7em top 50%, 0 0;
}

#main-table-wrapper table tr.edit button {
  height: 38px;
  margin-right: 1rem;
}

#main-table-wrapper table tr.edit button:last-child { margin-right: 0; }

#main-table-wrapper table tr.edit .edit-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#main-table-wrapper table tr.edit .edit-actions .edit-update-error {
  margin: 0;
  font-size: 13px;
}

#main-table-wrapper table tr.edit form {
  --keyframe-slidey-offset: -5px;
  animation: fadein 0.3s ease-in-out, slidey 0.32s ease-in-out;
}

#main-table-wrapper table tr.edit form.no-animation { animation: none; }

#main-table-wrapper table tr.edit { display: none; }
#main-table-wrapper table tr.edit.show { display: flex; }
#main-table-wrapper table tr.edit td.loading { display: none; }
#main-table-wrapper table tr.edit.htmx-request td.loading { display: block; }
#main-table-wrapper table tr.edit td.loading svg { width: 16px; height: 16px; }

#main-table-wrapper table tr.edit form.htmx-request button .reload { display: none; }
#main-table-wrapper table tr.edit form button .loader { display: none; }
#main-table-wrapper table tr.edit form.htmx-request button .loader { display: inline-block; }

#main-table-wrapper table tr.edit form .response p { margin: 2rem 0 0; }

#main-table-wrapper table tr.edit p.no-data {
  width: 100%;
  text-align: center;
}

.dialog .ban-checklist {
  display: flex;
  align-items: center;
}

.dialog .ban-checklist label { margin: 1rem 1.5rem 1rem 0; }
.dialog .ban-checklist label:last-child { margin-right: 0; }

#main-table-wrapper tr.category { justify-content: space-between; align-items: center; }
#main-table-wrapper th.category-total { flex: 1 1 auto; }
#main-table-wrapper th.category-total p { margin: 0; font-size: 15px; font-weight: normal }
#main-table-wrapper th.category-tab { flex: 2 2 auto; justify-content: flex-end; }

/* ADMIN */

table .search-input-wrapper {
  display: flex;
  align-items: center;
  flex: 0 1 220px;
  min-width: 180px;
  margin-right: 0;
}

input.search.admin {
  width: 100%;
  max-width: 220px;
}

.content.admin-create form {
  display: flex;
  flex-direction: column;
}

.content.admin-create .checkbox-wrapper {
  display: flex;
  align-items: center;
}

.content.admin-create .checkbox-wrapper label { margin-right: 1rem; }

.content.admin-create .buttons { justify-content: center; }
.content.admin-create .buttons button { flex: 1 1 auto; }

/* FOOTER */

footer {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 1rem 0;
  font-size: 13px;
  text-align: center;
}

footer button.link {
  display: inline-block;
  font-size: 13px;
}

footer button.link .spinner {
  display: none;
  width: 1em;
  margin: 0 0 -2px;
}

footer button.link.htmx-request .spinner { display: inline; }

/* SETTINGS */

#settings {
  width: 820px;
  max-width: 100%;
  padding: 0 16px;
  overflow: hidden;
}

h1.settings-welcome {
  font-size: 28px;
  font-weight: 300;
}

h1.settings-welcome span {
  border-bottom: 2px dotted #999;
  padding-bottom: 2px;
  font-weight: normal;
}

.settings-plan {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: bold;
  line-height: 1;
  vertical-align: middle;
  text-transform: uppercase;
}

.settings-plan.free {
  background-color: hsl(200, 12%, 95%);
  color: hsl(200, 11%, 28%);
}

.settings-plan.silver {
  background-color: hsl(210, 18%, 92%);
  color: hsl(210, 12%, 30%);
}

.settings-plan.gold {
  background-color: hsl(46, 100%, 90%);
  color: hsl(35, 62%, 30%);
}

.settings-plan.platinum {
  background-color: hsl(190, 55%, 88%);
  color: hsl(190, 72%, 24%);
}

/* SETTINGS - USAGE */

#usage-wrapper {
  width: 100%;
  align-self: stretch;
  margin-bottom: 1.5rem;
}

#usage-table {
  width: 100%;
  margin-top: 1rem;
  min-width: 0;
}

#usage-table .usage-links,
#usage-table .usage-visits,
#usage-table .usage-domains,
#usage-table .usage-monitors {
  flex: 1.25 1.25 0;
}

#usage-table .usage-visits {
  flex: 1.5 1.5 0;
}

.usage-upgrade {
  margin-top: 1rem;
}

.usage-upgrade a {
  font-weight: bold;
}

/* SETTINGS - DOMAIN */

#associated-users-wrapper {
  width: 100%;
  align-self: stretch;
}

#domains-table,
#associated-users-table { margin-top: 1rem; }

#domains-table .domain,
#associated-users-table .domain { flex: 2 2 0; }

#domains-table .homepage,
#associated-users-table .homepage { flex: 2 2 0; }

#domains-table .actions,
#associated-users-table .actions { flex: 1 1 0; justify-content: flex-end; padding-right: 1rem; }

#domains-table .no-entry,
#associated-users-table .no-entry { flex: 1 1 0; opacity: 0.8; }

.add-domain-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 1.5rem 0 2rem;
}

.add-domain-wrapper > .spinner { 
  width: 20px; 
  display: none; 
  margin: 1rem 0 0 1rem; 
}
.add-domain-wrapper.htmx-request > button { display: none; }
.add-domain-wrapper.htmx-request > .spinner { display: block; }

form#add-domain { margin-top: 1rem; }
form#add-domain .buttons-wrapper { display: flex; }
form#add-domain button { margin-right: 1rem }
form#add-domain .spinner { width: 20px; display: none; }
form#add-domain.htmx-request .buttons-wrapper { display: none; }
form#add-domain.htmx-request .spinner { display: block; }
form#add-domain .error { font-size: 0.85rem; }

/* SETTINGS - API */

#apikey-wrapper,
#batch-import-template-wrapper { margin-bottom: 1.5rem; }

a.button.batch-import-template-download {
  width: max-content;
  height: 40px;
  padding: 0 1rem;
  border-radius: 100px;
}

#apikey {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

#apikey p {
  font-weight: bold;
  border-bottom: 1px dotted #999;
  transition: opacity 0.2s ease-in-out;
  cursor: pointer;
  line-break: anywhere;
}

#apikey p:hover {
  opacity: 0.8;
}

form#generate-apikey .spinner { display: none; }
form#generate-apikey.htmx-request svg { display: none; }
form#generate-apikey.htmx-request .spinner { display: block; }

/* SETTINGS - PAYMENTS */

#payments-wrapper {
  align-self: stretch;
  margin-bottom: 1.5rem;
}

#payments-wrapper > a {
  display: inline-flex;
  margin: 1rem 0 0;
  font-size: 15px;
}

#payments-wrapper .plan {
  display: inline-block;
  margin: 0 0.25rem;
}

#payments-wrapper .status {
  font-size: 11px;
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 12px;
}

#payments-wrapper .status.green {
  background-color: hsl(102.4, 100%, 93.3%);
}

#payments-wrapper .status.paid {
  background-color: hsl(102.4, 100%, 93.3%);
}

#payments-wrapper .status.pending {
  background-color: hsl(60, 100%, 90%);
}

#payments-wrapper .status.failed {
  background-color: hsl(0, 100%, 96.7%);
}

#payments-wrapper .status.refunded {
  background-color: hsl(200, 12%, 95%);
}

#payments-table {
  margin-top: 1rem;
}

table .payments-date { flex: 3 3 0; }
table .payments-plan { flex: 2 2 0; }
table .payments-amount {
  flex: 2 2 0;
  justify-content: flex-end;
  padding-right: 2rem;
}
table .payments-status {
  flex: 2 2 0;
  overflow: visible;
}

#payments-table .no-entry {
  flex: 1 1 0;
  opacity: 0.8;
}

#payments-table .no-entry a {
  margin-left: 0.5rem;
}

table .payments-status a,
table .payments-status a:hover,
table .payments-status a:focus {
  color: inherit;
  text-decoration: none;
  border: none;
}

/* SETTINGS - ASSOCIATE AGENCY */

#associate-agency-wrapper { margin-bottom: 1.5rem; }

form#associate-agency {
  margin-top: 1.5rem;
}

.associate-agency-checkbox-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-weight: normal;
  --checkbox-bg-color: var(--color-primary);
}

.associate-agency-checkbox-row input[type="checkbox"] {
  margin: 0 0.25rem 0 0;
}

.associate-agency-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
  width: 100%;
}

.associate-agency-label {
  display: inline-flex;
  flex: 0 0 auto;
  margin: 0;
  color: var(--input-label-color);
  font-size: 1rem;
  font-weight: bold;
}

form#associate-agency select {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: 620px;
  margin: 0;
}

.associate-agency-row p.error {
  flex-basis: 100%;
  margin: 0.4rem 0 0;
}

form#associate-agency button {
  margin-top: 1rem;
}

form#associate-agency .spinner { display: none; }
form#associate-agency.htmx-request button svg { display: none; }
form#associate-agency.htmx-request .spinner { display: block; }

/* SETTINGS - CHANGE PASSWORD */

#change-password-wrapper { margin-bottom: 1.5rem; }

form#change-password { margin-top: 1.5rem; }
form#change-password button { margin-top: 1rem; }
form#change-password .spinner { display: none; }
form#change-password.htmx-request svg { display: none; }
form#change-password.htmx-request .spinner { display: block; }

/* SETTINGS - CHANGE EMAIL */

#change-email-wrapper { margin-bottom: 1.5rem; }

form#change-email { margin-top: 1.5rem; }
form#change-email button { margin-top: 1rem; }
form#change-email .spinner { display: none; }
form#change-email.htmx-request svg { display: none; }
form#change-email.htmx-request .spinner { display: block; }


/* SETTINGS - DELETE ACCOUNT */

#delete-account-wrapper { margin-bottom: 1.5rem; }

form#delete-account { margin-top: 1.5rem; }
form#delete-account button { margin-top: 1rem; }
form#delete-account .spinner { display: none; }
form#delete-account.htmx-request svg { display: none; }
form#delete-account.htmx-request .spinner { display: block; }

/* STATS */

#stats-section {
  width: 1200px;
  max-width: 100%;
  padding: 0 16px;
}

.loading-stats { 
  width: 100%;
  flex: 1 1 0;
  margin-top: -5rem;
  display: flex; 
  align-items: center; 
  justify-content: center;
}
.loading-stats .spinner {
  width: 1.25rem;
  margin-right: 0.5rem;
}

.stats-info {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.stats-info h2 { font-weight: 300; font-size: 24px; }
.stats-info p { font-size: 14px; }
.stats-info h2,
.stats-info p { margin: 0 }

#stats {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 6px 15px var(--table-shadow-color);
  overflow: hidden;
  padding: 0;
}

.stats-head {
  width: 100%;
  display: flex;
  align-items: center;
  background-color: var(--table-bg-color);
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
}

.total-number { font-weight: bold; }

.stats-nav { display: flex; align-items: center; }

.stats-nav button { margin-right: 0.75rem; }
.stats-nav button:last-child { margin-right: 0; }

.stats-period {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0.75rem 1.5rem;
}

.stats-period h2 {
  font-size: 24px;
  font-weight: 300;
  margin: 1rem 0 0;
}

.stats-period span.total-in-period {
  font-weight: bold;
  border-bottom: 1px dotted var(--underline-color);
}

p.last-update {
  font-size: 14px;
  color: var(--secondary-text-color);
  margin: 0.75rem 0 0;
}

#stats canvas {
  width: 100%;
  margin: 2rem 0;
}

.stats-columns-wrapper {
  display: flex;
  align-items: flex-start;
}

.stats-columns-wrapper > div {
  flex: 1 1 50%;
}

.utm-stats-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 1rem 0 0;
}

.utm-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem 2rem;
}

#stats canvas.utm-stats {
  margin: 2rem 0;
}

svg.map { width: 100%; }

svg.map path {
  fill: hsl(200, 15%, 92%);
  stroke: #fff;
  transition: all 0.1s ease-in-out;
}

svg.map path.color-1 { fill: hsl(261, 46%, 90%); }
svg.map path.color-2 { fill: hsl(261, 46%, 86%); }
svg.map path.color-3 { fill: hsl(261, 46%, 82%); }
svg.map path.color-4 { fill: hsl(261, 46%, 76%); }
svg.map path.color-5 { fill: hsl(261, 46%, 72%); }
svg.map path.color-6 { fill: hsl(261, 46%, 68%); }
svg.map path.active { stroke: hsl(261, 46%, 50%); stroke-width: 1.5; }

#map-tooltip {
  position: fixed;
}

#map-tooltip.visible::before,
#map-tooltip.visible::after {
  display: block !important;
}

#map-tooltip:before {
  border-top-color: rgba(255, 255, 255, 0.95);
}

#map-tooltip:after {
  box-shadow: 0 1em 2em -0.5em rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.95);
  color: #333;
}

.stats-back-to-home {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.stats-error {
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.stats-error p { margin-top: -3rem; display: flex; align-items: center; }
.stats-error p svg { width: 1.2rem; margin: 0 0.5rem 0.1rem 0; }
.stats-error .stats-back-to-home { margin-top: 0 }

/* 404 - NOT FOUND */

#notfound {
  width: 800px;
  align-items: center;
}

#notfound h2 { 
  font-size: 28px;
  font-weight: 300;
  text-align: center;
}

/* BANNED */

#banned { width: 1200px; align-items: center; text-align: center }
#banned h2 { font-weight: normal; }
#banned h4 { font-weight: normal; margin: 0; }

/* REPORT */

#report { width: 600px; }

#report form {
  display: flex;
  flex-direction: column;
  margin-top: 2rem;
}

#report form .inputs-wrapper { 
  display: flex;
  align-items: flex-end;
}

#report .report-url-input {
  display: flex;
  align-items: center;
  height: 36px;
  margin-top: 0.5rem;
  border: 2px solid var(--color-primary);
  border-radius: 1px;
  background: #fff;
  overflow: hidden;
}

#report .report-url-input.error {
  border-color: var(--color-danger);
}

#report .report-url-input select,
#report .report-url-input span {
  flex: 0 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  background: hsl(200, 25%, 96%);
  color: hsl(200, 25%, 35%);
  font-size: 14px;
}

#report .report-url-input select {
  padding: 0 2rem 0 0.75rem;
  border: 0;
  border-right: 1px solid hsl(200, 25%, 85%);
  border-radius: 0;
  outline: none;
}

#report .report-url-input span {
  padding: 0 0.5rem;
  border-right: 1px solid hsl(200, 25%, 85%);
}

#report .report-url-input input {
  width: 100%;
  min-width: 130px;
  height: 100%;
  margin: 0;
  border: 0;
}

#report .report-url-input input:focus {
  outline: none;
}

#report form button {
  min-width: 132px;
  margin: 0 0 0.2rem 1rem;
  white-space: nowrap;
}
#report form .spinner { display: none; }
#report form.htmx-request svg { display: none; }
#report form.htmx-request .spinner { display: block; }

#report-email .spinner { display: none; }
#report-email .htmx-request svg { display: none; }
#report-email .htmx-request .spinner { display: block; }

.eye-icon svg { stroke-width: 0.5; }

/* RESET PASSWORD */

#reset-password form {
  width: 100%;
  display: flex;
  flex-direction: column;
}

#reset-password form .inputs-wrapper { 
  display: flex;
  align-items: flex-end;
  margin-top: 2rem;
}

#reset-password form label { flex: 0 0 280px; }
#reset-password form label input { width: 100%; }
#reset-password form button { margin: 0 0 0.2rem 1rem; }

#new-password h2 { margin-bottom: 0.5rem; }
#new-password p { margin-bottom: 1.5rem; }

#new-password-form label { margin-bottom: 1.5rem; }
#new-password-form label input { width: 280px; }

#new-password form {
  width: 420px;
  max-width: 100%;
  flex: 1 1 auto;
  display: flex;
  padding: 0 16px;
  flex-direction: column;
}

#new-password form label { margin-bottom: 2rem; }

#new-password form input {
  width: 100%;
  height: 72px;
  margin-top: 1rem;
  padding: 0 3rem;
  font-size: 16px;
}

#new-password form button {
  height: 56px;
  padding: 0 1rem 2px;
  margin: 0;
}

/* VERIFY USER */
/* VERIFY CHANGE EMAIL */
/* RESET PASSWORD TOKEN */

.verify-page {
  width: 600px;
  align-items: center;
}

.verify-page h2,
.verify-page h3 { 
  display: flex;
  align-items: center;
  text-align: center;
  font-weight: normal;
}

.verify-page h2 svg, 
.verify-page h3 svg {
  width: 1.15em;
  height: auto;
  margin-right: 0.5rem;
}

/* URL INFO */

#url-info {
  width: 1200px;
  align-items: center;
  text-align: center;
  padding: 0 16px;
}

#url-info h3 { font-weight: normal; margin: 0; }
#url-info p { line-break: anywhere; }

/* PROTECTED */

#protected { width: 600px; }

#protected form { width: 100%; margin-top: 1rem; }
#protected form .inputs-wrapper {  width: 100%; display: flex; align-items: flex-end; }
#protected form label { flex: 0 0 280px; }
#protected form label input { width: 100%; }
#protected form button { margin: 0 0 0.2rem 1rem; }
#protected form .spinner { display: none; }
#protected form.htmx-request svg { display: none; }
#protected form.htmx-request .spinner { display: block; }

/* CONTENT PAGES */

#terms,
#about,
#use-cases,
#use-case-detail {
  width: min(960px, calc(100% - 2rem));
}

#terms,
#about {
  max-width: 871px;
}

#use-cases,
#use-case-detail {
  max-width: 960px;
}

.content-page h2 {
  margin: 0 0 0.5rem;
  font-size: 32px;
  font-weight: 300;
}

.content-page h3 {
  margin: 2rem 0 0.5rem;
  font-size: 22px;
}

.content-page h4 {
  margin: 1.25rem 0 0.25rem;
  font-size: 17px;
}

.content-page p {
  margin: 0.35rem 0;
}

.content-page ul {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.25rem;
}

.about-hero {
  width: 120%;
  max-width: calc(100vw - 2rem);
  align-self: center;
  margin-bottom: 1.25rem;
  padding: 1.5rem 1.5rem 1.25rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(64, 120, 255, 0.08), rgba(64, 120, 255, 0.02));
  box-shadow: 0 12px 30px rgba(100, 120, 150, 0.08);
}

.about-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.about-hero h2 {
  margin: 0 0 0.5rem;
}

.about-lede {
  margin: 0 0 0.75rem;
  font-size: 18px;
  line-height: 1.6;
}

.about-intro,
.about-mission {
  margin: 0.4rem 0 0;
}

.about-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

.about-point {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: white;
  box-shadow: 0 8px 22px rgba(100, 120, 150, 0.08);
}

.about-point h4 {
  margin-top: 0;
}

.about-contact {
  width: 100%;
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 18px;
  background: white;
  box-shadow: 0 10px 28px rgba(100, 120, 150, 0.1);
}

.use-cases-hero {
  max-width: 760px;
  margin-bottom: 2rem;
}

.use-cases-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
}

.use-cases-lede {
  max-width: 620px;
  font-size: 18px;
  line-height: 1.55;
}

#use-case-detail .use-cases-lede {
  max-width: 100%;
}

.use-cases-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.use-cases-grid article,
.use-cases-list > div {
  border: 1px solid var(--table-tr-border-color);
  border-radius: 8px;
  background: hsl(0, 0%, 100%);
}

.use-cases-answer {
  padding: 1rem 0;
}

.use-cases-ai {
  margin: 1rem 0 2rem;
  padding: 1.25rem;
  border: 1px solid hsla(207, 90%, 54%, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, hsla(207, 90%, 54%, 0.08), hsla(130, 58%, 45%, 0.08));
}

.use-cases-organize {
  margin: 1rem 0 1.5rem;
  padding: 1.25rem;
  border: 1px solid hsla(207, 90%, 54%, 0.2);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 22px rgba(100, 120, 150, 0.08);
}

.use-cases-ai h3 {
  margin-top: 0;
}

.use-cases-ai ul,
.use-cases-organize ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.use-cases-ai li,
.use-cases-organize li {
  padding: 0.8rem;
  border-radius: 6px;
  background: hsla(207, 90%, 54%, 0.06);
  font-weight: 700;
}

.use-cases-ai li {
  background: hsl(0, 0%, 100%);
}

.use-cases-grid,
.use-cases-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem;
}

.use-cases-grid article,
.use-cases-list > div {
  padding: 1rem;
}

.use-cases-grid h3,
.use-cases-list h4 {
  margin-top: 0;
}

.use-cases-code {
  overflow-x: auto;
  margin: 1rem 0 2rem;
  padding: 1rem;
  border-radius: 8px;
  background: #1f2933;
  color: #f8fafc;
  font-size: 14px;
  line-height: 1.55;
}

.use-cases-real-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1rem 0 2rem;
}

.use-case-card {
  display: block;
  min-height: 132px;
  padding: 1rem;
  border: 1px solid var(--table-tr-border-color);
  border-radius: 8px;
  background: white;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(100, 120, 150, 0.06);
}

.use-case-card:hover {
  border-color: hsla(207, 90%, 54%, 0.38);
  box-shadow: 0 10px 24px rgba(100, 120, 150, 0.1);
}

.use-case-card span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--color-primary);
  font-weight: 700;
}

.use-case-card p {
  margin: 0;
  line-height: 1.5;
}

.use-case-back {
  margin-bottom: 1rem;
}

.use-case-back a {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
}

.use-case-detail-hero {
  margin-bottom: 1.5rem;
}

.use-case-section,
.use-case-cta-panel {
  margin: 0 0 1rem;
  padding: 1.25rem;
  border: 1px solid var(--table-tr-border-color);
  border-radius: 8px;
  background: white;
}

.use-case-section h3,
.use-case-cta-panel h3 {
  margin-top: 0;
}

.use-case-section li {
  line-height: 1.55;
}

.use-case-cta-panel {
  background: linear-gradient(135deg, hsla(207, 90%, 54%, 0.08), hsla(130, 58%, 45%, 0.08));
}

.use-case-disclaimer {
  color: var(--secondary-text-color);
  font-size: 13px;
}

@media (max-width: 860px) {
  .use-cases-grid,
  .use-cases-list,
  .use-cases-real-grid,
  .use-cases-ai ul,
  .use-cases-organize ul {
    grid-template-columns: 1fr;
  }
}

#user-manual {
  align-items: stretch;
}

.manual-hero {
  max-width: 820px;
  margin-bottom: 1.5rem;
}

.manual-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
}

.manual-lede {
  max-width: 760px;
  font-size: 18px;
  line-height: 1.55;
}

.manual-callout {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid hsla(207, 90%, 54%, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, hsla(207, 90%, 54%, 0.08), hsla(130, 58%, 45%, 0.08));
}

.manual-callout h3 {
  margin-top: 0;
}

.manual-callout p {
  margin-bottom: 0;
}

.manual-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
}

.manual-toc a {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--table-tr-border-color);
  border-radius: 999px;
  background: white;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.manual-section {
  margin-bottom: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--table-tr-border-color);
  border-radius: 8px;
  background: white;
}

.manual-section h3 {
  margin-top: 0;
}

.manual-section h4 {
  margin: 0 0 0.4rem;
}

.manual-section p,
.manual-section li {
  line-height: 1.55;
}

.manual-section ol,
.manual-section ul {
  margin-bottom: 0;
}

.manual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.manual-grid > div {
  padding: 0.9rem;
  border-radius: 8px;
  background: hsla(207, 90%, 54%, 0.05);
}

@media (max-width: 860px) {
  .manual-grid {
    grid-template-columns: 1fr;
  }
}

/* PREMIUM */

#premium,
#pay {
  align-items: center;
}

#premium {
  margin-bottom: 4rem;
}

#premium-intro {
  width: 600px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
  text-align: center;
}

#premium-intro h2 {
  font-size: 32px;
  font-weight: 300;
  margin: 0;
}

#premium-intro span {
  border-bottom: 1px dotted #999;
}

.premium-duration {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.premium-duration button {
  height: 30px;
  margin: 0 0.5rem;
  padding: 0 0.9rem;
}

.premium-duration button:disabled {
  background-color: #f6f6f6;
  opacity: 0.9;
  color: #333;
}

.pricing {
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.pricing-table {
  width: 240px;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin-left: 1.5rem;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 6px 15px hsla(200, 20%, 70%, 0.3);
  transition: all 0.2s ease-in-out;
}

.pricing-table:first-child { margin-left: 0; }

.pricing-table:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px hsla(200, 20%, 70%, 0.5);
}

.pricing-table.gold {
  border: 2px solid hsl(59, 100%, 80%);
}

.pricing-table-header {
  padding: 1rem 0;
  text-align: center;
  background-color: white;
  border-top-right-radius: 12px;
  border-top-left-radius: 12px;
  border-bottom: 1px solid;
}

.stone .pricing-table-header {
  background-color: white;
  border-bottom-color: hsl(197, 22%, 96%);
}

.silver .pricing-table-header {
  background-color: hsl(200, 12%, 95%);
  border-bottom-color: hsl(200, 14%, 92%);
}

.gold .pricing-table-header {
  background-color: hsl(59, 100%, 80%);
  border-bottom-color: hsl(59, 70%, 90%);
}

.platinum .pricing-table-header {
  background-color: hsl(199, 40%, 24%);
  border-bottom-color: hsl(200, 17%, 73%);
  color: white;
}

.pricing-table-header.enterprise {
  background-color: hsl(202.7, 31.9%, 45.5%);
  border-bottom-color: hsl(200, 17%, 73%);
  color: white;
}

.pricing-table-header h3 {
  margin: 0;
  font-size: 18px;
}

.pricing-amount {
  text-align: center;
}

.pricing-amount h4 {
  margin: 1rem 0 0;
  padding: 0;
  font-size: 32px;
  font-weight: 300;
}

.pricing-amount p {
  margin: 0;
  padding: 0;
  font-size: 13px;
}

.pricing-table-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 1rem;
}

.pricing-table a.button,
.pricing-table button {
  width: 200px;
  max-width: 90%;
  height: 36px;
  align-self: center;
  margin: 1.25rem 0;
}

.pricing-table button .spinner { display: none; }
.pricing-table button.htmx-request .spinner { display: flex; }

.pricing-table ul {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-table ul li {
  border-bottom: 1px solid hsl(200, 14%, 94%);
  padding: 0.5rem 1.5rem;
}

.pricing-table ul li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pricing-table ul li svg {
  width: 1.1em;
  stroke-width: 2;
  margin: 0 0.1em -0.175em 0;
}

.pricing-table ul li.x svg {
  stroke: var(--error-icon-color);
}

.pricing-table ul li.check svg {
  stroke: var(--success-icon-color);
}

.pricing-table.enterprise {
  width: 100%;
  align-self: stretch;
  margin-left: 0;
}

.enterprise .pricing-table-body {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding: 1rem;
}

.pricing-table-header.enterprise {
  text-align: left;
  padding: 1rem 2rem;
}

.enterprise-pricing {
  flex: 0 0 auto;
  padding: 0 1rem;
}

.enterprise-contact {
  width: 200px;
  text-align: center;
}

.enterprise-contact .email {
  display: inline-block;
  margin: 1.5rem 0;
}

.enterprise-pricing button,
.enterprise-pricing a.button {
  max-width: 100%;
}

.enterprise-features {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
}

.enterprise-features ul {
  flex: 1 1 50%;
  padding-right: 1rem;
}

.pricing-open-source {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 6rem;
  padding: 5rem 1rem;
  background-color: hsl(230, 15%, 92%);
}

.pricing-open-source .content {
  width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pricing-open-source h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 28px;
  font-weight: 300;
}

.pricing-open-source .icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 100%;
  background-color: var(--color-primary);
}

.pricing-open-source .icon svg {
  width: 16px;
  height: auto;
  stroke: white;
  stroke-width: 2px;
}

.pricing-open-source a {
  margin-top: 1rem;
}

/* ADMIN PROPERTY SEARCH */

.admin-tool-page {
  width: min(1280px, calc(100vw - 6rem));
  max-width: none;
  box-sizing: border-box;
  padding: 0 1rem;
  margin: 3rem auto 6rem;
}

.admin-tool-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-tool-heading h2 {
  margin: 0;
  font-weight: 300;
}

.admin-tool-heading .eyebrow {
  margin: 0 0 0.35rem;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.property-search-form {
  width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(320px, 1.6fr) auto;
  gap: 1rem;
  align-items: end;
  padding: 1rem;
  border: 1px solid #e6e8f0;
  border-radius: 8px;
  background: #fff;
}

.property-search-form label {
  margin: 0;
}

.property-search-form span {
  display: block;
  margin-bottom: 0.35rem;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
}

.property-search-form input,
.property-search-form input[type="url"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 24px;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: #444;
  background-color: white;
  border: none;
  border-radius: 100px;
  border-bottom: 5px solid #f5f5f5;
  box-shadow: 0 10px 35px var(--input-shadow-color);
}

.property-search-source {
  margin: 1rem 0 0;
  color: #4b5563;
  font-size: 14px;
}

.property-search-warnings {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid #f3d0a2;
  border-radius: 8px;
  background: #fff8ed;
  color: #8a4b0f;
}

.property-search-warnings p {
  margin: 0.25rem 0;
}

.property-search-results {
  width: 100%;
  margin-top: 1.5rem;
  overflow-x: auto;
}

.property-search-results table {
  display: table;
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
}

.property-search-results thead {
  display: table-header-group;
}

.property-search-results tbody {
  display: table-row-group;
}

.property-search-results tr {
  display: table-row;
}

.property-search-results th,
.property-search-results td {
  display: table-cell;
  padding: 0.85rem;
  border-bottom: 1px solid #eceef5;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.property-search-results th {
  color: #374151;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.property-search-results td {
  color: #1f2937;
  font-size: 14px;
}

.property-search-results th:nth-child(1),
.property-search-results td:nth-child(1) {
  width: 34%;
}

.property-search-results th:nth-child(2),
.property-search-results td:nth-child(2) {
  width: 24%;
}

.property-search-results th:nth-child(3),
.property-search-results td:nth-child(3),
.property-search-results th:nth-child(4),
.property-search-results td:nth-child(4),
.property-search-results th:nth-child(5),
.property-search-results td:nth-child(5) {
  width: 14%;
}

.you-got-it {
  margin: 0.9rem 0;
  text-align: center;
}

.you-got-it p {
  margin: 0;
  font-weight: bold;
}

.you-got-it a {
  font-size: 13px;
}

.pay-box {
  width: 560px;
  max-width: 96%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  margin: 0;
  background-color: white;
  border-radius: 0;
  box-shadow: 0 6px 15px hsla(200, 20%, 70%, 0.3);
  --keyframe-slidey-offset: -5px;
  animation: fadein 0.3s ease-in-out, slidey 0.32s ease-in-out;
}

.pay-box p {
  margin: 0;
  font-size: 15px;
}

.pay-box h3 {
  margin: 1.25rem 0 0.75rem;
  padding: 0.5rem 1.5rem;
  font-size: 24px;
  font-weight: bold;
}

.pay-box.silver h3 {
  background-color: gainsboro;
}

.pay-box.gold h3 {
  background-color: yellow;
}

.pay-box.platinum h3 {
  color: #f5f5f5;
  background-color: hsl(199, 40%, 24%);
}

.pay-box ul {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.pay-box ul li {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin: 0.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px dotted hsl(200, 35%, 65%);
}

.pay-box ul li p:first-child {
  flex: 1 1 50%;
}

.pay-box ul li p:last-child {
  flex: 1 1 auto;
  font-weight: bold;
  text-align: right;
  word-break: break-word;
}

.pay-box ul li.user p:first-child {
  flex: 0 0 auto;
}

.pay-box ul li.user p:last-child {
  flex: 0 0 65%;
}

.pay-box form {
  width: 100%;
  display: flex;
  flex-direction: column;
}

#venmo-payment {
  width: 100%;
}

#stripe-payment {
  width: 100%;
}

.pay-choose {
  width: 100%;
  align-self: flex-start;
  margin-top: 0.5rem;
}

.pay-options {
  align-self: flex-start;
  margin: 0.75rem 0 0;
}

.stripe-pay-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
}

.pay-box button.stripe-payment-button {
  min-height: 36px;
  height: 36px;
  padding: 0.25rem 1rem;
  line-height: 1;
  margin: 0;
  white-space: nowrap;
}

.pay-box label {
  flex-direction: row;
  align-items: center;
  border: 2px solid var(--color-primary);
  border-radius: 1px;
  padding: 0.25rem 0.5rem;
  font-size: 13px;
}

.pay-box label input {
  margin: 0 0.5rem 0 0;
}

.pay-box a.button,
.pay-box button {
  align-self: stretch;
  height: 36px;
  margin: 1.25rem 0 1.5rem;
}

.pay-box a.button svg,
.pay-box button svg {
  width: 1.2em;
}

p.pay-note {
  align-self: flex-start;
  font-size: 12px;
  text-align: left;
  opacity: 0.5;
}

.back-to-plans {
  margin-top: 1.5rem;
  font-size: 13px;
}

/* ERROR PAGE */

#error-page { align-items: center; text-align: center; }
#error-page h2 { margin: 0; }
#error-page .back-to-home { margin-top: 2rem; }

/* RESPONSIVE STYLES */

@media only screen and (max-width: 1200px) {
  .pricing {
    flex-wrap: wrap;
    margin-bottom: 0;
  }

  .pricing-table {
    flex: 0 0 45%;
    width: auto;
    max-width: 300px;
    margin-bottom: 2rem;
  }

  .pricing-table:nth-child(2n) {
    margin-left: 16px;
    margin-right: 0;
  }

  .pricing-table:first-child,
  .pricing-table:nth-child(2n + 1) {
    margin-left: 0;
    margin-right: 16px;
  }

  .pricing-table a.button,
  .pricing-table button {
    width: 90%;
  }

  .pricing-table.enterprise {
    flex: 0 0 auto;
    max-width: 632px;
    margin: 0;
    align-self: center;
  }

  .enterprise-features {
    width: 100%;
  }

  .enterprise .pricing-table-body {
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
  }

  .enterprise-features ul:first-child {
    padding-left: 0;
    padding-right: 0.5rem;
  }

  .enterprise-features ul:last-child {
    padding-left: 0.5rem;
    padding-right: 0;
  }

  .enterprise-features ul li {
    padding: 0.5rem;
  }
}

@media only screen and (max-width: 768px) {
  html, body { font-size: 14px; }
  
  input[type="text"],
  input[type="email"],
  input[type="password"],
  select  {
    font-size: 14px;
    padding: 0 16px;
    height: 38px;
    letter-spacing: 0.04em;
    border-bottom-width: 4px;
  }

  label input { margin-top: 0.25rem; }

  input[type="text"]::placeholder,
  input[type="email"]::placeholder,
  input[type="password"]::placeholder { font-size: 13px; letter-spacing: 0.04em; }
  
  table tr { padding: 0 0.25rem; } 
  table th,
  table td { padding: 0.5rem; }
  table td { font-size: 14px; }
  table tr.loading-placeholder td { font-size: 16px; }
  
  a.button,
  button { height: 32px; padding: 0 22px; font-size: 12px; }
  a.button.action,
  button.action { padding: 4px; width: 20px; height: 20px; }
  button.nav,
  button.activity-nav { height: 26px; padding: 0 7px; font-size: 11px; }

  .dialog .box { min-width: 300px; padding: 2rem 1.25rem; }
  .dialog.qrcode .box { padding: 1.5rem; }
  .dialog .loading { width: 20px; height: 20px; margin: 2rem 0; }
  .dialog .content .buttons { margin-top: 1rem; }

  header { padding: 16px 16px 0; height: 72px; }
  header a.logo { font-size: 24px; }
  header .logo-user-email { display: none; }
  header ul.logo-links { display: none; }
  header .logo img { height: 48px; margin-right: 5px; }
  header .logo-text { margin-right: 0.25rem; }
  header .logo-site-name { font-size: 22px; }
  header .logo-beta-badge { height: 16px; padding: 0 0.5rem; font-size: 8px; }
  header .logo-tagline { font-size: 10px; margin-left: 10px; }
  header nav ul li { margin-left: 0.75rem }
  header nav ul li a.button { height: 28px; padding: 0 1rem; font-size: 11px; }

  form#login-signup label { margin-bottom: 1.5rem; }
  form#login-signup input,
  form#login-signup select {
    height: 58px;
    margin-top: 0.75rem;
    padding: 0 2rem;
    font-size: 15px;
  }
  form#login-signup .login-password-wrapper {
    margin-top: 0.75rem;
  }
  form#login-signup .login-password-wrapper input {
    margin-top: 0;
    padding-right: 4rem;
  }
  form#login-signup .login-password-toggle {
    right: 0.85rem;
    width: 38px;
    height: 38px;
    min-width: 38px;
  }
  form#login-signup .buttons-wrapper { margin-bottom: 1rem; }
  form#login-signup .buttons-wrapper button { height: 44px; }
  form#login-signup a.forgot-password { font-size: 13px; }
  form#login-signup .login-form-intro h1 {
    white-space: normal;
  }
  .login-signup-message { margin-top: 1.5rem; }
  .login-signup-message h1 { font-size: 20px; }

  main #shorturl { margin-bottom: 1.5rem; }
  main #shorturl h1 { font-size: 1.6rem; }
  main #shorturl h1.dashboard-headline { white-space: normal; }
  .clipboard { width: 30px; height: 30px; margin-right: 0.5rem; }
  .clipboard svg.check { padding: 2px; }
  main form input#target { height: 58px; padding: 0 132px 0 26px; font-size: 15px; }
  main form input#target::placeholder { font-size: 14px; }
  main form p.error { font-size: 12px; margin-left: 0.25rem; }
  main form .target-wrapper p.error { font-size: 13px; margin-left: 0.5rem; }
  main form button.submit { min-width: 104px; height: 38px; top: 10px; right: 0.75rem; padding: 0.6rem 0.85rem; font-size: 12px; }
  main form .target-wrapper.template-selected input#target { padding-right: 132px; }
  .select-template-link {
    position: static;
    display: inline-block;
    transform: none;
    margin: 0.5rem 0 0 0.5rem;
  }
  .template-editor { grid-template-columns: 1fr; }
  .template-preview-panel {
    grid-column: auto;
    justify-self: stretch;
  }
  .template-form-panel form > label {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .template-actions-form label { grid-template-columns: 1fr; }
  .template-list table { min-width: 720px; }
  #shortener-checkboxes { flex-wrap: wrap; gap: 1rem; }
  .batch-import-button { width: 100%; margin-left: 0; }
  #main-table-wrapper { margin: 2rem 0 4.5rem;}
  #main-table-wrapper.admin-table-wrapper { margin-bottom: 2rem; }
  #main-table-wrapper h2 { margin-bottom: 0.5rem; }
  #main-table-wrapper table thead,
  #main-table-wrapper table tbody,
  #main-table-wrapper table tfoot { min-width: 800px; }
  #main-table-wrapper tr { padding: 0 0.25rem; }
  #main-table-wrapper th,
  #main-table-wrapper td { padding: 0.75rem; }
  #main-table-wrapper table .actions a.button,
  #main-table-wrapper table .actions button { margin-right: 0.3rem; }
  #main-table-wrapper table td p.description { font-size: 12px; }
  #main-table-wrapper table tr.no-data td { font-size: 16px; }
  #main-table-wrapper.admin-table-wrapper table th.nav { flex-direction: column; align-items: flex-end; }
  #main-table-wrapper.admin-table-wrapper table th .nav-divider { display: none; }
  #main-table-wrapper.admin-table-wrapper table th .limit { margin-bottom: 1rem; }
  table .tab a { padding: 0.3rem 0.9rem; }
  #main-table-wrapper th.category-total p { font-size: 13px; }
  #main-table-wrapper table thead tr.controls.with-filters { align-items: flex-start; }
  #main-table-wrapper table th select, input.table-input { height: 28px; font-size: 12px; padding: 0 1rem; }
  .admin-table-heading { align-items: flex-start; flex-direction: column; }
  .admin-tool-page { width: calc(100vw - 2rem); padding: 0; }
  .property-search-form { grid-template-columns: 1fr; }
  .admin-tool-heading { flex-direction: column; }
  #main-table-wrapper table th select { background-position: right 0.7em top 50%, 0 0; }
  .search-input-wrapper button { padding: 2px; margin-right: 0.15rem; }
  #main-table-wrapper table th input.search.admin { max-width: 150px; padding: 0 1.5rem 0 1rem; }
  #main-table-wrapper table th select.table-input { max-width: 120px; }
  #main-table-wrapper table th button.table { height: 28px; }
  #main-table-wrapper table th input::placeholder { font-size: 12px; }
  #main-table-wrapper table tr.controls .checkbox { font-size: 13px; }
  #main-table-wrapper table button.nav { margin-right: 0.5rem; }
  #main-table-wrapper table .nav-divider { height: 18px; margin: 0 1rem; }
  #main-table-wrapper table tbody td.right-fade:after { width: 14px; }
  .activity-log-table-wrapper { margin: 0 0 4.5rem; }
  .activity-log-table-wrapper h2 { margin-bottom: 0.5rem; }
  .activity-log-table-wrapper table thead,
  .activity-log-table-wrapper table tbody,
  .activity-log-table-wrapper table tfoot { min-width: 800px; }
  .activity-log-table-wrapper tr { padding: 0 0.25rem; }
  .activity-log-table-wrapper th,
  .activity-log-table-wrapper td { padding: 0.75rem; }
  .activity-log-table-wrapper table tr.no-data td { font-size: 16px; }
  .activity-log-table-wrapper table th.nav { flex-direction: column; align-items: flex-end; }
  .activity-log-table-wrapper table th .nav-divider { display: none; }
  .activity-log-table-wrapper table th .limit { margin-bottom: 1rem; }
  .activity-log-table-wrapper table thead tr.controls.with-filters { align-items: flex-start; }
  .activity-log-table-wrapper table th select,
  .activity-log-table-wrapper input.table-input { height: 28px; font-size: 12px; padding: 0 1rem; }
  .activity-log-table-wrapper table th input.search.admin { max-width: 150px; padding: 0 1.5rem 0 1rem; }
  .activity-log-table-wrapper table th select.table-input { max-width: 120px; }
  .activity-log-table-wrapper table button.activity-nav { margin-right: 0.5rem; }
  .activity-log-table-wrapper table .nav-divider { height: 18px; margin: 0 1rem; }
  .activity-log-table-wrapper table tbody td.right-fade:after { width: 14px; }
  #main-table-wrapper table tr.edit td { padding: 1.25rem 1rem; }
  #main-table-wrapper table tr.edit label { margin: 0 0.25rem 0.5rem; }
  #main-table-wrapper table tr.edit input { height: 38px; padding: 0 1rem; font-size: 13px; }
  #main-table-wrapper table tr.edit select { height: 38px; font-size: 13px; }
  #main-table-wrapper table tr.edit .edit-primary-row label {
    grid-template-rows: 1.25rem 38px auto;
  }
  #main-table-wrapper table tr.edit .edit-primary-row {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  #main-table-wrapper table tr.edit .edit-target-geo,
  #main-table-wrapper table tr.edit .edit-domain-field,
  #main-table-wrapper table tr.edit .edit-address-field,
  #main-table-wrapper table tr.edit .edit-password-field,
  #main-table-wrapper table tr.edit .edit-otp-type-field,
  #main-table-wrapper table tr.edit .edit-otp-destination-field,
  #main-table-wrapper table tr.edit .edit-oidc-discovery-field,
  #main-table-wrapper table tr.edit .edit-oidc-client-field,
  #main-table-wrapper table tr.edit .edit-oidc-sso-name-field,
  #main-table-wrapper table tr.edit .edit-utm-field {
    flex: 1 1 200px;
  }
  #main-table-wrapper table tr.edit .edit-oidc-row,
  #main-table-wrapper table tr.edit .edit-utm-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  #main-table-wrapper table tr.edit .edit-schedule-row {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  #main-table-wrapper table tr.edit .edit-oidc-label,
  #main-table-wrapper table tr.edit .edit-utm-label {
    flex: 0 0 100%;
    margin: 0;
  }
  #main-table-wrapper table tr.edit .edit-oidc-discovery-field,
  #main-table-wrapper table tr.edit .edit-oidc-client-field,
  #main-table-wrapper table tr.edit .edit-oidc-sso-name-field,
  #main-table-wrapper table tr.edit .edit-utm-field {
    grid-template-columns: minmax(95px, max-content) minmax(0, 1fr);
    width: 100%;
  }
  #main-table-wrapper table tr.edit .edit-schedule-row label {
    grid-template-columns: minmax(95px, max-content) minmax(0, 1fr);
    width: 100%;
  }
  #main-table-wrapper table tr.edit .edit-target-geo {
    flex-basis: 100%;
    min-width: 260px;
  }
  #main-table-wrapper table tr.edit .edit-target-template-wrapper {
    flex-wrap: wrap;
  }
  #main-table-wrapper table tr.edit .edit-target-template-wrapper input {
    min-width: 260px;
  }
  #main-table-wrapper table tr.edit .edit-select-template-link {
    margin-left: 0.25rem;
  }
  #main-table-wrapper table tr.edit .edit-address-field {
    flex-grow: 0;
  }
  #main-table-wrapper table tr.edit input,
  #main-table-wrapper table tr.edit input + p { width: 200px; }
  #main-table-wrapper table tr.edit input[name="target"],
  #main-table-wrapper table tr.edit input[name="description"],
  #main-table-wrapper table tr.edit input[name="target"] + p,
  #main-table-wrapper table tr.edit input[name="description"] + p { width: 320px; }
  #main-table-wrapper table tr.edit .edit-primary-row input[name="target"],
  #main-table-wrapper table tr.edit .edit-primary-row input[name="target"] + p,
  #main-table-wrapper table tr.edit .edit-address-field input,
  #main-table-wrapper table tr.edit .edit-password-field input,
  #main-table-wrapper table tr.edit .edit-otp-destination-field input,
  #main-table-wrapper table tr.edit .edit-oidc-discovery-field input,
  #main-table-wrapper table tr.edit .edit-oidc-client-field input,
  #main-table-wrapper table tr.edit .edit-oidc-sso-name-field input,
  #main-table-wrapper table tr.edit .edit-utm-field input { width: 100%; }
  #main-table-wrapper table tr.edit button { height: 32px; margin-right: 0.5rem; }
  #main-table-wrapper table tr.edit td.loading svg { width: 14px; height: 14px; }
  #main-table-wrapper table tr.edit form .response p { margin: 1rem 0 0; }
  .dialog .ban-checklist label { margin: 0.5rem 1rem 0.5rem 0; }

  #premium-intro { margin-bottom: 0.5rem; }
  #premium-intro h2 { font-size: 24px; }
  #premium { margin-bottom: 2.5rem; }
  .premium-duration { margin-bottom: 1.5rem; }
  .pricing { margin-bottom: 0.5rem; }
  .pricing-open-source { margin-top: 4rem; padding: 3rem 1rem; }
  .pricing-open-source h3 { font-size: 24px; }
  .pay-box { padding: 1.5rem; }
  .pay-box p { font-size: 14px; }
  .pay-box h3 { font-size: 22px; margin: 1rem 0 0.5rem; }
  p.pay-note { font-size: 12px; }
  .enterprise-contact { width: 100%; }

  footer { padding: 0.75rem 0; font-size: 12px; }
  footer button.link { font-size: 12px; }

  h1.settings-welcome { font-size: 18px; }
  .add-domain-wrapper { margin: 1rem 0 1rem; }
  .add-domain-wrapper > .spinner { width: 18px; margin: 0.5rem 0 0 0.5rem;  }
  form#add-domain { margin-top: 0.75rem; }
  form#add-domain button { margin-right: 0.5rem }

  .stats-info { flex-direction: column; align-items: flex-start; justify-content: flex-start; }
  .stats-info h2 { font-size: 18px; margin-bottom: 0.25rem; }
  .stats-info p { font-size: 11px; line-break: anywhere; }
  .stats-head { padding: 0rem 1rem; }
  .stats-head p { font-size: 0.9rem; }
  .stats-nav button { margin-right: 0.5rem; }
  .stats-period { padding: 0.5rem 1rem; }
  .stats-period h2 { font-size: 18px;  margin: 0.5rem 0 0; }
  p.last-update { font-size: 12px; }
  #stats canvas { margin: 1rem 0; }
  .stats-columns-wrapper { flex-direction: column; }
  .stats-columns-wrapper > div { flex-basis: 100%; }
  .utm-stats-grid { grid-template-columns: 1fr; gap: 0; }

  #notfound h2 { font-size: 20px; }

  #report form { margin-top: 1.5rem; }
  #report form .inputs-wrapper { flex-direction: column; align-items: flex-start; }
  #report form button { margin: 0.75rem 0 0.2rem 0; }

  #reset-password form .inputs-wrapper { flex-direction: column; align-items: flex-start; margin-top: 1rem; }
  #reset-password form label { flex-basis: 0; width: 280px; }
  #reset-password form button { margin: 0.75rem 0 0.2rem 0; }

  #new-password form label { margin-bottom: 1.5rem; }
  #new-password form input {
    height: 58px;
    margin-top: 0.75rem;
    padding: 0 2rem;
    font-size: 15px;
  }
  #new-password form button { height: 44px; }

  .verify-page h2,
  .verify-page h3 { display: flex; flex-direction: column; }

  #protected form { margin-top: 0.5rem; }
  #protected form .inputs-wrapper {  flex-direction: column; align-items: flex-start; }
  #protected form label { flex-basis: 0; width: 280px; }
  #protected form button { margin: 0.75rem 0 0.2rem 0; }
}

@media only screen and (max-width: 640px) {
  table tr.loading-placeholder { justify-content: flex-start; }
  
  .inputs { flex-direction: column; margin-bottom: 0.75rem; }
  .inputs label { margin: 0 0 0.75rem; }
  .inputs label:last-child { margin: 0; }

  #advanced-options {
    width: 100%;
    margin-left: 0;
  }
  
  .advanced-input-wrapper { flex-direction: column; margin-bottom: 0; }
  .advanced-input-wrapper.link-protection-inputs,
  .advanced-input-wrapper.schedule-inputs {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .advanced-input-wrapper label {
    width: 100%;
    grid-template-columns: minmax(95px, max-content) minmax(0, 1fr);
    margin-bottom: 0.75rem;
  }
  .advanced-input-wrapper label.otp-type-field { flex-basis: auto; }
  .advanced-input-wrapper label.otp-destination-field { padding-top: 0; }
  .advanced-input-wrapper .oidc-fields,
  .advanced-input-wrapper .utm-fields {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 0;
  }
  .advanced-input-wrapper .oidc-fields p,
  .advanced-input-wrapper .utm-fields p {
    margin-bottom: 0.5rem;
    padding-top: 0;
  }
  .advanced-security-checkboxes {
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.75rem;
  }
  .advanced-security-checkboxes .advanced-tag-field {
    grid-template-columns: minmax(95px, max-content) minmax(0, 1fr);
    flex-basis: 100%;
  }
  .advanced-input-wrapper label input,
  .advanced-input-wrapper label select { margin-top: 0; }
  #advanced-options .advanced-redirects-block {
    gap: 0.5rem;
    margin-top: 0.25rem;
  }
  .os-inputs,
  .geo-inputs,
  .language-inputs {
    align-items: stretch;
    flex-wrap: wrap;
  }
  .os-inputs label:first-child,
  .os-inputs label:nth-child(2),
  .geo-inputs label:first-child,
  .geo-inputs label:nth-child(2),
  .language-inputs label:first-child,
  .language-inputs label:nth-child(2) { flex-basis: auto; }
  .scheduled-redirect-inputs,
  #main-table-wrapper table tr.edit .edit-scheduled-redirect-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .scheduled-redirect-inputs label,
  #main-table-wrapper table tr.edit .edit-scheduled-redirect-row label {
    display: grid;
    grid-template-columns: minmax(95px, max-content) minmax(0, 1fr);
  }
  .os-inputs button.os-add,
  .geo-inputs button.geo-add,
  .language-inputs button.language-add,
  .scheduled-redirect-inputs button.scheduled-redirect-add { width: 44px; margin: 0 0 1rem; }
  .geo-overrides-table,
  .language-overrides-table {
    min-width: 560px;
  }
  form#add-domain .spinner { width: 18px; }

  .stripe-pay-options { grid-template-columns: 1fr; }

  #apikey-wrapper { max-width: 100%; }
  #apikey p { font-size: 0.85rem; }
  #apikey .clipboard { width: 22px; height: 22px; }

  .pricing-table {
    flex: 0 0 auto;
    width: 320px;
    max-width: 95%;
    margin: 0 0 2rem;
  }

  .pricing-table:nth-child(2n) {
    margin-left: 0;
    margin-right: 0;
  }

  .pricing-table:first-child,
  .pricing-table:nth-child(2n + 1) {
    margin-left: 0;
    margin-right: 0;
  }

  .pricing-table-header h3 { font-size: 16px; }
  .pricing-amount h4 { margin-top: 1.5rem; font-size: 28px; }
  .pricing-amount p { font-size: 13px; }

  .pricing-table a.button,
  .pricing-table button {
    width: 90%;
    height: 34px;
    margin-top: 1.5rem;
  }

  .pricing-table ul li { padding: 0.6rem 1.5rem; }

  .pricing-table.enterprise {
    flex: 0 0 auto;
    width: 320px;
    max-width: 95%;
  }

  .enterprise-features { flex-direction: column; }

  .enterprise .pricing-table-body {
    flex-direction: column;
    padding: 1rem 0.5rem;
  }

  .enterprise-pricing {
    width: 100%;
    padding: 0;
    align-items: center;
  }

  .enterprise-pricing button,
  .enterprise-pricing a.button {
    width: 90%;
    margin-right: auto;
    margin-left: auto;
  }

  .enterprise-features ul:first-child {
    padding: 0 0 0.6rem;
    border-bottom: 1px solid hsl(200, 14%, 94%);
  }

  .enterprise-features ul:last-child { padding: 0; }
  .enterprise-features ul li { padding: 0.6rem; }
}
