@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
    color-scheme: light;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #cbd5e1;
    --panel: rgba(255, 255, 255, 0.94);
    --soft: #f8fafc;
    --accent: #14b8a6;
    --accent-dark: #0f766e;
    --warn: #92400e;
    --danger: #be123c;
    --info: #155e75;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
    font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.4;
    font-weight: 400;
    font-size: 15px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: #f1f5f9;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    min-height: 100vh;
    background: linear-gradient(180deg, #eaf6fb 0%, #f5f8fb 100%);
}

.loading-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #f1f5f9;
}

.loading-card,
.login-card,
.login-hero,
.panel-card,
.filter-card,
.modal-card,
.empty-card {
    background: var(--panel);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 0.8rem;
    box-shadow: var(--shadow);
}

.loading-card {
    padding: 20px 24px;
    color: var(--muted);
}

.btn,
.icon-button {
    border: 0;
    border-radius: 0.8rem;
    padding: 0.6rem 0.85rem;
    font-weight: 700;
    min-height: 2.55rem;
}

.btn-sm {
    padding: 0.48rem 0.68rem;
    min-height: 2.15rem;
    font-size: 0.9rem;
}

.btn-dark {
    background: #020617;
    color: #fff;
}

.btn-accent {
    background: var(--accent);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-outline {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

.disabled-link {
    pointer-events: none;
    opacity: 0.55;
}

.danger {
    background: #ffe4e6;
    color: var(--danger);
}

.logout-button {
    display: inline-grid;
    place-items: center;
    width: 40px;
    min-width: 40px;
    padding: 0;
}

.logout-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.close-button {
    display: inline-grid;
    place-items: center;
    width: 2.35rem;
    min-width: 2.35rem;
    height: 2.35rem;
    min-height: 2.35rem;
    padding: 0;
    border: 1px solid rgba(190, 18, 60, 0.28);
    background: #ffe4e6;
    color: var(--danger);
}

.close-button svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.close-button:hover {
    border-color: rgba(190, 18, 60, 0.45);
    background: #fecdd3;
    color: #9f1239;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.eyebrow.light {
    color: #cffafe;
}

.eyebrow.dark {
    color: var(--accent-dark);
}

.login-shell {
    display: grid;
    place-items: center;
    padding: 1.75rem;
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.12), transparent 22rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 24rem),
        linear-gradient(180deg, #eff7fb 0%, #f8fbfd 52%, #eef3f8 100%);
}

.login-layout {
    width: min(1100px, 100%);
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1rem;
}

.login-hero {
    padding: 2.15rem;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(103, 232, 249, 0.2), transparent 18rem),
        radial-gradient(circle at bottom left, rgba(45, 212, 191, 0.12), transparent 16rem),
        linear-gradient(160deg, rgba(10, 132, 156, 0.96), rgba(15, 23, 42, 0.98) 72%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.22);
}

.login-hero-top,
.projects-header,
.panel-title-row,
.drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.login-hero h1 {
    max-width: 680px;
    margin: 24px 0 14px;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.03;
}

.login-hero p {
    max-width: 620px;
    color: rgba(241, 245, 249, 0.92);
    line-height: 1.65;
}

.login-hero-badge,
.pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 0.38rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 800;
}

.login-hero-badge {
    background: rgba(255, 255, 255, 0.14);
}

.login-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 34px;
}

.login-hero-stats div {
    padding: 1rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.12);
}

.login-hero-stats span,
.stat-card span,
.topbar-user span,
.drawer-meta span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.login-hero-stats span {
    color: #bdeee5;
}

.login-card {
    padding: 1.75rem;
    align-self: center;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(203, 213, 225, 0.9);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.1);
}

.section-header h2,
.panel-card h3,
.filter-card h3 {
    margin: 0 0 6px;
}

.section-header p,
.panel-card p,
.filter-card p {
    margin: 0;
    color: var(--muted);
}

.stack-form {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.field {
    display: grid;
    gap: 7px;
}

.field span {
    color: #344054;
    font-size: 0.88rem;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.8rem;
    padding: 0.6rem 0.75rem;
    color: var(--ink);
    background: #fff;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.table-input {
    min-width: 7.5rem;
    padding: 0.45rem 0.55rem;
    border-radius: 0.55rem;
}

.table-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 800;
    color: #344054;
}

.table-check input {
    width: 1rem;
    height: 1rem;
}

textarea {
    resize: vertical;
}

.file-field small,
.file-field a {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.file-field a {
    color: #0f766e;
}

.file-link,
.file-preview {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 100%;
    min-width: 0;
    line-height: 1.2;
}

.file-link span:last-child,
.file-preview span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-icon {
    display: inline-grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    flex: 0 0 1.45rem;
    border-radius: 0.45rem;
    background: #e2e8f0;
    color: #475569;
}

.file-icon svg {
    width: 0.98rem;
    height: 0.98rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.file-pdf .file-icon {
    background: #ffe4e6;
    color: #be123c;
}

.file-doc .file-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.file-sheet .file-icon {
    background: #dcfce7;
    color: #15803d;
}

.file-image .file-icon {
    background: #fef3c7;
    color: #92400e;
}

.field-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.error-banner {
    margin: 0;
    padding: 0.65rem 0.8rem;
    border-radius: 0.8rem;
    color: var(--danger);
    background: #ffe4e6;
    font-weight: 700;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.85rem;
    width: min(1680px, 100%);
    margin: 0 auto;
    padding: 1rem;
    align-items: start;
}

.topbar-card {
    position: sticky;
    top: 1rem;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.9rem;
    background: rgba(2, 6, 23, 0.96);
    color: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(16px);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 12rem;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.75rem;
    background: #14b8a6;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.topbar-brand .eyebrow {
    margin-bottom: 0.1rem;
    font-size: 0.68rem;
}

.topbar-brand h1 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.1;
}

.top-nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    min-width: 0;
    flex: 1 1 auto;
}

.bottom-nav-list {
    display: none;
}

.top-nav-link {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.5rem;
    border-radius: 0.75rem;
    padding: 0.58rem 0.72rem;
    border: 0;
    color: #dbe7f2;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.top-nav-group {
    position: relative;
}

.top-nav-group summary {
    list-style: none;
}

.top-nav-group summary::-webkit-details-marker {
    display: none;
}

.top-nav-chevron {
    display: inline-grid;
    place-items: center;
    width: 0.95rem;
    height: 0.95rem;
    color: #94a3b8;
    transition: transform 160ms ease;
}

