:root {
  --primary: #B0566A;
  --primary-soft: #F3D5DA;
  --peach: #FBE8DF;
  --gold: #E0A458;
  --ink: #3D2B3D;
  --bg: #FFFAF7;
  --success: #5E9E7E;
  --danger: #D1495B;
  --card: #fffdfb;
  --muted: #786675;
  --line: #ecdee2;
  --sidebar: #fff6f2;
  --green-bg: #eaf3ed;
  --gold-bg: #fcf0dc;
  --danger-bg: #fae9ec;
  --shadow: 0 4px 22px #3d2b3d04;
  --radius: 18px;
  font-family: "Segoe UI Variable","Segoe UI",system-ui,-apple-system,sans-serif;
  color-scheme: light
}

:root[data-theme=dark] {
  --primary: #D98A9B;
  --primary-soft: #60404f;
  --peach: #493441;
  --ink: #f7eef3;
  --bg: #2A1E2A;
  --card: #3D2B3D;
  --muted: #c9b4c4;
  --line: #5b4255;
  --sidebar: #332332;
  --green-bg: #2c493d;
  --gold-bg: #51432d;
  --danger-bg: #56303c;
  --shadow: none;
  color-scheme: dark
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 "Segoe UI Variable","Segoe UI",system-ui,-apple-system,sans-serif;
  -webkit-font-smoothing: antialiased
}

a {
  color: var(--primary);
  text-decoration: none
}

button,input,select {
  font: inherit
}

button,a,input {
  touch-action: manipulation
}

button {
  cursor: pointer
}

img,svg {
  max-width: 100%
}

h1,h2,h3,p {
  margin: 0
}

h1 {
  font-size: clamp(27px,2.6vw,37px);
  font-weight: 650;
  letter-spacing: -1.1px;
  line-height: 1.22;
  overflow-wrap: anywhere
}

h2 {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 650;
  letter-spacing: -.3px
}

h3 {
  font-size: 15px;
  font-weight: 650
}

p {
  color: var(--muted)
}

small {
  font-size: 12px
}

a,button,input {
  outline-offset: 4px
}

a:focus-visible,button:focus-visible,input:focus-visible {
  outline: 3px solid var(--primary)
}

button:disabled {
  cursor: wait;
  opacity: .65
}

.icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: middle
}

.icon-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden
}

.visually-hidden {
  position: absolute!important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 8px
}

.skip-link:focus {
  top: 10px
}

.muted {
  color: var(--muted)
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 1.25px;
  font-weight: 650;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.9px;
  line-height: 1.2
}

.brand small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin-top: 6px;
  text-transform: uppercase
}

.brand-symbol {
  background: var(--primary);
  color: #fffaf7;
  display: grid;
  place-items: center;
  width: 42px;
  height: 45px;
  border-radius: 14px 14px 14px 4px
}

.brand-symbol .icon {
  width: 25px;
  height: 25px
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 240px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 36px 22px 18px;
  display: flex;
  flex-direction: column
}

.sidebar .brand {
  margin: 0 5px 52px
}

.nav-caption {
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 14px;
  margin-bottom: 14px
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  margin-bottom: 6px;
  border: 0;
  width: 100%;
  text-align: left;
  background: transparent
}

.nav-item:hover {
  background: var(--peach);
  color: var(--ink)
}

.nav-item.is-active {
  background: var(--primary-soft);
  color: var(--ink);
  font-weight: 650
}

.nav-item.is-active .icon {
  color: var(--primary)
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 32px
}

.sidebar-note {
  padding: 19px 15px;
  background: var(--peach);
  border-radius: 14px;
  margin-bottom: 20px
}

.sidebar-note>.icon {
  color: var(--primary);
  margin-bottom: 16px
}

.sidebar-note strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 6px
}

.sidebar-note p {
  font-size: 12px;
  line-height: 1.7
}

.logout-button {
  font-size: 12px
}

.workspace {
  margin-left: 240px;
  min-width: 0
}

.topbar {
  height: 85px;
  padding: 0 40px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg)
}

.topbar-title>span {
  font-size: 12px;
  color: var(--muted)
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 20px
}

.icon-button {
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  color: var(--muted);
  background: transparent
}

.icon-button:hover {
  background: var(--peach);
  color: var(--primary)
}

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

