/* Protect PDF - #3d85c6 */
:root {
  --pp-brand: #3d85c6;
  --pp-brand-dark: #2c6396;
  --pp-brand-light: #eaf4fb;
  --pp-brand-border: #b6d5f2;
  --pp-bg: #f4f8fc;
  --pp-surface: rgba(255, 255, 255, 0.92);
  --pp-solid: #ffffff;
  --pp-text: #1a1a1a;
  --pp-muted: #64748b;
  --pp-warn-bg: #fffbeb;
  --pp-success: #15803d;
  --pp-success-bg: #dcfce7;
  --pp-shadow: 0 14px 40px rgba(61, 133, 198, 0.15);
  --pp-radius: 18px;
  --pp-font: 'DM Sans', system-ui, sans-serif;
}

#tool-main {
  font-family: var(--pp-font);
  color: var(--pp-text);
  background: var(--pp-bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(61, 133, 198, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(91, 163, 224, 0.1), transparent);
  padding-bottom: 32px;
}

.pp-wrap { max-width: 640px; margin: 0 auto; padding: 16px; }
.pp-hero { text-align: center; margin-bottom: 20px; }
.pp-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--pp-brand);
  margin: 0 0 8px;
}
.pp-hero p { color: var(--pp-muted); font-size: 0.92rem; margin: 0 auto 10px; max-width: 520px; }
.pp-trust {
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pp-brand-dark);
  background: var(--pp-brand-light);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--pp-brand-border);
}

.pp-glass {
  background: var(--pp-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--pp-brand-border);
  border-radius: var(--pp-radius);
  box-shadow: var(--pp-shadow);
  padding: 20px;
  margin-bottom: 16px;
}

.pp-drop {
  text-align: center;
  padding: 28px 20px;
  cursor: pointer;
  border: 2px dashed var(--pp-brand);
  transition: background 0.15s, border-color 0.15s;
}
.pp-drop:hover, .pp-drop:focus-visible, .pp-drop.is-dragover {
  background: var(--pp-brand-light);
  border-color: var(--pp-brand-dark);
  outline: none;
}
.pp-drop.has-file { padding: 16px; border-style: solid; }
.pp-drop-icon { font-size: 2.2rem; margin-bottom: 8px; }
.pp-drop h2 { font-size: 1rem; font-weight: 700; margin: 0 0 4px; color: var(--pp-brand-dark); }
.pp-drop p { font-size: 0.85rem; color: var(--pp-muted); margin: 0; }

.pp-file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--pp-solid);
  border: 1px solid var(--pp-brand-border);
  border-radius: 12px;
  margin-bottom: 14px;
  text-align: left;
}
.pp-file-icon { font-size: 1.8rem; flex-shrink: 0; }
.pp-file-meta { flex: 1; min-width: 0; }
.pp-file-name {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-file-sub { font-size: 0.78rem; color: var(--pp-muted); margin: 0; }
.pp-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  margin-top: 4px;
}
.pp-badge--locked { background: #fef3c7; color: #b45309; }
.pp-badge--open { background: var(--pp-success-bg); color: var(--pp-success); }

.pp-legal {
  font-size: 0.72rem;
  color: var(--pp-muted);
  background: var(--pp-warn-bg);
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  line-height: 1.45;
  text-align: left;
}

.pp-field { margin-bottom: 12px; text-align: left; }
.pp-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pp-brand-dark);
  margin-bottom: 6px;
}
.pp-pass-wrap { display: flex; gap: 8px; align-items: stretch; }
.pp-pass-wrap input, .pp-field input[type="password"], .pp-field input[type="text"] {
  flex: 1;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--pp-brand-border);
  font-size: 0.9rem;
  font-family: inherit;
}
.pp-pass-wrap input:focus, .pp-field input:focus {
  outline: none;
  border-color: var(--pp-brand);
  box-shadow: 0 0 0 3px rgba(61, 133, 198, 0.15);
}
.pp-hint { font-size: 0.72rem; color: var(--pp-muted); margin-top: 6px; line-height: 1.45; }

.pp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.pp-btn--primary {
  background: var(--pp-brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(61, 133, 198, 0.28);
  width: 100%;
}
.pp-btn--primary:hover:not(:disabled) { background: var(--pp-brand-dark); }
.pp-btn--ghost {
  background: var(--pp-solid);
  border: 1px solid var(--pp-brand-border);
  color: var(--pp-brand-dark);
}
.pp-btn--ghost:hover:not(:disabled) { background: var(--pp-brand-light); }
.pp-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.pp-progress { padding: 12px 0 0; text-align: left; }
.pp-progress[hidden], .pp-workspace[hidden], .pp-success[hidden] { display: none !important; }
.pp-bar { height: 6px; background: var(--pp-brand-light); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.pp-bar span { display: block; height: 100%; background: var(--pp-brand); width: 0%; transition: width 0.2s; }
.pp-progress-label { font-size: 0.82rem; font-weight: 600; color: var(--pp-brand-dark); }

.pp-success { text-align: center; scroll-margin-top: calc(var(--header-h, 72px) + 16px); }
.pp-success-icon {
  width: 48px; height: 48px; margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--pp-success-bg);
  color: var(--pp-success);
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pp-success-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--pp-muted);
  margin: 12px 0 16px;
}
.pp-success-stats strong { display: block; font-size: 1rem; color: var(--pp-text); }
.pp-success-actions { display: flex; flex-direction: column; gap: 8px; }

.pp-related {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.pp-related a {
  display: block;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--pp-brand-border);
  background: var(--pp-surface);
  text-decoration: none;
  color: inherit;
}
.pp-related a:hover { background: var(--pp-brand-light); }
.pp-related strong { display: block; font-size: 0.82rem; color: var(--pp-brand-dark); }
.pp-related span { font-size: 0.72rem; color: var(--pp-muted); }

.pp-toast {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
}
.pp-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.pp-toast--success { background: #166534; color: #fff; }
.pp-toast--warning { background: #b45309; color: #fff; }
.pp-toast--error { background: #b91c1c; color: #fff; }