.top-nav-chevron svg {
    width: 0.95rem;
    height: 0.95rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.top-nav-group[open] .top-nav-chevron {
    transform: rotate(180deg);
}

.top-nav-dropdown {
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 0;
    z-index: 60;
    display: grid;
    gap: 0.3rem;
    width: 16rem;
    padding: 0.45rem;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 0.8rem;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.28);
}

.top-nav-dropdown-link {
    display: grid;
    gap: 0.12rem;
    padding: 0.62rem 0.7rem;
    border-radius: 0.62rem;
    color: #f8fafc;
    text-decoration: none;
}

.top-nav-dropdown-link span {
    font-size: 0.88rem;
    font-weight: 900;
}

.top-nav-dropdown-link small {
    color: #94a3b8;
    font-size: 0.76rem;
    font-weight: 750;
}

.top-nav-dropdown-link:hover,
.top-nav-dropdown-link.active {
    background: rgba(255, 255, 255, 0.1);
}

.top-nav-dropdown-link:hover small,
.top-nav-dropdown-link.active small {
    color: #cbd5e1;
}

.top-nav-icon {
    display: inline-grid;
    place-items: center;
    width: 1.1rem;
    height: 1.1rem;
    color: #94a3b8;
    flex: 0 0 1.1rem;
}

.top-nav-icon svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.top-nav-link.active,
.top-nav-link:hover,
.top-nav-group[open] > .top-nav-link,
.top-nav-group:has(.top-nav-dropdown-link.active) > .top-nav-link {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.top-nav-link.active .top-nav-icon,
.top-nav-link:hover .top-nav-icon,
.top-nav-group[open] > .top-nav-link .top-nav-icon,
.top-nav-group:has(.top-nav-dropdown-link.active) > .top-nav-link .top-nav-icon {
    color: #fff;
}

.topbar-user {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    min-width: 11rem;
}

.topbar-user span {
    color: #cbd5e1;
}

.profile-link {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
    color: #fff;
    text-decoration: none;
    border-radius: 0.7rem;
    padding: 0.42rem 0.55rem;
}

.profile-link:hover,
.profile-link.active {
    background: rgba(255, 255, 255, 0.08);
}

.profile-link strong,
.profile-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-shell {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
}

.panel-card,
.filter-card {
    min-width: 0;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(226, 232, 240, 0.95);
}

.main-content {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 0.8rem;
    box-shadow: var(--shadow);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.profile-shell {
    display: grid;
    gap: 0.75rem;
}

.profile-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    min-height: 7.6rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 0.95rem;
    background:
        radial-gradient(circle at 96% 8%, rgba(20, 184, 166, 0.2), transparent 14rem),
        radial-gradient(circle at 2% 100%, rgba(14, 165, 233, 0.12), transparent 16rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    box-shadow: var(--shadow);
}

.profile-hero-main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.profile-avatar {
    display: inline-grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1rem;
    background: #ccfbf1;
    color: #115e59;
    font-weight: 900;
}

.profile-avatar.large {
    width: 3.8rem;
    height: 3.8rem;
    font-size: 1.15rem;
    box-shadow:
        0 0 0 0.38rem rgba(204, 251, 241, 0.48),
        0 18px 40px rgba(15, 118, 110, 0.14);
}

.profile-kicker {
    display: inline-flex;
    margin-bottom: 0.25rem;
    color: #0f766e;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.profile-hero h3 {
    margin: 0 0 0.2rem;
    color: #0f172a;
    font-size: 1.28rem;
    line-height: 1.12;
}

.profile-hero p {
    margin: 0;
    color: var(--muted);
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.5rem;
}

.profile-inline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.profile-inline-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: 0.2rem 0.48rem;
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #475569;
    font-size: 0.76rem;
    font-weight: 850;
}

.profile-hero-meta {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.6rem;
    min-width: 12.2rem;
    padding: 0.7rem;
    border: 1px solid rgba(203, 213, 225, 0.86);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.profile-meta-icon,
.profile-card-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 0.7rem;
}

.profile-meta-icon {
    width: 2.1rem;
    height: 2.1rem;
    background: #e0f2fe;
    color: #0369a1;
}

.profile-meta-icon svg,
.profile-card-icon svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-hero-meta span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.profile-hero-meta strong {
    display: block;
    margin-top: 0.25rem;
    color: #0f172a;
    font-size: 1rem;
}

.profile-hero-meta small {
    color: var(--muted);
    font-weight: 700;
}

.profile-account-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(20, 184, 166, 0.1), transparent 16rem),
        #fff;
}

.profile-security-card {
    display: grid;
    gap: 0.7rem;
    align-content: start;
    padding: 0.9rem 1rem;
}

.profile-security-card {
    background: transparent;
}

.account-password-card {
    border-right: 1px solid rgba(226, 232, 240, 0.9);
}

.profile-card-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
}

.profile-card-icon {
    width: 2.15rem;
    height: 2.15rem;
    background: #e0f2fe;
    color: #0369a1;
}

.profile-card-icon.secure {
    background: #ccfbf1;
    color: #0f766e;
}

.profile-card-icon.account {
    background: #e0f2fe;
    color: #0369a1;
}

.profile-card-head h3 {
    margin: 0 0 0.18rem;
    color: #0f172a;
    font-size: 0.98rem;
}

.profile-card-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.25;
}

.profile-password-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: end;
    gap: 0.55rem;
    width: 100%;
    margin-top: 0;
    padding-top: 0.1rem;
}

.profile-password-form .message-actions {
    grid-column: 1 / -1;
    align-items: center;
}

.profile-password-form .btn {
    min-width: 9rem;
}

.secure-field-form {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid #e2e8f0;
}

.stat-card {
    border-radius: 0.8rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 2rem;
}

.stat-card.dark {
    border-top: 4px solid #020617;
}

.stat-card.warn {
    border-top: 4px solid var(--warn);
}

.stat-card.info {
    border-top: 4px solid var(--info);
}

.stat-card.muted {
    border-top: 4px solid #98a2b3;
}

.warn-soft {
    background: #fff7ed;
}

.info-soft {
    background: #ecfeff;
}

.filter-grid,
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.history-filter-grid {
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(120px, 0.4fr) auto;
    align-items: end;
}

.workflow-filter-grid {
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.8fr) minmax(150px, 0.55fr) minmax(150px, 0.55fr) auto;
    align-items: end;
}

.workflow-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.workflow-stats-grid .stat-card {
    min-width: 0;
}

.stat-breakdown {
    display: grid;
    gap: 0.35rem;
    max-height: 10.5rem;
    margin-top: 0.75rem;
    overflow: auto;
}

