@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/Roboto-Latin-Variable.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Roboto';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/Roboto-Latin-Italic-Variable.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #17252b;
  --preview-ink: #26363d;
  --muted: #627177;
  --line: #dce2e0;
  --paper: #ffffff;
  --canvas: #f5f6f4;
  --orange: #f48120;
  --orange-dark: #b95916;
  --navy: #142128;
  --body: 'Roboto', Arial, 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans CJK KR', sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 14px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #f8aa67; outline-offset: 2px; }
h1, h2, p { margin-top: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: -50px; left: 12px; padding: 8px 12px; background: var(--orange); font-weight: 700; }
.skip-link:focus { top: 12px; }

.app-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 27px 14px 18px; background: var(--navy); color: #f8f9f7; }
.brand, .login-brand { display: flex; align-items: center; gap: 11px; font-family: var(--body); font-size: 18px; letter-spacing: -.05em; }
.brand { gap: 8px; margin: 0 0 43px; font-size: 16px; }
.brand-wordmark { white-space: nowrap; }
.brand strong, .login-brand strong { font-weight: 700; }
.brand-mark { display: grid; flex-shrink: 0; grid-template-columns: repeat(2, 9px); grid-template-rows: repeat(2, 9px); gap: 3px; transform: rotate(-14deg); }
.brand-mark span { background: var(--orange); }
.brand-mark span:nth-child(2) { opacity: .6; }
.brand-mark span:nth-child(3) { opacity: .8; }
.brand-mark span:nth-child(4) { opacity: .35; }
.nav-item { display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 0 12px; border: 1px solid transparent; border-radius: 7px; color: #bfcbcd; font-weight: 600; }
.nav-item + .nav-item { margin-top: 4px; }
.nav-item:hover { background: #24343c; color: white; }
.nav-item.is-active { border-color: #3a4a51; background: #293940; color: white; }
.nav-icon { display: grid; place-items: center; width: 21px; color: var(--orange); font-size: 19px; }
.nav-arrow { margin-left: auto; color: #8e9ea4; font-size: 15px; }
.sidebar-bottom { margin-top: auto; }
.user-block { display: flex; align-items: center; gap: 10px; padding: 14px 11px; border-top: 1px solid #34434b; }
.user-avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; background: #3a4a51; font-weight: 700; }
.user-info { min-width: 0; }
.user-info strong { display: block; overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.logout-button { display: flex; justify-content: space-between; width: 100%; padding: 9px 11px; border: 0; background: none; color: #afbec0; font-size: 12px; text-align: left; }
.logout-button:hover { color: white; }
.main-column { min-width: 0; }
.content { width: min(100%, 1280px); min-height: 100vh; margin: 0; padding: 40px clamp(24px, 3.6vw, 58px) 70px; }
.messages { margin-bottom: 20px; }
.message { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid #bcd7c4; border-radius: 7px; background: #ecf7ed; color: #2a6339; font-weight: 600; }
.message span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #2b7b43; color: white; font-size: 11px; }
.message-error { border-color: #edc7c3; background: #fff1ef; color: #a43329; }
.message-error span { background: #b7392d; }

.page-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.page-header > div { display: flex; align-items: baseline; gap: 12px; }
.page-header h1, .form-heading h1 { margin: 0; font-size: clamp(25px, 2.5vw, 32px); font-weight: 700; letter-spacing: -.06em; line-height: 1.35; }
.record-count { color: var(--muted); font-family: var(--body); font-size: 12px; white-space: nowrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 15px; border: 1px solid transparent; border-radius: 6px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.button-primary { background: var(--orange); color: #1b2427; }
.button-primary:hover { background: #ff9a3b; }
.button-primary span { font-size: 17px; font-weight: 500; }
.button-quiet { border-color: #d3dbd7; background: white; color: #3e4b51; }
.button-quiet:hover { background: #f6f8f5; }
.button-danger { background: #b7392d; color: white; }
.button-danger:hover { background: #9e3027; }

.search-form { display: flex; align-items: center; width: min(100%, 570px); height: 43px; margin-bottom: 16px; border: 1px solid #d5dcda; border-radius: 7px; background: white; }
.search-form:focus-within { border-color: var(--orange); }
.search-icon { display: grid; place-items: center; width: 42px; flex: 0 0 42px; color: #65737a; font-size: 25px; }
.search-form input { min-width: 0; height: 100%; flex: 1; border: 0; outline: 0; background: transparent; font-size: 13px; }
.search-form input::placeholder { color: #9ca7aa; }
.clear-search { padding: 0 10px; color: var(--muted); font-size: 12px; }
.clear-search:hover { color: var(--orange-dark); }
.search-form button { height: 100%; min-width: 68px; padding: 0 12px; border: 0; border-left: 1px solid #e1e7e3; border-radius: 0 6px 6px 0; background: #f9faf8; font-size: 12px; font-weight: 700; }
.search-form button:hover { background: #fff1e4; }
.table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: white; }
.customer-table { width: 100%; border-collapse: collapse; text-align: left; }
.customer-table th { height: 42px; padding: 0 19px; border-bottom: 1px solid var(--line); background: #fafbf9; color: #6f7e83; font-size: 11px; font-weight: 700; }
.customer-table th:first-child { width: 33%; }
.customer-table th:last-child { width: 120px; text-align: right; }
.customer-table td { height: 62px; padding: 9px 19px; border-bottom: 1px solid #edf0ed; color: #405056; font-size: 13px; }
.customer-table tr:last-child td { border-bottom: 0; }
.customer-table tbody tr:hover { background: #fffaf5; }
.customer-identity { display: flex; align-items: center; gap: 10px; }
.customer-avatar { display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 31px; border-radius: 6px; background: #fff0e3; color: #af5a1a; font-size: 13px; font-weight: 700; }
.customer-identity a, .task-title { color: #202b31; font-weight: 700; }
.customer-identity a:hover, .task-title:hover, .table-link:hover { color: var(--orange-dark); }
.customer-table .customer-task-count-cell { text-align: right; white-space: nowrap; }
.customer-task-count { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.customer-table .row-actions { text-align: right; white-space: nowrap; }
.row-actions a { color: #5f6d73; font-size: 12px; font-weight: 600; }
.row-actions a + a { margin-left: 14px; }
.row-actions a:hover { color: var(--orange-dark); }
.row-actions .delete-link:hover { color: #b7392d; }
.pagination { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-top: 16px; color: #748187; font-size: 12px; }
.pagination-range { white-space: nowrap; }
.pagination-pages { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 4px; }
.pagination-pages a, .pagination-pages .pagination-current, .pagination-pages .disabled { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; background: white; color: #46545a; font-family: var(--body); font-size: 12px; }
.pagination-pages .pagination-step { min-width: 48px; font-family: var(--body); }
.pagination-pages a:hover { border-color: #e7ba93; background: #fff5ec; color: var(--orange-dark); }
.pagination-pages .pagination-current { border-color: #273740; background: #273740; color: white; font-weight: 700; }
.pagination-pages .disabled { background: #f8f9f7; opacity: .55; }
.pagination-ellipsis { min-width: 18px; text-align: center; }
.empty-state { padding: 38px 22px; border: 1px solid var(--line); border-radius: 8px; background: white; text-align: center; }
.empty-state h2 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.text-link { color: var(--orange-dark); font-size: 13px; font-weight: 700; }
.text-link:hover { text-decoration: underline; }

.back-row { margin-bottom: 18px; }
.back-row a { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 600; }
.back-row a:hover { color: var(--orange-dark); }
.back-row span { font-size: 17px; }
.form-heading { margin-bottom: 22px; }
.form-layout { width: 100%; min-width: 0; }
.user-form-layout, .customer-record-layout { max-width: 620px; }
.customer-form { padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line); border-radius: 8px; background: white; }
.field { margin-bottom: 21px; }
.field label { display: block; margin-bottom: 7px; color: #35434a; font-size: 12px; font-weight: 700; }
.field label span { color: var(--orange-dark); }
.field input, .field select, .field textarea { display: block; width: 100%; min-height: 43px; padding: 9px 12px; border: 1px solid #d6ddda; border-radius: 6px; background: #fff; color: var(--ink); font-size: 13px; }
.field select { cursor: pointer; }
.field textarea { min-height: 160px; resize: vertical; line-height: 1.65; }
.customer-record-form .field input[name="name"] { max-width: 420px; }
.customer-record-form .field input[name="sales_manager"],
.customer-record-form .field input[name="vendor_sales_manager"],
.customer-record-form .field input[name="registered_at"] { max-width: 300px; }
.task-content-date input { max-width: 300px; }
.task-form .customer-picker { width: 100%; max-width: 420px; }
.task-form select[name="status"],
.task-form select[name="task_type"],
.task-form select[name="detail_type"] { width: 300px; max-width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--orange); outline: 3px solid #fce2cb; outline-offset: 0; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #c4544a; }
.customer-picker-search { position: relative; }
.customer-picker-search input[role='combobox'] { padding-right: 32px; }
.customer-picker-search input[aria-invalid='true'] { border-color: #c4544a; }
.customer-options { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; width: 100%; max-height: 280px; margin: 0; padding: 4px; overflow-y: auto; border: 1px solid #cbd5d1; border-radius: 7px; background: white; box-shadow: 0 14px 26px rgba(20,33,40,.15); list-style: none; }
.customer-option { padding: 10px 11px; border-radius: 4px; color: #344148; cursor: pointer; font-size: 13px; overflow-wrap: anywhere; }
.customer-option:hover, .customer-option.is-active { background: #fff0e3; color: #854317; }
.customer-picker-status { margin: 7px 0 0; color: #6e7c82; font-size: 11px; }
.customer-picker-search input[aria-invalid='true'] + .customer-options + .customer-picker-status { color: #a43329; }
.field-error, .form-errors { color: #a43329; font-size: 12px; }
.field-error { margin-top: 6px; }
.field-error ul, .form-errors ul { margin: 0; padding-left: 18px; }
.form-errors { margin-bottom: 18px; padding: 11px 13px; border: 1px solid #edc7c3; border-radius: 6px; background: #fff1ef; }
.form-notice { margin-bottom: 18px; padding: 11px 13px; border: 1px solid #f1d4b7; border-radius: 6px; background: #fff7ed; color: #85511f; font-size: 12px; }
.form-notice a { margin-left: 5px; font-weight: 700; text-decoration: underline; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 25px; padding-top: 20px; border-top: 1px solid #e8ece9; }
.customer-detail-panel { width: 100%; padding: 28px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.customer-detail-panel dl { margin: 0; }
.customer-detail-panel dl div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid #edf0ed; }
.customer-detail-panel dl div:first-child { padding-top: 0; }
.customer-detail-panel dl div:last-child { border-bottom: 0; }
.customer-detail-panel dt { color: #78868b; font-size: 12px; }
.customer-detail-panel dd { min-width: 0; margin: 0; color: var(--ink); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.customer-detail-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 22px; padding-top: 20px; border-top: 1px solid #e8ece9; }
.customer-detail-actions-right { display: flex; gap: 8px; }
.contact-section { margin-top: 32px; }
.contact-header { max-width: none; margin-bottom: 14px; }
.contact-header h2 { margin: 0; font-size: 21px; letter-spacing: -.04em; }
.contact-table th:first-child { width: auto; }
.contact-table th:last-child { width: 120px; }
.contact-table td { height: 60px; overflow-wrap: anywhere; }
.contact-table a[href^='mailto:']:hover { color: var(--orange-dark); }
.user-table th:first-child { width: 24%; }
.user-table th:last-child, .user-table td:last-child { width: 100px; text-align: right; }
.user-table td { overflow-wrap: anywhere; }
.user-table th.user-task-count-column { width: 100px; text-align: center; }
.user-table td.user-task-count-cell { text-align: center; }
.user-task-count { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.user-state { display: inline-block; padding: 4px 8px; border-radius: 5px; background: #e8f4eb; color: #2d7a48; font-size: 11px; font-weight: 700; white-space: nowrap; }
.user-state.is-inactive { background: #eff2f2; color: #607179; }
.user-detail-actions { align-items: center; flex-wrap: wrap; }
.user-detail-actions-right { flex-wrap: wrap; justify-content: flex-end; }
.user-form-subject { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.field-help { margin-top: 6px; color: #738087; font-size: 11px; line-height: 1.6; }
.field-help ul { margin: 4px 0 0; padding-left: 17px; }
.user-status-panel { max-width: 760px; padding: 28px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.user-status-panel h2 { margin: 0 0 8px; font-size: 20px; overflow-wrap: anywhere; }
.user-status-panel p { margin: 0; color: #657278; font-size: 13px; }
@media (min-width: 701px) {
  .contact-table-wrap { overflow-x: auto; }
  .contact-table { min-width: 850px; }
}
.delete-panel { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 18px; max-width: 760px; padding: 28px; border: 1px solid #e5d9d5; border-radius: 8px; background: white; }
.delete-indicator { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 7px; background: #ffebe8; color: #b7392d; font: 600 22px var(--body); }
.delete-panel h2 { margin: 2px 0 8px; font-size: 20px; }
.delete-panel p { color: #657278; font-size: 13px; }
.delete-panel dl { margin: 20px 0 0; padding: 10px 0; border-top: 1px solid #edf0ed; border-bottom: 1px solid #edf0ed; }
.delete-panel dl div { display: flex; gap: 20px; padding: 7px 0; font-size: 12px; }
.delete-panel dt { min-width: 115px; color: #879398; }
.delete-panel dd { margin: 0; color: #354148; font-weight: 600; }
.delete-panel .form-actions { margin-top: 16px; padding-top: 0; border: 0; }

.task-filter-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.filter-search { display: flex; align-items: center; flex: 1 1 240px; min-width: 180px; height: 42px; border: 1px solid #d5dcda; border-radius: 6px; background: white; }
.filter-search:focus-within { border-color: var(--orange); }
.filter-search span { display: grid; place-items: center; width: 38px; flex: 0 0 38px; color: #65737a; font-size: 24px; }
.filter-search input { width: 100%; min-width: 0; height: 100%; padding-right: 8px; border: 0; outline: 0; background: transparent; font-size: 12px; }
.filter-search input::placeholder { color: #9ca7aa; }
.task-filter-form select { height: 42px; min-width: 118px; max-width: 190px; padding: 0 10px; border: 1px solid #d5dcda; border-radius: 6px; background: white; color: #46545a; font-size: 12px; }
.task-filter-form select[name='author'] { min-width: 140px; }
.task-filter-form select[name='customer'] { min-width: 155px; }
.task-filter-form select[name='detail'] { min-width: 175px; }
.filter-submit { height: 42px; padding: 0 16px; border: 0; border-radius: 6px; background: #273740; color: white; font-size: 12px; font-weight: 700; }
.filter-submit:hover { background: #40515a; }
.filter-clear { padding: 0 5px; color: var(--muted); font-size: 12px; }
.filter-clear:hover { color: var(--orange-dark); }
.task-table { table-layout: fixed; }
.task-table th:first-child { width: auto; }
.task-table th.task-customer-column { width: 125px; }
.task-table th.task-creator-column { width: 72px; }
.task-table th.task-type-column { width: 96px; }
.task-table th.task-detail-type-column { width: 136px; }
.task-table th.task-status-column { width: 92px; }
.task-table th.task-date-column { width: 138px; text-align: left; }
.task-table td { height: 75px; min-width: 0; }
.task-activity-time { color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.task-table .task-title { display: block; font-size: 18px; line-height: 1.35; }
.task-table .task-customer-cell, .task-table .task-creator-cell { overflow-wrap: anywhere; }
.task-cell { min-width: 0; max-width: 100%; overflow: hidden; overflow-wrap: anywhere; }
.task-cell p { display: -webkit-box; margin: 4px 0 0; max-height: 3em; overflow: hidden; color: var(--preview-ink); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.type-chip { display: inline-block; padding: 4px 7px; border: 1px solid #e4e8e4; border-radius: 5px; color: #58666c; font-size: 11px; white-space: nowrap; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 5px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.task-inline-form { display: inline-flex; align-items: center; gap: 6px; }
.task-inline-picker { position: relative; padding-right: 20px; }
.task-inline-picker select { min-width: 0; margin: 0; padding: 0; border: 0; appearance: none; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.task-inline-picker select option { color: var(--ink); background: white; }
.task-inline-picker::after { position: absolute; top: 50%; right: 7px; transform: translateY(-50%); color: currentColor; content: '▾'; font-size: 10px; pointer-events: none; }
.task-inline-picker:hover { box-shadow: inset 0 0 0 1px currentColor; }
.task-inline-save { padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; background: white; color: var(--ink); font-size: 11px; }

.task-inline-picker.is-enhanced { padding: 0; }
.task-inline-picker.is-enhanced::after { display: none; }
.task-inline-picker.is-open { box-shadow: 0 0 0 2px rgba(244, 129, 32, .22); }
.task-inline-trigger { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 5px 8px; border: 0; appearance: none; background: transparent; color: inherit; font: inherit; white-space: nowrap; cursor: pointer; }
.type-chip .task-inline-trigger { padding: 4px 7px; }
.task-table .task-inline-trigger { gap: 5px; padding: 5px 6px; }
.task-table .type-chip .task-inline-trigger { padding: 4px 6px; }
.task-table .task-inline-chevron { margin-left: 0; }
.task-inline-trigger:focus-visible { border-radius: 5px; outline: 2px solid var(--orange); outline-offset: 2px; }
.task-inline-chevron { width: 6px; height: 6px; margin: -3px 1px 0 4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: .8; }
.task-inline-menu { position: fixed; z-index: 1500; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); padding: 5px; overflow-y: auto; border: 1px solid #d8e0dc; border-radius: 9px; background: white; box-shadow: 0 16px 34px rgba(20, 33, 40, .16); animation: task-inline-menu-in 120ms ease-out; }
.task-inline-menu-title { padding: 6px 10px 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.task-inline-option { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 38px; padding: 0 10px; border: 0; border-radius: 5px; background: white; color: var(--ink); cursor: pointer; font: 500 13px/1.4 var(--body); text-align: left; }
.task-inline-option:hover, .task-inline-option:focus-visible { background: #fff3e7; color: #8a4316; }
.task-inline-option:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.task-inline-option.is-selected { background: #fff7ef; color: #995019; font-weight: 700; }
.task-inline-option-label { flex: 1; }
.task-inline-option-check { color: var(--orange-dark); visibility: hidden; }
.task-inline-option.is-selected .task-inline-option-check { visibility: visible; }
.task-inline-option-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; }
.task-inline-option-dot.is-pending { background: #607179; }
.task-inline-option-dot.is-in_progress { background: #a95b14; }
.task-inline-option-dot.is-completed { background: #2d7a48; }
.task-inline-option-dot.is-on_hold { background: #855987; }
.task-inline-option-dot.is-issue { background: #b42318; }
@keyframes task-inline-menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .task-inline-menu { animation: none; } }

.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pending { background: #eff2f2; color: #607179; }
.status-in_progress { background: #fff0df; color: #a95b14; }
.status-completed { background: #e8f4eb; color: #2d7a48; }
.status-on_hold { background: #f5edf5; color: #855987; }
.status-issue { background: #b42318; color: #fff; }
.task-detail-heading h1 { overflow-wrap: anywhere; }
.detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.detail-toolbar > div { display: flex; gap: 8px; }
.task-summary-card, .task-compose-card { width: 100%; padding: 27px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.task-summary-card { margin-bottom: 28px; }
.task-summary { display: flex; flex-wrap: wrap; gap: 18px 56px; margin: 0; }
.task-history h2, .task-compose-card h2 { margin: 0 0 18px; font-size: 17px; }
.task-entry-list { display: grid; gap: 12px; }
.task-summary div { flex: 1 1 160px; min-width: 0; }
.task-summary dt { margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.task-summary dd { min-width: 0; margin: 0; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.task-summary dd a:hover { color: var(--orange-dark); }
.task-content-text { color: var(--preview-ink); font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.task-content-text p { margin-bottom: 16px; }
.task-content-text p:last-child { margin-bottom: 0; }
.task-content-text a { color: var(--orange-dark); text-decoration: underline; }
.task-content-text ul, .task-content-text ol { margin: 12px 0; padding-left: 22px; }
.task-content-text li { margin: 5px 0; }
.task-content-text blockquote, trix-editor.rich-text-editor blockquote { margin: 14px 0; padding: 8px 12px 8px 15px; border-left: 3px solid var(--orange); background: #fff7ee; color: var(--preview-ink); }
.task-content-text pre, trix-editor.rich-text-editor pre { display: block; width: 100%; margin: 14px 0; padding: 12px; overflow-x: auto; border: 1px solid #dce2e0; border-radius: 5px; background: #edf1ee; color: var(--preview-ink); font: 12px/1.6 var(--mono); white-space: pre; }
.task-content-text h1, .task-content-text h2, .task-content-text h3 { margin: 14px 0 8px; font-size: 16px; }
.task-content-text figure { max-width: 100%; margin: 16px 0; }
.task-content-text img { display: block; max-width: 100%; height: auto; border: 1px solid #d8e0dc; border-radius: 5px; }
.task-content-text figcaption { display: none; }
trix-editor.rich-text-editor { display: block; min-height: 210px; padding: 12px; border: 1px solid #d6ddda; border-radius: 6px; background: white; color: var(--ink); font: 13px/1.7 var(--body); }
trix-editor.rich-text-editor:focus { border-color: var(--orange); outline: 3px solid #fce2cb; outline-offset: 0; }
.field.has-error trix-editor.rich-text-editor { border-color: #c4544a; }
trix-editor.rich-text-editor img.task-image-resize-selected { outline: 2px solid var(--orange); outline-offset: 2px; }
trix-editor.rich-text-editor .attachment--preview { width: auto; max-width: 100%; text-align: left; }
trix-editor.rich-text-editor .attachment--preview img { width: auto; max-width: 100%; height: auto; }
trix-editor.rich-text-editor .attachment__caption { display: none; }
.task-image-resize-handle { position: fixed; z-index: 1000; display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 2px solid white; border-radius: 4px; background: var(--orange); box-shadow: 0 1px 5px #1b2b3555; color: #14232b; font: 14px/1 var(--body); cursor: nwse-resize; touch-action: none; }
.task-image-resize-handle[hidden] { display: none; }
.task-image-resize-handle:focus-visible { outline: 2px solid #14232b; outline-offset: 2px; }
trix-toolbar .trix-button-group { border-color: #d6ddda; }
.rich-text-attachment-hint { margin: 0 0 8px; color: var(--preview-ink); font-size: 13px; line-height: 1.5; }
.rich-text-upload-message { margin: 7px 0 0; color: #a43329; font-size: 12px; }
.task-entry { min-width: 0; padding: 18px 20px; border: 1px solid #d8e0dc; border-left: 1px solid var(--orange); border-radius: 7px; background: white; }
.task-entry-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #e5ebe7; }
.task-entry-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; min-width: 0; }
.task-entry-header time { color: var(--ink); font-family: var(--body); font-size: 16px; font-weight: 700; letter-spacing: 0; line-height: 1.4; white-space: nowrap; }
.task-entry-author { min-width: 0; color: #39474d; font-size: 16px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.task-entry-author::before { margin-right: 10px; color: #9aa6a9; content: "·"; font-size: 16px; font-weight: 400; }
.task-entry-actions { display: flex; flex-shrink: 0; gap: 14px; font-size: 12px; font-weight: 600; }
.task-entry-actions a:hover { color: var(--orange-dark); }
.task-entry-actions .delete-link:hover { color: #b7392d; }
.task-entry-empty { color: var(--muted); font-size: 13px; }
.task-compose-card { margin-top: 28px; }
.task-content-compose .field { margin-bottom: 0; }
.task-content-compose .form-actions { justify-content: space-between; }

.dashboard-heading { margin-bottom: 22px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 24px; }
.dashboard-section { min-width: 0; }
.dashboard-section + .dashboard-section { padding-top: 24px; border-top: 1px solid #cbd4d0; }
.dashboard-section-heading { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.dashboard-section-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.04em; }
.dashboard-list { display: grid; gap: 14px; }
.dashboard-item, .dashboard-empty { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: white; }
.dashboard-item { padding: 18px 20px; }
.dashboard-item-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.dashboard-item-top time { color: #34444c; font: 700 16px/1.4 var(--body); }
.dashboard-item-title { display: block; color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.dashboard-item-title:hover { color: var(--orange-dark); }
.dashboard-item-meta { display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 5px; color: #36464d; font-size: 13px; overflow-wrap: anywhere; }
.dashboard-item-meta span + span::before { margin-right: 14px; color: #a5b0b2; content: "·"; }
.dashboard-preview { margin: 10px 0 0; color: var(--preview-ink); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.dashboard-updates { margin-top: 12px; padding-top: 10px; border-top: 1px solid #edf0ed; }
.dashboard-updates summary { width: fit-content; color: var(--orange-dark); cursor: pointer; font-size: 12px; font-weight: 700; }
.dashboard-updates summary:hover { text-decoration: underline; }
.dashboard-update-list { display: grid; margin-top: 8px; }
.dashboard-update { display: grid; grid-template-columns: 106px minmax(0, 1fr); align-items: baseline; gap: 14px; padding: 9px 0; border-top: 1px solid #f0f2ef; color: var(--preview-ink); }
.dashboard-scheduled-update { grid-template-columns: 145px minmax(0, 1fr); }
.dashboard-update:first-child { border-top: 0; }
.dashboard-update:hover { color: var(--orange-dark); }
.dashboard-update time { font: 600 14px/1.5 var(--body); white-space: nowrap; }
.dashboard-update span { min-width: 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.dashboard-empty { margin: 0; padding: 26px 20px; color: var(--preview-ink); font-size: 13px; }
.dashboard-pagination { justify-content: flex-end; }

.login-body { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: #e9eeeb; }
.login-shell { width: min(100%, 410px); padding: 34px; border: 1px solid #d8e0dc; border-radius: 9px; background: white; box-shadow: 0 12px 35px rgba(20,33,40,.07); }
.login-brand { margin-bottom: 33px; color: var(--ink); }
.login-shell h1 { margin: 0 0 26px; font-size: 27px; letter-spacing: -.05em; }
.login-form .field { margin-bottom: 19px; }
.login-submit { width: 100%; min-height: 45px; margin-top: 7px; }

@media (min-width: 701px) {
  .task-table-wrap { overflow-x: auto; }
  .task-table { min-width: 1000px; }
  .task-table th:not(:first-child), .task-table td:not(:first-child) { padding-left: 8px; padding-right: 8px; }
  .task-table th:first-child, .task-table td:first-child { padding-right: 12px; }
  .task-table th:last-child, .task-table td:last-child { padding-right: 16px; }
}

@media (max-width: 960px) {
  .app-shell { grid-template-columns: 188px minmax(0, 1fr); }
  .content { padding: 32px 26px 55px; }
}

@media (max-width: 700px) {
  .app-shell { display: block; }
  .sidebar { position: relative; height: auto; padding: 16px 20px; }
  .brand { margin: 0 0 14px; }
  .sidebar-section nav { display: flex; gap: 4px; }
  .nav-item { flex: 1; justify-content: center; min-height: 35px; padding: 0 7px; font-size: 12px; }
  .nav-item + .nav-item { margin: 0; }
  .nav-icon, .nav-arrow { display: none; }
  .sidebar-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; border-top: 1px solid #34434b; }
  .user-block { padding: 9px 0 0; border: 0; }
  .user-avatar { display: none; }
  .logout-button { width: auto; gap: 8px; padding: 9px 0 0; }
  .content { min-height: calc(100vh - 165px); padding: 28px 18px 45px; }
  .customer-table thead { display: none; }
  .customer-table, .customer-table tbody, .customer-table tr, .customer-table td { display: block; width: 100%; }
  .customer-table tr { padding: 12px 15px; border-bottom: 1px solid var(--line); }
  .customer-table tr:last-child { border-bottom: 0; }
  .customer-table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; height: auto; min-height: 28px; padding: 3px 0; border: 0; text-align: right; }
  .customer-table td:before { color: #879398; content: attr(data-label); font-size: 11px; white-space: nowrap; }
  .customer-table td:first-child { justify-content: start; margin-bottom: 7px; }
  .customer-table td:first-child:before, .customer-table .row-actions:before { display: none; }
  .customer-table .row-actions { justify-content: flex-end; margin-top: 6px; }
  .user-table td:last-child { width: 100%; }
  .task-table td:first-child { display: block; text-align: left; }
  .task-cell { min-width: 0; }
  .task-cell p { white-space: normal; }
  .dashboard-item { padding: 16px; }
  .task-filter-form .filter-search { flex-basis: 100%; }
  .task-filter-form select { max-width: none; flex: 1 1 130px; }
  .task-filter-form .filter-submit { flex: 1 1 75px; }
}

@media (max-width: 470px) {
  .dashboard-scheduled-update { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .page-header { align-items: start; }
  .page-header > div { display: block; }
  .page-header h1 { font-size: 25px; }
  .record-count { display: block; margin-top: 2px; }
  .page-header .button { padding: 0 9px; font-size: 11px; }
  .search-icon { width: 33px; flex-basis: 33px; }
  .search-form button { min-width: 56px; padding: 0 7px; }
  .customer-form { padding: 20px; }
  .customer-detail-panel { padding: 20px; }
  .user-detail-actions { flex-direction: column; align-items: stretch; }
  .user-detail-actions-right { justify-content: stretch; }
  .user-detail-actions .button { width: 100%; }
  .user-status-panel { padding: 20px; }
  .task-summary-card, .task-compose-card { padding: 20px; }
  .task-entry { padding: 16px; }
  .customer-detail-panel dl div { grid-template-columns: 1fr; gap: 4px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .delete-panel { grid-template-columns: 1fr; padding: 20px; }
  .delete-panel dl div { flex-direction: column; gap: 1px; }
  .login-shell { padding: 27px; }
}

/* Shared resource library */
.library-intro, .library-help { color: #5f6d73; font-size: 14px; line-height: 1.6; }
.library-search { display: flex; flex-wrap: wrap; gap: 12px; width: 100%; height: auto; padding: 10px; }
.library-search input { padding: 10px 12px; height: 42px; flex: 1 1 220px; min-width: 0; }
.library-search button { height: 42px; border: 1px solid var(--line); border-radius: 6px; }
.library-search select { border: 1px solid var(--line); border-radius: 6px; padding: 10px; background: white; color: var(--ink); font: inherit; }
.library-table td:first-child { overflow-wrap: anywhere; }
@media (min-width: 701px) {
  .library-table th:first-child, .library-table td:first-child { width: auto; }
  .library-table th:not(:first-child), .library-table td:not(:first-child) { width: 1%; padding-left: 18px; padding-right: 18px; white-space: nowrap; }
  .library-table th:last-child, .library-table td:last-child { padding-right: 19px; }
}
.library-table .table-link { font-size: 15px; font-weight: 700; }
.library-heading h1 { overflow-wrap: anywhere; }
.library-actions, .library-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.library-meta { color: #5f6d73; font-size: 14px; margin-bottom: 24px; }
.library-description { padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: white; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.library-detail-panel { margin-top: 24px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.library-panel-heading { padding: 18px 24px; border-bottom: 1px solid var(--line); }
.library-panel-heading h2 { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 18px; }
.library-panel-heading .record-count { display: inline; margin: 0; }
.library-file-list, .library-comment-list { padding: 0 24px; }
.library-file:last-child, .library-comment:last-child { border-bottom: 0; }
.library-comment-list > .library-help { margin: 0; padding: 24px 0; }
.library-comments > .library-comment-form { margin: 0; padding: 24px; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; background: #f8faf8; }
.library-comments > .library-comment-form .form-actions { margin-top: 16px; padding-top: 0; border-top: 0; }
.library-comments > .library-comment-form .field { margin-bottom: 0; }
.library-comment .task-content-text > :first-child { margin-top: 0; }
.library-comment .task-content-text > :last-child { margin-bottom: 0; }
.library-file { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.library-file > div { min-width: 0; }
.library-file strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.library-file span { display: block; margin-top: 6px; color: #5f6d73; font-size: 13px; }
.library-file .button { flex-shrink: 0; }
.library-form-layout { max-width: 800px; }
.library-remove { border: 0; padding: 0; margin: 0; min-width: 0; }
.library-remove legend { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.library-remove label { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.library-remove input[type="checkbox"] { width: 18px; min-height: 18px; flex-shrink: 0; }
@media (max-width: 640px) {
  .library-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .library-file { flex-wrap: wrap; gap: 12px; }
  .library-table td:first-child { width: auto; }
}

.library-selection { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 7px; background: #f8faf8; }
.library-selection-summary { margin: 0 0 10px; color: #35434a; font-size: 14px; font-weight: 700; }
.library-selected-list { list-style: none; margin: 0; padding: 0; }
.library-selected-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.library-selected-name { min-width: 0; overflow-wrap: anywhere; }
.library-selected-size { flex-shrink: 0; color: #5f6d73; white-space: nowrap; }

.library-selected-actions { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.library-selected-remove { min-height: 32px; padding: 4px 9px; border: 1px solid #d3dbd7; border-radius: 5px; background: white; color: #a43329; font-size: 13px; }
.library-selected-remove:hover { border-color: #a43329; background: #fff0ed; }

.library-upload-progress { margin: 20px 0; padding: 16px; border: 1px solid var(--line); border-radius: 7px; background: #f8faf8; }
.library-upload-progress p { margin: 0 0 10px; font-size: 14px; font-weight: 700; }
.library-upload-progress progress { display: block; width: 100%; height: 12px; accent-color: var(--orange); }
.library-form[aria-busy="true"] button:disabled { cursor: wait; opacity: .65; }

.library-file-warning { margin-top: 12px; padding: 12px; border: 1px solid #e4b6b1; border-radius: 6px; background: #fff0ed; color: #a43329; white-space: pre-line; overflow-wrap: anywhere; }
.library-file-too-large .library-selected-name, .library-file-too-large .library-selected-size { color: #a43329; font-weight: 700; }

.library-form trix-toolbar [data-trix-button-group="file-tools"] { display: none; }
.library-form trix-editor { min-height: 300px; }
.library-description pre { font-size: 14px; }

.library-comments { scroll-margin-top: 24px; }
.library-comment { padding: 22px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.library-comment-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 14px; font-size: 14px; }
.library-comment-heading time, .library-comment-heading span { color: #5f6d73; font-size: 13px; }
.library-comment-heading strong { margin-right: 10px; }
.library-comment-form { margin-top: 24px; }
.library-comment-form trix-toolbar [data-trix-button-group="file-tools"] { display: none; }
.library-comment-form trix-editor { min-height: 160px; }

@media (max-width: 640px) {
  .library-panel-heading { padding: 16px; }
  .library-file-list, .library-comment-list { padding: 0 16px; }
  .library-comments > .library-comment-form { padding: 16px; }
  .library-file { gap: 12px; }
  .library-comment-heading { gap: 8px; }
}

.task-scope-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.task-scope-tabs a { display: inline-flex; gap: 6px; align-items: center; padding: 12px 18px; border-bottom: 3px solid transparent; color: #5f6d73; font-size: 15px; font-weight: 700; }
.task-scope-tabs a.is-active { border-bottom-color: var(--orange); color: var(--ink); }
.task-scope-tabs a:hover { background: #fff4e8; }
.task-scope-tabs span { font-size: 13px; font-weight: 500; }
.task-scope-description { margin: 12px 0 18px; color: #5f6d73; font-size: 13px; }
