/* Enterprise Register — card layout */
:root {
  --reg-primary: #2563eb;
  --reg-primary-hover: #1d4ed8;
  --reg-bg-image: url('https://static.denizkariyer.cloud/img/ent-login-bg.webp');
  --reg-bg-fallback: #dbeafe;
  --reg-card: #ffffff;
  --reg-border: #e2e8f0;
  --reg-muted: #64748b;
  --reg-text: #0f172a;
  --reg-radius: 16px;
  --reg-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }

body.reg-page {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--reg-text);
  background-color: var(--reg-bg-fallback);
  background-image: var(--reg-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  --border: 214.3 31.8% 91.4%;
  --foreground: 222.2 47.4% 11.2%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --card: 0 0% 100%;
}

@media (min-width: 769px) {
  body.reg-page {
    background-attachment: fixed;
  }
}

.reg-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px 40px;
}

.reg-card {
  width: 100%;
  max-width: 760px;
  background: var(--reg-card);
  border-radius: var(--reg-radius);
  box-shadow: var(--reg-shadow);
  padding: 32px 32px 28px;
}
.reg-card--narrow {
  max-width: 480px;
}

.reg-header { margin-bottom: 24px; }
.reg-header h1 {
  margin: 0 0 6px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.reg-header p {
  margin: 0;
  color: var(--reg-muted);
  font-size: 0.95rem;
}

.reg-section-label {
  display: block;
  margin: 0 0 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--reg-text);
}

/* Account type grid */
.reg-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.reg-type-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 14px 12px;
  border: 2px solid var(--reg-border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.reg-type-card:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}
.reg-type-card.is-selected {
  border-color: var(--reg-primary);
  background: #eff6ff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}
.reg-type-card__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f1f5f9;
  display: grid;
  place-items: center;
  color: #475569;
}
.reg-type-card.is-selected .reg-type-card__icon {
  background: #dbeafe;
  color: var(--reg-primary);
}
.reg-type-card__icon svg { width: 20px; height: 20px; }
.reg-type-card__body { min-width: 0; }
.reg-type-card__title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--reg-text);
}
.reg-type-card__desc {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--reg-muted);
  line-height: 1.35;
}
.reg-type-card__check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--reg-primary);
  color: #fff;
  display: none;
  place-items: center;
}
.reg-type-card.is-selected .reg-type-card__check { display: grid; }
.reg-type-card__check svg { width: 12px; height: 12px; }

/* Form grid */
.reg-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  margin-bottom: 16px;
}
.reg-form-grid--single { grid-template-columns: 1fr; }