.stat-breakdown div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 0.3rem;
}

.stat-breakdown div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.stat-breakdown span {
    min-width: 0;
    overflow: hidden;
    color: #344054;
    font-size: 0.78rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stat-breakdown strong {
    flex: 0 0 auto;
    display: inline;
    margin-top: 0;
    color: var(--ink);
    font-size: 0.9rem;
    line-height: 1;
}

.followup-filter-grid {
    grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.9fr) minmax(180px, 0.9fr) minmax(160px, 0.8fr) auto;
    align-items: end;
}

.invoice-filter-grid {
    grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.9fr) minmax(150px, 0.7fr) auto;
    align-items: end;
}

.history-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.table-summary {
    margin-bottom: 0.65rem;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.compact-table th,
.compact-table td {
    padding: 0.48rem 0.55rem;
    font-size: 0.84rem;
    vertical-align: middle;
}

.compact-stack {
    gap: 0.1rem;
}

.workflow-inline-cell {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: max-content;
    white-space: nowrap;
}

.workflow-inline-cell strong,
.workflow-inline-cell span,
.workflow-inline-cell a {
    white-space: nowrap;
}

.history-table th:nth-child(1),
.history-table td:nth-child(1) {
    min-width: 145px;
}

.history-table th:nth-child(6),
.history-table td:nth-child(6) {
    min-width: 260px;
    max-width: 420px;
}

.history-note {
    display: block;
    max-width: min(420px, 48vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.developer-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.7fr) minmax(0, 1.3fr);
    gap: 16px;
}

.developer-panel {
    max-width: 520px;
}

.settings-layout {
    display: grid;
    grid-template-columns: minmax(190px, 0.24fr) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.settings-menu {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    padding: 0.65rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.settings-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 2.6rem;
    border: 0;
    border-radius: 0.65rem;
    padding: 0.55rem 0.65rem;
    background: transparent;
    color: #334155;
    font-weight: 800;
    text-align: left;
}

.settings-menu-item.active,
.settings-menu-item:hover {
    background: #ccfbf1;
    color: #115e59;
}

.settings-menu-icon {
    display: inline-grid;
    place-items: center;
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 1.1rem;
}

.settings-menu-icon svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.settings-panel {
    min-width: 0;
}

.settings-panel-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

.sql-editor {
    width: 100%;
    min-height: 220px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    resize: vertical;
}

.query-result {
    margin-top: 16px;
}

.panel-title-row.compact {
    margin-bottom: 8px;
}

.hint-text {
    color: var(--muted);
    font-size: 0.9rem;
}

.success-banner {
    margin: 0 0 12px;
    padding: 0.8rem 1rem;
    border-radius: 0.75rem;
    background: #ecfdf5;
    color: #047857;
    font-weight: 700;
}

.toast-region {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 4000;
    display: grid;
    gap: 0.65rem;
    width: min(380px, calc(100vw - 2rem));
    pointer-events: none;
}

.toast-item {
    display: grid;
    grid-template-columns: 1.45rem minmax(0, 1fr) 1.8rem;
    align-items: center;
    gap: 0.65rem;
    padding: 0.8rem 0.85rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.65rem;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
    font-weight: 800;
    pointer-events: auto;
}

.toast-success {
    border-left: 4px solid #16a34a;
}

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-icon {
    display: inline-grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 999px;
    font-size: 0.9rem;
}

.toast-success .toast-icon {
    background: #dcfce7;
    color: #15803d;
}

.toast-error .toast-icon {
    background: #ffe4e6;
    color: var(--danger);
}

.toast-close {
    width: 1.8rem;
    height: 1.8rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.toast-close:hover {
    background: rgba(15, 23, 42, 0.08);
    color: var(--ink);
}

.check-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.check-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: #344054;
}

.check-field input {
    width: 18px;
    height: 18px;
}

.table-wrap {
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - 14rem);
    min-width: 0;
    overflow: auto;
    margin-top: 10px;
    -webkit-overflow-scrolling: touch;
}

.wide-modal {
    max-width: 980px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    box-shadow: inset 0 -1px 0 var(--line);
    color: #64748b;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.table-cell-stack,
.attachment-link-list {
    display: grid;
    gap: 4px;
}

.table-cell-stack strong {
    font-size: 0.92rem;
}

.table-cell-stack span,
.attachment-link-list span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.table-cell-stack a,
.attachment-link-list a {
    color: #0f766e;
    font-size: 0.86rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.row-warning {
    background: #fffbeb;
}

.row-danger {
    background: #fff1f2;
    animation: overdue-blink 1.1s ease-in-out infinite;
}

@keyframes overdue-blink {
    0%,
    100% {
        background: #fff1f2;
    }

    50% {
        background: #fecdd3;
    }
}

.pill.active,
.pill.progress,
.pill.completed {
    background: #ccfbf1;
    color: #115e59;
}

.pill.followup,
.pill.warn,
.pill.submitted,
.pill.toreview {
    background: #fef3c7;
    color: #92400e;
}

.pill.scheduled,
.pill.info {
    background: #cffafe;
    color: #155e75;
}

.pill.renewed {
    background: #ccfbf1;
    color: #115e59;
}

.pill.closed,
.pill.discontinued,
.pill.muted {
    background: #e2e8f0;
    color: #334155;
}

.table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.client-list-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.55rem;
}

.view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    padding: 0.24rem;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 0.75rem;
    background: #f8fafc;
}

.view-toggle-button,
.client-icon-action {
    display: inline-grid;
    place-items: center;
    border: 1px solid transparent;
    background: transparent;
    color: #475569;
}

.view-toggle-button {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 0.58rem;
}

.view-toggle-button.active {
    border-color: rgba(20, 184, 166, 0.34);
    background: #ccfbf1;
    color: #0f766e;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.12);
}

.view-toggle-button svg,
.client-icon-action svg,
.client-avatar svg,
.client-card-meta svg,
.client-contact-strip svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.client-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.client-card {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.85rem;
    border: 1px solid rgba(203, 213, 225, 0.84);
    border-radius: 0.8rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
        #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.client-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.client-card-identity {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    min-width: 0;
}

.client-avatar {
    display: inline-grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 2.35rem;
    border-radius: 0.75rem;
    background: #e0f2fe;
    color: #0369a1;
}

.client-card-identity h4 {
    margin: 0 0 0.16rem;
    color: #0f172a;
    font-size: 0.98rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.client-card-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
}

.client-icon-action {
    width: 2.15rem;
    height: 2.15rem;
    border-color: #e2e8f0;
    border-radius: 0.65rem;
    background: #fff;
}

.client-icon-action:hover,
.view-toggle-button:hover {
    border-color: rgba(15, 118, 110, 0.34);
    color: #0f766e;
}

.client-card-meta,
.client-contact-strip,
.client-card-files,
.client-service-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-width: 0;
}

