/* TıklaMenü admin — captive-portal üstüne ekler */

/* Footer: sadece yazı, arka plan yok, altta sabit */
.admin-footer {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 40 !important;
  margin: 0 !important;
  padding: 0.45rem 1.1rem !important;
  padding-bottom: max(0.45rem, env(safe-area-inset-bottom)) !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--muted) !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  display: flex !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
  flex-wrap: wrap !important;
  pointer-events: none !important;
  opacity: 0.85;
}

.admin-footer a {
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}

.admin-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.admin-main-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-bottom: 2.75rem;
}

@media (min-width: 901px) {
  body.admin-page:not(.admin-login):not(.nav-collapsed) .admin-footer {
    left: 260px !important;
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}

.stat-card span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.rt-product {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.rt-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--accent-soft);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--accent-deep);
}

.rt-product strong {
  display: block;
  font-size: 0.92rem;
}

.rt-product small {
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-ok { background: rgba(5,150,105,.14); color: #047857; }
.badge-danger { background: rgba(220,38,38,.14); color: #b91c1c; }
.badge-success { background: rgba(5,150,105,.14); color: #047857; }
.badge-warning { background: rgba(217,119,6,.16); color: #b45309; }
.badge-primary { background: rgba(15,118,110,.14); color: #0f766e; }
.badge-gray { background: rgba(100,116,139,.14); color: #475569; }
.badge-lang { background: rgba(15,118,110,.12); color: #0f766e; }

.lang-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.lang-badge {
  font-size: 1rem;
  line-height: 1;
}

.row-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
}

.btn-secondary, .btn-danger-sm, .btn-primary {
  text-decoration: none;
}

.btn-danger-sm {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
  padding: 0.4rem 0.7rem;
  border: none;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.35rem 0 1.4rem;
  border-bottom: 1px solid var(--line);
}

.form-section:first-child {
  padding-top: 0;
}

.form-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.form-section-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.form-section-lede,
.field-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.45;
}

.field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.form-block + .form-block {
  margin-top: 0.35rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.15rem;
}

.form-grid .full { grid-column: 1 / -1; }

.form-grid > label,
.auth-form label,
.panel-card.auth-form label,
.gen-form.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.auth-form label span,
.panel-card label > span:first-child,
.gen-form label > span:first-child {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.3;
}

.auth-form input:not([type="checkbox"]):not([type="radio"]),
.auth-form select,
.auth-form textarea,
.panel-card input:not([type="checkbox"]):not([type="radio"]),
.panel-card select,
.panel-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0.78rem 0.9rem;
  font: inherit;
  background: #fff;
  box-sizing: border-box;
}

/* DataTable arama: ikon ile yazı çakışmasın */
.panel-card .dt-search input,
.dt-search input {
  padding-left: 2.55rem !important;
  background: #f8fafc;
}

.auth-form label small.field-hint {
  display: block;
  margin-top: 0.3rem;
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  background: #fff;
}

.lang-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.55rem;
}

.lang-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.lang-check:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.lang-check input {
  width: auto;
  margin: 0;
}

.lang-flag {
  font-size: 1.35rem;
  line-height: 1;
}

.lang-check-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lang-check-meta strong {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.lang-check-meta small {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* switch-row: portal-theme toggle (switch-ui) kullanılıyor */

/* Hesap menüsü — ikonlu satırlar + çıkış */
.account-menu-item,
.account-menu-logout {
  appearance: none;
  display: flex !important;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  margin: 0;
  padding: 0.62rem 0.75rem !important;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-menu-item:hover {
  background: rgba(11, 18, 32, 0.05);
}

.account-menu-item.is-active {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent-deep);
}

.account-menu-item.is-active .account-menu-ico {
  opacity: 1;
  color: var(--accent-deep);
}

.account-menu-ico {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  opacity: 0.72;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-menu-logout-form {
  margin-top: 0.25rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(11, 18, 32, 0.08);
}

.account-menu-logout {
  color: #b91c1c !important;
  background: rgba(220, 38, 38, 0.06) !important;
  border: 1px solid rgba(220, 38, 38, 0.14) !important;
  font-weight: 750 !important;
}

.account-menu-logout .account-menu-ico {
  opacity: 1;
  color: #b91c1c;
}

.account-menu-logout:hover {
  background: rgba(220, 38, 38, 0.12) !important;
  border-color: rgba(220, 38, 38, 0.22) !important;
}

/* Form gönderilirken arka plan tıklanamasın */
.busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(2px);
  cursor: wait;
}

body.is-busy {
  overflow: hidden;
}

body.is-busy .busy-overlay {
  pointer-events: auto;
}

/* Login sayfası ince ayar */
body.admin-login .login-box .auth-form {
  gap: 0.85rem;
}

body.admin-login .login-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0.15rem 0 0.25rem;
}

body.admin-login .login-forgot {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent-deep);
  text-decoration: none;
}

body.admin-login .login-forgot:hover {
  text-decoration: underline;
}

body.admin-login .login-box .btn-primary {
  width: 100%;
  margin-top: 0.35rem;
}

body.admin-login .login-alert {
  margin: 0 0 0.25rem;
  padding: 0.7rem 0.85rem;
  border-radius: 11px;
  font-size: 0.86rem;
  font-weight: 600;
}

body.admin-login .login-alert.is-error {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

body.admin-login .login-alert.is-ok {
  background: rgba(5, 150, 105, 0.1);
  color: #047857;
  border: 1px solid rgba(5, 150, 105, 0.22);
}

/* Icon picker */
.icon-picker {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
  background: rgba(255,255,255,0.7);
  grid-column: 1 / -1;
}

.icon-picker-preview {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  background: #fff;
}

.icon-picker-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0;
}

.icon-picker-cats button {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
}

.icon-picker-cats button.is-on {
  background: var(--accent-deep);
  border-color: transparent;
  color: #fff;
}

.icon-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: 220px;
  overflow: auto;
}

.icon-picker-grid button {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.2rem;
  cursor: pointer;
}

.icon-picker-grid button.is-on {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

/* Toast: sağdan kayarak gelsin, footer üstünde */
.toast-stack {
  bottom: 2.6rem !important;
  right: 1.15rem !important;
}

.toast {
  transform: translateX(22px) scale(0.98) !important;
}

.toast.is-in {
  transform: translateX(0) scale(1) !important;
}

.toast.is-out {
  transform: translateX(16px) scale(0.98) !important;
}

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

  .dt-table thead { display: none; }
  .dt-table, .dt-table tbody, .dt-table tr, .dt-table td {
    display: block;
    width: 100%;
  }
  .dt-table tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.75rem;
    margin-bottom: 0.65rem;
  }
  .dt-table td {
    border: none;
    padding: 0.35rem 0;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
  }
  .dt-table td.th-actions,
  .dt-table td:first-child {
    display: block;
  }
}

/* ---- İşlem logları ---- */
.log-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.log-panel .log-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  padding: 1.35rem 1.45rem 1.25rem;
  margin: 0;
  border-bottom: 1px solid rgba(11, 18, 32, 0.08);
  background: linear-gradient(180deg, #fbfcfd 0%, #fff 100%);
}

.log-toolbar-search .dt-search {
  flex: 1 1 auto;
  width: 100%;
}

.log-toolbar-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 0.9rem 0.9rem;
  align-items: end;
}

.log-toolbar--platform .log-toolbar-filters {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.log-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  margin: 0;
}

.log-field > span {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.log-panel .log-field select {
  width: 100%;
  min-height: 2.55rem;
  appearance: none;
  border: 1px solid rgba(11, 18, 32, 0.12);
  border-radius: 11px;
  padding: 0.55rem 2rem 0.55rem 0.8rem;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7a90' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.7rem center;
  cursor: pointer;
}

.log-panel .log-field select:focus {
  outline: none;
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.log-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  padding-bottom: 1px;
}

.log-toolbar-actions .btn-primary,
.log-toolbar-actions .btn-secondary {
  margin: 0 !important;
  width: auto;
  min-height: 2.55rem;
  padding: 0.55rem 1rem;
  white-space: nowrap;
}

.log-table td {
  vertical-align: middle;
}

.log-table tbody tr.is-fail {
  background: rgba(220, 38, 38, 0.035);
}

.log-time {
  white-space: nowrap;
}

.log-time strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
}

.log-time span {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.log-event {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}

.log-event--auth { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }
.log-event--service { background: rgba(217, 119, 6, 0.14); color: #b45309; }
.log-event--user { background: rgba(124, 58, 237, 0.12); color: #6d28d9; }
.log-event--tenant { background: rgba(15, 118, 110, 0.12); color: #0f766e; }
.log-event--table { background: rgba(2, 132, 199, 0.12); color: #0369a1; }
.log-event--neutral { background: rgba(100, 116, 139, 0.12); color: #475569; }

.log-guest {
  display: inline-flex;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--muted);
}

.log-tenant {
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--ink-soft);
}

.log-tenant--platform {
  color: var(--accent-deep);
}

.log-summary {
  max-width: 280px;
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

.log-ip {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  background: #f1f5f9;
  padding: 0.22rem 0.45rem;
  border-radius: 7px;
}

.log-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 2.25rem 1rem;
  text-align: center;
}

.log-empty strong {
  font-size: 0.95rem;
}

.log-empty span {
  font-size: 0.82rem;
  color: var(--muted);
}

@media (max-width: 980px) {
  .log-toolbar-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .log-toolbar-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .log-toolbar-filters {
    grid-template-columns: 1fr;
  }

  .log-summary {
    max-width: none;
  }
}

/* =========================================================
   Admin spacing standard — tüm paneller / formlar / tablolar
   ========================================================= */
.admin-page .admin-main {
  --admin-gap: 1.5rem;
  --panel-pad: 1.55rem 1.65rem;
  --form-field-gap: 0.5rem;
  --form-stack-gap: 1.15rem;
  --table-cell-y: 0.95rem;
  --table-cell-x: 1.15rem;
}

.admin-page .panel-card,
.admin-page .gen-form {
  padding: var(--panel-pad);
}

/* form.panel-card gap:0 override — profil / kullanıcı / ayarlar */
.admin-page form.panel-card.auth-form,
.admin-page form.panel-card.gen-form,
.admin-page .auth-form.gen-form.panel-card {
  gap: var(--form-stack-gap) !important;
}

.admin-page form.panel-card.form-stack {
  gap: 0 !important;
}

.admin-page .auth-form label,
.admin-page .gen-form label,
.admin-page .form-grid > label {
  gap: var(--form-field-gap) !important;
}

.admin-page .setting-item {
  gap: 0.4rem;
  padding: 0.95rem 1.05rem;
}

.admin-page .setting-item.inline-meta {
  margin: 0;
}

.admin-page .gen-form > h2,
.admin-page .panel-card > h2:first-child {
  margin: 0 0 0.35rem;
}

.admin-page .form-section + .row-actions,
.admin-page .form-stack > .row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.admin-page .form-stack > .row-actions .btn-primary,
.admin-page .form-stack > .row-actions .btn-secondary,
.admin-page .form-section + .row-actions .btn-primary,
.admin-page .form-section + .row-actions .btn-secondary {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 2.65rem;
  min-height: 2.65rem;
  padding: 0 1.2rem;
  border-radius: 12px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  margin-top: 0;
}

.admin-page .form-stack > .row-actions .btn-secondary,
.admin-page .form-section + .row-actions .btn-secondary {
  border: 1px solid rgba(11, 18, 32, 0.14);
  background: #fff;
  color: var(--ink-soft);
}

.admin-page .form-stack > .row-actions .btn-secondary:hover,
.admin-page .form-section + .row-actions .btn-secondary:hover {
  background: #f8fafc;
  color: var(--ink);
  border-color: rgba(11, 18, 32, 0.22);
}

.admin-page .auth-form > .btn-primary,
.admin-page .gen-form > .btn-primary,
.admin-page .panel-card.auth-form > .btn-primary {
  margin-top: 0.55rem;
  min-height: 2.65rem;
  padding: 0.7rem 1.25rem;
}

.admin-page .switch-row {
  position: relative;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.95rem 1.05rem;
  border-radius: 14px;
  border: 1px solid rgba(11, 18, 32, 0.1);
  background: #f8fafc;
  cursor: pointer;
}

.admin-page .switch-row .switch-ui {
  width: 2.6rem;
  height: 1.45rem;
  margin-top: 0;
  flex-shrink: 0;
}

.admin-page .switch-row .switch-ui::after {
  top: 0.175rem;
  left: 0.175rem;
  width: 1.1rem;
  height: 1.1rem;
}

.admin-page .switch-row input:checked + .switch-ui::after {
  transform: translateX(1.15rem);
}

.admin-page .switch-row .switch-copy {
  min-width: 0;
  flex: 1;
}

.admin-page .switch-row .switch-copy strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.25;
}

.admin-page .switch-row .switch-copy small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
}

.admin-page .check-row {
  gap: 0.65rem;
}

/* ---- TıklaMenü marka logosu ---- */
.brand-logo {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
}

.brand-logo--login {
  width: min(320px, 100%);
  height: auto;
  margin: 0 auto 0.35rem;
}

.login-brand {
  display: block;
  text-decoration: none;
  margin-bottom: 0.85rem;
}

.brand-logo--topbar {
  height: 34px;
  width: auto;
  max-width: min(200px, 46vw);
  object-fit: contain;
  flex-shrink: 0;
}

.admin-topbar-brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
}

@media (min-width: 961px) {
  .brand-logo--topbar {
    height: 38px;
    max-width: 220px;
  }

  .admin-topbar-brand {
    flex: 0 0 auto;
    justify-content: flex-start;
  }
}

.brand-logo--footer {
  display: inline-block;
  height: 28px;
  width: auto;
  vertical-align: -6px;
  margin-left: 0.35rem;
}

/* ---- Menü arka plan seçici ---- */
.bg-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.75rem;
}

.bg-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0;
  cursor: pointer;
}

