/*
  Webbiu Installer — Premium kurulum sihirbazı
  Sipariş doğrulama · FTP · Veritabanı · Otomatik kurulum
*/

:root {
  --brand: #0b6eff;
  --brand-deep: #064ed1;
  --brand-soft: #eaf3ff;
  --brand-pale: #f4f8ff;
  --cyan: #65d6ff;
  --navy: #081b3a;
  --navy-2: #10284f;
  --ink: #07172f;
  --ink-2: #263751;
  --muted: #63728a;
  --muted-2: #8a98ac;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef3f9;
  --line: #dde6f1;
  --line-strong: #cbd8e8;
  --success: #18a568;
  --success-soft: #e8f8f0;
  --warning: #e89a16;
  --warning-soft: #fff8eb;
  --danger: #df4f58;
  --danger-soft: #fef0f1;
  --shadow-xs: 0 1px 2px rgba(8, 27, 58, 0.04);
  --shadow-sm: 0 10px 30px rgba(8, 27, 58, 0.07);
  --shadow-md: 0 24px 70px rgba(8, 27, 58, 0.11);
  --shadow-blue: 0 24px 60px rgba(11, 110, 255, 0.18);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --sidebar-w: 320px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  background:
    radial-gradient(circle at 0% 0%, rgba(101, 214, 255, .12), transparent 28rem),
    radial-gradient(circle at 100% 20%, rgba(11, 110, 255, .08), transparent 32rem),
    linear-gradient(180deg, #f8fbff 0%, #eef3fa 100%);
  -webkit-font-smoothing: antialiased;
}

::selection { color: #fff; background: var(--brand); }

/* ── Layout ── */
.installer-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.installer-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 2rem 1.75rem;
  background: linear-gradient(165deg, var(--navy) 0%, #0a2a5c 55%, #0d3d7a 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.installer-sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(101, 214, 255, .15), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(11, 110, 255, .2), transparent 45%);
  pointer-events: none;
}

.sidebar-inner { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; }

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 2.5rem;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 8px 24px rgba(11, 110, 255, .35);
}

.brand-text strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: -.02em;
}

.brand-text span {
  font-size: .78rem;
  color: rgba(255, 255, 255, .65);
}

.sidebar-intro {
  margin-bottom: 2rem;
}

.sidebar-intro h1 {
  margin: 0 0 .5rem;
  font-size: 1.35rem;
  line-height: 1.3;
  letter-spacing: -.02em;
}

.sidebar-intro p {
  margin: 0;
  font-size: .88rem;
  color: rgba(255, 255, 255, .72);
  line-height: 1.55;
}

/* Steps */
.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: .85rem 0;
  position: relative;
  opacity: .55;
  transition: opacity .25s var(--ease);
}

.step-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 2.4rem;
  width: 2px;
  height: calc(100% - 1.2rem);
  background: rgba(255, 255, 255, .15);
}

.step-item.is-active,
.step-item.is-done { opacity: 1; }

.step-item.is-done .step-num {
  background: var(--success);
  border-color: var(--success);
}

.step-item.is-active .step-num {
  background: var(--brand);
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(11, 110, 255, .25);
}

.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .25);
  display: grid;
  place-items: center;
  font-size: .78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, .08);
}

.step-body strong {
  display: block;
  font-size: .9rem;
  margin-bottom: .1rem;
}

.step-body span {
  font-size: .78rem;
  color: rgba(255, 255, 255, .6);
}

.sidebar-footer {
  position: relative;
  z-index: 1;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .78rem;
  color: rgba(255, 255, 255, .55);
}

.sidebar-footer a {
  color: var(--cyan);
  text-decoration: none;
}

.sidebar-footer a:hover { text-decoration: underline; }

/* Main */
.installer-main {
  padding: 2rem 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: .78rem;
  color: var(--muted);
  box-shadow: var(--shadow-xs);
}

.version-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.help-link {
  font-size: .85rem;
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

.help-link:hover { text-decoration: underline; }

.panel-wrap {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel {
  display: none;
  padding: 2.25rem 2.5rem;
  animation: fadeIn .35s var(--ease);
}

.panel.is-active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-head {
  margin-bottom: 1.75rem;
}

.panel-head .eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .5rem;
}

.panel-head h2 {
  margin: 0 0 .5rem;
  font-size: 1.65rem;
  letter-spacing: -.03em;
  line-height: 1.25;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
}

/* Welcome */
.welcome-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  margin-top: .5rem;
}

.info-card {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.info-card h3 {
  margin: 0 0 .65rem;
  font-size: .95rem;
}

.info-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-2);
  font-size: .88rem;
}

.info-card li + li { margin-top: .35rem; }

.info-card.highlight {
  background: linear-gradient(135deg, var(--brand-pale), var(--brand-soft));
  border-color: rgba(11, 110, 255, .2);
}

.info-card.highlight h3 { color: var(--brand-deep); }

.alert-box {
  display: flex;
  gap: .85rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--warning-soft);
  border: 1px solid rgba(232, 154, 22, .25);
  margin-top: 1.25rem;
  font-size: .88rem;
  color: #7a5a12;
}

.alert-box strong { display: block; margin-bottom: .2rem; }

/* Forms */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group { margin-bottom: 1.1rem; }

.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: .4rem;
}

.form-group label .optional {
  font-weight: 400;
  color: var(--muted-2);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: .72rem .95rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 110, 255, .12);
}

