:root {
  --bg: #f4efe7;
  --paper: rgba(255, 252, 247, 0.74);
  --paper-strong: #fffaf2;
  --text: #1f2520;
  --muted: #56605a;
  --line: rgba(31, 37, 32, 0.12);
  --accent: #e76f51;
  --accent-soft: #f6c8bb;
  --green: #2a9d8f;
  --gold: #e9c46a;
  --red: #c44536;
  --blue: #457b9d;
  --shadow: 0 18px 50px rgba(76, 61, 43, 0.14);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(233, 196, 106, 0.36), transparent 26%),
    radial-gradient(circle at bottom right, rgba(42, 157, 143, 0.2), transparent 22%),
    linear-gradient(160deg, #f7f3ec 0%, #efe3d2 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 32px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}

.hero-copy,
.hero-panel,
.panel {
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: var(--paper);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.hero-copy {
  border-radius: var(--radius-lg);
  padding: 18px 22px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  max-width: 13ch;
  font: 400 clamp(2rem, 3vw, 3.4rem) / 0.92 "Instrument Serif", serif;
}

.hero-text {
  max-width: 58ch;
  margin: 10px 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hero-badges span {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 250, 242, 0.72);
  border: 1px solid rgba(31, 37, 32, 0.08);
  font-size: 0.76rem;
}

.hero-panel {
  border-radius: var(--radius-lg);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat-card {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 250, 242, 0.86);
  border: 1px solid var(--line);
}

.stat-card.accent {
  background: linear-gradient(135deg, #1f2520 0%, #31423b 100%);
  color: #fffdf9;
}

.stat-card span {
  display: block;
  margin-bottom: 4px;
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 700;
  line-height: 1;
}

.stat-card p {
  margin: 0;
  color: inherit;
  font-size: 0.84rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1.2fr);
  gap: 14px;
}

.panel {
  border-radius: var(--radius-lg);
  padding: 18px;
}

.board-panel {
  padding: 18px 20px;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.86) 0%, rgba(255, 249, 241, 0.72) 100%);
}

.board-panel .section-heading h2 {
  font-size: 1.5rem;
}

.board-panel .section-kicker {
  color: rgba(31, 37, 32, 0.72);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.35rem;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.view-switch {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(31, 37, 32, 0.06);
}

.switch-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.switch-btn.is-active {
  background: var(--text);
  color: #fffdf9;
}

.application-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.application-form label,
.toolbar label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
  min-width: 0;
}

.full-width {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(231, 111, 81, 0.8);
  box-shadow: 0 0 0 5px rgba(231, 111, 81, 0.12);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn {
  border: none;
  border-radius: 999px;
  padding: 11px 15px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.danger-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  background: var(--text);
  color: #fffdf9;
}

.secondary-btn {
  background: #f0dfba;
  color: var(--text);
}

.ghost-btn {
  background: rgba(31, 37, 32, 0.06);
  color: var(--text);
}

.danger-btn {
  background: rgba(196, 69, 54, 0.12);
  color: var(--red);
}

.file-label {
  display: inline-flex;
  align-items: center;
}

#import-file,
#import-csv-file {
  display: none;
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(31, 37, 32, 0.06);
}

.search-wrap {
  min-width: 0;
}

.results-summary {
  margin-bottom: 10px;
  color: var(--muted);
  min-height: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.applications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 14px;
}

.hidden {
  display: none !important;
}

.application-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  animation: riseIn 0.45s ease both;
  min-height: 100%;
}

.card-top {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: start;
}

.company {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.position {
  margin: 0;
  font-size: 1.2rem;
}

.status-pill {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-pill[data-status="Wishlist"] {
  color: #7a5b00;
  background: rgba(233, 196, 106, 0.24);
}

.status-pill[data-status="Applied"] {
  color: #0b5a8a;
  background: rgba(69, 123, 157, 0.14);
}

.status-pill[data-status="Online Assessment"] {
  color: #6b2fb3;
  background: rgba(144, 103, 198, 0.16);
}

.status-pill[data-status="Interview"] {
  color: #11695f;
  background: rgba(42, 157, 143, 0.16);
}

.status-pill[data-status="Offer"] {
  color: #7e4f00;
  background: rgba(248, 168, 0, 0.2);
}

.status-pill[data-status="Rejected"] {
  color: #923124;
  background: rgba(196, 69, 54, 0.15);
}

.card-meta,
.card-links,
.card-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.card-meta p,
.details {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.portal-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

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

.status-select {
  min-width: 132px;
  flex: 1 1 140px;
}

.disabled-link {
  color: var(--muted);
  pointer-events: none;
  text-decoration: none;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(240px, 1fr));
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.board-panel .applications-grid,
.board-panel .kanban-board {
  padding-top: 2px;
}

.kanban-column {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 420px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(31, 37, 32, 0.08);
  background: rgba(255, 250, 242, 0.52);
}

.kanban-column.is-over {
  outline: 2px dashed rgba(231, 111, 81, 0.45);
  outline-offset: -6px;
}

.kanban-column-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.kanban-column-header > div {
  min-width: 0;
  flex: 1 1 120px;
}

.kanban-column-header h3,
.kanban-column-header p {
  margin: 0;
}

.kanban-column-header p {
  color: var(--muted);
  font-size: 0.9rem;
}

.kanban-column-header .status-pill {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.kanban-list {
  display: grid;
  gap: 12px;
  min-height: 100px;
}

.kanban-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  cursor: grab;
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card .position {
  font-size: 1rem;
}

.kanban-card .company {
  margin-bottom: 6px;
}

.kanban-card .card-meta {
  gap: 8px;
}

.kanban-card .card-meta p {
  font-size: 0.88rem;
}

.kanban-card .card-actions {
  margin-top: 12px;
}

.kanban-card .details {
  font-size: 0.92rem;
}

.empty-state {
  padding: 28px;
  border-radius: 22px;
  border: 1px dashed rgba(31, 37, 32, 0.18);
  background: rgba(255, 255, 255, 0.45);
  color: var(--muted);
  text-align: center;
}

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

@media (max-width: 1024px) {
  .hero,
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 18px, 1280px);
    padding-top: 18px;
  }

  .hero-copy,
  .hero-panel,
  .panel {
    padding: 18px;
  }

  .application-form,
  .toolbar,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .form-panel {
    overflow: hidden;
  }

  .section-heading {
    flex-direction: column;
  }

  .card-top,
  .card-actions,
  .toolbar-actions {
    align-items: stretch;
  }

  .view-switch {
    display: flex;
    width: 100%;
  }

  .switch-btn {
    flex: 1 1 0;
  }
}

