* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1f2937;
    background: #f4f6fa;
    line-height: 1.5;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111827;
    color: #fff;
    padding: 12px 24px;
}
.topbar .brand a { color: #fff; font-weight: 600; font-size: 18px; }
.topbar nav a {
    color: #cbd5e1;
    margin-left: 18px;
    font-size: 14px;
}
.topbar nav a.active, .topbar nav a:hover { color: #fff; }

.container { max-width: 1400px; margin: 24px auto; padding: 0 24px 60px; }
.footer { text-align: center; padding: 20px; color: #6b7280; }

h1, h2, h3 { color: #111827; margin-top: 0; }
h1 { font-size: 24px; }
h2 { font-size: 20px; margin-top: 28px; }
h3 { font-size: 16px; }

.flash {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}
.flash-info    { background: #dbeafe; color: #1e3a8a; }
.flash-success { background: #d1fae5; color: #065f46; }
.flash-error   { background: #fee2e2; color: #991b1b; }

/* Pipeline kanban */
.pipeline {
    display: grid;
    grid-template-columns: repeat(6, minmax(220px, 1fr));
    gap: 12px;
    overflow-x: auto;
}
.column {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    min-height: 400px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.column h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 6px;
    margin-bottom: 10px;
}
.column .count {
    background: #e5e7eb;
    color: #374151;
    border-radius: 12px;
    padding: 1px 8px;
    font-size: 11px;
    margin-left: 6px;
}
.card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    display: block;
    color: #111827;
}
.card:hover { background: #eff6ff; text-decoration: none; }
.card .name { font-weight: 600; }
.card .job  { color: #6b7280; font-size: 12px; }
.card .meta { color: #9ca3af; font-size: 11px; margin-top: 4px; }

/* Forms */
form { margin: 0; }
.form-row { margin-bottom: 14px; }
.form-row label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #374151;
}
input[type=text], input[type=email], input[type=tel], input[type=datetime-local],
input[type=number], input[type=password], select, textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus {
    outline: 2px solid #2563eb;
    outline-offset: -1px;
    border-color: #2563eb;
}

.btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    background: #2563eb;
    color: #fff;
}
.btn:hover { background: #1d4ed8; text-decoration: none; }
.btn-secondary { background: #fff; color: #1f2937; border-color: #d1d5db; }
.btn-secondary:hover { background: #f3f4f6; }
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: #059669; }
.btn-success:hover { background: #047857; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Detail page panels */
.panel {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.kv { display: flex; gap: 12px; padding: 4px 0; font-size: 14px; }
.kv dt { color: #6b7280; min-width: 110px; }
.kv dd { margin: 0; font-weight: 500; }

.stage-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 500;
}
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-hired    { background: #d1fae5; color: #065f46; }
.status-withdrawn{ background: #f3f4f6; color: #374151; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e5e7eb; }
th { background: #f9fafb; font-weight: 600; color: #374151; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }

.tabs { border-bottom: 1px solid #e5e7eb; margin-bottom: 16px; }
.tabs a {
    display: inline-block;
    padding: 8px 14px;
    color: #6b7280;
    border-bottom: 2px solid transparent;
}
.tabs a.active { color: #2563eb; border-bottom-color: #2563eb; }

.muted { color: #6b7280; font-size: 13px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 1000px) {
    .pipeline { grid-template-columns: 1fr; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
