/* v0.4 design fidelity layer — tokens from 03 design-source/tokens.css. No product logic. */
@font-face {
    font-family: "GFI Inter";
    src: url("../fonts/inter-variable-4.1.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --v04-canvas: #f1f4f7;
    --v04-ink: #243448;
    --v04-navy: #102e50;
    --v04-blue: #0067ad;
    --v04-line: #d6e0e8;
    --v04-muted: #495f73;
    --v04-pale: #e8f2fa;
}

/* —— Guest auth (V01–V05) —— */
body.guest-page .login-shell.phase2-guest {
    background: var(--v04-canvas);
}

body.guest-page .phase2-guest {
    --navy: var(--v04-navy);
    --blue: var(--v04-blue);
    --line: var(--v04-line);
    --muted: var(--v04-muted);
    --text: var(--v04-ink);
    font-family: "GFI Inter", "GFI Noto Sans JP", "Noto Sans JP", "Segoe UI", "Yu Gothic", Meiryo, sans-serif;
}

body.guest-page .phase2-guest .login-card,
body.guest-page .phase2-guest .login-card-wide {
    width: min(520px, 100%);
    max-width: 100%;
    min-width: 0;
    margin-block: auto;
    padding: 28px 24px 22px;
    border-radius: 7px;
    box-shadow: none;
}

body.guest-page .phase2-guest .login-logo {
    width: min(140px, 52vw);
    height: auto;
    margin: 0 auto 22px;
    display: block;
}

body.guest-page .phase2-guest .login-card h1 {
    font-size: 1.35rem;
    font-weight: 750;
    color: var(--v04-navy);
}

body.guest-page .phase2-guest .auth-form .input {
    border-color: #afc0cf;
    border-radius: 5px;
    min-height: 44px;
}

body.guest-page .phase2-guest .btn {
    min-height: 42px;
    border-radius: 5px;
    font-weight: 600;
}

@media (max-width: 390px) {
    body.guest-page .phase2-guest .login-card,
    body.guest-page .phase2-guest .login-card-wide {
        padding: 20px 16px 16px;
    }

    body.guest-page .phase2-guest .btn {
        min-height: 44px;
        width: 100%;
    }
}

/* —— Authenticated admin chrome —— */
body:not(.guest-page) {
    background: var(--v04-canvas);
    color: var(--v04-ink);
}

body:not(.guest-page) .app-shell {
    --sidebar: 224px;
}

body:not(.guest-page) .topbar {
    height: 56px;
    min-height: 56px;
    padding: 0 28px;
    gap: 16px;
    font-size: 13px;
}

body:not(.guest-page) .topbar .phase2-topbar-title h1,
body:not(.guest-page) .topbar h1 {
    color: var(--v04-navy);
    font-size: 1.05rem;
    font-weight: 750;
}

body:not(.guest-page) .content {
    max-width: 1480px;
    padding: 26px 28px 48px;
}

body:not(.guest-page) .content .page-head {
    margin-bottom: 18px;
}

body:not(.guest-page) .content .page-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.015em;
    color: var(--v04-navy);
}

body:not(.guest-page) .sidebar .brand {
    padding: 24px 0 8px 12px;
    height: auto;
    background: transparent;
    border-bottom: 0;
    margin: 0;
}

body:not(.guest-page) .sidebar .brand img {
    width: 140px;
    margin-left: 0;
}

body:not(.guest-page) .content :is(.employee-table, .data-table, .dashboard-table) th {
    background: #eaf0f6;
    color: #344e65;
    font-weight: 700;
}

body:not(.guest-page) .content :is(.employee-table, .data-table, .dashboard-table) td {
    font-size: 13px;
    border-bottom-color: #e6edf2;
}

body:not(.guest-page) .content :is(.employee-table, .data-table) tbody tr:nth-child(even):not(.is-current-org) {
    background: #fafbfd;
}

body:not(.guest-page) .content :is(.employee-table, .data-table) tbody tr:hover {
    background: #edf5fb;
}

body:not(.guest-page) .card,
body:not(.guest-page) .ledger-bar {
    border-radius: 7px;
    box-shadow: none;
}

body:not(.guest-page) .ledger-bar {
    padding: 16px 20px;
    border: 1px solid var(--v04-line);
}

body:not(.guest-page) .dashboard-metric-card {
    border-radius: 7px;
    box-shadow: none;
    border: 1px solid var(--v04-line);
}

body:not(.guest-page) .dashboard-quick-card {
    border-top: 3px solid var(--v04-blue);
}

body:not(.guest-page) .dashboard-activity-card {
    border-top: 3px solid var(--v04-navy);
}

body:not(.guest-page) .employee-identity,
body:not(.guest-page) .phase2-asset-panel,
body:not(.guest-page) .phase2-account-panel,
body:not(.guest-page) [data-page="onboarding"] .phase2-onboarding-list {
    border-top: 3px solid var(--v04-blue);
}

body:not(.guest-page) .content .master-panel {
    border-top: 3px solid var(--v04-blue);
}

body:not(.guest-page) .detail-tabs .tab-btn.is-active {
    color: var(--v04-blue);
    font-weight: 700;
    border-bottom-color: var(--v04-blue);
}

body:not(.guest-page) [data-page="onboarding"] .phase2-onboarding-list th {
    background: #eaf0f6;
    color: #344e65;
}

body:not(.guest-page) .btn-primary {
    background: var(--v04-blue);
    border-color: var(--v04-blue);
}

body:not(.guest-page) .btn-primary:hover {
    background: #00558e;
    border-color: #00558e;
}

@media (max-width: 1100px) {
    body:not(.guest-page) .content {
        padding-inline: 22px;
    }

    body:not(.guest-page) .app-shell {
        --sidebar: 218px;
    }
}

@media (max-width: 760px) {
    body:not(.guest-page) .content {
        padding: 16px 14px 28px;
    }

    body:not(.guest-page) .topbar {
        height: 48px;
        min-height: 48px;
        padding: 0 14px;
    }

    body:not(.guest-page) .content .page-title {
        font-size: 24px;
    }
}

/* —— v0.4 tokens: chrome lock (override layout.css :root sidebar widening) —— */
@media (max-width: 1280px) {
    body:not(.guest-page) {
        --sidebar: 224px;
    }
}

/* —— Tabs (employee detail 6 tabs) —— */
body:not(.guest-page) .detail-tabs {
    gap: 4px;
    border-bottom-color: #c9d7e4;
    margin-bottom: 20px;
}

body:not(.guest-page) .detail-tabs .tab-btn {
    padding: 12px 14px 10px;
    min-height: 44px;
    font-size: 14px;
    color: var(--v04-muted);
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
}