/* Readable feedback on both authentication and management screens. */
.field small,.field-note,.fieldset-hint,.feature-notes p,.auth-bottom,.auth-footnote,
.auth-intro,.selection-note,.feature-edit-note,.login-help {
  font-size: 14px;
  line-height: 1.65;
}
.field-error {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
input[aria-invalid=true] { border: 2px solid var(--danger); }
.validation-summary-errors:focus { outline: 2px solid var(--primary); outline-offset: 5px; }
.login-help { margin-top: 22px; color: var(--ink); }
.login-help summary { cursor: pointer; padding: 10px 0; min-height: 44px; }
.login-help summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.login-help p { margin-top: 8px; }
.feature-edit-note { padding: 16px 24px; color: var(--ink); }
.feature-row.is-dirty { background: var(--primary-soft); }
.feature-discard { grid-column: 1 / -1; min-height: 44px; justify-self: start; }
.feature-discard[hidden] { display: none; }
.feature-row :disabled { opacity: .6; cursor: not-allowed; }

.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  flex-shrink: 0
}

.account-caption {
  font-size: 12px;
  font-weight: 600
}

.account-caption small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted)
}

.mobile-brand,.mobile-nav {
  display: none
}

.main-content {
  max-width: 1500px;
  margin: 0 auto;
  padding: 38px 40px 24px;
  min-height: calc(100vh - 145px)
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 30px
}

.page-heading>div {
  min-width: 0
}

.page-heading p:not(.eyebrow) {
  font-size: 13px;
  line-height: 1.8;
  margin-top: 10px
}

.page-heading>.button {
  flex-shrink: 0
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border-radius: 10px;
  padding: 11px 18px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  transition: background .15s,border-color .15s;
  white-space: normal
}

.button:hover {
  color: inherit
}

.button-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary)
}

.button-primary:hover {
  background: #98485c;
  color: white;
  border-color: #98485c
}

.button-secondary {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink)
}

.button-secondary:hover {
  background: var(--peach);
  color: var(--ink);
  border-color: var(--primary-soft)
}

.button-danger {
  color: #ad334a;
  background: var(--danger-bg);
  border-color: #e8b3be
}

.button-danger:hover {
  background: #f4d3dc;
  color: #98283d
}

.button-small {
  min-height: 44px;
  padding: 9px 14px;
  font-size: 12px
}

.button-block {
  width: 100%;
  min-height: 49px
}

.button .icon {
  width: 18px;
  height: 18px
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 20px;
  margin-bottom: 30px
}

.metric {
  min-width: 0;
  padding: 23px 24px 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow)
}

.metric-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 550;
  color: var(--muted)
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 11px
}

.metric-rose {
  background: var(--primary-soft);
  color: var(--primary)
}

.metric-green {
  background: var(--green-bg);
  color: #437c5e
}

.metric-gold {
  background: var(--gold-bg);
  color: #916322
}

.metric>strong {
  display: block;
  font-size: 37px;
  line-height: 1.2;
  letter-spacing: -1px;
  margin: 13px 0 8px;
  font-weight: 650
}

.metric>p {
  font-size: 11px
}

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

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px
}

.section-heading p {
  font-size: 12px;
  margin-top: 5px
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0
}

.text-link .icon {
  width: 17px;
  height: 17px
}

.tenant-table-wrap {
  width: 100%;
  overflow-wrap: anywhere
}

.tenant-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed
}

.tenant-table th {
  padding: 13px 18px;
  background: var(--bg);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: .5px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line)
}

.tenant-table th:first-child {
  width: 35%;
  padding-left: 26px
}

.tenant-table th:nth-child(2) {
  width: 24%
}

.tenant-table th:nth-child(3) {
  width: 15%
}

.tenant-table th:nth-child(4) {
  width: 20%
}

.tenant-table th:last-child {
  width: 6%;
  padding-right: 18px
}

.tenant-table td {
  padding: 20px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  vertical-align: middle
}

.tenant-table tbody tr:last-child td {
  border-bottom: 0
}

.tenant-table .business-cell {
  padding-left: 26px
}

.business-cell>div {
  display: inline-block;
  vertical-align: middle;
  width: calc(100% - 49px);
  min-width: 0
}

.business-avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 39px;
  border-radius: 11px;
  margin-right: 9px;
  background: var(--peach);
  color: var(--primary);
  font-size: 16px;
  font-weight: 650;
  vertical-align: middle
}

.business-name {
  display: block;
  font-size: 12px;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.6
}

.business-name:hover {
  color: var(--primary)
}

.business-address {
  display: block;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 3px
}

.owner-cell small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  border-radius: 20px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap
}

.status-badge .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2
}

.status-active {
  color: #37694f;
  background: var(--green-bg)
}

.status-suspended {
  color: #825a1e;
  background: var(--gold-bg)
}

.date-cell {
  color: var(--muted);
  font-size: 11px!important
}

.row-action {
  padding: 10px 6px!important;
  text-align: center
}

.row-action .icon-button {
  min-width: 38px;
  width: 100%;
  max-width: 44px
}

.mobile-label {
  display: none
}