.client-card-meta span,
.client-contact-strip span,
.client-contact-strip a,
.client-empty-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    min-width: 0;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.2;
}

.client-contact-strip {
    padding: 0.6rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 0.75rem;
    background: #fff;
}

.client-contact-strip a {
    max-width: 100%;
    color: #0f766e;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.client-card-files {
    align-items: center;
}

.client-card-files .file-link {
    max-width: 100%;
    padding: 0.28rem 0.48rem 0.28rem 0.28rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    text-decoration: none;
}

.client-empty-inline {
    min-height: 2rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: #f1f5f9;
}

.client-service-chips {
    align-items: stretch;
}

.service-chip {
    display: grid;
    gap: 0.12rem;
    min-width: 6.6rem;
    max-width: 100%;
    padding: 0.48rem 0.58rem;
    border: 1px solid rgba(20, 184, 166, 0.26);
    border-radius: 0.65rem;
    background: #f0fdfa;
}

.service-chip strong,
.service-chip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-chip strong {
    color: #115e59;
    font-size: 0.76rem;
}

.service-chip span {
    color: #475569;
    font-size: 0.74rem;
    font-weight: 800;
}

.service-chip.inactive {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    border-color: #e2e8f0;
    background: #f8fafc;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.client-service-table {
    width: max-content;
    min-width: 1180px;
}

.client-service-table th,
.client-service-table td {
    min-width: 130px;
    white-space: nowrap;
}

.client-service-table th:nth-child(2),
.client-service-table td:nth-child(2),
.client-service-table th:nth-child(3),
.client-service-table td:nth-child(3) {
    min-width: 210px;
    white-space: normal;
}

.workflow-table {
    width: max-content;
    min-width: 1680px;
}

.workflow-table th,
.workflow-table td {
    min-width: 160px;
    vertical-align: top;
}

.workflow-table th:nth-child(1),
.workflow-table td:nth-child(1),
.workflow-table th:nth-child(2),
.workflow-table td:nth-child(2),
.workflow-table th:nth-child(3),
.workflow-table td:nth-child(3),
.workflow-table th:nth-child(4),
.workflow-table td:nth-child(4),
.workflow-table th:nth-child(5),
.workflow-table td:nth-child(5) {
    min-width: 140px;
}

.followup-card-list {
    display: grid;
    gap: 0.8rem;
    margin-top: 0.85rem;
}

.followup-row-card {
    display: grid;
    gap: 0.8rem;
    padding: 0.85rem;
    border: 1px solid rgba(203, 213, 225, 0.86);
    border-left: 4px solid #94a3b8;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.followup-row-card.tone-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.followup-row-card.tone-danger {
    border-left-color: #e11d48;
    background: #fff1f2;
    animation: overdue-blink 1.1s ease-in-out infinite;
}

.followup-row-main {
    display: grid;
    grid-template-columns: minmax(190px, 0.9fr) minmax(620px, 3.1fr) auto;
    gap: 0.65rem;
    align-items: center;
    min-width: 0;
}

.followup-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}

.followup-client-block {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    min-width: 0;
}

.followup-row-icon,
.action-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 0.7rem;
}

.followup-row-icon {
    width: 2.35rem;
    height: 2.35rem;
    background: #e0f2fe;
    color: #0369a1;
}

.action-icon {
    width: 1.8rem;
    height: 1.8rem;
    background: #f8fafc;
    color: #475569;
}