body:not(.guest-page) .detail-tabs .tab-btn:hover {
    background: #e5eef6;
    color: var(--v04-navy);
}

body:not(.guest-page) .detail-tabs .tab-btn.is-active {
    color: var(--v04-blue);
    font-weight: 700;
    border-bottom-color: var(--v04-blue);
    background: transparent;
}

/* —— Panels / notices / status —— */
body:not(.guest-page) .content .notice.notice-info {
    background: #eaf2f9;
    border-left: 3px solid var(--v04-blue);
    color: #365571;
    font-size: 13px;
}

body:not(.guest-page) .content h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--v04-navy);
}

body:not(.guest-page) .content h3 {
    font-size: 15px;
    color: var(--v04-navy);
}

body:not(.guest-page) .page-head-sub,
body:not(.guest-page) .phase2-page-heading .page-head-sub {
    font-size: 14px;
    color: var(--v04-muted);
}

body:not(.guest-page) :is(.input, .select, .textarea) {
    border-color: #afc0cf;
    border-radius: 5px;
}

body:not(.guest-page) .modal-content,
body:not(.guest-page) .account-edit-modal {
    border-radius: 8px;
    width: min(520px, 100%);
}

body:not(.guest-page) .sidebar .nav-link {
    font-size: 14px;
    line-height: 1.5;
    min-height: 42px;
    white-space: nowrap;
}

body:not(.guest-page) .sidebar .nav-group-label,
body:not(.guest-page) .sidebar .nav-label {
    letter-spacing: 0.08em;
    font-size: 11px;
}

/* —— Log screens (V07/V08) —— */
body:not(.guest-page) .log-card {
    border: 1px solid var(--v04-line);
    border-radius: 7px;
    box-shadow: none;
}

body:not(.guest-page) .log-card .log-filters {
    padding: 16px 20px;
    border-bottom: 1px solid var(--v04-line);
}

/* —— Master panels (V09–V12) —— */
body:not(.guest-page) .master-panel .split-title h2 {
    font-size: 18px;
    font-weight: 700;
}

/* —— Phase2 screens (derive from v0.4) —— */
body:not(.guest-page) .extu-panel,
body:not(.guest-page) .phase2-asset-panel,
body:not(.guest-page) .phase2-account-panel {
    border-radius: 7px;
}

body:not(.guest-page) .dashboard-page .metric-label {
    font-size: 12px;
    color: var(--v04-muted);
}

body:not(.guest-page) .dashboard-page .metric-value {
    font-size: 30px;
    font-weight: 700;
    color: var(--v04-navy);
}

/* v0.4 page structure. Only the authenticated shell uses these panels. */
.topbar .topbar-location {
    color: var(--v04-navy);
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}

.topbar .topbar-product,
.content .page-section-label {
    color: var(--v04-muted);
}

.content .page-section-label {
    color: var(--v04-blue);
    font-size: 12px;
    font-weight: 700;
    margin: 0 0 4px;
}

body:not(.guest-page) .content .page-title {
    line-height: 1.3;
    margin: 0;
    overflow-wrap: anywhere;
}

.content .page-head-sub {
    margin: 5px 0 0;
}

.content .v04-panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
}

.content .v04-panel-grid > *,
.content .v04-organization-layout > * {
    min-width: 0;
}

.content .v04-panel-grid > .card {
    margin: 0;
}

.content .employee-form-pair,
.content .v04-master-pair {
    margin-bottom: 14px;
}

.content .employee-form-pair .form-section {
    align-self: stretch;
}

.content .v04-panel-head,
.content .v04-panel-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 14px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--v04-line);
}

.content .v04-panel-head > h2 {
    margin: 0;
}

.content .v04-panel-foot {
    border-bottom: 0;
    border-top: 1px solid var(--v04-line);
}

.content .directory-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 14px;
}

.content .directory-metric {
    border-left: 3px solid var(--v04-blue);
    margin: 0;
    padding: 12px 16px;
}

.directory-metric dt {
    color: var(--v04-muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.directory-metric dd {
    color: var(--v04-navy);
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.directory-metric dd span {
    font-size: 12px;
}

.content .employee-results .ledger-bar {
    align-items: end;
    border: 0;
    border-bottom: 1px solid var(--v04-line);
    border-radius: 0;
    margin: 0;
}

.directory-search {
    display: grid;
    flex: 1 1 15rem;
    min-width: 0;
    gap: 4px;
    font-size: 13px;
}

.directory-core {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.directory-core .badge {
    white-space: normal;
}

.content .employee-results .employee-table {
    min-width: 1030px;
}

.content .employee-results .employee-table :is(th, td):nth-child(11) {
    white-space: normal;
}

.content .employee-results .employee-table tbody td:last-child {
    background: inherit;
}

.content .employee-results .employee-table :is(th, td) {
    padding-inline: 8px;
}

.content .employee-identity {
    padding: 14px 18px;
    margin: 0 0 14px;
}

.content .employee-identity .employee-summary {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 12px;
    margin: 0;
    padding: 0;
    border: 0;
}

.employee-profile-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--v04-pale);
    color: var(--v04-blue);
}

.employee-profile-avatar svg {
    width: 24px;
    height: 24px;
}

.employee-summary-main {
    flex: 1 1 auto;
    min-width: 0;
}

.content .employee-summary-main .employee-name {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
}

.content .employee-detail-sections .detail-tabs {
    border: 1px solid var(--v04-line);
    border-radius: 7px;
    margin-bottom: 14px;
}

.employee-detail-sections .tab-panel > .v04-panel-grid,
.employee-detail-sections .tab-panel > .v04-detail-panel,
.employee-detail-sections .tab-panel > .v04-panel-head {
    margin-bottom: 14px;
}

.employee-detail-sections .v04-detail-panel {
    padding: 14px 18px;
}

.employee-detail-sections .v04-detail-panel > :is(h2, h3) {
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--v04-line);
}

.employee-detail-sections #business-attributes {
    margin: 10px 0 0;
}

.employee-detail-sections .fit-table {
    width: 100%;
}

.employee-history-pair .fit-table td {
    overflow-wrap: anywhere;
}

.employee-detail-sections .tab-panel > .v04-panel-head {
    background: #fff;
    border: 1px solid var(--v04-line);
    border-radius: 7px;
}

.content .v04-organization-layout {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) minmax(0, 3fr);
    gap: 14px;
    align-items: start;
}

.v04-organization-tree {
    padding: 0;
}

.v04-organization-tree ul {
    list-style: none;
    padding: 0 0 0 14px;
    margin: 0 10px 0 0;
}

.v04-organization-tree > ul {
    margin-block: 8px;
}

