/* Generated from app.css: scoped to the timeline tab of the workspace. */
@keyframes activePulse { 50% { box-shadow: inset 0 0 0 1px #79d9ab, 0 4px 15px #1b9e6329; } }
@scope (.spa-timeline) {
:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #17342b;
  background: #f2f7f4;
  --green: #287d5a;
  --blue: #1976d2;
  --ink: #17342b;
  --muted: #64766f;
  --line: #dce8e2;
  --card: #fff;
  --danger: #b34141;
  --amber: #a86f22;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: linear-gradient(135deg, #eef8f2 0, #f6f8f7 55%, #edf3f0 100%); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h2, h3, h4 { margin-top: 0; }
.shell { max-width: 1440px; margin: auto; padding: 28px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 13px; }
.logo { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--green); color: #fff; font-size: 22px; box-shadow: 0 8px 22px #287d5a33; }
.brand h1 { font-size: 22px; margin: 0; }
.brand p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 6px 24px #17342b0d; padding: 20px; }
.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 18px; }
.stat strong { display: block; font-size: 28px; margin-top: 7px; }
.stat span, .muted { color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.btn { border: 0; border-radius: 10px; padding: 10px 15px; background: var(--green); color: #fff; font-weight: 650; }
.btn:hover { filter: brightness(.97); }
.btn:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #2c8feb44; outline-offset: 2px; }
.btn.secondary { background: #edf4f1; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: #f9eaea; color: var(--danger); }
.btn.amber { background: #fff2dd; color: #885914; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; color: var(--muted); }
input, select, textarea { border: 1px solid #cfded7; border-radius: 9px; padding: 10px 11px; background: #fff; color: var(--ink); min-width: 0; }
textarea { resize: vertical; min-height: 90px; }
.notice { border-radius: 10px; padding: 11px 14px; background: #e9f5ee; color: #235c44; margin: 12px 0; }
.notice.error { background: #fae9e9; color: #8f3030; }
.tabs { display: flex; gap: 6px; overflow: auto; margin: 0 0 16px; }
.tab { white-space: nowrap; border: 0; background: transparent; padding: 9px 13px; border-radius: 9px; color: var(--muted); font-weight: 650; }
.tab.active { background: #dfeee7; color: #205b42; }
.panel { display: none; }
.panel.active { display: block; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid #edf2ef; vertical-align: top; }
th { font-size: 12px; color: var(--muted); position: sticky; top: 0; background: #fff; }
.badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #e6f2ec; color: #206044; font-size: 12px; font-weight: 700; }
.badge.warn { background: #fff0d9; color: #885914; }
.badge.fail { background: #fae7e7; color: #943737; }
.editor-list { display: grid; gap: 13px; }
.editor { border: 1px solid var(--line); border-radius: 13px; padding: 15px; background: #fbfdfc; }
.editor-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.fields-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fields-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.multi { min-height: 130px; }
.audit-details { font-size: 12px; color: var(--muted); max-width: 520px; white-space: pre-wrap; word-break: break-word; }
.login { max-width: 430px; margin: 12vh auto; padding: 28px; }
.login h1 { margin-top: 0; }
.login form { display: grid; gap: 14px; }
.empty { padding: 34px; text-align: center; color: var(--muted); }
.split { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hidden { display: none !important; }

dialog { border: 0; border-radius: 18px; padding: 22px; box-shadow: 0 20px 70px #10251e44; max-width: 620px; width: calc(100% - 32px); color: #17324d; }
dialog::backdrop { background: #10243a8a; backdrop-filter: blur(3px); }
.dialog-form { display: grid; gap: 12px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.dialog-head h3 { margin: 2px 0 0; font-size: 22px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 10px; background: #edf3f8; color: #50667a; font-size: 22px; }

/* Daily workload visualization, inspired by Bitrix24's compact resource-planning language. */
.timeline-page { color: #17324d; background: #f1f5f9; }
.timeline-shell { max-width: 1720px; padding: 22px 26px 38px; }
.app-header { background: linear-gradient(115deg, #0d74cf 0%, #269be3 70%, #54b9e9 100%); border-radius: 18px; padding: 20px 22px; margin-bottom: 14px; color: #fff; box-shadow: 0 13px 32px #156ca12e; }
.app-header .logo { width: 50px; height: 50px; border-radius: 15px; background: #ffffff24; border: 1px solid #ffffff38; box-shadow: none; }
.app-header .brand h1 { font-size: 25px; letter-spacing: -.02em; }
.app-header .brand p { color: #e5f5ff; }
.eyebrow { color: #6b7f91; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.app-header .eyebrow { color: #d9f2ff; }
.page-filters { margin: 0; padding: 8px; background: #ffffff18; border: 1px solid #ffffff2b; border-radius: 14px; }
.compact-field { display: grid; gap: 3px; }
.compact-field span { font-size: 10px; color: #e4f5ff; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.compact-field input, .compact-field select { min-height: 38px; border: 0; color: #183850; box-shadow: 0 2px 8px #0e5e911a; }
.employee-filter select { min-width: 210px; }
.page-filters .btn { min-height: 38px; background: #fff; color: #116eb0; border: 0; }
.view-tabs { display: flex; gap: 6px; margin: 0 0 14px; padding: 0 3px; overflow-x: auto; }
.view-tab { white-space: nowrap; padding: 9px 14px; border: 0; border-radius: 10px; color: #688095; background: transparent; font-size: 13px; font-weight: 700; }
.view-tab.active { background: #fff; color: #1478bc; box-shadow: 0 3px 14px #254f6b12; }
.app-view.hidden { display: none; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.metric-card { display: flex; align-items: center; gap: 13px; min-height: 100px; padding: 17px; background: #fff; border: 1px solid #e2eaf0; border-radius: 15px; box-shadow: 0 5px 20px #253f5210; }
.metric-card > div { min-width: 0; }
.metric-card span:not(.metric-icon) { display: block; color: #6c8193; font-size: 12px; font-weight: 700; }
.metric-card strong { display: block; margin: 5px 0 2px; color: #18364e; font-size: 24px; line-height: 1; }
.metric-card small { color: #91a0ac; font-size: 11px; }
.metric-icon { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: 13px; font-size: 21px; font-weight: 800; }
.metric-blue .metric-icon { color: #1677ca; background: #e4f3ff; }
.metric-amber .metric-icon { color: #b86e14; background: #fff1dc; }
.metric-green .metric-icon { color: #228057; background: #e1f5eb; }
.metric-violet .metric-icon { color: #7252bd; background: #eee8ff; }
.timeline-page .card { border-color: #e0e8ef; border-radius: 16px; box-shadow: 0 5px 22px #25445b0e; }
.timeline-card { padding: 0; overflow: hidden; }
.timeline-card-head { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 18px 20px 15px; border-bottom: 1px solid #e5ecf2; }
.timeline-card-head h2, .correction-card h2 { margin: 0 0 4px; font-size: 18px; color: #17324a; }
.timeline-card-head p { margin: 0; color: #728698; font-size: 12px; }
.timeline-actions { display: flex; align-items: center; gap: 18px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; color: #708394; font-size: 11px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.active-dot { background: #27a86c; }
.report-dot { background: #e59832; }
.zoom-control { display: inline-grid; grid-template-columns: 32px 58px 32px; align-items: center; height: 34px; border: 1px solid #dce6ed; border-radius: 10px; overflow: hidden; background: #f8fafc; }
.zoom-control button { height: 100%; border: 0; background: transparent; color: #1976b9; font-size: 20px; }
.zoom-control button:hover:not(:disabled) { background: #e6f3fb; }
.zoom-control button:disabled { color: #c3ccd3; cursor: default; }
.zoom-control span { text-align: center; color: #61788b; font-size: 11px; font-weight: 800; }
.timeline-scroll { overflow-x: auto; overflow-y: visible; scrollbar-color: #a9becd #edf3f6; cursor: grab; touch-action: pan-x pan-y; }
.timeline-scroll.is-panning { cursor: grabbing; user-select: none; }
.timeline-scroll button,.timeline-scroll a { cursor: pointer; }
.timeline-grid { --track-width: 1368px; width: calc(250px + var(--track-width)); min-width: 100%; }
.timeline-header, .timeline-row { display: grid; grid-template-columns: 250px var(--track-width); }
.timeline-header { position: sticky; top: 0; z-index: 6; min-height: 48px; border-bottom: 1px solid #dfe8ef; background: #f8fafc; }
.person { position: sticky; left: 0; z-index: 4; min-width: 0; padding: 14px 16px; border-right: 1px solid #e1e9ef; background: #fff; }
.person-head { z-index: 8; display: flex; align-items: center; color: #687e90; background: #f8fafc; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.person-name { display: flex; align-items: center; gap: 7px; color: #19384f; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.you-chip { padding: 2px 6px; border-radius: 7px; background: #e4f3ff; color: #1477b9; font-size: 9px; text-transform: uppercase; }
.person-kpis { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 9px; color: #7b8e9d; font-size: 10px; }
.person-kpis span:first-child { color: #2179b9; font-weight: 800; }
.track-head, .track { position: relative; min-width: var(--track-width); }
.track-head { height: 48px; background: repeating-linear-gradient(to right, transparent 0, transparent calc(5.555555% - 1px), #e3eaf0 calc(5.555555% - 1px), #e3eaf0 5.555555%); }
.hour-label { position: absolute; top: 17px; transform: translateX(-50%); color: #728595; font-size: 10px; font-variant-numeric: tabular-nums; }
.hour-label:first-child { transform: none; padding-left: 4px; }
.hour-label:last-child { transform: translateX(-100%); padding-right: 4px; }
.timeline-row { min-height: 88px; border-bottom: 1px solid #edf1f4; }
.timeline-row:last-child { border-bottom: 0; }
.track { background-color: #fff; background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(5.555555% - 1px), #e9eef2 calc(5.555555% - 1px), #e9eef2 5.555555%); }
.track::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to right, transparent 0, transparent calc(1.388888% - 1px), #f3f6f8 calc(1.388888% - 1px), #f3f6f8 1.388888%); }
.track-empty { position: absolute; left: 14px; top: 34px; z-index: 1; color: #a0adb7; font-size: 11px; }
.interval { position: absolute; z-index: 2; height: 44px; min-width: 4px; overflow: hidden; padding: 7px 9px; border: 0; border-left: 4px solid var(--bar, #3689c8); border-radius: 8px; color: #18384f; text-align: left; background: color-mix(in srgb, var(--bar, #3689c8) 16%, white); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bar, #3689c8) 26%, white), 0 3px 8px #234b6712; }
.interval:hover { z-index: 3; filter: brightness(.985); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bar, #3689c8) 46%, white), 0 6px 16px #234b6725; }
.interval b, .interval small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.interval b { font-size: 11px; }
.interval small { margin-top: 3px; color: #5f7485; font-size: 9px; }
.interval.is-active { border-left-color: #1b9e63; background: #e3f7ed; animation: activePulse 2.6s ease-in-out infinite; }
.interval.is-report { border-left-color: #e18e28; background: #fff1df; }
.interval.is-completed { opacity: .88; }
.interval.is-paused { opacity: .75; background: #edf2f6; border-left-color: #7d8d99; }

.correction-card { margin-top: 14px; }
.corrections-list { margin-top: 14px; }
.timeline-page .btn { background: #1681c8; }
.timeline-page .btn.secondary { background: #f0f6fa; color: #24698f; border-color: #d9e6ee; }
.timeline-page .btn.danger { background: #faeaea; color: #a43d3d; }
.detail-dialog { max-width: 720px; }
.detail-status-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.work-status, .type-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 800; }
.work-status { color: #546c7e; background: #edf3f6; }
.work-status.is-active { color: #167048; background: #dff5e9; }
.work-status.is-report { color: #94590f; background: #fff0d8; }
.work-status.is-completed { color: #236699; background: #e2f1fb; }
.type-chip { color: color-mix(in srgb, var(--type-color) 78%, #102f46); background: color-mix(in srgb, var(--type-color) 14%, white); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 15px; }
.detail-grid div { min-width: 0; padding: 11px 12px; border: 1px solid #e4ebf0; border-radius: 11px; background: #f8fafb; }
.detail-grid dt { color: #7b8f9e; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.detail-grid dd { margin: 5px 0 0; color: #203f55; font-size: 13px; word-break: break-word; }
.detail-section { padding: 13px 14px; margin-top: 10px; border: 1px solid #e3ebf0; border-radius: 12px; }
.detail-section h4 { margin-bottom: 7px; color: #567084; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.detail-section p { margin: 0; color: #2d4a5f; font-size: 13px; white-space: pre-wrap; }
.pause-note { background: #fff8e9; border-color: #f4dfb7; }
.reminder-note { background: #eef7ff; border-color: #cce5f6; }
.answer-list { display: grid; gap: 8px; }
.answer { display: grid; grid-template-columns: 28px 1fr; gap: 9px; align-items: flex-start; padding: 9px; border-radius: 9px; background: #f7fafc; }
.answer > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: #dff0fb; color: #1878b8; font-size: 11px; font-weight: 800; }
.answer b { color: #4a6578; font-size: 11px; }
.answer p { margin-top: 4px; color: #1f3c51; font-size: 12px; }
.task-link { color: #1478bc; font-weight: 800; text-decoration: none; }
.task-link:hover { text-decoration: underline; }
.attachment-list { display: grid; gap: 7px; }
.attachment { width: 100%; display: grid; grid-template-columns: 30px minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 9px 10px; border: 1px solid #dfe8ef; border-radius: 10px; color: #294b62; background: #f7fafc; text-align: left; }
.attachment:hover { border-color: #abd3eb; background: #eff8fd; }
.attachment > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: #6f4eae; background: #eee8ff; }
.attachment b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.attachment small { color: #8596a3; font-size: 10px; }
.manager-card { padding: 20px; }
.manager-head { align-items: flex-end; margin-bottom: 16px; }
.manager-head h2 { margin: 3px 0 4px; }
.summary-period-field { display: grid; gap: 4px; color: #728698; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.summary-period-field select { min-width: 190px; }
.manager-metrics { margin-bottom: 20px; }
.manager-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(280px,1fr); gap: 18px; }
.manager-grid > section { min-width: 0; padding: 15px; border: 1px solid #e1e9ef; border-radius: 13px; background: #fbfcfd; }
.manager-grid .manager-wide { grid-column: 1 / -1; }
.manager-grid h3 { margin: 0 0 12px; color: #29465a; font-size: 14px; }
.manager-table table { min-width: 720px; }
.manager-table td { vertical-align: top; }
.manager-table td small { display: block; margin-top: 4px; color: #8495a2; font-size: 10px; }
.person-drill { padding: 0; border: 0; color: #1677b8; background: transparent; font-weight: 800; text-align: left; }
.person-drill:hover { text-decoration: underline; }
.state-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.state-pills span { padding: 3px 6px; border-radius: 7px; color: #687d8d; background: #edf2f5; font-size: 9px; font-weight: 800; }
.state-pills .ok { color: #19734b; background: #def4e8; }
.state-pills .warn { color: #925b18; background: #fff0d9; }
.type-breakdown { display: grid; gap: 13px; }
.type-row > div:first-child { display: flex; justify-content: space-between; gap: 12px; color: #466174; font-size: 11px; }
.type-row span { display: flex; align-items: center; min-width: 0; }
.type-row span i { width: 9px; height: 9px; flex: 0 0 9px; margin-right: 7px; border-radius: 3px; background: var(--type-color); }
.type-row b { color: #233f53; white-space: nowrap; }
.type-track { height: 7px; margin-top: 6px; overflow: hidden; border-radius: 99px; background: #e9eef2; }
.type-track i { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: var(--type-color); }
.attention-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap: 8px; }
.attention-list article { padding: 11px 12px; border: 1px solid #e4eaee; border-radius: 11px; background: #fff; }
.attention-list article > div { display: flex; align-items: center; gap: 7px; color: #496579; font-size: 11px; }
.attention-list article p { margin: 8px 0 5px; color: #203d52; font-size: 12px; font-weight: 700; }
.attention-list article small { color: #8496a4; font-size: 10px; }

@media (max-width: 1080px) {
  .metrics { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .app-header, .timeline-card-head { align-items: flex-start; flex-direction: column; }
  .manager-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .shell, .timeline-shell { padding: 14px; }
  .fields-2, .fields-4, .detail-grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; }
  .metrics { grid-template-columns: 1fr; }
  .metric-card { min-height: 84px; }
  .page-filters { width: 100%; }
  .page-filters > * { flex: 1 1 150px; }
  .employee-filter select { min-width: 0; width: 100%; }
  .timeline-actions { width: 100%; justify-content: space-between; }
  .timeline-grid { width: calc(170px + var(--track-width)); }
  .timeline-header, .timeline-row { grid-template-columns: 170px var(--track-width); }
  .person { padding: 12px 10px; }
  .person-kpis { display: grid; gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .interval.is-active { animation: none; }
}

}