.bg-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.bg-option-swatch {
  display: block;
  height: 72px;
  border-radius: 14px;
  border: 2px solid rgba(11, 18, 32, 0.08);
  overflow: hidden;
  position: relative;
  background: #eef2f0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
}

.bg-option-swatch::before,
.bg-option-swatch::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.55;
}

.bg-option-swatch::before {
  width: 70%;
  height: 90%;
  top: -30%;
  left: -20%;
}

.bg-option-swatch::after {
  width: 65%;
  height: 85%;
  right: -25%;
  bottom: -35%;
}

.bg-option input:checked + .bg-option-swatch {
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.bg-option-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0 0.1rem;
}

.bg-option-copy strong {
  font-size: 0.8rem;
  font-weight: 750;
  color: var(--ink);
}

.bg-option-copy small {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 500;
}

/* Swatch renkleri (küçük önizleme) */
.bg-option-swatch.menu-bg--soft-mint { background: #eef7f3; }
.bg-option-swatch.menu-bg--soft-mint::before { background: #9fd6c4; }
.bg-option-swatch.menu-bg--soft-mint::after { background: #d9efe6; }

.bg-option-swatch.menu-bg--clean-paper { background: linear-gradient(180deg, #fff, #f3f2ee); }
.bg-option-swatch.menu-bg--clean-paper::before,
.bg-option-swatch.menu-bg--clean-paper::after { opacity: 0; }

.bg-option-swatch.menu-bg--warm-linen { background: #f4efe6; }
.bg-option-swatch.menu-bg--warm-linen::before { background: #e8d9c0; }
.bg-option-swatch.menu-bg--warm-linen::after { background: #f0e6d4; }

.bg-option-swatch.menu-bg--sand-dune { background: linear-gradient(160deg, #f7ecd8, #efe0c4); }
.bg-option-swatch.menu-bg--sand-dune::before { background: #e8c992; }
.bg-option-swatch.menu-bg--sand-dune::after { background: #f3dfb8; }

.bg-option-swatch.menu-bg--ocean-mist { background: #e8f1f6; }
.bg-option-swatch.menu-bg--ocean-mist::before { background: #9ec5db; }
.bg-option-swatch.menu-bg--ocean-mist::after { background: #c5dde9; }

.bg-option-swatch.menu-bg--coffee-steam { background: #f3ebe3; }
.bg-option-swatch.menu-bg--coffee-steam::before { background: #c4a484; }
.bg-option-swatch.menu-bg--coffee-steam::after { background: #e0cbb4; }

.bg-option-swatch.menu-bg--citrus-grove { background: #f4f7e8; }
.bg-option-swatch.menu-bg--citrus-grove::before { background: #d5e58a; }
.bg-option-swatch.menu-bg--citrus-grove::after { background: #f0e29a; }

.bg-option-swatch.menu-bg--blush-petal { background: #f8ecef; }
.bg-option-swatch.menu-bg--blush-petal::before { background: #e8b4c0; }
.bg-option-swatch.menu-bg--blush-petal::after { background: #f2d3db; }

.bg-option-swatch.menu-bg--forest-fog { background: #e7eee8; }
.bg-option-swatch.menu-bg--forest-fog::before { background: #7fa88a; }
.bg-option-swatch.menu-bg--forest-fog::after { background: #b7cfc0; }

.bg-option-swatch.menu-bg--slate-quiet { background: #e9eef2; }
.bg-option-swatch.menu-bg--slate-quiet::before { background: #a8b6c4; }
.bg-option-swatch.menu-bg--slate-quiet::after { background: #c8d2dc; }

.bg-option-swatch.menu-bg--dawn-glow { background: linear-gradient(165deg, #fff1e4, #fde8ef, #e8f0ff); }
.bg-option-swatch.menu-bg--dawn-glow::before { background: #ffc9a8; }
.bg-option-swatch.menu-bg--dawn-glow::after { background: #c9d7ff; }

.bg-option-swatch.menu-bg--night-ember { background: #1c1714; }
.bg-option-swatch.menu-bg--night-ember::before { background: #7a3f2a; }
.bg-option-swatch.menu-bg--night-ember::after { background: #3d2a22; }

.bg-option-swatch.menu-bg--graphite { background: #17191c; }
.bg-option-swatch.menu-bg--graphite::before { background: #3a4048; }
.bg-option-swatch.menu-bg--graphite::after { background: #2a2f36; }

.bg-option-swatch.menu-bg--mesh-soft { background: #f2f5f8; }
.bg-option-swatch.menu-bg--mesh-soft::before { background: #8ec5ff; }
.bg-option-swatch.menu-bg--mesh-soft::after { background: #9ae7c5; }

.bg-option-swatch.menu-bg--dots-light {
  background-color: #f5f6f8;
  background-image: radial-gradient(rgba(30, 40, 55, 0.12) 1px, transparent 1px);
  background-size: 8px 8px;
}
.bg-option-swatch.menu-bg--dots-light::before,
.bg-option-swatch.menu-bg--dots-light::after { opacity: 0; }

.bg-option-swatch.menu-bg--stripes-soft {
  background: repeating-linear-gradient(-18deg, #eef0ea, #eef0ea 6px, #f7f8f4 6px, #f7f8f4 12px);
}
.bg-option-swatch.menu-bg--stripes-soft::before,
.bg-option-swatch.menu-bg--stripes-soft::after { opacity: 0; }

.bg-option-swatch.menu-bg--aurora { background: #0f1724; }
.bg-option-swatch.menu-bg--aurora::before { background: #3d8bff; }
.bg-option-swatch.menu-bg--aurora::after { background: #4fd1a5; }

.bg-option-swatch.menu-bg--classic-grid {
  background-color: #e8f3ef;
  background-image:
    linear-gradient(rgba(15, 40, 35, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 40, 35, 0.08) 1px, transparent 1px);
  background-size: 10px 10px;
}
.bg-option-swatch.menu-bg--classic-grid::before { background: rgba(15, 118, 110, 0.35); }
.bg-option-swatch.menu-bg--classic-grid::after { background: rgba(184, 149, 108, 0.25); }

.media-picker-row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 1.1rem;
  align-items: stretch;
}

.media-picker {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.media-picker-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink-soft);
}

.media-picker-frame {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1.5px dashed rgba(11, 18, 32, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.media-picker--square .media-picker-frame {
  aspect-ratio: 1 / 1;
  min-height: 120px;
  max-width: 220px;
  width: 100%;
}

.media-picker--wide .media-picker-frame {
  aspect-ratio: 16 / 9;
  min-height: 120px;
  max-width: 420px;
}

.media-picker--tall .media-picker-frame {
  aspect-ratio: 3 / 4;
  min-height: 140px;
  max-width: 200px;
  width: 100%;
}

.media-picker.has-image .media-picker-frame,
.media-picker.is-dragover .media-picker-frame {
  border-style: solid;
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.media-picker-frame:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.media-picker-preview {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #eef2f6;
}

.media-picker--fit-contain .media-picker-preview {
  background-size: contain;
  background-color: #fff;
}

.media-picker-preview[hidden],
.media-picker-empty[hidden],
.media-picker-actions [hidden] {
  display: none !important;
}

.media-picker-empty {
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  pointer-events: none;
}

.media-picker.has-image .media-picker-empty {
  display: none !important;
}

.media-picker-empty svg {
  width: 1.85rem;
  height: 1.85rem;
  margin-bottom: 0.25rem;
  color: var(--accent-deep);
  opacity: 0.85;
}

.media-picker-empty strong {
  font-size: 0.88rem;
  color: var(--ink);
}

.media-picker-empty span {
  font-size: 0.76rem;
}

.media-picker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.media-picker-btn {
  cursor: pointer;
  margin: 0 !important;
}

.media-picker-hint {
  margin: 0;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 500;
}

/* ---- Sortable drag ---- */
.th-drag,
.td-drag {
  width: 2.4rem;
  padding-left: 0.85rem !important;
  padding-right: 0.25rem !important;
}

.drag-handle {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: grab;
  padding: 0;
}

.drag-handle svg {
  width: 1.05rem;
  height: 1.05rem;
}

.drag-handle:hover {
  background: rgba(11, 18, 32, 0.06);
  color: var(--ink);
}

.drag-handle:active {
  cursor: grabbing;
}

.dt-table tr.is-sort-ghost {
  opacity: 0.45;
  background: color-mix(in srgb, var(--accent) 8%, #fff);
}

.dt-table tr.is-sort-chosen {
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

@media (max-width: 720px) {
  .media-picker-row {
    grid-template-columns: 1fr;
  }
}

/* ---- Variant rows + layout picker ---- */
.pricing-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.35rem 0 1rem;
}

.pricing-mode-option {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0;
  padding: 0.85rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pricing-mode-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.pricing-mode-option input {
  margin-top: 0.2rem;
  accent-color: var(--accent-deep);
}

.pricing-mode-option strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
}

.pricing-mode-option small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
}

.pricing-single label {
  display: block;
  max-width: 220px;
}

.variant-preset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.variant-preset-label {
  font-size: 0.75rem;
  font-weight: 750;
  color: var(--muted);
  margin-right: 0.15rem;
}

.variant-rows {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.variant-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 0.55rem;
  align-items: center;
}

.variant-remove {
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  font-size: 1.15rem;
  line-height: 1;
}

.layout-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.layout-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0;
  cursor: pointer;
}

.layout-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.layout-option-card {
  display: block;
  height: 72px;
  border-radius: 14px;
  border: 2px solid rgba(11, 18, 32, 0.08);
  background: #f4f6f8;
  position: relative;
  overflow: hidden;
}

.layout-option input:checked + .layout-option-card {
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.layout-preview--list::before,
.layout-preview--list::after,
.layout-preview--grid::before,
.layout-preview--grid::after,
.layout-preview--full::before {
  content: "";
  position: absolute;
  background: rgba(15, 23, 42, 0.1);
  border-radius: 4px;
}

.layout-preview--list::before {
  left: 10px; right: 10px; top: 14px; height: 14px;
  box-shadow: 0 20px 0 rgba(15, 23, 42, 0.1), 0 40px 0 rgba(15, 23, 42, 0.1);
}

.layout-preview--grid::before {
  left: 10px; top: 12px; width: calc(50% - 14px); height: 48px;
}
.layout-preview--grid::after {
  right: 10px; top: 12px; width: calc(50% - 14px); height: 48px;
}

.layout-preview--full::before {
  left: 10px; right: 10px; top: 10px; height: 52px;
}

.field-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

/* Dil paketi (salt okunur — restoran ayarları) */
.lang-package-readonly {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.lang-package-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(11, 18, 32, 0.1);
  background: #f8fafc;
  font-size: 0.84rem;
}

.lang-package-chip strong {
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.lang-package-chip small {
  color: var(--muted);
  font-weight: 500;
}

/* ---- Şık onay diyaloğu ---- */
.ui-dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(400px, calc(100vw - 2rem));
  width: 100%;
}

.ui-dialog::backdrop {
  background: rgba(12, 20, 34, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ui-dialog-card {
  margin: 0;
  padding: 1.35rem 1.25rem 1.2rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(12, 20, 34, 0.28);
  text-align: center;
  animation: ui-dialog-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes ui-dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.ui-dialog-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.85rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(217, 119, 6, 0.12);
  color: #d97706;
}

.ui-dialog-icon.is-danger {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}

.ui-dialog-icon.is-info {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent-deep);
}

.ui-dialog-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.ui-dialog-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.ui-dialog-message {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 500;
}

.ui-dialog-actions {
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 1.2rem;
}

.ui-dialog-actions .btn-primary,
.ui-dialog-actions .btn-secondary {
  min-height: 2.55rem;
  height: 2.55rem;
  padding: 0 1.15rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ui-dialog-actions .btn-primary.ui-dialog-danger {
  background: #dc2626;
  border-color: #dc2626;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.25);
}

.ui-dialog-actions .btn-primary.ui-dialog-danger:hover {
  filter: brightness(0.95);
}

/* ---- Dashboard ---- */
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.dash-kpi {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.05rem;
  box-shadow: 0 8px 20px rgba(12, 20, 34, 0.04);
}

.dash-kpi-icon {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.dash-kpi-icon svg { width: 1.2rem; height: 1.2rem; }
.dash-kpi-icon.is-teal { background: rgba(15, 118, 110, 0.12); color: #0f766e; }
.dash-kpi-icon.is-gold { background: rgba(212, 168, 83, 0.18); color: #b45309; }
.dash-kpi-icon.is-blue { background: rgba(37, 99, 235, 0.12); color: #2563eb; }
.dash-kpi-icon.is-orange { background: rgba(234, 88, 12, 0.12); color: #ea580c; }

.dash-kpi-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.dash-kpi-value {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.55rem;
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.dash-kpi small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--muted);
}

.dash-kpi small.is-ok { color: #059669; }

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

.dash-panel { margin: 0; }

.dash-stat-body {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.dash-donut {
  width: 8.5rem;
  height: 8.5rem;
  border-radius: 999px;
  background: conic-gradient(var(--accent) 0deg, var(--accent) var(--donut, 0deg), #e2e8f0 var(--donut, 0deg) 360deg);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
}

.dash-donut::before {
  content: "";
  position: absolute;
  inset: 1.15rem;
  border-radius: 999px;
  background: #fff;
}

.dash-donut span {
  position: relative;
  z-index: 1;
  font-size: 1.35rem;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.dash-donut--multi { background: #e2e8f0; }

.dash-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
  flex: 1;
}

.dash-legend li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.dash-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  margin-top: 0.35rem;
  flex-shrink: 0;
  background: #94a3b8;
}

.dash-dot.is-ok { background: #059669; }
.dash-dot.is-warn { background: #dc2626; }

.dash-legend strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 750;
}

.dash-legend small {
  display: block;
  margin-top: 0.1rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
}

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

.dash-action {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.95rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #f8fafc);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.dash-action:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: 0 10px 22px rgba(12, 20, 34, 0.06);
  transform: translateY(-1px);
}

.dash-action-ico {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, #fff);
  color: var(--accent-deep);
  font-weight: 800;
}

.dash-action strong {
  font-size: 0.88rem;
  font-weight: 800;
}

.dash-menu-url {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 650;
  word-break: break-all;
  color: var(--accent-deep);
}

.dash-mini-list { margin-top: 1rem; }
.dash-mini-list h3 {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.dash-mini-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 650;
}

.dash-mini-row strong { color: var(--accent-deep); font-weight: 800; }

.dash-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dash-log-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.dash-log-list li:first-child { border-top: none; }
.dash-log-list strong { font-size: 0.88rem; font-weight: 700; }
.dash-log-list small { color: var(--muted); font-weight: 600; white-space: nowrap; }

@media (max-width: 980px) {
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .dash-kpis { grid-template-columns: 1fr; }
  .dash-stat-body { flex-direction: column; align-items: flex-start; }
}

/* ---- Medya kütüphanesi ---- */
.media-upload-card { margin-bottom: 0; }

.media-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.6rem 1rem;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 6%, #fff);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.media-dropzone.is-drag,
.media-dropzone:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, #fff);
}

.media-dropzone-ico {
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.35rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--accent-deep);
  border: 1px solid var(--line);
}

.media-dropzone-ico svg { width: 1.4rem; height: 1.4rem; }
.media-dropzone strong { font-size: 0.95rem; font-weight: 800; }
.media-dropzone > span { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.media-dropzone-btn { margin-top: 0.65rem; pointer-events: none; }

.media-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.media-preview-grid[hidden] { display: none !important; }

.media-preview-tile {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.media-preview-thumb {
  aspect-ratio: 1;
  background: #eef2f0 center / cover no-repeat;
}

.media-preview-meta {
  padding: 0.4rem 0.5rem 0.5rem;
}

.media-preview-meta strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-preview-meta small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 650;
}

.media-upload-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.media-file-count { margin: 0; font-size: 0.85rem; font-weight: 700; color: var(--muted); }

.media-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.media-check-all {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0;
}

.media-delete-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.media-tile {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.media-tile-preview {
  aspect-ratio: 1;
  background: #eef2f6 center/cover no-repeat;
}

.media-badge {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 2;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  background: rgba(194, 65, 12, 0.92);
  color: #fff;
}

.media-badge.is-free {
  background: rgba(15, 118, 110, 0.9);
}

.media-tile-check {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  z-index: 2;
  margin: 0;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.92);
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
}

.media-tile-check input { margin: 0; }

.media-tile-meta {
  padding: 0.55rem 0.65rem 0.65rem;
}

.media-tile-meta strong {
  display: block;
  font-size: 0.76rem;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-tile-meta small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--muted);
}

/* ---- Görünüm stüdyosu ---- */
.appearance-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  gap: 1.4rem;
  align-items: start;
}

@media (max-width: 980px) {
  .appearance-studio-grid {
    grid-template-columns: 1fr;
  }
}

.theme-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 0.75rem;
}

.theme-picker--catalog {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.theme-art {
  display: block;
  aspect-ratio: 3 / 4;
  max-height: 168px;
  position: relative;
  background: #eef1f4;
}

.theme-art::before,
.theme-art::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  border-radius: 6px;
}

.theme-art::before {
  top: 12%;
  height: 16%;
  background: rgba(15, 23, 42, 0.12);
}

.theme-art::after {
  top: 34%;
  height: 54%;
  background:
    linear-gradient(#fff, #fff) 0 0 / 100% 22% no-repeat,
    linear-gradient(#fff, #fff) 0 28% / 100% 22% no-repeat,
    linear-gradient(#fff, #fff) 0 56% / 100% 22% no-repeat,
    linear-gradient(#fff, #fff) 0 84% / 100% 16% no-repeat;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.theme-art--list { background: #eef7f3; }
.theme-art--list::before { border-radius: 8px; background: color-mix(in srgb, var(--accent, #0f766e) 28%, #fff); }

.theme-art--grid { background: #f4f5f7; }
.theme-art--grid::before { height: 14%; }
.theme-art--grid::after {
  background:
    linear-gradient(#fff, #fff) 0 0 / 47% 47% no-repeat,
    linear-gradient(#fff, #fff) 53% 0 / 47% 47% no-repeat,
    linear-gradient(#fff, #fff) 0 53% / 47% 47% no-repeat,
    linear-gradient(#fff, #fff) 53% 53% / 47% 47% no-repeat;
  border-radius: 10px;
}

.theme-art--full { background: #f4efe6; }
.theme-art--full::before { height: 28%; border-radius: 8px; background: #c4a484; }
.theme-art--full::after {
  top: 46%;
  height: 42%;
  background:
    linear-gradient(#fff, #fff) 0 0 / 100% 30% no-repeat,
    linear-gradient(#fff, #fff) 0 38% / 100% 30% no-repeat,
    linear-gradient(#fff, #fff) 0 76% / 100% 24% no-repeat;
}

.theme-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  cursor: pointer;
}

.theme-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.theme-option-card {
  display: block;
  border-radius: 16px;
  border: 2px solid rgba(11, 18, 32, 0.08);
  background: #f4f6f8;
  overflow: hidden;
}

.theme-option input:checked + .theme-option-card {
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.appearance-preview-col {
  position: sticky;
  top: 1rem;
}

/* iPhone 17 — titanyum çerçeve + Dynamic Island */
.iphone17 {
  --iphone-w: min(320px, 100%);
  position: relative;
  width: var(--iphone-w);
  margin: 0.4rem auto 0;
  filter: drop-shadow(0 28px 48px rgba(20, 24, 32, 0.28));
}

.iphone17-bezel {
  position: relative;
  padding: 10px;
  border-radius: 48px;
  background:
    linear-gradient(160deg, #f3efe8 0%, #b8b3aa 28%, #8d8880 52%, #d4cfc6 78%, #9c978e 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.iphone17-bezel::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 45px;
  background: #0b0b0d;
  pointer-events: none;
}

.iphone17-screen {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 38px;
  background: #111;
  aspect-ratio: 393 / 852;
}

.iphone17-screen iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.iphone17-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 118px;
  height: 34px;
  border-radius: 999px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 11px;
  z-index: 3;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.iphone17-cam {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #3a4a6a, #0a1020 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.iphone17-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #111;
  box-shadow: 0 0 0 2px #1a1a1a;
}

.iphone17-home {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 36%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  z-index: 3;
  pointer-events: none;
}

.iphone17-btn {
  position: absolute;
  background: linear-gradient(90deg, #c9c4bb, #8f8a82);
  border-radius: 2px;
  z-index: 2;
}

.iphone17-btn--silent {
  left: -3px;
  top: 118px;
  width: 4px;
  height: 28px;
}

.iphone17-btn--vol-up {
  left: -3px;
  top: 168px;
  width: 4px;
  height: 42px;
}

.iphone17-btn--vol-down {
  left: -3px;
  top: 218px;
  width: 4px;
  height: 42px;
}

.iphone17-btn--power {
  right: -3px;
  top: 186px;
  width: 4px;
  height: 72px;
  background: linear-gradient(90deg, #8f8a82, #c9c4bb);
}

/* Canlı tasarım paneli */
.live-panel {
  background: #fff;
  border: 1px solid var(--line, rgba(15, 23, 42, 0.08));
  border-radius: 22px;
  padding: 1.15rem 1.15rem 1.25rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}
.live-block + .live-block { margin-top: 1.15rem; }
.live-kicker {
  display: block;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.65rem;
}
.live-hint {
  margin: -0.25rem 0 0.7rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.live-theme-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.live-theme-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8f9fb;
  border-radius: 16px;
  padding: 0.7rem 0.7rem 0.85rem;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.live-theme-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.live-theme-card.is-on {
  border-color: var(--accent-deep, var(--accent));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
  background: #fff;
}
.live-theme-card strong { display: block; font-size: 0.92rem; margin-top: 0.55rem; }
.live-theme-card small { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 0.15rem; }
.live-theme-art {
  display: block;
  height: 72px;
  border-radius: 12px;
  background: #eef1f4;
}
.live-theme-art--list {
  background:
    linear-gradient(#d9efe6, #d9efe6) 12% 18% / 76% 14% no-repeat,
    linear-gradient(#fff, #fff) 12% 42% / 76% 14% no-repeat,
    linear-gradient(#fff, #fff) 12% 62% / 76% 14% no-repeat,
    #eef7f3;
}
.live-theme-art--acc {
  background:
    linear-gradient(#1a1612, #1a1612) 0 0 / 100% 42% no-repeat,
    linear-gradient(#d5af64, #d5af64) 10% 58% / 36% 28% no-repeat,
    linear-gradient(#2a241c, #2a241c) 54% 58% / 36% 28% no-repeat,
    #100f0d;
  box-shadow: inset 0 0 0 1px rgba(213, 175, 100, 0.2);
}
.live-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  padding: 0.3rem;
  border-radius: 14px;
  background: #f1f3f6;
}
.live-seg-btn {
  border: 0;
  background: transparent;
  border-radius: 11px;
  padding: 0.7rem 0.6rem;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  color: #5b6472;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.live-seg-btn:hover { color: #111; }
.live-seg-btn.is-on {
  background: #fff;
  color: #111;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}
.live-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.live-swatch {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: var(--sw);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.16);
  transition: transform .16s ease, box-shadow .16s ease;
}
.live-swatch:hover { transform: scale(1.08); }
.live-swatch.is-on { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.live-color-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8f9fb;
  cursor: pointer;
}
.live-color-row:hover { border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.live-color-chip {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
}
.live-color-chip input {
  display: block;
  width: 150%;
  height: 150%;
  margin: -25%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: none;
}
.live-color-row strong { display: block; font-size: 0.86rem; }
.live-color-row small { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 0.1rem; letter-spacing: 0.04em; }
.live-color-row em { display: block; font-style: normal; color: var(--muted); font-size: 0.7rem; margin-top: 0.12rem; }
.live-range {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.45rem;
  padding: 0.55rem 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8f9fb;
}
.live-range span {
  font-size: 0.74rem;
  font-weight: 700;
  color: #5b6472;
}
.live-range small {
  min-width: 2.6rem;
  text-align: right;
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  color: #111;
}
.live-range input[type="range"] {
  width: 100%;
  height: 4px;
  margin: 0;
  accent-color: var(--accent, #0f766e);
  cursor: pointer;
}
.live-tune { margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid rgba(15, 23, 42, 0.06); }
.live-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.25rem;
}