.v04-organization-tree ul:empty {
    display: none;
}

.v04-organization-tree a {
    display: block;
    padding: 6px 8px;
    color: var(--v04-navy);
    overflow-wrap: anywhere;
}

.v04-organization-tree a:is(:hover, :focus-visible),
.v04-organization-tables tr:target {
    background: var(--v04-pale);
}

.v04-organization-tables tr {
    scroll-margin-top: 68px;
}

.content .master-panel :is(.master-head, .master-head-actions) {
    flex-wrap: wrap;
}

.content .master-panel .master-edit-form .btn-primary {
    color: var(--v04-blue);
    background: white;
    border-color: var(--v04-line);
}

.content .master-panel .master-edit-form .btn-primary:hover {
    background: var(--v04-pale);
}

.content .log-card .v04-panel-head {
    margin-bottom: 0;
}

.content .log-card .log-filters {
    margin-bottom: 0;
}

.content .log-card .log-page-table {
    margin: 0;
}

.content .v04-dashboard-columns {
    gap: 14px;
}

@media (max-width: 760px) {
    body:not(.guest-page) .topbar {
        min-height: 56px;
    }

    .content .v04-panel-grid,
    .content .v04-organization-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .content .directory-metrics {
        gap: 6px;
    }

    .content .directory-metric,
    .content .v04-panel-head,
    .content .v04-panel-foot {
        padding: 10px 12px;
    }

    .content .directory-metric {
        padding-inline: 8px;
    }

    .directory-metric dd {
        font-size: 20px;
    }

    .content .employee-results .employee-table {
        min-width: 0;
    }

    .content .employee-identity {
        padding: 12px;
    }

    .content .employee-identity .employee-summary {
        flex-wrap: wrap;
    }

    .employee-identity .employee-summary-badges {
        display: flex;
    }

    .employee-identity .employee-summary-side {
        width: 100%;
        align-items: flex-start;
    }

    .content .employee-detail-sections .detail-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        overflow: visible;
    }

    body:not(.guest-page) .employee-detail-sections .detail-tabs .tab-btn {
        padding: 6px 4px;
        font-size: 12px;
        white-space: normal;
        line-height: 1.35;
    }

    .employee-detail-sections .v04-detail-panel {
        padding: 12px;
    }

    .content .v04-detail-records,
    .content .v04-detail-records tbody,
    .content .v04-detail-records tr,
    .content .log-page-table,
    .content .log-page-table tbody,
    .content .log-page-table tr {
        display: block;
        width: auto;
        min-width: 0;
    }

    .content .v04-detail-records thead,
    .content .log-page-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        clip-path: inset(50%);
        overflow: hidden;
    }

    .content .log-page-table tbody {
        padding: 0 10px;
    }

    .content .v04-detail-records tbody tr,
    .content .log-page-table tbody tr {
        border: 1px solid var(--v04-line);
        border-radius: 7px;
        margin-block: 8px;
        padding: 4px 8px;
    }

    .content .v04-detail-records tbody td[data-label],
    .content .log-page-table tbody td {
        display: grid;
        grid-template-columns: 4rem minmax(0, 1fr);
        align-items: start;
        gap: 6px;
        padding: 5px 0;
        width: auto;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .content .v04-detail-records tbody td[data-label]::before,
    .content .log-page-table tbody td::before {
        content: attr(data-label);
        color: var(--v04-muted);
        font-weight: 600;
    }
}

@media (min-width: 761px) {
    .employee-results .filter-details {
        flex: 2 1 32rem;
        min-width: 0;
    }

    .employee-results .filter-details > summary {
        display: none;
    }

    .employee-results .filter-details::details-content {
        content-visibility: visible;
        block-size: auto;
    }

    .employee-results .filter-details .filter-details-body {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        margin: 0;
    }

    .employee-results .filter-details .ledger-bar-field {
        min-width: 0;
    }
}

.employee-identity .employee-summary-side {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.employee-identity .employee-summary-badges {
    gap: 8px 14px;
    margin: 0;
}

.employee-summary-badges dt,
.employee-audit-meta {
    color: var(--v04-muted);
    font-size: 12px;
}

.employee-summary-badges dd {
    margin: 3px 0 0;
}

.employee-detail-sections #basic .v04-detail-panel > h3 {
    margin: -14px -18px 8px;
    background: #f5f8fb;
    border-radius: 7px 7px 0 0;
    padding: 10px 18px;
}

.employee-detail-sections #basic .data-list {
    padding: 0;
}

.employee-detail-sections #basic #business-attributes .data-row:last-child {
    grid-column: 1 / -1;
}

.v04-detail-history-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 12px;
    border-bottom: 1px solid var(--v04-line);
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.v04-detail-history-head h2 {
    margin: 0;
}

.employee-audit-timeline {
    margin: 0;
    padding: 0 0 0 12px;
    list-style: none;
}

.employee-audit-timeline li {
    position: relative;
    display: grid;
    justify-items: start;
    gap: 4px;
    padding: 4px 12px 14px;
    border-left: 2px solid var(--v04-line);
    overflow-wrap: anywhere;
}

.employee-audit-timeline li::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--v04-blue);
}

.employee-audit-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 10px;
}

@media (max-width: 760px) {
    .employee-detail-sections #basic .v04-detail-panel > h3 {
        margin: -12px -12px 8px;
        padding-inline: 12px;
    }
}

/* Final v0.4 rhythm for the authenticated shell and management panels. */
body:not(.guest-page) .content .page-head .page-title {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    font-size: 26px;
    font-weight: 700;
}

body:not(.guest-page) .content .page-head {
    align-items: end;
}

body:not(.guest-page) .content h2 {
    font-size: 16px;
}

.content .v04-panel-head,
.content .master-panel .master-head {
    padding-block: 13px;
}

.v04-heading-icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    color: var(--v04-blue);
}

.v04-detail-history-head h2,
.content .v04-panel-head > h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

body:not(.guest-page) .content .employee-identity {
    border-top: 1px solid var(--v04-line);
    padding: 16px 20px;
}

.employee-identity .employee-summary-badges {
    display: flex;
}

.employee-identity .employee-summary-badges > div {
    padding-inline: 12px 4px;
    border-left: 1px solid var(--v04-line);
}

.content .detail-pair-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content .detail-pair-list > .data-row,
body:not(.guest-page) #basic .detail-pair-list .data-row {
    grid-template-columns: minmax(0, 7rem) minmax(0, 1fr);
    min-height: 38px;
}

.content .employee-attribute-card {
    display: grid;
    gap: 10px;
    margin-block: 14px;
    padding: 16px 20px;
}

