﻿:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --primary: #0071e3;
  --primary-hover: #0062c4;
  --ok: #1d7a34;
  --error: #b42318;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.lazy-load {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.lazy-load.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 0.6s ease-out;
  will-change: opacity;
}

.fade-in.visible {
  opacity: 1;
}

.page {
  width: min(980px, calc(100% - 32px));
  margin: 26px auto 40px;
}

.card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

h1 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 36px);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  letter-spacing: -0.6px;
  background: linear-gradient(90deg, #0084ff 30%, #ff6600 70%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 70px rgba(255, 159, 64, 0.9);
}

.form > label > strong {
  font-weight: 600;
}

.sub {
  margin: 10px 0 22px;
  color: var(--muted);
  text-align: center;
  font-size: 15px;
}

.form {
  display: grid;
  gap: 12px;
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #1d1d1f;
}

.field-label svg {
  width: 16px;
  height: 16px;
  stroke: #0071e3;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

input:not([type="file"]) {
  width: 100%;
  font: inherit;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

input:not([type="file"]):focus {
  outline: none;
  border-color: #7bb4f8;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.input-with-icon {
  position: relative;
}

.input-with-icon svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: #0071e3;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.input-with-icon input:not([type="file"]) {
  padding-left: 38px;
  padding-right: 48px;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  z-index: 3;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  color: #8a8a90;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  line-height: 0;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.toggle-password:hover {
  color: #007aff;
  background: rgba(0, 122, 255, 0.1);
}

.toggle-password:focus-visible {
  outline: 2px solid rgba(36, 95, 242, 0.5);
  outline-offset: 1px;
}

.toggle-password .icon-eye {
  display: block;
  position: static;
  left: auto;
  top: auto;
  transform: none;
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  pointer-events: none;
}

.file-input-wrapper {
  position: relative;
  display: block;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-input-display {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border: 2px dashed #d2d2d7;
  border-radius: 12px;
  background: #fafafa;
  transition: all 0.2s ease;
  cursor: pointer;
}

.file-input-display:hover {
  border-color: #0071e3;
  background: #f0f7ff;
}

.file-input-display.has-file {
  border-style: solid;
  border-color: #0071e3;
  background: #f0f7ff;
}

.file-name {
  color: #86868b;
  font-size: 15px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-input-display.has-file .file-name {
  color: #0071e3;
}

.file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.file-icon svg {
  width: 18px;
  height: 18px;
  stroke: #0071e3;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button#createZipBtn {
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 18px;
  cursor: pointer;
  transition: background .2s ease, transform .06s ease;
}

button#createZipBtn:hover {
  background: var(--primary-hover);
}

button#createZipBtn:active {
  transform: translateY(1px);
}

#status {
  min-height: 22px;
  margin-top: 2px;
  font-size: 14px;
  text-align: center;
  color: var(--muted);
}

#status.success {
  color: var(--ok);
  font-weight: 600;
}

#status.error {
  color: var(--error);
  font-weight: 600;
}

.footer-column h6 {
  margin-top: 0;
}

@media (max-width: 640px) {
  .page {
    width: calc(100% - 20px);
    margin-top: 32px;
  }

  .card {
    padding: 18px;
  }

  h1 {
    font-size: clamp(25px, 7vw, 32px);
  }
}

/* Match the sign page's Liquid Glass controls without changing existing class names. */
:root {
  --layout-glass-control-bg: rgba(255, 255, 255, 0.2);
  --layout-glass-control-hover-bg: rgba(255, 255, 255, 0.24);
  --layout-liquid-glass-shadow:
    rgba(242, 242, 242, 0.8) 2px 2px 3px -3px inset,
    rgba(242, 242, 242, 0.8) -2px -2px 3px -3px inset,
    rgba(255, 255, 255, 0.8) -3px -3px 0.8px -3.5px inset,
    rgba(255, 255, 255, 0.8) 3px 3px 0.8px -3.5px inset,
    rgba(0, 0, 0, 0.1) 0 0 8px 0;
}

input:not([type="file"]) {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 58px;
  padding: 16px 18px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 17px;
  color: #1d1d1f;
  background: transparent;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: color 0.2s ease;
}

input:not([type="file"])::placeholder {
  color: rgba(29, 29, 31, 0.52);
}

input:not([type="file"]):focus {
  color: #111113;
}

.input-with-icon {
  position: relative;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  transition: transform 0.24s ease;
}