.quick-section {
  margin-top: 30px
}

.quick-section>h2 {
  font-size: 15px;
  margin-bottom: 16px
}

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

.quick-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--peach);
  border: 1px solid transparent;
  color: var(--ink)
}

.quick-card:nth-child(2) {
  background: var(--card);
  border-color: var(--line)
}

.quick-card:hover {
  border-color: var(--primary)
}

.quick-card>div {
  flex: 1;
  min-width: 0
}

.quick-card h3 {
  font-size: 13px;
  margin-bottom: 5px
}

.quick-card p {
  font-size: 11px;
  line-height: 1.7
}

.quick-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--card);
  color: var(--primary);
  flex-shrink: 0
}

.quick-card>.icon {
  width: 18px
}

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 18px 40px 24px;
  color: var(--muted);
  font-size: 10px
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 14px 17px;
  border-radius: 12px;
  margin-bottom: 25px;
  font-size: 13px;
  overflow-wrap: anywhere
}

.notice .icon {
  width: 19px;
  margin-top: 1px
}

.notice-success {
  background: var(--green-bg);
  color: #37694f
}

.notice-error {
  background: var(--danger-bg);
  color: #a32e46
}

.empty-state {
  text-align: center;
  padding: 60px 25px
}

.empty-state h2,.empty-state h3 {
  margin: 18px 0 9px
}

.empty-state p {
  font-size: 13px;
  margin-bottom: 22px
}

.empty-icon {
  display: inline-grid;
  place-items: center;
  width: 62px;
  height: 62px;
  background: var(--peach);
  border-radius: 20px;
  color: var(--primary)
}

.empty-icon .icon {
  width: 28px;
  height: 28px
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px
}

.search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 500px;
  flex: 1
}

.search-input {
  position: relative;
  flex: 1;
  min-width: 0
}

.search-input>.icon {
  position: absolute;
  left: 13px;
  top: 14px;
  color: var(--muted);
  width: 18px;
  height: 18px;
  pointer-events: none
}

.search-input input:not([type=checkbox]):not([type=hidden]) {
  padding-left: 40px
}

.result-count {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap
}

.pagination-bar {
  padding: 18px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line)
}

.pagination-bar>span {
  font-size: 11px;
  color: var(--muted)
}

.pagination-bar>div {
  display: flex;
  gap: 8px
}

.field {
  margin-bottom: 20px;
  min-width: 0
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink)
}

input:not([type=checkbox]):not([type=hidden]) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  transition: border-color .15s
}

input::placeholder {
  color: var(--muted);
  opacity: .9
}

input:not([type=checkbox]):focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--primary) 12%,transparent);
  outline: 0
}

.field small {
  display: block;
  margin-top: 7px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8
}

.password-field {
  position: relative
}

.password-field input {
  padding-right: 48px!important
}

.password-toggle {
  position: absolute;
  right: 2px;
  top: 2px;
  width: 43px;
  height: 43px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 8px
}

.password-toggle:hover {
  color: var(--primary);
  background: var(--peach)
}

.password-toggle .icon {
  width: 18px
}

.validation-summary-valid {
  display: none
}

.validation-summary-errors {
  padding: 14px 16px;
  background: var(--danger-bg);
  color: #a32e46;
  border-radius: 10px;
  border: 1px solid #e8b3be;
  margin-bottom: 20px;
  font-size: 12px
}

.validation-summary-errors ul {
  padding-left: 18px;
  margin: 0
}

.input-validation-error {
  border-color: var(--danger)!important
}

.back-link {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  font-size: 12px;
  min-height: 44px;
  margin: -12px 0 12px;
  color: var(--muted)
}

.back-link .icon {
  width: 16px
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 270px;
  gap: 25px;
  align-items: start
}

.tenant-form {
  padding: 28px 30px
}

.tenant-form fieldset {
  padding: 0;
  margin: 0 0 28px;
  border: 0;
  min-width: 0
}

.tenant-form fieldset+fieldset {
  padding-top: 28px;
  border-top: 1px solid var(--line)
}

.tenant-form legend {
  float: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: auto;
  font-size: 16px;
  font-weight: 650;
  margin: 0 0 8px
}

.step-number {
  font-size: 10px;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary)
}

.fieldset-hint {
  font-size: 12px;
  margin-bottom: 24px
}

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

.optional {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 5px
}

.domain-input {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--bg)
}

.domain-input input {
  border: 0!important;
  border-radius: 0!important;
  flex: 1;
  width: 0!important;
  box-shadow: none!important
}

.domain-input:focus-within {
  border-color: var(--primary);
  outline: 3px solid color-mix(in srgb,var(--primary) 12%,transparent)
}

