:root {
    --bg: #f5f7f8;
    --surface: #ffffff;
    --surface-soft: #f7faf9;
    --text: #17211f;
    --muted: #667085;
    --line: #e3e8e6;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --danger: #b42318;
    --focus: #2563eb;
    --shadow: 0 16px 38px rgba(11, 23, 32, 0.07);
    --hm-sidebar: #0b1720;
    --hm-sidebar-soft: #101f29;
    --hm-sidebar-hover: #162a35;
    --hm-sidebar-active: #18323e;
    --hm-sidebar-text: #e7eef1;
    --hm-sidebar-muted: #93a6ae;
    --hm-sidebar-line: rgba(255, 255, 255, 0.1);
    --hm-bg: #f5f7f8;
    --hm-surface: #ffffff;
    --hm-border: #e3e8e6;
    --hm-text: #17211f;
    --hm-text-muted: #667085;
    --hm-primary: #0f766e;
    --hm-primary-hover: #115e59;
    --hm-danger: #b42318;
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --control-height: 42px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button,
a,
input,
textarea {
    outline-color: var(--focus);
}

.auth-page {
    background: #edf3f1;
}

.login-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(100%, 420px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 32px;
}

.login-header {
    margin-bottom: 24px;
}

.product-name,
.eyebrow,
.nav-label {
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 8px;
    font-size: 24px;
    line-height: 1.2;
}

h2 {
    margin-bottom: 6px;
    font-size: 18px;
}

h3 {
    margin-bottom: 6px;
    font-size: 16px;
}

p {
    color: var(--muted);
}

.form-stack,
.admin-form,
.access-list {
    display: grid;
    gap: 12px;
}

label {
    color: #344054;
    font-weight: 700;
}

input[type='email'],
input[type='password'],
input[type='text'],
input[type='number'],
input[type='date'],
input[type='file'],
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    background: #ffffff;
    color: var(--text);
}

input[type='email'],
input[type='password'],
input[type='text'],
input[type='number'],
input[type='date'],
input[type='file'],
select {
    min-height: var(--control-height);
}

textarea {
    min-height: 180px;
    resize: vertical;
}

input:focus {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

textarea:focus {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
    outline: none;
}

.primary-button,
.secondary-button,
.primary-link,
.secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 700;
    padding: 10px 16px;
}

.primary-button,
.primary-link {
    background: var(--primary);
    color: #ffffff;
}

.primary-button:hover,
.primary-link:hover {
    background: var(--primary-dark);
}

.secondary-link {
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--text);
}

.secondary-button {
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--text);
}

.link-button {
    border: 0;
    background: transparent;
    color: var(--primary-dark);
    cursor: pointer;
    font-weight: 700;
    padding: 0;
}

.alert,
.success,
.notice {
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    padding: 12px 14px;
}

.alert {
    border: 1px solid #f3b3ad;
    background: #fff1f0;
    color: var(--danger);
}

.alert p {
    color: var(--danger);
    margin-bottom: 4px;
}

.alert p:last-child {
    margin-bottom: 0;
}

.notice {
    border: 1px solid #b8d6d0;
    background: #eef8f6;
    color: #134e4a;
}

.success {
    border: 1px solid #9bd6b1;
    background: #edfff4;
    color: #166534;
}

.app-shell {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    min-height: 100vh;
    background: var(--hm-bg);
    align-items: start;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 22px;
    height: 100vh;
    min-height: 0;
    position: sticky;
    top: 0;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, var(--hm-sidebar) 0%, var(--hm-sidebar-soft) 100%);
    color: var(--hm-sidebar-text);
    padding: 22px 16px;
}

.brand a {
    display: flex;
    gap: 12px;
    min-height: 48px;
    align-items: center;
    color: var(--hm-sidebar-text);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--primary);
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.28);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    color: #ffffff;
    font-size: 18px;
    line-height: 1.2;
}

.brand small {
    color: var(--hm-sidebar-muted);
    font-size: 13px;
}

.sidebar-compose {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 42px;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    transition: background-color 150ms ease, transform 150ms ease;
}

.sidebar-compose:hover {
    background: #13937f;
    transform: translateY(-1px);
}

.sidebar-compose span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 17px;
    line-height: 1;
}

.sidebar-compose svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-nav {
    display: grid;
    flex: 1 1 auto;
    align-content: start;
    align-items: start;
    grid-auto-rows: max-content;
    gap: 22px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
    scrollbar-width: thin;
}

.nav-section {
    display: grid;
    align-content: start;
    gap: 6px;
    min-height: max-content;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: var(--radius-md);
    color: var(--hm-sidebar-muted);
    min-height: 40px;
    padding: 9px 10px 9px 12px;
    transition: background-color 150ms ease, color 150ms ease;
}

.nav-item span:nth-child(3) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    color: #8ea2ab;
    line-height: 1;
}

.nav-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-label {
    margin: 0 12px 4px;
    color: #718893;
    font-size: 11px;
}

.nav-item:hover,
.nav-item.active {
    background: var(--hm-sidebar-hover);
    color: #ffffff;
}

.nav-item.active {
    background: var(--hm-sidebar-active);
    font-weight: 700;
}

.nav-item.active .nav-icon {
    color: #4adeb8;
}

.nav-active-bar {
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: 0;
    width: 3px;
    border-radius: 999px;
    background: transparent;
}

.nav-item.active .nav-active-bar {
    background: #4adeb8;
}

.nav-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    margin-left: auto;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    padding: 0 7px;
}

.sidebar-footer {
    display: grid;
    flex: 0 0 auto;
    gap: 14px;
    margin-top: auto;
    border-top: 1px solid var(--hm-sidebar-line);
    padding-top: 18px;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: var(--radius-md);
    color: inherit;
    padding: 4px;
    transition: background-color 150ms ease;
}

.user-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

.user-avatar,
.conversation-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #e4f4f1;
    color: var(--primary-dark);
    font-weight: 800;
}

.user-avatar {
    width: 42px;
    height: 42px;
    font-size: 14px;
}

img.user-avatar,
.profile-avatar-image {
    object-fit: cover;
}

.user-card strong,
.user-card small {
    display: block;
}

.user-card strong {
    color: #ffffff;
    line-height: 1.2;
}

.user-card small {
    color: var(--hm-sidebar-muted);
    font-size: 13px;
}

.footer-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: #c8d5da;
    font-size: 14px;
    font-weight: 700;
}

.footer-actions a,
.footer-actions .link-button {
    color: #c8d5da;
}

.footer-actions a:hover,
.footer-actions .link-button:hover {
    color: #ffffff;
}

.workspace {
    min-width: 0;
    min-height: 100vh;
    padding: 28px 30px;
    position: relative;
    overflow: hidden;
    background: var(--hm-bg);
}

.workspace::before,
.workspace::after {
    content: none;
}

.workspace > * {
    position: relative;
    z-index: 1;
}

.workspace-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 18px;
}

.workspace-header p {
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mailbox-view,
.table-wrap,
.admin-form,
.access-list,
.empty-state {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.mailbox-view {
    min-height: calc(100vh - 124px);
    overflow: hidden;
}

.inbox-workspace .workspace-header {
    margin-bottom: 16px;
    padding-bottom: 14px;
}

.inbox-workspace .workspace-header h1 {
    margin-bottom: 4px;
    font-size: 24px;
}

.inbox-workspace .workspace-header p {
    color: #687780;
    font-size: 13px;
}

.inbox-workspace .mailbox-view {
    border-color: #e6ebea;
    box-shadow: 0 12px 28px rgba(11, 23, 32, 0.045);
}

.mailbox-heading {
    border-bottom: 1px solid var(--line);
    padding: 14px 18px;
}

.mailbox-heading p {
    margin-bottom: 0;
}

.status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.status-warning {
    display: inline-flex;
    margin-top: 12px;
    border: 1px solid #f7c566;
    border-radius: 999px;
    background: #fffbeb;
    color: #92400e;
    font-size: 14px;
    font-weight: 700;
    padding: 4px 10px;
}

.status-ok {
    display: inline-flex;
    margin-top: 6px;
    border-radius: 999px;
    background: #edfff4;
    color: #166534;
    font-size: 13px;
    font-weight: 700;
    padding: 2px 8px;
}

.search-form {
    display: grid;
    gap: 8px;
    margin-top: 0;
}

.search-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #ffffff;
    padding: 4px 5px 4px 12px;
}

.search-row input {
    min-height: 36px;
    border: 0;
    background: transparent;
    padding: 8px 4px;
    font-size: 14px;
}

.search-row input:focus {
    border-color: transparent;
    box-shadow: none;
}

.search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}

