:root {
  --card-bg: #ffffff;
  --muted: #6b7280;
  --accent: #1a73e8;
  --accent-600: #155ab6;
  --surface: #f8fafc;
  --glass: rgba(255,255,255,0.6);
  --radius-lg: 12px;
  --radius: 8px;
  --shadow: 0 6px 20px rgba(20,20,40,0.06);
  --mono: 14px;
}

body {
  background: var(--surface);
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: #111827;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(20,20,40,0.04);
}

.brand {
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.3px;
}

.header a {
  color: var(--accent);
  text-decoration: none;
  margin-left: 14px;
  font-weight: 600;
  font-size: 13px;
}

.container { padding:16px; }

.auth-wrap {
  display: flex;
  min-height: calc(100vh - 72px);
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.card {
  width: 420px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 26px;
}

.card h1 { margin:0 0 12px 0; font-size:20px; }

.small { color: var(--muted); font-size:13px; margin-bottom:8px; }

.small-note { font-size:12px; color:var(--muted); margin-top:6px; }

.app-grid { 
  display:grid; 
  grid-template-columns: 380px 1fr; 
  gap:12px; 
  height: calc(100vh - 72px); 
}

.form-card, .results-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:14px;
  overflow:auto;
}

.form-card {
  min-width: 380px;
  max-width: 380px;
}

.form-row { margin-bottom:10px; }

label { display:block; font-weight:600; margin-bottom:6px; font-size:13px; color:#111827; }

input[type=text], input[type=password], input[type=email], textarea, select, input[type=number] {
  width:90%; padding:10px 12px; border-radius:8px; border:1px solid #e6eef8; font-size:13px;
}

.status-card {
  height: 160px;
  overflow:auto;
  border:1px solid #eef6ff;
}

.status-line { font-family:monospace; font-size:13px; color:#0f172a; margin-bottom:6px; }

.table { width:100%; border-collapse:collapse; font-size:13px; }
.table th { 
  text-align:left; 
  padding:8px; 
  background:var(--accent); 
  color:white; 
  position:sticky; 
  top:0; 
  z-index:2; 
  font-weight:700;
}
.table td { padding:8px; border-bottom:1px solid #eef2ff; }
.table-responsive { max-height:55vh; overflow:auto; }

.btn { display:inline-block; padding:9px 12px; background:var(--accent); color:white; border-radius:8px; border:none; font-weight:700; cursor:pointer; text-decoration:none; }
.btn.ghost { background:transparent; color:var(--accent); border:1px solid #e6eef8; font-weight:700; }

@media (max-width:900px) {
  .app-grid { grid-template-columns: 1fr; height:auto; }
  .form-card {
    min-width: unset;
    max-width: unset;
  }
}

#scraper-spinner {
    animation: pulse 1s infinite;
    font-weight: 800;
    color: var(--accent);
}

@keyframes pulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* ========= Fixed-width table + horizontal scroll ========= */

/* container that holds the table — enable horizontal scroll */
.table-responsive {
  overflow-x: auto;    /* horizontal scroll when table is wider than container */
  -webkit-overflow-scrolling: touch;
}

/* keep the table from shrinking to fit the container */
.table {
  width: 100%;             /* allow table to be as wide as defined min-width */
  min-width: 1200px;      /* adjust this base min width to suit your typical column count */
  table-layout: fixed;     /* columns share width consistently */
  border-collapse: collapse;
}

/* keep cells on a single line, truncate visually */
.table th,
.table td {
  white-space: nowrap;         /* don't wrap cell content */
  overflow: hidden;            /* hide overflow */
  text-overflow: ellipsis;     /* show "..." for overflow */
  padding: 8px 10px;
  box-sizing: border-box;
}

/* Column-specific widths */
.table th:nth-child(1),
.table td:nth-child(1) {
  width: 40px;  /* # column */
  max-width: 40px;
}

.table th:nth-child(2),
.table td:nth-child(2) {
  width: 150px;  /* Name */
  max-width: 150px;
}

.table th:nth-child(3),
.table td:nth-child(3) {
  width: 180px;  /* Title */
  max-width: 180px;
}

.table th:nth-child(4),
.table td:nth-child(4) {
  width: 150px;  /* Company */
  max-width: 150px;
}

.table th:nth-child(5),
.table td:nth-child(5) {
  width: 120px;  /* Location */
  max-width: 120px;
}

.table th:nth-child(6),
.table td:nth-child(6) {
  width: 100px;  /* Skills - shrinked */
  max-width: 100px;
}

.table th:nth-child(7),
.table td:nth-child(7) {
  width: 120px;  /* Experience - shrinked */
  max-width: 120px;
}

.table th:nth-child(8),
.table td:nth-child(8) {
  width: 100px;  /* Source_URL */
  max-width: 100px;
}

/* Expandable cells styling */
.expandable-cell {
  cursor: pointer;
  color: var(--accent);
  text-decoration: underline;
  transition: background-color 0.2s;
}

.expandable-cell:hover {
  background-color: #e6f2ff;
}

/* ensure the results panel doesn't force layout change in parent flex */
#results-table-area {
  min-width: 0;     /* allows the overflow-x to work properly inside flex containers */
  overflow: visible;
}

/* keep table header fixed-style (visual only) — optional */
.table thead th {
  position: sticky;
  top: 0;
  background: var(--accent);
  z-index: 2;
}

/* Modal styling improvements */
#popup-modal {
  display: none;
}

#popup-modal.show {
  display: flex !important;
}

#modal-close:hover {
  color: #000;
  transform: scale(1.1);
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;  /* space between logo and text */
    font-size: 1.5rem;
    font-weight: bold;
    color: blue;
}

.brand-logo {
    height: 24px; /* adjust to fit your header */
    width: auto;
}
