@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");
:root {
  --glass: rgba(15, 23, 42, 0.65);
  --glass-border: rgba(148, 163, 184, 0.2);
}

body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, rgba(14, 116, 144, 0.2), transparent 45%),
    radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.15), transparent 50%),
    #020617;
}

.glass-panel {
  background: var(--glass);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.45);
}

.btn-primary,
.btn-secondary,
.btn-accent {
  padding: 0.55rem 1rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn-primary {
  background: linear-gradient(120deg, #22d3ee, #0ea5e9);
  color: #0f172a;
}

.btn-secondary {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

.btn-accent {
  background: #f8fafc;
  color: #0f172a;
}

.input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

.pdf-page {
  position: relative;
  display: inline-block;
  width: 100%;
}

.pdf-canvas {
  display: block;
  width: 100%;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.6);
}

/* Fabric.js wraps canvas in .canvas-container div - overlay it on PDF */
.canvas-container {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 100 !important;
  pointer-events: auto !important;
}

.fabric-overlay,
.canvas-container .upper-canvas {
  border-radius: 1rem;
}

.field-input {
  position: absolute;
  border: 1px dashed rgba(56, 189, 248, 0.6);
  background: rgba(14, 165, 233, 0.15);
  color: #1e293b;
  padding: 0.25rem 0.4rem;
  font-size: 0.9rem;
  border-radius: 0.5rem;
}

.field-input input {
  color: #0f172a !important;
  font-weight: 500;
}

.signature-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #1e3a5f;
  font-weight: 600;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 9999;
}

.modal-content {
  background: #0f172a;
  border-radius: 1.25rem;
  padding: 1.5rem;
  width: min(520px, 95vw);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.tabs {
  display: flex;
  gap: 0.5rem;
}

.tab {
  flex: 1;
  padding: 0.5rem 0.8rem;
  border-radius: 0.7rem;
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}

.tab.active {
  background: #22d3ee;
  color: #0f172a;
  font-weight: 600;
}

.signature-canvas {
  width: 100%;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.95);
}

.hidden {
  display: none;
}