.followup-row-icon svg,
.action-icon svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.followup-client-block h4 {
    margin: 0 0 0.16rem;
    color: #0f172a;
    font-size: 0.98rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.followup-muted-line {
    display: block;
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.followup-summary-grid {
    display: grid;
    grid-template-columns: minmax(120px, 1.15fr) minmax(72px, 0.6fr) minmax(120px, 0.85fr) minmax(120px, 0.85fr);
    gap: 0.32rem;
    min-width: 0;
}

.followup-summary-item {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    min-width: 0;
    min-height: 2.38rem;
    padding: 0.36rem 0.48rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 0.6rem;
    background: #f8fafc;
}

.summary-icon {
    display: inline-grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    flex: 0 0 1.45rem;
    border-radius: 0.5rem;
    background: #e0f2fe;
    color: #0369a1;
}

.summary-icon svg {
    width: 0.92rem;
    height: 0.92rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.followup-summary-item strong {
    min-width: 0;
    color: #0f172a;
    font-size: 0.84rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-copy {
    display: grid;
    min-width: 0;
    gap: 0.02rem;
}

.summary-copy small {
    color: var(--muted);
    font-size: 0.58rem;
    font-weight: 900;
    line-height: 1;
}

.followup-status-chip .summary-icon {
    background: #dcfce7;
    color: #15803d;
}

.followup-resolve-button {
    border: 1px solid rgba(15, 118, 110, 0.28);
    background: #0f766e;
    color: #fff;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
    white-space: nowrap;
}

.followup-resolve-button:hover {
    background: #115e59;
    color: #fff;
    border-color: #115e59;
}

.followup-action-grid {
    display: grid;
    grid-template-columns: repeat(9, minmax(118px, 1fr));
    gap: 0.48rem;
    align-items: stretch;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 0.1rem;
    -webkit-overflow-scrolling: touch;
}

.followup-action-panel {
    display: grid;
    align-content: start;
    gap: 0.5rem;
    min-width: 118px;
    min-height: 6.4rem;
    padding: 0.58rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 0.72rem;
    background: #fff;
}

.followup-action-head {
    display: flex;
    align-items: flex-start;
    gap: 0.42rem;
    min-width: 0;
}

.followup-action-head h5 {
    margin: 0;
    color: #0f172a;
    font-size: 0.8rem;
    line-height: 1.18;
}

.followup-action-head p,
.followup-status-line {
    margin: 0.12rem 0 0;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
}

.followup-action-head p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.followup-status-line {
    display: block;
}

.request-panel .workflow-buttons {
    gap: 0.32rem;
}

.channel-icon-button,
.compact-command-button,
.compact-attachment-link,
.compact-manage-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    min-width: 2.15rem;
    min-height: 2.15rem;
    border: 1px solid #dbe3ee;
    border-radius: 0.62rem;
    background: #fff;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 900;
    text-decoration: none;
}

.channel-icon-button {
    width: 2.15rem;
    padding: 0;
}

.channel-icon-button svg,
.compact-command-button svg,
.compact-attachment-link svg,
.compact-manage-button svg,
.attachment-picker-icon svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.channel-icon-button:hover,
.compact-command-button:hover,
.compact-attachment-link:hover,
.compact-manage-button:hover {
    border-color: rgba(15, 118, 110, 0.36);
    color: #0f766e;
    background: #f0fdfa;
}

.channel-icon-button.channel-sent {
    border-color: rgba(20, 184, 166, 0.26);
    background: #ccfbf1;
    color: #115e59;
}

.channel-email {
    color: #0f766e;
}

.channel-sms {
    color: #155e75;
}

.channel-whatsapp {
    color: #15803d;
}

.compact-command-button,
.compact-attachment-link {
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    padding: 0.42rem 0.5rem;
}

.compact-command-button span,
.compact-attachment-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-attachment-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem;
    align-items: center;
    min-width: 0;
}

.compact-manage-button {
    min-width: 2.15rem;
    padding: 0 0.5rem;
}

.compact-manage-button span {
    display: none;
}

.approval-panel {
    min-width: 125px;
}

.compact-approval {
    min-height: 2.2rem;
    padding: 0.42rem 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.62rem;
    background: #f8fafc;
}

.approval-pending-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.approval-status-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.approval-status-label.approved {
    color: #0f766e;
}

.approval-summary {
    display: grid;
    gap: 0.28rem;
    min-width: 0;
}

.approval-summary-note {
    min-width: 0;
    color: #334155;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.approval-summary-file {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    min-width: 0;
    max-width: 100%;
    color: #0f766e;
    font-size: 0.74rem;
    font-weight: 900;
    text-decoration: none;
}

.approval-summary-file svg {
    width: 0.88rem;
    height: 0.88rem;
    flex: 0 0 0.88rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.approval-summary-file span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-panel {
    min-width: 128px;
}

.attachment-picker {
    display: grid;
    justify-items: center;
    gap: 0.8rem;
    margin-top: 0.9rem;
    padding: 1.25rem;
    border: 1px dashed #94a3b8;
    border-radius: 0.85rem;
    background: #f8fafc;
    text-align: center;
}

.attachment-picker-icon {
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
    background: #ccfbf1;
    color: #0f766e;
}

.attachment-picker h4 {
    margin: 0;
    font-size: 1rem;
}

.attachment-picker p {
    margin: 0.18rem 0 0;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.attachment-picker input[type="file"] {
    width: min(420px, 100%);
    border-style: solid;
    background: #fff;
}

.attachment-picker-label {
    color: #344054;
    font-size: 0.82rem;
    font-weight: 900;
}

.attachment-current-file {
    display: grid;
    gap: 0.35rem;
    width: min(420px, 100%);
    padding: 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    background: #fff;
    text-align: left;
}

.attachment-current-file > span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.compact-attachment-picker {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: stretch;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.7rem;
    padding: 0.75rem;
    border-radius: 0.68rem;
    text-align: left;
}

.compact-attachment-picker .attachment-picker-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.62rem;
}

.compact-attachment-picker h4 {
    font-size: 0.9rem;
}

.compact-attachment-picker p {
    font-size: 0.78rem;
}

.compact-attachment-picker .attachment-current-file {
    grid-column: 1 / -1;
    width: 100%;
    padding: 0.5rem;
}

.compact-attachment-picker input[type="file"] {
    width: 100%;
    min-width: 0;
    font-size: 0.82rem;
}

.attachment-control-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.attachment-picker-actions {
    margin-top: 0.75rem;
}

.workflow-cell {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.paste-attachment-target {
    border: 1px dashed #cbd5e1;
    border-radius: 0.45rem;
    padding: 0.45rem;
    outline: none;
    transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.paste-attachment-target:focus,
.paste-attachment-target:focus-within {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgb(15 118 110 / 0.14);
}

.paste-attachment-target.is-pasting {
    background: #ccfbf1;
    border-color: #0f766e;
}

.paste-attachment-target.paste-missing {
    background: #fff7ed;
    border-color: #f97316;
}

.clipboard-paste-button {
    justify-self: start;
    min-height: 1.9rem;
    padding: 0.28rem 0.58rem;
    border: 1px solid #dbe3ee;
    border-radius: 0.5rem;
    background: #fff;
    color: #0f766e;
    font-size: 0.76rem;
    font-weight: 900;
    cursor: pointer;
}

.clipboard-paste-button:hover {
    border-color: rgba(15, 118, 110, 0.36);
    background: #f0fdfa;
}

.clipboard-paste-button:disabled {
    cursor: wait;
    opacity: 0.68;
}

.workflow-cell span,
.workflow-cell small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.workflow-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.channel-sent {
    display: inline-flex;
    align-items: center;
    min-height: 1.85rem;
    border-radius: 0.55rem;
    padding: 0.34rem 0.48rem;
    background: #ccfbf1;
    color: #115e59;
    font-size: 0.76rem;
    font-weight: 800;
}

.btn-xs {
    min-height: 1.85rem;
    padding: 0.34rem 0.48rem;
    border-radius: 0.55rem;
    font-size: 0.76rem;
}

.workflow-textarea {
    width: 15rem;
    min-height: 4.5rem;
    padding: 0.48rem 0.55rem;
    border-radius: 0.55rem;
    font-size: 0.86rem;
    resize: vertical;
}

.message-modal {
    width: min(760px, 100%);
}

.attachment-modal {
    width: min(560px, 100%);
}

.message-body {
    min-height: 12rem;
}

.message-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.client-form-page .message-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin: 0 -0.85rem -0.85rem;
    padding: 0.7rem 0.85rem;
    border-top: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 0 0 0.75rem 0.75rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
}

.popup-attention {
    animation: popup-attention 300ms ease;
}

@keyframes popup-attention {
    0% {
        transform: scale(1) translateX(0);
        box-shadow: var(--shadow);
    }

    18% {
        transform: scale(1.004) translateX(-3px);
        box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.1), var(--shadow);
    }

    38% {
        transform: scale(1.004) translateX(3px);
    }

    58% {
        transform: scale(1.004) translateX(-2px);
    }

    78% {
        transform: scale(1.004) translateX(2px);
    }

    100% {
        transform: scale(1) translateX(0);
        box-shadow: var(--shadow);
    }
}

.service-form-grid {
    display: grid;
    gap: 10px;
}

.client-form-route {
    width: 100%;
}

.client-form-hero {
    align-items: center;
}

.client-form-hero-title {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.client-form-hero-icon {
    display: inline-grid;
    place-items: center;
    width: 2.8rem;
    height: 2.8rem;
    flex: 0 0 2.8rem;
    border-radius: 0.8rem;
    background: #ccfbf1;
    color: #0f766e;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.12);
}

.client-form-hero-icon svg {
    width: 1.45rem;
    height: 1.45rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.client-form-hero h3 {
    color: #0f766e;
}

.client-form-page {
    margin-top: 0;
    padding: 0.85rem;
    border-color: rgba(148, 163, 184, 0.42);
    background:
        linear-gradient(180deg, rgba(240, 253, 250, 0.45), rgba(255, 255, 255, 0.98) 12rem),
        #fff;
}

.client-form-page .stack-form {
    gap: 10px;
    margin-top: 0;
}

.client-entry-form {
    gap: 10px;
}

.client-form-compact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}

.client-form-section {
    display: grid;
    position: relative;
    gap: 8px;
    padding: 0.62rem 0.68rem 0.68rem;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-left: 4px solid #14b8a6;
    border-radius: 0.55rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.72), rgba(255, 255, 255, 0.98));
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.035);
}

.company-section {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.tax-section {
    grid-column: 2;
    grid-row: 2;
}

.files-section {
    grid-column: 2;
    grid-row: 1;
}

.client-form-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    border-bottom: 1px solid rgba(20, 184, 166, 0.18);
    padding-bottom: 0.42rem;
    min-height: 2rem;
}

.client-form-section-head h4 {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    margin: 0;
    color: #0f766e;
    font-size: 0.9rem;
    font-weight: 900;
}

.client-form-section-head span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: right;
}

