/* ===== Cidersoft HR visual system (2026-10-29) ===== */
:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --line: #e5e7eb;
  --surface: #ffffff;
  --canvas: #f6f7f9;
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-soft: #eff4ff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
}
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--canvas); color: var(--ink); -webkit-font-smoothing: antialiased; }

/* Sidebar */
.sidebar { background: var(--surface); border-right: 1px solid var(--line); }
.sidebar-header { padding: 18px 18px 16px; border-bottom: 1px solid var(--line); }
.sidebar-brand { font-size: 15px; font-weight: 700; color: var(--ink); gap: 10px; letter-spacing: -.01em; }
.sidebar-logo { height: 26px; width: auto; }
.sidebar-role { display: none; }
.sidebar-nav { padding: 12px 10px; }
.nav-link { gap: 12px; padding: 9px 12px; margin: 1px 0; border-radius: 8px; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.nav-link:hover { background: #f3f4f6; color: var(--ink); }
.nav-link.active { background: var(--brand-soft); color: var(--brand-hover); font-weight: 600; }
.nav-link .icon { display: inline-flex; width: 18px; height: 18px; font-size: 0; }
.nav-link .icon svg { width: 18px; height: 18px; }
.nav-section-label { display: none; }
.sidebar-footer { padding: 12px 14px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-hover); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: 0 0 auto; }
.sidebar-user-info .name { font-size: 13px; font-weight: 600; color: var(--ink); }
.sidebar-user-info .role-badge { font-size: 12px; color: var(--ink-3); background: none; padding: 0; text-transform: none; letter-spacing: 0; }
.logout-btn { display: inline-flex; width: auto; justify-content: flex-start; gap: 8px; margin-top: 10px; padding: 6px 8px; background: none; border: 0; border-radius: 6px; color: var(--ink-3); font-size: 13px; font-weight: 500; }
.logout-btn:hover { background: #f3f4f6; color: var(--ink); }

/* Top bar and section tabs */
.topbar { height: 56px; border-bottom: 1px solid var(--line); }
.topbar-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.section-tabs { border-bottom: 1px solid var(--line); }
.section-tabs a { font-size: 14px; color: var(--ink-3); }
.section-tabs a.on { color: var(--brand-hover); border-bottom-color: var(--brand); }

/* Page headings */
.page-content { padding: 28px 32px; }
.page-content > h1, .page-content > h2, .page-header h1, .page-header h2 { font-size: 22px; font-weight: 700; letter-spacing: -.015em; color: var(--ink); }
.page-header p, .page-header .subtitle { color: var(--ink-3); font-size: 14px; }
@media (max-width: 768px) { .page-content { padding: 20px 16px; } }

/* Cards and tables */
.card, .table-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.table-header { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.table-header h3 { font-size: 15px; font-weight: 600; color: var(--ink); }
.data-table th { background: #fafafa; font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink-3); }
.data-table td { color: var(--ink-2); }

/* Buttons: primary, secondary (ghost), danger */
.btn { font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 8px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-ghost, .btn-secondary
{ background: var(--surface); color: var(--ink); border: 1px solid #d1d5db; }
.btn-ghost:hover, .btn-secondary:hover { background: #f9fafb; }
.btn-sm { font-size: 13px; padding: 5px 10px; }

/* Badges: sentence case pills */
.badge { font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; padding: 2px 9px; }

/* Kanban */
.kanban-card { border-radius: 10px !important; border: 1px solid var(--line) !important; box-shadow: var(--shadow) !important; padding: 12px 12px 10px !important; }
.kanban-card > div:first-child { font-size: 14px !important; color: var(--ink); }
.kanban-current-role { font-size: 12px !important; color: var(--ink-3) !important; line-height: 1.45; }
.kanban-card .kc-actions .btn { font-size: 12px !important; padding: 4px 10px !important; color: var(--ink) !important; }
.kc-chip { font-weight: 500; }
.kanban-col { background: #f3f4f6 !important; border-radius: 12px !important; padding: 10px !important; min-width: 220px; }
.kanban-col > div:first-child { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.kc-chip { white-space: nowrap; }
/* ----- v3: integrated sidebar + collapse ----- */
.sidebar { background: #f8fafc; border-right: 1px solid var(--line); width: var(--sidebar-w); transition: width .2s ease; }
.main-content { transition: margin-left .2s ease; }
.sidebar-header { height: 56px; box-sizing: border-box; padding: 0 16px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.sidebar-brand { white-space: nowrap; overflow: hidden; }
.sidebar-logo { height: 28px; border-radius: 6px; }
.nav-link { color: var(--ink-2); border: 1px solid transparent; white-space: nowrap; }
.nav-link .icon { color: var(--ink-3); }
.nav-link:hover { background: #eef1f5; color: var(--ink); }
.nav-link.active { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: 0 1px 2px rgba(16,24,40,.06); }
.nav-link.active .icon { color: var(--brand); }
.sidebar-avatar { background: var(--brand-soft); color: var(--brand-hover); }
.sb-toggle { display: flex; align-items: center; gap: 12px; width: calc(100% - 20px); margin: 4px 10px 0; padding: 8px 12px; border: 0; border-radius: 8px; background: none; color: var(--ink-3); font: 500 13px Inter, sans-serif; cursor: pointer; white-space: nowrap; }
.sb-toggle:hover { background: #eef1f5; color: var(--ink); }
.sb-toggle svg { flex: 0 0 auto; transition: transform .2s ease; }
body.sb-collapsed { --sidebar-w: 72px; }
body.sb-collapsed .sidebar-header { justify-content: center; padding: 0; }
body.sb-collapsed .sidebar-brand { font-size: 0; gap: 0; }
body.sb-collapsed .nav-link, body.sb-collapsed .sb-toggle { justify-content: center; padding: 10px 0; font-size: 0; gap: 0; }
body.sb-collapsed .sb-toggle { width: calc(100% - 20px); }
body.sb-collapsed .sb-toggle svg { transform: rotate(180deg); }
body.sb-collapsed .sidebar-user { justify-content: center; }
body.sb-collapsed .sidebar-user-info { display: none; }
body.sb-collapsed .logout-btn { font-size: 0; gap: 0; width: 100%; justify-content: center; }
@media (max-width: 768px) { body.sb-collapsed { --sidebar-w: 240px; } .sb-toggle { display: none; } body.sb-collapsed .nav-link, body.sb-collapsed .logout-btn { font-size: 14px; gap: 12px; justify-content: flex-start; padding: 9px 12px; } body.sb-collapsed .sidebar-user-info { display: block; } body.sb-collapsed .sidebar-brand { font-size: 15px; gap: 10px; } }

/* ----- v2: page header (title left, actions right) ----- */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-header h1, .page-header h2 { margin: 0; }

/* ----- v2: roomier kanban with avatars ----- */
.kanban-col { min-width: 264px !important; }
.kanban-card > div:first-child { display: flex; align-items: center; gap: 10px; }
.kc-avatar { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #1d4ed8; background: #e8efff; }
.kc-role { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kanban-current-role { margin: 8px 0 2px; }

/* ----- v4: dashboard bars, compact tables, page actions ----- */
.stats-grid > * { border-top: 1px solid var(--line) !important; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 20px; align-items: start; margin-bottom: 24px; }
.home-grid > .table-card { margin-bottom: 0; }
.pipe-row { display: grid; grid-template-columns: 150px 1fr 28px; align-items: center; gap: 12px; padding: 7px 0; }
.pipe-label { font-size: 13px; color: var(--ink-2); }
.pipe-n { font-size: 13px; font-weight: 600; text-align: right; color: var(--ink); }
.bar { height: 10px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.bar.bar-green > span { background: #16a34a; }
.page-actions { display: flex; gap: 8px; }
.filters-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filters-row .form-control { width: auto; }
.cell-clip { max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-weight: 500; }
.cell-sub { font-size: 12px; color: var(--ink-3); }
.nowrap { white-space: nowrap; }
.data-table td:has(> .cell-sub), .data-table td.nowrap { white-space: nowrap; }
.data-table .text-muted.text-sm { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-table td { vertical-align: middle; }
/* ----- v5: finish (board scroll, status pills, stat cards, hover) ----- */
#kanbanBoard { overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.kanban-cards:not([data-stage="sent_to_client"]):not([data-stage="client_review"]):not([data-stage="second_round_scheduled"]) .kc-chip { display: none; }
.kanban-col:not(:has(.kanban-card)) { min-width: 150px !important; max-width: 170px; background: transparent !important; border: 1px dashed #d8dde5; }
.kanban-col:not(:has(.kanban-card)) .kanban-cards { min-height: 60px !important; }
.kanban-col:has([data-stage="rejected"]) .kanban-card { opacity: .72; }
.kanban-card { transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease; }
.kanban-card:hover { border-color: #cbd5e1 !important; box-shadow: 0 6px 16px rgba(16,24,40,.08) !important; transform: translateY(-1px); }
.data-table tbody tr { transition: background .12s ease; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table td select.form-control { appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; padding: 3px 26px 3px 10px !important; font-size: 12px !important; font-weight: 600; cursor: pointer; background: #f1f5f9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center; color: #334155; }
.data-table td select.form-control:has(option[value="active"]:checked) { background-color: #dcfce7; color: #166534; }
.data-table td select.form-control:has(option[value="former"]:checked) { background-color: #f1f5f9; color: #475569; }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.stats-grid .stat-card { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: inherit; transition: box-shadow .15s ease, border-color .15s ease; }
.stats-grid .stat-card:hover { border-color: #cbd5e1; box-shadow: 0 6px 16px rgba(16,24,40,.07); }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.stat-icon.blue { background: #eff4ff; color: #1d4ed8; } .stat-icon.green { background: #dcfce7; color: #166534; }
.stat-icon.violet { background: #f3e8ff; color: #6d28d9; } .stat-icon.amber { background: #fef3c7; color: #92400e; }
.stats-grid .stat-value { font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--ink); }
.stats-grid .stat-label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.stat-ctx { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.stat-ctx b { font-weight: 600; }

/* ----- v6: sign-in page ----- */
.auth-body { margin: 0; background: #fff; }
.auth { display: grid; grid-template-columns: minmax(380px, 44%) 1fr; min-height: 100vh; }
.auth-brand { background: linear-gradient(160deg, #0b1220 0%, #14234a 62%, #1e40af 130%); color: #e2e8f0; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-brand-top { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 17px; color: #fff; }
.auth-logo { height: 34px; border-radius: 8px; background: #fff; padding: 3px 5px; }
.auth-brand-copy h2 { font-size: 30px; line-height: 1.25; font-weight: 700; color: #fff; letter-spacing: -.02em; margin: 0 0 22px; max-width: 440px; }
.auth-brand-copy ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.auth-brand-copy li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: #cbd5e1; }
.auth-brand-copy li::before { content: ""; width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; border-radius: 50%; background: rgba(96,165,250,.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2393c5fd' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat; }
.auth-brand-foot { font-size: 13px; color: #64748b; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.auth-card { width: 100%; max-width: 380px; }
.auth-mobile-logo { display: none; }
.auth-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); margin: 0 0 6px; }
.auth-sub { color: var(--ink-3); margin: 0 0 28px; font-size: 15px; }
.auth-card .form-group { margin-bottom: 16px; }
.auth-card .form-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.auth-card .form-label a { font-weight: 500; }
.auth-card .form-control { height: 44px; border: 1px solid #d1d5db; border-radius: 8px; padding: 0 12px; font-size: 15px; width: 100%; box-sizing: border-box; }
.auth-card .form-control:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.auth-card .btn { height: 44px; width: 100%; justify-content: center; font-size: 15px; font-weight: 600; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-card .btn-google { background: #fff; border: 1px solid #d1d5db; color: var(--ink); gap: 10px; }
.auth-note { text-align: center; margin-top: 24px; font-size: 12px; color: var(--ink-3); }
.auth-card .alert { margin-bottom: 16px; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-mobile-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--ink); margin-bottom: 28px; }
  .auth-mobile-logo img { height: 32px; border-radius: 6px; }
}

/* ----- v7: kanban columns fill height, whole column is a drop zone ----- */
#kanbanBoard { align-items: flex-start; }
.kanban-col { display: flex; flex-direction: column; height: max(320px, calc(100vh - 230px)); }
.kanban-col .kanban-cards { flex: 1 1 auto; min-height: 120px !important; overflow-y: auto; scrollbar-width: thin; padding-right: 2px; }
