[v-cloak]{display:none;}

:root {
  --bg-primary: #051a15;
  --bg-secondary: #0c2b21;
  --glass-surface: rgba(7, 31, 25, 0.68);
  --glass-border: rgba(88, 255, 190, 0.18);
  --accent: #34d399;
  --accent-dark: #059669;
  --accent-soft: rgba(52, 211, 153, 0.12);
  --accent-strong: rgba(52, 211, 153, 0.25);
  --text-primary: #f4fff9;
  --text-muted: #9be8c2;
  --text-subtle: rgba(155, 232, 194, 0.7);
  --chip-bg: rgba(45, 212, 191, 0.22);
  --danger: #f87171;
  --warning: #fbbf24;
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

.login-view {
  min-height: 100vh;
  padding: clamp(48px, 8vw, 96px) clamp(32px, 6vw, 120px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

.login-hero h1 {
  font-size: clamp(40px, 5vw, 60px);
  margin-bottom: 16px;
}

.login-hero p {
  max-width: 520px;
  color: var(--text-subtle);
  line-height: 1.6;
  font-size: clamp(16px, 1.2vw, 18px);
}

.login-panel {
  background: linear-gradient(140deg, rgba(6, 32, 26, 0.92), rgba(4, 19, 15, 0.88));
  border: 1px solid rgba(74, 222, 128, 0.22);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4);
  max-width: 420px;
  justify-self: center;
}

.login-panel h2 {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 28px);
}

.login-subtitle {
  margin: 0 0 22px;
  color: var(--text-subtle);
  font-size: 14px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.login-form input {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(74, 222, 128, 0.22);
  background: rgba(5, 24, 19, 0.65);
  color: var(--text-primary);
  padding: 12px 15px;
  font-size: 15px;
}

.btn--full {
  width: 100%;
  justify-content: center;
}

.login-error {
  color: var(--danger);
  margin: 0;
  font-size: 14px;
  text-align: center;
}

.auth-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-user .btn--mini {
  width: auto;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  color: var(--text-primary);
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(15, 118, 110, 0.45), transparent 60%),
    linear-gradient(160deg, var(--bg-primary) 0%, var(--bg-secondary) 60%, #04130f 100%);
}

.app {
  min-height: 100vh;
  padding: clamp(24px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 38px);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
  padding: clamp(28px, 3.5vw, 48px);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  background: linear-gradient(125deg, rgba(13, 148, 136, 0.55), rgba(4, 48, 38, 0.85));
  border: 1px solid rgba(74, 222, 128, 0.25);
  box-shadow: 0 40px 80px rgba(3, 18, 14, 0.6);
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: -40% 40% auto -20%;
  height: 120%;
  background: radial-gradient(circle at center, rgba(52, 211, 153, 0.22), transparent 60%);
  filter: blur(60px);
  z-index: -1;
}

.hero__text h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero__text p {
  margin: 14px 0 22px;
  max-width: 600px;
  color: var(--text-subtle);
  line-height: 1.55;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid rgba(52, 211, 153, 0.35);
  font-weight: 600;
  font-size: 13px;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.btn {
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  color: var(--text-primary);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #17b26a);
  color: #04130f;
  box-shadow: 0 18px 40px rgba(23, 178, 106, 0.35);
}

.btn--primary:hover:not(:disabled) {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #17b26a, var(--accent-dark));
}

.btn--ghost {
  background: rgba(3, 24, 18, 0.6);
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.btn--ghost:hover:not(:disabled) {
  background: rgba(74, 222, 128, 0.2);
}

.btn--mini {
  background: rgba(52, 211, 153, 0.22);
  border: 1px solid rgba(52, 211, 153, 0.35);
  padding: 8px 14px;
  font-size: 12px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(14px, 2vw, 24px);
}

.stat-card {
  padding: clamp(18px, 2vw, 26px);
  border-radius: var(--radius-lg);
  background: rgba(6, 26, 20, 0.68);
  border: 1px solid rgba(74, 222, 128, 0.16);
  box-shadow: inset 0 1px 0 rgba(74, 222, 128, 0.12);
}

.stat-card__label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
}

.stat-card__value {
  display: block;
  margin-top: 12px;
  font-size: clamp(28px, 3.5vw, 38px);
  font-weight: 700;
}

.grid {
  display: grid;
  gap: clamp(18px, 2.4vw, 30px);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}
.panel--position { grid-area: position; }
.panel--jd { grid-area: jd; }
.panel--resume { grid-area: resume; }
.panel--queue { grid-area: queue; }

.panel {
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--radius-lg);
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px);
  box-shadow: 0 26px 60px rgba(1, 10, 8, 0.55);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 22px);
}

.panel--wide {
  margin-top: clamp(18px, 2vw, 26px);
}

.panel__header {
  display: flex;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 16px);
}

.panel__header h2 {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 24px);
}

.panel__header p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}

.form-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-control label,
.select-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.select-with-action select {
  width: 100%;
}
.form-control span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

