/*
 * Merged Human Resources layout.
 * This file intentionally scopes the Figma-aligned treatment to the shared
 * Agent Management panel so the legacy standalone HR modal remains compatible.
 */
.agent-management-panel[data-active-tab="humanResources"] {
    overflow: hidden;
    padding: 10px 12px 12px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-shell-embedded {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    overflow: hidden;
    color: #e9ecff;
    font-family: var(--ui-font-family);
    font-size: 7px;
}

.hr-embedded-summary {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(300px, 2.3fr);
    gap: 8px;
}

.hr-summary-stats {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(100px, 1fr));
    gap: 8px;
}

.hr-summary-card,
.hr-ops-console {
    height: 54px;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #34375c;
    border-radius: 7px;
    background: #1b1d3b;
}

.hr-summary-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: 1fr 1fr;
    align-items: center;
    gap: 0 7px;
    padding: 8px 10px;
}

.hr-summary-card strong {
    grid-row: 1 / -1;
    color: currentColor;
    font-size: 13px;
    line-height: 1;
}

.hr-summary-card span {
    align-self: end;
    overflow: hidden;
    color: #eef0ff;
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hr-summary-card small {
    align-self: start;
    overflow: hidden;
    color: #898eaf;
    font-size: 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hr-ops-console {
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 7px 10px;
}

.hr-ops-heading,
.hr-ops-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.hr-ops-heading strong {
    color: #f4d60b;
    font-size: 8px;
}

.hr-ops-heading small {
    margin-left: auto;
    color: #57d7ff;
    font-size: 6px;
}

.hr-ops-console .hr-state-chip {
    max-width: 90px;
    padding: 2px 5px;
    font-size: 6px;
}

.hr-ops-actions {
    overflow: hidden;
}

.hr-ops-action {
    min-width: 0;
    padding: 2px 5px;
    overflow: hidden;
    color: #aeb4d4;
    border: 0;
    border-right: 1px solid #414568;
    background: transparent;
    font: inherit;
    font-size: 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.hr-ops-action:last-child {
    border-right: 0;
}

.hr-ops-action:hover,
.hr-ops-action:focus-visible {
    color: #57d7ff;
    outline: none;
}

.hr-ops-action:disabled {
    cursor: wait;
    opacity: .55;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-agent-detail {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: #4d527c #14162f;
    scrollbar-width: thin;
    background: #151734;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-agent-detail::-webkit-scrollbar {
    width: 7px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-agent-detail::-webkit-scrollbar-track {
    background: #14162f;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-agent-detail::-webkit-scrollbar-thumb {
    border: 2px solid #14162f;
    border-radius: 8px;
    background: #4d527c;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-detail-view {
    min-height: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
    align-content: start;
    gap: 8px;
    padding: 10px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-degraded-banner,
.agent-management-panel[data-active-tab="humanResources"] .hr-back-button,
.agent-management-panel[data-active-tab="humanResources"] .hr-detail-hero,
.agent-management-panel[data-active-tab="humanResources"] .hr-detail-metadata,
.agent-management-panel[data-active-tab="humanResources"] .hr-identity-section,
.agent-management-panel[data-active-tab="humanResources"] .hr-access-section {
    grid-column: 1 / -1;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-back-button {
    padding: 3px 0;
    color: #898eaf;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 7px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-detail-view > section {
    border-color: #34375c;
    border-radius: 7px;
    background: #1b1d3b;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-detail-hero {
    min-height: 70px;
    box-sizing: border-box;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-left: 3px solid #43e3c2 !important;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-eyebrow {
    color: #57d7ff;
    font-size: 6px;
    letter-spacing: 0;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-detail-hero h3 {
    margin: 5px 0 6px;
    font-size: 13px;
    line-height: 1.1;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-detail-hero p {
    margin: 0;
    color: #9297bc;
    font-size: 7px;
    line-height: 1.45;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-state-chip {
    padding: 3px 7px;
    font-size: 7px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-detail-metadata {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    border-radius: 7px;
    background: #34375c !important;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-detail-metadata > div {
    gap: 5px;
    padding: 9px 10px;
    background: #1b1d3b;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-detail-metadata span {
    color: #858aaa;
    font-size: 6px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-detail-metadata strong {
    color: #eef0ff;
    font-size: 7px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-detail-section {
    min-width: 0;
    padding: 10px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-detail-section > h4 {
    margin: 0 0 8px;
    color: #f4d60b;
    font-size: 9px;
    line-height: 1.2;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-history-list {
    border-color: #34375c;
    border-radius: 5px;
    background: #34375c;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-history-list li {
    grid-template-columns: minmax(100px, .8fr) minmax(120px, 1fr) auto;
    gap: 8px;
    padding: 7px 8px;
    background: #171933;
    font-size: 7px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-history-list time {
    font-size: 6px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-record-list {
    gap: 7px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-record-date-button {
    min-height: 36px;
    padding: 8px 9px;
    border-color: #34375c;
    border-radius: 6px;
    background: #171933;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-record-date-button strong {
    font-size: 8px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-record-date-button span {
    font-size: 6px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-record-dialog {
    width: min(880px, 88vw);
    border-radius: 8px;
    background: #101129;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-record-card {
    padding: 9px;
    border-color: #34375c;
    border-radius: 6px;
    background: #171933;
    font-size: 7px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-record-card > header {
    gap: 8px;
    margin-bottom: 6px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-record-card header strong {
    font-size: 9px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-record-card header small,
.agent-management-panel[data-active-tab="humanResources"] .hr-record-card footer {
    font-size: 6px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-record-card p,
.agent-management-panel[data-active-tab="humanResources"] .hr-record-card li,
.agent-management-panel[data-active-tab="humanResources"] .hr-record-card summary,
.agent-management-panel[data-active-tab="humanResources"] .hr-runtime-diagnosis {
    font-size: 7px;
    line-height: 1.5;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-report-grid,
.agent-management-panel[data-active-tab="humanResources"] .hr-assessment-grid {
    gap: 7px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-report-grid h5,
.agent-management-panel[data-active-tab="humanResources"] .hr-assessment-grid h5 {
    font-size: 7px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-inline-empty,
.agent-management-panel[data-active-tab="humanResources"] .hr-panel-placeholder,
.agent-management-panel[data-active-tab="humanResources"] .hr-degraded-banner {
    margin: 0;
    padding: 9px;
    font-size: 7px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-overview {
    gap: 8px;
    padding: 10px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-overview section {
    padding: 10px;
    border-color: #34375c;
    border-radius: 7px;
    background: #1b1d3b;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-overview section > h3,
.agent-management-panel[data-active-tab="humanResources"] .hr-command-panel h3,
.agent-management-panel[data-active-tab="humanResources"] .hr-schedule-panel h3 {
    margin-bottom: 7px;
    font-size: 9px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-command-panel p,
.agent-management-panel[data-active-tab="humanResources"] .hr-schedule-panel p,
.agent-management-panel[data-active-tab="humanResources"] .hr-schedule-form label,
.agent-management-panel[data-active-tab="humanResources"] .hr-activity-list li {
    font-size: 7px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-schedule-panel {
    grid-template-columns: minmax(210px, .48fr) minmax(780px, 2.2fr);
    align-items: center;
    gap: 14px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-schedule-copy {
    min-width: 0;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-schedule-form {
    grid-template-columns: 92px 132px 108px 66px 92px 66px minmax(122px, auto) auto;
    align-items: end;
    justify-content: end;
    gap: 8px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-schedule-form label {
    min-width: 0;
    color: #898eaf;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-schedule-form label span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-schedule-form input[type="time"],
.agent-management-panel[data-active-tab="humanResources"] .hr-schedule-form input[type="text"],
.agent-management-panel[data-active-tab="humanResources"] .hr-schedule-form input[type="number"] {
    height: 30px;
    padding: 5px 7px;
    border-color: #34375c;
    border-radius: 6px;
    background: #10182a;
    color: #e9ecff;
    box-shadow: inset 0 0 0 1px rgba(87, 215, 255, .04);
    font: inherit;
    font-size: 8px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-schedule-form input[type="time"]:focus,
.agent-management-panel[data-active-tab="humanResources"] .hr-schedule-form input[type="text"]:focus,
.agent-management-panel[data-active-tab="humanResources"] .hr-schedule-form input[type="number"]:focus {
    border-color: #57d7ff;
    box-shadow: 0 0 0 2px rgba(87, 215, 255, .12), inset 0 0 0 1px rgba(87, 215, 255, .10);
}

.agent-management-panel[data-active-tab="humanResources"] .hr-schedule-form .hr-schedule-enabled {
    min-height: 30px;
    color: #aeb4d4;
    white-space: nowrap;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-schedule-form .hr-schedule-enabled input {
    width: 12px;
    height: 12px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-command-button {
    padding: 5px 7px;
    font-size: 7px;
}

.agent-management-panel[data-active-tab="humanResources"] .hr-schedule-save {
    min-height: 30px;
}

@media (max-width: 1200px) {
    .hr-embedded-summary {
        grid-template-columns: 1fr;
    }

    .hr-ops-console {
        height: auto;
        min-height: 54px;
    }

    .agent-management-panel[data-active-tab="humanResources"] .hr-schedule-panel {
        grid-template-columns: 1fr;
    }

    .agent-management-panel[data-active-tab="humanResources"] .hr-schedule-form {
        grid-template-columns: repeat(3, minmax(90px, 1fr));
        justify-content: stretch;
    }

    .agent-management-panel[data-active-tab="humanResources"] .hr-schedule-save {
        width: 100%;
    }
}

@media (max-width: 920px) {
    .hr-summary-stats {
        grid-template-columns: repeat(2, minmax(100px, 1fr));
    }

    .agent-management-panel[data-active-tab="humanResources"] .hr-detail-view {
        grid-template-columns: 1fr;
    }

    .agent-management-panel[data-active-tab="humanResources"] .hr-reports-section,
    .agent-management-panel[data-active-tab="humanResources"] .hr-assessments-section {
        grid-column: 1;
    }

    .agent-management-panel[data-active-tab="humanResources"] .hr-detail-metadata {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
