﻿.ntr-app {
  display: flex;
  flex-direction: column;
  gap: 28px;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  color: #111;
}

.ntr-panel {
  background: #f7f7f7;
  border: 1px solid #d5d9df;
  border-radius: 14px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.ntr-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.ntr-panel-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ntr-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ntr-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #c4cbd6;
  background: #fff;
  color: #0f172a;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  vertical-align: middle;
}

.ntr-menu-btn.is-open {
  background: #08386d;
  color: #fff;
  border-color: #08386d;
}

.ntr-menu-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 20;
}

.ntr-menu-popover {
  position: absolute;
  top: 64px;
  right: 18px;
  width: min(360px, calc(100% - 36px));
  background: #ffffff;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
  padding: 12px;
  display: grid;
  gap: 10px;
  z-index: 30;
}

.ntr-menu-popover-bottom {
  top: auto;
  right: 0;
  bottom: calc(100% + 8px);
  width: min(360px, 100%);
  z-index: 31;
}

.ntr-menu-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ntr-menu-close {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c4cbd6;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  line-height: 1;
  padding: 0;
  font-size: 18px;
  vertical-align: middle;
}

.ntr-menu-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ntr-ai-instruction p {
  margin: 0;
  color: #334155;
  line-height: 1.45;
}

.ntr-ai-translate {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  position: relative;
}

.ntr-ai-translate-btn {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #08386d, #0ea5e9);
  color: #fff;
  font-weight: 700;
  padding: 12px 16px;
  cursor: pointer;
}

.ntr-ai-pdf-btn {
  background: #08386d;
}

.ntr-ai-translate-btn:disabled {
  opacity: 0.75;
  cursor: progress;
}

.ntr-ai-translating .ntr-sections,
.ntr-ai-translating .ntr-panel-header {
  filter: blur(2px);
  pointer-events: none;
  animation: ntrAiBlur 1.4s ease-in-out infinite;
}

.ntr-ai-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 146, 70, 0.22), rgba(255, 255, 255, 0.2), rgba(206, 43, 55, 0.22));
  background-size: 220% 220%;
  animation: ntrAiMove 2.2s linear infinite;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px 18px;
  z-index: 40;
}

.ntr-ai-status-btn {
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  padding: 12px 18px;
  font-weight: 700;
  cursor: progress;
  pointer-events: none;
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.35);
  max-width: min(720px, 100%);
  text-align: center;
}

@keyframes ntrAiMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes ntrAiBlur {
  0% { filter: blur(1.7px); }
  50% { filter: blur(2.8px); }
  100% { filter: blur(1.7px); }
}

.ntr-panel-header h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.02em;
}

.ntr-panel-header p {
  margin: 6px 0 0;
  color: #4a5562;
}