.content .employee-attribute-card .data-list {
    padding-inline: 0;
}

.directory-metric {
    position: relative;
}

.directory-metric dt,
.directory-metric dd {
    padding-inline-start: 50px;
}

.directory-metric-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    color: var(--v04-blue);
    background: var(--v04-pale);
}

.directory-metric-icon svg {
    width: 19px;
    height: 19px;
}

.directory-filter-actions {
    display: flex;
    width: 100%;
    gap: 8px;
}

.content .directory-core .badge {
    color: #174d74;
    background: var(--v04-pale);
    overflow-wrap: anywhere;
}

.content .directory-search input {
    width: 100%;
}

.v04-organization-tables {
    display: grid;
    gap: 14px;
}

.content .v04-organization-tables > .master-panel {
    margin: 0;
}

.v04-organization-tree ul ul {
    border-left: 1px solid var(--v04-line);
    margin-inline-start: 12px;
    padding-inline-start: 8px;
}

.v04-organization-tree a {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 5px;
}

.v04-organization-tree a[aria-current="location"] {
    background: var(--v04-pale);
    color: var(--v04-blue);
    font-weight: 700;
}

.v04-organization-note {
    margin-top: 14px;
}

.content .master-panel .data-table [data-deactivate-open] {
    background: #fff;
    border-color: #b85049;
    color: #a12d2a;
}

.content .master-panel .data-table [data-deactivate-open]:hover {
    background: #fae9e8;
}

.content .master-panel .master-edit-form {
    gap: 6px;
}

.content .v04-master-pair .data-table {
    min-width: 0;
}

.content .v04-master-pair .data-table :is(td, th) {
    white-space: normal;
    overflow-wrap: anywhere;
}

.content .v04-master-pair .master-edit-form .input {
    min-width: 5rem;
}

.content .v04-master-pair .data-table :is(.btn, .badge) {
    white-space: nowrap;
}

.content .v04-master-pair .data-table .btn {
    padding-inline: 8px;
}

@media (min-width: 761px) {
    .content .v04-master-pair .data-table :is(td, th) {
        padding-inline: 6px;
    }

    .content .v04-master-pair .data-table :is(td, th):nth-child(4) {
        width: 62px;
    }

    .content .v04-master-pair .data-table :is(td, th):last-child {
        width: 76px;
    }
}

.content .log-card .log-page-table :is(th, td),
.content .employee-history-pair :is(th, td) {
    font-size: 13px;
    line-height: 1.55;
}

.content .log-card .log-page-table :is(th, td) {
    padding-block: 10px;
}

.content .employee-history-pair {
    gap: 16px;
}

.content .employee-history-pair .v04-detail-panel {
    padding-block: 16px;
}

.employee-audit-timeline li {
    padding-bottom: 16px;
}