.search-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.search-row .secondary-button {
    min-height: 34px;
    border-color: transparent;
    background: #f6f8f8;
    color: #52615f;
    font-size: 13px;
    padding: 7px 12px;
}

.conversation-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
    min-height: 33px;
    border: 1px solid #dfe7e4;
    border-radius: 999px;
    background: #fbfcfc;
    color: #53615f;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 10px;
    text-decoration: none;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.filter-pill:hover {
    border-color: rgba(23, 145, 114, 0.36);
    background: #f2fbf7;
    color: var(--primary-dark);
}

.filter-pill.active {
    border-color: rgba(15, 118, 110, 0.42);
    background: #eaf8f3;
    color: var(--primary-dark);
}

.filter-pill strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    border-radius: 999px;
    background: #eef3f2;
    color: inherit;
    font-size: 11px;
    padding: 0 6px;
}

.filter-pill.active strong {
    background: #ffffff;
}

.message-list,
.conversation-list {
    display: grid;
    padding: 0;
}

.message-row,
.conversation-row {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-top: 1px solid #edf1ef;
    padding: 12px 16px;
    transition: background-color 150ms ease;
}

.conversation-link {
    display: flex;
    align-items: flex-start;
    flex: 1;
    gap: 12px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.conversation-row.unread {
    background: #f5fbf8;
    box-shadow: inset 2px 0 0 var(--primary);
}

.conversation-row.unread .conversation-contact,
.conversation-row.unread .conversation-subject {
    color: #134e4a;
    font-weight: 700;
}

.conversation-row.unread time {
    color: var(--primary-dark);
    font-weight: 800;
}

.message-row:hover,
.conversation-row:hover {
    background: #fafcfc;
}

.conversation-actions {
    position: relative;
    flex: 0 0 auto;
    margin-top: 0;
}

.conversation-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #78918a;
    cursor: pointer;
    font: inherit;
    font-size: 20px;
    line-height: 1;
    transition: background-color 150ms ease, color 150ms ease;
}

.conversation-menu-trigger:hover,
.conversation-menu-trigger[aria-expanded="true"] {
    background: #eef5f2;
    color: var(--primary-dark);
}

.conversation-menu {
    position: absolute;
    top: 36px;
    right: 0;
    z-index: 20;
    min-width: 210px;
    border: 1px solid rgba(182, 207, 199, 0.86);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(26, 72, 61, 0.14);
    padding: 6px;
}

.conversation-menu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    padding: 9px 10px;
    text-align: left;
}

.conversation-menu-item:hover {
    background: #f2fbf7;
    color: var(--primary-dark);
}

.conversation-menu-item:disabled {
    cursor: progress;
    opacity: 0.7;
}

.conversation-avatar {
    width: 40px;
    height: 40px;
    margin-top: 1px;
    background: #eef6f4;
    color: #17675e;
    font-size: 13px;
}

.conversation-main {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.conversation-topline,
.conversation-bottomline,
.conversation-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.conversation-topline,
.conversation-bottomline {
    justify-content: space-between;
}

.conversation-topmeta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
}

.unread-dot {
    display: inline-flex;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.message-sender,
.message-subject {
    color: var(--text);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.conversation-contact,
.conversation-subject {
    color: var(--text);
    overflow-wrap: anywhere;
}

.conversation-contact,
.conversation-subject {
    display: block;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-contact {
    font-size: 14px;
    font-weight: 600;
}

.conversation-subject {
    font-size: 14px;
    font-weight: 500;
}

.message-preview,
.conversation-preview {
    color: var(--muted);
}

.conversation-preview {
    min-width: 0;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-row time,
.conversation-row time {
    color: var(--muted);
    flex: 0 0 auto;
    font-size: 12px;
    white-space: nowrap;
}

.conversation-direction {
    flex: 0 0 auto;
    border-radius: 999px;
    background: #f1f5f4;
    color: #5d6d69;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
}

.mailbox-badge {
    flex: 0 0 auto;
    border: 1px solid #dbe7e2;
    border-radius: 999px;
    background: #ffffff;
    color: #53615f;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
}

.workflow-badge {
    flex: 0 0 auto;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
}

.workflow-badge {
    background: #edfdf5;
    color: #047857;
}

.workflow-badge.status-in_progress {
    background: #eff6ff;
    color: #1d4ed8;
}

.workflow-badge.status-waiting_customer {
    background: #fffbeb;
    color: #a16207;
}

.workflow-badge.status-resolved {
    background: #f2f4f7;
    color: #475467;
}

.conversation-direction.outbound {
    background: #f2f6fb;
    color: #38608f;
}

.conversation-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    border: 1px solid #e3e8e6;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(11, 23, 32, 0.045);
    padding: 18px 20px;
}

.conversation-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
    min-width: 0;
}

.conversation-header-menu {
    margin-top: 0;
}

.conversation-contact-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.conversation-header-avatar,
.message-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #dff3ef;
    color: var(--primary-dark);
    font-weight: 800;
}

.conversation-header-avatar {
    width: 44px;
    height: 44px;
    font-size: 14px;
}

.conversation-header-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.conversation-header-main h1 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-header-main p,
.conversation-header-main strong {
    margin: 0;
    overflow-wrap: anywhere;
}

.conversation-header-main p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.3;
}

.conversation-header-main strong {
    color: #53615f;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-workflow {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 8px;
    margin-top: 0;
}

.conversation-read-feedback {
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
}

.workflow-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 8px;
}

.workflow-form label {
    display: grid;
    gap: 3px;
}

.workflow-form label span,
.workflow-readonly {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.workflow-form select {
    min-height: 38px;
    width: 176px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    padding: 7px 10px;
}

.workflow-form label:nth-of-type(2) select {
    width: 160px;
}

.workflow-form .secondary-button {
    min-height: 38px;
    padding: 8px 13px;
}

.conversation-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #52615f;
    font-weight: 800;
    padding: 0;
    transition: background-color 160ms ease, color 160ms ease;
}

.conversation-back svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.conversation-back:hover {
    background: #eef5f2;
    color: var(--primary);
}

