:root {
  --bg-gradient-start: #f2efe8;
  --bg-gradient-end: #dde7df;
  --card-bg: rgba(255, 255, 255, 0.88);
  --border: #d7ddd6;
  --text: #1d2a22;
  --muted: #4a5d52;
  --accent: #2f6d4f;
  --accent-hover: #255a40;
  --error: #b64040;
  --success: #1f6b47;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.55) 0%, transparent 45%),
    radial-gradient(circle at 90% 85%, rgba(255, 255, 255, 0.5) 0%, transparent 40%),
    linear-gradient(155deg, var(--bg-gradient-start), var(--bg-gradient-end));
  display: grid;
  place-items: center;
  padding: 20px;
}

.app-shell {
  width: 100%;
  max-width: 560px;
}

.card {
  border: 1px solid var(--border);
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 18px 40px rgba(24, 39, 30, 0.08);
}

h1 {
  margin: 0;
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  font-weight: 700;
}

.subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

form {
  margin-top: 22px;
  display: grid;
  gap: 18px;
}

.form-group {
  display: grid;
  gap: 8px;
}

label {
  font-size: 0.93rem;
  font-weight: 600;
}

input[type="password"],
input[type="file"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
}

input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(100%);
}

.drop-zone {
  border: 1.5px dashed color-mix(in srgb, var(--accent) 52%, var(--border));
  background: color-mix(in srgb, #ffffff 72%, var(--bg-gradient-start));
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.drop-zone:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, #ffffff 58%, var(--bg-gradient-end));
}

.drop-zone:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 36%, white);
  outline-offset: 2px;
}

.drop-zone.active {
  border-color: var(--accent);
  background: color-mix(in srgb, #ffffff 40%, var(--bg-gradient-end));
  transform: translateY(-1px);
}

.drop-zone-title,
.drop-zone-subtitle {
  margin: 0;
}

.drop-zone-title {
  font-weight: 700;
}

.drop-zone-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.selected-file {
  min-height: 1.1em;
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

input[type="password"]:focus,
input[type="file"]:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, white);
  outline-offset: 1px;
  border-color: var(--accent);
}

button {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease;
}

button:hover {
  background: var(--accent-hover);
}

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

button:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.field-error {
  min-height: 1.1em;
  margin: 0;
  font-size: 0.86rem;
  color: var(--error);
}

.status {
  margin-top: 16px;
  min-height: 1.3em;
  font-weight: 600;
  color: var(--muted);
}

.status.error {
  color: var(--error);
}

.status.success {
  color: var(--success);
}

.loader {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.loader-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  animation: pulse 1.05s ease-in-out infinite;
}

.loader-dot:nth-child(2) {
  animation-delay: 0.14s;
}

.loader-dot:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.75);
    opacity: 0.45;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 560px) {
  .card {
    padding: 20px;
    border-radius: 14px;
  }
}