@media (max-width: 900px) {
    body:not(.guest-page) .topbar {
        background: var(--v04-navy);
        border-bottom-color: #365571;
    }

    .topbar .nav-toggle {
        width: 44px;
        height: 44px;
        color: white;
        background: transparent;
        border-color: #67829d;
    }

    .topbar .topbar-logo img {
        width: 130px;
    }

    .topbar .account-menu-summary {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 760px) {
    body:not(.guest-page) .content .page-head .page-title {
        font-size: 22px;
    }

    body:not(.guest-page) .content .page-head {
        align-items: start;
        gap: 8px;
        margin-bottom: 12px;
    }

    body:not(.guest-page) .content :is(.page-head-actions, .directory-filter-actions, .employee-summary-actions, .master-head-actions) .btn {
        min-height: 44px;
    }

    .content .employee-identity,
    .content .employee-attribute-card {
        padding: 12px 14px;
    }

    .employee-identity .employee-summary-side {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .employee-identity .employee-summary-badges {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .employee-identity .employee-summary-badges > div {
        padding-inline: 6px 0;
    }

    .employee-identity .employee-summary-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .employee-identity .employee-summary-actions .employee-summary-edit {
        min-height: 44px;
        width: 100%;
        justify-content: center;
    }

    .employee-detail-sections #tab-premium .tab-label-part {
        display: block;
        white-space: nowrap;
    }

    .content .detail-pair-list > .data-row,
    body:not(.guest-page) #basic .detail-pair-list .data-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
        padding-block: 5px;
        min-height: 0;
    }

    .content .detail-pair-list > .data-row dd {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .directory-metric-icon {
        display: none;
    }

    .directory-metric :is(dt, dd) {
        padding-inline-start: 0;
    }

    .directory-filter-actions .btn {
        flex: 1 1 0;
    }

    .content .employee-results .employee-table tbody tr {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px 12px;
    }

    .content .employee-results .employee-table tbody td {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
        padding-inline: 0;
        white-space: normal;
    }

    .content .employee-results .employee-table tbody td[data-label="社員ID"] {
        grid-area: 1 / 1;
    }

    .content .employee-results .employee-table tbody td[data-label="氏名"] {
        grid-area: 2 / 1;
        overflow-wrap: anywhere;
    }

    .content .employee-results .employee-table tbody td:is([data-label="在籍"], [data-label="アカウント状態"]) {
        grid-template-columns: minmax(0, 1fr) max-content;
        align-items: center;
        justify-self: stretch;
        align-content: start;
    }

    .content .employee-results .employee-table tbody td[data-label="在籍"] {
        grid-area: 1 / 2;
    }

    .content .employee-results .employee-table tbody td[data-label="アカウント状態"] {
        grid-area: 2 / 2;
    }

    .content .employee-results .employee-table tbody td:is([data-label="氏名"], [data-label="アカウント状態"]) {
        padding-bottom: 6px;
        border-bottom: 1px solid var(--v04-line);
    }

    .content .employee-results .employee-table tbody td:is([data-label="在籍"], [data-label="アカウント状態"]) .badge {
        justify-self: end;
        white-space: nowrap;
    }


    .content .employee-results .employee-table tbody td:is([data-label="CORE"], [data-label="詳細"]) {
        grid-column: 1 / -1;
    }

    .content .employee-results .employee-table tbody td[data-label="詳細"]::before {
        display: none;
    }

    .content .employee-results .employee-table .copy-field-value,
    .content .employee-detail-sections .external-account-table .cell-clip {
        overflow: visible;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .content .master-panel .master-head {
        flex-direction: row;
        padding-block: 0 8px;
    }

    .content .master-panel .master-head,
    .content .master-panel .master-head-actions {
        align-items: center;
        gap: 8px;
    }

    .content .master-panel .data-table .badge {
        justify-self: start;
    }

    .content .master-panel .data-table .btn,
    .content .employee-detail-sections .row-actions .btn {
        min-height: 44px;
        width: fit-content;
        max-width: 100%;
    }

    .v04-organization-tables,
    .content .employee-history-pair,
    .content .v04-dashboard-columns {
        gap: 10px;
    }

    .content .employee-history-pair .v04-detail-panel {
        padding-block: 12px;
    }
}

.content .dashboard-kpi-grid .dashboard-metric-card {
    padding: 14px 16px;
}

.content .extu-filters {
    padding-block: 10px;
}

.content .phase2-asset-panel h2.section-gap {
    padding-top: 12px;
    border-top: 1px solid var(--v04-line);
}

@media (max-width: 760px) {
    body.dashboard-page .content .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .content .dashboard-kpi-grid .dashboard-metric-card {
        padding: 10px 12px;
    }

    .content .dashboard-kpi-grid .dashboard-metric-copy {
        align-items: start;
        flex-direction: column;
    }

    .content .extu-filters .btn,
    .content .phase2-asset-panel .text-action {
        min-height: 44px;
    }
}

/* Employee form section headings use the same rhythm as the v0.4 read-only panels. */
.content .employee-input-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    line-height: 1.4;
    color: var(--v04-navy);
}

.content :is(.form-section, #premium-water) > .employee-input-heading,
.content .employee-attribute-card > .split-title {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--v04-line);
}

.content .employee-attribute-card > .split-title .employee-input-heading {
    margin: 0;
}

@media (min-width: 1180px) {
    .content .v04-master-pair .data-table {
        table-layout: fixed;
    }

    .content .v04-master-pair .data-table .order-col {
        width: 38px;
    }

    .content .v04-master-pair .data-table th:nth-child(2) {
        width: 24%;
    }

    .content .v04-master-pair .data-table th:nth-child(3) {
        width: 16%;
    }

    .content :is(.v04-master-pair, .pw-code-master) .data-table td.pw-master-key {
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .content .v04-master-pair .master-edit-form {
        flex-wrap: nowrap;
        gap: 4px;
    }

    .content .v04-master-pair .master-edit-form .input {
        flex: 1 1 auto;
        min-width: 0;
        width: 0;
        padding-inline: 5px;
    }

    .content .v04-master-pair .master-edit-form .btn {
        flex: 0 0 auto;
    }

    .content .pw-code-master .data-table {
        min-width: 0;
        table-layout: fixed;
    }

    .content .pw-code-master :is(th, td) {
        padding: 6px;
    }

    .content .pw-code-master .order-col {
        width: 38px;
    }

    .content .pw-code-master th:nth-child(2) {
        width: 147px;
    }

    .content .pw-code-master th:nth-child(3) {
        width: 52px;
    }

    .content .pw-code-master th:nth-child(4) {
        width: 12%;
    }

    .content .pw-code-master th:nth-child(5) {
        width: 56px;
    }

    .content .pw-code-master th:last-child {
        width: 78px;
    }

    .content .pw-code-master .master-code-form {
        grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.2fr) max-content;
        gap: 4px;
    }

    .content .pw-code-master .master-code-form :is(.input, .select) {
        width: 100%;
        min-width: 0;
        min-height: 34px;
    }

    .content .pw-code-master .data-table :is(.badge, .btn) {
        white-space: nowrap;
    }

    .content .pw-code-master .data-table .btn {
        padding-inline: 7px;
    }


    .dashboard-page .content :is(.dashboard-audit-table, .dashboard-login-table) {
        table-layout: fixed;
        width: 100%;
    }

    .dashboard-page .content :is(.dashboard-audit-table, .dashboard-login-table) :is(th.log-at, td.log-at) {
        width: 11rem;
        min-width: 11rem;
        white-space: nowrap;
        overflow-wrap: normal;
        word-break: keep-all;
    }

    .dashboard-page .content .dashboard-audit-table :is(th, td) {
        padding: 7px 10px;
    }

    .dashboard-page .content .dashboard-audit-table .audit-target {
        width: 24%;
    }

    .dashboard-page .content .dashboard-audit-table :is(th.audit-result, td.status-cell) {
        width: 72px;
    }

    .dashboard-page .content .dashboard-audit-table td:nth-child(2) {
        white-space: normal;
        overflow-wrap: normal;
        word-break: keep-all;
        overflow: hidden;
        min-width: 0;
        text-overflow: clip;
        line-height: 1.35;
    }

    .dashboard-page .content .dashboard-audit-table td:nth-child(3) {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .dashboard-page .content .dashboard-login-table :is(th, td) {
        padding: 7px 10px;
    }

    .dashboard-page .content .dashboard-login-table :is(th, td):not(.log-at):not(.status-cell) {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .dashboard-page .content .dashboard-login-table :is(th.audit-result, td.status-cell) {
        width: 72px;
    }

    .content .dashboard-audit-table .status-cell .result-status {
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }
}

@media (min-width: 1200px) and (max-width: 1439.98px) {
    body.dashboard-page .content .dashboard-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-page .content .dashboard-audit-table td:nth-child(2) {
        white-space: nowrap;
    }

    .dashboard-page .content .dashboard-audit-table .audit-target {
        width: 22%;
    }
}

@media (min-width: 1440px) {
    body.dashboard-page .content .dashboard-shell {
        grid-template-columns: minmax(0, 1.05fr) minmax(480px, 1fr);
    }

    .dashboard-page .content .dashboard-audit-table :is(th:nth-child(2), td:nth-child(2)) {
        width: 40%;
        overflow: visible;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
        line-height: 1.4;
        text-overflow: unset;
    }

    .dashboard-page .content .dashboard-audit-table .audit-target {
        width: 13%;
        overflow: visible;
        white-space: normal;
    }

    .dashboard-page .content .dashboard-audit-table :is(th.log-at, td.log-at) {
        width: 8.75rem;
        min-width: 8.75rem;
    }
}

@media (max-width: 760px) {
    /* Keep the label column consistent across the existing business information cards. */
    .content :is(#credentials .external-account-table, #systems .v04-detail-records, #assets .asset-table, .phase2-asset-panel[aria-labelledby="asset-list-heading"] .asset-table) tbody td[data-label]:not([colspan]) {
        grid-template-columns: 104px minmax(0, 1fr);
        align-items: start;
        gap: 8px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .content :is(#credentials .external-account-table, #systems .v04-detail-records, #assets .asset-table, .phase2-asset-panel[aria-labelledby="asset-list-heading"] .asset-table) tbody td[data-label]::before {
        word-break: keep-all;
        overflow-wrap: normal;
        line-height: 1.4;
    }

    .content :is(#credentials .external-account-table, #systems .v04-detail-records, #assets .asset-table, .phase2-asset-panel[aria-labelledby="asset-list-heading"] .asset-table) .badge {
        justify-self: start;
        width: fit-content;
        max-width: 100%;
        height: auto;
        min-height: 22px;
        white-space: normal;
    }

    .content #credentials .external-account-table .login-mail > *,
    .content :is(#assets .asset-table, .phase2-asset-panel[aria-labelledby="asset-list-heading"] .asset-table) .asset-code-sub {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .content :is(#assets .asset-table, .phase2-asset-panel[aria-labelledby="asset-list-heading"] .asset-table) .asset-code-sub {
        grid-column: 2;
        margin-top: 0;
    }

    .content #credentials .external-account-table td[data-label="操作"]:has(.row-actions) {
        border-top: 1px solid var(--v04-line);
        margin-top: 4px;
        padding-top: 8px;
    }

    .content #credentials .external-account-table td[data-label="操作"]:has(.row-actions)::before {
        display: none;
    }

    .content #credentials .external-account-table .row-actions {
        grid-column: 1 / -1;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .content #credentials .external-account-table .row-actions .btn {
        min-height: 44px;
        white-space: nowrap;
        padding-inline: 8px;
    }

    .content #credentials .external-account-table .row-actions .btn-danger {
        background: #fff;
        color: #a12d2a;
        border-color: #b85049;
    }

    .content #credentials .external-account-table .row-actions .btn-danger:is(:hover, :focus-visible) {
        background: #fae9e8;
    }

    .content #credentials .duty-block .split-title .btn,
    .content #assets > .v04-panel-head .btn,
    .content #systems .v04-detail-records .binary-toggle label {
        min-height: 44px;
    }

    .content :is(#assets .asset-table, .phase2-asset-panel[aria-labelledby="asset-list-heading"] .asset-table) .text-action {
        display: inline-flex;
        min-height: 44px;
        align-items: center;
    }
}