.message-detail {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.message-meta {
    display: grid;
    gap: 12px;
    margin: 0;
    border-bottom: 1px solid var(--line);
    padding: 22px;
}

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

.message-meta dt {
    color: var(--muted);
    font-weight: 700;
}

.message-meta dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.message-meta dd span {
    display: block;
    color: var(--muted);
    font-size: 14px;
}

.message-body {
    padding: 22px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.conversation-detail {
    display: grid;
    overflow: hidden;
    gap: 16px;
    background: var(--hm-bg);
}

.conversation-thread {
    display: grid;
    gap: 14px;
    width: min(100%, 1080px);
    margin: 0 auto;
    padding: 6px 0 0;
}

.message-record {
    display: block;
    min-width: 0;
}

.message-avatar {
    width: 34px;
    height: 34px;
    font-size: 12px;
}

.email-message {
    display: grid;
    gap: 14px;
    border: 1px solid #e2e8e6;
    border-radius: var(--radius-lg);
    background: #ffffff;
    padding: 16px 18px;
    overflow-wrap: anywhere;
    box-shadow: 0 8px 20px rgba(11, 23, 32, 0.035);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.email-message.outbound {
    border-left: 3px solid var(--primary);
    background: #fbfefd;
}

.email-message:hover {
    border-color: #cfdcda;
    box-shadow: 0 10px 24px rgba(11, 23, 32, 0.05);
}

.email-message-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    border-bottom: 1px solid #eef2f1;
    padding-bottom: 12px;
}

.email-message-identity {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.email-message-identity strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-message-identity span,
.email-message-header time {
    color: var(--muted);
    font-size: 13px;
}

.responded-by {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.responded-by img,
.responded-by > span[aria-hidden="true"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #e4f4f1;
    color: var(--primary-dark);
    font-size: 10px;
    font-weight: 800;
    object-fit: cover;
}

.email-message-header time {
    white-space: nowrap;
}

.email-message-body {
    color: var(--text);
    font-size: 15px;
    line-height: 1.62;
    white-space: normal;
}

.open-tracking-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    border-top: 1px solid #eef2f1;
    padding-top: 10px;
}

.tracking-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border: 1px solid #d8e4e1;
    border-radius: 999px;
    background: #f8fbfa;
    color: #435451;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 9px;
}

.tracking-pill.sent {
    border-color: #cddbd8;
    color: #243b39;
}

.tracking-pill.opened {
    border-color: #9bd6b1;
    background: #edfff4;
    color: #166534;
}

.tracking-pill.neutral {
    color: var(--muted);
}

.tracking-detail {
    color: var(--muted);
    font-size: 12px;
}

.attachment-list {
    display: grid;
    gap: 8px;
    border-top: 1px solid #eef2f1;
    margin-top: 2px;
    padding-top: 12px;
}

.attachment-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid #dce8e4;
    border-radius: var(--radius-md);
    background: #fbfcfc;
    padding: 9px 10px;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.attachment-item:hover {
    border-color: #b9d8d1;
    background: #ffffff;
}

.attachment-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #eef8f5;
    color: var(--primary-dark);
}

.attachment-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.attachment-info {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.attachment-item strong {
    color: var(--text);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.attachment-info span {
    color: var(--muted);
    font-size: 12px;
}

.attachment-download {
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.reply-form {
    display: grid;
    gap: 0;
    width: min(100%, 1080px);
    margin: 0 auto 24px;
    border: 1px solid #dce8e4;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(11, 23, 32, 0.05);
    padding: 0;
    overflow: hidden;
}

.reply-heading {
    display: grid;
    gap: 2px;
    border-bottom: 1px solid #eef2f1;
    padding: 13px 16px;
}

.reply-heading span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.reply-heading strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.reply-form textarea {
    min-height: 158px;
    resize: vertical;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    padding: 16px;
    transition: box-shadow 160ms ease, background-color 160ms ease;
}

.reply-form textarea:focus {
    border-color: transparent;
    background: #ffffff;
    box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.12);
    outline: none;
}

.reply-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid #eef2f1;
    background: #fbfcfc;
    padding: 10px 12px;
}

.file-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    border: 0;
    border-radius: var(--radius-md);
    background: transparent;
    color: #52615f;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 10px;
    transition: background-color 160ms ease, color 160ms ease;
}

.file-button svg,
.reply-submit svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.file-button:hover {
    background: #eef5f2;
    color: var(--primary);
}

.reply-submit {
    gap: 8px;
    min-height: 40px;
    padding: 8px 14px;
}

.selected-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid #eef2f1;
    padding: 10px 16px;
}

.selected-attachments[hidden] {
    display: none;
}

.selected-attachment-item {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    gap: 7px;
    border: 1px solid #dce8e4;
    border-radius: 999px;
    background: #ffffff;
    color: #52615f;
    font-size: 13px;
    padding: 5px 9px;
}

.selected-attachment-item strong {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-attachment-item small {
    color: var(--muted);
}

.selected-attachment-icon,
.selected-attachment-icon svg {
    display: inline-flex;
    width: 16px;
    height: 16px;
}

.selected-attachment-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.empty-state {
    display: grid;
    min-height: 260px;
    place-content: center;
    padding: 32px;
    text-align: center;
}

.empty-state p {
    margin-bottom: 0;
}

.profile-panel {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 22px;
    max-width: 900px;
}

.profile-avatar-card,
.profile-details {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 22px;
}

.profile-avatar-card {
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 14px;
    text-align: center;
}

.profile-avatar-image,
.profile-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 112px;
    border-radius: 999px;
    background: #e4f4f1;
    color: var(--primary-dark);
    font-size: 32px;
    font-weight: 800;
}

.profile-avatar-card h2 {
    margin-bottom: 4px;
}

.profile-avatar-card p {
    margin-bottom: 6px;
    overflow-wrap: anywhere;
}

.profile-avatar-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.profile-details {
    display: grid;
    gap: 18px;
}

.profile-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.profile-list div {
    display: grid;
    gap: 3px;
}

.profile-list dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.profile-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

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

.tasks-workspace {
    overflow-x: hidden;
}

.tasks-header {
    align-items: flex-end;
}

.tasks-header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.task-filter-panel {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    padding: 12px 14px;
}

.task-deadline-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.task-summary-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 28px;
    border: 1px solid #dce6e3;
    border-radius: 999px;
    background: #ffffff;
    color: #445452;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    text-decoration: none;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.task-summary-pill:hover {
    border-color: #9fcfc4;
    background: #e8f6f2;
    color: var(--primary-dark);
}

.task-summary-pill strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 19px;
    border-radius: 999px;
    background: #eef5f2;
    color: inherit;
    font-size: 11px;
}

.task-summary-overdue strong {
    background: #fff1f0;
    color: var(--danger);
}

.task-summary-today strong {
    background: #fff7e6;
    color: #9a6400;
}

.task-filter-form {
    display: grid;
    gap: 8px;
}

.task-filter-compact-header,
.task-filter-mainbar {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    min-width: 0;
}

.task-filter-mainbar {
    position: relative;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto auto auto;
}

.task-filter-field {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.task-filter-field span,
.task-competence-field legend {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
}

.task-filter-field input,
.task-filter-field select {
    height: 38px;
    min-width: 0;
    width: 100%;
}

.task-search-field input {
    border-radius: 999px;
    padding-left: 15px;
}

.task-competence-field {
    border: 0;
    margin: 0;
    padding: 0;
}

.task-competence-field div {
    display: grid;
    grid-template-columns: minmax(82px, 0.8fr) minmax(92px, 1fr);
    gap: 8px;
}

.task-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-height: 38px;
    min-width: 0;
}

.task-filter-search-button,
.task-filter-submit {
    min-height: 38px;
    padding: 0 14px;
}

.task-filter-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border-radius: var(--radius-md);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    padding: 0 10px;
    text-decoration: none;
    white-space: nowrap;
}

.task-filter-details,
.task-legend-details {
    position: relative;
}

.task-filter-details summary,
.task-legend-details summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    border: 1px solid #dce6e3;
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--primary-dark);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    list-style: none;
    padding: 0 12px;
    white-space: nowrap;
}

.task-filter-details summary::-webkit-details-marker,
.task-legend-details summary::-webkit-details-marker {
    display: none;
}

.task-filter-details summary:hover,
.task-filter-details[open] summary,
.task-legend-details summary:hover,
.task-legend-details[open] summary {
    border-color: #9fcfc4;
    background: #e8f6f2;
}

.task-filter-details summary svg,
.task-legend-details summary svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.task-filter-details summary strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    font-size: 11px;
}

.task-filter-details[open] {
    grid-column: 1 / -1;
}

.task-filter-popover {
    display: grid;
    gap: 12px;
    width: 100%;
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow);
    padding: 12px;
}

