:root {
    --ds-bg: #F7F6F3;
    --ds-text: #111111;
    --ds-accent: #8B0000;
    --ds-success: #5C7F6E;
    --ds-warning: #A67C52;
    --ds-surface: #FFFFFF;
}

/* RESET */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--ds-bg);
    color: var(--ds-text);
    font-size: 16px;
    line-height: 1.6; /* FIXED */
}

/* TYPOGRAPHY */
h1 {
    font-size: 32px;
    line-height: 40px;
    margin: 0;
    font-weight: 700;
}

h2 {
    font-size: 24px;
    margin-bottom: 16px; /* aligned to spacing scale */
}

p {
    margin: 0;
    max-width: 720px; /* REQUIRED */
}

.ds-lead {
    margin-bottom: 16px;
}

/* LAYOUT */
.ds-shell {
    min-height: 100vh;
}

.ds-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 16px;
}

/* HEADER */
.ds-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08); /* FIXED */
    background: var(--ds-surface);
}

.ds-header__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* NAV */
nav {
    display: flex;
    gap: 24px;
}

nav a {
    font-weight: 600;
    position: relative;
    padding-bottom: 4px;
    text-decoration: none;
    color: var(--ds-text);
}

/* SUBTLE HOVER (ALLOWED) */
nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background: var(--ds-accent);
    transition: width 0.2s ease;
}

nav a:hover::after {
    width: 100%;
}

.ds-card h3 {
    margin-bottom: 8px;
}

.ds-card p {
    color: #555;
    margin: 4px 0;
}

.ds-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    margin-right: 8px;
}

.ds-btn--primary {
    background: #8B0000;
    color: white;
    border: none;
}

/* SECONDARY BUTTON */
.ds-btn--secondary {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

nav a.active::after {
    width: 100%;
}

.ds-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ds-form input {
    padding: 8px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 8px;
}
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 400px;
}

#closeModal {
  float: right;
  cursor: pointer;
  font-size: 20px;
}

body.dark {
    --ds-bg: #0f172a;
    --ds-text: #e5e7eb;
    --ds-surface: #1e293b;
    --ds-accent: #ef4444;
    background: #0b1a2b;
    color: #ffffff;
}

/* RESET */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--ds-bg);
    color: var(--ds-text);
    font-size: 16px;
    line-height: 1.6; /* FIXED */
    transition: background 0.2s, color 0.3s;
}

/* TYPOGRAPHY */
h1 {
    font-size: 32px;
    line-height: 40px;
    margin: 0;
    font-weight: 700;
}

h2 {
    font-size: 24px;
    margin-bottom: 16px; /* aligned to spacing scale */
}

p {
    margin: 0;
    max-width: 720px; /* REQUIRED */
}

.ds-lead {
    margin-bottom: 16px;
}

/* LAYOUT */
.ds-shell {
    min-height: 100vh;
}

/* SECTION SPACING */
section.ds-card {
  padding: 24px;
  border-radius: 18px;
}

/* HEADER */
.ds-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08); /* FIXED */
    background: var(--ds-surface);
}

.ds-header__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* NAV */
nav {
    display: flex;
    gap: 24px;
}

nav a {
    font-weight: 600;
    position: relative;
    padding-bottom: 4px;
    text-decoration: none;
    color: var(--ds-text);
}

/* SUBTLE HOVER (ALLOWED) */
nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background: var(--ds-accent);
    transition: width 0.2s ease;
}

nav a:hover::after {
    width: 100%;
}
#job-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 20px;
}

.ds-card {
  background: #1e293b;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.25s ease;
  color: #e6edf3;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: auto;
}

.ds-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ds-card h3 {
  font-size: 18px;
  margin-bottom: 6px;
  color: #f1f5f9;
}

.ds-card p {
  font-size: 13px;
  color: #cbd5e1;
  margin: 3px 0;
}

.ds-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.08);
  color: var(--ds-text);
  cursor: pointer;
  font-size: 13px;
}

.ds-btn:hover {
  background: rgba(255,255,255,0.15);
}