.client-form-section-head h4 > span:last-child {
    color: #0f172a;
    text-align: left;
}

.section-title-icon {
    display: inline-grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    flex: 0 0 1.45rem;
    border-radius: 0.45rem;
    background: #ccfbf1;
    color: #0f766e;
}

.section-title-icon svg {
    width: 0.88rem;
    height: 0.88rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.client-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 8px;
    justify-items: start;
}

.client-details-grid .span-2 {
    grid-column: span 2;
}

.company-section .client-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    justify-items: stretch;
}

.company-section .compact-field {
    grid-column: span 1;
}

.company-section .medium-field {
    grid-column: 1 / -1;
}

.company-section .span-2 {
    grid-column: 1 / -1;
}

.tax-section .client-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: stretch;
}

.client-form-subhead {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.12rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(8, 145, 178, 0.16);
    color: #0f172a;
    font-size: 0.84rem;
    font-weight: 900;
}

.client-form-subhead small {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
}

.tax-auth-block {
    display: grid;
    gap: 8px;
    margin-top: 0.2rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(37, 99, 235, 0.18);
}

.tax-auth-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
}

.tax-auth-head h5 {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    margin: 0;
    color: #0f172a;
    font-size: 0.86rem;
    font-weight: 900;
}

.tax-auth-head > span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-align: right;
}

.tax-auth-block .section-title-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.client-form-subhead .section-title-icon {
    background: #cffafe;
    color: #0e7490;
}

.tax-section {
    border-left-color: #ca8a04;
}

.tax-section .section-title-icon {
    background: #fef3c7;
    color: #a16207;
}

.tax-section .tax-auth-block .section-title-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.files-section {
    border-left-color: #475569;
}

.files-section .section-title-icon {
    background: #e2e8f0;
    color: #334155;
}

.secure-auth-grid {
    align-items: end;
    grid-template-columns: minmax(0, 1fr);
}

.secure-auth-grid .span-2,
.files-section .client-details-grid .span-2 {
    grid-column: span 1;
}

.files-section .client-details-grid,
.tax-auth-block .client-details-grid {
    grid-template-columns: minmax(0, 1fr);
}

.secure-auth-actions,
.secure-auth-summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}

.secure-auth-summary {
    justify-content: space-between;
    min-height: 2.5rem;
}

.client-form-page .form-grid {
    gap: 8px 12px;
    margin-top: 0;
}

.client-entry-form .field {
    gap: 3px;
    width: 100%;
    min-width: 0;
}

.client-entry-form .compact-field {
    max-width: none;
}

.client-entry-form .medium-field {
    max-width: none;
}

.client-entry-form .field span {
    color: #334155;
    font-size: 0.76rem;
    letter-spacing: 0;
}

.client-entry-form input,
.client-entry-form select,
.client-entry-form textarea {
    min-height: 2rem;
    padding: 0.32rem 0.5rem;
    border-color: #cbd5e1;
    border-radius: 0.48rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
    font-size: 0.86rem;
}

.client-entry-form textarea {
    min-height: 3.1rem;
    resize: vertical;
}

.client-entry-form .file-field input {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.42rem;
    background: #f8fafc;
}

.client-entry-form input[type="file"]::file-selector-button {
    min-height: 1.45rem;
    margin-right: 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.38rem;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
}

.client-entry-form .file-preview,
.client-entry-form .file-field .file-link {
    margin-top: 0.05rem;
    padding: 0.3rem 0.45rem;
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 0.5rem;
    background: #fff;
}

.client-form-page .detail-section {
    gap: 8px;
    margin-top: 0;
    padding: 0.62rem 0.68rem 0.68rem;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-left: 4px solid #7c3aed;
    border-radius: 0.55rem;
    background: linear-gradient(180deg, rgba(245, 243, 255, 0.58), rgba(255, 255, 255, 0.98));
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.035);
}

.client-form-page .detail-section h4 {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    margin: 0;
    padding-bottom: 0.42rem;
    border-bottom: 1px solid rgba(124, 58, 237, 0.16);
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 900;
}

.client-form-page .detail-section .section-title-icon {
    background: #ede9fe;
    color: #6d28d9;
}

.client-form-page .service-form-grid {
    gap: 5px;
}

.service-form-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(190px, 0.9fr) minmax(110px, 0.55fr) minmax(150px, 0.7fr) minmax(120px, 0.55fr);
    gap: 10px;
    align-items: center;
}