/* Production refinement for employee detail and edit. */
#basic .v04-detail-panel #business-attributes {
    margin: 0;
}

#basic #business-attributes > .split-title {
    margin: 0 0 4px;
}

#basic #business-attributes .data-row:last-child dd,
.employee-attribute-card .data-row:last-child dd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

#premium .premium-read-panel {
    margin-bottom: 14px;
}

#premium .employee-premium-pair > .premium-read-panel {
    margin: 0;
}

.premium-read-codes,
.premium-read-codes dd {
    margin: 0;
}

.premium-read-codes > div {
    display: grid;
    grid-template-columns: minmax(0, 8rem) minmax(0, 1fr);
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--v04-line);
}

.premium-code-value,
.premium-code-entry small {
    display: block;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    user-select: text;
}

.premium-code-entry + .premium-code-entry,
.retail-matrix-field + .retail-matrix-field {
    margin-top: 8px;
}

.content .retail-matrix-wrap {
    overflow-x: auto;
    max-width: 100%;
}

.content .retail-matrix th {
    white-space: normal;
    overflow-wrap: anywhere;
}

.content .retail-matrix :is(td, th) {
    padding: 6px 10px;
}

.retail-matrix-field label:not(.sr-only) {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.content .retail-matrix-field .input {
    width: 100%;
    min-width: 0;
    min-height: 40px;
}

.employee-edit-sections {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.employee-edit-workspace :is(#editForm, #business-attributes, #premium-water, #employee-critical-actions, #retail-matrix-heading),
#retail-results-heading {
    scroll-margin-top: 76px;
}

.employee-edit-workspace .employee-profile-heading {
    margin: 0 0 12px;
}

.employee-edit-workspace #editForm > .form-section,
.employee-edit-workspace .employee-form-pair {
    margin-bottom: 14px;
}

.employee-edit-workspace .employee-form-pair {
    align-items: stretch;
}

.employee-edit-workspace #editForm .form-section {
    padding: 16px 18px;
}

.employee-edit-workspace .employee-edit-status {
    padding: 0;
    margin-bottom: 8px;
}

.employee-edit-workspace #e-note {
    min-height: 88px;
}

.employee-edit-workspace #premium-water .inline-actions {
    margin-top: 14px;
}

.employee-edit-workspace #pw-reason {
    margin-top: 2px;
}

.content .employee-critical-actions {
    background: white;
    border: 1px solid #ce817b;
    border-top: 3px solid #a12d2a;
}

.employee-critical-row {
    padding-block: 12px;
    border-top: 1px solid #ebd5d3;
}

.employee-critical-row > h3 {
    margin: 0 0 8px;
}

.employee-critical-actions .employee-critical-row:last-child {
    padding-bottom: 0;
}

.employee-audit-timeline li {
    gap: 3px;
    padding-block: 4px 12px;
    min-height: 64px;
}

.employee-audit-timeline li > strong {
    overflow-wrap: anywhere;
}

.employee-history-pair .fit-table td {
    white-space: normal;
    text-overflow: clip;
    overflow-wrap: anywhere;
}


@media (min-width: 761px) {
    .employee-audit-timeline li {
        grid-template-columns: minmax(0, 1fr) auto;
        align-content: center;
        gap: 2px 8px;
        padding-block: 8px;
    }

    .employee-audit-timeline .employee-audit-meta {
        grid-column: 1 / -1;
        line-height: 1.35;
    }

    .employee-audit-timeline li > strong {
        min-width: 0;
        line-height: 1.4;
    }

    .employee-audit-timeline .result-status {
        align-self: center;
        white-space: nowrap;
    }

    .content .retail-matrix {
        min-width: 0;
        table-layout: auto;
    }

    .content .retail-matrix th:first-child {
        min-width: 160px;
        width: 170px;
    }

    .content .retail-matrix td {
        min-width: 160px;
        white-space: normal;
    }

    .content .retail-matrix tbody tr {
        height: 54px;
    }

    #systems .v04-detail-records {
        table-layout: auto;
    }

    #systems .v04-detail-records td[data-label="利用"] {
        min-width: 200px;
    }

    #systems .binary-toggle {
        width: 196px;
        max-width: 100%;
    }

    #systems .binary-toggle input:checked + label {
        box-shadow: inset 0 0 0 2px var(--v04-blue);
        background: var(--v04-pale);
        color: var(--v04-navy);
    }

    .employee-edit-workspace #editForm :is(.input, .select) {
        min-height: 40px;
        height: 42px;
    }

    .employee-edit-workspace .employee-attribute-card > .data-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .employee-edit-workspace .employee-attribute-card > .data-list .data-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
        padding: 8px 12px;
        border: 1px solid var(--v04-line);
        border-radius: 6px;
    }

    .employee-edit-workspace [data-attributes-edit] {
        justify-self: end;
    }
}

