/*
#	Project: PHPDisk文件系统 - File management for webmasters
#	This is NOT freeware; use is subject to license terms.
#	Website: https://www.phpdisk.com
#	Author: Along ( admin@phpdisk.com )
#	Copyright (C) 2026-2083 PHPDisk Team. All Rights Reserved.
*/
:root {
  --pf-page-bg: #eef2f7;
  --pf-page-bg-2: #e4e9f1;
  --pf-page-bg-top: #f8fafc;
  --pf-header-start: #001f73;
  --pf-header-mid: #002FA7;
  --pf-header-end: #1d4ed8;
  --pf-accent: #002FA7;
  --pf-accent-dark: #00207a;
  --pf-accent-soft: rgba(0, 47, 167, 0.08);
  --pf-border: #e2e8f0;
  --pf-text: #1a1a2e;
  --pf-muted: #64748b;
  --pf-ok: #047857;
  --pf-fail: #b91c1c;
  --pf-warn: #b45309;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(0, 47, 167, 0.1) 0%, transparent 55%),
    linear-gradient(180deg, var(--pf-page-bg-top) 0%, var(--pf-page-bg) 48%, var(--pf-page-bg-2) 100%);
  color: var(--pf-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  line-height: 1.6;
}

.install-container {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 24px rgba(15, 23, 42, 0.06),
    0 24px 48px rgba(15, 23, 42, 0.04);
  max-width: 800px;
  width: 100%;
  padding: 0 0 8px;
  overflow: hidden;
}

.install-header {
  text-align: center;
  padding: 22px 20px 16px;
  background: linear-gradient(135deg, var(--pf-header-start) 0%, var(--pf-header-mid) 48%, var(--pf-header-end) 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.install-header h1 {
  color: #f9fafb;
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.install-header h1 .bx { font-size: 1.15em; }

.install-header .ver {
  font-size: 0.62em;
  font-weight: 500;
  color: #bfdbfe;
}

.edition-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.55em;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--pf-accent-dark);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(191, 219, 254, 0.85);
  vertical-align: middle;
}

.install-header p {
  color: #dbeafe;
  font-size: 0.9rem;
}

.step-indicator {
  display: flex;
  justify-content: space-between;
  margin: 16px 20px 8px;
  position: relative;
}

.step-indicator::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, #e2e8f0 0%, #cbd5e1 50%, #e2e8f0 100%);
  z-index: 0;
}

.step-item {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.25s;
}

.step-item.active .step-number {
  background: var(--pf-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 47, 167, 0.35);
}

.step-item.completed .step-number {
  background: #16a34a;
  color: #fff;
}

.step-title {
  font-size: 0.75rem;
  color: #94a3b8;
}

.step-item.active .step-title {
  color: var(--pf-accent-dark);
  font-weight: 600;
}

.step-item.completed .step-title {
  color: #16a34a;
}

.step-content {
  display: none;
  padding: 12px 22px 20px;
}

.step-content.active { display: block; }

.step-content h2 {
  font-size: 1.15rem;
  color: var(--pf-text);
  margin-bottom: 14px;
  font-weight: 700;
}

.step-content h2 .bx { color: var(--pf-accent); vertical-align: -2px; }

.license-content {
  background: #f8fafc;
  border: 1px solid var(--pf-border);
  border-radius: 10px;
  padding: 18px 20px;
  max-height: 42vh;
  overflow-y: auto;
  margin-bottom: 14px;
  font-size: 0.92rem;
  line-height: 1.75;
  color: #334155;
}

.license-content h1 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--pf-text);
}

.license-content h2 {
  font-size: 1rem;
  margin: 16px 0 8px;
  color: var(--pf-text);
  font-weight: 700;
}

.license-content p { margin-bottom: 10px; }
.license-content a { color: var(--pf-accent); }

.license-checkbox {
  margin-bottom: 8px;
}

.license-checkbox .agree-row {
  margin: 0;
  padding: 12px 14px;
  background: var(--pf-accent-soft);
  border: 1px solid #dbe4ff;
  border-radius: 10px;
}

.env-req {
  background: #f7f9ff;
  border: 1px solid var(--pf-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 14px;
  color: var(--pf-muted);
  font-size: 0.9rem;
}

.env-req p { margin: 0 0 6px; color: var(--pf-text); font-weight: 600; }
.env-req ul, .env-req ol { margin: 0 0 12px; padding-left: 1.25rem; }
.env-req li { margin: 4px 0; font-weight: 400; }
.env-req code {
  background: #eef2ff;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--pf-accent-dark);
}

.env-status {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--pf-accent-soft);
  color: var(--pf-accent);
  font-size: 0.92rem;
}