.domain-input>span {
  padding: 12px 13px;
  color: var(--muted);
  font-size: 12px;
  align-self: center;
  max-width: 52%;
  overflow-wrap: anywhere
}

.check-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px
}

.check-field input {
  width: 19px;
  height: 19px;
  accent-color: var(--primary);
  flex-shrink: 0
}

.check-field label {
  font-size: 12px;
  font-weight: 600;
  cursor: pointer
}

.field-note {
  font-size: 11px;
  line-height: 1.8;
  margin: 0 0 20px 29px
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
  padding-top: 6px
}

.creation-guide {
  padding: 27px 24px;
  background: var(--peach);
  border-radius: var(--radius)
}

.guide-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--card);
  color: var(--primary);
  margin-bottom: 20px
}

.creation-guide h2 {
  font-size: 16px
}

.creation-guide ul {
  list-style: none;
  padding: 0;
  margin: 22px 0 0
}

.creation-guide li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  line-height: 1.9;
  margin-bottom: 16px;
  color: var(--muted)
}

.creation-guide li:last-child {
  margin-bottom: 0
}

.creation-guide li .icon {
  width: 15px;
  margin-top: 4px;
  color: var(--primary)
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 22px;
  margin-bottom: 25px
}

.detail-card {
  padding: 25px 28px
}

.detail-card h2 {
  margin-bottom: 20px
}

.detail-list {
  margin: 0 0 14px
}

.detail-list>div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  margin: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--line)
}

.detail-list dt {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  flex-shrink: 0;
  max-width: 50%
}

.detail-list dd {
  font-size: 12px;
  font-weight: 550;
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere
}

.owner-summary {
  display: flex;
  gap: 13px;
  margin-bottom: 20px
}

.owner-summary>div {
  min-width: 0;
  overflow-wrap: anywhere
}

.owner-summary strong {
  font-size: 13px
}

.owner-summary p {
  font-size: 12px;
  margin-top: 4px
}

.features-section {
  margin-bottom: 25px
}

.section-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--peach);
  border-radius: 11px;
  color: var(--primary)
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(110px,1.1fr) minmax(125px,1fr) minmax(90px,.7fr) auto;
  align-items: center;
  gap: 20px;
  padding: 20px 27px;
  border-top: 1px solid var(--line)
}

.feature-name strong {
  font-size: 13px
}

.switch-field {
  display: flex;
  align-items: center;
  gap: 9px
}

.switch-field input[type=checkbox] {
  appearance: none;
  position: relative;
  width: 34px;
  min-width: 34px;
  height: 20px;
  display: inline-block;
  border: 1px solid var(--muted);
  border-radius: 20px;
  background: var(--line);
  cursor: pointer;
  margin: 0
}

.switch-field input[type=checkbox]::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 14px;
  height: 14px;
  background: var(--muted);
  border-radius: 50%;
  transition: transform .15s
}

.switch-field input[type=checkbox]:checked {
  background: var(--primary);
  border-color: var(--primary)
}

.switch-field input[type=checkbox]:checked::after {
  background: white;
  transform: translateX(14px)
}

.switch-field label {
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  padding: 12px 0
}

.limit-field {
  margin: 0
}

.limit-field label {
  font-size: 10px;
  margin-bottom: 3px
}

.limit-field input {
  min-height: 38px!important;
  padding: 6px 10px!important;
  font-size: 12px!important
}

.feature-notes {
  padding: 20px 26px;
  background: var(--bg);
  border-radius: 0 0 var(--radius) var(--radius);
  border-top: 1px solid var(--line)
}

.feature-notes p {
  font-size: 11px;
  line-height: 1.9
}

.feature-notes p:first-child {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-bottom: 7px
}

.feature-notes .icon {
  width: 15px;
  margin-top: 1px
}

.access-section {
  padding: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px
}

.access-section h2 {
  font-size: 16px
}

.access-section p {
  font-size: 12px;
  margin-top: 6px
}

.access-section form {
  flex-shrink: 0
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 25px;
  max-width: 1000px
}

.security-card {
  padding: 30px
}

.account-logout {
  margin-top: 25px
}

.security-card .guide-icon {
  background: var(--peach)
}

.security-card p {
  margin: 10px 0 25px;
  font-size: 13px;
  line-height: 1.9
}

.confirm-dialog {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 20px;
  padding: 28px;
  max-width: 440px;
  width: calc(100% - 32px);
  box-shadow: 0 25px 90px #2a1e2a33
}

.confirm-dialog::backdrop {
  background: #2a1e2a66;
  backdrop-filter: blur(3px)
}

.confirm-dialog h2 {
  margin: 16px 0 12px
}