.task-legend-details .task-visual-legend {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.task-filter-mine {
    border: 1px solid #dce6e3;
    background: #ffffff;
}

.task-filter-mine.active,
.task-filter-mine:hover {
    border-color: #9fcfc4;
    background: #e8f6f2;
    color: var(--primary-dark);
}

.task-filter-actions a:hover {
    color: var(--primary-dark);
}

.task-filter-result {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.task-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.task-active-filters a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    border: 1px solid #dce6e3;
    border-radius: 999px;
    background: #f8fbfa;
    color: #52615f;
    font-size: 12px;
    font-weight: 750;
    padding: 0 9px;
    text-decoration: none;
}

.task-active-filters a:hover {
    border-color: #9fcfc4;
    color: var(--primary-dark);
}

.task-active-filters .task-active-filters-clear {
    background: #ffffff;
    color: var(--primary-dark);
}

.task-visual-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 2px;
    color: #687774;
    font-size: 12px;
    font-weight: 700;
    min-width: 245px;
    padding: 10px;
}

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

.legend-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 999px;
}

.legend-recurring {
    background: #2563eb;
}

.legend-manual {
    background: #9aa6a3;
}

.legend-overdue {
    background: var(--danger);
}

.legend-today {
    background: #d98500;
}

.kanban-board {
    display: grid;
    grid-auto-columns: minmax(270px, 1fr);
    grid-auto-flow: column;
    gap: 16px;
    min-height: calc(100vh - 150px);
    overflow-x: auto;
    padding-bottom: 8px;
    cursor: grab;
    scrollbar-color: #c8d4d1 transparent;
    scrollbar-width: thin;
}

.kanban-board.is-panning {
    cursor: grabbing;
    user-select: none;
}

.kanban-board.is-panning * {
    cursor: grabbing;
}

.kanban-column {
    display: grid;
    grid-template-rows: auto minmax(220px, 1fr);
    min-width: 270px;
    border: 1px solid #dde7e4;
    border-radius: var(--radius-lg);
    background: #f6faf9;
    overflow: hidden;
}

.kanban-column--completion {
    border-color: #cfe3d7;
    background: #f5fbf7;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid #e2e8e6;
    background: rgba(255, 255, 255, 0.72);
    padding: 12px 14px;
}

.kanban-column-header h2 {
    margin: 0;
    color: #30413f;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0;
}

.kanban-column-header small {
    display: block;
    margin-top: 2px;
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 800;
}

.kanban-column-tools {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.kanban-column-tools > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #e7f4f1;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
    padding: 0 7px;
}

.column-menu {
    position: relative;
}

.column-menu summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    color: var(--muted);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    list-style: none;
}

.column-menu summary::-webkit-details-marker {
    display: none;
}

.column-menu summary:hover,
.column-menu[open] summary {
    background: #eef5f2;
    color: var(--primary-dark);
}

.column-menu-panel {
    position: absolute;
    top: 32px;
    right: 0;
    z-index: 18;
    display: grid;
    min-width: 190px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow);
    padding: 6px;
}

.column-menu-panel button {
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
    padding: 9px 10px;
    text-align: left;
}

.column-menu-panel button:hover {
    background: #f3f7f6;
}

.column-menu-panel .danger-link {
    color: var(--danger);
}

.kanban-add-column {
    display: grid;
    align-items: start;
    min-width: 230px;
}

.kanban-add-column-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border: 1px dashed #bfd3ce;
    border-radius: var(--radius-lg);
    background: #fbfdfc;
    color: var(--primary-dark);
    cursor: pointer;
    font-size: 13px;
    font-weight: 850;
    padding: 0 14px;
}

.kanban-add-column-button span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #e7f4f1;
    color: var(--primary-dark);
}

.kanban-add-column-button:hover {
    border-color: var(--primary);
    background: #f2faf7;
}

.task-card-list {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 220px;
    padding: 12px;
}

.task-card {
    position: relative;
    display: grid;
    gap: 9px;
    border: 1px solid #dfe8e5;
    border-left-width: 4px;
    border-radius: var(--radius-md);
    background: #ffffff;
    cursor: grab;
    padding: 12px 12px 12px 13px;
    box-shadow: 0 8px 18px rgba(11, 23, 32, 0.045);
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.task-card--manual {
    border-left-color: #9aa6a3;
}

.task-card--recurring {
    border-left-color: #2563eb;
}

.task-card.deadline-overdue {
    border-top-color: #f1c7c4;
    border-right-color: #f1c7c4;
    border-bottom-color: #f1c7c4;
}

.task-card.deadline-today {
    border-top-color: #f0d4a5;
    border-right-color: #f0d4a5;
    border-bottom-color: #f0d4a5;
}

.task-card.deadline-upcoming {
    border-top-color: #d9e8e4;
    border-right-color: #d9e8e4;
    border-bottom-color: #d9e8e4;
}

.task-card.deadline-completed {
    border-top-color: #cfe3d7;
    border-right-color: #cfe3d7;
    border-bottom-color: #cfe3d7;
    background: #fbfdfc;
}

.task-card:hover,
.task-card:focus {
    border-color: #b9d8d1;
    box-shadow: 0 10px 22px rgba(11, 23, 32, 0.07);
    outline: none;
}

.task-card:active {
    cursor: grabbing;
}

.task-card.is-dragging {
    opacity: 0.62;
    transform: rotate(1deg);
}

.task-card--saving,
.task-card--moving {
    opacity: 0.58;
    transform: translateX(10px);
}

.task-card--arriving {
    animation: taskCardArrive 240ms ease-out;
}

.task-card--leaving {
    opacity: 0;
    transform: translateX(10px);
}

.task-card-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
}

.task-card h3 {
    margin: 0;
    color: var(--text);
    font-size: 14.5px;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.task-title-group {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.task-company-name,
.task-obligation-name {
    margin: 0;
    color: #52615f;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-obligation-name {
    color: var(--muted);
    font-weight: 650;
}

.task-card-menu {
    position: relative;
    z-index: 3;
}

.task-card-menu summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    color: var(--muted);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    list-style: none;
}

.task-card-menu summary::-webkit-details-marker {
    display: none;
}

.task-card-menu summary:hover {
    background: #eef5f2;
    color: var(--primary-dark);
}

.task-card-menu-panel {
    position: absolute;
    top: 32px;
    right: 0;
    z-index: 10;
    display: grid;
    min-width: 150px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow);
    padding: 6px;
}

.task-card-menu-panel button {
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 10px;
    text-align: left;
}

.task-card-menu-panel button:hover {
    background: #f3f7f6;
}

.task-menu-note {
    max-width: 190px;
    margin: 2px 4px 4px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

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

.task-advance-form {
    display: flex;
    justify-self: end;
}

.task-advance-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
    border: 1px solid #d9e8e4;
    border-radius: 999px;
    background: #f8fcfb;
    color: var(--primary);
    cursor: pointer;
    padding: 0;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.task-advance-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.task-advance-button:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
    transform: translateX(1px);
}

.task-advance-button:disabled {
    cursor: wait;
    opacity: 0.6;
    transform: none;
}

.task-inline-notice {
    border: 1px solid #f1c7c4;
    border-radius: var(--radius-md);
    background: #fff7f6;
    color: var(--danger);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
    padding: 10px 12px;
}

