.ap {
  padding: 37px 0 120px;
  --ap-green: #99CC33;
  --ap-green-dark: #54A468;
  --ap-text: #2E363E;
  --ap-muted: #7E868E;
  --ap-line: #E2EAF2;
  --ap-soft: #F9F8F8;
  --ap-danger: #d63939;
}
.ap [hidden] {
  display: none !important;
}
.ap h2 {
  margin-bottom: 12px;
}
.ap-lead {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.5;
  max-width: 900px;
  margin: 0 0 32px;
}
.ap-lead b {
  font-weight: 600;
}
.ap-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}
.ap-main {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.ap-card {
  background: #fff;
  border: 1px solid var(--ap-line);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 12px 32px rgba(46, 54, 62, 0.06);
}
.ap-card:focus {
  outline: none;
}
.ap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 20px;
}
.ap-field--full {
  grid-column: 1 / -1;
}
.ap-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.ap-req {
  display: inline;
  color: var(--ap-danger);
}
.ap-input {
  display: block;
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid #CED6DE;
  border-radius: 8px;
  background: #fff;
  color: var(--ap-text);
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea.ap-input {
  height: auto;
  min-height: 160px;
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
}
.ap-input::placeholder {
  color: #A9B0B7;
}
.ap-input:focus {
  outline: none;
  border-color: var(--ap-green);
  box-shadow: 0 0 0 3px rgba(153, 204, 51, 0.25);
}
.ap-input[aria-invalid="true"] {
  border-color: var(--ap-danger);
  box-shadow: 0 0 0 3px rgba(214, 57, 57, 0.12);
}
.ap-hint,
.ap-error {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 6px;
}
.ap-hint {
  color: var(--ap-muted);
}
.ap-error {
  color: var(--ap-danger);
}
.ap-error:empty {
  display: none;
}
.ap-alert {
  margin-bottom: 24px;
  padding: 14px 16px;
  border-left: 4px solid var(--ap-danger);
  border-radius: 8px;
  background: #FDECEC;
  color: #9F2424;
  font-size: 14px;
  line-height: 1.5;
}

.ap-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 26px 20px;
  border: 2px dashed #C9DE9A;
  border-radius: 10px;
  background: rgba(153, 204, 51, 0.05);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.ap-drop:hover,
.ap-drop.is-over {
  border-color: var(--ap-green);
  background: rgba(153, 204, 51, 0.12);
}
.ap-drop:focus-within {
  border-color: var(--ap-green);
  box-shadow: 0 0 0 3px rgba(153, 204, 51, 0.3);
}
.ap-drop.is-full {
  opacity: 0.55;
  cursor: not-allowed;
}
.ap-drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.ap-drop-title {
  font-size: 15px;
  font-weight: 600;
}
.ap-drop-title u {
  color: var(--ap-green-dark);
  text-decoration-color: rgba(84, 164, 104, 0.4);
  text-underline-offset: 3px;
}
.ap-drop-sub {
  font-size: 12px;
  color: var(--ap-muted);
}
.ap-files {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.ap-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 10px;
  border-radius: 8px;
  background: var(--ap-soft);
}
.ap-file-ext {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--ap-green);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.ap-file-info {
  display: block;
  flex: 1;
  min-width: 0;
}
.ap-file-name {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ap-file-size {
  display: block;
  font-size: 12px;
  color: var(--ap-muted);
}
.ap-file-remove {
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ap-muted);
  font-size: 22px;
  line-height: 1;
}
.ap-file-remove:hover,
.ap-file-remove:focus-visible {
  background: #ECEEF0;
  color: var(--ap-danger);
}
.ap-files-total {
  margin-top: 8px;
}

.ap-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  cursor: pointer;
}
.ap-check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--ap-green-dark);
}
.ap-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ap-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #EEF1F4;
}
.ap-actions-note {
  margin: 0;
  font-size: 13px;
  color: var(--ap-muted);
}
.ap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 30px;
  border: 2px solid var(--ap-green);
  border-radius: 8px;
  background: var(--ap-green);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.ap-btn:hover,
.ap-btn:focus-visible {
  border-color: var(--ap-green-dark);
  background: var(--ap-green-dark);
  color: #fff;
}
.ap-btn:focus-visible {
  outline: 3px solid rgba(153, 204, 51, 0.4);
  outline-offset: 2px;
}
.ap-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
.ap-btn--ghost {
  background: #fff;
  color: var(--ap-green-dark);
}
.ap-progress {
  flex: 1 1 100%;
}
.ap-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #EEF1F4;
}
.ap-progress-bar {
  width: 0;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--ap-green), var(--ap-green-dark));
  transition: width 0.2s;
}
.ap-progress-text {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ap-muted);
}