.confirm-dialog p {
  font-size: 13px;
  line-height: 1.9;
  margin-bottom: 25px
}

.dialog-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft)
}

/* Giriş: sıcak, sade bir karşılama; telefonlarda tek sütun. */
.auth-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 46% 54%;
  background: var(--bg)
}

.auth-story {
  background: var(--peach);
  position: relative;
  overflow: hidden;
  padding: 42px 48px;
  display: flex;
  flex-direction: column;
  min-height: 100svh
}

.auth-story>.brand {
  z-index: 1
}

.auth-story-content {
  margin: auto 0;
  padding: 75px 0 90px;
  position: relative;
  z-index: 0
}

.auth-story-content>.eyebrow {
  display: inline-block;
  background: var(--gold-bg);
  color: #80571b;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 10px;
  letter-spacing: 1px;
  margin-bottom: 25px
}

.auth-story h2 {
  font: 400 clamp(34px,3.8vw,57px)/1.18 Georgia,"Times New Roman",serif;
  letter-spacing: -1.7px;
  position: relative;
  z-index: 1
}

.auth-story h2 em {
  color: var(--primary);
  font-weight: 400
}

.auth-story-content>p {
  max-width: 290px;
  font-size: 13px;
  line-height: 1.9;
  margin-top: 25px;
  position: relative;
  z-index: 1
}

.auth-footnote {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  position: relative;
  z-index: 1
}

.auth-footnote .icon {
  width: 16px
}

.petal-art {
  position: absolute;
  bottom: -170px;
  right: -150px;
  width: 360px;
  height: 360px;
  transform: rotate(-20deg);
  opacity: .5;
  z-index: 0;
  pointer-events: none
}

.petal-art i {
  position: absolute;
  width: 180px;
  height: 180px;
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb,var(--primary) 22%,transparent);
  border-radius: 100% 100% 0 100%;
  transform-origin: 100% 100%;
  left: 0;
  top: 0
}

.petal-art i:nth-child(2) {
  transform: rotate(90deg)
}

.petal-art i:nth-child(3) {
  transform: rotate(180deg)
}

.petal-art i:nth-child(4) {
  transform: rotate(270deg)
}

.petal-art span {
  position: absolute;
  left: 153px;
  top: 153px;
  width: 54px;
  height: 54px;
  background: var(--primary);
  border-radius: 50%;
  opacity: .35
}

.auth-main {
  position: relative;
  min-width: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 30px 44px
}

.auth-top {
  display: flex;
  justify-content: flex-end;
  align-items: center
}

.auth-mobile-brand {
  display: none;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -1px
}

.auth-form-wrap {
  width: 100%;
  max-width: 380px;
  margin: auto;
  padding: 50px 0
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 600
}

.auth-badge .icon {
  width: 17px;
  height: 17px
}

.auth-form-wrap h1 {
  font-size: 31px;
  letter-spacing: -1px;
  line-height: 1.3
}

.auth-intro {
  margin: 10px 0 30px;
  font-size: 13px;
  line-height: 1.9
}

.auth-form-wrap .field {
  margin-bottom: 24px
}

.auth-form-wrap .button-block {
  margin-top: 7px
}

.auth-bottom {
  font-size: 10px;
  text-align: center;
  padding: 15px 0
}

.auth-return {
  display: block;
  text-align: center;
  font-size: 12px;
  margin-top: 20px;
  min-height: 44px;
  padding: 11px
}

.auth-logout {
  text-align: center;
  margin-top: 8px
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  min-height: 44px;
  padding: 8px 15px
}

body:has(dialog[open]) {
  overflow: hidden
}

:root[data-theme=dark] .button-primary {
  color: #2A1E2A
}

:root[data-theme=dark] .button-primary:hover {
  background: #e9a3b2;
  color: #2A1E2A
}

:root[data-theme=dark] .brand-symbol {
  color: #2A1E2A
}

:root[data-theme=dark] .status-active,:root[data-theme=dark] .metric-green,:root[data-theme=dark] .notice-success {
  color: #a0d0b4
}

:root[data-theme=dark] .status-suspended,:root[data-theme=dark] .metric-gold {
  color: #f0c985
}

:root[data-theme=dark] .notice-error,:root[data-theme=dark] .validation-summary-errors,:root[data-theme=dark] .button-danger {
  color: #ffb3c4
}

:root[data-theme=dark] .auth-story-content>.eyebrow {
  color: #f0c985
}

@media(min-width:1600px) {
  .main-content {
    padding-top: 48px
  }
  .page-heading {
    margin-bottom: 38px
  }
  .metrics {
    margin-bottom: 35px
  }
}

