:root {
  --color-primary: #0b2545; /* deep navy */
  --color-accent: #ff6b35; /* bright orange */
  --color-bg: #f8f9fa; /* soft light gray */
  --color-text: #1b1b1b; /* charcoal */
  --color-muted: #667085;
  --radius: 20px;
  --card-shadow: 0 10px 30px rgba(11, 18, 40, 0.06),
    0 4px 12px rgba(11, 18, 40, 0.04);
  --transition: all 0.28s cubic-bezier(0.2, 0.9, 0.2, 1);
}

/* Inline details for results table rows */
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.results-table th,
.results-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}
.results-table tbody tr.details-row td {
  background: #fafafa;
  padding: 14px 12px;
}
.details-inner {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.details-col {
  min-width: 160px;
  flex: 1 1 220px;
}
.detail-exp,
.detail-edu {
  margin-bottom: 6px;
}
.toggle-details {
  margin-left: 8px;
}

/* Base */
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: "Poppins", "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    Arial, sans-serif;
  background: linear-gradient(180deg, var(--color-bg), #ffffff 100%);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* Header */
.site-header {
  background: transparent;
  padding: 18px 24px 0 24px;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Results table for multiple uploads */
.results-table-wrapper {
  margin-top: 14px;
}
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.results-table thead th {
  text-align: left;
  padding: 10px 8px;
  background: rgba(11, 37, 69, 0.02);
  color: var(--color-primary);
  font-weight: 700;
}
.results-table tbody td {
  padding: 10px 8px;
  border-top: 1px solid rgba(11, 37, 69, 0.04);
  color: var(--color-text);
}
.results-table tbody tr:hover {
  background: rgba(11, 37, 69, 0.02);
}
.results-table .view-info-row {
  padding: 8px 10px;
  border-radius: 10px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  background: linear-gradient(
    135deg,
    var(--color-primary),
    rgba(11, 37, 69, 0.9)
  );
}
.brand-text strong {
  display: block;
  color: var(--color-primary);
  font-size: 18px;
}
.brand-text small {
  display: block;
  color: var(--color-muted);
  font-size: 12px;
}
.nav {
  display: flex;
  gap: 12px;
}
.nav-link {
  color: var(--color-primary);
  text-decoration: none;
  padding: 8px;
  border-radius: 10px;
  font-weight: 600;
}
.nav-link:hover {
  background: rgba(11, 37, 69, 0.06);
  text-decoration: underline;
}
.header-wave svg {
  display: block;
  width: 100%;
  height: 70px;
}

/* Main layout */
.main {
  max-width: 1100px;
  margin: -12px auto 48px;
  padding: 0 20px;
}
.layout {
  display: block; /* single column layout: upload card only */
  gap: 0;
}

/* Card styles */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  position: relative;
}
.card-inner {
  padding: 22px;
}
.card-title {
  margin: 0 0 8px 0;
  color: var(--color-primary);
  font-size: 20px;
}
.muted {
  color: var(--color-muted);
  font-size: 14px;
  margin-bottom: 14px;
}

/* Form */
.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--color-primary);
}
.file-row input[type="file"] {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(11, 37, 69, 0.08);
  background: linear-gradient(
    180deg,
    rgba(11, 37, 69, 0.02),
    rgba(11, 37, 69, 0.01)
  );
  cursor: pointer;
}
.job-default {
  width: 100%;
  min-height: 132px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(11, 37, 69, 0.06);
  background: linear-gradient(180deg, #fff, #fbfcfd);
  color: var(--color-text);
  resize: vertical;
  transition: var(--transition);
}
.job-default:focus {
  outline: none;
  box-shadow: 0 8px 24px rgba(11, 37, 69, 0.06);
  border-color: rgba(11, 37, 69, 0.12);
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}
.status {
  color: var(--color-muted);
  font-size: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 600;
  transition: var(--transition);
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(11, 37, 69, 0.08);
}
.btn-primary:hover {
  filter: brightness(1.04);
  transform: translateY(-2px);
}
.btn-accent {
  background: var(--color-accent);
  color: #fff;
}

/* Small utility for the table action button matching the screenshot (orange pill) */
.view-info-btn {
  background: var(--color-accent);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.12);
}
.view-info-btn:hover {
  transform: translateY(-1px);
}