@media (min-width: 1100px) {
    #credentials .external-account-table th:last-child {
        width: 310px;
    }

    #credentials .external-account-table th:nth-child(5):not(:last-child) {
        width: 9rem;
    }

    #credentials .external-account-table td {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    #credentials .external-account-table .row-actions .btn {
        white-space: nowrap;
    }

    #credentials .external-account-table .row-actions .btn-danger {
        color: #a12d2a;
        border-color: #b85049;
        background: white;
    }

    #credentials .external-account-table .row-actions .btn-danger:hover {
        background: #fae9e8;
    }
}

@media (max-width: 760px) {
    .employee-edit-workspace #editForm .form-section {
        padding: 12px 14px;
    }

    .employee-edit-workspace :is(.employee-edit-sections, #premium-water, .employee-critical-actions) .btn,
    .employee-edit-workspace #editForm :is(.input, .select),
    .employee-edit-workspace .employee-critical-actions .select,
    .employee-edit-workspace [data-attributes-edit],
    .content .retail-matrix-field .input {
        min-height: 44px;
    }

    .employee-edit-workspace [data-attributes-edit] {
        width: 100%;
    }

    .content .retail-matrix-wrap {
        overflow: visible;
    }

    .content .retail-matrix tbody th[scope="row"] {
        display: block;
        width: auto;
        background: var(--v04-pale);
        border-radius: 4px;
    }

    .content .retail-matrix tbody td {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
        padding: 6px 2px;
    }

    .premium-read-codes > div {
        grid-template-columns: minmax(0, 1fr);
        gap: 3px;
    }
}

/* Final polish for employee records, event lists and dashboard. */
.content #basic > .v04-detail-panel {
    margin: 0;
    padding: 16px 18px;
}

.content #basic > .v04-detail-panel + .v04-detail-panel {
    margin-top: 14px;
}

.content #basic > .v04-detail-panel h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.content #basic .data-list {
    padding: 0;
    column-gap: 18px;
}

.content #basic .data-list .data-row {
    grid-template-columns: 120px minmax(0, 1fr);
    min-height: 38px;
    padding-block: 5px;
    border-bottom: 1px solid var(--v04-line);
}

.content #basic .data-list .data-row dt {
    font-size: 13px;
    font-weight: 600;
}

.content #basic .data-list .data-row dd {
    font-size: 14px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.content #basic .data-list .data-row dd.basic-value-unset {
    color: var(--v04-muted);
    font-weight: 500;
}

.content #basic .v04-detail-panel > .data-list > .data-row:only-child {
    grid-template-columns: minmax(0, 1fr);
}

.content #basic #business-attributes > .split-title {
    justify-content: flex-start;
    gap: 8px;
    margin: 10px 0 2px;
}

.content #basic [data-attributes-history] > summary {
    cursor: pointer;
    width: fit-content;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid var(--v04-line);
    border-radius: 6px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
}

.content #basic .copy-btn:focus-visible,
.content #basic [data-attributes-history] > summary:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.content #basic .copy-btn {
    background: #eef5fb;
    border-color: #b8cee2;
    color: var(--blue);
}

.content #basic .org-history-table .is-current-org {
    background: #edf6fc;
}