.env-status.ok { background: #ecfdf5; color: var(--pf-ok); }
.env-status.fail { background: #fef2f2; color: var(--pf-fail); }

.env-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 12px;
  font-size: 0.88rem;
  table-layout: fixed;
}

.env-table th, .env-table td {
  border-bottom: 1px solid var(--pf-border);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.env-table th:nth-child(1), .env-table td:nth-child(1) { width: 48%; }
.env-table th:nth-child(2), .env-table td:nth-child(2) { width: 22%; white-space: nowrap; }
.env-table th:nth-child(3), .env-table td:nth-child(3) { width: 30%; }

.env-table th {
  color: var(--pf-muted);
  font-weight: 600;
  background: #f8fafc;
}

.env-table .badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.env-table .badge.ok { background: #d1fae5; color: var(--pf-ok); }
.env-table .badge.fail { background: #fee2e2; color: var(--pf-fail); }
.env-table .badge.warn { background: #fef3c7; color: var(--pf-warn); }

.env-table .tag-opt {
  color: var(--pf-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.env-hint {
  color: var(--pf-muted);
  font-size: 0.85rem;
  margin: 0 0 14px;
  line-height: 1.55;
}

.config-section {
  background: #f8fafc;
  border: 1px solid var(--pf-border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
}

.config-section h3 {
  font-size: 0.98rem;
  margin-bottom: 12px;
  color: var(--pf-text);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.form-group { margin-bottom: 0; }
.form-group.span-2 { grid-column: 1 / -1; }

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--pf-text);
  font-weight: 600;
  font-size: 0.88rem;
}

.form-group label .required {
  color: #ef4444;
  margin-left: 2px;
}

.form-group input {
  width: 100%;
  padding: 11px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.98rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}

.form-group input:focus {
  outline: none;
  border-color: var(--pf-accent);
  box-shadow: 0 0 0 3px rgba(0, 47, 167, 0.12);
}

.form-group .help-text {
  font-size: 0.8rem;
  color: var(--pf-muted);
  margin-top: 4px;
}

.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 0;
  font-size: 0.92rem;
  color: var(--pf-text);
}

.agree-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--pf-accent);
  flex-shrink: 0;
}

.agree-row a {
  color: var(--pf-accent);
  text-decoration: none;
  font-weight: 600;
}

.agree-row a:hover { text-decoration: underline; }

.btn-group {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.btn {
  flex: 1;
  min-width: 120px;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pf-accent) 0%, var(--pf-accent-dark) 100%);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 47, 167, 0.35);
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
}

.btn-secondary:hover:not(:disabled) {
  background: #e2e8f0;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.msg, .tip-message {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  min-height: 1.2em;
  display: none;
}

.msg.show, .tip-message.show { display: block; }
.msg.ok, .tip-message.success {
  display: block;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: var(--pf-ok);
}
.msg.fail, .tip-message.error {
  display: block;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--pf-fail);
}
.msg:not(.ok):not(.fail):not(:empty) {
  display: block;
  background: var(--pf-accent-soft);
  color: var(--pf-accent);
}

.done-hero {
  text-align: center;
  padding: 8px 0 16px;
}

.done-hero .ok-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #16a34a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 10px;
}

.done-hero h2 { color: #16a34a; margin-bottom: 6px; }
.done-hero p { color: var(--pf-muted); }

.install-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 16px;
  color: #92400e;
  font-size: 0.9rem;
}

.install-warning h3 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: #b45309;
}

.install-warning ul { padding-left: 1.2rem; margin: 0; }
.install-warning li { margin: 4px 0; }
.install-warning code {
  background: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #fde68a;
}

.card.warn {
  margin: 20px;
  padding: 18px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  color: #92400e;
}

.card.warn p { margin-bottom: 12px; }
.card.warn code {
  background: #fff;
  padding: 1px 6px;
  border-radius: 4px;
}

.copyright {
  text-align: center;
  padding: 12px 20px 18px;
  color: var(--pf-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--pf-border);
  margin-top: 4px;
}

.copyright a {
  color: var(--pf-accent);
  text-decoration: none;
}

.copyright a:hover { text-decoration: underline; }
.copyright p + p { margin-top: 2px; }

@media (max-width: 640px) {
  body { padding: 12px; align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .install-header h1 { font-size: 1.2rem; }
  .btn-group { flex-direction: column; }
  .btn { width: 100%; }
}
