/* Jeff Dashboard — minimal Airtable-ish styling. */
:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --border: #e5e7eb;
    --text: #111827;
    --muted: #6b7280;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --danger: #b91c1c;
    --radius: 6px;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    margin: 0;
}

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

/* ---------- Top bar ---------- */
.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand {
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    letter-spacing: -0.3px;
}
.brand:hover { text-decoration: none; }
.topbar nav { display: flex; gap: 16px; align-items: center; }
.who { color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }

/* ---------- Layout ---------- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px 80px;
}
h1 { font-size: 22px; margin: 0 0 16px; letter-spacing: -0.3px; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 20px 0 8px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}
.hint { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.hint code { background: #f3f4f6; padding: 1px 5px; border-radius: 3px; font-size: 12px; }
.breadcrumb { margin-bottom: 8px; font-size: 13px; }

/* ---------- Forms ---------- */
input[type="text"], input[type="email"], input[type="password"], input[type="file"], select, textarea {
    font: inherit;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    outline: none;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
button {
    font: inherit;
    padding: 7px 14px;
    background: var(--accent);
    color: white;
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
}
button:hover { background: var(--accent-hover); }
button.link {
    background: transparent;
    color: var(--muted);
    padding: 4px 8px;
}
button.link:hover { color: var(--text); background: #f3f4f6; }
button.danger-link {
    background: transparent;
    color: var(--danger);
    padding: 4px 8px;
    font-size: 12px;
}
button.danger-link:hover { background: #fee2e2; }

.row-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.row-form input, .row-form select { flex: 1 1 160px; min-width: 0; }
.row-form button { flex: 0 0 auto; }

form.inline { display: inline; margin: 0; }

label {
    display: block;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--muted);
}
label input { display: block; width: 100%; margin-top: 4px; color: var(--text); font-size: 14px; }

/* ---------- Login ---------- */
.login-card {
    max-width: 360px;
    margin: 80px auto;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.login-card h1 { margin-bottom: 4px; }
.login-card button { width: 100%; padding: 9px; }
.error {
    background: #fee2e2;
    color: var(--danger);
    padding: 8px 12px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    font-size: 13px;
}

/* ---------- Tables ---------- */
table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
table.data th {
    text-align: left;
    padding: 8px 12px;
    background: #f9fafb;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
table.data td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
table.data tr:hover td { background: #f9fafb; }
.center { text-align: center; padding: 24px !important; }

/* ---------- Editable table ---------- */
.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
}
table.editable td { padding: 0; }
table.editable td.num { padding: 8px 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
table.editable td.linkedin { padding: 8px 12px; }
table.editable td.ts { padding: 8px 12px; font-size: 12px; font-variant-numeric: tabular-nums; }
table.editable .cell-form { margin: 0; }
table.editable .cell-form input,
table.editable .cell-form select {
    width: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 8px 12px;
}
table.editable .cell-form input:hover,
table.editable .cell-form select:hover {
    background: #f3f4f6;
}
table.editable .cell-form input:focus,
table.editable .cell-form select:focus {
    background: #fff;
    box-shadow: inset 0 0 0 2px var(--accent);
}
table.editable td.notes .cell-form input { min-width: 200px; }

/* ---------- Status tinting ---------- */
tr.status-new td { }
tr.status-invite_sent td { background: #fefce8; }
tr.status-invite_sent:hover td { background: #fef9c3; }
tr.status-connected td { background: #eff6ff; }
tr.status-connected:hover td { background: #dbeafe; }
tr.status-dm_sent td { background: #f5f3ff; }
tr.status-dm_sent:hover td { background: #ede9fe; }
tr.status-replied td { background: #f0fdf4; }
tr.status-replied:hover td { background: #dcfce7; }
tr.status-booked td { background: #ecfdf5; font-weight: 500; }
tr.status-booked:hover td { background: #d1fae5; }
tr.status-dead td { color: var(--muted); }
tr.status-dead td .cell-form input,
tr.status-dead td .cell-form select { color: var(--muted); }

/* ---------- Status badges (LinkedIn account connection states) ---------- */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    background: #f3f4f6;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.status-badge.status-connected { background: #d1fae5; color: #065f46; }
.status-badge.status-credentials { background: #fef3c7; color: #92400e; }
.status-badge.status-disconnected { background: #fee2e2; color: #991b1b; }

.button-inline {
    display: inline-block;
    padding: 5px 12px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius);
    font-size: 13px;
    text-decoration: none;
}
.button-inline:hover { background: var(--accent-hover); text-decoration: none; }
