* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
  color: #0b2545;
  background: #f4f7f8;
}

.top {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 28px 24px 22px;
}

.logo {
  display: block;
  height: 52px;
  width: auto;
}

h1 {
  margin: 18px 0 0;
  font-size: 1.75rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.lead {
  margin: 8px 0 0;
  max-width: 40rem;
  color: #475569;
  font-size: 1.02rem;
  line-height: 1.5;
}

.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  max-width: 56rem;
  padding: 24px;
}

.tool-btn {
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  text-align: left;
  color: #0b2545;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.05rem;
  cursor: pointer;
}

.tool-btn:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.hidden { display: none; }

.asap-review-add-dialog {
  border: none;
  border-radius: 18px;
  padding: 0;
  width: min(42rem, calc(100vw - 2rem));
  max-height: min(90vh, 720px);
  margin: 0;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
  color: #0b2545;
}

.asap-review-add-dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
}

.asap-review-add-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.3rem 1.35rem 1.2rem;
  max-height: min(90vh, 720px);
  overflow: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.asap-review-add-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.asap-review-add-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 650;
}

.asap-review-add-hint,
.ai-panel-copy,
.ai-drop-copy,
.ai-progress {
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.45;
}

.asap-review-add-hint,
.ai-panel-copy,
.ai-progress { margin: 0; }

.asap-review-add-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
}

.ai-drop {
  position: relative;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  padding: 1.6rem 1rem;
  text-align: center;
  cursor: pointer;
}

.ai-drop:hover,
.ai-drop.is-drag {
  border-color: #1d4ed8;
  background: #eff6ff;
}

.ai-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.ai-drop-title {
  font-weight: 750;
  margin: 0 0 0.2rem;
}

.ai-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ai-file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 0.88rem;
}

.ai-tracking-params {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-label {
  font-size: 0.85rem;
  font-weight: 650;
  color: #334155;
}

.field input {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.asap-review-add-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.btn-primary,
.btn-secondary {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  cursor: pointer;
}

.btn-primary {
  background: #1d4ed8;
  color: #fff;
  border: 1px solid #1d4ed8;
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn-secondary {
  background: #fff;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.form-message {
  margin: 0;
  font-size: 0.9rem;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
}

.form-message--error {
  color: #991b1b;
  background: #fee2e2;
}

.pdf-password-dialog { width: min(28rem, calc(100vw - 2rem)); }

.pdf-password-dialog .btn-secondary { order: 1; }

.pdf-password-dialog .btn-primary { order: 2; }

@media (max-width: 640px) {
  .ai-tracking-params { grid-template-columns: 1fr; }
  .tools { grid-template-columns: 1fr; }
}
