/* ==========================================================================
   EduSphere HR — Console styling.

   Deliberately does NOT redefine --es-ink/--es-paper/etc. — those are
   Portal's tokens (assets/css/portal.css) and this module's console is
   wrapped in the same `.edusphere-portal` shell class so it inherits them
   for free (buttons, alerts, section/grid/table chrome, the dashboard
   shell). This file only adds the one new accent this module needs — a
   muted plum, distinct from Portal's ochre/teal/clay — plus the small
   number of components the console needs that Portal doesn't already have
   (tabs, kanban board, approval rows).
   ========================================================================== */

.edusphere-hr {
    --es-hr-plum: #6b4e6f;
    --es-hr-plum-tint: #f2ecf3;
    --es-hr-plum-dark: #52394f;
}

.es-hr-seal {
    background: var(--es-hr-plum);
}

/* ---- Tabs -------------------------------------------------------------- */

.es-hr-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid var(--es-line);
    margin: 20px 0 24px;
}

.es-hr-tab {
    padding: 10px 16px;
    font-size: 14px;
    color: var(--es-slate);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.es-hr-tab:hover {
    color: var(--es-ink);
}

.es-hr-tab.is-active {
    color: var(--es-hr-plum-dark);
    border-bottom-color: var(--es-hr-plum);
    font-weight: 600;
}

/* ---- Forms --------------------------------------------------------------- */

.es-hr-inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 12px 0 20px;
}

.es-hr-inline-form input,
.es-hr-inline-form select,
.es-hr-inline-form textarea {
    font-family: var(--es-font-body);
    font-size: 13px;
    padding: 7px 10px;
    border: 1px solid var(--es-line);
    border-radius: var(--es-radius);
    background: var(--es-paper-raised);
    color: var(--es-ink);
}

.es-hr-stacked-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 420px;
    margin: 12px 0 24px;
}

.es-hr-stacked-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--es-slate);
}

.es-hr-stacked-form input,
.es-hr-stacked-form select,
.es-hr-stacked-form textarea {
    font-family: var(--es-font-body);
    font-size: 14px;
    padding: 8px 10px;
    border: 1px solid var(--es-line);
    border-radius: var(--es-radius);
    background: var(--es-paper-raised);
    color: var(--es-ink);
}

.es-hint {
    font-size: 12px;
    color: var(--es-slate-light);
}

/* ---- Tables -------------------------------------------------------------- */

.es-hr-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 28px;
}

.es-hr-table th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--es-slate);
    padding: 8px 10px;
    border-bottom: 1px solid var(--es-line);
}

.es-hr-table td {
    padding: 10px;
    font-size: 14px;
    border-bottom: 1px solid var(--es-line-soft);
}

.es-hr-amount {
    font-family: var(--es-font-mono);
}

.es-hr-payslip-row td {
    padding-left: 24px;
    font-size: 13px;
    color: var(--es-slate);
    border-bottom: 1px dashed var(--es-line-soft);
}

/* ---- Status badges --------------------------------------------------------- */

.es-hr-status-active { background: var(--es-teal-tint); color: var(--es-teal); }
.es-hr-status-on_leave { background: var(--es-hr-plum-tint); color: var(--es-hr-plum-dark); }
.es-hr-status-suspended,
.es-hr-status-exited { background: var(--es-clay-tint); color: var(--es-clay); }

.es-badge-warning {
    background: var(--es-clay-tint);
    color: var(--es-clay);
}

/* ---- Approval queue rows --------------------------------------------------- */

.es-hr-approval-row {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}

/* ---- Recruitment kanban ------------------------------------------------- */

.es-hr-pipeline {
    border: 1px solid var(--es-line);
    border-radius: var(--es-radius);
    padding: 16px;
    margin-bottom: 24px;
    background: var(--es-paper-raised);
}

.es-hr-kanban {
    display: grid;
    grid-template-columns: repeat(6, minmax(160px, 1fr));
    gap: 10px;
    overflow-x: auto;
    margin-top: 12px;
}

.es-hr-kanban-column {
    background: var(--es-paper);
    border-radius: var(--es-radius);
    padding: 8px;
    min-height: 60px;
}

.es-hr-kanban-column h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--es-slate);
    margin: 4px 4px 8px;
}

.es-hr-kanban-card {
    background: var(--es-paper-raised);
    border: 1px solid var(--es-line);
    border-radius: var(--es-radius);
    padding: 8px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}

.es-hr-kanban-card .es-hr-inline-form,
.es-hr-kanban-card .es-hr-stacked-form {
    margin: 4px 0 0;
    gap: 4px;
}

@media (max-width: 900px) {
    .es-hr-kanban {
        grid-template-columns: 1fr;
    }
}
