:root {
    --primary: #4F46E5;
    --primary-strong: #3730a3;
    --primary-soft: #eef2ff;
    --ink: #11183f;
    --ink-soft: #24315f;
    --muted: #7180a5;
    --line: #e6ebf5;
    --page: #f4f7fc;
    --card: #ffffff;
    --green: #19a55b;
    --green-soft: #e9f8f0;
    --orange: #f27a1a;
    --orange-soft: #fff1e6;
    --red: #f04462;
    --red-soft: #ffe9ee;
    --blue-soft: #eff3ff;
    --shadow: 0 16px 36px rgba(31, 45, 92, 0.08);
}
 
* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background: var(--page);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

[hidden] {
    display: none !important;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: linear-gradient(180deg, #f7f9fd 0%, #eef3fb 100%);
}

.login-card {
    width: min(100%, 390px);
    padding: 22px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.login-brand p,
.topbar-copy p,
.label-muted {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.login-brand h1,
.topbar-copy h1 {
    margin: 2px 0 0;
    color: var(--ink);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.2;
}

.brand-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand-mark {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex: 0 0 auto;
    padding: 4px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.avatar-photo,
.brand-tile {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #ffffff;
    background: linear-gradient(145deg, #4c5bff, #1f2fd0);
    border-radius: 8px;
    font-weight: 900;
}

.login-form {
    display: grid;
    gap: 10px;
}

.login-passkey-action {
    width: 100%;
    justify-content: center;
    margin-top: 2px;
}

.field-label {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 800;
}

.field-input,
.select-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
}

.field-input:focus,
.select-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 70, 241, 0.12);
}

.primary-action,
.danger-action,
.soft-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.primary-action {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 10px 20px rgba(52, 70, 241, 0.20);
}

.primary-action:hover {
    background: var(--primary-strong);
}

.danger-action {
    color: #ffffff;
    background: linear-gradient(135deg, #ff6174, #f04462);
}

.soft-action {
    color: var(--primary);
    background: var(--primary-soft);
}

.compact-alert {
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 276px minmax(0, 1fr);
    background: var(--page);
}

.desktop-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 22px 18px;
    background: #ffffff;
    border-right: 1px solid var(--line);
}

.desktop-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 20px;
}

.desktop-brand strong {
    display: block;
    color: var(--ink);
    font-size: 16px;
    font-weight: 900;
}

.desktop-brand span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.desktop-nav {
    display: grid;
    gap: 5px;
    overflow-y: auto;
}

.desktop-nav button,
.desktop-logout {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 850;
    text-align: left;
}

.desktop-nav button.active,
.desktop-nav button:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.desktop-logout {
    margin-top: auto;
    color: var(--red);
}

.app-frame {
    width: 100%;
    max-width: 1240px;
    min-height: 100vh;
    padding: 22px 28px 120px;
}

.app-topbar {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.icon-button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    background: transparent;
    border: 0;
    border-radius: 8px;
}

.icon-button:hover {
    background: #ffffff;
}

.icon-button svg,
.primary-action svg,
.danger-action svg,
.soft-action svg,
.desktop-nav svg,
.desktop-logout svg,
.bottom-nav svg,
.shortcut svg,
.card-action svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
}

.topbar-copy {
    min-width: 0;
    text-align: center;
}

.topbar-copy h1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.screen-root {
    display: grid;
    gap: 14px;
}

.screen-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.desktop-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 14px;
}

.time-summary-sections {
    grid-template-columns: 1fr;
}

.time-summary-sections > .app-card:first-child {
    order: 2;
}

.time-summary-sections > .app-card:nth-child(2) {
    order: 1;
}

.time-summary-sections.hide-week-summary > .app-card:first-child {
    display: none;
}

.desktop-three {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.app-card,
.task-card,
.protocol-card,
.client-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(31, 45, 92, 0.045);
}

.app-card {
    padding: 16px;
}

.card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    min-width: 0;
}

.card-title > * {
    min-width: 0;
}

.card-title h2,
.card-title h3 {
    margin: 0;
    color: var(--ink);
    font-size: 15px;
    font-weight: 900;
}

.card-title p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.time-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.time-value {
    color: var(--primary);
    font-size: 30px;
    font-weight: 950;
    line-height: 1;
}

.small-caption {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.stat-card {
    min-height: 78px;
    padding: 12px;
    background: #f6f8fd;
    border: 1px solid #edf1f8;
    border-radius: 8px;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.stat-card strong {
    display: block;
    margin-top: 10px;
    color: var(--ink);
    font-size: 18px;
    font-weight: 950;
}

.stat-card strong.primary {
    color: var(--primary);
}

.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.shortcut {
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 10px 4px;
    color: var(--ink-soft);
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 850;
}

.shortcut span:first-child {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 8px;
}

.segmented {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 4px;
    padding: 4px;
    background: #eef2f8;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.segmented button {
    min-height: 32px;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 850;
}

.segmented button.active {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 8px 16px rgba(52, 70, 241, 0.18);
}

.task-list,
.protocol-list,
.settings-list,
.timeline-list {
    display: grid;
    gap: 10px;
}

.task-card,
.protocol-card {
    position: relative;
    display: grid;
    gap: 8px;
    padding: 14px 14px 14px 18px;
    overflow: hidden;
}

.task-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 4px;
    background: var(--primary);
    border-radius: 0 8px 8px 0;
}

.task-card.orange::before {
    background: var(--orange);
}

.task-card.green::before {
    background: var(--green);
}

.task-card strong,
.protocol-card strong {
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
}

.task-card small,
.protocol-card small,
.meta-line {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.task-detail-title {
    margin: 16px 0 8px;
}

.contact-detail {
    display: grid;
    grid-template-columns: minmax(96px, 0.42fr) minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.contact-detail > span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.25;
}

.contact-detail > div {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.contact-detail strong,
.contact-detail a {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--ink);
    text-decoration: none;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.25;
}

.contact-detail svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.contact-detail span,
.contact-detail a span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.task-worker-list {
    display: grid;
    gap: 8px;
}

.task-worker-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 28px;
}

.task-worker-row span {
    width: 10px;
    height: 10px;
    border: 1px solid rgba(17, 24, 63, 0.12);
    border-radius: 50%;
}

.task-worker-row strong {
    min-width: 0;
    color: var(--ink);
    font-size: 13px;
    font-weight: 850;
}

.task-note {
    padding: 12px;
    color: var(--ink-soft);
    background: #f8faff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.task-note-input {
    width: 100%;
    min-height: 118px;
    padding: 12px;
    color: var(--ink-soft);
    background: #f8faff;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
    resize: vertical;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.task-note-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.task-note-save {
    width: 100%;
    margin-top: 10px;
}

.task-protocol-action {
    width: 100%;
    margin-top: 14px;
}

.protocol-photo-button {
    cursor: pointer;
}

.protocol-number {
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.protocol-day-list {
    display: grid;
    gap: 10px;
}

.protocol-day-item {
    display: grid;
    gap: 10px;
    padding: 12px;
    background: #f8faff;
    border: 1px solid #edf1f8;
    border-radius: 8px;
}

.protocol-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.protocol-day-head strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
}

.protocol-day-head span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-align: right;
}

.protocol-day-head svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.protocol-day-item p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.protocol-work-description {
    display: grid;
    gap: 6px;
    padding: 11px 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.protocol-work-description span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
}

.protocol-work-description p {
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
}

.protocol-day-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.protocol-day-total span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
}

.protocol-day-total strong {
    color: var(--primary);
    font-size: 14px;
    font-weight: 950;
}

.protocol-worker-list {
    display: grid;
    gap: 8px;
}

.protocol-worker-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.protocol-worker-row div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.protocol-worker-row div:last-child {
    text-align: right;
}

.protocol-worker-row strong {
    color: var(--ink);
    font-size: 12px;
    font-weight: 900;
}

.protocol-worker-row span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
}

.protocol-day-edit {
    gap: 9px;
}

.protocol-cartrack-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    color: var(--ink);
    background: #f5f8ff;
    border: 1px solid #dbe7ff;
    border-radius: 8px;
}

.protocol-cartrack-group {
    display: grid;
    gap: 10px;
}

.protocol-cartrack-title {
    color: var(--ink);
    font-size: 12px;
    font-weight: 900;
}

.protocol-cartrack-card-empty {
    background: #fbfcff;
    border-style: dashed;
}

.protocol-cartrack-card-empty .protocol-cartrack-head em {
    color: #64748b;
    background: #eef2f7;
}