@keyframes taskCardArrive {
    0% {
        opacity: 0.58;
        transform: translateX(12px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.task-priority {
    justify-self: start;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    padding: 5px 8px;
    text-transform: uppercase;
}

.task-card-badges,
.mine-task-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.task-source-badge,
.task-competence-badge {
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    padding: 5px 8px;
}

.task-source-badge--recurring {
    background: #eff6ff;
    color: #1d4ed8;
}

.task-source-badge--manual {
    background: #f1f4f3;
    color: #52615f;
}

.task-competence-badge {
    background: #eef7f4;
    color: var(--primary-dark);
}

.priority-low {
    background: #eef4f3;
    color: #52615f;
}

.priority-normal {
    background: #eaf5f2;
    color: var(--primary-dark);
}

.priority-high {
    background: #fff4df;
    color: #946200;
}

.priority-urgent {
    background: #fff1f0;
    color: var(--danger);
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
}

.task-meta span {
    border-radius: 999px;
    background: #f3f7f6;
    padding: 4px 8px;
}

.task-meta .deadline-pill-overdue {
    background: #fff1f0;
    color: var(--danger);
    font-weight: 800;
}

.task-meta .deadline-pill-today {
    background: #fff7e6;
    color: #9a6400;
    font-weight: 800;
}

.task-meta .deadline-pill-upcoming {
    background: #e7f4f1;
    color: var(--primary-dark);
    font-weight: 800;
}

.task-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.task-meta-line span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: #b3c0bd;
}

.deadline-pill {
    border-radius: 999px;
    background: #f3f7f6;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    padding: 5px 8px;
}

.deadline-pill-overdue {
    background: #fff1f0;
    color: var(--danger);
}

.deadline-pill-today {
    background: #fff7e6;
    color: #9a6400;
}

.deadline-pill-upcoming {
    background: #f2f8f6;
    color: var(--primary-dark);
}

.deadline-pill-completed {
    background: #edf8f0;
    color: #28724c;
}

.task-recurring-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
}

.task-recurring-meta span {
    border-radius: 999px;
    background: #e7f4f1;
    padding: 4px 8px;
}

.task-assignee {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #52615f;
    font-size: 12px;
}

.task-assignee img,
.task-assignee > span[aria-hidden='true'] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #e4f4f1;
    color: var(--primary-dark);
    font-size: 10px;
    font-weight: 800;
    object-fit: cover;
}

.task-assignee strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mine-tasks-workspace {
    gap: 14px;
}

.mine-task-toolbar {
    display: grid;
    gap: 8px;
    border: 1px solid #e2ebe8;
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(11, 23, 32, 0.045);
    padding: 10px;
}

.mine-task-toolbar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.mine-task-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
}

.mine-task-toolbar-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.mine-task-toolbar-meta strong {
    color: var(--text);
}

.mine-task-legend {
    margin-top: 0;
}

.mine-summary-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 26px;
    border: 1px solid #e0e9e6;
    border-radius: 999px;
    background: #fbfdfc;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    padding: 0 9px;
}

.mine-summary-pill strong {
    color: var(--text);
    font-size: 12px;
}

.mine-summary-overdue strong {
    color: var(--danger);
}

.mine-summary-today strong {
    color: #9a6400;
}

.mine-summary-next strong {
    color: var(--primary-dark);
}

.mine-task-filter-form {
    display: grid;
    gap: 8px;
}

.mine-task-filter-primary {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto auto;
    align-items: end;
    gap: 8px;
    min-width: 0;
}

.mine-search-field {
    min-width: 0;
}

.mine-search-field input {
    border-color: #dce7e4;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 400;
}

.mine-search-field input::placeholder {
    color: #8b9b98;
    font-size: 14px;
    font-weight: 400;
}

.mine-task-filter-primary .task-filter-submit {
    border-color: #dce7e4;
    border-radius: 14px;
}

.mine-filter-details {
    position: relative;
    min-width: 0;
}

.mine-filter-details summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    border: 1px solid #dce7e4;
    border-radius: 14px;
    background: #ffffff;
    color: #36504b;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    list-style: none;
    padding: 0 12px;
}

.mine-filter-details summary::-webkit-details-marker {
    display: none;
}

.mine-filter-details summary svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
}

.mine-filter-details summary strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    font-size: 11px;
    line-height: 1;
}

.mine-filter-panel {
    position: absolute;
    right: 0;
    z-index: 20;
    width: min(320px, 80vw);
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: 0 18px 40px rgba(11, 23, 32, 0.16);
    padding: 12px;
}

.mine-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mine-active-filters span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    background: #eef7f4;
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 800;
    padding: 0 8px;
}

.mine-all-clear {
    margin: -1px 0 0;
    border: 1px solid #dcece7;
    border-radius: var(--radius-md);
    background: #f7fbfa;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
    padding: 11px 13px;
}

.mine-all-clear[hidden] {
    display: none;
}

.mine-task-sections {
    display: grid;
    gap: 12px;
}

.mine-task-section {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 6px 18px rgba(11, 23, 32, 0.04);
    overflow: hidden;
}

.mine-task-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #edf2f1;
    background: #fbfdfc;
    cursor: pointer;
    list-style: none;
    padding: 10px 12px;
}

.mine-task-section-header::-webkit-details-marker {
    display: none;
}

.mine-task-section-header::before {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid #8ba09c;
    border-bottom: 2px solid #8ba09c;
    transform: rotate(45deg);
    transition: transform 180ms ease;
}

.mine-task-section:not([open]) .mine-task-section-header::before {
    transform: rotate(-45deg);
}

.mine-task-section-header h2 {
    flex: 1;
    margin: 0;
    color: #445452;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}

.mine-task-section-header span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #e7f4f1;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
    padding: 0 7px;
}

.mine-task-list {
    display: grid;
    gap: 6px;
    padding: 8px;
}

.mine-task-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    border: 1px solid #dfe8e5;
    border-left-width: 4px;
    border-radius: var(--radius-md);
    background: #ffffff;
    padding: 9px 10px;
    box-shadow: 0 5px 14px rgba(11, 23, 32, 0.035);
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease, opacity 150ms ease;
}

.mine-task-card--manual {
    border-left-color: #9aa6a3;
}

.mine-task-card--recurring {
    border-left-color: #2563eb;
}

.mine-task-card.deadline-overdue {
    border-top-color: #f1c7c4;
    border-right-color: #f1c7c4;
    border-bottom-color: #f1c7c4;
}

.mine-task-card.deadline-today {
    border-top-color: #f0d4a5;
    border-right-color: #f0d4a5;
    border-bottom-color: #f0d4a5;
}

.mine-task-card.deadline-upcoming {
    border-top-color: #d9e8e4;
    border-right-color: #d9e8e4;
    border-bottom-color: #d9e8e4;
}

.mine-task-card.deadline-dated {
    border-top-color: #dde7e4;
    border-right-color: #dde7e4;
    border-bottom-color: #dde7e4;
}

.mine-task-card--completed {
    border-top-color: #cfe3d7;
    border-right-color: #cfe3d7;
    border-bottom-color: #cfe3d7;
    background: #fbfdfc;
}

.mine-task-card--section-exit {
    opacity: 0;
    transform: translateX(12px) scale(0.992);
}

.mine-task-card--section-enter {
    animation: mineTaskSectionEnter 220ms ease-out;
}

.mine-task-card:hover {
    border-color: #b9d8d1;
    box-shadow: 0 9px 20px rgba(11, 23, 32, 0.06);
}

.mine-task-main {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.mine-task-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
}

.mine-task-title-stack {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.mine-task-title-row h3 {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.mine-task-title-stack p {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 8px;
    margin: 0;
    color: #52615f;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mine-task-title-stack p span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: #aebdb9;
}

.mine-task-badges span:not(.task-priority):not(.task-source-badge) {
    border-radius: 999px;
    background: #f3f7f6;
    color: #52615f;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    padding: 4px 7px;
}

.mine-task-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 7px;
    color: var(--muted);
    font-size: 12px;
}

.mine-task-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: #b3c0bd;
}

.mine-task-due {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mine-task-advance-form {
    justify-self: end;
}

.mine-task-advance-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 32px;
    border: 1px solid #d9e8e4;
    border-radius: 999px;
    background: #f8fcfb;
    color: var(--primary-dark);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    padding: 0 9px 0 11px;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.mine-task-advance-button[aria-busy="true"]::before {
    content: "";
    width: 10px;
    height: 10px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 999px;
    animation: mineTaskSpin 700ms linear infinite;
}

.mine-task-advance-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.mine-task-advance-button:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
    transform: translateX(1px);
}

