/* public/assets/css/app.css */

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

:root {
  --bg:       #fdf6e3;
  --surface:  #fffdf5;
  --border:   #e8d9b0;
  --primary:  #b5651d;
  --primary-h:#8b4513;
  --danger:   #9b2226;
  --success:  #4a7c59;
  --warn:     #c8860a;
  --text:     #2c1a0e;
  --muted:    #7a5c3a;
  --radius:   8px;
  --shadow:   0 1px 3px rgba(90,50,10,.10), 0 1px 2px rgba(90,50,10,.07);
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

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

/* ---- Layout ---- */
.nav {
  background: #3d1f0a;
  border-bottom: 1px solid #5c3010;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand { font-weight: 700; font-size: 1.1rem; color: #f0c060; }
.nav-links { display: flex; gap: 1rem; margin-left: auto; }
.nav-links a { color: #c8a070; font-size: .9rem; }
.nav-links a:hover, .nav-links a.active { color: #f0c060; text-decoration: none; }

.container { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }
.page-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; }

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.card-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: .75rem; }
.card-title { font-size: 1rem; font-weight: 600; }
.card-sub { font-size: .85rem; color: var(--muted); }

/* ---- Score badge ---- */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-weight: 700;
  font-size: .95rem;
  flex-shrink: 0;
  color: #fff;
}
.score-high   { background: var(--success); }
.score-mid    { background: var(--warn); }
.score-low    { background: var(--danger); }
.score-none   { background: var(--muted); }

/* ---- Status pills ---- */
.pill {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.status-select {
  border: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  width: auto;
  padding-right: 1.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237a5c3a'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .45rem center;
  background-size: 8px;
}
.pill-new         { background: #fdecc8; color: #7a4010; }
.pill-shortlisted { background: #f5e6c0; color: #6b3d0f; }
.pill-applied     { background: #d6eacc; color: #2e5e30; }
.pill-dismissed   { background: #ede8df; color: var(--muted); }
.pill-interview   { background: #e8dff5; color: #4a2d7a; }
.pill-offer       { background: #c8e6d0; color: #1a4d2e; }
.pill-rejected    { background: #f5d5d0; color: #7a1a1a; }

/* ---- Forms ---- */
.form-group { margin-bottom: 1rem; }
label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: .35rem; }
input[type=text], input[type=email], input[type=password],
input[type=url], select, textarea {
  width: 100%;
  padding: .55rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(181,101,29,.15);
}
textarea { resize: vertical; min-height: 120px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .15s, opacity .15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-h); }
.btn-outline  { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg); }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-sm       { padding: .35rem .75rem; font-size: .8rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- Alerts ---- */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: .9rem;
}
.alert-error   { background: #f5d5d0; color: #7a1a1a; border: 1px solid #d9a09a; }
.alert-success { background: #d6eacc; color: #2e5e30; border: 1px solid #8fbc7a; }
.alert-info    { background: #fdecc8; color: #7a4010; border: 1px solid #e8c07a; }

/* ---- Filters bar ---- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.5rem;
  align-items: flex-end;
}
.filters .form-group { margin-bottom: 0; }
.filters select, .filters input { width: auto; min-width: 140px; }

/* ---- Score breakdown ---- */
.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .75rem;
  margin: 1rem 0;
}
.breakdown-item {
  background: var(--bg);
  border-radius: var(--radius);
  padding: .75rem;
  text-align: center;
}
.breakdown-item .val { font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.breakdown-item .lbl { font-size: .75rem; color: var(--muted); margin-top: .2rem; }

/* ---- Tag lists ---- */
.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.tag {
  background: #fdecc8;
  color: #7a4010;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .78rem;
}
.tag-gap { background: #f5d5d0; color: #7a1a1a; }

/* ---- Auth pages ---- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.auth-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
}
.auth-box h1 { font-size: 1.3rem; margin-bottom: 1.5rem; }

/* ---- Kanban board ---- */
.kanban {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.kanban-col { background: var(--bg); border-radius: var(--radius); padding: .75rem; }
.kanban-col-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .75rem; }
.kanban-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem; margin-bottom: .5rem; font-size: .85rem; }

/* ---- Spinner ---- */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .container { padding: 1rem; }
  .nav { gap: .75rem; }
  .filters { flex-direction: column; }
}