.protocol-cartrack-no-match {
    width: fit-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.protocol-cartrack-no-match svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.protocol-cartrack-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.protocol-cartrack-head div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.protocol-cartrack-head span,
.protocol-cartrack-grid span,
.protocol-cartrack-meta span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.protocol-cartrack-head strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.protocol-cartrack-head em {
    flex: 0 0 auto;
    padding: 4px 8px;
    color: #1d4ed8;
    background: #dbeafe;
    border-radius: 999px;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.protocol-cartrack-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.protocol-cartrack-grid div {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 9px 8px;
    background: #ffffff;
    border: 1px solid #e5ecfb;
    border-radius: 8px;
}

.protocol-cartrack-grid strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
}

.protocol-cartrack-meta {
    display: grid;
    gap: 6px;
}

.protocol-cartrack-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.protocol-cartrack-meta svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.protocol-cartrack-ok {
    color: #047857 !important;
    font-weight: 900 !important;
}

.protocol-cartrack-copy {
    width: 100%;
    min-height: 42px;
    justify-content: center;
}

.task-note-input.compact {
    min-height: 72px;
}

.protocol-worker-edit {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 10px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.protocol-worker-edit > strong {
    color: var(--ink);
    font-size: 12px;
    font-weight: 900;
}

.protocol-worker-hours {
    justify-self: start;
    padding: 5px 8px;
    color: #047857;
    background: #ecfdf5;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.protocol-time-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.protocol-time-grid label {
    display: grid;
    gap: 4px;
    min-width: 0;
    width: 100%;
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
}

.protocol-time-grid input {
    box-sizing: border-box;
    display: block;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    height: 38px;
    padding: 0 8px;
    -webkit-appearance: none;
    appearance: none;
    color: var(--ink);
    background: #f8faff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.attachment-list {
    display: grid;
    gap: 8px;
}

.attachment-row {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 10px;
    color: var(--ink);
    text-decoration: none;
    background: #f8faff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.attachment-row svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.attachment-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.photo-thumb {
    display: block;
    aspect-ratio: 1;
    width: 100%;
    padding: 0;
    overflow: hidden;
    background: #f8faff;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.gallery-open {
    overflow: hidden;
}

.image-gallery-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    grid-template-rows: auto 1fr;
    align-items: center;
    gap: 14px;
    padding: max(16px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    color: #ffffff;
    background: rgba(8, 12, 28, 0.94);
}

.image-gallery-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.image-gallery-head div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.image-gallery-head strong {
    min-width: 0;
    overflow: hidden;
    color: #ffffff;
    font-size: 15px;
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-gallery-head span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 650;
}

.image-gallery-close,
.image-gallery-nav {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.image-gallery-close {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    font-size: 34px;
    line-height: 1;
}

.image-gallery-stage {
    min-width: 0;
    min-height: 0;
    display: grid;
    place-items: center;
    margin: 0;
    touch-action: pan-y;
}

.image-gallery-stage img {
    max-width: 100%;
    max-height: calc(100vh - 128px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

.image-gallery-nav {
    position: fixed;
    top: 50%;
    z-index: 1;
    width: 44px;
    height: 56px;
    border-radius: 8px;
    font-size: 44px;
    line-height: 1;
    transform: translateY(-50%);
}

.image-gallery-nav.prev {
    left: max(12px, env(safe-area-inset-left));
}

.image-gallery-nav.next {
    right: max(12px, env(safe-area-inset-right));
}

.signature-panel {
    display: grid;
    gap: 10px;
}

.signature-preview {
    display: grid;
    gap: 8px;
    padding: 12px;
    background: #f8faff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.signature-preview img {
    display: block;
    width: 100%;
    max-height: 120px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.signature-preview strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
}

.signature-preview span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
}

.signature-pad {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    align-content: start;
    grid-template-rows: auto auto auto;
    gap: 14px;
    padding: max(16px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    background: #f5f7fb;
}

.signature-pad[hidden] {
    display: none;
}

.signature-pad-head,
.signature-pad-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.signature-pad-head strong {
    color: var(--ink);
    font-size: 18px;
    font-weight: 900;
}

.signature-pad canvas {
    width: 100%;
    height: min(46vh, 360px);
    min-height: 220px;
    touch-action: none;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.signature-pad-actions .soft-action,
.signature-pad-actions .primary-action {
    width: 100%;
    margin: 0;
}

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 auto;
    max-width: 100%;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 8px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-green {
    color: var(--green);
    background: var(--green-soft);
}

.badge-orange {
    color: var(--orange);
    background: var(--orange-soft);
}

.badge-red {
    color: var(--red);
    background: var(--red-soft);
}

.leave-balance {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.leave-balance .app-card strong {
    display: block;
    margin: 8px 0 4px;
    color: var(--primary);
    font-size: 26px;
    font-weight: 950;
}

.leave-balance .app-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.leave-screen {
    display: grid;
    gap: 14px;
}

.leave-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border-color: #e6ebf5;
}

.leave-hero-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.leave-hero-copy span,
.leave-hero-copy small,
.leave-balance-card span,
.leave-balance-card small {
    color: #60708d;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.25;
}

.leave-hero-copy strong {
    color: var(--ink);
    font-size: 28px;
    font-weight: 760;
    line-height: 1;
}

.leave-primary-action {
    background: var(--primary);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.18);
}

.leave-primary-action:hover {
    background: var(--primary-strong);
}

.leave-balance-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.leave-balance-card {
    min-height: 94px;
    display: grid;
    align-content: start;
    gap: 7px;
    background: #ffffff;
}

.leave-balance .leave-balance-card strong {
    margin: 0;
    color: #10183d;
    font-size: 21px;
    font-weight: 760;
    line-height: 1;
}

.leave-balance-card.blue {
    background: #f6f7ff;
    border-color: #e1e5ff;
}

.leave-balance-card.blue strong {
    color: var(--primary);
}

.leave-balance-card.neutral {
    background: #fbfcff;
    border-color: #e7edf7;
}

.leave-balance-card.neutral strong {
    color: #526089;
}

.leave-balance-card.amber {
    background: #fffaf2;
    border-color: #fde9c6;
}

.leave-balance-card.amber strong {
    color: #ca6a10;
}

.leave-form-card {
    background: #fbfcff;
}

.leave-form-card .card-title p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.leave-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.leave-form-grid label,
.leave-note-field {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.leave-form-grid .field-input,
.leave-form-grid .select-input {
    min-width: 0;
    max-width: 100%;
}

.leave-date-shell {
    width: 100%;
    height: 46px;
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.leave-date-shell:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 70, 241, 0.12);
}

.leave-date-shell .leave-date-input {
    width: 100%;
    height: 44px;
    display: block;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0 14px;
    color: var(--ink);
    background: transparent;
    border: 0;
    outline: 0;
    font: inherit;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    line-height: 44px;
}

.leave-date-shell .leave-date-input::-webkit-date-and-time-value {
    min-width: 0;
    text-align: left;
}

.leave-usage-summary {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
    padding: 12px;
    color: #526089;
    background: #f7f9ff;
    border: 1px solid #e4e9ff;
    border-radius: 8px;
}

.leave-usage-summary.ok {
    background: #f5fbf8;
    border-color: #d9f0e4;
}

.leave-usage-summary.warning,
.leave-usage-summary.danger {
    background: #fff7f7;
    border-color: #ffdce2;
}

.leave-usage-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.leave-usage-grid div {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.leave-usage-summary span,
.leave-usage-summary small,
.leave-usage-summary p {
    margin: 0;
    color: #60708d;
    font-size: 11px;
    font-weight: 620;
    line-height: 1.3;
}

.leave-usage-summary strong {
    color: var(--ink);
    font-size: 17px;
    font-weight: 760;
    line-height: 1.1;
    white-space: nowrap;
}

.leave-usage-summary.ok strong {
    color: #15965a;
}

.leave-usage-summary.warning strong,
.leave-usage-summary.danger strong {
    color: var(--red);
}

.leave-usage-summary.danger p,
.leave-usage-summary.warning p {
    color: var(--red);
}

.leave-note-field {
    grid-column: 1 / -1;
}

.leave-note-input {
    min-height: 88px;
    height: auto;
    padding-top: 12px;
    resize: vertical;
}

.leave-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.leave-tabs {
    background: #f0f3f8;
}

.leave-tabs button.active {
    background: var(--primary);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.16);
}

.leave-admin-screen {
    gap: 12px;
}

.leave-admin-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    background: #ffffff;
}

.leave-admin-hero > div:first-child {
    display: grid;
    gap: 4px;
}

.leave-admin-hero span,
.leave-admin-hero small,
.leave-admin-hero-meta span {
    color: #60708d;
    font-size: 12px;
    font-weight: 650;
}

.leave-admin-hero strong {
    color: var(--primary);
    font-size: 32px;
    font-weight: 780;
    line-height: 1;
}

.leave-admin-hero-meta {
    display: grid;
    gap: 6px;
    justify-items: end;
}

.leave-admin-hero-meta b {
    color: var(--ink);
}

.leave-admin-list-card,
.leave-admin-employees-card {
    display: grid;
    gap: 10px;
}

.leave-admin-item,
.leave-admin-employee {
    display: grid;
    gap: 10px;
    padding: 12px;
    background: #f8faff;
    border: 1px solid #eef3fb;
    border-radius: 10px;
}

.leave-admin-item.history.green {
    background: #f5fbf8;
    border-color: #d9f0e4;
}

.leave-admin-item.history.red {
    background: #fff7f7;
    border-color: #ffdce2;
}

.leave-admin-main {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.leave-admin-main strong {
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    font-weight: 780;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leave-admin-main span,
.leave-admin-main small,
.leave-admin-note {
    display: block;
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 620;
    line-height: 1.35;
}

.leave-admin-note {
    margin: 0;
    padding: 9px 10px;
    background: #ffffff;
    border: 1px solid #edf2f8;
    border-radius: 8px;
}

.leave-admin-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.leave-admin-actions .primary-action,
.leave-admin-actions .soft-action {
    min-height: 40px;
    justify-content: center;
}

.danger-soft {
    color: var(--red);
    background: var(--red-soft);
}

.leave-admin-employee-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.leave-admin-employee-grid div {
    min-width: 0;
    padding: 9px 8px;
    background: #ffffff;
    border: 1px solid #edf2f8;
    border-radius: 9px;
}

.leave-admin-employee-grid span {
    display: block;
    color: #60708d;
    font-size: 10px;
    font-weight: 650;
}

.leave-admin-employee-grid strong {
    display: block;
    margin-top: 5px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 780;
}

.leave-admin-today {
    color: #15965a !important;
}

.leave-admin-today.muted {
    color: var(--muted) !important;
}

.leave-list-card {
    padding: 0 16px;
}

.leave-list-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.leave-list-item:last-child {
    border-bottom: 0;
}

.leave-list-main {
    min-width: 0;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
}

.leave-type-pill {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: #f0f2ff;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 760;
}

.leave-list-item.green .leave-type-pill {
    color: #15965a;
    background: #e9f8f0;
}

.leave-list-item.orange .leave-type-pill {
    color: #d96c0d;
    background: #fff1e6;
}

.leave-list-item.amber .leave-type-pill {
    color: #c66a10;
    background: #fff6e8;
}

.leave-list-item.red .leave-type-pill {
    color: var(--red);
    background: var(--red-soft);
}

.leave-list-main strong {
    display: block;
    color: var(--ink);
    font-size: 14px;
    font-weight: 760;
    line-height: 1.2;
}

.leave-list-main p,
.leave-list-main small {
    display: block;
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.leave-list-status {
    min-width: 96px;
    display: flex;
    justify-content: flex-end;
}

.leave-list-status span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 9px;
    color: var(--primary);
    background: #f0f2ff;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 730;
    white-space: nowrap;
}

.leave-list-item.green .leave-list-status span {
    color: #15965a;
    background: #e9f8f0;
}

.leave-list-status svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

.leave-list-item.orange .leave-list-status span {
    color: #d96c0d;
    background: #fff1e6;
}

.leave-list-item.amber .leave-list-status span {
    color: #b86613;
    background: #fff6e8;
}

.leave-list-item.red .leave-list-status span {
    color: var(--red);
    background: var(--red-soft);
}

.leave-empty-state {
    min-height: 150px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    padding: 22px;
    text-align: center;
}

.leave-empty-state svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.leave-empty-state strong {
    color: var(--ink);
    font-size: 14px;
    font-weight: 760;
}

.leave-empty-state span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.history-row,
.info-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.history-row:last-child,
.info-row:last-child {
    border-bottom: 0;
}

.history-row strong,
.info-row strong {
    display: block;
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
}

.history-row span,
.info-row span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.calendar-screen {
    display: grid;
    gap: 14px;
}

.calendar-card {
    display: grid;
    gap: 12px;
}

.calendar-nav {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 8px;
}

.calendar-nav strong {
    min-width: 0;
    color: var(--ink);
    font-size: 14px;
    font-weight: 850;
    text-align: center;
    text-transform: capitalize;
}

.calendar-head,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    text-align: center;
}

.calendar-head span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
}

.calendar-day {
    position: relative;
    height: 32px;
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    background: transparent;
    border: 0;
    font-size: 12px;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
}

.calendar-day.muted {
    color: #b7c0d4;
}

.calendar-day.today {
    color: var(--primary);
    background: var(--primary-soft);
}

.calendar-day.active {
    color: #ffffff;
    background: var(--primary);
}

.calendar-day i {
    position: absolute;
    right: 5px;
    bottom: 4px;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: var(--primary);
}

.calendar-day.has-leave i {
    background: var(--green);
}

.calendar-day.has-task.has-leave i {
    width: 12px;
    background: linear-gradient(90deg, var(--green) 0 48%, var(--primary) 52% 100%);
}

.calendar-day.active i {
    background: #ffffff;
}

.calendar-event-list {
    display: grid;
    gap: 8px;
}

.calendar-search {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 0 12px;
    min-height: 44px;
    background: #f8faff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.calendar-search svg {
    width: 17px;
    height: 17px;
    color: var(--primary);
}

.calendar-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: none;
    color: var(--ink);
    background: transparent;
    font-size: 13px;
    font-weight: 750;
}

.calendar-event {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
}

.calendar-event.green {
    border-left-color: var(--green);
    background: #fbfffd;
}

.calendar-event div {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.calendar-event strong {
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event span,
.calendar-event small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
}

.calendar-pagination {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.calendar-pagination .soft-action {
    width: 100%;
    min-height: 40px;
    margin: 0;
}

.calendar-pagination span,
.calendar-result-count {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.admin-calendar-screen {
    gap: 14px;
}

.admin-calendar-card {
    display: grid;
    gap: 0;
    padding: 14px 0 0;
    overflow: hidden;
}

.admin-calendar-nav,
.admin-calendar-tabs {
    margin: 0 14px 12px;
}

.admin-calendar-nav {
    min-height: 38px;
}

.admin-calendar-nav strong {
    font-size: 18px;
    font-weight: 750;
}

.admin-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 14px 14px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.admin-calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.admin-calendar-legend i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.admin-calendar-legend i.task {
    background: var(--primary);
}

.admin-calendar-legend i.leave {
    background: var(--green);
}

.admin-calendar-weekdays {
    display: grid;
    grid-template-columns: 25px repeat(7, minmax(0, 1fr));
    color: #596580;
    background: #fafbfe;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 10px;
    font-weight: 750;
    text-align: center;
}

.admin-calendar-weekdays span {
    padding: 8px 1px;
}

.admin-calendar-board {
    display: grid;
    background: #ffffff;
}

.admin-calendar-week {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    min-width: 0;
    border-bottom: 1px solid var(--line);
}

.admin-calendar-week-number {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #98a2b8;
    background: #fafbfe;
    border-right: 1px solid var(--line);
    font-size: 9px;
    font-weight: 700;
    text-align: center;
}

.admin-calendar-week-body {
    position: relative;
    min-width: 0;
    min-height: 116px;
}

.admin-calendar-days,
.admin-calendar-bars {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.admin-calendar-days {
    position: absolute;
    inset: 0;
}

.admin-calendar-day {
    min-width: 0;
    min-height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2px;
    padding: 7px 4px;
    background: transparent;
    border: 0;
    border-right: 1px solid #f0f2f7;
    border-radius: 0;
    color: var(--ink);
    cursor: pointer;
}

.admin-calendar-day:last-child {
    border-right: 0;
}

.admin-calendar-day strong {
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 750;
}

.admin-calendar-day-dots {
    display: flex;
    gap: 2px;
    padding-top: 9px;
}

.admin-calendar-day-dots i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
}

.admin-calendar-day-dots i.leave {
    background: var(--green);
}

.admin-calendar-day.muted {
    color: #c2c8d5;
}

.admin-calendar-day.today {
    color: #ef4444;
    background: transparent;
}

.admin-calendar-day.today strong {
    font-weight: 900;
}

.admin-calendar-day.active strong {
    color: #ffffff;
    background: var(--primary);
}

.admin-calendar-bars {
    position: relative;
    z-index: 2;
    grid-auto-flow: row dense;
    grid-auto-rows: 22px;
    gap: 3px 0;
    min-height: 116px;
    padding: 36px 0 10px;
    pointer-events: none;
}

.admin-calendar-event-bar {
    min-width: 0;
    height: 22px;
    display: flex;
    align-items: center;
    margin: 0 1px;
    padding: 0 5px;
    color: #ffffff;
    background: var(--event-color, var(--primary));
    border: 0;
    border-radius: 4px;
    box-shadow: none;
    cursor: pointer;
    pointer-events: auto;
}

.admin-calendar-event-bar.pending {
    color: #166534;
    background: #dcfce7;
    border: 1px dashed #86efac;
}

.admin-calendar-event-bar span {
    min-width: 0;
    overflow: hidden;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-calendar-empty-row {
    grid-column: 1 / -1;
    min-height: 8px;
}

.admin-calendar-board.week .admin-calendar-week-body {
    min-height: 210px;
}

.admin-calendar-board.week .admin-calendar-bars {
    min-height: 210px;
}

.admin-calendar-list-item {
    border-left-color: var(--primary);
}

.admin-calendar-list-item.green {
    border-left-color: var(--green);
}

.admin-calendar-workers {
    display: flex;
    gap: 4px;
    margin-top: 3px;
}

.admin-calendar-workers span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 1px solid #ffffff;
    box-shadow: 0 0 0 1px var(--line);
}

@media (min-width: 900px) {
    .admin-calendar-weekdays {
        grid-template-columns: 38px repeat(7, minmax(0, 1fr));
        font-size: 12px;
    }

    .admin-calendar-week {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .admin-calendar-week-body,
    .admin-calendar-bars {
        min-height: 136px;
    }

    .admin-calendar-day {
        padding: 8px;
    }

    .admin-calendar-day strong {
        font-size: 13px;
    }

    .admin-calendar-event-bar {
        height: 26px;
        margin: 0 2px;
        padding: 0 8px;
    }

    .admin-calendar-event-bar span {
        font-size: 11px;
    }

    .admin-calendar-bars {
        grid-auto-rows: 26px;
        gap: 4px 0;
        padding-top: 40px;
    }
}

.progress-ring {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--primary) 0 72%, #dfe5fb 72% 100%);
}

.progress-ring div {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: #ffffff;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 950;
}

.sales-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.sales-value {
    color: var(--ink);
    font-size: 20px;
    font-weight: 950;
}

.sales-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.client-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px;
}

.client-logo {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    color: var(--client-accent, #0f766e);
    background: var(--client-soft, #ccfbf1);
    border-radius: 8px;
    font-size: 20px;
    font-weight: 950;
}

.clients-screen,
.client-detail-screen {
    max-width: 920px;
    margin: 0 auto;
}

.client-search-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-search-field {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    background: #f7f8fc;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.client-search-field > svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: var(--muted);
}

.client-search-field input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0;
    color: var(--ink);
    background: transparent;
    border: 0;
    outline: 0;
    font: inherit;
    font-size: 14px;
}

.client-search-loader {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    border: 2px solid #d8deed;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: client-loader-spin 0.7s linear infinite;
}

.client-search-loader.large {
    width: 26px;
    height: 26px;
}

@keyframes client-loader-spin {
    to { transform: rotate(360deg); }
}

.client-list {
    display: grid;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(31, 45, 92, 0.045);
}

.client-list-item {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    color: var(--ink);
    background: transparent;
    border-bottom: 1px solid var(--line);
}

.client-list-open {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 13px 6px 13px 14px;
    color: inherit;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
}

.client-list-item:last-child {
    border-bottom: 0;
}

.client-list-open:active {
    background: #f7f8fc;
}

.client-list-item .client-logo {
    width: 44px;
    height: 44px;
    font-size: 15px;
}

.client-list-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.client-list-copy strong,
.client-list-copy small,
.client-list-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-list-copy strong {
    font-size: 14px;
    font-weight: 800;
}

.client-list-copy small,
.client-list-copy span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.client-list-side {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

.client-list-side > svg {
    width: 17px;
    height: 17px;
}

.client-favorite-button {
    width: 38px;
    height: 38px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    margin-right: 8px;
    padding: 0;
    color: #9aa5ba;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.client-favorite-button:hover,
.client-favorite-button:focus-visible {
    color: #b98100;
    background: #fff8df;
    outline: 0;
}

.client-favorite-button.active {
    color: #d69a00;
}

.client-favorite-button.active svg {
    fill: currentColor;
}

.client-favorite-button svg {
    width: 19px;
    height: 19px;
}

.client-favorite-button:disabled {
    opacity: 0.45;
    cursor: wait;
}

.client-list-side small {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
}

.client-list-side small svg {
    width: 13px;
    height: 13px;
}

.client-list-loading .client-logo,
.client-skeleton-lines {
    background: #eef1f7;
    animation: client-skeleton 1.2s ease-in-out infinite alternate;
}

.client-list-loading .client-list-item {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 13px 14px;
}

.client-skeleton-lines {
    width: min(210px, 80%);
    height: 28px;
    border-radius: 5px;
}

@keyframes client-skeleton {
    to { opacity: 0.48; }
}

.client-empty-state {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--muted);
    text-align: center;
}

.client-empty-state > svg {
    width: 28px;
    height: 28px;
}

.client-empty-state strong {
    color: var(--ink);
}

.client-empty-state span {
    max-width: 360px;
    font-size: 12px;
}

.client-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.client-pagination span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.client-detail-hero > div:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.client-detail-hero strong,
.client-detail-hero span {
    overflow-wrap: anywhere;
}

.client-detail-hero strong {
    color: var(--ink);
    font-size: 16px;
}

.client-detail-hero span,
.client-detail-hero small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.client-detail-hero small {
    display: flex;
    align-items: center;
    gap: 4px;
}

.client-detail-hero small svg {
    width: 12px;
    height: 12px;
}

.client-tabs button span {
    margin-left: 4px;
    font-size: 9px;
    opacity: 0.7;
}

.client-information-card {
    display: grid;
    gap: 12px;
}

.client-data-list {
    display: grid;
}

.client-data-row {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.client-data-row:last-child {
    border-bottom: 0;
}

.client-data-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 7px;
}

.client-data-icon svg {
    width: 16px;
    height: 16px;
}

.client-data-row > span:last-child {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.client-data-row small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.client-data-row strong,
.client-data-row a {
    color: var(--ink);
    overflow-wrap: anywhere;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

.client-data-row a {
    color: var(--primary);
}

.client-navigation-action {
    justify-content: center;
    text-decoration: none;
}

.client-notes {
    margin: 0;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.55;
}

.client-contacts-list {
    display: grid;
    gap: 10px;
}

.client-contact-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
}

.client-contact-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #075985;
    background: #e0f2fe;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 850;
}

.client-contact-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.client-contact-copy > strong {
    font-size: 14px;
}

.client-contact-copy > span {
    color: var(--muted);
    font-size: 11px;
}

.client-contact-actions {
    display: grid;
    gap: 6px;
    margin-top: 7px;
}

.client-contact-actions a {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.client-contact-actions a svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.client-contact-actions a span {
    overflow-wrap: anywhere;
}

.client-history-card {
    padding-top: 14px;
}

.client-history-list {
    display: grid;
}

.client-history-item {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.client-history-item:last-child {
    border-bottom: 0;
}

.client-history-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 7px;
}

.client-history-item.protocol .client-history-icon {
    color: #0f766e;
    background: #ccfbf1;
}

.client-history-icon svg {
    width: 16px;
    height: 16px;
}

.client-history-item > span:last-child {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.client-history-item strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 13px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-history-item small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
}

@media (min-width: 760px) {
    .client-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
    }

    .client-list-item:nth-child(odd) {
        border-right: 1px solid var(--line);
    }

    .client-list-item:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .client-contacts-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.attachment-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.attachment {
    height: 60px;
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    background: linear-gradient(145deg, #dbe4f4, #b9c7df);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 900;
}

.signature {
    height: 72px;
    display: grid;
    place-items: center;
    color: #161b2f;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: "Segoe Script", "Brush Script MT", cursive;
    font-size: 26px;
}

.settings-item {
    width: 100%;
    min-height: 48px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: var(--ink-soft);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    font-weight: 850;
    text-align: left;
    cursor: pointer;
}

.settings-item:last-child {
    border-bottom: 0;
}

.profile-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.profile-screen {
    gap: 14px;
}

.profile-tabs {
    margin: 0;
}

.profile-alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 850;
}

.profile-alert.error {
    color: #be123c;
    background: #fff1f2;
    border: 1px solid #fecdd3;
}

.profile-alert.success {
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
}

.profile-phone-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.profile-phone-row .soft-action {
    height: 46px;
    padding-inline: 18px;
}

.profile-terms {
    display: grid;
    gap: 12px;
}

.profile-term {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.profile-term.ok .profile-progress span {
    background: #16a34a;
}

.profile-term.watch .profile-progress span {
    background: #2563eb;
}

.profile-term.soon .profile-progress span {
    background: #f59e0b;
}

.profile-term.expired .profile-progress span,
.profile-term.missing .profile-progress span {
    background: #e11d48;
}

.profile-term-date {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 800;
}

.profile-term-date span {
    color: var(--ink);
    font-size: 16px;
    font-weight: 900;
}

.profile-progress {
    height: 9px;
    overflow: hidden;
    background: #e8ecf6;
    border-radius: 999px;
}

.profile-progress span {
    display: block;
    height: 100%;
    min-width: 4px;
    border-radius: inherit;
}

.profile-note {
    display: grid;
    gap: 4px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 13px;
}

.profile-note strong {
    color: var(--ink);
}

.profile-login-card,
.profile-password-card {
    display: grid;
    gap: 12px;
}

.profile-passkey-info {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 12px;
    color: var(--ink-soft);
    background: #f3f5ff;
    border: 1px solid #e0e7ff;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.45;
}

.profile-passkey-info svg {
    color: var(--primary);
}

.profile-passkey-info strong {
    display: block;
    margin-bottom: 2px;
    color: var(--ink);
    font-size: 13px;
}

.profile-passkey-info.enabled {
    color: #36705b;
    background: #ecf9f2;
    border-color: #c9ead8;
}

.profile-passkey-info.enabled svg {
    color: #15945d;
}

.profile-passkey-info.unsupported {
    background: #f7f8fb;
    border-color: var(--line);
}

.passkey-action {
    width: 100%;
    justify-content: center;
}

.passkey-action.danger {
    color: #c43b55;
    background: #fff4f6;
}

.ios-install-notice {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.5;
}

.ios-install-notice svg {
    color: var(--primary);
}

.ios-install-notice strong,
.ios-install-notice span {
    display: block;
}

.ios-install-notice strong {
    margin-bottom: 3px;
    color: var(--ink);
    font-size: 13px;
}

.cars-screen {
    gap: 14px;
}

.cars-list {
    display: grid;
    gap: 14px;
}

.vehicle-card {
    display: grid;
    gap: 14px;
}

.vehicle-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 12px;
    align-items: start;
}

.vehicle-card-head strong {
    display: inline-block;
    padding: 8px 12px;
    color: #0b102f;
    background: linear-gradient(to bottom, #ffffff, #f4f6fb);
    border: 2px solid #111827;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 950;
    letter-spacing: 0;
}

.vehicle-card-head span {
    display: block;
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 800;
}

.vehicle-star {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #9aa5bb;
    background: #f5f7ff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.vehicle-star.active {
    color: #f59e0b;
    background: #fffbeb;
    border-color: #fde68a;
}

.vehicle-star.active svg {
    fill: currentColor;
}

.vehicle-meta {
    display: grid;
    gap: 8px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 800;
}

.vehicle-meta span {
    display: flex;
    gap: 8px;
    align-items: center;
}

.vehicle-meta svg {
    width: 17px;
    height: 17px;
    color: var(--primary);
}

.vehicle-terms {
    display: grid;
    gap: 10px;
}

.vehicle-term {
    display: grid;
    gap: 8px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.vehicle-term span {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 850;
}

.vehicle-term strong {
    color: var(--ink);
    font-size: 13px;
}

.vehicle-term small {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 750;
}

.vehicle-term.ok .profile-progress span {
    background: #16a34a;
}

.vehicle-term.watch .profile-progress span {
    background: #2563eb;
}

.vehicle-term.soon .profile-progress span {
    background: #f59e0b;
}

.vehicle-term.expired .profile-progress span,
.vehicle-term.missing .profile-progress span {
    background: #e11d48;
}

.vehicle-policy {
    display: grid;
    gap: 3px;
    padding: 12px;
    color: var(--ink-soft);
    background: #f3f5ff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.vehicle-policy strong {
    color: var(--ink);
}

.vehicle-files {
    display: grid;
    gap: 10px;
}

.vehicle-file {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 20px;
    gap: 10px;
    align-items: center;
    padding: 12px;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    text-decoration: none;
}

.vehicle-file > svg:first-child {
    color: var(--primary);
}

.vehicle-file strong,
.vehicle-file small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vehicle-file strong {
    font-size: 13px;
    font-weight: 900;
}

.vehicle-file small {
    margin-top: 2px;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 750;
}

.app-topbar.dashboard-topbar {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 10px;
    margin-bottom: 14px;
}

.dashboard-topbar .topbar-copy {
    text-align: left;
}

.dashboard-topbar .topbar-copy p {
    color: #697699;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.1;
}

.dashboard-topbar .topbar-copy h1 {
    margin-top: 1px;
    color: #10183d;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.15;
}

.profile-button {
    width: 38px;
    height: 38px;
    padding: 0;
    cursor: default;
}

.profile-button:hover {
    background: transparent;
}

.profile-button:disabled {
    opacity: 1;
}

.dashboard-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(145deg, #6b7cff, #1222b2);
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(30, 43, 88, 0.16);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.avatar-photo.employee-avatar {
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(320px, 390px) minmax(360px, 1fr);
    gap: 18px;
    align-items: start;
}

.dashboard-phone,
.dashboard-side {
    display: grid;
    gap: 10px;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid #eef2f8;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(29, 42, 92, 0.035);
    padding: 12px;
}

.dashboard-card h2 {
    margin: 0 0 12px;
    color: #10183d;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.dashboard-work-card {
    min-height: 90px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 13px;
    background: #f7f9ff;
    border-color: #edf2ff;
}

.dashboard-work-card.leave-green {
    background: #f0fbf5;
    border-color: #d8f2e2;
}

.dashboard-work-card.leave-orange {
    background: #fff8f1;
    border-color: #ffe8d4;
}

.dashboard-work-card.free-day {
    background: #f8faff;
}

.dashboard-work-card.special-work {
    background: #f7fbff;
    border-color: #dbeafe;
}

.dashboard-work-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.dashboard-work-copy .dashboard-label {
    color: #10183d;
    font-size: 12px;
    font-weight: 600;
}

.dashboard-work-copy strong {
    color: #2031e7;
    font-size: 25px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.dashboard-work-card.leave-green .dashboard-work-copy strong,
.dashboard-work-card.leave-green .dashboard-work-meta b {
    color: #15965a;
}

.dashboard-work-card.leave-orange .dashboard-work-copy strong,
.dashboard-work-card.leave-orange .dashboard-work-meta b {
    color: #d96c0d;
}

.dashboard-work-card.free-day .dashboard-work-copy strong {
    color: #526089;
}

.dashboard-work-copy span:last-child {
    color: #687598;
    font-size: 11px;
    font-weight: 500;
}

.dashboard-work-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    margin-top: 2px;
}

.dashboard-work-meta span,
.dashboard-work-meta b {
    font-size: 10px;
    line-height: 1.1;
}

.dashboard-work-meta span {
    color: #687598;
    font-weight: 500;
}

.dashboard-work-meta b {
    color: #2031e7;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-finish {
    width: 92px;
    min-height: 40px;
    padding: 0 9px;
    color: #ffffff;
    background: #19b967;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 8px 14px rgba(25, 185, 103, 0.18);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.15;
}

.dashboard-admin-work-card {
    display: grid;
    gap: 10px;
}

.dashboard-admin-work-list {
    display: grid;
    gap: 7px;
}

.dashboard-admin-work-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    padding: 9px 10px;
    background: #f8faff;
    border: 1px solid #eef3fb;
    border-radius: 10px;
}

.employee-dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    border-radius: 999px;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.dashboard-admin-work-row div {
    min-width: 0;
}

.dashboard-admin-work-row strong {
    display: block;
    overflow: hidden;
    color: #10183d;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-admin-work-row small {
    color: #687598;
    font-size: 10px;
    font-weight: 500;
}

.admin-work-time {
    display: grid;
    justify-items: end;
    gap: 3px;
}

.admin-work-time strong {
    color: #2031e7;
    font-size: 13px;
}

.admin-overtime-pill {
    padding: 3px 6px;
    color: #0f9d58;
    background: #eaf8f0;
    border-radius: 999px;
    white-space: nowrap;
}

.dashboard-admin-empty {
    padding: 11px;
    color: #687598;
    background: #f8faff;
    border: 1px dashed #dde5f2;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.dashboard-admin-action {
    width: 100%;
    min-height: 42px;
    color: #ffffff;
    background: #4f46e5;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 8px 14px rgba(79, 70, 229, 0.18);
    font-size: 12px;
    font-weight: 700;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.dashboard-stats-today {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-stat {
    min-height: 64px;
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 10px 8px;
    background: #f8faff;
    border: 1px solid #eef3fb;
    border-radius: 11px;
}

.dashboard-stat span {
    color: #526089;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.25;
}

.dashboard-stat strong {
    color: #0f173d;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.dashboard-stat strong.primary {
    color: #2031e7;
}

.dashboard-stat strong.green,
.dashboard-stat strong.positive {
    color: #15965a;
}

.dashboard-stat strong.red,
.dashboard-stat strong.negative {
    color: #d83a52;
}

.dashboard-shortcuts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.dashboard-shortcut {
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 7px;
    padding: 0;
    color: #142050;
    background: transparent;
    border: 0;
    border-radius: 10px;
}

.dashboard-shortcut span:first-child {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    color: #2031e7;
    background: #f4f6ff;
    border-radius: 12px;
}

.dashboard-shortcut svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
}

.dashboard-shortcut strong {
    max-width: 100%;
    overflow: hidden;
    color: #172152;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-current-card {
    padding-bottom: 14px;
}

.dashboard-current-card h2 {
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f8;
}

.dashboard-task {
    position: relative;
    min-height: 74px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
    overflow: hidden;
    margin-top: 0;
    padding: 13px 10px 12px 17px;
    background: #ffffff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.dashboard-task + .dashboard-task {
    border-top: 1px solid #edf2f8;
}

.dashboard-empty,
.task-empty {
    padding: 10px 0;
}

.dashboard-task::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 0;
    width: 4px;
    background: #2031e7;
    border-radius: 0 6px 6px 0;
}

.dashboard-task div {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.dashboard-task strong {
    overflow: hidden;
    color: #11193f;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-task span {
    color: #5d6b91;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
}

.dashboard-task-status {
    align-self: end;
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 0 7px;
    color: #2031e7;
    background: #eef2ff;
    border-radius: 7px;
    font-size: 10px !important;
    font-weight: 600 !important;
    white-space: nowrap;
}

.dashboard-vehicle-card {
    display: grid;
    gap: 12px;
}

.dashboard-vehicle-head {
    display: grid;
    gap: 7px;
}

.dashboard-vehicle-head strong {
    width: fit-content;
    padding: 8px 12px;
    color: #0b102f;
    background: linear-gradient(to bottom, #ffffff, #f4f6fb);
    border: 2px solid #111827;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 950;
    letter-spacing: 0;
}

.dashboard-vehicle-head span {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 800;
}

.dashboard-vehicle-terms {
    gap: 8px;
}

.dashboard-side-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.dashboard-side-title h2 {
    margin-bottom: 0;
}

.dashboard-link {
    padding: 0;
    color: #2031e7;
    background: transparent;
    border: 0;
    font-size: 11px;
    font-weight: 600;
}

.dashboard-timeline {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid #eef2fb;
}

.dashboard-timeline:last-child {
    border-bottom: 0;
}

.dashboard-timeline span,
.dashboard-timeline strong {
    color: #56638b;
    font-size: 12px;
    font-weight: 850;
}

.dashboard-leaves {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.dashboard-leaves div {
    padding: 12px;
    background: #f4f7ff;
    border: 1px solid #eef3fb;
    border-radius: 11px;
}

.dashboard-leaves span,
.dashboard-leaves small {
    display: block;
    color: #5d6b91;
    font-size: 11px;
    font-weight: 800;
}

.dashboard-leaves strong {
    display: block;
    margin: 8px 0 4px;
    color: #2031e7;
    font-size: 22px;
    font-weight: 700;
}

.work-time-screen {
    display: grid;
    gap: 12px;
}

.admin-day-summary-card {
    display: grid;
    gap: 10px;
}

.admin-day-list {
    display: grid;
    gap: 8px;
}

.admin-day-row {
    display: grid;
    gap: 9px;
    padding: 10px;
    background: #f8faff;
    border: 1px solid #eef3fb;
    border-radius: 10px;
}

.admin-day-row.working {
    background: #f3fbf7;
    border-color: #d8f2e2;
}

.admin-day-row.muted {
    background: #fbfcff;
}

.admin-day-worker {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.admin-day-worker strong {
    display: block;
    overflow: hidden;
    color: #10183d;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-day-worker small {
    color: #687598;
    font-size: 10px;
    font-weight: 600;
}

.admin-day-times {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.admin-day-times span {
    min-width: 0;
    padding: 8px 7px;
    color: #10183d;
    background: #ffffff;
    border: 1px solid #edf2f8;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.admin-day-times b {
    display: block;
    margin-bottom: 3px;
    color: #687598;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
}

.admin-day-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 9px;
    background: #ffffff;
    border: 1px solid #edf2f8;
    border-radius: 9px;
}

.admin-day-balance span {
    color: #687598;
    font-size: 10px;
    font-weight: 600;
}

.admin-day-balance strong {
    color: #10183d;
    font-size: 14px;
    font-weight: 800;
}

.admin-day-balance.positive strong {
    color: #19a55b;
}

.admin-day-balance.negative strong {
    color: #d83a52;
}

.admin-day-balance.neutral strong {
    color: #687598;
}

@media (min-width: 720px) {
    .admin-day-row {
        grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.35fr) minmax(110px, auto);
        align-items: center;
    }

    .admin-day-balance {
        min-height: 48px;
        display: grid;
        justify-items: end;
    }
}

.work-today-card {
    background: #f7f9ff;
}

.punch-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.punch-box,
.time-metric {
    min-width: 0;
    padding: 12px;
    background: #f8faff;
    border: 1px solid #eef3fb;
    border-radius: 10px;
}

.punch-box span,
.time-metric span,
.work-total span {
    display: block;
    color: #647195;
    font-size: 11px;
    font-weight: 500;
}

.punch-box strong {
    display: block;
    margin-top: 8px;
    color: #11183f;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.punch-box.green strong,
.punch-times .green,
.time-metric.positive strong,
.punch-worked .positive {
    color: #19a55b;
}

.punch-box.red strong,
.punch-times .red,
.time-metric.negative strong,
.punch-worked .negative {
    color: #d83a52;
}

.work-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eaf0fa;
}

.work-total strong {
    color: #2031e7;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.leave-today-panel {
    display: grid;
    gap: 6px;
    padding: 14px 12px;
    background: #f0fbf5;
    border: 1px solid #d8f2e2;
    border-radius: 10px;
}

.leave-today-panel.leave-orange {
    background: #fff8f1;
    border-color: #ffe8d4;
}

.leave-today-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.leave-today-head svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: #15965a;
    stroke-width: 3;
}

.leave-today-panel.leave-orange .leave-today-head svg {
    color: #d96c0d;
}

.leave-today-panel span,
.leave-today-panel small {
    color: #176b43;
    font-size: 11px;
    font-weight: 500;
}

.leave-today-panel strong {
    color: #15965a;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.leave-today-panel.leave-orange span,
.leave-today-panel.leave-orange small {
    color: #9a5a18;
}

.leave-today-panel.leave-orange strong {
    color: #d96c0d;
}

.time-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.time-metric strong {
    display: block;
    margin-top: 8px;
    color: #11183f;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.punch-list {
    display: grid;
    gap: 8px;
}

.punch-row {
    display: grid;
    grid-template-columns: minmax(74px, 0.8fr) minmax(96px, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #edf2f8;
}

.punch-row:last-child {
    border-bottom: 0;
}

.punch-row.today {
    color: #2031e7;
}

.punch-row.muted {
    opacity: 0.72;
}

.punch-row.leave {
    grid-template-columns: minmax(74px, 1fr) auto minmax(62px, auto);
    opacity: 1;
}

.punch-date strong,
.punch-worked strong {
    display: block;
    color: #11183f;
    font-size: 12px;
    font-weight: 700;
}

.punch-note,
.punch-worked span {
    display: block;
    margin-top: 4px;
    color: #687598;
    font-size: 10px;
    font-weight: 500;
}

.punch-note-leave,
.punch-row.leave .punch-worked span {
    color: #176b43;
}

.punch-row.leave-orange .punch-note-leave,
.punch-row.leave .punch-worked.leave-orange span {
    color: #9a5a18;
}

.punch-times {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.punch-times span {
    min-height: 26px;
    display: grid;
    place-items: center;
    background: #f8faff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.punch-leave-state {
    min-width: 62px;
    min-height: 26px;
    display: grid;
    place-items: center;
    padding: 5px 8px;
    background: #f0fbf5;
    border: 1px solid #d8f2e2;
    border-radius: 8px;
    text-align: center;
}

.punch-leave-state.leave-orange {
    background: #fff8f1;
    border-color: #ffe8d4;
}

.punch-leave-state strong {
    color: #15965a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
}

.punch-leave-state.leave-orange strong {
    color: #d96c0d;
}

.punch-leave-result {
    display: grid;
    justify-items: end;
    gap: 4px;
}

.punch-leave-result svg {
    width: 16px;
    height: 16px;
    color: #15965a;
    stroke-width: 3;
}

.punch-leave-result.leave-orange svg {
    color: #d96c0d;
}

.punch-worked {
    text-align: right;
}

.bottom-nav {
    display: none;
}

@media (min-width: 980px) {
    .app-frame {
        margin: 0 auto;
    }

    .screen-root {
        gap: 16px;
    }
}

@media (max-width: 979px) {
    .app-shell {
        display: block;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .app-shell.dashboard-mode {
        background: #ffffff;
    }

    .desktop-sidebar {
        display: none;
    }

    .app-frame {
        width: 100%;
        max-width: none;
        min-height: 100vh;
        margin: 0;
        padding: 14px 0 86px;
    }

    .app-shell.dashboard-mode .app-frame {
        width: 100%;
        max-width: 390px;
        margin: 0 auto;
        padding: 9px 7px 68px;
        background: #ffffff;
    }

    .screen-root,
    .app-topbar {
        width: min(calc(100vw - 36px), 390px);
        margin-inline: auto;
    }

    .app-shell.dashboard-mode .screen-root,
    .app-shell.dashboard-mode .app-topbar {
        width: auto;
        margin-inline: 0;
    }

    .app-topbar {
        position: sticky;
        top: 0;
        z-index: 10;
        margin-top: 0;
        margin-bottom: 12px;
        padding: 0 0 8px;
        background: rgba(244, 247, 252, 0.92);
        backdrop-filter: blur(14px);
    }

    .app-topbar.dashboard-topbar {
        position: relative;
        margin: 0 0 12px;
        padding: 0;
        background: transparent;
        backdrop-filter: none;
    }

    .desktop-columns,
    .desktop-three {
        grid-template-columns: 1fr;
    }

    .dashboard-layout {
        display: block;
    }

    .dashboard-phone {
        max-width: 390px;
        margin: 0 auto;
        gap: 10px;
    }

    .dashboard-side {
        display: none;
    }

    .bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        transform: none;
        z-index: 30;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 2px;
        width: min(100%, 520px);
        max-width: 100vw;
        margin: 0 auto;
        padding: 5px 8px 6px;
        background: #ffffff;
        border: 0;
        border-top: 1px solid #edf1f8;
        border-radius: 0;
        box-shadow: 0 -4px 18px rgba(29, 42, 92, 0.04);
        backdrop-filter: none;
    }

    .bottom-nav button {
        min-width: 0;
        display: grid;
        justify-items: center;
        gap: 4px;
        min-height: 43px;
        padding: 6px 2px;
        color: var(--muted);
        background: transparent;
        border: 0;
        border-radius: 8px;
        font-size: 9px;
        font-weight: 500;
    }

    .bottom-nav svg {
        width: 16px;
        height: 16px;
        stroke-width: 2;
    }

    .bottom-nav button.active {
        color: var(--primary);
        font-weight: 600;
    }

    .bottom-nav button.plus {
        transform: translateY(-10px);
    }

    .bottom-nav button.plus span:first-child {
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        color: #ffffff;
        background: var(--primary);
        border-radius: 8px;
        box-shadow: 0 10px 20px rgba(52, 70, 241, 0.24);
    }

    .image-gallery-overlay {
        padding-bottom: max(18px, env(safe-area-inset-bottom));
    }

    .image-gallery-nav {
        top: auto;
        bottom: max(18px, env(safe-area-inset-bottom));
        width: 52px;
        height: 46px;
        font-size: 38px;
        transform: none;
    }
}

@media (max-width: 420px) {
    .leave-hero-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .leave-hero-card .primary-action {
        width: 100%;
    }

    .leave-balance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leave-balance-card.amber {
        grid-column: 1 / -1;
    }

    .leave-admin-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .leave-admin-hero-meta {
        justify-items: start;
    }

    .leave-admin-employee-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leave-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .leave-form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .leave-list-item {
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }

    .leave-list-status {
        min-width: 0;
        justify-content: flex-start;
        padding-left: 57px;
    }

    .stats-grid {
        gap: 6px;
    }

    .stat-card {
        padding: 10px 8px;
    }

    .stat-card strong {
        font-size: 16px;
    }

    .shortcut-grid {
        gap: 6px;
    }
}

.protocol-series-nav {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    padding: 10px;
    overflow-x: auto;
    background: #f7f9fe;
    border: 1px solid #e7ebf4;
    border-radius: 8px;
    scrollbar-width: thin;
}

.protocol-series-day {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 24px auto;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 7px 10px;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid #dfe5f0;
    border-radius: 7px;
    text-align: left;
}

.protocol-series-day span {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: var(--primary);
    background: #eef0ff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

.protocol-series-day strong {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.protocol-series-day.active {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
}

.protocol-series-day.active span {
    color: var(--primary);
    background: #ffffff;
}

.protocol-series-day:disabled:not(.active) {
    opacity: 0.52;
}

.protocol-save-alert {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    padding: 11px 13px;
    color: #087443;
    background: #ecfdf3;
    border: 1px solid #b7eccf;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.protocol-save-alert svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
}

.protocol-floating-save {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 24;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    min-width: 0;
    padding: 0;
    margin: 0;
    color: #ffffff;
    background: var(--primary);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(63, 54, 220, 0.28);
}

.protocol-floating-save svg {
    width: 22px;
    height: 22px;
}

.protocol-floating-save:disabled {
    opacity: 0.58;
}

.operation-overlay,
.protocol-description-overlay,
.tracking-map-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(242, 245, 252, 0.7);
    backdrop-filter: blur(8px);
}

.operation-dialog {
    display: grid;
    justify-items: center;
    gap: 10px;
    width: min(330px, 100%);
    padding: 24px;
    text-align: center;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
}

.operation-dialog > svg {
    width: 32px;
    height: 32px;
}

.operation-overlay.success .operation-dialog > svg { color: #16a765; }
.operation-overlay.error .operation-dialog > svg { color: #dc3f59; }

.operation-dialog strong {
    color: var(--ink);
    font-size: 17px;
}

.operation-dialog span:not(.operation-spinner) {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.operation-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #dfe3ff;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: operation-spin 0.75s linear infinite;
}

@keyframes operation-spin { to { transform: rotate(360deg); } }

.protocol-description-open {
    width: 100%;
    margin-bottom: 2px;
}

.protocol-description-modal,
.tracking-map-modal {
    display: grid;
    gap: 14px;
    width: min(640px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    padding: 18px;
    overflow: auto;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
}

.modal-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.modal-mobile-head > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.modal-mobile-head strong { color: var(--ink); font-size: 17px; }
.modal-mobile-head span { color: var(--muted); font-size: 11px; }

.protocol-description-search {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.protocol-description-search svg { width: 18px; color: var(--muted); }
.protocol-description-search input { width: 100%; min-width: 0; padding: 12px 0; border: 0; outline: 0; font: inherit; }

.protocol-description-all {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 650;
}

.protocol-description-all input { width: 17px; height: 17px; }

.protocol-description-results,
.tracking-place-results {
    display: grid;
    gap: 8px;
}

.protocol-description-result,
.tracking-place-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    width: 100%;
    padding: 12px;
    text-align: left;
    background: #f8f9fd;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
}

.protocol-description-result > span { display: grid; gap: 3px; }
.protocol-description-result strong,
.tracking-place-result strong { color: var(--ink); font-size: 12px; }
.protocol-description-result small,
.tracking-place-result small { color: var(--muted); font-size: 10px; }
.protocol-description-result p { grid-column: 1 / -1; margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.protocol-description-result > svg { width: 17px; color: var(--primary); }

.modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    color: var(--muted);
    font-size: 12px;
}

.modal-loading .operation-spinner { width: 22px; height: 22px; }

.tracking-map-button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: var(--primary);
    background: #eef0ff;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.tracking-map-button svg { width: 17px; height: 17px; }

.tracking-map-modal iframe {
    width: 100%;
    height: min(430px, 52vh);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.tracking-place-load { width: 100%; }

.tracking-place-result {
    grid-template-columns: 22px minmax(0, 1fr) 18px;
    align-items: center;
}

.tracking-place-result > span { display: grid; gap: 3px; }
.tracking-place-result > svg { width: 17px; color: var(--primary); }

.protocol-single-day {
    display: grid;
    gap: 10px;
}

.protocol-copy-box {
    margin: 7px 0 10px;
    border: 1px solid #e4e8f2;
    border-radius: 8px;
    background: #f8f9fd;
}

.protocol-copy-box summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: var(--primary);
    cursor: pointer;
    list-style: none;
    font-size: 12px;
    font-weight: 650;
}

.protocol-copy-box summary::-webkit-details-marker {
    display: none;
}

.protocol-copy-box summary svg {
    width: 15px;
    height: 15px;
}

.protocol-copy-list {
    display: grid;
    max-height: 260px;
    overflow-y: auto;
    border-top: 1px solid #e4e8f2;
}

.protocol-copy-list button {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    color: var(--ink);
    background: #ffffff;
    border: 0;
    border-bottom: 1px solid #edf0f6;
    text-align: left;
}

.protocol-copy-list button:last-child {
    border-bottom: 0;
}

.protocol-copy-list button span {
    display: flex;
    gap: 8px;
    font-size: 12px;
}

.protocol-copy-list button small {
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.protocol-history-section {
    margin-top: 16px;
    padding-top: 2px;
}

.protocol-history-list {
    display: grid;
    gap: 0;
    margin-top: 10px;
    border-top: 1px solid #e8ebf3;
}

.protocol-history-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px solid #edf0f6;
}

.protocol-history-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--primary);
    background: #eef0ff;
    border-radius: 50%;
}

.protocol-history-icon svg {
    width: 14px;
    height: 14px;
}

.protocol-history-item strong,
.protocol-history-item small {
    display: block;
}

.protocol-history-item strong {
    font-size: 13px;
}

.protocol-history-item small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.protocol-history-changes {
    display: grid;
    gap: 5px;
    margin-top: 8px;
    color: #4f5d78;
    font-size: 11px;
}

.protocol-history-changes span {
    overflow-wrap: anywhere;
}

.dashboard-protocol-list {
    display: grid;
}

.dashboard-protocol-item {
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr) auto 16px;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 11px 0;
    color: var(--ink);
    background: transparent;
    border: 0;
    border-bottom: 1px solid #edf0f6;
    text-align: left;
}

.dashboard-protocol-item:last-child {
    border-bottom: 0;
}

.dashboard-protocol-item strong,
.dashboard-protocol-item small {
    display: block;
}

.dashboard-protocol-item strong {
    font-size: 12px;
}

.dashboard-protocol-item small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.dashboard-protocol-item em {
    color: #b86a08;
    font-size: 10px;
    font-style: normal;
    font-weight: 650;
    white-space: nowrap;
}

.dashboard-protocol-item svg {
    width: 15px;
    height: 15px;
    color: var(--muted);
}

@media (max-width: 760px) {
    .protocol-floating-save {
        right: max(16px, env(safe-area-inset-right));
        bottom: calc(70px + env(safe-area-inset-bottom));
    }
}

.admin-tracking-entry,
.admin-tracking-entry > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-tracking-entry > div {
    justify-content: flex-start;
}

.admin-tracking-entry h2,
.admin-tracking-entry small {
    display: block;
    margin: 0;
}

.tracking-crew {
    display: grid;
    gap: 5px;
    margin-top: 9px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.tracking-crew > span {
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 600;
}

.tracking-crew small {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--ink);
}

.tracking-crew small i {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--employee-color);
}

.admin-tracking-entry small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.dashboard-card-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--primary);
    background: #eef0ff;
    border-radius: 8px;
}

.dashboard-card-icon svg {
    width: 17px;
    height: 17px;
}

.tracking-screen {
    display: grid;
    gap: 14px;
}

.tracking-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.tracking-intro h2,
.tracking-intro p {
    margin: 0;
}

.tracking-intro p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.tracking-intro > span {
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.tracking-employee-list,
.tracking-vehicle-list,
.tracking-route-list {
    display: grid;
}

.tracking-employee,
.tracking-vehicle {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto 28px;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid #edf0f6;
}

.tracking-employee:last-child,
.tracking-vehicle:last-child {
    border-bottom: 0;
}

.tracking-employee strong,
.tracking-employee small,
.tracking-vehicle strong,
.tracking-vehicle small,
.tracking-vehicle em {
    display: block;
}

.tracking-registration {
    display: inline-block;
    margin-top: 3px;
    color: #455579;
    font-size: 11px;
    font-weight: 700;
}

.tracking-employee small,
.tracking-vehicle small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.tracking-vehicle em {
    margin-top: 4px;
    color: #455579;
    font-size: 10px;
    font-style: normal;
}

.tracking-confidence {
    padding: 4px 6px;
    color: #087443;
    background: #e9f9f0;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
}

.tracking-employee > a,
.tracking-vehicle > a {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.tracking-employee > a svg,
.tracking-vehicle > a svg {
    width: 16px;
    height: 16px;
}

.tracking-vehicle {
    grid-template-columns: 32px minmax(0, 1fr) auto 28px;
}

.tracking-vehicle-status {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: #118454;
    background: #eaf9f1;
    border-radius: 8px;
}

.tracking-vehicle.stale .tracking-vehicle-status,
.tracking-vehicle.unknown .tracking-vehicle-status {
    color: #8b6a24;
    background: #fff7df;
}

.tracking-vehicle-status svg {
    width: 15px;
    height: 15px;
}

.tracking-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
    gap: 12px;
    margin-bottom: 12px;
}

.tracking-filters label > span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.tracking-trip {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #edf0f6;
}

.tracking-trip-time strong,
.tracking-trip-time span,
.tracking-trip > div > strong,
.tracking-trip > div > small {
    display: block;
}

.tracking-trip-time span,
.tracking-trip > div > small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.tracking-trip > div > svg {
    display: block;
    width: 14px;
    height: 14px;
    margin: 4px 0;
    color: var(--primary);
}

@media (max-width: 560px) {
    .tracking-intro,
    .admin-tracking-entry {
        align-items: stretch;
        flex-direction: column;
    }

    .tracking-filters {
        grid-template-columns: minmax(0, 1fr);
    }

    .tracking-employee,
    .tracking-vehicle {
        grid-template-columns: 10px minmax(0, 1fr) auto;
    }

    .tracking-vehicle {
        grid-template-columns: 32px minmax(0, 1fr) auto;
    }

    .tracking-employee > a,
    .tracking-vehicle > a {
        grid-column: 2;
        justify-self: start;
    }
}

.admin-task-toolbar,
.admin-task-form-actions,
.admin-task-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.admin-task-toolbar .segmented {
    flex: 1;
}

.admin-task-new {
    width: auto;
    min-width: 160px;
    margin: 0;
}

.admin-task-form {
    display: grid;
    gap: 16px;
}

.admin-task-form .card-title {
    margin-bottom: 0;
}

.admin-task-form .card-title span {
    color: var(--muted);
    font-size: 12px;
}

.admin-task-field {
    position: relative;
    display: grid;
    gap: 7px;
    min-width: 0;
}

.admin-task-field > span,
.admin-task-workers legend {
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.admin-task-field input,
.admin-task-field textarea {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.admin-task-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-task-range.is-hidden {
    display: none;
}

.admin-task-all-day {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8f9fd;
}

.admin-task-all-day > span:first-child {
    display: grid;
    gap: 2px;
}

.admin-task-all-day strong {
    color: var(--ink);
    font-size: 0.86rem;
}

.admin-task-all-day small {
    color: var(--muted);
    font-size: 0.72rem;
}

.admin-task-client-results {
    position: absolute;
    z-index: 8;
    top: 100%;
    right: 0;
    left: 0;
    overflow: hidden;
    margin-top: 5px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(28, 36, 74, .12);
}

.admin-task-client-results:empty {
    display: none;
}

.admin-task-client-results button {
    display: grid;
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    background: #fff;
}

.admin-task-client-results button:last-child {
    border-bottom: 0;
}

.admin-task-client-results small {
    margin-top: 3px;
    color: var(--muted);
}

.admin-task-workers {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.admin-task-workers legend {
    margin-bottom: 8px;
}

.admin-task-worker-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.admin-task-worker {
    display: grid;
    grid-template-columns: 18px 10px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.admin-task-worker > i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.admin-task-worker strong,
.admin-task-worker small {
    display: block;
}

.admin-task-worker strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-worker-availability {
    margin-top: 3px;
    color: #168457;
    font-size: 10px;
    line-height: 1.35;
}

.admin-worker-availability.busy,
.admin-task-worker.has-conflict .admin-worker-availability {
    color: #b45309;
}

.admin-task-worker.has-conflict {
    border-color: #f1d19a;
    background: #fffaf0;
}

.admin-task-list {
    display: grid;
    gap: 10px;
}

.admin-task-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.admin-task-card-main {
    min-width: 0;
    padding: 0;
    border: 0;
    text-align: left;
    background: transparent;
}

.admin-task-card-main p,
.admin-task-card-main > small {
    display: block;
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.admin-task-card-main .task-worker-list {
    margin-top: 9px;
}

.admin-task-card-actions {
    align-items: flex-start;
}

.admin-task-protocol,
.admin-task-travel {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 7px;
    border: 0;
    border-radius: 6px;
    color: var(--primary);
    background: #eef0ff;
    font-size: 10px;
    font-weight: 700;
}

.admin-task-travel > span,
.admin-task-travel small {
    display: block;
}

.admin-task-travel small {
    margin-top: 2px;
    color: inherit;
    font-size: 9px;
    font-weight: 600;
    opacity: .82;
}

.admin-task-archive-search {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8f9fc;
}

.admin-task-archive-search svg {
    width: 17px;
    color: var(--muted);
}

.admin-task-archive-search input {
    min-width: 0;
    height: 44px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
}

.admin-task-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.admin-protocol-tabs button {
    gap: 7px;
}

.admin-protocol-tabs button span {
    min-width: 23px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.1);
    font-size: 0.72rem;
    line-height: 1.35;
}

.admin-protocol-tabs button.active span {
    background: rgba(255, 255, 255, 0.2);
}

.protocol-admin-search {
    width: 100%;
    box-sizing: border-box;
}

.admin-protocols-screen [data-protocol-admin-results] {
    min-width: 0;
}

.preference-list {
    display: grid;
    gap: 4px;
}

.preference-item {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 46px;
    gap: 12px;
    align-items: center;
    min-height: 62px;
    cursor: pointer;
}

.preference-icon,
.notification-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: #4f46e5;
    background: #eef2ff;
}

.preference-icon svg,
.notification-icon svg {
    width: 20px;
    height: 20px;
}

.preference-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.preference-copy strong {
    color: #11183b;
    font-size: 0.94rem;
    font-weight: 650;
}

.preference-copy small {
    color: #71809e;
    font-size: 0.78rem;
    line-height: 1.35;
}

.switch-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch-control {
    position: relative;
    width: 44px;
    height: 26px;
    border-radius: 13px;
    background: #cbd3e2;
    transition: background 160ms ease;
}

.switch-control::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(17, 24, 57, 0.25);
    transition: transform 160ms ease;
}

.switch-input:checked + .switch-control {
    background: #4f46e5;
}

.switch-input:checked + .switch-control::after {
    transform: translateX(18px);
}

.preference-divider {
    height: 1px;
    margin: 4px 0;
    background: #e7eaf1;
}

.quiet-hours {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.quiet-hours label {
    display: grid;
    gap: 6px;
    color: #71809e;
    font-size: 0.78rem;
}

.quiet-hours input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #dfe4ee;
    border-radius: 8px;
    padding: 11px 12px;
    color: #11183b;
    background: #fff;
}

.settings-device-caption {
    text-align: center;
}

.notifications-toolbar .soft-action.compact {
    width: auto;
    min-height: 38px;
    padding: 8px 12px;
}

.notification-list {
    padding: 0;
    overflow: hidden;
}

.notification-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    padding: 16px;
    border: 0;
    border-bottom: 1px solid #e7eaf1;
    text-align: left;
    color: #11183b;
    background: #fff;
}

.notification-item:last-child {
    border-bottom: 0;
}

.notification-item.unread {
    background: #f7f8ff;
}

.notification-item > span:last-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.notification-item small,
.notification-item time {
    color: #71809e;
    font-size: 0.79rem;
    line-height: 1.35;
}

.notification-item time {
    font-size: 0.72rem;
}

.admin-stats-card {
    display: grid;
    gap: 18px;
}

.admin-stats-rbh {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.admin-stats-rbh > div {
    display: grid;
    gap: 3px;
}

.admin-stats-rbh small {
    color: #71809e;
}

.admin-stats-rbh strong {
    color: #11183b;
    font-size: 1.55rem;
    font-weight: 680;
}

.admin-leave-title {
    margin-top: 2px;
    padding-top: 16px;
    border-top: 1px solid #e7eaf1;
}

.admin-upcoming-leaves {
    display: grid;
    gap: 11px;
}

.admin-upcoming-leave {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.admin-upcoming-leave > div {
    display: grid;
    gap: 2px;
}

.admin-upcoming-leave strong {
    color: #11183b;
    font-size: 0.9rem;
}

.admin-upcoming-leave small,
.admin-upcoming-leave > span:last-child {
    color: #71809e;
    font-size: 0.76rem;
}

.invoice-list {
    display: grid;
    gap: 0;
}

.invoice-item {
    display: grid;
    gap: 11px;
    padding: 16px 0;
    border-bottom: 1px solid #e7eaf1;
}

.invoice-item:last-of-type {
    border-bottom: 0;
}

.invoice-item-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.invoice-item-head > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.invoice-item-head strong,
.invoice-item-head small {
    overflow-wrap: anywhere;
}

.invoice-item-head small,
.invoice-meta span {
    color: #71809e;
    font-size: 0.78rem;
}

.invoice-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.invoice-meta span {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.invoice-meta svg,
.invoice-attachments svg {
    width: 16px;
    height: 16px;
}

.invoice-attachments {
    display: grid;
    gap: 7px;
}

.invoice-attachments a {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    color: #4f46e5;
    font-size: 0.8rem;
    text-decoration: none;
}

.invoice-attachments span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.invoice-preview-button {
    width: fit-content;
    min-height: 38px;
    margin: 0;
    padding: 8px 12px;
}

.invoice-preview-backdrop {
    position: fixed;
    z-index: 1300;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(5px);
}

.invoice-preview-modal {
    display: grid;
    gap: 16px;
    overflow: auto;
    width: min(620px, 100%);
    max-height: calc(100dvh - 36px);
    padding: 18px;
    border-radius: 8px;
    background: #f3f5fa;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .22);
}

.invoice-preview-modal > header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.invoice-preview-modal > header > div {
    display: grid;
    gap: 3px;
}

.invoice-preview-modal > header span,
.invoice-paper span {
    color: #71809e;
    font-size: 0.72rem;
}

.invoice-preview-modal > header strong {
    color: var(--ink);
    font-size: 1.05rem;
}

.invoice-paper {
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid #e2e6ef;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(28, 36, 74, .06);
}

.invoice-paper-brand,
.invoice-paper-title,
.invoice-paper-parties > div,
.invoice-paper-dates > div {
    display: grid;
    gap: 4px;
}

.invoice-paper-brand > strong {
    color: #c91e24;
    font-size: 1.05rem;
}

.invoice-paper-title {
    padding: 14px 0;
    border-block: 1px solid #e6e9f0;
}

.invoice-paper-title > strong {
    font-size: 1.25rem;
}

.invoice-paper-parties,
.invoice-paper-dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.invoice-paper-parties strong,
.invoice-paper-dates strong {
    overflow-wrap: anywhere;
    font-size: 0.85rem;
}

.invoice-paper-total,
.invoice-paper-payment {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 13px 14px;
    border-radius: 6px;
    background: #eef1ff;
}

.invoice-paper-total strong {
    color: #3631ca;
    font-size: 1.1rem;
}

.invoice-paper-payment {
    background: #fff7ed;
}

.invoice-paper-payment.paid {
    background: #ecfdf3;
}

.invoice-preview-files {
    display: grid;
    gap: 8px;
}

.invoice-preview-files a {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    background: #fff;
    color: var(--primary);
    text-decoration: none;
}

.invoice-preview-files svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 520px) {
    .invoice-preview-backdrop {
        align-items: end;
        padding: 0;
    }

    .invoice-preview-modal {
        width: 100%;
        max-height: 92dvh;
        border-radius: 8px 8px 0 0;
    }

    .invoice-paper {
        padding: 16px;
    }

    .invoice-paper-parties,
    .invoice-paper-dates {
        grid-template-columns: 1fr;
    }
}

.offers-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.offers-toolbar .primary-action {
    width: auto;
    min-height: 48px;
    padding: 10px 16px;
}

.offer-list {
    padding-top: 10px;
    padding-bottom: 10px;
}

.offer-list-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
    align-items: center;
    border-bottom: 1px solid #e7eaf1;
}

.offer-list-item:last-child {
    border-bottom: 0;
}

.offer-list-item > button {
    display: grid;
    grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1fr) 20px;
    gap: 12px;
    align-items: center;
    width: 100%;
    padding: 15px 0;
    border: 0;
    text-align: left;
    color: #11183b;
    background: transparent;
}

.offer-list-item > button > span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.offer-list-item small {
    overflow: hidden;
    color: #71809e;
    font-size: 0.76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.offer-client-results {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
}

.offer-client-results button {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid #e1e5ee;
    border-radius: 6px;
    text-align: left;
    color: #11183b;
    background: #fff;
}

.offer-client-results small {
    color: #71809e;
}

.offer-inline-fields,
.offer-item-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.offer-inline-fields label,
.offer-item-grid label {
    display: grid;
    gap: 6px;
    color: #71809e;
    font-size: 0.76rem;
}

.offer-content {
    min-height: 140px;
}

.offer-items {
    display: grid;
    gap: 12px;
}

.offer-item-editor {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #e1e5ee;
    border-radius: 8px;
    background: #f9faff;
}

.offer-form-actions {
    display: grid;
    grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
    gap: 12px;
}

@media (max-width: 640px) {
    .offers-toolbar,
    .offer-list-item > button {
        grid-template-columns: minmax(0, 1fr);
    }

    .offers-toolbar .primary-action {
        width: 100%;
    }

    .offer-list-item {
        grid-template-columns: minmax(0, 1fr) 42px;
    }

    .offer-list-item > button > svg {
        display: none;
    }
}

.admin-task-travel {
    margin-top: 9px;
    color: #65718e;
    background: #f2f4f8;
}

.admin-task-travel.onsite,
.admin-task-travel.arrived {
    color: #087443;
    background: #e9f9f0;
}

.admin-task-travel.departed {
    color: #315ca8;
    background: #eef4ff;
}

.admin-task-travel svg,
.admin-task-protocol svg {
    width: 13px;
    height: 13px;
}

.admin-task-arrival-panel,
.task-note-readonly {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8f9fc;
}

.admin-task-arrival-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.danger-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #fecaca;
    border-radius: 7px;
    color: #b42318;
    background: #fff5f5;
    font-weight: 700;
}

.danger-action svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 680px) {
    .admin-task-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-task-new {
        width: 100%;
    }

    .admin-task-range,
    .admin-task-worker-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-task-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-task-card-actions {
        justify-content: space-between;
    }

    .admin-task-form-actions .primary-action {
        width: auto;
    }
}
/* August 2026: document details, alerts and orders */
.notification-button{position:relative}.notification-button>span{position:absolute;right:-4px;top:-5px;min-width:18px;height:18px;padding:0 4px;border:2px solid #fff;border-radius:9px;background:#e11d48;color:#fff;font-size:10px;font-weight:700;line-height:14px;text-align:center}
.preference-number{display:grid;grid-template-columns:minmax(0,1fr) 74px auto;gap:10px;align-items:center;padding:16px 0;border-top:1px solid #edf0f7}.preference-number span{display:flex;flex-direction:column}.preference-number small{color:#71809f}.preference-number input{width:74px;height:44px;border:1px solid #dce2ee;border-radius:8px;padding:0 8px;text-align:center}.preference-number em{font-style:normal;color:#71809f;font-size:13px}
.dashboard-deadline-alert{width:100%;display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:12px;border:1px solid #fecdd3;background:#fff7f8;color:#111936;padding:13px 14px;border-radius:8px;text-align:left}.dashboard-deadline-alert>i{color:#e11d48}.dashboard-deadline-alert span{display:flex;min-width:0;flex-direction:column}.dashboard-deadline-alert small{color:#7d4760;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-deadline-alert em{font-style:normal;color:#e11d48;font-weight:700}
.profile-term .badge-pill{display:inline-flex;align-items:center;gap:5px}.profile-term .badge-pill svg,.vehicle-term strong svg{width:15px;height:15px;color:#e11d48}.vehicle-term strong{display:flex;align-items:center;gap:5px}.profile-term.expired .profile-progress>span,.profile-term.missing .profile-progress>span,.vehicle-term.expired .profile-progress>span,.vehicle-term.missing .profile-progress>span{width:0!important;min-width:0!important}
.offer-item-name{width:100%;min-height:110px;resize:vertical;line-height:1.45}.offer-orders>button,.order-list>button{width:100%;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;padding:14px 0;border:0;border-bottom:1px solid #edf0f7;background:transparent;color:#101936;text-align:left}.offer-orders>button span,.order-list>button span{display:flex;min-width:0;flex-direction:column}.offer-orders small,.order-list small{color:#71809f}.order-list>button{grid-template-columns:minmax(100px,.7fr) minmax(0,1.3fr) auto}.offer-orders svg,.order-list svg{width:19px;color:#4f46e5}
.invoice-preview-modal.loading{min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px}.invoice-preview-modal.loading svg{animation:spin 1s linear infinite}.invoice-paper-items{margin-top:18px;border-top:1px solid #e6e9f1;padding-top:14px}.invoice-paper-items>div,.invoice-payments>div{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #eef1f6}.invoice-paper-items span,.invoice-payments span{display:flex;min-width:0;flex-direction:column}.invoice-paper-items small,.invoice-payments small{color:#71809f}.invoice-paper-items em,.invoice-payments em{font-style:normal;text-align:right}.invoice-payments{padding:16px 20px}.order-items article{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;padding:13px 0;border-bottom:1px solid #edf0f7}.order-items article strong{grid-column:1/-1}.order-items article span{color:#71809f}.order-items article em{font-style:normal;font-weight:700}.order-detail-screen .profile-note{margin-top:16px}
@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:600px){.order-list>button{grid-template-columns:1fr auto}.order-list>button span:nth-child(2){grid-column:1/2}.preference-number{grid-template-columns:minmax(0,1fr) 64px auto}.invoice-preview-modal{max-height:92dvh;overflow:auto}}