.form-group input.is-error {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.form-group input.is-success {
  border-color: var(--success);
  background: var(--success-soft);
}

.form-hint {
  margin-top: .4rem;
  font-size: .8rem;
  color: var(--muted);
}

.form-hint.error { color: var(--danger); }
.form-hint.success { color: var(--success); }

.input-group {
  display: flex;
  gap: .65rem;
}

.input-group input { flex: 1; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .72rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s;
}

.btn:active { transform: scale(.98); }

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  box-shadow: 0 8px 24px rgba(11, 110, 255, .28);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 12px 32px rgba(11, 110, 255, .35);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
}

.btn-secondary:hover:not(:disabled) { background: var(--surface-3); }

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1px dashed var(--line-strong);
  padding: .55rem .9rem;
  font-size: .82rem;
}

.btn-ghost:hover { background: var(--brand-pale); border-color: var(--brand); }

/* Order result */
.order-result {
  display: none;
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  animation: fadeIn .4s var(--ease);
}

.order-result.is-visible { display: block; }

.product-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff;
}

.product-banner h3 {
  margin: 0 0 .25rem;
  font-size: 1.15rem;
}

.product-banner p {
  margin: 0;
  font-size: .85rem;
  color: rgba(255, 255, 255, .7);
}

.product-badge {
  padding: .4rem .85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  font-size: .78rem;
  white-space: nowrap;
}

.product-details {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.detail-cell {
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--line);
}

.detail-cell:last-child { border-right: none; }

.detail-cell span {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: .25rem;
}

.detail-cell strong {
  font-size: .92rem;
  color: var(--ink);
}

.feature-section {
  padding: 1.25rem 1.5rem;
}

.feature-section h4 {
  margin: 0 0 .75rem;
  font-size: .88rem;
  color: var(--ink-2);
}

.feature-section ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem .75rem;
}

.feature-section li {
  font-size: .85rem;
  color: var(--ink-2);
  padding-left: 1.35rem;
  position: relative;
}

.feature-section li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
  font-size: .78rem;
}

/* Requirements */
.req-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.req-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.req-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  background: var(--success-soft);
}

.req-item.fail .req-icon { background: var(--danger-soft); }

.req-item strong { display: block; font-size: .88rem; }
.req-item span { font-size: .78rem; color: var(--muted); }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
}

.checkbox-row input {
  margin-top: .2rem;
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
  cursor: pointer;
}

.checkbox-row label {
  font-size: .88rem;
  color: var(--ink-2);
  cursor: pointer;
}

/* Test result */
.test-result {
  display: none;
  align-items: center;
  gap: .5rem;
  margin-top: .75rem;
  padding: .65rem .9rem;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 600;
}

.test-result.ok {
  background: var(--success-soft);
  color: var(--success);
}

.test-result.fail {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Advanced panel */
.advanced-toggle {
  margin-top: .5rem;
}

.advanced-panel {
  display: none;
  margin-top: 1rem;
  padding: 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line-strong);
  background: var(--surface-2);
}

.advanced-panel.is-open { display: block; }

/* Install progress */
.install-status {
  margin-bottom: 1.5rem;
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
  margin-bottom: .5rem;
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--cyan));
  transition: width .4s var(--ease);
}

.progress-label {
  font-size: .82rem;
  color: var(--muted);
  font-weight: 600;
}

.task-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.15rem;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
  color: var(--muted);
  background: var(--surface);
}

.task-item:last-child { border-bottom: none; }

.task-item.is-running {
  background: var(--brand-pale);
  color: var(--brand-deep);
  font-weight: 600;
}

.task-item.is-done { color: var(--success); }

.task-status {
  width: 24px;
  text-align: center;
  font-weight: 700;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

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

.install-log {
  background: #0d1117;
  color: #c9d1d9;
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  max-height: 180px;
  overflow-y: auto;
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
  font-size: .78rem;
  line-height: 1.7;
}

.log-line { margin: 0; }
.log-line.info { color: #79c0ff; }
.log-line.ok { color: #56d364; }

/* Complete */
.complete-hero {
  text-align: center;
  padding: 1.5rem 0 2rem;
}

.complete-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  display: grid;
  place-items: center;
  font-size: 2rem;
  box-shadow: 0 0 0 8px rgba(24, 165, 104, .12);
}

.complete-hero h2 {
  margin: 0 0 .5rem;
  font-size: 1.5rem;
}

.complete-hero p {
  margin: 0;
  color: var(--muted);
}

.cred-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.cred-card {
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.cred-card h4 {
  margin: 0 0 .75rem;
  font-size: .85rem;
  color: var(--brand-deep);
}

.cred-row {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  padding: .35rem 0;
  border-bottom: 1px dashed var(--line);
}

.cred-row:last-child { border-bottom: none; }

.cred-row span { color: var(--muted); }
.cred-row strong { color: var(--ink); font-weight: 600; }

.admin-link-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand-pale), var(--brand-soft));
  border: 1px solid rgba(11, 110, 255, .2);
}

.admin-link-box a {
  color: var(--brand-deep);
  font-weight: 700;
  text-decoration: none;
  word-break: break-all;
}

.admin-link-box a:hover { text-decoration: underline; }

/* Footer nav */
.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 2.5rem;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

/* Responsive */
@media (max-width: 1024px) {
  .installer-shell { grid-template-columns: 1fr; }
  .installer-sidebar {
    position: relative;
    height: auto;
    padding: 1.5rem;
  }
  .step-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
  }
  .step-item:not(:last-child)::after { display: none; }
  .welcome-grid,
  .product-details,
  .req-grid,
  .cred-grid,
  .form-row { grid-template-columns: 1fr; }
  .feature-section ul { grid-template-columns: 1fr; }
  .detail-cell { border-right: none; border-bottom: 1px solid var(--line); }
  .installer-main { padding: 1.25rem; }
  .panel { padding: 1.5rem; }
  .panel-footer { padding: 1rem 1.5rem; }
}