.mine-task-advance-button:disabled {
    cursor: wait;
    opacity: 0.6;
    transform: none;
}

.mine-empty-section {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 3px;
}

@keyframes mineTaskSectionEnter {
    0% {
        opacity: 0;
        transform: translateY(-6px) scale(0.992);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes mineTaskSpin {
    to {
        transform: rotate(360deg);
    }
}

.kanban-empty-column {
    margin: 0;
    border: 1px dashed #d2dfdc;
    border-radius: var(--radius-md);
    color: var(--muted);
    font-size: 13px;
    padding: 14px;
    text-align: center;
}

.column-manager {
    display: grid;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    padding: 16px;
}

.column-manager > header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.column-manager h2 {
    margin: 2px 0 0;
    color: var(--text);
    font-size: 18px;
}

.column-manager p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

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

.column-manager-row {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto auto auto;
    align-items: end;
    gap: 10px;
    border: 1px solid #e2e8e6;
    border-radius: var(--radius-md);
    background: #f8fbfa;
    padding: 10px;
}

.column-manager-row.is-archived {
    opacity: 0.72;
}

.column-manager-row label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.column-manager-row input[type='text'] {
    height: 38px;
}

.column-reorder-actions,
.column-row-actions,
.archived-task-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.column-reorder-actions button {
    width: 30px;
    height: 30px;
    border: 1px solid #d6e4e1;
    border-radius: 999px;
    background: #ffffff;
    color: var(--muted);
    cursor: pointer;
    font-weight: 800;
}

.column-reorder-actions button:hover {
    border-color: #9fcfc4;
    color: var(--primary-dark);
}

.column-completion-check {
    display: flex !important;
    align-items: center;
    gap: 7px !important;
    color: var(--text) !important;
    font-size: 12px !important;
    text-transform: none !important;
}

.column-count,
.column-status {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.column-create-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    align-items: end;
    gap: 10px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.column-create-form label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.column-dialog {
    width: min(460px, calc(100vw - 32px));
    border: 0;
    border-radius: var(--radius-lg);
    background: transparent;
    padding: 0;
}

.column-dialog::backdrop {
    background: rgba(11, 23, 32, 0.32);
}

.column-dialog-panel {
    display: grid;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow);
    padding: 18px;
}

.column-dialog-panel header,
.column-dialog-panel footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.column-dialog-panel h2 {
    margin: 2px 0 0;
    color: var(--text);
    font-size: 18px;
}

.column-dialog-panel label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.column-dialog-panel input[type='text'],
.column-dialog-panel select {
    height: 40px;
    width: 100%;
}

.column-dialog-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.column-dialog-check {
    display: flex !important;
    align-items: center;
    gap: 8px !important;
    color: var(--text) !important;
}

.column-delete-warning {
    border-radius: var(--radius-md);
    background: #fff7e6;
    color: #8a5a00 !important;
    font-weight: 750;
    padding: 9px 10px;
}

.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--danger);
    color: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 850;
    padding: 0 14px;
}

.danger-button:hover {
    filter: brightness(0.96);
}

.archived-task-list {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.archived-filter-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
    margin-bottom: 14px;
    padding: 14px;
}

.archived-filter-form {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) minmax(180px, 0.7fr) minmax(180px, 0.7fr) auto;
    align-items: end;
    gap: 12px;
}

.archived-search-field {
    min-width: 0;
}

.archived-task-list table {
    width: 100%;
    border-collapse: collapse;
}

.archived-task-list th,
.archived-task-list td {
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
    text-align: left;
    vertical-align: middle;
}

.archived-task-list th {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.archived-task-list td {
    color: var(--text);
    font-size: 13px;
}

.archived-task-list td span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.archived-task-row--leaving {
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.archived-action-note {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.danger-link {
    border: 0;
    background: transparent;
    color: var(--danger);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    padding: 8px 10px;
}

.task-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
}

.task-modal[hidden] {
    display: none;
}

.task-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 23, 32, 0.46);
}

.task-modal-panel {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 18px;
    width: min(100%, 720px);
    max-height: min(780px, calc(100vh - 48px));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(11, 23, 32, 0.2);
    overflow-y: auto;
    padding: 22px;
}

.task-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.task-modal-header h2 {
    margin: 2px 0 0;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease;
}

.icon-button:hover {
    background: #eef5f2;
    color: var(--primary-dark);
}

.icon-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

.task-form textarea {
    min-height: 128px;
}

.task-origin-box {
    border: 1px solid #dcece7;
    border-radius: var(--radius-md);
    background: #f7fbfa;
    padding: 12px;
}

.task-origin-box dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin: 8px 0 0;
}

.task-origin-box dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.task-origin-box dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.task-history {
    border: 1px solid #e2ebe8;
    border-radius: var(--radius-md);
    background: #ffffff;
    padding: 10px 12px;
}

.task-history summary {
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.task-history-note {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.task-history-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.task-history-item {
    border-left: 2px solid #cfe5de;
    padding-left: 10px;
}

.task-history-item time {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.task-history-item p,
.task-history-empty {
    margin: 2px 0 0;
    color: var(--text);
    font-size: 13px;
    line-height: 1.4;
}

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

.task-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #eef2f1;
    padding-top: 16px;
}

.companies-panel,
.company-detail-card,
.company-edit-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.companies-panel {
    display: grid;
    gap: 0;
    overflow: hidden;
}

.companies-panel .search-form {
    border-bottom: 1px solid #eef2f1;
    padding: 16px;
}

.companies-table-wrap {
    overflow-x: auto;
}

.companies-table {
    width: 100%;
    border-collapse: collapse;
}

.companies-table th,
.companies-table td {
    border-bottom: 1px solid #eef2f1;
    padding: 14px 16px;
    text-align: left;
    vertical-align: middle;
}

.companies-table th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.companies-table td {
    color: var(--text);
    font-size: 14px;
}

.companies-table tr:last-child td {
    border-bottom: 0;
}

.company-name-link {
    display: grid;
    gap: 2px;
    min-width: 220px;
}

.company-name-link strong {
    color: var(--text);
    font-weight: 700;
}

.company-name-link span {
    color: var(--muted);
    font-size: 13px;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 9px;
}

.status-chip.active {
    background: #e7f4f1;
    color: var(--primary-dark);
}

.status-chip.inactive {
    background: #eef2f1;
    color: #52615f;
}

.company-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
}

.company-modal[hidden] {
    display: none;
}

.company-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 23, 32, 0.46);
}

.company-modal-panel {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 18px;
    width: min(100%, 720px);
    max-height: min(760px, calc(100vh - 48px));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(11, 23, 32, 0.2);
    overflow-y: auto;
    padding: 22px;
}

.company-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.company-modal-header h2 {
    margin: 2px 0 0;
}

.company-form {
    display: grid;
    gap: 14px;
}

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

.company-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #eef2f1;
    padding-top: 16px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}

.company-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
    gap: 18px;
    margin-bottom: 18px;
}

.company-detail-card,
.company-edit-card {
    padding: 22px;
}

.company-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 16px 0 0;
}

.company-facts div,
.tax-history div {
    display: grid;
    gap: 3px;
}

.company-facts dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.company-facts dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.current-regime {
    display: grid;
    gap: 4px;
    margin-top: 14px;
    border-radius: var(--radius-md);
    background: #f7fbfa;
    padding: 13px;
}

.current-regime strong {
    color: var(--text);
}

.current-regime span,
.tax-history span {
    color: var(--muted);
    font-size: 13px;
}

.tax-history {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    border-top: 1px solid #eef2f1;
    padding-top: 14px;
}

.tax-history strong {
    font-size: 14px;
}

.company-obligations-section {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
}

.company-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.company-section-header h2 {
    margin: 3px 0 0;
}

.company-obligations-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 18px;
}

.company-task-flow-card,
.company-generation-result {
    display: grid;
    gap: 16px;
}

.company-task-flow-card > div > p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

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

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