@media(max-width:1199px) {
  .sidebar {
    width: 210px;
    padding: 30px 16px 15px
  }
  .sidebar .brand {
    font-size: 24px
  }
  .workspace {
    margin-left: 210px
  }
  .topbar {
    padding: 0 28px
  }
  .main-content {
    padding: 30px 28px 20px
  }
  .page-footer {
    padding-left: 28px;
    padding-right: 28px
  }
  .metrics {
    gap: 14px
  }
  .metric {
    padding: 20px
  }
  .tenant-table td {
    padding: 18px 12px
  }
  .tenant-table th {
    padding: 12px
  }
  .tenant-table th:first-child {
    padding-left: 20px
  }
  .tenant-table .business-cell {
    padding-left: 20px
  }
  .form-layout {
    grid-template-columns: minmax(0,1fr) 230px;
    gap: 20px
  }
  .tenant-form {
    padding: 25px
  }
  .creation-guide {
    padding: 22px 20px
  }
  .feature-row {
    gap: 14px;
    padding: 20px
  }
  .auth-story {
    padding: 35px
  }
  .auth-main {
    padding: 25px 32px
  }
}

@media(max-width:991px) {
  .sidebar {
    display: none
  }
  .workspace {
    margin-left: 0
  }
  .topbar {
    height: 72px;
    padding: 0 25px
  }
  .topbar-title>span {
    display: none
  }
  .mobile-brand {
    display: inline;
    font-size: 23px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.8px
  }
  .main-content {
    padding: 30px 25px 20px
  }
  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 1px solid var(--line);
    background: var(--card);
    z-index: 35;
    padding: 5px 10px max(5px,env(safe-area-inset-bottom))
  }
  .mobile-nav>a {
    min-width: 0;
    min-height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--muted);
    font-size: 10px;
    border-radius: 10px
  }
  .mobile-nav>a.is-active {
    color: var(--primary);
    background: var(--bg);
    font-weight: 650
  }
  .mobile-nav .icon {
    width: 21px;
    height: 21px
  }
  .page-footer {
    padding: 16px 25px 95px
  }
  .main-content {
    min-height: calc(100svh - 200px)
  }
  .auth-shell {
    grid-template-columns: 43% 57%
  }
  .auth-story {
    padding: 30px
  }
  .auth-story h2 {
    font-size: 38px
  }
  .auth-story-content>p {
    font-size: 12px
  }
  .auth-main {
    padding: 25px 30px
  }
  .auth-footnote {
    font-size: 9px
  }
  .auth-story-content {
    padding: 70px 0
  }
  .petal-art {
    right: -210px;
    bottom: -180px;
    opacity: .4
  }
}