input[type="text"],
input[type="search"],
input[type="number"],
input[type="file"],
select,
textarea {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(74, 222, 128, 0.22);
  background: rgba(5, 24, 19, 0.65);
  color: var(--text-primary);
  font-size: 14px;
  padding: 11px 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(52, 211, 153, 0.6);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.22);
}

textarea {
  resize: vertical;
}

.descriptor {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.descriptor li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.descriptor span {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.descriptor strong {
  font-size: 14px;
}

.ellipsis {
  max-width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel--dual__grid {
  display: grid;
  gap: clamp(18px, 2vw, 26px);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.panel--dual__info {
  background: rgba(4, 24, 19, 0.7);
  border-radius: var(--radius-md);
  padding: clamp(18px, 2vw, 24px);
  border: 1px solid rgba(74, 222, 128, 0.18);
}

.panel--dual__info h3 {
  margin: 0 0 12px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.panel--dual__info ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-subtle);
}

.panel--dual__form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(14px, 2vw, 18px);
}

.form-footer {
  display: flex;
  align-items: center;
  gap: 16px;
}

.help-text {
  font-size: 13px;
  color: var(--text-subtle);
}

.resume {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 18px);
}

.dropzone {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(74, 222, 128, 0.35);
  padding: clamp(26px, 3vw, 34px);
  background: rgba(6, 26, 20, 0.6);
  transition: border 0.2s ease, background 0.2s ease;
}

.dropzone--active {
  border-color: rgba(52, 211, 153, 0.8);
  background: rgba(52, 211, 153, 0.18);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-subtle);
}

.dropzone__icon {
  font-size: 34px;
}

.resume__queue {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip--hollow {
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.32);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(74, 222, 128, 0.16);
  background: rgba(5, 22, 18, 0.65);
  backdrop-filter: blur(16px);
}

.table-wrapper--dense {
  margin-top: clamp(12px, 2vw, 18px);
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
}

.table--dense {
  min-width: 1200px;
}

.table th {
  text-align: left;
  padding: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
  background: rgba(4, 24, 19, 0.85);
  color: var(--text-muted);
  border-bottom: 1px solid rgba(74, 222, 128, 0.18);
}

.table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(74, 222, 128, 0.12);
  vertical-align: top;
}

.table__empty {
  text-align: center;
  padding: 28px 0;
  color: var(--text-subtle);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(74, 222, 128, 0.18);
  color: var(--accent);
}

.badge--processing { background: rgba(251, 191, 36, 0.2); color: var(--warning); }
.badge--completed { background: rgba(52, 211, 153, 0.22); color: var(--accent); }
.badge--failed { background: rgba(248, 113, 113, 0.22); color: var(--danger); }
.badge--error { background: rgba(248, 113, 113, 0.22); color: var(--danger); }

.score-chip {
  margin-bottom: 6px;
}

.table textarea,
.table input[type="text"],
.table input[type="number"] {
  width: 100%;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.chip--micro {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.2);
  border: 1px solid rgba(52, 211, 153, 0.28);
  font-size: 11px;
  margin: 2px;
}

.table-actions {
  display: grid;
  gap: 6px;
}

.table-actions button {
  background: rgba(4, 24, 19, 0.85);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.table-actions button:hover {
  background: rgba(52, 211, 153, 0.22);
}

.candidate-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.toast {
  position: fixed;
  bottom: clamp(18px, 3vw, 28px);
  right: clamp(18px, 3vw, 28px);
  background: rgba(4, 24, 19, 0.92);
  color: #fff;
  padding: 16px 22px;
  border-radius: var(--radius-md);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.success { background: rgba(21, 128, 61, 0.92); }
.toast.error { background: rgba(185, 28, 28, 0.9); }
.toast.warning { background: rgba(161, 98, 7, 0.9); }

/* Responsive choreographies */
@media (max-width: 1280px) {
  .table--dense { min-width: 1100px; }
}

@media (max-width: 1080px) {
  .hero__actions { align-items: stretch; }
  .hero__actions .btn { width: 100%; }
}

@media (min-width: 1100px) {
  .grid {
    grid-template-columns: repeat(2, minmax(340px, 1fr));
    grid-template-areas:
      "position jd"
      "resume queue";
  }
}

@media (max-width: 920px) {
  .table { min-width: 880px; }
}

@media (max-width: 820px) {
  .grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .table--dense { min-width: 1000px; }
  .candidate-controls { flex-direction: column; align-items: stretch; }
}

@media (max-width: 640px) {
  .app { padding: 24px 18px 48px; }
  .hero { padding: 24px; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .select-with-action {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .select-with-action .btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .table { min-width: 760px; }
  .table--dense { min-width: 920px; }
}

@media (max-width: 460px) {
  .table { min-width: 620px; }
  .table--dense { min-width: 780px; }
  .hero__text h1 { font-size: 28px; }
}

@media (max-width: 380px) {
  .stat-card { padding: 16px; }
  .panel { padding: 20px; }
}