.company-task-flow-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.company-task-flow-columns h4 {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.company-competence-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px;
    gap: 8px;
}

.company-generation-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.company-generation-stats span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #dfe8e5;
    border-radius: 999px;
    background: #f8fbfa;
    color: var(--muted);
    font-size: 12px;
    padding: 6px 10px;
}

.company-generation-stats strong {
    color: var(--hm-primary);
}

.company-generation-details {
    display: grid;
    gap: 8px;
}

.company-generation-details p {
    display: grid;
    gap: 3px;
    margin: 0;
    border-left: 3px solid #dfe8e5;
    padding-left: 10px;
    color: var(--muted);
    font-size: 13px;
}

.company-generation-details strong {
    color: var(--text);
}

.company-detail-card h3 {
    margin: 0 0 12px;
    font-size: 16px;
}

.company-detail-card > p {
    color: var(--muted);
    margin: 0 0 14px;
}

.company-obligation-list,
.company-suggestion-list {
    display: grid;
    gap: 10px;
}

.company-obligation-card,
.company-suggestion-item {
    border: 1px solid #e6ecea;
    border-radius: var(--radius-md);
    background: #fbfdfd;
}

.company-obligation-card {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    position: relative;
}

.company-obligation-card.is-inactive {
    background: #f8fbfa;
}

.company-obligation-topline,
.company-obligation-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.company-obligation-topline > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.company-obligation-topline strong {
    color: var(--text);
    font-size: 15px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.company-obligation-topline span,
.company-obligation-meta {
    color: var(--muted);
    font-size: 13px;
}

.company-obligation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    line-height: 1.35;
    min-width: 0;
}

.company-obligation-meta span {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.company-obligation-status-note {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.company-obligation-footer .task-assignee {
    margin: 0;
    min-width: 0;
}

.company-obligation-footer .task-assignee strong {
    overflow-wrap: anywhere;
}

.company-obligation-menu {
    position: relative;
    flex: 0 0 auto;
}

.company-obligation-menu-button {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 0;
}

.company-obligation-menu-button:hover,
.company-obligation-menu-button:focus-visible,
.company-obligation-menu.is-open .company-obligation-menu-button {
    border-color: #dfe8e5;
    background: #f4faf8;
    color: var(--hm-primary);
    outline: none;
}

.company-obligation-menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 20;
    display: grid;
    max-width: min(220px, calc(100vw - 32px));
    min-width: 156px;
    overflow: hidden;
    border: 1px solid #dfe8e5;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(20, 33, 31, .12);
    padding: 5px;
}

.company-obligation-menu-panel[hidden] {
    display: none;
}

.company-obligation-menu-panel a,
.company-obligation-menu-panel button {
    display: flex;
    width: 100%;
    align-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    padding: 9px 10px;
    text-align: left;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
}

.company-obligation-menu-panel a:hover,
.company-obligation-menu-panel button:hover,
.company-obligation-menu-panel a:focus-visible,
.company-obligation-menu-panel button:focus-visible {
    background: #f4faf8;
    outline: none;
}

.company-obligation-menu-panel .danger-link {
    color: var(--danger);
    padding: 9px 10px;
}

.company-obligation-menu-panel form {
    margin: 0;
}

.company-obligation-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.company-obligation-actions form {
    margin: 0;
}

.company-obligation-actions .secondary-button,
.company-obligation-actions .secondary-link {
    min-height: 34px;
    padding: 7px 11px;
}

.company-obligation-actions.compact {
    justify-content: flex-start;
    margin-top: 8px;
}

.company-suggestions-form {
    display: grid;
    gap: 14px;
}

.company-suggestion-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    cursor: pointer;
    padding: 12px;
}

.company-suggestion-item input {
    margin-top: 3px;
}

.company-suggestion-item.is-warning {
    opacity: .72;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--hm-primary);
    margin-top: 6px;
}

.company-suggestion-item span {
    display: grid;
    gap: 4px;
}

.company-suggestion-item small {
    color: var(--muted);
    line-height: 1.45;
}

.ended-obligations {
    background: #fbfdfd;
}

.company-obligation-edit-card {
    max-width: 860px;
}

.recurring-generation-card {
    max-width: 760px;
}

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

.task-generation-grid {
    display: grid;
    grid-template-columns: minmax(120px, 180px) minmax(120px, 180px);
    gap: 14px;
}

.recurring-generation-result {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

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

.generation-result-grid div {
    border: 1px solid #e6ecea;
    border-radius: var(--radius-md);
    background: #fbfdfd;
    padding: 12px;
}

.generation-result-grid strong {
    display: block;
    color: var(--text);
    font-size: 22px;
}

.generation-result-grid span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.company-edit-card header {
    margin-bottom: 16px;
}

.company-regime-edit {
    display: grid;
    gap: 12px;
    border-top: 1px solid #eef2f1;
    margin-top: 4px;
    padding-top: 16px;
}

.company-regime-edit h3 {
    margin-bottom: 0;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.admin-tabs a {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    color: #344054;
    padding: 9px 14px;
}

.admin-tabs a.active {
    border-color: var(--primary);
    color: var(--primary-dark);
}

.admin-filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(160px, 220px)) auto;
    align-items: end;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(11, 23, 32, 0.045);
    margin-bottom: 16px;
    padding: 14px;
}

.obligation-form {
    display: grid;
    gap: 16px;
    max-width: 860px;
}

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

.checkbox-group {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    margin: 0 0 12px;
    padding: 12px;
}

.checkbox-group legend {
    color: #344054;
    font-weight: 800;
    padding: 0 4px;
}

.table-wrap {
    overflow-x: auto;
}

.table-wrap small {
    display: block;
    color: var(--muted);
    margin-top: 6px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
}

th {
    color: #475467;
    font-size: 14px;
}

tr:last-child td {
    border-bottom: 0;
}

.actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-form,
.compose-form,
.access-list {
    max-width: 620px;
    padding: 22px;
}

.mailbox-wizard {
    display: grid;
    gap: 16px;
    max-width: 860px;
}

.wizard-step {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 22px;
}

.wizard-step > div {
    display: grid;
    gap: 12px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
}

.hint,
.credential-status {
    margin-bottom: 0;
    color: var(--muted);
}

.new-department-field {
    display: grid;
    gap: 8px;
    margin-top: 2px;
}

.new-department-field[hidden] {
    display: none;
}

.signature-preview-button {
    justify-self: start;
}

.signature-image-preview {
    display: grid;
    gap: 10px;
    justify-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    padding: 14px;
}

