:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --border: #d8dce3;
  --text: #1a1f2c;
  --muted: #5c6578;
  --accent: #2f4f7a;
  --accent-hover: #243d5f;
  --notice-bg: #eef2f7;
  --notice-border: #c5d0de;
  --radius: 6px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 28px 24px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  width: 100%;
  max-width: 320px;
}

.header-logo {
  display: block;
  max-height: 64px;
  max-width: min(280px, 88vw);
  width: auto;
  height: auto;
  object-fit: contain;
}

.header-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.header-logo.hidden {
  display: none;
}

.header-brand {
  min-height: 1.25rem;
}

.main {
  flex: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 32px 20px 40px;
}

h1 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.notice {
  margin: 0 0 24px;
  padding: 12px 14px;
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card-form {
  position: relative;
}

.form-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}

input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(47, 79, 122, 0.12);
}

input.is-invalid {
  border-color: #c45c5c;
}

input.is-invalid:focus {
  box-shadow: 0 0 0 2px rgba(196, 92, 92, 0.15);
}

.field-error {
  margin: -10px 0 14px;
  font-size: 0.8rem;
  color: #9b3b3b;
  line-height: 1.35;
}

.field-error.hidden {
  display: none;
}

.phone-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 16px;
}

.phone-row select {
  flex: 0 0 88px;
  min-width: 88px;
  max-width: 100px;
  padding: 10px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #f0f2f5;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0;
  cursor: pointer;
}

.phone-row input {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.phone-row input.is-invalid,
.phone-row select.is-invalid {
  border-color: #c45c5c;
}

.btn {
  display: block;
  width: 100%;
  padding: 11px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}

.btn:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.alert {
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  margin-bottom: 16px;
  border: 1px solid;
}

.alert-error {
  background: #fef5f5;
  border-color: #e8c4c4;
  color: #8b2e2e;
}

.alert-info {
  background: var(--notice-bg);
  border-color: var(--notice-border);
  color: var(--muted);
}

.alert-success {
  background: #f2f7f4;
  border-color: #b8d4c4;
  color: #2d5c40;
}

.hidden {
  display: none !important;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid #eceef2;
  font-size: 0.9rem;
}

.meta-row:last-of-type {
  border-bottom: none;
}

.meta-label {
  color: var(--muted);
}

.meta-value {
  font-weight: 500;
  text-align: right;
}

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.status-active {
  background: #e8f0ea;
  color: #2d5c40;
}

.status-inactive,
.status-suspended {
  background: #f5ecec;
  color: #8b2e2e;
}

.status-pending_payment {
  background: #eef2f7;
  color: #2f4f7a;
}

.price-row {
  text-align: center;
  padding: 20px 0 8px;
  border-top: 1px solid #eceef2;
  margin-top: 8px;
}

.price-row .amount {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
}

.price-row .period {
  font-size: 0.85rem;
  color: var(--muted);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 16px;
  align-items: stretch;
}

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

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 12px;
  padding-top: 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: #fafbfc;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  overflow: hidden;
}

.plan-card--has-badge {
  padding-top: 0;
}

.plan-card:hover {
  border-color: #a8b4c8;
}

.plan-card.is-selected {
  border-color: var(--accent);
  background: #f0f4fa;
  box-shadow: 0 0 0 1px var(--accent);
}

.plan-card--highlight {
  border-color: #b8c8dc;
}

.plan-card--highlight.is-selected {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(47, 79, 122, 0.18);
}

.plan-card--highlight .plan-badge-row {
  background: #1e6b45;
}

.plan-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-badge-row {
  margin: 0 -12px 8px;
  padding: 6px 10px;
  background: var(--accent);
  text-align: center;
}

.plan-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
  color: #fff;
  max-width: 100%;
  white-space: normal;
}

.plan-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.plan-duration {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 2px;
}

.plan-total {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.plan-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

.plan-save {
  font-size: 0.72rem;
  font-weight: 600;
  color: #2d5c40;
  margin-top: 2px;
}

.step-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 16px;
}

.package-name {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.status-message {
  margin: 16px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

.loading-text {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer {
  padding: 16px 20px;
  text-align: center;
  font-size: 0.75rem;
  color: #9aa3b2;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* —— Ödeme sonuç kartları —— */
.outcome-wrap {
  margin-top: 8px;
}

.outcome-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px 24px 28px;
  text-align: center;
}

.outcome-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  color: var(--accent);
}

.outcome-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.outcome-success .outcome-icon {
  color: #2d7a4a;
}

.outcome-error .outcome-icon {
  color: #b84a4a;
}

.outcome-warning .outcome-icon {
  color: #b8860b;
}

.outcome-info .outcome-icon {
  color: var(--accent);
}

.outcome-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 20px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.outcome-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.outcome-message {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.55;
}

.outcome-hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  padding: 12px 14px;
  background: var(--notice-bg);
  border-radius: var(--radius);
  border: 1px solid var(--notice-border);
}

.outcome-success .outcome-hint {
  background: #f2f7f4;
  border-color: #c5ddd0;
}

.outcome-error .outcome-hint {
  background: #fef8f8;
  border-color: #ecd4d4;
}

.outcome-warning .outcome-hint {
  background: #fdfaf3;
  border-color: #e8dcc0;
}

.main--outcome h1.page-heading {
  display: none;
}

.checkout-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(26, 31, 44, 0.45);
  backdrop-filter: blur(4px);
}

.checkout-overlay-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 36px 28px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.checkout-overlay-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.checkout-overlay-hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.billing-active-card {
  margin-top: 0;
}

.billing-active-card .outcome-hint {
  margin-top: 4px;
}

/* —— Kurumsal uyarı diyaloğu —— */
.corp-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(26, 31, 44, 0.48);
  backdrop-filter: blur(4px);
}

.corp-dialog {
  background: var(--surface);
  border-radius: 18px;
  padding: 28px 24px 22px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16);
  border: 1px solid var(--border);
}

.corp-dialog-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.corp-dialog-icon svg {
  width: 28px;
  height: 28px;
}

.corp-dialog-icon--error {
  background: #fdecea;
  color: #c62828;
}

.corp-dialog-icon--warning {
  background: #fff3e0;
  color: #e65100;
}

.corp-dialog-icon--info {
  background: #eef2f7;
  color: var(--accent);
}

.corp-dialog-icon--success {
  background: #e8f5e9;
  color: #2e7d32;
}

.corp-dialog-title {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.corp-dialog-message {
  margin: 0 0 22px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

.corp-dialog-btn {
  width: 100%;
  margin-top: 0;
}
