/* Editor Layout */
.editor-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 48px;
  height: 64px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 20;
}

.editor-nav-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editor-nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.editor-tagline {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.editor-main {
  padding: 40px 48px;
  max-width: 1440px;
  margin: 0 auto;
}

.editor-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

/* Panel */
.editor-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
}

.panel-header {
  margin-bottom: 28px;
}

.panel-header h2 {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.panel-header p {
  font-size: 14px;
  color: var(--muted);
}

/* Job Form */
.job-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 28px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.label-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  color: #aaa;
}

input, textarea {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--fg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  resize: none;
  outline: none;
  width: 100%;
}

input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.12);
}

input::placeholder, textarea::placeholder {
  color: #bbb;
}

/* Buttons */
.btn-generate {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--fg);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-generate:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.btn-generate:active {
  transform: translateY(0);
}

.btn-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Job List */
.job-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.job-item {
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.job-item:hover {
  border-color: var(--accent);
}

.job-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface);
  cursor: pointer;
  gap: 12px;
}

.job-item-title {
  font-weight: 600;
  font-size: 15px;
}

.job-item-company {
  font-size: 13px;
  color: var(--muted);
}

.job-item-dates {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.job-item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-delete-job {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.btn-delete-job:hover {
  color: #c00;
  background: #fff0f0;
}

.job-item-body {
  padding: 20px;
  display: none;
}

.job-item-body.open {
  display: block;
}

.bullet-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bullet-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.bullet-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 8px;
}

.bullet-text {
  font-size: 14px;
  color: #3a3a3a;
  line-height: 1.6;
  flex: 1;
}

.bullet-edit {
  display: none;
  width: 100%;
  margin-top: 10px;
}

.job-bullets-input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--fg);
  resize: vertical;
  min-height: 80px;
  outline: none;
}

.job-bullets-input:focus {
  border-color: var(--accent);
}

.btn-save-bullets {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
}

.btn-save-bullets:hover {
  opacity: 0.9;
}

/* Sidebar Cards */
.editor-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.sidebar-card h3 {
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.sidebar-card > p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.btn-tailor {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--fg);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  margin-top: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-tailor:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.btn-tailor:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.tailor-result {
  margin-top: 20px;
  padding: 20px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.tailor-result h4 {
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.tailor-bullet {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.tailor-bullet-text {
  font-size: 14px;
  color: #3a3a3a;
  line-height: 1.55;
}

/* ATS Card */
.ats-card {
  text-align: center;
}

.ats-meter {
  margin: 24px 0 20px;
}

.ats-circle {
  position: relative;
  display: inline-block;
  width: 120px;
  height: 120px;
}

.ats-circle svg {
  width: 120px;
  height: 120px;
}

.ats-score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.ats-big {
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--fg);
}

.ats-max {
  font-size: 12px;
  color: var(--muted);
}

.ats-breakdown {
  text-align: left;
}

.label-small {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.keyword-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.keyword-tag {
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 100px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
}

.btn-score {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--fg);
  width: 100%;
  transition: background 0.15s ease;
}

.btn-score:hover {
  background: var(--border);
}

/* Export Card */
.export-card h3 {
  margin-bottom: 6px;
}

.btn-export {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  margin-top: 4px;
  transition: opacity 0.15s ease;
}

.btn-export:hover {
  opacity: 0.9;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(17, 17, 17, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.loading-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px 48px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.15);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-card p {
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--fg);
  color: #fff;
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 200;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 1024px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .editor-sidebar {
    order: -1;
  }
}

/* Upgrade Modal */
.upgrade-modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  backdrop-filter: blur(6px);
}

.upgrade-modal-card {
  background: #fff;
  border-radius: 24px;
  padding: 40px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,0.2);
}

.upgrade-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.15s;
}

.upgrade-modal-close:hover { color: var(--fg); }

.upgrade-modal-icon {
  margin: 0 auto 20px;
  width: 64px;
  height: 64px;
  background: #FEF3C7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upgrade-modal-card h2 {
  font-family: 'Sora', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--fg);
  margin-bottom: 12px;
}

.upgrade-modal-card > p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.upgrade-features {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upgrade-feature {
  font-size: 14px;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 10px;
}

.upgrade-feature span {
  color: #22c55e;
  font-size: 16px;
  font-weight: 700;
  width: 20px;
}

.upgrade-btn {
  display: block;
  background: var(--fg);
  color: #fff;
  border-radius: 12px;
  padding: 14px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
  margin-bottom: 12px;
}

.upgrade-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.upgrade-note {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 768px) {
  .editor-nav { padding: 0 24px; }
  .editor-main { padding: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .editor-panel, .sidebar-card { padding: 20px; }
}