@media(max-width:767px) {
  .page-heading {
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 24px
  }
  .page-heading h1 {
    font-size: 28px
  }
  .page-heading>.button {
    padding: 10px 13px;
    font-size: 11px
  }
  .metrics {
    gap: 12px
  }
  .metric {
    padding: 17px
  }
  .metric-top {
    align-items: flex-start;
    font-size: 11px
  }
  .metric-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px
  }
  .metric-icon .icon {
    width: 17px;
    height: 17px
  }
  .metric>strong {
    font-size: 31px;
    margin: 12px 0 8px
  }
  .metric>p {
    font-size: 10px
  }
  .section-heading {
    padding: 21px
  }
  .section-heading h2 {
    font-size: 16px
  }
  .section-heading p {
    font-size: 11px
  }
  .tenant-table thead {
    display: none
  }
  .tenant-table,.tenant-table tbody {
    display: block
  }
  .tenant-table tr {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 13px 12px;
    position: relative;
    padding: 20px 22px;
    border-top: 1px solid var(--line)
  }
  .tenant-table td {
    padding: 0!important;
    border: 0;
    display: block;
    min-width: 0;
    font-size: 12px
  }
  .tenant-table .business-cell {
    grid-column: 1;
    grid-row: 1
  }
  .tenant-table .status-cell {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    padding-top: 5px!important
  }
  .business-cell>div {
    width: calc(100% - 51px)
  }
  .business-name {
    font-size: 13px
  }
  .business-address {
    font-size: 11px
  }
  .tenant-table .owner-cell {
    grid-column: 1;
    grid-row: 2;
    padding-left: 49px!important
  }
  .owner-cell small {
    font-size: 11px
  }
  .mobile-label {
    display: block;
    color: var(--muted);
    font-size: 10px;
    margin-bottom: 3px
  }
  .tenant-table .date-cell {
    grid-column: 1;
    grid-row: 3;
    padding-left: 49px!important;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap
  }
  .date-cell .mobile-label {
    margin: 0
  }
  .tenant-table .row-action {
    grid-column: 2;
    grid-row: 2 / 4;
    align-self: end
  }
  .row-action .icon-button {
    width: 44px;
    min-width: 44px;
    background: var(--bg)
  }
  .tenant-table tbody tr:last-child td {
    border: 0
  }
  .quick-grid {
    gap: 15px
  }
  .quick-card {
    padding: 18px;
    gap: 12px
  }
  .quick-icon {
    width: 35px;
    height: 35px
  }
  .quick-card>.icon {
    display: none
  }
  .quick-card h3 {
    font-size: 12px
  }
  .form-layout {
    grid-template-columns: 1fr
  }
  .creation-guide {
    padding: 20px 23px
  }
  .creation-guide>.guide-icon {
    display: none
  }
  .creation-guide ul {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px 20px;
    margin-top: 13px
  }
  .creation-guide li {
    margin: 0;
    font-size: 11px
  }
  .detail-grid {
    gap: 15px
  }
  .detail-card {
    padding: 22px
  }
  .detail-list>div {
    flex-direction: column;
    gap: 4px
  }
  .detail-list dt {
    max-width: 100%;
    font-size: 10px
  }
  .detail-list dd {
    text-align: left
  }
  .feature-row {
    grid-template-columns: minmax(0,1fr) 115px;
    gap: 12px 18px;
    padding: 20px 22px
  }
  .feature-name {
    grid-column: 1 / 3;
    min-width: 0
  }
  .feature-name strong {
    font-size: 14px
  }
  .switch-field {
    grid-column: 1;
    grid-row: 2;
    min-height: 44px
  }
  .limit-field {
    grid-column: 1;
    grid-row: 3;
    max-width: 170px
  }
  .feature-spacer {
    display: none
  }
  .feature-row>.button {
    grid-column: 2;
    grid-row: 2 / 4;
    align-self: end
  }
  .feature-notes {
    padding: 20px 22px
  }
  .access-section {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    padding: 22px
  }
  .security-grid {
    gap: 18px
  }
  .security-card {
    padding: 24px
  }
  .auth-story {
    display: none
  }
  .auth-shell {
    display: block
  }
  .auth-main {
    min-height: 100svh;
    padding: 22px 28px
  }
  .auth-mobile-brand {
    display: block
  }
  .auth-top {
    justify-content: space-between
  }
  .auth-form-wrap {
    padding: 44px 0;
    max-width: 400px
  }
  .auth-bottom {
    padding: 18px 0
  }
  .auth-form-wrap h1 {
    font-size: 32px
  }
}