.ds-btn--primary {
    background: #8B0000;
    color: white;
    border: none;
}

/* SECONDARY BUTTON */
.ds-btn--secondary {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

nav a.active::after {
    width: 100%;
}

.ds-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ds-form input {
    padding: 8px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 8px;
}
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.hidden {
  display: none;
}

.modal-content {
  background: var(--ds-surface);
  color: var(--ds-text);
  padding: 24px;
  border-radius: 16px;
  width: 420px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

#closeModal {
  float: right;
  cursor: pointer;
  font-size: 20px;
}
/* DARK MODE BUTTON FIX */
body.dark .ds-btn {
    background: #334155;
    color: #e5e7eb;
    border: 1px solid #475569;
}

body.dark .ds-card {
  background: #1e2a3a;
  color: #ffffff;
}

body.dark input,
body.dark select {
  background: #0f2235;
  color: #fff;
  border: 1px solid #2c3e50;
}

body.dark .ds-btn:hover {
    background: #475569;
}
/* KEEP APPLY BUTTON SAME IN DARK MODE */
body.dark .ds-btn--primary {
    background: #8B0000;
    color: white;
    border: none;
}
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 25px;
}

.filters input,
.filters select {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--ds-text);
}

button:last-child:hover {
    opacity: 0.9;
}

/* MATCH SCORE BADGES */
.match {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  margin-top: 6px;
  background: rgba(255,255,255,0.08);
  color: #e2e8f0;
}

.match.green {
  background: var(--ds-success);
  color: white;
}

.match.amber {
  background: var(--ds-warning);
  color: white;
}

.match.neutral {
  background: #ddd;
  color: #333;
}

.match.grey {
  background: #eee;
  color: #666;
}
/* FIX MODAL TEXT IN DARK MODE */
body.dark .modal-content {
  background: #1e293b;
  color: #e5e7eb;
}

body.dark .modal-content p,
body.dark .modal-content h2 {
  color: #e5e7eb;
}

/* FIX TEXT VISIBILITY IN DARK MODE */
body.dark .ds-card p {
  color: #cbd5e1;
}

body.dark .ds-card h3 {
  color: #f1f5f9;
}

/* MATCH BADGE UPGRADE */
.match {
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.1);
}

/* HIGH MATCH */
.match.green {
  background: rgba(92,127,110,0.2);
  color: #86efac;
}

/* MEDIUM */
.match.amber {
  background: rgba(166,124,82,0.2);
  color: #facc15;
}

/* LOW */
.match.neutral {
  background: rgba(255,255,255,0.08);
  color: #cbd5e1;
}

/* VERY LOW */
.match.grey {
  background: rgba(255,255,255,0.05);
  color: #64748b;
}

.status {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
}

.status.not-applied { color: #94a3b8; }
.status.applied { color: #60a5fa; }
.status.rejected { color: #ef4444; }
.status.selected { color: #22c55e; }

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #1e293b;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
}

/* FIX STATUS BUTTON LAYOUT */
/* BUTTON GROUP CLEAN ALIGNMENT */
/* ONLY BUTTON GROUPS */
.button-group {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* SMALL BUTTON STYLE */
.ds-card div button {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.08);
  color: white;
  cursor: pointer;
}

/* ACTIVE STATE (OPTIONAL - NICE TOUCH) */
.ds-card .status.applied { color: #60a5fa; }
.ds-card .status.rejected { color: #ef4444; }
.ds-card .status.selected { color: #22c55e; }

/* UNIFIED BUTTON STYLE */
.ds-card button {
  padding: 6px 12px;
  border-radius: 8px;
  background: #334155;
  color: #e2e8f0;
  border: none;
  font-size: 12px;
}

.ds-card button:hover {
  background: #475569;
}

.apply-btn {
  background: #dc2626;
  color: white;
}

.apply-btn:hover {
  background: #b91c1c;
}

/* ACTIVE STATUS BUTTON */
.ds-card button.active {
  background: #334155;
  color: white;
}

.empty-state {
  max-width: 400px;
  margin: auto;
  text-align: center;
}

.empty-state-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
}