.input-with-icon::before,
.file-input-display::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(247,248,250,0.72), rgba(232,234,238,0.46) 48%, rgba(220,223,229,0.34)),
    linear-gradient(180deg, rgba(255,255,255,0.16), transparent 22%);
  box-shadow:
    0 12px 24px rgba(120, 128, 140, 0.14),
    0 3px 8px rgba(120, 128, 140, 0.1),
    inset 0 -8px 14px rgba(136, 143, 155, 0.1),
    inset 0 1px 10px rgba(255,255,255,0.16);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  pointer-events: none;
  transition: background 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease;
}

.input-with-icon:focus-within::before,
.file-input-wrapper:focus-within .file-input-display::before {
  background:
    linear-gradient(180deg, rgba(248,249,251,0.78), rgba(236,238,242,0.58) 52%, rgba(226,229,235,0.44)),
    linear-gradient(180deg, rgba(255,255,255,0.24), transparent 24%);
  box-shadow:
    0 18px 38px rgba(120, 128, 140, 0.18),
    0 6px 14px rgba(120, 128, 140, 0.14),
    inset 0 -8px 14px rgba(136, 143, 155, 0.05),
    inset 0 1px 14px rgba(255,255,255,0.62);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  transform: translateY(-1px);
}

.input-with-icon:focus-within svg {
  stroke: #0071e3;
}

.input-with-icon:hover {
  transform: translateY(-1px);
}

.input-with-icon svg {
  left: 18px;
  width: 21px;
  height: 21px;
  stroke: rgba(29, 29, 31, 0.54);
  z-index: 3;
}

.input-with-icon input:not([type="file"]) {
  padding-left: 49px;
  padding-right: 48px;
}

/* Keep the password-eye control above the input and fixed to its right edge. */
.input-with-icon .toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  z-index: 4;
  display: inline-flex;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  color: #8a8a90;
  border-radius: 50%;
  line-height: 0;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.input-with-icon .toggle-password:hover {
  color: #007aff;
  background: rgba(0, 122, 255, 0.1);
}

.input-with-icon .toggle-password:focus-visible {
  outline: 2px solid rgba(36, 95, 242, 0.5);
  outline-offset: 1px;
}

.input-with-icon .toggle-password .icon-eye {
  position: static;
  display: block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  transform: none;
}

.file-input-wrapper {
  border-radius: 999px;
}

.file-input-wrapper input[type="file"] {
  inset: 0;
  z-index: 6;
}

.file-input-display {
  position: relative;
  min-height: 58px;
  padding: 16px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  transition: transform 0.24s ease;
  overflow: hidden;
}

.file-input-display:hover {
  transform: translateY(-1px);
  border-color: transparent;
  background: transparent;
}

.file-input-display.has-file {
  border-style: solid;
  border-color: transparent;
  background: transparent;
}

.file-name {
  position: relative;
  z-index: 2;
  color: rgba(29, 29, 31, 0.52);
  font-size: 17px;
}

.file-input-display.has-file .file-name {
  color: #1d1d1f;
}

.file-icon {
  position: relative;
  z-index: 2;
}

.file-icon svg {
  width: 21px;
  height: 21px;
  stroke: rgba(29, 29, 31, 0.54);
}

.file-input-wrapper:focus-within .file-icon svg,
.file-input-display.has-file .file-icon svg {
  stroke: #0071e3;
}

button#createZipBtn {
  width: 100%;
  min-height: 54px;
  margin-top: 32px;
  padding: 16px;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(0, 122, 255, 0.9), rgba(0, 113, 227, 0.78)),
    var(--layout-glass-control-bg);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--layout-liquid-glass-shadow);
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  transition: all 0.2s ease;
}

button#createZipBtn:hover {
  background:
    linear-gradient(180deg, rgba(0, 128, 255, 0.96), rgba(0, 119, 237, 0.88)),
    var(--layout-glass-control-hover-bg);
  transform: translateY(-1px);
}

button#createZipBtn:active {
  transform: translateY(0);
}

@media (max-width: 640px) {
  .page {
    width: 100%;
    padding: 0 18px;
    margin-top: 12px;
  }

  .page,
  .card,
  .form,
  .input-with-icon,
  .file-input-wrapper,
  .file-input-display,
  input:not([type="file"]),
  button#createZipBtn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .card {
    padding: 20px;
  }

  .file-input-display {
    gap: 8px;
  }

  .file-name {
    min-width: 0;
    flex: 1 1 auto;
  }
}