@media(max-width:479px) {
  body {
    font-size: 14px
  }
  .topbar {
    height: 66px;
    padding: 0 19px
  }
  .topbar-actions {
    gap: 8px
  }
  .account-caption {
    display: none
  }
  .avatar {
    width: 35px;
    height: 35px
  }
  .main-content {
    padding: 26px 18px 18px
  }
  .page-heading {
    display: flex;
    flex-wrap: wrap;
    gap: 18px
  }
  .page-heading h1 {
    font-size: 27px;
    letter-spacing: -.8px
  }
  .page-heading>div {
    width: 100%
  }
  .page-heading>.button {
    min-height: 46px;
    width: 100%;
    font-size: 12px
  }
  .page-heading p:not(.eyebrow) {
    font-size: 12px
  }
  .page-heading>.status-badge {
    margin-top: -7px
  }
  .metrics {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 24px
  }
  .metric {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    padding: 17px 18px
  }
  .metric-top {
    grid-column: 1;
    grid-row: 1;
    font-size: 12px;
    justify-content: flex-start;
    align-items: center;
    gap: 12px
  }
  .metric-icon {
    order: -1;
    width: 34px;
    height: 34px
  }
  .metric>strong {
    grid-column: 2;
    grid-row: 1 / 3;
    margin: 0 0 0 15px;
    font-size: 30px
  }
  .metric>p {
    grid-column: 1;
    grid-row: 2;
    padding-left: 46px;
    font-size: 10px;
    margin-top: 3px
  }
  .surface {
    border-radius: 15px
  }
  .section-heading {
    padding: 20px 18px;
    gap: 12px;
    align-items: flex-start
  }
  .section-heading h2 {
    font-size: 15px
  }
  .section-heading p {
    font-size: 11px;
    line-height: 1.7
  }
  .section-heading .text-link {
    font-size: 10px;
    gap: 4px;
    min-height: 28px
  }
  .section-heading .text-link .icon {
    width: 14px
  }
  .tenant-table tr {
    padding: 18px;
    gap: 12px 8px
  }
  .business-avatar {
    width: 32px;
    height: 36px;
    margin-right: 7px;
    font-size: 15px
  }
  .business-cell>div {
    width: calc(100% - 44px)
  }
  .business-name {
    font-size: 12px
  }
  .business-address {
    font-size: 10px
  }
  .tenant-table .owner-cell,.tenant-table .date-cell {
    padding-left: 41px!important
  }
  .status-badge {
    font-size: 9px;
    padding: 4px 7px;
    gap: 3px
  }
  .status-badge .icon {
    width: 11px;
    height: 11px
  }
  .quick-section {
    margin-top: 25px
  }
  .quick-grid {
    grid-template-columns: 1fr;
    gap: 12px
  }
  .quick-card {
    padding: 20px
  }
  .quick-card h3 {
    font-size: 13px
  }
  .quick-card>.icon {
    display: block
  }
  .quick-icon {
    width: 38px;
    height: 38px
  }
  .page-footer {
    padding: 15px 18px 95px
  }
  .list-toolbar {
    padding: 18px;
    flex-wrap: wrap;
    gap: 12px
  }
  .search-form {
    flex: 0 0 100%;
    width: 100%;
    gap: 7px
  }
  .search-input input {
    font-size: 12px
  }
  .search-input>.icon {
    left: 10px;
    width: 16px
  }
  .search-form .button {
    padding: 10px 12px
  }
  .result-count {
    font-size: 10px
  }
  .pagination-bar {
    padding: 17px 18px;
    flex-wrap: wrap;
    gap: 12px
  }
  .pagination-bar>div {
    gap: 6px
  }
  .pagination-bar .button {
    font-size: 10px;
    padding: 9px 10px;
    gap: 5px
  }
  .pagination-bar .icon {
    width: 14px
  }
  .tenant-form {
    padding: 22px 19px
  }
  .field-grid {
    grid-template-columns: 1fr;
    gap: 0
  }
  .tenant-form legend {
    font-size: 15px
  }
  .fieldset-hint {
    font-size: 11px;
    margin-bottom: 20px
  }
  .tenant-form .form-actions {
    flex-direction: column-reverse;
    align-items: stretch
  }
  .creation-guide {
    padding: 20px
  }
  .creation-guide ul {
    grid-template-columns: 1fr;
    gap: 9px
  }
  .creation-guide li {
    font-size: 11px
  }
  .creation-guide h2 {
    font-size: 15px
  }
  .domain-input>span {
    font-size: 11px;
    padding: 12px 9px;
    max-width: 48%
  }
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 15px
  }
  .detail-card {
    padding: 22px
  }
  .detail-list>div {
    flex-direction: row;
    gap: 15px
  }
  .detail-list dt {
    max-width: 50%
  }
  .detail-list dd {
    text-align: right;
    font-size: 11px
  }
  .feature-row {
    padding: 19px 18px;
    grid-template-columns: minmax(0,1fr) 90px;
    gap: 9px 12px
  }
  .feature-row>.button {
    font-size: 11px;
    padding: 9px 11px
  }
  .feature-name strong {
    font-size: 13px
  }
  .feature-notes {
    padding: 17px 18px
  }
  .access-section {
    padding: 22px 19px
  }
  .access-section form,.access-section .button {
    width: 100%
  }
  .security-grid {
    grid-template-columns: 1fr;
    gap: 18px
  }
  .security-card {
    padding: 25px
  }
  .security-card .button {
    width: 100%
  }
  .auth-main {
    padding: 22px 23px
  }
  .auth-form-wrap {
    padding: 43px 0 30px
  }
  .auth-form-wrap h1 {
    font-size: 29px
  }
  .auth-intro {
    font-size: 12px;
    margin: 10px 0 26px
  }
  .auth-form-wrap .field {
    margin-bottom: 21px
  }
  .auth-badge {
    margin-bottom: 18px;
    font-size: 10px
  }
  .auth-bottom {
    font-size: 9px;
    line-height: 1.8
  }
  .auth-logout {
    margin-top: 0
  }
  .confirm-dialog {
    padding: 24px
  }
  .confirm-dialog .form-actions {
    gap: 8px
  }
  .confirm-dialog .button {
    flex: 1
  }
  .empty-state {
    padding: 40px 20px
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    transition: none!important;
    scroll-behavior: auto!important
  }
}

/* iOS'un form alanına odaklanırken sayfayı büyütmesini önler. */
@media(max-width:767px) {
  input:not([type=checkbox]):not([type=hidden]),.limit-field input {
    font-size: 16px!important;
    min-height: 46px!important
  }
}

.account-button {
  min-height: 44px;
  min-width: 44px
}

.password-toggle {
  width: 44px;
  height: 44px;
  top: 1px;
  right: 1px
}

@media(max-width:767px) {
  .business-name {
    display: flex;
    align-items: center;
    min-height: 44px
  }
  .section-heading .text-link {
    min-height: 44px
  }
}