.ntr-panel button {
  height: 45px;
  border: 0;
  border-radius: 8px;
  background: #08386d;
  color: #fff;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

.ntr-sections {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.ntr-section {
  border: 1px solid #d7dbe2;
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.ntr-section h3 {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #374151;
}

.ntr-section-hint {
  margin: -4px 0 10px;
  font-size: 12px;
  line-height: 1.35;
  color: #64748b;
}

.ntr-section-help {
  margin: -6px 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
}

.ntr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.ntr-grid-onecol {
  grid-template-columns: 1fr;
}

.ntr-field {
  display: grid;
  gap: 4px;
}

.ntr-field span {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.ntr-grid input,
.ntr-grid textarea,
.ntr-grid select {
  width: 100%;
  border: 1px solid #cdd3db;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 14px;
}

.ntr-grid textarea {
  min-height: 92px;
  resize: vertical;
}

.ntr-full {
  grid-column: 1 / -1;
}

.ntr-list,
.ntr-stack {
  display: grid;
  gap: 8px;
}

.ntr-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ntr-inline input {
  flex: 1;
}

.ntr-small {
  width: 90px;
}

.ntr-remove {
  border: 1px solid #c4cbd6;
  background: #edf1f6;
  color: #1f2937;
}

.ntr-add {
  border: 1px dashed #7f8a99;
  background: #fff;
  color: #111;
}

.ntr-card {
  border: 1px solid #d7dbe2;
  border-radius: 8px;
  padding: 10px;
  background: #fafbfc;
}

.ntr-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.ntr-photo-editor-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 9999;
}

.ntr-photo-editor {
  width: min(460px, 100%);
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.ntr-photo-editor h4 {
  margin: 0;
  font-size: 16px;
}

.ntr-photo-help {
  margin: 0;
  font-size: 13px;
  color: #475569;
}

.ntr-photo-crop-area {
  width: 320px;
  height: 320px;
  max-width: 100%;
  margin: 0 auto;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #e5e7eb;
  cursor: grab;
  touch-action: none;
}

.ntr-photo-crop-area.is-dragging {
  cursor: grabbing;
}

.ntr-photo-crop-area::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.36);
  border: 2px solid rgba(255, 255, 255, 0.92);
  pointer-events: none;
}

.ntr-photo-crop-image {
  position: absolute;
  left: 50%;
  top: 50%;
  user-select: none;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center;
}

.ntr-photo-editor label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.ntr-photo-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.ntr-preview {
  --ntr-primary: #08386d;
  --ntr-sidebar: #e9e9e9;
  --ntr-text: #111;
  --ntr-sidebar-width: 285px;
  --ntr-left-gap: 22px;
  --ntr-right-gap: 22px;
  --ntr-name-size: 50px;
  --ntr-role-size: 18px;
  --ntr-section-size: 18px;
  --ntr-item-title-size: 17px;
  --ntr-body-size: 15px;
  position: relative;
  overflow: hidden;
  width: 210mm;
  min-height: 297mm;
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
  display: grid;
  grid-template-columns: var(--ntr-sidebar-width) 1fr;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

.ntr-preview::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 430px;
  height: 170px;
  background: var(--ntr-primary);
  clip-path: polygon(0 0, 100% 0, 57% 100%, 0 100%);
  z-index: 0;
}

.ntr-preview aside,
.ntr-preview main {
  position: relative;
  z-index: 1;
}

.ntr-preview aside {
  background: var(--ntr-sidebar);
  padding: 24px 26px 24px 30px;
}

.ntr-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  background: #d3d8dd;
  margin: 8px 0 28px;
  border: 4px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ntr-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ntr-photo span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #475569;
  font-weight: 600;
}

.ntr-preview aside h3,
.ntr-preview main section h3 {
  margin: 0 0 10px;
  padding-bottom: 5px;
  border-bottom: 2px solid #1b1b1b;
  font-family: "Arial Narrow", "Segoe UI", Arial, sans-serif;
  font-size: var(--ntr-section-size);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ntr-preview aside h3 {
  margin: 0 0 10px;
}

.ntr-preview aside .ntr-side-block + .ntr-side-block {
  margin-top: var(--ntr-left-gap);
}

.ntr-preview main .ntr-main-block + .ntr-main-block {
  margin-top: var(--ntr-right-gap);
}

.ntr-preview aside ul {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: var(--ntr-body-size);
  line-height: 1.45;
}

.ntr-preview aside li {
  margin-bottom: 3px;
}

.ntr-contacts {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.ntr-preview aside .ntr-contacts {
  padding-left: 0;
  margin-left: 0;
}

.ntr-contacts li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: var(--ntr-body-size);
}

.ntr-icon {
  width: 16px;
  display: inline-block;
  text-align: center;
  font-weight: 700;
}

.ntr-languages {
  margin-top: 6px;
}

.lang {
  display: block;
  margin-bottom: 7px;
  font-size: var(--ntr-body-size);
}

.lang span {
  display: block;
  margin-bottom: 4px;
}

.lang div {
  height: 12px;
  border-radius: 999px;
  background: #c9d2df;
  overflow: hidden;
}

.lang i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--ntr-primary);
}

.ntr-preview main {
  background: #fff;
  padding: 34px 30px 28px;
}

.ntr-preview main::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 130px;
  background: #cfd7e3;
  clip-path: polygon(0 22%, 100% 0, 100% 100%, 0 72%);
  z-index: -1;
}

.ntr-preview header {
  text-align: right;
  margin-bottom: 50px;
  padding-right: 6px;
}

.ntr-preview header h1 {
  margin: 0;
  font-family: "Arial Narrow", "Segoe UI", Arial, sans-serif;
  font-size: var(--ntr-name-size);
  letter-spacing: 0.01em;
}