.service-form-header {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.client-form-page .service-form-row {
    grid-template-columns: minmax(210px, 1.2fr) minmax(160px, 0.78fr) minmax(120px, 0.55fr) minmax(145px, 0.68fr) minmax(105px, 0.45fr);
    gap: 6px;
}

.client-form-page .service-form-header {
    font-size: 0.72rem;
}

.client-form-page .check-field {
    min-height: 2.25rem;
}

.due-on-fields {
    display: grid;
    grid-template-columns: minmax(70px, 0.4fr) minmax(120px, 0.6fr);
    gap: 8px;
}

.service-form-row select {
    width: 100%;
}

.service-form-row input {
    min-width: 0;
}

.empty-card {
    margin-top: 10px;
    padding: 14px;
    color: var(--muted);
    box-shadow: none;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.modal-backdrop,
.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    background: rgba(15, 23, 42, 0.45);
}

.modal-backdrop {
    place-items: center;
    padding: 18px;
}

.modal-card {
    width: min(720px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.98);
}

.confirm-backdrop {
    z-index: 42;
}

.confirm-modal {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.8rem 0.9rem;
    width: min(440px, 100%);
    padding: 1rem;
    overflow: visible;
}

.confirm-modal-icon {
    display: inline-grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.65rem;
    background: #fef3c7;
    color: #b45309;
}

.confirm-modal-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.confirm-modal h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.05rem;
    line-height: 1.2;
}

.confirm-modal p {
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.35;
}

.confirm-modal .message-actions {
    grid-column: 1 / -1;
}

.modal-card .panel-title-row,
.drawer-head {
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid #e2e8f0;
}

.drawer-head {
    position: sticky;
    top: 0;
    z-index: 4;
    margin: 0;
    padding: 1rem 1.15rem;
    border-bottom-color: rgba(15, 118, 110, 0.28);
    background:
        linear-gradient(135deg, rgba(204, 251, 241, 0.96), rgba(239, 246, 255, 0.96)),
        #f0fdfa;
    backdrop-filter: blur(12px);
}

.drawer-head > div {
    min-width: 0;
}

.modal-card .panel-title-row h3,
.drawer-head h3 {
    margin: 0 0 0.15rem;
    font-size: 1.05rem;
    line-height: 1.2;
}

.modal-card .panel-title-row p,
.drawer-head p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.25;
}

.modal-card .eyebrow,
.drawer-head .eyebrow {
    margin-bottom: 0.35rem;
    font-size: 0.68rem;
}

.modal-card .stack-form,
.drawer-panel .stack-form {
    margin-top: 0.75rem;
}

.drawer-backdrop {
    justify-content: end;
}

.drawer-panel {
    width: min(560px, 100vw);
    height: 100vh;
    overflow: auto;
    background: #fff;
    padding: 0;
    box-shadow: -12px 0 36px rgba(15, 23, 42, 0.16);
}

.drawer-panel .close-button {
    width: 2rem;
    min-width: 2rem;
    height: 2rem;
    min-height: 2rem;
    border-radius: 0.6rem;
}

.drawer-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin: 0.85rem 1.15rem 0.65rem;
}

.drawer-meta div {
    border: 1px solid var(--line);
    border-radius: 0.55rem;
    padding: 0.5rem 0.55rem;
    background: #f8fafc;
}

.detail-section {
    display: grid;
    gap: 6px;
    margin: 0.65rem 1.15rem 0;
}

.detail-section h4 {
    margin: 0;
    color: #0f172a;
    font-size: 0.88rem;
    line-height: 1.15;
}

.detail-list,
.detail-file-list {
    display: grid;
    gap: 6px;
}

.detail-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-list div,
.detail-file-list {
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    padding: 0.46rem 0.55rem;
    background: #f8fafc;
}

.detail-list span,
.detail-file-list span {
    display: block;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.15;
}

