body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f6f8fa;
  color: #1f2937;
}

.container {
  max-width: 1400px;
  width: calc(100% - 48px);
  margin: 0 auto;
  padding: 32px 0;
}

.hero {
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 42px;
  margin-bottom: 8px;
}

.hero p {
  font-size: 18px;
  color: #4b5563;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.08);
}

h2 {
  margin-top: 0;
}

label {
  display: block;
  margin-top: 18px;
  margin-bottom: 8px;
  font-weight: 600;
}

label:first-child {
  margin-top: 0;
}

input,
select,
textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  margin-bottom: 16px;
}

button {
  margin-top: 16px;
  padding: 12px 18px;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

.hint {
  color: #6b7280;
  font-size: 14px;
}

.result {
  padding: 16px;
  background: #111827;
  color: #e5e7eb;
  border-radius: 8px;
  white-space: pre-wrap;
}

.score {
  font-size: 36px;
  font-weight: bold;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
  font-size: 13px;
  margin-right: 8px;
}

.history {
  border-top: 4px solid #111827;
  padding-top: 16px;
  margin-top: 12px;
}

.history-item {
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
  margin-top: 16px;
}

.history-item:first-child {
  border-top: none;
  padding-top: 0;
}

.history-item button {
  margin-top: 8px;
  background: #374151;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.section-header h2 {
  margin: 0;
  line-height: 1.2;
}

.section-header .button-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.section-header .button-row button {
  margin: 0;
}

.result-panel {
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.score-card {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
}

.score-circle {
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: #2563eb;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: bold;
}

.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 20px;
}

.metric {
  background: #eef2ff;
  color: #3730a3;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.result-box {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
}

.result-box h3 {
  margin-top: 0;
}

.result-grid .result-box {
  margin: 0;
  align-self: start;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.result-grid > .result-box {
  margin: 0;
  align-self: start;
}

.result-box + .result-grid,
.result-grid + .result-grid,
.result-grid + .result-box {
  margin-top: 24px;
}

.resume-preview {
  margin-top: 20px;
  background: #111827;
  color: #e5e7eb;
  padding: 16px;
  border-radius: 8px;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 13px;
}

@media (max-width: 800px) {
  .result-grid {
    grid-template-columns: 1fr;
  }

  .score-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

ul {
  margin-top: 8px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 20px 0;
  border-bottom: 1px solid #e5e7eb;
}

.tab {
  margin-top: 0;
  background: #e5e7eb;
  color: #374151;
  border-radius: 8px 8px 0 0;
}

.tab.active {
  background: #2563eb;
  color: white;
}

.input-panel {
  margin-top: 16px;
}

.hidden {
  display: none;
}

.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

button.danger {
  background: #dc2626;
}

button.danger:hover {
  background: #b91c1c;
}

button.secondary {
  background: #374151;
}

button.secondary:hover {
  background: #1f2937;
}

.secondary-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.secondary-link:hover {
  text-decoration: underline;
}

.top-nav {
  background: #111827;
  color: white;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  color: white;
  font-size: 20px;
  font-weight: bold;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.nav-links a {
  color: #d1d5db;
  text-decoration: none;
  font-weight: bold;
}

.nav-links a.active,
.nav-links a:hover {
  color: white;
}

.nav-links a.disabled {
  color: #6b7280;
  cursor: not-allowed;
}

.nav-card {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nav-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.12);
}

.status-pending {
  color: #dc2626;
  font-weight: bold;
  animation: blink-status 1s step-start infinite;
}

@keyframes blink-status {
  50% {
    opacity: 0.25;
  }
}

.job-match-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.job-match-left,
.job-match-right {
  min-width: 0;
}

.small-preview {
  max-height: 180px;
  font-size: 12px;
}

@media (max-width: 900px) {
  .job-match-card {
    grid-template-columns: 1fr;
  }
}

.resume-history-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.resume-history-left,
.resume-history-right {
  min-width: 0;
}

@media (max-width: 900px) {
  .resume-history-card {
    grid-template-columns: 1fr;
  }
}

.summary-toolbar {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 16px;
}

.summary-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  flex: 1;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 0;
}

.summary-actions {
  display: flex;
  gap: 8px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  align-items: center;
}

.summary-actions button {
  margin: 0;
  white-space: nowrap;
  padding: 8px 14px;
}

.summary-bar span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  padding: 6px 10px;
}

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

.filter-row input,
.filter-row select {
  height: 44px;
  box-sizing: border-box;
  margin: 0;
}

.card-details {
  margin-top: 12px;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

@media (max-width: 700px) {
  .container {
    width: calc(100% - 24px);
    padding: 20px 0;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .summary-toolbar {
    flex-direction: column;
  }

  .summary-actions {
    width: auto;
  }

  .summary-actions button {
    flex: 1;
  }
}

.resume-download-section {
  margin-bottom: 24px;
}

.nav-button {
  background: transparent;
  border: 1px solid #6b7280;
  color: #d1d5db;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  margin: 0;
  font: inherit;
  line-height: 1.2;
}

.nav-button:hover {
  color: white;
  border-color: white;
}

.auth-container {
  max-width: 640px;
}

.auth-card {
  margin-top: 48px;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 16px;
}

.interview-section {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-top: 12px;
  background: #ffffff;
}

.interview-section summary {
  cursor: pointer;
  font-weight: 700;
  padding: 12px;
  background: #f3f4f6;
  border-radius: 8px;
}

.interview-section[open] summary {
  border-bottom: 1px solid #e5e7eb;
  border-radius: 8px 8px 0 0;
}

.question-card {
  padding: 12px;
  border-top: 1px solid #e5e7eb;
}

.question-card:first-of-type {
  border-top: none;
}

.primary-button,
.secondary-button {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  box-sizing: border-box;
}

.secondary-button {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #2563eb;
  cursor: pointer;
}

.secondary-button:hover {
  background: #eff6ff;
  color: #2563eb;
}

.auth-button-separator {
  height: 24px;
}

.card-action {
  display: inline-block;
  font-weight: 700;
  color: #2563eb;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: #111827;
}

.stat-label {
  display: block;
  margin-top: 6px;
  color: #6b7280;
  font-weight: 600;
}

.recent-activity {
  border-top: 4px solid #111827;
  margin-top: 12px;
  padding-top: 12px;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #e5e7eb;
  text-decoration: none;
  color: inherit;
}

.activity-item:first-child {
  border-top: none;
}

.activity-item:hover {
  background: #f9fafb;
}

.activity-item p {
  margin: 6px 0;
}

.activity-date {
  color: #6b7280;
  font-size: 14px;
  white-space: nowrap;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 40px;
  align-items: stretch;
}

.dashboard-action-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.dashboard-action-card .card-action {
  margin-top: auto;
}

.dashboard-grid .card {
  margin-top: 0;
}

main > .card + .card,
main > .accordion-card + .accordion-card {
  margin-top: 32px;
}

@media (max-width: 900px) {
  .dashboard-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .activity-item {
    flex-direction: column;
  }

  .activity-date {
    white-space: normal;
  }
}

.accordion-card {
  padding: 0;
  overflow: hidden;
}

.accordion-card summary {
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 700;
  padding: 24px;
  list-style: none;
  background: #ffffff;
}

.accordion-card summary::-webkit-details-marker {
  display: none;
}

.accordion-card summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 10px;
  font-size: 0.9rem;
  transition: transform 0.15s ease;
}

.accordion-card[open] summary::before {
  transform: rotate(90deg);
}

.accordion-card[open] summary {
  border-bottom: 1px solid #e5e7eb;
}

.accordion-body {
  padding: 24px;
}

.error-banner {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-weight: 600;
}