.content #basic .copy-field-value,
.content .employee-results .copy-field-value,
.dashboard-page .quick-value .copy-field-value {
    max-inline-size: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.dashboard-page .content .dashboard-list {
    max-height: none;
    overflow: visible;
}

.dashboard-page .content .dashboard-quick-card .quick-row {
    min-height: 46px;
    padding-block: 7px;
}

.dashboard-page .content .quick-person,
.dashboard-page .content .dashboard-login-table :is(th, td) {
    white-space: normal;
    overflow-wrap: anywhere;
}

.dashboard-page .content .v04-dashboard-columns,
.dashboard-page .content .dashboard-right-stack {
    align-items: start;
    align-content: start;
}

.dashboard-page .content .dashboard-login-table :is(th, td):first-child {
    width: 30%;
}

.dashboard-page .content .dashboard-login-table .audit-result {
    width: 72px;
}

.dashboard-page .content .dashboard-table .result-status {
    white-space: nowrap;
}

.content .log-card .log-page-table th {
    font-weight: 600;
}

.content .log-card .log-page-table :is(th, td) {
    white-space: normal;
    overflow-wrap: anywhere;
}

.content .log-page-table .result-status {
    justify-self: start;
    width: fit-content;
    white-space: nowrap;
}

@media (min-width: 761px) {
    .content .log-card .log-page-table {
        table-layout: fixed;
    }

    .content .log-card .log-page-table td {
        height: 46px;
    }

    .content .log-page-table th.log-at {
        width: 166px;
    }

    .content .log-login-table th:nth-child(5),
    .content .log-audit-table th:last-child {
        width: 84px;
    }

    .content .log-login-table th:nth-child(2) { width: 108px; }
    .content .log-login-table th:nth-child(3) { width: 140px; }
    .content .log-login-table th:last-child { width: 150px; }
    .content .log-audit-table th:nth-child(2) { width: 156px; }
    .content .log-audit-table th:nth-child(3) { width: 206px; }

    .content .log-card .log-filters {
        grid-template-columns: minmax(0, 15rem) minmax(0, 30rem);
        padding: 0 14px;
        margin-block: 8px 14px;
    }

    .content .log-card .filter-details .filter-details-body {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

@media (min-width: 1200px) and (max-width: 1439.98px) {
    .content .employee-results .employee-table-wrap {
        overflow-x: auto;
        max-width: 100%;
    }

    .content .employee-results .employee-table {
        min-width: 1140px;
    }

}

@media (min-width: 1440px) {
    .content .employee-results .employee-table-wrap {
        overflow-x: visible;
    }

    .content .employee-results .employee-table {
        min-width: 0;
    }
}

@media (min-width: 1200px) {
    .content .employee-results .employee-table {
        width: 100%;
        table-layout: fixed;
    }

    .content .employee-results .employee-table :is(th, td) {
        padding-inline: 6px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .content .employee-results .employee-table :is(th, td):nth-child(11) {
        overflow-wrap: normal;
        word-break: keep-all;
        vertical-align: top;
        min-width: 0;
    }

    .content .employee-results .employee-table td[data-label="CORE"] .directory-core {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .content .employee-results .employee-table td[data-label="CORE"] .directory-core .badge {
        display: inline-flex;
        align-items: center;
        align-self: flex-start;
        width: auto;
        max-width: 100%;
        height: auto;
        min-height: 22px;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
        text-overflow: clip;
        line-height: 1.25;
        flex: 0 1 auto;
        box-sizing: border-box;
    }

    .content .employee-results .employee-table :is(th, td):nth-child(12),
    .content .employee-results .employee-table td[data-label="詳細"] {
        width: 56px;
        min-width: 56px;
        max-width: 56px;
        padding-inline: 4px;
        vertical-align: middle;
        text-align: center;
        box-sizing: border-box;
        background: #fff;
    }

    .content .employee-results .employee-table tbody tr:hover td[data-label="詳細"] {
        background: #fafcfd;
    }

    .content .employee-results .employee-table td[data-label="詳細"] .text-action {
        margin-inline: auto;
    }

    .content .employee-results .employee-table :is(th:last-child, td:last-child) {
        position: static;
        right: auto;
        z-index: auto;
    }

    .content .employee-results .employee-table th:nth-child(1) { width: 7.5%; }
    .content .employee-results .employee-table th:nth-child(2) { width: 9%; }
    .content .employee-results .employee-table th:nth-child(3) { width: 7.5%; }
    .content .employee-results .employee-table th:nth-child(4) { width: 6.5%; }
    .content .employee-results .employee-table th:nth-child(5) { width: 248px; min-width: 248px; }
    .content .employee-results .employee-table th:nth-child(6) { width: 200px; min-width: 200px; }
    .content .employee-results .employee-table th:nth-child(7) { width: 56px; min-width: 56px; }
    .content .employee-results .employee-table th:nth-child(8) { width: 80px; min-width: 80px; }
    .content .employee-results .employee-table th:nth-child(9) { width: 6.25%; }
    .content .employee-results .employee-table th:nth-child(10) { width: 6.75%; }
    .content .employee-results .employee-table th:nth-child(11) {
        width: 8%;
        min-width: 92px;
    }

    .content .employee-results .employee-table th:last-child {
        width: 56px;
        min-width: 56px;
        max-width: 56px;
    }

    .content .employee-results .employee-table :is(th, td):nth-child(7),
    .content .employee-results .employee-table :is(th, td):nth-child(8) {
        overflow: hidden;
        min-width: 0;
        padding-inline: 4px;
        text-align: center;
        vertical-align: middle;
    }

    .content .employee-results .employee-table :is(td[data-label="在籍"], td[data-label="アカウント状態"]) .badge {
        display: inline-flex;
        max-width: 100%;
        white-space: nowrap;
        padding-inline: 6px;
        box-sizing: border-box;
    }

    .content .employee-results .employee-table thead th:nth-child(8) {
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.25;
        font-size: 0.72rem;
    }

    .content .employee-results .employee-table .text-action {
        white-space: nowrap;
        min-width: 0;
        padding-inline: 8px;
    }

    .content .employee-results .ledger-bar {
        display: grid;
        grid-template-columns: minmax(15rem, 1fr) minmax(0, 1.65fr) auto;
        gap: 10px;
    }

    .content .employee-results .ledger-bar .filter-details-body {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr)) repeat(2, minmax(0, 5rem));
        width: 100%;
        gap: 8px;
    }

    .content .employee-results .ledger-bar .filter-details :is(.ledger-bar-field, select) {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .content .employee-results .employee-table :is(th, td):nth-child(5),
    .content .employee-results .employee-table :is(th, td):nth-child(6) {
        overflow: hidden;
        min-width: 0;
        white-space: nowrap;
        overflow-wrap: normal;
        word-break: keep-all;
    }

    .content .employee-results .employee-table .copy-field-directory-id {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 7px;
        width: 100%;
        max-width: 100%;
        vertical-align: middle;
    }

    .content .employee-results .employee-table .copy-field-directory-id .copy-field-value {
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(100% - 37px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: clip;
        word-break: keep-all;
        overflow-wrap: normal;
        line-height: 1.35;
    }

    .content .employee-results .employee-table .copy-field-directory-id .copy-btn {
        flex: 0 0 auto;
    }

    .content .employee-results .employee-table .copy-field-directory-id--wrap-safe {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        column-gap: 7px;
        row-gap: 4px;
        white-space: normal;
    }

    .content .employee-results .employee-table .copy-field-directory-id--wrap-safe .copy-field-value {
        grid-column: 1;
        flex: initial;
        max-width: 100%;
        white-space: normal;
        overflow: visible;
        overflow-wrap: anywhere;
        word-break: break-all;
    }

    .content .employee-results .employee-table .copy-field-directory-id--wrap-safe .copy-btn {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
    }

    @media (min-width: 1440px) {
        .content .employee-results .employee-table th:nth-child(11) {
            width: 12%;
            min-width: 132px;
        }

        .content .employee-results .employee-table :is(th, td):nth-child(9),
        .content .employee-results .employee-table :is(th, td):nth-child(10) {
            width: 5.5%;
        }
    }
}

.content .employee-results td:is([data-label="社員ID"], [data-label="氏名"]) {
    font-weight: 700;
}

.content .employee-results td:is([data-label="役職"], [data-label="営業ランク"], [data-label="CORE"]) {
    color: #345068;
}

.content .employee-results .ledger-bar {
    gap: 8px;
}

@media (max-width: 760px) {
    .content #basic > .v04-detail-panel {
        padding: 12px 14px;
    }

    .content #basic .data-list {
        column-gap: 12px;
    }

    .content #basic .data-list .data-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
        align-content: start;
    }

    .content #basic .data-list :is(.basic-long-row, .data-row:has(.copy-field)) {
        grid-column: 1 / -1;
    }

    .content #basic .basic-personal-list .basic-long-row {
        order: -1;
    }

    .dashboard-page .content :is(.quick-table-head, .quick-row) {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .dashboard-page .content .quick-label {
        position: absolute;
        width: 1px;
        height: 1px;
        clip-path: inset(50%);
        overflow: hidden;
        white-space: nowrap;
    }

    .dashboard-page .content .quick-value {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        justify-items: start;
        gap: 4px;
    }

    .dashboard-page .content .quick-value .copy-field-value {
        word-break: break-all;
        line-height: 1.4;
    }

    .dashboard-page .content .dashboard-audit-table :is(th, td),
    .dashboard-page .content .dashboard-login-table :is(th, td) {
        padding-inline: 6px;
    }

    .dashboard-page .content .dashboard-audit-table .log-at {
        width: 29%;
    }

    .dashboard-page .content .dashboard-table .audit-result {
        width: 62px;
    }

    .dashboard-page .content .dashboard-audit-table td:not(.status-cell) {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .content .log-card .log-page-table td {
        padding-block: 5px;
    }

    .content #basic [data-attributes-history] > summary,
    .content #basic .copy-btn {
        min-height: 44px;
    }

    .content #basic .copy-btn {
        min-width: 44px;
    }
}
