/* Irons - Design System */
/* Inspired by Stripe's clean aesthetic */

/* Font imports - matching EngViz */
@import url('https://fonts.googleapis.com/css2?family=Recursive:wght@300..1000&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montaga&display=swap');

:root {
  /* Colors */
  --color-bg: #0a0a0a;
  --color-surface: #141414;
  --color-surface-hover: #1a1a1a;
  --color-surface-active: #222222;
  --color-border: #2a2a2a;
  --color-border-hover: #3a3a3a;

  --color-text: #fafafa;
  --color-text-secondary: #a0a0a0;
  --color-text-muted: #666666;

  /* Status colors - "heat progression" from cool to hot */
  --color-exploring: #64748b;    /* slate - cool, still considering */
  --color-applied: #eab308;      /* yellow - just put in the fire */
  --color-phone-screen: #f59e0b; /* amber - warming up */
  --color-interviewing: #f97316; /* orange - getting hot! */
  --color-offer: #22c55e;        /* green - forged/success */
  --color-rejected: #ef4444;     /* red - didn't work out */
  --color-withdrew: #92400e;     /* brown - you pulled it out */
  --color-ghosted: #6b7280;      /* gray - went cold */
  --color-stale: #ef4444;        /* red - needs attention */

  /* Accent - warm orange to match icon */
  --color-primary: #e67e22;
  --color-primary-hover: #d35400;

  /* Typography - matching EngViz */
  --font-sans: "Recursive", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Montaga", ui-serif, Georgia, serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", monospace;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;

  /* Sizing */
  --header-height: 56px;
  --sidebar-width: 240px;
  --kanban-column-width: 300px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  /* Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.header {
  height: var(--header-height);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  background: var(--color-surface);
  flex-shrink: 0;
}

.header__left {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.header__logo {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.header__logo svg {
  width: 24px;
  height: 24px;
}

.header__nav {
  display: flex;
  gap: var(--space-1);
}

.header__link {
  color: var(--color-text-secondary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.header__link:hover {
  color: var(--color-text);
  background: var(--color-surface-active);
  text-decoration: none;
}

.header__link--active {
  color: var(--color-text);
  background: var(--color-surface-active);
}

.header__user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.main {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Kanban Board */
.kanban {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-6);
  overflow-x: auto;
  flex: 1;
}

.kanban__column {
  width: var(--kanban-column-width);
  min-width: var(--kanban-column-width);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  border-radius: var(--radius-lg);
  padding: var(--space-2);
  transition: var(--transition-fast);
}

.kanban__column--focused {
  background: #111;
  /* box-shadow: inset 0 0 0 1px var(--color-surface-active); */
}

.kanban__column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
}

.kanban__column-title {
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.kanban__column-count {
  background: var(--color-surface-active);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}

.kanban__cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2);
  min-height: 100px;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  transition: var(--transition-slow);
}

.kanban__cards--drag-over {
  border-color: var(--color-primary);
  background: rgba(230, 126, 34, 0.08);
}

/* Job Card */
.job-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  cursor: grab;
  transition: var(--transition-fast);
}

.job-card:hover {
  border-color: var(--color-border-hover);
  background: var(--color-surface-hover);
}

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

.job-card--dragging {
  opacity: 0.5;
  transform: rotate(2deg);
  cursor: grabbing;
}

.job-card--stale {
  border-left: 3px solid var(--color-stale);
}

.job-card__company {
  font-weight: 600;
}

.job-card__date {
  font-size: 11px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.job-card__title {
  color: var(--color-text-secondary);
  font-size: 13px;
  margin-bottom: var(--space-2);
}

.job-card__meta {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--color-text-muted);
}

.job-card__salary {
  color: var(--color-offer);
}

.job-card__location {
  color: var(--color-text-secondary);
}

.job-card__stale-badge {
  background: var(--color-stale);
  color: #000;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.job-card__tags {
  display: flex;
  gap: var(--space-1);
  margin-top: var(--space-2);
}

.job-card__tag {
  background: var(--color-surface-active);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--color-text-secondary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn--primary {
  background: var(--color-primary);
  color: white;
}

.btn--primary:hover {
  background: var(--color-primary-hover);
}

.btn--secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-secondary);
}

.btn--ghost:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

/* Forms */
.input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 14px;
  transition: var(--transition-fast);
}

.input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
}

.input::placeholder {
  color: var(--color-text-muted);
}

.label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-1);
}

/* Modal / Dialog */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 150ms ease-out;
}

.modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: auto;
  animation: slideUp 200ms ease-out;
}

.modal--wide {
  max-width: 800px;
}

/* Two-column form layout */
.form-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.form-columns__left,
.form-columns__right {
  display: flex;
  flex-direction: column;
}

/* 3-column row for compact fields */
.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-4);
}

.modal__header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal__title {
  font-size: 16px;
  font-weight: 600;
}

.modal__body {
  padding: var(--space-6);
}

.modal__footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

/* Command Palette */
.command-palette {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  z-index: 200;
  overflow: hidden;
  animation: slideDown 150ms ease-out;
}

.command-palette__input {
  width: 100%;
  padding: var(--space-4) var(--space-6);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 16px;
}

.command-palette__input:focus {
  outline: none;
}

.command-palette__results {
  max-height: 400px;
  overflow-y: auto;
}

.command-palette__section {
  padding: var(--space-2) var(--space-4);
}

.command-palette__section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  padding: var(--space-2);
}

.command-palette__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.command-palette__item--selected {
  background: var(--color-surface-active);
}

.command-palette__item:hover {
  background: var(--color-surface-hover);
}

.command-palette__item-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.command-palette__shortcut {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-muted);
  background: var(--color-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Table View */
.table-container {
  padding: var(--space-6);
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.table th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  position: sticky;
  top: 0;
}

.table th--sortable {
  cursor: pointer;
}

.table th--sortable:hover {
  color: var(--color-text);
}

.table tr:hover {
  background: var(--color-surface-hover);
}

.table__status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

/* Login Page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.login-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-card__icon {
  width: 120px;
  height: 120px;
  margin-bottom: var(--space-4);
  border-radius: 24px;
}

.login-card__logo {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  margin-bottom: var(--space-2);
}

.login-card__tagline {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
}

.login-card__btn {
  width: 100%;
  padding: var(--space-3) var(--space-4);
}

/* Keyboard shortcuts help */
.shortcuts-help {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  font-size: 12px;
  color: var(--color-text-muted);
  z-index: 50;
}

.shortcuts-help kbd {
  background: var(--color-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid var(--color-border);
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  z-index: 300;
}

.toast {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  animation: slideIn 200ms ease-out;
  min-width: 300px;
}

.toast--success {
  border-left: 3px solid var(--color-offer);
}

.toast--error {
  border-left: 3px solid var(--color-rejected);
}

.toast__message {
  flex: 1;
}

.toast__action {
  color: var(--color-primary);
  cursor: pointer;
  font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideDown {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

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

/* Spinner */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12);
  color: var(--color-text-secondary);
  text-align: center;
}

.empty-state__icon {
  font-size: 48px;
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.empty-state__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.empty-state__description {
  margin-bottom: var(--space-6);
  max-width: 400px;
}

/* Form groups */
.form-group {
  margin-bottom: var(--space-4);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-border-hover);
}