.ap-success {
  text-align: center;
  padding: 48px 32px;
}
.ap-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(153, 204, 51, 0.16);
}
.ap-success h3,
.ap-result h3 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.3;
}
.ap-success p {
  max-width: 520px;
  margin: 0 auto 10px;
  font-size: 15px;
  line-height: 1.55;
}
.ap-number {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  margin: 18px 0 20px;
  padding: 14px 18px;
  border: 2px dashed var(--ap-green);
  border-radius: 10px;
  background: rgba(153, 204, 51, 0.06);
}
.ap-number-label {
  display: block;
  font-size: 12px;
  color: var(--ap-muted);
  text-align: left;
}
.ap-number-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.ap-number .ap-btn {
  min-height: 44px;
  padding: 0 18px;
  font-size: 14px;
}
.ap-success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.ap-aside {
  display: grid;
  gap: 20px;
  position: sticky;
  top: 20px;
}
.ap-status-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #54A468, #76B957);
  color: #fff;
  box-shadow: 0 12px 28px rgba(84, 164, 104, 0.22);
  transition: transform 0.2s, box-shadow 0.2s;
}
.ap-status-card:hover,
.ap-status-card:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(84, 164, 104, 0.3);
}
.ap-status-card:focus-visible {
  outline: 3px solid rgba(153, 204, 51, 0.45);
  outline-offset: 3px;
}
.ap-status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
.ap-status-copy,
.ap-status-copy span,
.ap-status-copy strong,
.ap-status-copy small {
  display: block;
}
.ap-status-copy span {
  margin-bottom: 3px;
  font-size: 12px;
  opacity: 0.86;
}
.ap-status-copy strong {
  font-size: 18px;
  line-height: 1.25;
}
.ap-status-copy small {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.35;
  opacity: 0.82;
}
.ap-status-arrow {
  flex: none;
}
.ap-aside h3 {
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
}
.ap-steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ap-step {
  display: flex;
  gap: 14px;
  font-size: 14px;
  line-height: 1.45;
}
.ap-step-num {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ap-green);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.ap-step b {
  display: block;
  font-weight: 600;
}
.ap-note {
  padding: 20px;
  border-radius: 12px;
  background: var(--ap-soft);
  font-size: 13px;
  line-height: 1.55;
  color: #5A636B;
}
.ap-note p {
  margin: 0 0 8px;
}
.ap-note p:last-child {
  margin-bottom: 0;
}
.ap-note a {
  color: var(--ap-green-dark);
  font-weight: 600;
}
.ap-phone {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ap-text) !important;
}

.ap-result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #EEF1F4;
}
.ap-result-head h3 {
  margin: 0;
  font-size: 20px;
  word-break: break-all;
}
.ap-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.ap-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ap-tl-item {
  position: relative;
  padding: 0 0 22px 34px;
}
.ap-tl-item::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 20px;
  bottom: 2px;
  width: 2px;
  background: var(--ap-line);
}
.ap-tl-item:last-child {
  padding-bottom: 0;
}
.ap-tl-item:last-child::before {
  display: none;
}
.ap-tl-dot {
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #fff;
}
.ap-tl-item.is-current .ap-tl-dot {
  box-shadow: 0 0 0 4px #fff, 0 0 0 7px rgba(153, 204, 51, 0.25);
}
.ap-tl-status {
  display: block;
  font-size: 16px;
  font-weight: 600;
}
.ap-tl-date {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--ap-muted);
}

@media screen and (max-width: 1000px) {
  .ap-layout {
    grid-template-columns: 1fr;
  }
  .ap-aside {
    position: static;
  }
}
@media screen and (max-width: 680px) {
  .ap {
    padding-bottom: 70px;
  }
  .ap-lead {
    font-size: 16px;
  }
  .ap-grid {
    grid-template-columns: 1fr;
  }
  .ap-card {
    padding: 22px 16px;
    border-radius: 10px;
  }
  .ap-success {
    padding: 32px 16px;
  }
  .ap-actions .ap-btn,
  .ap-success-actions .ap-btn {
    width: 100%;
  }
  .ap-number-value {
    font-size: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ap * {
    transition: none !important;
  }
}