.ntr-preview header h2 {
  margin: 6px 0 0;
  font-family: "Arial Narrow", "Segoe UI", Arial, sans-serif;
  font-size: var(--ntr-role-size);
  letter-spacing: 0.01em;
}

.ntr-preview section {
  margin-bottom: 0;
}

.ntr-preview main p {
  margin: 0;
  font-size: var(--ntr-body-size);
  line-height: 1.45;
}

.ntr-preview article {
  margin-bottom: 16px;
}

.ntr-preview h4 {
  margin: 0 0 3px;
  font-family: "Arial Narrow", "Segoe UI", Arial, sans-serif;
  font-size: var(--ntr-item-title-size);
}

.ntr-meta {
  margin: 0;
  font-size: var(--ntr-body-size);
}

.ntr-meta strong {
  font-style: italic;
  font-weight: 700;
}

.ntr-preview main ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.ntr-preview main li {
  margin: 4px 0;
  font-size: var(--ntr-body-size);
  line-height: 1.35;
}

@media (max-width: 980px) {
  .ntr-preview {
    grid-template-columns: 1fr;
  }

  .ntr-preview::before {
    width: 100%;
    height: 110px;
  }

  .ntr-photo {
    margin-left: auto;
    margin-right: auto;
  }

  .ntr-preview header {
    text-align: left;
    margin-top: 10px;
  }
}

.ntr-preview.ntr-export-mode {
  width: 210mm !important;
  min-height: 297mm !important;
  grid-template-columns: var(--ntr-sidebar-width) 1fr !important;
  margin: 0 !important;
  box-shadow: none !important;
  max-width: 210mm !important;
}

.ntr-preview.ntr-export-mode::before {
  width: 430px !important;
  height: 170px !important;
}

.ntr-preview.ntr-export-mode .ntr-photo {
  margin: 8px 0 28px !important;
}

.ntr-preview.ntr-export-mode header {
  text-align: right !important;
  margin-top: 0 !important;
  margin-bottom: 50px !important;
}

.ntr-preview-gate {
  border: 1px dashed #c8d1dc;
  background: #f8fafc;
  border-radius: 12px;
  padding: 22px;
  color: #334155;
  font-weight: 600;
  text-align: center;
}

.ntr-toast-wrap {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
}

.ntr-toast {
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.26);
  max-width: min(420px, calc(100vw - 36px));
}

.ntr-toast-success {
  background: #0b7a2d;
}

.ntr-toast-error {
  background: #b91c1c;
}

.ntr-toast-info {
  background: #1e3a8a;
}

/* Scope hardening: isolate resume styles from theme/plugin CSS */
#nexttools-resume-generator-root,
#nexttools-resume-generator-root * {
  box-sizing: border-box;
}

#nexttools-resume-generator-root .ntr-app {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif !important;
  color: #111 !important;
  line-height: normal;
}

#nexttools-resume-generator-root .ntr-preview,
#nexttools-resume-generator-root .ntr-preview * {
  font-family: "Arial", "Helvetica Neue", "Segoe UI", sans-serif !important;
  font-variant-ligatures: none !important;
  letter-spacing: normal !important;
  word-spacing: normal !important;
  line-height: normal;
  color: inherit;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

#nexttools-resume-generator-root .ntr-preview aside ul,
#nexttools-resume-generator-root .ntr-preview main ul {
  list-style: disc outside !important;
  list-style-image: none !important;
  margin: 8px 0 0 !important;
  padding-left: 20px !important;
}

#nexttools-resume-generator-root .ntr-preview aside li,
#nexttools-resume-generator-root .ntr-preview main li {
  list-style-type: disc !important;
  list-style-image: none !important;
}

#nexttools-resume-generator-root .ntr-preview .ntr-contacts,
#nexttools-resume-generator-root .ntr-preview .ntr-contacts li {
  list-style: none !important;
  list-style-image: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

#nexttools-resume-generator-root .ntr-preview .ntr-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  line-height: 1 !important;
}

#nexttools-resume-generator-root .ntr-preview .ntr-icon svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}

#nexttools-resume-generator-root .ntr-preview h1,
#nexttools-resume-generator-root .ntr-preview h2,
#nexttools-resume-generator-root .ntr-preview h3,
#nexttools-resume-generator-root .ntr-preview h4,
#nexttools-resume-generator-root .ntr-preview p {
  margin-top: 0;
}
