/* Shared visual layer for dense OA workspaces. Status colors remain module-owned. */
:root {
    --oa-surface: #ffffff;
    --oa-canvas: #f4f7fb;
    --oa-border: #dce5f0;
    --oa-ink: #152844;
    --oa-subtle: #64748b;
    --oa-section-accent: #1677ff;
}

[data-oa-section="customer"] { --oa-section-accent: #bb7915; }
[data-oa-section="people"] { --oa-section-accent: #16805d; }
[data-oa-section="system"] { --oa-section-accent: #755cbd; }
.has-sidebar .page { background: var(--oa-canvas); }
.has-sidebar .page > h1 { color: var(--oa-ink); font-size: 23px; line-height: 1.25; }
.has-sidebar .page > h1 { display: flex; align-items: center; gap: 10px; }
.page-title-icon { display: inline-grid; flex: 0 0 34px; width: 34px; height: 34px; padding: 8px; border-radius: 7px; background: #e9f2ff; color: #1469ce; }
[data-oa-section="customer"] .page-title-icon { background: #fff2dd; color: #aa6a0b; }
[data-oa-section="people"] .page-title-icon { background: #e7f6ef; color: #147d5d; }
[data-oa-section="system"] .page-title-icon { background: #f0ebff; color: #7055b5; }
.panel { border-color: var(--oa-border); }
.panel-head { gap: 10px; }
.panel-head h2 { font-size: 17px; line-height: 1.3; }
.has-sidebar .panel-head h2 { display: flex; align-items: center; gap: 8px; }
.has-sidebar .panel-head h2::before { content: ""; display: inline-block; flex: 0 0 3px; width: 3px; height: 17px; border-radius: 2px; background: var(--oa-section-accent); }
.stats-grid { gap: 8px; margin-bottom: 12px; }
.stats-grid > .stat { min-width: 0; padding: 12px 13px; }
.stats-grid > .stat span { font-size: 11px; line-height: 1.3; }
.stats-grid > .stat strong { margin-top: 4px; font-size: 25px; line-height: 1.1; font-variant-numeric: tabular-nums; }
table { font-variant-numeric: tabular-nums; }
th { font-size: 12px; }
.table-wrap { scrollbar-color: #c5d3e7 transparent; }
.notice { border-left-width: 4px; }
.brief-stats .brief-stat-link { position: relative; padding-left: 46px; border-top: 3px solid currentColor; color: #2769c9; }
.brief-stats .brief-stat-link > svg { position: absolute; top: 15px; left: 14px; width: 20px; height: 20px; }
.brief-stats .brief-stat-link span, .brief-stats .brief-stat-link small { color: #64748b; }
.brief-stats .brief-stat-link strong { color: #152844; }
.brief-stats .brief-stat-complete { color: #14805d; }
.brief-stats .brief-stat-unfinished { color: #bd7c19; }
.brief-stats .brief-stat-overdue { color: #c84343; }
.brief-stats .brief-stat-attendance { color: #0e9099; }
#attendance-outbound { padding: 12px 14px; }
#attendance-outbound > .panel-head h2 { margin: 0; }
#attendance-outbound > .panel-head p { margin: 3px 0 0; font-size: 11px; }
#attendance-outbound > .simple-details:not([open]) { padding: 8px 10px; }

/* High-frequency administration screens. */
.customer-list-screen .customer-review-stats .stat { border-top: 3px solid #c68416; }
.customer-list-screen .customer-review-stats .stat:last-child { border-top-color: #1677ff; }
.customer-list-screen .customer-review-stats .stat:nth-child(2) { border-top-color: #d14d44; }
.customer-directory { padding: 0; overflow: hidden; }
.customer-directory .table-wrap { margin: 0; }
.customer-directory-table { width: 100%; }
.customer-directory-table th { white-space: nowrap; }
.customer-directory-table td { vertical-align: middle; font-size: 12px; }
.customer-directory-table tbody tr:hover { background: #f4f8fd; }
.customer-directory-name { color: #123c7b; font-size: 14px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.customer-number { display: inline-flex; align-items: center; width: fit-content; padding: 3px 6px; border: 1px solid #c9d9ee; border-radius: 4px; background: #edf4ff; color: #24558e; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.customer-directory-name + .customer-number { display: table; margin-top: 5px; }
.customer-list-screen .customer-number,
.customer-edit-head .customer-number { color: #24558e; }
.customer-city-chip { display: inline-flex; padding: 4px 7px; border-radius: 4px; background: #e9f2ff; color: #125ab7; font-weight: 800; }
.customer-city-chip.city-lpb { background: #e5f5ed; color: #13714f; }
.customer-city-chip.city-mx,
.customer-city-chip.city-ody { background: #fff1dc; color: #a45a05; }
.customer-city-chip.city-svk,
.customer-city-chip.city-pkx,
.customer-city-chip.city-thk { background: #f0ebff; color: #684aa8; }
.customer-city-chip.city-psv,
.customer-city-chip.city-lnt,
.customer-city-chip.city-xn,
.customer-city-chip.city-hyx,
.customer-city-chip.city-pkn { background: #e4f5f7; color: #126d79; }
.customer-attribute { display: inline-flex; align-items: center; width: fit-content; padding: 4px 7px; border-radius: 4px; background: #edf2fa; color: #385f99; font-size: 11px; font-weight: 800; line-height: 1.25; }
.customer-attribute.group-linked { background: #e5f6f4; color: #08776c; }
.customer-attribute.has-map { background: #e7f2ff; color: #155cbb; }
.customer-attribute.has-photo { background: #f1eaff; color: #744bb0; }
.customer-attribute.is-approved { background: #e7f5ec; color: #18764d; }
.customer-attribute.attribute-empty { background: #f0f2f5; color: #6b7789; }
.customer-group-name { display: block; max-width: 190px; margin-top: 4px; overflow: hidden; color: #66758f; text-overflow: ellipsis; white-space: nowrap; }
.customer-card-attributes { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.customer-card-attributes .customer-number { display: inline-flex; }
.customer-card-attributes .customer-city-chip.city-vte { color: #125ab7; }
.customer-card-attributes .customer-attribute,
.customer-card-attributes .customer-city-chip { font-size: 10px; }
.customer-photo-link { display: inline-flex; padding: 5px 8px; border-radius: 4px; background: #e9f8f1; color: #167957; font-weight: 700; }
.customer-directory-actions { min-width: 166px; }
.customer-directory-actions .pill { display: inline-block; margin-right: 5px; }
.customer-directory-actions > details { margin-top: 5px; }

.ticket-admin-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ticket-admin-stats .ticket-filter-stat { position: relative; padding-left: 43px; border-top: 3px solid var(--stage-color, #2674da); }
.ticket-admin-stats .ticket-filter-stat > svg { position: absolute; left: 13px; top: 16px; width: 20px; height: 20px; color: var(--stage-color, #2674da); }
.ticket-admin-stats .stage-open { --stage-color: #2674da; }
.ticket-admin-stats .stage-active { --stage-color: #0f8b83; }
.ticket-admin-stats .stage-billing { --stage-color: #ce8311; }
.ticket-admin-stats .stage-review { --stage-color: #8b58bc; }
.ticket-admin-stats .stage-done { --stage-color: #16845b; }
.ticket-admin-stats .stage-overdue { --stage-color: #d44747; }
.ticket-admin-stats .ticket-filter-stat:hover,
.ticket-admin-stats .ticket-filter-stat.is-active { border-color: var(--stage-color); background: #f0f6ff; }
.ticket-admin-list { padding: 0; overflow: hidden; }
.ticket-admin-list > .panel-head { padding: 13px 16px; }
.ticket-admin-list > .table-wrap { margin: 0; }
.ticket-admin-table { min-width: 1100px; width: 100%; }
.ticket-admin-table td { vertical-align: middle; font-size: 12px; }
.ticket-admin-table tbody tr:hover { background: #f5f9ff; }
.ticket-admin-table .ticket-id { color: #72829a; font-weight: 800; }
.ticket-admin-table .ticket-customer-cell { min-width: 210px; }
.ticket-admin-table .ticket-customer-cell strong { color: #123c7b; font-size: 14px; }
.ticket-admin-table .ticket-customer-cell small { display: block; max-width: 310px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-stage-pill { border: 1px solid var(--ticket-stage-color); background: color-mix(in srgb, var(--ticket-stage-color) 9%, white); color: var(--ticket-stage-color); }
.ticket-priority { display: inline-block; padding: 4px 7px; border-radius: 4px; background: #edf2f8; color: #52627a; font-weight: 800; }
.ticket-priority.priority-high,
.ticket-priority.priority-urgent { background: #ffefec; color: #b9362c; }
.ticket-admin-progress { min-width: 68px; color: #165db7; }
.ticket-admin-progress > span { display: block; height: 5px; margin-top: 4px; border-radius: 3px; background: #e1e9f3; }
.ticket-admin-progress i { display: block; height: 100%; border-radius: inherit; background: #1677ff; }
.ticket-admin-actions { min-width: 224px; }
.ticket-admin-actions .table-action { margin: 2px; padding: 5px 8px; font-size: 11px; }
.ticket-admin-actions .table-action:first-child { color: #ad6600; border-color: #e7b35d; background: #fff7e8; }
.ticket-admin-actions .table-action:nth-child(3) { color: #6940a9; border-color: #b7a0df; background: #f6f1ff; }

.project-list-screen .project-summary { position: relative; padding-left: 45px; }
.project-list-screen .project-summary > svg { position: absolute; top: 17px; left: 15px; width: 20px; height: 20px; }
.project-list-screen .project-row { gap: 8px; padding: 11px 14px; }
.project-list-screen .project-row-main h2 { margin: 4px 0 2px; font-size: 17px; }
.project-list-screen .project-row-progress { grid-template-columns: minmax(110px, .4fr) auto minmax(180px, 1fr); gap: 8px; padding: 6px 10px; }
.project-list-screen .project-row-progress strong { font-size: 19px; }
.project-list-screen .project-progress-track { height: 5px; }

.employee-hours-stats article { position: relative; padding-left: 47px; }
.employee-hours-stats article > svg { position: absolute; top: 15px; left: 16px; width: 20px; height: 20px; color: #1677ff; }
.employee-hours-stats article.attendance > svg { color: #0f766e; }
.employee-hours-stats article.repair > svg { color: #dc2626; }
.employee-hours-stats article.tickets > svg { color: #d97706; }
.employee-hours-table tbody tr:hover td,
.employee-hours-table tbody tr:hover th { background: #f3f8ff; }
.employee-hours-table tbody th a { font-weight: 800; }
.hours-mini-track { display: block; width: min(100%, 100px); height: 5px; margin: 6px auto 0; border-radius: 3px; background: #e0eee9; }
.hours-mini-track i { display: block; height: 100%; border-radius: inherit; background: #128269; }
.hours-mini-track.project { background: #e4ecfc; }
.hours-mini-track.project i { background: #2a6fde; }
.hours-mini-track.repair { background: #fae8e8; }
.hours-mini-track.repair i { background: #d54e4e; }
.hours-pending-badge { display: inline-grid; place-items: center; min-width: 25px; height: 25px; border-radius: 4px; color: #6b7c91; }
.hours-pending-badge.has-pending { background: #fff0dc; color: #ad5c03; font-weight: 900; }

@media (min-width: 901px) {
    .sidebar-section a { transition: background-color .15s ease, color .15s ease; }
    .sidebar-section a .menu-icon { flex: 0 0 17px; }
    .sidebar-section a.is-current { font-weight: 800; }
    .sidebar-section a:hover .menu-icon,
    .sidebar-section a:focus-visible .menu-icon { color: #0b67d8; }
}

@media (max-width: 720px) {
    .ticket-admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ticket-admin-stats .ticket-filter-stat { min-height: 74px; padding: 9px 7px 9px 29px; }
    .ticket-admin-stats .ticket-filter-stat > svg { left: 8px; top: 12px; width: 15px; height: 15px; }
    .ticket-admin-stats .ticket-filter-stat span { font-size: 10px; }
    .ticket-admin-stats .ticket-filter-stat strong { font-size: 21px; }
    .customer-directory-table, .customer-directory-table tbody,
    .customer-directory-table tr, .customer-directory-table td,
    .ticket-admin-table, .ticket-admin-table tbody,
    .ticket-admin-table tr, .ticket-admin-table td { display: block; min-width: 0; width: 100%; }
    .customer-directory-table thead,
    .ticket-admin-table thead { display: none; }
    .customer-directory-table tr,
    .ticket-admin-table tr { padding: 10px 12px; border-bottom: 1px solid #dce5f0; }
    .customer-directory-table td,
    .ticket-admin-table td { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border: 0; text-align: right; overflow-wrap: anywhere; }
    .customer-directory-table td::before,
    .ticket-admin-table td::before { content: attr(data-label); flex: 0 0 68px; color: #6b7d95; font-size: 10px; font-weight: 700; text-align: left; }
    .customer-directory-table td:first-child,
    .ticket-admin-table .ticket-customer-cell { display: block; text-align: left; }
    .customer-directory-table td:first-child::before,
    .ticket-admin-table .ticket-customer-cell::before { display: block; margin-bottom: 3px; }
    .customer-directory-actions,
    .ticket-admin-actions { display: block !important; text-align: left !important; }
    .customer-directory-actions::before,
    .ticket-admin-actions::before { display: block; margin-bottom: 5px; }
    .ticket-admin-table .ticket-customer-cell small { max-width: 100%; }
    .ticket-admin-table .ticket-admin-progress { width: 90px; }
    .project-list-screen .project-summary { padding-left: 31px; }
    .project-list-screen .project-summary > svg { top: 12px; left: 8px; width: 15px; height: 15px; }
    .project-list-screen .project-row { padding: 10px; }
    .project-list-screen .project-row-progress { grid-template-columns: 1fr auto; }
    .project-list-screen .project-row-progress small { grid-column: 1 / -1; text-align: left; }
    .employee-hours-stats article { padding-left: 34px; }
    .employee-hours-stats article > svg { top: 12px; left: 8px; width: 15px; height: 15px; }
    .employee-hours-table { min-width: 820px; }
    .has-sidebar .page > h1 { font-size: 20px; }
    .stats-grid { gap: 5px; }
    .stats-grid > .stat { padding: 9px; }
    .stats-grid > .stat span { font-size: 10px; }
    .stats-grid > .stat strong { font-size: 20px; }
    .panel-head h2 { font-size: 16px; }
    .brief-stats .brief-stat-link { padding-left: 32px; }
    .brief-stats .brief-stat-link > svg { top: 11px; left: 9px; width: 15px; height: 15px; }
}