.reg-field { display: flex; flex-direction: column; gap: 6px; }
.reg-field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
}
.reg-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.reg-input-wrap svg.reg-input-icon {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
}
.reg-input-wrap input,
.reg-input-wrap select,
.reg-field textarea {
  width: 100%;
  height: 44px;
  padding: 0 12px 0 40px;
  border: 1px solid var(--reg-border);
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.9375rem;
  color: var(--reg-text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.reg-field textarea {
  height: auto;
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
}
.reg-input-wrap input:focus,
.reg-input-wrap select:focus,
.reg-field textarea:focus {
  outline: none;
  border-color: var(--reg-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.reg-input-wrap input.has-toggle { padding-right: 42px; }
.reg-toggle-pwd {
  position: absolute;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  overflow: hidden;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.reg-toggle-pwd:hover { color: #64748b; background: #f1f5f9; }
.reg-toggle-pwd:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22);
}
.reg-toggle-pwd__icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition:
    opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reg-toggle-pwd__icon--off {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}
.reg-toggle-pwd__icon--on {
  opacity: 0;
  transform: scale(0.86) rotate(-10deg);
}
.reg-toggle-pwd.is-visible .reg-toggle-pwd__icon--off {
  opacity: 0;
  transform: scale(0.86) rotate(10deg);
}
.reg-toggle-pwd.is-visible .reg-toggle-pwd__icon--on {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* Phone — country code + local number */
.reg-field--phone { grid-column: 1 / -1; }
.reg-phone-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reg-phone-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.reg-phone-field__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  padding-left: 2px;
}
.reg-phone-field input[type="tel"] {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--reg-border);
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.9375rem;
  color: var(--reg-text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.reg-phone-field input[type="tel"]:focus {
  outline: none;
  border-color: var(--reg-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.reg-phone-field input[type="tel"]::placeholder { color: #94a3b8; }

@media (min-width: 640px) {
  .reg-field--phone { grid-column: auto; }
}

/* Org fields */
#org-fields {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  margin-bottom: 16px;
  padding-top: 4px;
}
#org-fields.is-visible { display: grid; }
#org-fields .reg-field--full { grid-column: 1 / -1; }
#org-fields .reg-input-wrap input { padding-left: 12px; }

/* Searchable country select (ilan-ekle dk-select pattern) */
.reg-select-wrap {
  position: relative;
  width: 100%;
}

.reg-select-wrap.is-enhanced select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dk-select-menu-panel.is-fixed {
  position: fixed;
  z-index: 10000;
}

@keyframes regSelectIn {
  from { opacity: 0; transform: scale(0.98) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.dk-select-trigger-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgb(148 163 184 / 0.62);
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.9375rem;
  color: var(--reg-text);
  text-align: left;
  cursor: pointer;
  outline: none;
  box-shadow: 0 1px 0 rgb(15 23 42 / 0.06), 0 1px 3px rgb(15 23 42 / 0.1);
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.dk-select-trigger-btn:hover:not(:disabled) {
  border-color: rgb(59 130 246 / 0.4);
  background: #fff;
}

.dk-select-trigger-btn:focus,
.dk-select-trigger-btn:focus-visible,
.dk-select-trigger-btn.is-open {
  border-color: rgb(59 130 246 / 0.75);
  background: #fff;
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.12), 0 1px 3px rgb(15 23 42 / 0.14);
}

.dk-select-trigger-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dk-select-trigger-btn .dk-select-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dk-select-trigger-btn .dk-select-value.is-placeholder {
  color: #94a3b8;
}

.dk-select-trigger-btn .dk-select-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #94a3b8;
  transition: transform .25s cubic-bezier(0.22, 1, 0.36, 1);
}

.dk-select-trigger-btn.is-open .dk-select-chevron {
  transform: rotate(180deg);
  color: var(--reg-primary);
}

.dk-select-menu-panel {
  overflow: hidden;
  border: 1px solid rgb(203 213 225 / 0.9);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 40px rgb(15 23 42 / 0.18);
  animation: regSelectIn 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.dk-select-menu-panel.is-fixed {
  position: fixed;
  z-index: 10000;
}

.dk-select-search-wrap {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px;
  border-bottom: 1px solid var(--reg-border);
  background: #fff;
}

.dk-select-search-input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--reg-border);
  border-radius: 8px;
  background: #f8fafc;
  font-size: 0.875rem;
  color: var(--reg-text);
  outline: none;
}

.dk-select-search-input:focus {
  border-color: var(--reg-primary);
  background: #fff;
  box-shadow: 0 0 0 2px rgb(37 99 235 / 0.12);
}

.dk-select-search-input::placeholder {
  color: #94a3b8;
}

.dk-select-list-scroll {
  margin: 0;
  padding: 6px;
  list-style: none;
  overflow-y: auto;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.dk-select-list-scroll::-webkit-scrollbar { width: 8px; }
.dk-select-list-scroll::-webkit-scrollbar-track { background: transparent; }
.dk-select-list-scroll::-webkit-scrollbar-thumb {
  border-radius: 9999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  background-color: rgb(148 163 184 / 0.65);
}

.dk-select-option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-size: 0.875rem;
  color: var(--reg-text);
  text-align: left;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}

.dk-select-option-item span:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dk-select-option-item--hover-primary:hover {
  background: rgb(59 130 246 / 0.08);
}

.dk-select-option-item.is-active {
  border-color: rgb(59 130 246 / 0.35);
  background: rgb(59 130 246 / 0.1);
  color: var(--reg-primary);
}

.dk-select-empty {
  padding: 10px 12px;
  font-size: 0.8125rem;
  color: var(--reg-muted);
}

/* Password popover */
.reg-pwd-wrap { position: relative; }
.pwd-popover {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.8125rem;
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
}
.pwd-popover[aria-hidden="false"] { display: block; }
.pwd-popover__title { font-weight: 700; margin-bottom: 8px; }
.pwd-reqs { list-style: none; margin: 0; padding: 0; }
.pwd-reqs li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  opacity: .75;
}
.pwd-reqs li.ok { opacity: 1; color: #86efac; }
.pwd-reqs li .ico {
  width: 8px; height: 8px; border-radius: 50%;
  background: #64748b; flex-shrink: 0;
}
.pwd-reqs li.ok .ico { background: #22c55e; }

/* Checkboxes */
.reg-consents { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 20px; }
.reg-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #475569;
  cursor: pointer;
}
.reg-check input {
  margin-top: 3px;
  width: 16px; height: 16px;
  accent-color: var(--reg-primary);
  flex-shrink: 0;
}
.reg-check button {
  all: unset;
  cursor: pointer;
  color: var(--reg-primary);
  font-weight: 600;
  text-decoration: underline;
}

/* Submit */
.reg-submit {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 10px;
  background: var(--reg-primary);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
  transition: background .15s, transform .1s, opacity .15s;
}
.reg-submit:hover:not(:disabled) { background: var(--reg-primary-hover); }
.reg-submit:active:not(:disabled) { transform: translateY(1px); }
.reg-submit:disabled, .reg-submit.btn--disabled {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}
.reg-submit.is-loading { pointer-events: none; opacity: .75; }

.reg-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .06em;
}
.reg-divider::before, .reg-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--reg-border);
}

.reg-footer {
  text-align: center;
  font-size: 0.875rem;
  color: var(--reg-muted);
}
.reg-footer a {
  color: var(--reg-primary);
  font-weight: 600;
  text-decoration: none;
}
.reg-footer a:hover { text-decoration: underline; }

.reg-notes {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid var(--reg-border);
}
.reg-notes ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.8125rem;
  color: var(--reg-muted);
  line-height: 1.55;
}
.reg-notes li + li { margin-top: 4px; }

.reg-captcha { margin: 0 0 16px; display: flex; justify-content: center; }

/* Legal modal (minimal) */
.dk-legal[aria-hidden="true"] { display: none; }
.dk-legal[aria-hidden="false"] {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center; padding: 16px;
}
.dk-legal__overlay {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, 0.55);
}
.dk-legal__dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: min(86vh, 820px);
  background: #fff;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--reg-shadow);
}
.dk-legal__top { padding: 12px 12px 0; border-bottom: 1px solid var(--reg-border); }
.dk-legal__tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.dk-legal__tab {
  border: 0; background: #f1f5f9; color: #334155;
  padding: 8px 12px; border-radius: 999px; font-size: .8125rem;
  cursor: pointer;
}
.dk-legal__tab.active { background: #dbeafe; color: var(--reg-primary); font-weight: 600; }
.dk-legal__body { padding: 16px; overflow: auto; flex: 1; font-size: .875rem; line-height: 1.6; }
.dk-legal__foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 16px; border-top: 1px solid var(--reg-border);
}
.dk-legal__btn {
  height: 40px; padding: 0 16px; border-radius: 8px; font-weight: 600; cursor: pointer;
}
.dk-legal__btn--ghost { border: 1px solid var(--reg-border); background: #fff; }
.dk-legal__btn--primary { border: 0; background: var(--reg-primary); color: #fff; }

@media (max-width: 640px) {
  .reg-card { padding: 22px 18px 20px; }
  .reg-type-grid, .reg-form-grid, #org-fields { grid-template-columns: 1fr; }
}

/* /ilan-ekle ile birebir SweetAlert2 görünümü */
.dk-swal-popup {
  width: min(92vw, 460px) !important;
  max-width: 460px !important;
  border-radius: 14px !important;
  border: 1px solid hsl(var(--border)) !important;
  background-color: #fff !important;
  background-image:
    radial-gradient(120% 90% at 12% 0%, rgb(59 130 246 / 0.06) 0%, transparent 55%),
    radial-gradient(90% 75% at 92% 6%, rgb(14 165 233 / 0.05) 0%, transparent 52%),
    linear-gradient(180deg, rgb(255 255 255 / 0.98), rgb(255 255 255 / 1));
  background-repeat: no-repeat;
  color: hsl(var(--foreground)) !important;
  font-family: inherit !important;
  box-shadow:
    0 14px 30px rgb(15 23 42 / 0.14),
    0 2px 6px rgb(15 23 42 / 0.08) !important;
  padding: 0.95rem 1rem 0.9rem !important;
}

.dk-swal-title {
  color: hsl(var(--foreground)) !important;
  font-size: 1.32rem !important;
  line-height: 1.26 !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  margin: 0.18rem 0 0.14rem !important;
}

.dk-swal-html {
  color: hsl(var(--muted-foreground)) !important;
  font-size: 0.9rem !important;
  line-height: 1.45 !important;
  font-weight: 400 !important;
  margin: 0.08rem auto 0.32rem !important;
}

.swal2-confirm.dk-swal-confirm {
  border: 1px solid oklch(60% .2 262) !important;
  border-radius: 0.375rem !important;
  background: oklch(60% .2 262) !important;
  background-image: none !important;
  color: oklch(98% 0 0) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  padding: 0.38rem 0.78rem !important;
  min-height: 32px !important;
  min-width: 104px !important;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.1) !important;
  transition: background-color 140ms ease, transform 140ms ease, box-shadow 140ms ease !important;
  cursor: pointer !important;
}

.swal2-confirm.dk-swal-confirm:hover {
  background: oklch(55% .2 262) !important;
  transform: translateY(-1px);
}

.dk-swal-cancel {
  border: 1px solid hsl(var(--border)) !important;
  border-radius: 0.375rem !important;
  background: hsl(var(--card)) !important;
  color: hsl(var(--foreground)) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  padding: 0.38rem 0.78rem !important;
  min-height: 32px !important;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.08) !important;
  cursor: pointer !important;
}

.dk-swal-icon.swal2-icon {
  border-width: 2px !important;
  transform: scale(0.82);
  margin-top: 0.08rem !important;
  margin-bottom: 0.12rem !important;
}

.swal2-actions {
  margin-top: 0.38rem !important;
  gap: 0.45rem !important;
}