.signature-image-preview span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.signature-image-preview img {
    display: block;
    max-width: min(100%, 560px);
    height: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.signature-image-preview.is-empty {
    border-style: dashed;
}

.signature-advanced {
    display: grid;
    gap: 12px;
}

.signature-advanced summary {
    cursor: pointer;
    color: var(--primary-dark);
    font-weight: 800;
}

.signature-advanced[open] {
    gap: 12px;
}

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

.signature-preview strong {
    color: var(--text);
    font-size: 14px;
}

.signature-preview iframe {
    width: 100%;
    min-height: 180px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.review-grid {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8fafc;
    padding: 12px;
}

.review-grid span {
    color: var(--muted);
    font-weight: 700;
}

.compose-form {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.compose-form.is-sending {
    pointer-events: none;
}

.primary-button:disabled,
.secondary-button:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.readonly-field {
    display: grid;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8fafc;
    padding: 12px;
}

.readonly-field span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.readonly-field small {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.tracking-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
    gap: 10px;
    border: 1px solid #d8e4e1;
    border-radius: var(--radius-md);
    background: #f8fbfa;
    color: var(--text);
    padding: 11px 12px;
}

.tracking-option input {
    margin-top: 3px;
}

.tracking-option span {
    display: grid;
    gap: 3px;
}

.tracking-option strong {
    color: var(--text);
    font-size: 13px;
}

.tracking-option small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.tracking-option-inline {
    margin-top: 2px;
}

.send-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    background: rgba(15, 37, 32, 0.34);
    padding: 20px;
}

.send-modal[hidden] {
    display: none;
}

.send-modal-card {
    width: min(100%, 390px);
    border: 1px solid rgba(190, 216, 208, 0.86);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(17, 54, 45, 0.2);
    padding: 28px;
    text-align: center;
}

.send-modal-status {
    display: grid;
    justify-items: center;
    gap: 14px;
}

.send-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: #e4f6f1;
    color: var(--primary-dark);
    font-size: 18px;
    font-weight: 900;
}

.send-modal-icon.sending {
    animation: sendPulse 1300ms ease-in-out infinite;
}

.send-modal.is-success .send-modal-icon {
    background: var(--primary);
    color: #ffffff;
    animation: sendSuccess 420ms ease-out both;
}

.send-modal.is-error .send-modal-icon {
    background: #fff1f0;
    color: var(--danger);
}

.send-modal-card h2 {
    margin: 0;
    color: var(--text);
    font-size: 22px;
    line-height: 1.25;
}

.send-modal-card p {
    max-width: 290px;
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.send-progress {
    position: relative;
    overflow: hidden;
    width: min(100%, 260px);
    height: 7px;
    border-radius: 999px;
    background: #edf3f1;
}

.send-progress span {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -45%;
    width: 45%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(23, 145, 114, 0.15), var(--primary), rgba(23, 145, 114, 0.15));
    animation: sendIndeterminate 1100ms ease-in-out infinite;
}

.send-modal-close {
    margin-top: 2px;
}

@keyframes sendIndeterminate {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(330%);
    }
}

@keyframes sendPulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(23, 145, 114, 0.18);
    }

    50% {
        transform: scale(1.04);
        box-shadow: 0 0 0 8px rgba(23, 145, 114, 0.08);
    }
}

@keyframes sendSuccess {
    0% {
        transform: scale(0.82);
    }

    70% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .workspace::before,
    .workspace::after,
    .send-modal-icon.sending,
    .send-modal.is-success .send-modal-icon,
    .task-card--arriving,
    .mine-task-card--section-enter,
    .mine-task-advance-button[aria-busy="true"]::before,
    .send-progress span {
        animation: none;
    }

    .mine-task-card,
    .mine-task-section-header::before {
        transition: none;
    }
}

.checkbox-row,
.access-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
}

.checkbox-row input,
.access-item input {
    margin-top: 5px;
}

.access-item {
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.access-item:last-of-type {
    border-bottom: 0;
}

.access-item small {
    display: block;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.error-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

@media (max-width: 1180px) {
    .task-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .task-competence-field {
        grid-column: 1 / -1;
    }

    .task-filter-actions {
        justify-content: flex-start;
    }

    .column-manager-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .column-completion-check,
    .column-count,
    .column-status,
    .column-row-actions {
        grid-column: 2;
    }
}

@media (max-width: 860px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--hm-sidebar-line);
        min-height: auto;
        overflow: visible;
    }

    .sidebar-nav {
        flex: initial;
        gap: 16px;
        overflow: visible;
        padding-right: 0;
    }

    .sidebar-footer {
        margin-top: 0;
    }

    .workspace {
        padding: 20px;
    }

    .workspace-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .conversation-header {
        align-items: flex-start;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .conversation-header-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        width: 100%;
    }

    .conversation-contact-card {
        align-items: flex-start;
    }

    .message-row {
        grid-template-columns: 1fr;
    }

    .message-preview {
        grid-column: auto;
    }

    .conversation-row {
        padding: 14px 18px;
    }

    .conversation-link {
        gap: 12px;
    }

    .conversation-bottomline,
    .conversation-topline {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .conversation-meta {
        align-self: flex-start;
    }

    .mailbox-view {
        min-height: 420px;
    }

    .profile-panel {
        grid-template-columns: 1fr;
    }

    .tasks-header {
        align-items: flex-start;
    }

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

    .task-competence-field {
        grid-column: 1 / -1;
    }

    .task-filter-actions {
        justify-content: flex-start;
    }

    .tasks-header-actions {
        justify-content: flex-start;
    }

    .column-manager > header {
        align-items: flex-start;
        flex-direction: column;
    }

    .kanban-board {
        grid-auto-columns: minmax(260px, 82vw);
        min-height: 460px;
    }

    .task-form-grid {
        grid-template-columns: 1fr;
    }

    .task-origin-box dl,
    .task-generation-grid,
    .generation-result-grid {
        grid-template-columns: 1fr;
    }

    .company-detail-grid,
    .company-obligations-grid,
    .company-task-flow-grid,
    .company-task-flow-columns,
    .company-form-grid,
    .company-facts,
    .obligation-grid {
        grid-template-columns: 1fr;
    }

    .company-competence-group {
        grid-template-columns: 1fr;
    }

    .admin-filter-bar {
        grid-template-columns: 1fr;
    }

    .email-message-header {
        align-items: flex-start;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .email-message-header time {
        grid-column: 2;
        white-space: normal;
    }

    .reply-form {
        margin: 0 18px 18px;
    }

    .reply-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .search-icon {
        display: none;
    }

    .wizard-step {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .login-panel,
    .workspace,
    .mailbox-heading,
    .conversation-header,
    .empty-state,
    .message-body,
    .message-meta,
    .conversation-thread,
    .wizard-step,
    .admin-form,
    .compose-form,
    .access-list,
    .profile-avatar-card,
    .profile-details {
        padding: 18px;
    }

    h1 {
        font-size: 24px;
    }

    th,
    td {
        padding: 12px;
    }

    .conversation-header-main h1 {
        font-size: 22px;
    }

    .conversation-header-avatar {
        width: 46px;
        height: 46px;
    }

    .task-modal {
        padding: 12px;
    }

    .task-filter-mainbar,
    .task-filter-grid,
    .task-competence-field div {
        grid-template-columns: 1fr;
    }

    .task-filter-compact-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .task-filter-popover,
    .task-legend-details .task-visual-legend {
        position: static;
        width: 100%;
        margin-top: 8px;
    }

    .task-filter-details summary,
    .task-legend-details summary,
    .task-filter-search-button {
        width: 100%;
    }

    .task-deadline-summary {
        display: grid;
        grid-template-columns: 1fr;
    }

    .mine-task-toolbar-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .mine-task-toolbar-meta {
        justify-content: space-between;
        width: 100%;
        white-space: normal;
    }

    .mine-task-filter-primary,
    .mine-task-filter-form {
        grid-template-columns: 1fr;
    }

    .mine-filter-details summary,
    .mine-task-filter-primary .secondary-button,
    .mine-task-filter-primary .task-filter-clear {
        width: 100%;
    }

    .mine-filter-panel {
        position: static;
        width: 100%;
        margin-top: 8px;
    }

    .mine-task-card {
        grid-template-columns: 1fr;
    }

    .mine-task-advance-form {
        justify-self: start;
    }

    .archived-filter-form {
        grid-template-columns: 1fr;
    }

    .tasks-header-actions,
    .column-create-form,
    .column-manager-row {
        grid-template-columns: 1fr;
    }

    .tasks-header-actions {
        align-items: stretch;
        display: grid;
        width: 100%;
    }

    .column-completion-check,
    .column-count,
    .column-status,
    .column-row-actions {
        grid-column: auto;
    }

    .archived-task-list {
        overflow-x: auto;
    }

    .task-modal-panel {
        max-height: calc(100vh - 24px);
        padding: 18px;
    }

    .company-modal {
        padding: 12px;
    }

    .company-modal-panel {
        max-height: calc(100vh - 24px);
        padding: 18px;
    }

    .task-modal-actions,
    .company-modal-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .message-avatar {
        width: 32px;
        height: 32px;
    }

    .attachment-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .attachment-download {
        grid-column: 2;
        justify-self: start;
    }
}