/* Resume view */
.resume-view {
  min-height: 160px;
  background: linear-gradient(180deg, #ffffff, #fbfbfd);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid rgba(11, 37, 69, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.rv-header h2 {
  margin: 0;
  color: var(--color-primary);
  font-size: 18px;
}
.rv-contact {
  margin-top: 6px;
  color: var(--color-muted);
}
.rv-section {
  margin-top: 16px;
}
.rv-section h3 {
  margin: 0 0 8px 0;
  color: var(--color-primary);
  font-size: 15px;
}
.rv-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rv-skill {
  background: linear-gradient(
    90deg,
    rgba(11, 37, 69, 0.04),
    rgba(255, 107, 53, 0.04)
  );
  color: var(--color-primary);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
}
.rv-exp-item,
.rv-edu-item {
  margin-bottom: 10px;
}
.rv-duration {
  color: var(--color-muted);
  font-size: 13px;
}
.rv-eligible {
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 8px;
}

/* Footer */
.site-footer {
  padding: 20px 24px;
  background: transparent;
  margin-top: 18px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  color: var(--color-muted);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .main {
    margin-top: 8px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0 8px;
  }
  .brand-text strong {
    font-size: 16px;
  }
  .card-inner {
    padding: 16px;
  }
  .job-default {
    min-height: 96px;
  }
  .btn {
    width: 100%;
  }
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Utility */
.hidden {
  display: none !important;
}
input:focus,
textarea:focus,
button:focus {
  outline: 3px solid rgba(11, 37, 69, 0.08);
  outline-offset: 2px;
}
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Small decorative accent for cards */
.card::before {
  content: "";
  position: absolute;
  inset: -40% -40% auto auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 107, 53, 0.06),
    transparent 40%
  );
  border-radius: 50%;
  pointer-events: none;
  transform: translate(20px, -20px);
}

/* Button spinner */
.btn .spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  animation: spin 0.9s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

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

/* Skeleton loading styles for resume view */
.rv-skeleton {
  display: block;
  animation: pulse 1.2s ease-in-out infinite;
}
.rv-skeleton .skeleton-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.skeleton-avatar {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    rgba(11, 37, 69, 0.06),
    rgba(11, 37, 69, 0.03)
  );
}
.skeleton-lines {
  flex: 1;
}
.skeleton-line {
  height: 12px;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    rgba(11, 37, 69, 0.06),
    rgba(11, 37, 69, 0.02)
  );
  margin-bottom: 8px;
}
.rv-skeleton .skeleton-section {
  margin-top: 12px;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.65;
  }
  100% {
    opacity: 1;
  }
}

/* Result card polish */
.result-card.card {
  margin: 18px auto 0;
  max-width: 1100px;
}
.result-card .card-inner {
  padding: 20px;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.result-card.card {
  border-left: 4px solid rgba(11, 37, 69, 0.04);
}
.result-card.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(11, 18, 40, 0.06);
}

/* Smaller tweaks for resume sections */
.rv-section {
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.rv-section.hidden {
  opacity: 0;
  transform: translateY(6px);
}

/* Condensed resume row (name, eligibility, view info button) */
.rv-condensed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(11, 37, 69, 0.02),
    rgba(255, 255, 255, 0)
  );
  border: 1px solid rgba(11, 37, 69, 0.03);
}
.rv-condensed-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rv-name {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 16px;
}
.rv-eligible-inline {
  font-size: 13px;
  color: var(--color-muted);
}
.rv-condensed-actions {
  display: flex;
  align-items: center;
}

/* Modal styles (simple, responsive) */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}
.modal.hidden {
  display: none;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 40, 0.45);
}
.modal-dialog {
  position: relative;
  z-index: 1201;
  width: min(920px, calc(100% - 40px));
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(11, 18, 40, 0.2);
  padding: 18px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.modal-body {
  font-size: 14px;
  color: var(--color-text);
}
.modal-section {
  margin-top: 10px;
}
.modal-exp {
  margin-bottom: 8px;
}
.modal-edu {
  margin-bottom: 6px;
}

@media (max-width: 640px) {
  .rv-condensed {
    flex-direction: column;
    align-items: stretch;
  }
  .modal-dialog {
    width: calc(100% - 20px);
    padding: 12px;
  }
}