.detail-list strong,
.detail-list a,
.detail-file-list a {
    color: #0f172a;
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.detail-note {
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    padding: 0.5rem 0.6rem;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.drawer-panel .secure-field-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.5rem;
    margin-top: 0.55rem;
    padding-top: 0.55rem;
}

.drawer-panel .secure-field-form .message-actions {
    align-items: end;
}

.drawer-panel .detail-file-list .file-link {
    width: 100%;
    padding: 0.42rem 0.5rem;
    border-radius: 0.45rem;
}

.drawer-panel .detail-file-list .file-icon {
    width: 1.55rem;
    height: 1.55rem;
    flex-basis: 1.55rem;
}

.followup-detail-drawer {
    width: min(620px, 100vw);
}

.followup-detail-drawer .drawer-head h3 {
    max-width: 27rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.followup-detail-request-grid,
.followup-detail-notes-grid,
.followup-detail-file-grid,
.followup-detail-history {
    display: grid;
    gap: 6px;
}

.followup-detail-request-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.followup-detail-notes-grid,
.followup-detail-file-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.followup-detail-request-grid > div,
.followup-detail-notes-grid > div,
.followup-detail-file-grid > div,
.followup-detail-history > div {
    min-width: 0;
    padding: 0.46rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    background: #f8fafc;
}

.followup-detail-request-grid span,
.followup-detail-notes-grid span,
.followup-detail-file-grid span,
.followup-detail-history span {
    display: block;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.15;
}

.followup-detail-request-grid strong,
.followup-detail-notes-grid strong,
.followup-detail-history strong {
    display: block;
    color: #0f172a;
    font-size: 0.86rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.followup-detail-request-grid small,
.followup-detail-notes-grid small {
    display: block;
    margin-top: 0.12rem;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.15;
}

.followup-detail-actions,
.followup-detail-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
}

.followup-detail-footer {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin: 0.75rem 0 0;
    padding: 0.55rem 1.15rem;
    border-top: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
}

.detail-file-list .file-link span,
.attachment-link-list .file-link span,
.file-field .file-link span,
.file-preview span {
    display: inline;
}

.detail-file-list .file-link .file-icon,
.attachment-link-list .file-link .file-icon,
.file-field .file-link .file-icon,
.file-preview .file-icon {
    display: inline-grid;
}

.file-pdf .file-icon {
    background: #ffe4e6;
    color: #be123c;
}

.file-doc .file-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.file-sheet .file-icon {
    background: #dcfce7;
    color: #15803d;
}

.file-image .file-icon {
    background: #fef3c7;
    color: #92400e;
}

.timeline-list {
    display: grid;
    gap: 12px;
    margin: 18px 0;
}

.timeline-item {
    display: grid;
    grid-template-columns: 14px 1fr;
    gap: 10px;
}

.timeline-dot {
    width: 10px;
    height: 10px;
    margin-top: 14px;
    border-radius: 50%;
    background: var(--accent);
}

.timeline-card {
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    padding: 0.75rem;
    background: #f8fafc;
}

.timeline-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #344054;
    font-size: 0.9rem;
}

.timeline-card p {
    margin: 8px 0 0;
    color: var(--muted);
}

.timeline-attachments {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.timeline-attachments a {
    color: #0f766e;
    font-size: 0.86rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    padding: 12px 14px;
    border-radius: 8px;
    background: #ffe4e6;
    color: var(--danger);
}

#blazor-error-ui .reload {
    margin-left: 8px;
    color: inherit;
    font-weight: 800;
}

@media (max-width: 1200px) {
    .client-form-compact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .company-section,
    .tax-section,
    .files-section {
        grid-column: span 1;
        grid-row: auto;
    }

    .client-details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .desktop-only {
        display: none;
    }

    .login-layout,
    .profile-account-panel,
    .settings-layout,
    .client-form-compact-grid,
    .client-details-grid,
    .filter-grid,
    .followup-filter-grid,
    .invoice-filter-grid,
    .history-filter-grid,
    .workflow-filter-grid,
    .form-grid,
    .drawer-meta {
        grid-template-columns: 1fr;
    }

    .company-section,
    .tax-section,
    .files-section {
        grid-column: span 1;
        grid-row: auto;
    }

    .client-details-grid .span-2 {
        grid-column: span 1;
    }

    .company-section .client-details-grid,
    .tax-section .client-details-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .company-section .compact-field,
    .company-section .medium-field,
    .company-section .span-2 {
        grid-column: span 1;
        max-width: none;
    }

    .client-form-section-head,
    .secure-auth-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .drawer-panel .secure-field-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .followup-detail-request-grid,
    .followup-detail-notes-grid,
    .followup-detail-file-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-hero {
        grid-template-columns: 1fr;
    }

    .profile-hero-meta {
        width: 100%;
    }

    .profile-card-head {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .profile-card-head > .pill {
        grid-column: 1 / -1;
        width: fit-content;
    }

    .account-password-card {
        border-right: 0;
        border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    }

    .profile-password-form {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .stat-card {
        padding: 0.65rem 0.75rem;
        min-height: 5rem;
        border-top-width: 3px;
    }

    .stat-card span {
        font-size: 0.72rem;
        line-height: 1.2;
    }

    .stat-card strong {
        margin-top: 0.45rem;
        font-size: 1.55rem;
        line-height: 1;
    }

    .app-shell.admin-shell {
        min-height: 100dvh;
        padding-bottom: 5.35rem;
    }

    .dashboard-layout {
        display: grid;
        width: 100%;
        padding: 0.65rem;
        gap: 0.65rem;
    }

    .topbar-card {
        position: sticky;
        top: 0.65rem;
        display: flex;
        gap: 0.5rem;
        padding: 0.55rem;
        border-radius: 0.85rem;
    }

    .topbar-brand {
        min-width: 0;
        flex: 1 1 auto;
        gap: 0.55rem;
    }

    .topbar-brand .eyebrow {
        margin: 0;
        font-size: 0.6rem;
        line-height: 1;
    }

    .topbar-brand h1 {
        margin-top: 0.12rem;
        font-size: 0.92rem;
        line-height: 1;
    }

    .brand-mark {
        width: 1.95rem;
        height: 1.95rem;
        border-radius: 0.62rem;
        font-size: 0.9rem;
    }

    .top-nav-list {
        display: none;
    }

    .bottom-nav-list {
        position: fixed;
        left: 0.6rem;
        right: 0.6rem;
        bottom: 0.6rem;
        z-index: 30;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(3rem, 1fr));
        gap: 0.25rem;
        padding: 0.38rem;
        border: 1px solid rgba(15, 23, 42, 0.12);
        border-radius: 1rem;
        background: rgba(2, 6, 23, 0.96);
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
        backdrop-filter: blur(16px);
    }

    .top-nav-link {
        display: grid;
        justify-items: center;
        gap: 0.18rem;
        min-width: 0;
        min-height: 3.35rem;
        border-radius: 0.8rem;
        padding: 0.42rem 0.18rem;
        font-size: 0.62rem;
        line-height: 1.05;
        white-space: normal;
        text-align: center;
    }

    .top-nav-link span:last-child {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .top-nav-icon {
        width: 1.45rem;
        height: 1.45rem;
        flex-basis: 1.45rem;
    }

    .top-nav-icon svg {
        width: 1.15rem;
        height: 1.15rem;
    }

    .topbar-user {
        min-width: 0;
        flex: 0 0 auto;
        gap: 0.35rem;
    }

    .topbar-user .profile-link {
        display: none;
    }

    .logout-button {
        width: 2rem;
        min-width: 2rem;
        min-height: 2rem;
        border-radius: 0.68rem;
    }

    .content-shell {
        gap: 0.65rem;
    }

    .main-content,
    .panel-card,
    .filter-card {
        border-radius: 0.85rem;
    }

    .panel-title-row {
        align-items: flex-start;
    }

    .client-list-tools {
        justify-content: flex-start;
    }

    .client-card-grid {
        grid-template-columns: 1fr;
    }

    .followup-row-main,
    .followup-summary-grid {
        grid-template-columns: 1fr;
    }

    .followup-resolve-button {
        width: 100%;
    }

    .followup-action-grid {
        grid-template-columns: 1fr;
        overflow-x: visible;
    }

    .followup-action-panel {
        min-width: 0;
    }

    .main-content {
        padding: 0.75rem;
    }

    .settings-menu {
        display: flex;
        overflow-x: auto;
        padding: 0.45rem;
    }

    .settings-menu-item {
        flex: 0 0 auto;
        width: auto;
        white-space: nowrap;
    }

    .data-table thead {
        display: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tr {
        border: 1px solid var(--line);
        border-radius: 8px;
        margin-bottom: 10px;
        padding: 8px;
    }

    .data-table td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        border: 0;
        padding: 8px;
    }

    .data-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-weight: 800;
    }

    .client-service-table,
    .workflow-table {
        display: table;
        width: max-content;
    }

    .client-service-table thead,
    .workflow-table thead {
        display: table-header-group;
    }

    .client-service-table tbody,
    .workflow-table tbody {
        display: table-row-group;
    }

    .client-service-table tr,
    .workflow-table tr {
        display: table-row;
        width: auto;
        border: 0;
        border-radius: 0;
        margin-bottom: 0;
        padding: 0;
    }

    .client-service-table td,
    .workflow-table td {
        display: table-cell;
        width: auto;
        border-bottom: 1px solid var(--line);
        padding: 10px 12px;
    }

    .client-service-table td::before,
    .workflow-table td::before {
        content: none;
    }
}
