@font-face {
    font-family: 'Ubuntu Sans';
    src: url('https://doodigital.agency/wp-content/uploads/2025/06/UbuntuSans-VariableFont_wdthwght.ttf') format('truetype');
    font-weight: 100 900;
    font-display: swap;
}
@font-face {
    font-family: 'Helvetica Neue DD';
    src: url('https://doodigital.agency/wp-content/uploads/2025/06/HelveticaNeue500.woff') format('woff');
    font-weight: 400 700;
    font-display: swap;
}

:root {
    --bg: #f5f6f8;
    --panel: #ffffff;
    --accent: #d3f734;
    --accent-strong: #bfe62b;
    --text: #1f1f1f;
    --muted: #5f6368;
    --border: #e0e3e7;
    --shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    --icon-muted: #666A70;
    --icon-active: #1F1F1F;
    --font-sans: 'Helvetica Neue DD', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --text-base: 14px;
    --text-sm: 13px;
    --text-xs: 12px;
    --h1: 28px;
    --h2: 22px;
    --h3: 18px;
    --h4: 16px;
    --h5: 14px;
    --h6: 12px;
    --table-head-bg: #f2f4ec;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.5;
}
button,
input,
select,
textarea {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text);
}
h1 { font-size: var(--h1); line-height: 1.2; }
h2 { font-size: var(--h2); line-height: 1.25; }
h3 { font-size: var(--h3); line-height: 1.3; }
h4 { font-size: var(--h4); line-height: 1.35; }
h5 { font-size: var(--h5); line-height: 1.4; }
h6 { font-size: var(--h6); line-height: 1.45; }
a { color: #121212; text-decoration: none; }
a:hover { text-decoration: underline; }

.portal-body {
    background: #e7e7ed;
    min-height: 100vh;
    color: var(--text);
}
.portal-shell {
    --portal-sidebar-width: 252px;
    --portal-sidebar-collapsed-width: 68px;
    --portal-sidebar-transition: 180ms;
    min-height: 100vh;
    position: relative;
    width: 100%;
    display: block;
}
.portal-shell::before { display: none; }
.portal-shell.is-collapsed .portal-sidebar {
    width: var(--portal-sidebar-collapsed-width);
}
.portal-shell.is-collapsed .portal-main {
    margin-left: var(--portal-sidebar-collapsed-width);
}
.portal-sidebar {
    position: fixed;
    top: 0;
    height: 100vh;
    min-height: 100vh;
    width: var(--portal-sidebar-width);
    background: #fff;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: inset -3px 0 0 #d3f734;
    z-index: 3;
    transition: width var(--portal-sidebar-transition) linear;
}
.portal-sidebar__inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 10px 14px 16px;
    gap: 12px;
}
.portal-mobile-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: #111111;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}
.portal-mobile-close svg {
    width: 20px;
    height: 20px;
    display: block;
    fill: currentColor;
}
.portal-sidebar__top {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.portal-sidebar-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 22px;
    height: 22px;
    border: 0;
    background: transparent;
    color: #111318;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s linear;
}
.portal-sidebar-toggle:hover {
    color: #1d2128;
}
.portal-toggle-icon {
    width: 20px;
    height: 20px;
    display: block;
}
.portal-sidebar-toggle svg {
    fill: currentColor;
}
.portal-toggle-icon--expand { display: none; }
.portal-shell.is-collapsed .portal-toggle-icon--expand { display: block; }
.portal-shell.is-collapsed .portal-toggle-icon--collapse { display: none; }
.portal-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    width: 100%;
}
.portal-sidebar-toggle .portal-toggle-icon {
    pointer-events: none;
}
.portal-brand:hover {
    text-decoration: none;
}
.portal-brand img {
    width: 80px;
    height: 80px;
    border-radius: 0;
    object-fit: contain;
}
.portal-brand__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.portal-brand__title {
    font-weight: 700;
    font-size: 14px;
}
.portal-brand__subtitle {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.02em;
}
.portal-brand__text {
    line-height: 1.1;
}
.portal-side-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    list-style: none;
    flex: 1;
}
.portal-side-nav__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 0;
    height: 44px;
    padding: 0 14px;
    box-sizing: border-box;
    border-radius: 4px;
    color: #3f454f;
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.portal-side-nav__item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    border-radius: 2px;
    background: #d3f734;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.portal-side-nav__item:hover {
    text-decoration: none;
    background: #f1f2f4;
    color: #1d2128;
}
.portal-side-nav__item.is-active {
    background: rgba(211, 247, 52, 0.12);
    color: #1d2128;
    font-weight: 650;
}
.portal-side-nav__item.is-active::before {
    opacity: 1;
}
.portal-side-nav__item:focus-visible {
    outline: 2px solid #c7ccd3;
    outline-offset: 2px;
}
.portal-side-nav__icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2f343b;
}
.portal-side-nav__icon svg {
    width: 18px;
    height: 18px;
}
.portal-side-nav__item.is-active .portal-side-nav__icon {
    color: #171a1f;
}
.portal-side-nav__label {
    line-height: 1;
}
.portal-sidebar__footer {
    display: grid;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.portal-account {
    display: grid;
    gap: 4px;
}
.portal-account__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}
.portal-account__name {
    font-weight: 600;
    font-size: 13px;
    color: #2a2f36;
}
.portal-logout {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-radius: 8px;
    border: 0;
    background: transparent;
    font-weight: 600;
    color: #5b626c;
    text-decoration: none;
    position: relative;
}
.portal-logout:hover {
    text-decoration: none;
    color: #1d2128;
}
.portal-logout svg {
    width: 18px;
    height: 18px;
}
.portal-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    margin-left: var(--portal-sidebar-width);
    transition: margin-left var(--portal-sidebar-transition) linear;
}
.portal-main__top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 0;
}
.portal-main__brand {
    display: none;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.portal-main__brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}
.portal-main__top--no-title {
    padding-top: 16px;
}
.portal-main__title {
    font-size: 20px;
    font-weight: 700;
}
.portal-mobile-toggle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #d7dbe1;
    background: #fff;
    color: #2a2f36;
    display: none;
    align-items: center;
    justify-content: center;
}
.portal-mobile-toggle svg {
    width: 20px;
    height: 20px;
}
.portal-content {
    margin-top: 12px;
    padding: 0 20px 28px;
    width: 100%;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}
.portal-scrim {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 2;
}
.portal-shell.is-mobile-open .portal-scrim {
    opacity: 1;
    pointer-events: auto;
}
.portal-shell.is-collapsed .portal-brand__text,
.portal-shell.is-collapsed .portal-side-nav__label,
.portal-shell.is-collapsed .portal-account,
.portal-shell.is-collapsed .portal-logout span {
    display: none;
}
.portal-shell.is-collapsed .portal-brand img {
    width: 40px;
    height: 40px;
}
.portal-shell.is-collapsed .portal-sidebar__top {
    padding-bottom: 8px;
    align-items: center;
    gap: 6px;
}
.portal-shell.is-collapsed .portal-sidebar-toggle {
    position: static;
    order: 0;
}
.portal-shell.is-collapsed .portal-brand {
    order: 1;
    align-items: center;
}
.portal-shell.is-collapsed .portal-sidebar__inner {
    padding: 6px 6px;
}
.portal-shell.is-collapsed .portal-side-nav__item {
    justify-content: center;
}
.portal-shell.is-collapsed .portal-side-nav__item::before {
    left: 0;
}
.portal-shell.is-collapsed .portal-sidebar__top {
    flex-direction: column;
    gap: 8px;
}
.portal-shell.is-collapsed .portal-brand {
    justify-content: center;
}
.portal-shell.is-collapsed .portal-logout {
    justify-content: center;
}
.portal-shell.is-collapsed .portal-side-nav__item[data-tooltip]::after,
.portal-shell.is-collapsed .portal-logout[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #161a22;
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 10;
}
.portal-shell.is-collapsed .portal-side-nav__item:hover::after,
.portal-shell.is-collapsed .portal-logout:hover::after {
    opacity: 1;
}
.portal-topbar,
.portal-content {
    position: relative;
    z-index: 1;
}
.portal-topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #d7dbe1;
    box-shadow: 0 12px 26px rgba(17, 24, 39, 0.08);
}
.portal-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-family: var(--font-sans);
}
.portal-logo img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
}
.portal-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.portal-nav__link {
    padding: 8px 14px;
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
    font-weight: 600;
    font-family: var(--font-sans);
    text-decoration: none;
    color: #3f454d;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.portal-nav__link:hover {
    text-decoration: none;
    border-color: #d5d9df;
    background: #f7f8fb;
    color: var(--text);
}
.portal-nav__link.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #1a1d12;
}
.portal-nav__link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.portal-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}
.portal-content { margin-top: 12px; }
.portal-metric-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.portal-metric { padding: 16px 18px; border-radius: 14px; border: 1px solid #dde1e7; background: #fff; box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06); }
.portal-metric__label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 6px; }
.portal-metric__value { font-size: 22px; font-weight: 700; }

.portal-dashboard-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.portal-dashboard {
    display: grid;
    gap: 12px;
}
.portal-dashboard .card {
    margin-bottom: 0;
}
.portal-dashboard-grid .card {
    margin-bottom: 0;
}
.portal-dashboard .card-header {
    margin-bottom: 10px;
}
.portal-action-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px 18px;
    border-radius: 18px;
    border: 1px solid #0f172a;
    background: #0f172a;
    color: #f8fafc;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}
.portal-action-banner__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}
.portal-action-banner__list {
    margin: 0;
    padding-left: 18px;
    font-size: 14px;
}
.portal-action-banner__summary {
    font-size: 14px;
}
.portal-action-banner__cta {
    margin-left: auto;
}
.portal-action-banner--quiet {
    border-color: #d7dbe1;
    background: #f8fafc;
    color: var(--muted);
    box-shadow: none;
}
.portal-action-banner__quiet {
    font-weight: 600;
}
.portal-action-placeholder__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--muted);
}
.portal-project-status {
    display: grid;
    gap: 10px;
}
.portal-project-status__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    font-weight: 600;
}
.portal-project-status__name {
    font-size: 22px;
    font-weight: 700;
}
.portal-project-status__current {
    font-size: 14px;
}
.portal-project-status__meta {
    font-size: 12px;
}
.portal-work-card__count {
    font-size: 13px;
    font-weight: 600;
}
.portal-work-card__latest {
    margin-top: 6px;
}
.portal-progress__label {
    font-size: 13px;
}
.portal-progress {
    height: 8px;
    background: #eef1f5;
    border-radius: 999px;
    overflow: hidden;
}
.portal-progress__bar {
    height: 100%;
    background: #111827;
    border-radius: 999px;
}
.portal-card-context {
    margin-top: -6px;
    margin-bottom: 6px;
    font-size: 12px;
}
.portal-card-action {
    margin-top: 10px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: inherit;
    text-decoration: none;
    display: inline-block;
}
.portal-card-action:hover {
    text-decoration: underline;
}
.portal-card-action:focus-visible {
    outline: 2px solid #111827;
    outline-offset: 2px;
    border-radius: 6px;
}
.portal-card-button {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.portal-brand-kit-action { margin-top: 16px; }
.contact-assets__grid.brand-kit-carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(180px, 260px);
    gap: 16px;
    justify-content: start;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
}
.brand-kit-carousel .contact-asset {
    width: auto;
    max-width: 260px;
    scroll-snap-align: start;
}
.brand-kit-carousel::-webkit-scrollbar {
    height: 8px;
}
.brand-kit-carousel::-webkit-scrollbar-thumb {
    background: #d8dde6;
    border-radius: 999px;
}

.portal-body h1 { font-size: 32px; letter-spacing: 0; }
.portal-body h2 { font-size: 22px; }
.portal-body .card {
    border-radius: 18px;
    border-color: transparent;
    box-shadow: 0 14px 28px rgba(17, 24, 39, 0.08);
    padding: 26px;
    margin-bottom: 12px;
}
.portal-body .card .card {
    border-radius: 14px;
    border: 1px solid #dde1e7;
    box-shadow: none;
    padding: 18px;
    margin-bottom: 0;
}

.feedback-list {
    display: grid;
    gap: 16px;
}
.feedback-entry {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid #dde1e7;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.08);
}
.feedback-entry__thumb {
    height: 110px;
    border-radius: 12px;
    border: 1px solid #eef0f3;
    background: #f4f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.feedback-entry__thumb img { width: 100%; height: 100%; object-fit: cover; }
.feedback-entry__thumb--live {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f2f6;
    text-align: center;
    padding: 10px;
    gap: 6px;
    flex-direction: column;
}
.feedback-entry__live-label {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #1f1f1f;
    font-weight: 700;
}
.feedback-entry__live-url {
    font-size: 12px;
    color: var(--muted);
    word-break: break-all;
}
.feedback-entry__body { display: grid; gap: 6px; }
.feedback-entry__title { font-weight: 700; font-size: 16px; }
.feedback-entry__meta { font-size: 12px; color: var(--muted); }
.feedback-entry__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

.feedback-view {
    margin-top: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 18px;
    padding: 22px;
    border-radius: 20px;
    border: 1px solid #dde1e7;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(17, 24, 39, 0.08);
    min-height: calc(100vh - 220px);
    align-items: start;
    overflow: visible;
}
.feedback-view__pane { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.feedback-view__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}
.feedback-kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    font-weight: 700;
}
.feedback-canvas {
    position: relative;
    border-radius: 16px;
    border: 1px solid #e2e6ec;
    background: #f3f4f7;
    overflow: hidden;
    min-height: 360px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.feedback-canvas.is-live {
    flex: 0;
    min-height: 0;
    padding: 0;
    background: transparent;
    border: 0;
    align-items: stretch;
    justify-content: center;
}
.feedback-canvas__media {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.feedback-canvas.is-live .feedback-canvas__media {
    align-items: stretch;
    justify-content: center;
}
.feedback-canvas__image { width: 100%; height: 100%; object-fit: contain; }
.feedback-canvas__image--live-shot {
    height: auto;
    align-self: flex-start;
}
.feedback-canvas__frame { width: 100%; height: 100%; border: 0; }
.feedback-canvas__live {
    --live-width: 1440px;
    --live-height: 900px;
    --live-scale: 0.5;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.feedback-canvas__live-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.feedback-canvas__live-viewport {
    width: var(--live-width);
    height: var(--live-height);
    transform: scale(var(--live-scale));
    transform-origin: top left;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 22px rgba(17, 24, 39, 0.18);
    background: #ffffff;
}
.feedback-canvas__live-viewport iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.feedback-canvas.is-live.is-marking iframe {
    pointer-events: none;
}
.feedback-canvas__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}
.feedback-canvas.is-marking { cursor: crosshair; }
.feedback-markers { position: absolute; inset: 0; pointer-events: none; }
.feedback-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #1f1f1f;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid #ffffff;
    pointer-events: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.feedback-marker.is-highlight {
    box-shadow: 0 0 0 3px rgba(211, 247, 52, 0.6), 0 4px 10px rgba(0, 0, 0, 0.2);
}
.feedback-marker--pending {
    background: #d3f734;
    color: #1f1f1f;
    border-color: #1f1f1f;
}
.feedback-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted);
}
.feedback-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #dde1e7;
    background: #ffffff;
    position: sticky;
    top: 24px;
    align-self: start;
    max-height: calc(100vh - 180px);
    height: fit-content;
}
.portal-body .feedback-panel { top: 24px; }
.feedback-panel__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}
.feedback-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    background: #f0f1f4;
    border-radius: 999px;
    width: fit-content;
}
.feedback-tab {
    border: 0;
    background: transparent;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    color: var(--muted);
}
.feedback-tab.is-active {
    background: #ffffff;
    color: var(--text);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.feedback-tab-panel { display: none; gap: 12px; flex-direction: column; }
.feedback-tab-panel.is-active { display: flex; }
.feedback-panel__status { font-size: 12px; color: var(--muted); min-height: 18px; }
.feedback-comments {
    display: grid;
    gap: 10px;
    overflow: auto;
    padding-right: 6px;
    flex: 1;
    min-height: 120px;
}
.feedback-comment {
    display: grid;
    gap: 6px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #e2e6ec;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
}
.feedback-comment__title { font-weight: 700; font-size: 13px; }
.feedback-comment__body { font-size: 13px; color: #202124; }
.feedback-comment__meta { font-size: 11px; color: var(--muted); }
.feedback-comment__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.feedback-comment__actions {
    opacity: 0;
    pointer-events: none;
    margin-left: auto;
    justify-content: flex-end;
}
.feedback-comment.is-editing .feedback-comment__actions:not(.is-edit),
.feedback-marking-item.is-editing .feedback-comment__actions:not(.is-edit) {
    opacity: 0;
    pointer-events: none;
}
.feedback-comment__actions.is-edit {
    opacity: 1;
    pointer-events: auto;
}
.feedback-comment__actions.is-edit button {
    padding: 6px 10px;
    font-size: 12px;
    border: 1px solid #e2e6ea !important;
    background: #ffffff !important;
    color: var(--text) !important;
    border-radius: 8px;
}
.feedback-comment__actions.is-edit button:hover { background: #f3f5f8; }
.feedback-comment:hover .feedback-comment__actions,
.feedback-marking-item:hover .feedback-comment__actions {
    opacity: 1;
    pointer-events: auto;
}
.feedback-comment__actions button {
    border: none !important;
    background: #f1f2f6 !important;
    color: #5f656c !important;
    border-radius: 999px;
    padding: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    border-color: transparent !important;
}
.feedback-comment__actions button:hover {
    background: #e7e9ee;
    color: #2d3136;
}
.feedback-action-icon { width: 16px; height: 16px; }
.feedback-comment__edit textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #d9dde1;
    padding: 8px 10px;
    font-family: inherit;
    resize: vertical;
}
.feedback-markings-list { display: grid; gap: 10px; }
.feedback-marking-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #e2e6ec;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.feedback-marking-item:hover {
    border-color: #d3f734;
    box-shadow: 0 6px 14px rgba(31, 31, 31, 0.08);
}
.feedback-marking-item .feedback-comment__actions { margin-left: auto; }
.feedback-marking-item__index {
    border: 0;
    background: #1f1f1f;
    color: #ffffff;
    font-weight: 700;
    border-radius: 999px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    cursor: pointer;
}
.feedback-marking-item__body { font-size: 12px; color: #202124; }
.feedback-marking-input {
    position: absolute;
    display: none;
    min-width: 220px;
    max-width: 280px;
    background: #ffffff;
    border: 1px solid #e1e5eb;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    z-index: 6;
}
.feedback-marking-input.is-open { display: block; }
.feedback-marking-input textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #d9dde1;
    padding: 8px 10px;
    font-family: inherit;
    resize: vertical;
}
.feedback-marking-input__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 8px;
}
.feedback-marking-input__actions button {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #1a1d12;
    font-weight: 600;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
}
.feedback-marking-input__actions button:last-child {
    background: #ffffff;
    color: var(--text);
    border-color: var(--border);
}
.feedback-tooltip {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transform: translate(12px, 12px);
    background: #ffffff;
    border: 1px solid #e5e8ec;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    color: #202124;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    max-width: 240px;
    z-index: 50;
    transition: opacity 0.15s ease;
}
.feedback-tooltip.is-visible { opacity: 1; }
.feedback-comment.is-highlight {
    border-color: #bfe62b;
    box-shadow: 0 0 0 2px rgba(191, 230, 43, 0.35);
}
.feedback-empty {
    padding: 12px;
    border-radius: 12px;
    border: 1px dashed #d6dae0;
    background: #ffffff;
    font-size: 13px;
    color: var(--muted);
}
.feedback-form { display: grid; gap: 8px; margin-top: auto; }
.feedback-form__label { font-size: 12px; font-weight: 700; color: var(--muted); }
.feedback-form textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #d9dde1;
    padding: 10px 12px;
    font-family: inherit;
    resize: vertical;
}
.feedback-form__row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.feedback-form__cancel { white-space: nowrap; }
.feedback-form__hint { font-size: 11px; color: var(--muted); }
.feedback-marking-toggle.is-active {
    background: #1f1f1f;
    border-color: #1f1f1f;
    color: #ffffff;
}
.feedback-admin-thumb {
    position: relative;
    height: 140px;
    border-radius: 12px;
    border: 1px solid #eef0f3;
    background: #f5f6f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.feedback-admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.feedback-admin-thumb--live {
    background: #f1f2f6;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    text-align: center;
}
.feedback-admin-thumb__label {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
    color: #1f1f1f;
}
.feedback-admin-thumb__url {
    font-size: 12px;
    color: var(--muted);
    word-break: break-all;
}
.feedback-admin-markers { position: absolute; inset: 0; pointer-events: none; }
.feedback-admin-comments { display: grid; gap: 8px; }

@media (max-width: 1100px) {
    .feedback-view {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .feedback-panel {
        order: 2;
        position: static;
        max-height: none;
    }
}

@media (max-width: 700px) {
    .feedback-entry { grid-template-columns: 1fr; }
    .feedback-entry__thumb { height: 160px; }
}

.app-shell { display: flex; min-height: 100vh; }
.container {
    flex: 1;
    max-width: none;
    margin: 0;
    padding: 24px 26px 40px;
    background: var(--bg);
    min-height: 100vh;
    position: relative;
    transition: background 0.25s ease;
    overflow-x: hidden;
}
.container .card { width: 100%; margin-left: 0; margin-right: 0; }
.email-page .container { max-width: none; }
body:not(.portal-body) .container { background: #e7e7ed; }
body:not(.portal-body) h1 { font-size: 32px; letter-spacing: 0; }
body:not(.portal-body) h2 { font-size: 22px; }
body:not(.portal-body) .card {
    border-radius: 18px;
    border-color: transparent;
    box-shadow: 0 14px 28px rgba(17, 24, 39, 0.08);
    padding: 26px;
    margin-bottom: 12px;
}
body:not(.portal-body) .card .card {
    border-radius: 14px;
    border: 1px solid #dde1e7;
    box-shadow: none;
    padding: 18px;
    margin-bottom: 0;
}
body:not(.portal-body) .crm-dashboard { display: grid; gap: 16px; }
body:not(.portal-body) .crm-dashboard-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
body:not(.portal-body) .crm-dashboard .card { margin: 0; }
body:not(.portal-body) .crm-card-header { margin-bottom: 12px; }
body:not(.portal-body) .crm-card-header h2 { margin: 0; }
body:not(.portal-body) .crm-task {
    padding: 12px 0;
    border-bottom: 1px solid #eef0f3;
}
body:not(.portal-body) .crm-task:last-child { border-bottom: none; }
body:not(.portal-body) .crm-progress {
    margin-top: 6px;
    background: #eef0f3;
    border-radius: 999px;
    overflow: hidden;
    height: 6px;
}
body:not(.portal-body) .crm-progress__bar {
    height: 100%;
    background: #c6e400;
}
body:not(.portal-body) .page-tabs {
    background: #ffffff;
    border: 1px solid #dde1e7;
    border-radius: 18px;
    padding: 10px 12px;
    box-shadow: 0 14px 28px rgba(17, 24, 39, 0.08);
    gap: 10px;
    margin-bottom: 12px;
}
body:not(.portal-body) .page-tab {
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    color: #4b5563;
    background: transparent;
}
body:not(.portal-body) .page-tab.active {
    background: #f1f2f4;
    color: #111827;
    border-color: transparent;
}
body:not(.portal-body) .page-tab-actions .btn,
body:not(.portal-body) .page-tab-actions .btn-secondary {
    padding: 8px 12px;
    font-size: 13px;
}
body:not(.portal-body) .filters {
    padding: 12px;
    border-radius: 14px;
    border: 1px solid #dde1e7;
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(17, 24, 39, 0.05);
}
body:not(.portal-body) .empty {
    padding: 12px 0;
    color: var(--muted);
}
body:not(.portal-body) .alert {
    background: #fff5f5;
    border: 1px solid #e7b4b4;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 12px;
}
body:not(.portal-body) .btn,
body:not(.portal-body) button,
body:not(.portal-body) .btn-secondary,
body:not(.portal-body) .btn-link {
    border-radius: 10px;
    font-size: 13px;
}
.main-loading {
    position: absolute;
    inset: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 5;
}
.main-loading .spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid #e3e6ea;
    border-top-color: #d3f734;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.main-loading .spinner-label {
    font-family: var(--font-sans);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--muted);
}
.js .page-tabs,
.js .page-content {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.js body.page-ready .page-tabs,
.js body.page-ready .page-content {
    opacity: 1;
    transform: translateY(0);
}
body.page-loading .container { background: #fff; }
body.page-loading .page-tabs,
body.page-loading .page-content {
    opacity: 0;
    transform: translateY(4px);
}
body.page-loading .main-loading { opacity: 1; pointer-events: auto; }
.sidebar {
    width: 252px;
    min-width: 252px;
    max-width: 252px;
    background: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: inset -3px 0 0 var(--accent);
    padding: 10px 14px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar-inner { display: flex; flex-direction: column; min-height: 100%; gap: 12px; }
.brand {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    order: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    width: 100%;
}
.brand img { width: 80px; height: 80px; display: block; object-fit: contain; }
.side-nav { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; flex: 1; order: 1; }
.side-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 44px;
    padding: 0 14px;
    border-radius: 4px;
    color: #3f454f;
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.side-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    border-radius: 2px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.side-nav a:hover {
    color: #1d2128;
    background: #f1f2f4;
    text-decoration: none;
}
.side-nav a.is-active {
    color: #1d2128;
    background: rgba(211, 247, 52, 0.12);
    font-weight: 650;
}
.side-nav a.is-active::before {
    opacity: 1;
}
.side-nav svg { width: 18px; height: 18px; flex: 0 0 18px; fill: currentColor; }
.side-nav span { line-height: 1; }
.user {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #1f1f1f;
    margin-top: 0;
    padding: 14px 0 0;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0;
    background: transparent;
}
.user--top {
    margin: 0;
    order: 2;
}
.user-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.user-meta { display: flex; align-items: center; gap: 12px; }
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #d3f734;
    color: #1f1f1f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
}
.user-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.user-name { font-weight: 600; font-size: 13px; font-family: var(--font-sans); color: #2a2f36; }
.logout { color: #5b626c; font-size: 12px; font-family: var(--font-sans); text-decoration: none; font-weight: 600; }
.logout:hover { text-decoration: none; color: #1d2128; }
.user-actions { display: flex; gap: 8px; align-items: center; }
.user-bell { position: relative; color: var(--icon-muted); }
.user-bell.is-active { color: var(--icon-active); }

.sidebar-close {
    display: none;
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.sidebar-close svg { width: 20px; height: 20px; }
.sidebar-close:hover { border-color: var(--accent); }

.mobile-topbar,
.mobile-nav-scrim {
    display: none;
}
.mobile-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: 2100;
    align-items: center;
    justify-content: space-between;
}
.mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.mobile-brand img {
    height: 32px;
    width: auto;
    display: block;
}
.mobile-nav-toggle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.mobile-nav-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }
.mobile-nav-toggle svg { width: 22px; height: 22px; }
.mobile-nav-scrim {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1900;
}
body.nav-open { overflow: hidden; }
body.nav-open .mobile-nav-scrim {
    opacity: 1;
    pointer-events: auto;
}
body.nav-open .sidebar { transform: translateX(0); }
body.nav-open .mobile-topbar { z-index: 1800; }

.sidebar .icon-action {
    color: var(--icon-muted);
    border-color: var(--border);
}
.sidebar .icon-action:hover { color: var(--icon-active); }
.sidebar .icon-action--accent { color: #1a1d12; }
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    color: #000;
    font-size: 18px;
    text-decoration: none;
}
.icon-btn:hover {
    border-color: var(--accent);
    color: #1d8f00;
}
.icon-btn--notif { position: relative; }
.notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #c0392b;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    border: 2px solid #fff;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card h1, .card h2 { font-family: var(--font-sans); margin: 0; }
.actions { display: flex; gap: 8px; }
.btn, button, .btn-secondary, .btn-link {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-sans);
}
.icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    color: #1f1f1f;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.icon-action svg { width: 18px; height: 18px; }
.icon-action:hover { border-color: var(--accent); background: #f7f8f0; }
.icon-action--ghost { border-color: transparent; background: transparent; }
.icon-action--ghost:hover { border-color: var(--border); background: #f7f8f0; }
.icon-action--accent {
    background: var(--accent);
    border-color: var(--accent);
    color: #1a1d12;
}
.icon-action--accent:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-icon svg { width: 18px; height: 18px; }
button.btn-neon, .btn-neon {
    background: #d3f734;
    border-color: #d3f734;
    color: #1a1d12;
}
button.btn-neon:hover, .btn-neon:hover {
    background: #c2ea2a;
    border-color: #c2ea2a;
}
button, .btn { background: var(--accent); color: #1a1d12; border-color: var(--accent); }
button:hover, .btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-secondary { background: #fff; border-color: var(--border); color: var(--text); }
.btn-secondary:hover { border-color: #cbd0d6; }
.btn-secondary.is-active {
    background: #1f1f1f;
    border-color: #1f1f1f;
    color: #ffffff;
}
.btn-link { background: none; border: none; color: #1d8f00; padding: 0; }

.page-tabs {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.page-tab-back { flex: 0 0 auto; }
.page-tab {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    border: 1px solid transparent;
}
.page-tab.active {
    background: #ffffff;
    color: var(--text);
    border-color: var(--border);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.page-tab-actions { display: flex; gap: 8px; padding-bottom: 0; align-items: center; flex-wrap: wrap; margin-left: auto; }
.page-tab-actions .oauth-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 2px #fff, 0 0 6px rgba(45, 158, 0, 0.45);
}
.page-tabs .contact-subnav {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 2px;
}
.page-tabs .contact-subnav .page-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 2px 12px;
    border-radius: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    position: relative;
    transition: color 160ms ease;
}
.page-tabs .contact-subnav .page-tab svg {
    width: 16px;
    height: 16px;
}
.page-tabs .contact-subnav .page-tab::after {
    content: '';
    position: absolute;
    left: -6px;
    right: -6px;
    bottom: 2px;
    height: 3px;
    border-radius: 999px;
    background: var(--text);
    opacity: 0;
    transform: scaleX(0.7);
    transition: opacity 160ms ease, transform 160ms ease;
}
.page-tabs .contact-subnav .page-tab:hover {
    color: var(--text);
}
.page-tabs .contact-subnav .page-tab:hover::after {
    opacity: 0.4;
    transform: scaleX(1);
}
.page-tabs .contact-subnav .page-tab.active {
    color: var(--text);
    font-weight: 700;
}
.page-tabs .contact-subnav .page-tab.active::after {
    opacity: 1;
    transform: scaleX(1);
}
.page-actions--contacts { padding-right: 40px; }
.page-content {
    padding: 20px 0 0;
    overflow-x: hidden;
}
.doc-sort {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}
.doc-stream {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.doc-group__header {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}
.doc-group__empty {
    font-size: 14px;
    color: var(--muted);
    padding: 10px 0 4px;
}
.doc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    transition: background 150ms ease, border-color 150ms ease;
}
.doc-row + .doc-row { margin-top: 10px; }
.doc-row:hover {
    background: #f7f9f2;
    border-color: #d7dcd1;
}
.doc-row__main { min-width: 0; }
.doc-row__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
}
.doc-row__title a {
    color: var(--text);
    text-decoration: none;
}
.doc-row__title a:hover { text-decoration: underline; }
.doc-row__sub {
    margin-top: 4px;
    font-size: 13px;
    color: var(--muted);
}
.doc-row__meta {
    margin-top: 6px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--muted);
}
.doc-row__meta span::before {
    content: '•';
    margin-right: 6px;
}
.doc-row__meta span:first-child::before { content: ''; margin-right: 0; }
.doc-row__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
    transition: opacity 150ms ease;
}
.doc-row:hover .doc-row__actions { opacity: 1; }
.doc-row__actions .icon-action {
    width: 36px;
    height: 36px;
}
.doc-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #2c7b00;
    background: #e7f4c9;
    border-radius: 999px;
    padding: 3px 8px;
}
.doc-empty {
    text-align: center;
    padding: 30px 10px 18px;
    color: var(--muted);
}
.doc-empty p {
    margin: 0 0 14px;
}
.doc-empty__actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.btn-tertiary {
    background: #f6f7f2;
    border-color: #e0e3d7;
    color: var(--muted);
}
.btn-tertiary:hover {
    background: #eef1e6;
    border-color: #d7dbd0;
    color: var(--text);
}
.contact-files-manager .card-header h2 {
    font-size: 18px;
    font-weight: 700;
}
.contact-files-manager .file-manager-helper {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}
.contact-files-manager .file-manager-toolbar {
    align-items: center;
    gap: 14px;
}
.contact-files-manager .file-select-stack {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.contact-files-manager .file-bulk-controls {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-left: 6px;
    border-left: 1px solid var(--border);
}
.contact-files-manager .file-bulk-divider {
    width: 1px;
    height: 22px;
    background: var(--border);
}
.contact-files-manager .file-manager-table .badge {
    background: #f1f3ea;
    color: #4b4f46;
    border-color: transparent;
}
.contact-files-manager .file-manager-table .tag-chip {
    background: #e8edf8;
    color: #2b3a66;
    border: 1px solid #dde3f3;
}
.contact-files-manager .file-manager-table .row-actions {
    opacity: 0.55;
    transition: opacity 150ms ease;
}
.contact-files-manager .file-manager-table .file-row:hover .row-actions {
    opacity: 1;
}
.contact-projects-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.contact-project-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
}
.contact-project-main { min-width: 0; }
.contact-project-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}
.contact-project-title a {
    color: inherit;
    text-decoration: none;
}
.contact-project-title a:hover { text-decoration: underline; }
.project-status {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
}
.project-status--active {
    background: #e5f7c9;
    color: #1f5c00;
    border-color: #c9eaa0;
}
.project-status--on-hold,
.project-status--onhold,
.project-status--hold {
    background: #f3f4f6;
    color: #5a606b;
    border-color: #e2e5ea;
}
.project-status--closed,
.project-status--done,
.project-status--inactive {
    background: #f1f2f0;
    color: #8c9289;
    border-color: #e0e2dd;
}
.contact-project-meta {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
}
.contact-project-meta span::before {
    content: '•';
    margin-right: 6px;
}
.contact-project-meta span:first-child::before { content: ''; margin-right: 0; }
.contact-project-utility {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}
.contact-project-tasks {
    font-weight: 600;
    color: #3d4038;
}
.contact-project-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    color: var(--muted);
    border: 1px solid var(--border);
    transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
    text-decoration: none;
}
.contact-project-open:hover {
    color: var(--text);
    border-color: #cfd4cb;
    background: #f4f6ef;
}
.contact-project-open svg {
    width: 16px;
    height: 16px;
}
.file-manager-page .page-tabs,
.file-manager-page .page-content {
    transform: none;
}
.file-manager-page .page-content {
    min-height: calc(100vh - 120px);
}
.muted { color: var(--muted); }
.form-error { color: #b12222; font-weight: 600; }
.overview-section {
    border-radius: 16px;
    margin-bottom: 18px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.06);
}
.overview-section[open] { padding-bottom: 12px; }
.overview-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 16px;
}
.overview-summary::-webkit-details-marker { display: none; }
.overview-summary__icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8faf2;
    color: #2c7b00;
}
.overview-summary__icon svg { width: 18px; height: 18px; }
.overview-summary__title { flex: 1; }
.overview-summary__controls {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}
.overview-summary__state {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.overview-section:not([open]) .overview-summary__state--open { display: none; }
.overview-section[open] .overview-summary__state--closed { display: none; }
.overview-section:not([open]) .overview-summary__icon { transform: rotate(45deg); }
.project-board { padding: 24px; }
.calendar-overview { padding: 24px; overflow-x: hidden; }
.calendar-overview__head {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    margin-bottom: 10px;
}
.calendar-overview__head > * { min-width: 0; }
.calendar-head__controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.calendar-scale { margin: 0; }
.calendar-scale__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.calendar-scale select {
    border: 1px solid #dde1e7;
    border-radius: 10px;
    padding: 4px 8px;
    background: #ffffff;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}
.calendar-overview__rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.calendar-row {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}
.calendar-row > * { min-width: 0; }
.calendar-overview__rows .calendar-row:nth-child(odd) { background: #ffffff; }
.calendar-overview__rows .calendar-row:nth-child(even) { background: #f7f8fa; }
.calendar-row {
    border-radius: 14px;
    padding: 10px 12px;
    border: 1px solid #eef0f3;
}
.calendar-row__track { border-bottom: none; }
.calendar-row.done { opacity: 0.7; }
.calendar-row__meta { display: flex; flex-direction: column; gap: 6px; }
.step-client {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}
.calendar-row__track {
    display: grid;
    grid-template-columns: repeat(var(--calendar-columns, 7), 90px);
    gap: 6px;
    padding: 4px 0;
    border-bottom: 1px dashed #e2e6ec;
}
.calendar-grid {
    grid-template-columns: repeat(var(--calendar-columns, 7), 90px);
    width: max-content;
}
.calendar-overview[data-scale="week"] .calendar-grid,
.calendar-overview[data-scale="week"] .calendar-row__track {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    width: 100%;
}
.calendar-overview .week-grid,
.calendar-overview .calendar-row__track {
    scrollbar-gutter: stable;
}
.calendar-overview .calendar-scroll {
    overflow-x: auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    scrollbar-gutter: stable;
    cursor: grab;
}
.calendar-overview .calendar-scroll:active { cursor: grabbing; }
.calendar-overview .calendar-scroll--head,
.calendar-overview .calendar-scroll--row {
    scrollbar-width: none;
}
.calendar-overview .calendar-scroll--head::-webkit-scrollbar,
.calendar-overview .calendar-scroll--row::-webkit-scrollbar { display: none; }
.calendar-overview .calendar-scroll--bar {
    margin-top: 8px;
    height: 14px;
    overflow-x: auto;
    overflow-y: hidden;
}
.calendar-overview .calendar-scroll__spacer {
    height: 1px;
    width: calc(var(--calendar-columns, 7) * 90px);
}
.page-content .card > h1,
.page-content .card .card-header h1 { display: none; }

.contacts-board { padding: 22px; }
.contacts-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.contacts-filters { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 0; }
.filter-field { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.filter-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.contacts-filters input[type="text"] { max-width: 260px; }
.search-input {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.search-input input[type="text"] {
    padding-right: 36px;
}
.search-input svg {
    position: absolute;
    right: 12px;
    width: 18px;
    height: 18px;
    color: var(--muted);
}
.contact-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    position: relative;
}
.contact-cell__text {
    flex: 1;
    min-width: 0;
}
.contact-edit-btn {
    border: none;
    background: #f0f3e6;
    color: #6d7b65;
    border-radius: 999px;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.contact-edit-btn svg { width: 16px; height: 16px; }
.contact-cell:hover .contact-edit-btn { opacity: 1; transform: translateY(-1px); }
.contact-inline-edit {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}
.contact-inline-edit input,
.contact-inline-edit select {
    width: 100%;
}
.contact-inline-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.contact-cell.is-editing {
    flex-direction: column;
    align-items: stretch;
}
.contact-cell.is-editing .contact-cell__text,
.contact-cell.is-editing .contact-edit-btn { display: none; }
.contact-cell.is-editing .contact-inline-edit { display: flex; }
.select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.select-wrap select {
    padding-right: 36px;
}
.select-wrap svg {
    position: absolute;
    right: 12px;
    width: 16px;
    height: 16px;
    color: var(--muted);
    pointer-events: none;
}
.contacts-table .table-head {
    background: #f9faf2;
    font-weight: 600;
    color: var(--text);
    font-size: 20px;
}
.contacts-table .table-row {
    grid-template-columns: 240px 1.4fr 1fr 1fr 1.3fr 1fr 90px;
    align-items: center;
    padding: 18px 18px;
    text-align: center;
    gap: 28px;
}
.customer-portal-table .table-row,
.customer-portal-table .table-head {
    grid-template-columns: 240px 1.6fr 1fr 1fr 90px;
    align-items: center;
    text-align: center;
}
.logo-cell {
    width: 240px;
    height: 68px;
    border-radius: 14px;
    background: #f3f5ea;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--muted);
    overflow: hidden;
}
.contacts-table .table-head > div,
.contacts-table .table-row > div {
    display: flex;
    align-items: center;
    justify-content: center;
}
.customer-portal-table .table-row > div,
.customer-portal-table .table-head > div {
    display: flex;
    align-items: center;
    justify-content: center;
}
.contacts-table .table-row > div:nth-child(2),
.contacts-table .table-head > div:nth-child(2) {
    justify-content: center;
}
.contacts-table .table-row > div:nth-child(2) { gap: 12px; }
.contacts-table .table-row > div:nth-child(2) a { text-align: center; }
.logo-cell img { width: 100%; height: 100%; object-fit: cover; }
.lead-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 40px;
    padding: 0;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 800;
    color: #000;
}
.lead-client { background: #dfff92; }
.lead-warm-leads, .lead-warm-lead { background: #f8d2a0; }
.lead-hot-leads, .lead-hot-lead { background: #f8a5a0; }
.lead-cold-leads, .lead-cold-lead { background: #bfe8fd; }
.lead-ghost { background: #d4d4d4; }
.actions-cell { text-align: center; }
.table.contacts-table { overflow: visible; position: relative; }
.contacts-table.is-loading { opacity: 0.6; pointer-events: none; }
.contacts-table.is-loading::after {
    content: "Loading...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    color: var(--text);
}
.table.booking-table { overflow: visible; position: relative; }
.booking-table .table-row { overflow: visible; }
.action-menu { position: relative; display: inline-block; }
.action-menu summary {
    list-style: none;
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text);
    background: #fff;
}
.action-menu summary::-webkit-details-marker { display: none; }
.action-menu[open] summary { border-color: #d3f734; }
.action-menu__panel {
    position: absolute;
    right: 0;
    top: 42px;
    min-width: 160px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 1000;
}
.action-menu__panel a,
.action-menu__panel button {
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
}
.action-menu__panel a:hover,
.action-menu__panel button:hover { background: #f2f4ec; }
.action-menu__panel form { margin: 0; }
.action-menu__panel .action-menu__item { width: 100%; }
.logo-preview { margin: 6px 0 10px; }
.logo-preview img { max-width: 140px; max-height: 80px; border-radius: 10px; border: 1px solid var(--border); }

.tz-picker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fbfcf8;
}
.tz-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}
.tz-label svg { width: 16px; height: 16px; }
.tz-picker select {
    border: none;
    background: transparent;
    font-weight: 700;
    color: var(--text);
    padding: 2px 0;
}
.tz-picker select:focus { outline: none; }
.project-card {
    border: 1px solid #dde1e7;
    border-radius: 18px;
    background: #fff;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 14px 28px rgba(17, 24, 39, 0.08);
}
.project-card summary { list-style: none; cursor: pointer; }
.project-card summary::-webkit-details-marker { display: none; }
.project-card summary::after {
    content: '';
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
    justify-self: end;
}
.project-card[open] summary::after { transform: rotate(45deg); }
.project-summary {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: start;
    padding: 18px 20px;
    background: #ffffff;
    border-bottom: 1px solid #eef0f3;
}
.project-title { display: flex; flex-direction: column; gap: 6px; }
.project-name { font-family: var(--font-sans); font-size: 20px; font-weight: 800; }
.project-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
    flex-wrap: wrap;
}
.project-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 12px; }
.project-meta span {
    background: #f2f4f7;
    padding: 4px 10px;
    border-radius: 999px;
    color: #4b5563;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 700;
}
.project-highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    margin-top: 10px;
}
.project-highlight {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    color: var(--muted);
}
.project-highlight__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.project-highlight__value {
    color: var(--text);
    font-weight: 600;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}
.project-highlight--full { grid-column: 1 / -1; }
.project-highlight__text { flex: 1; }
.project-edit-btn {
    border: none;
    background: #f3f4f7;
    color: #6b7280;
    border-radius: 999px;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.project-edit-btn svg { width: 16px; height: 16px; }
.project-highlight__value:hover .project-edit-btn { opacity: 1; transform: translateY(-1px); }
.project-inline-edit {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}
.project-inline-edit input,
.project-inline-edit textarea {
    width: 100%;
}
.project-inline-edit__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.project-inline-edit--dates {
    gap: 8px;
}
.project-inline-edit--dates label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.project-highlight__value.is-editing {
    align-items: stretch;
    flex-direction: column;
}
.project-highlight__value.is-editing .project-highlight__text,
.project-highlight__value.is-editing .project-edit-btn { display: none; }
.project-highlight__value.is-editing .project-inline-edit { display: flex; }
.project-progress { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.progress-track {
    background: #eef0f3;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}
.progress-fill { background: #c6e400; height: 8px; }
.project-actions { display: flex; justify-content: flex-end; }
.project-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 18px 20px 22px;
}
.project-info { display: flex; flex-direction: column; gap: 12px; }
.project-rows { display: flex; flex-direction: column; gap: 12px; }
.project-rows__head {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 18px;
    align-items: center;
}
.project-rows__list { display: flex; flex-direction: column; gap: 10px; }
.project-row {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 18px;
    align-items: center;
}
.project-row.done { opacity: 0.7; }
.steps-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; color: var(--text); }
.step-row {
    border: 1px solid #dde1e7;
    border-radius: 14px;
    padding: 12px 14px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.step-link { color: inherit; text-decoration: none; }
.step-link:hover { color: #1d8f00; text-decoration: underline; }
.steps-list .step-row:nth-child(odd) { background: #ffffff; }
.steps-list .step-row:nth-child(even) { background: #f7f8fa; }
.step-row.done { opacity: 0.7; }
.step-title { font-weight: 700; font-family: var(--font-sans); }
.step-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; }
.step-dates { color: var(--text); font-weight: 600; }
.step-duration { color: var(--muted); }
.step-assignees { color: var(--muted); font-size: 13px; }
.step-actions { margin-top: 4px; }
.step-edit {
    color: #1d8f00;
    text-decoration: underline;
    font-size: 13px;
    font-weight: 600;
}
.step-edit:hover { color: #2c7b00; }

.timeline-head { display: flex; flex-direction: column; gap: 10px; }
.week-title { font-weight: 700; }
.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.week-grid.calendar-grid {
    grid-template-columns: repeat(var(--calendar-columns, 7), 90px);
    width: max-content;
}
.week-day {
    text-align: center;
    padding: 8px 6px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #dde1e7;
    font-size: 12px;
    font-weight: 700;
}
.week-date { font-weight: 600; color: var(--muted); }
.gantt-rows { display: flex; flex-direction: column; gap: 8px; }
.gantt-row { min-height: 44px; display: flex; align-items: center; }
.gantt-track {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    padding: 4px 0;
    border-bottom: 1px dashed #e2e6ec;
}
.gantt-bar {
    display: block;
    background: #d3f734;
    border: 1px solid #bfe62b;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #1f1f1f;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.gantt-bar--done { background: #f1f2f4; color: #4b5563; border-color: #dde1e7; }
.gantt-link { text-decoration: none; }
.gantt-link:hover { box-shadow: 0 0 0 2px rgba(45, 158, 0, 0.2); }
.gantt-empty { color: var(--muted); font-size: 12px; padding-left: 6px; }


.step-overview-card { padding: 22px; }
.step-overview__header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.step-overview__title {
    font-family: var(--font-sans);
    font-size: 22px;
    font-weight: 800;
}
.step-overview__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    margin-top: 6px;
}
.step-overview__dates {
    background: #fbfcf6;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
}
.step-overview__duration { font-size: 12px; color: var(--muted); margin-top: 4px; }
.step-overview__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.step-info {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    background: #ffffff;
}
.step-info__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 6px;
}
.step-info__value { color: var(--text); }

.step-comments { padding: 22px; }
.step-comments__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    margin-bottom: 12px;
}
.comment-list { display: flex; flex-direction: column; gap: 12px; }
.comment {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    background: #fbfcf6;
}
.comment__meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}
.comment__author { font-weight: 700; color: var(--text); }
.comment__body { color: var(--text); }
.comment-form { margin-top: 16px; }

label { display: block; margin-bottom: 12px; color: var(--muted); font-weight: 600; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], select, textarea {
    width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--border);
    background: #fbfcf8; color: var(--text); margin-top: 6px; font-size: 15px;
}
textarea { resize: vertical; }
body:not(.portal-body) label {
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
}
body:not(.portal-body) input[type="text"],
body:not(.portal-body) input[type="email"],
body:not(.portal-body) input[type="password"],
body:not(.portal-body) input[type="date"],
body:not(.portal-body) input[type="number"],
body:not(.portal-body) select,
body:not(.portal-body) textarea {
    border-radius: 12px;
    border-color: #dde1e7;
    background: #ffffff;
    font-size: 14px;
}
body:not(.portal-body) input[type="text"]:focus,
body:not(.portal-body) input[type="email"]:focus,
body:not(.portal-body) input[type="password"]:focus,
body:not(.portal-body) input[type="date"]:focus,
body:not(.portal-body) input[type="number"]:focus,
body:not(.portal-body) select:focus,
body:not(.portal-body) textarea:focus {
    outline: none;
    border-color: #c9cdd4;
    box-shadow: 0 0 0 3px rgba(198, 228, 0, 0.18);
}
.rte-toolbar { display: flex; gap: 8px; margin: 8px 0 6px; flex-wrap: wrap; }
.rte-toolbar button { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-weight: 800; }
.rte-toolbar button:hover { border-color: var(--accent); }
.rte { border: 1px solid var(--border); border-radius: 10px; background: #fff; min-height: 90px; padding: 10px; outline: none; }
.rte:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(198,228,0,0.25); }
.rte-hidden { display: none; }
.checkbox { display: flex; align-items: center; gap: 8px; color: var(--text); }
.form-actions { display: flex; gap: 8px; align-items: center; }
.filters { display: flex; gap: 10px; margin-bottom: 14px; }
.filters input[type="text"] { max-width: 340px; }
.booking-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.booking-controls .booking-filters { margin-bottom: 0; flex: 1; }
.booking-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.booking-items-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 16px;
    align-items: start;
}
.booking-items-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.booking-items-table .table-row.empty { grid-column: 1 / -1; }

.form-card { padding: 22px 24px; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 14px 18px;
}
.form-grid label { margin-bottom: 0; }
.form-grid .label,
.form-grid .logo-preview,
.form-grid .attachments,
.form-grid .form-actions,
.form-grid .rte-toolbar,
.form-grid .rte,
.form-grid .rte-hidden {
    grid-column: 1 / -1;
}
.form-span { grid-column: 1 / -1; }
.form-grid .logo-preview { margin-top: 6px; }
.form-grid .form-actions { margin-top: 6px; }

.table { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; font-size: var(--text-base); line-height: 1.45; }
.table.contacts-table { overflow: visible; }
.contacts-table .table-row { overflow: visible; }
.table-row { display: grid; grid-template-columns: 2fr 1.5fr 2fr 1.5fr; padding: 12px 14px; border-bottom: 1px solid var(--border); background: #fff; }
.table-head { background: var(--table-head-bg); font-weight: 700; color: var(--text); }
body:not(.portal-body) .table:not(.price-calc-table):not(.file-manager-table) {
    border-radius: 16px;
    border-color: #dde1e7;
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.06);
}
body:not(.portal-body) .table:not(.price-calc-table):not(.file-manager-table) .table-row {
    padding: 14px 16px;
    border-bottom-color: #eef0f3;
}
body:not(.portal-body) .table:not(.price-calc-table):not(.file-manager-table) .table-head {
    background: #f4f5f7;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
body:not(.portal-body) .crm-table-row--events { grid-template-columns: 2fr 1fr 1fr; }
.sku-panel {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 12px;
    max-height: 520px;
    overflow: auto;
    box-shadow: 0 10px 20px rgba(17, 24, 39, 0.05);
}
.sku-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.sku-panel__head h3 { margin: 0; font-size: 16px; }
.sku-panel__list { display: flex; flex-direction: column; gap: 10px; }
.sku-panel__item {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    background: #fbfcf8;
}
.sku-panel__title { font-weight: 700; margin-bottom: 6px; }
.sku-panel__desc { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.sku-panel__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
}
.sku-panel__empty { color: var(--muted); font-size: 13px; }
.sku-panel--compact { max-height: 360px; }

.price-calc-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
.price-calc-section { margin-bottom: 18px; }
.price-calc-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.price-calc-positions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 16px;
    align-items: start;
}
.price-calc-table .table-row {
    grid-template-columns: 2.4fr 0.8fr 1fr 1fr 0.6fr;
    gap: 12px;
    align-items: center;
}
.price-calc-row__sum { font-weight: 700; text-align: right; }
.price-calc-total {
    background: #f8faf2;
    font-weight: 700;
}
.price-calc-total__label {
    grid-column: 1 / 4;
    text-align: right;
    color: var(--muted);
}
.price-calc-total__value { text-align: right; }
.price-calc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 14px 18px;
}
.price-calc-grid label { margin-bottom: 0; }
.calc-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}
.price-calc-summary {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 20px rgba(17, 24, 39, 0.05);
}
.price-calc-summary h3 {
    margin: 0 0 12px;
    font-size: 18px;
}
.price-calc-summary__row,
.price-calc-summary__final {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.price-calc-summary__row span:first-child { color: var(--muted); }
.price-calc-summary__mult { font-weight: 700; }
.price-calc-summary__formula {
    margin: 12px 0;
    font-size: 12px;
    color: var(--muted);
}
.price-calc-summary__final {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    font-weight: 800;
    font-size: 18px;
}
.price-calc-summary__risk {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.risk-label { color: var(--muted); font-weight: 600; }
.risk-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.risk-pill--green { background: #dff7bf; color: #1f5f00; }
.risk-pill--yellow { background: #fff1b3; color: #7a5600; }
.risk-pill--orange { background: #ffd6a3; color: #7a3a00; }
.risk-pill--red { background: #ffc1c1; color: #7a0000; }

@media (max-width: 980px) {
    .booking-items-layout { grid-template-columns: 1fr; }
    .sku-panel { max-height: none; }
    .price-calc-positions { grid-template-columns: 1fr; }
    .price-calc-layout { grid-template-columns: 1fr; }
    .price-calc-table .table-row { grid-template-columns: 1.6fr 0.7fr 0.9fr 0.9fr 0.5fr; }
    .price-calc-summary { position: static; }
}
.file-manager-board { padding: 24px; }
.file-manager-filters { display: flex; align-items: flex-end; gap: 16px; margin: 0; }
.file-manager-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border: 1px solid #dde1e7;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 20px rgba(17, 24, 39, 0.05);
    margin-bottom: 12px;
}
.file-select-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 48px;
}
.file-manager-toolbar .checkbox { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.file-manager-toolbar button { white-space: nowrap; }
.file-upload-trigger { display: inline-flex; align-items: center; gap: 8px; }
.file-upload-trigger svg { width: 18px; height: 18px; }
.btn-danger {
    background: #ffe7e7;
    border-color: #ffb5b5;
    color: #7d1f1f;
}
.btn-danger:hover { background: #ffdada; }
.file-manager-table .table-row {
    grid-template-columns: 48px 74px 110px 2.4fr 1.1fr 1.3fr 1fr 90px;
    align-items: center;
    padding: 14px 16px;
    font-size: 13px;
}
.file-manager-table .table-head {
    background: #f4f5f7;
    font-weight: 700;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.file-manager-table .table-row > div { display: flex; align-items: center; justify-content: flex-start; }
.file-manager-table .table-row > div:last-child { justify-content: flex-end; }
.file-row { position: relative; }
.file-row.is-selected { background: #f1f3f7; }
.file-row.is-editing .file-name { display: none; }
.file-row.is-editing .file-inline-edit { display: grid; }
.file-thumb {
    width: 54px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #dde1e7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f3f4f7;
    color: #4b5563;
    font-weight: 700;
    font-size: 11px;
    text-decoration: none;
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-inline-edit {
    display: none;
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 8px 12px;
    align-items: center;
}
.file-inline-edit label { display: flex; flex-direction: column; gap: 4px; }
.file-inline-edit input,
.file-inline-edit select { width: 100%; }
.file-inline-actions { display: flex; gap: 8px; grid-column: 1 / -1; }
.tag-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: #f2f4f7;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.file-upload-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.file-upload-modal.is-open { display: flex; }
.file-upload-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 20, 0.35);
    backdrop-filter: blur(2px);
}
.file-upload-dialog {
    position: relative;
    width: 92%;
    max-width: 520px;
    background: #fff;
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 24px 50px rgba(20, 20, 20, 0.25);
    z-index: 1;
}
.file-upload-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.file-upload-body {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 16px;
}
.file-upload-form {
    display: grid;
    gap: 12px;
}
.file-upload-drop {
    position: relative;
    border: 2px dashed #d6dac9;
    border-radius: 14px;
    padding: 18px;
    background: #f7f8f1;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
}
.file-upload-drop.is-dragging { background: #f0f7d8; border-color: #c3d879; }
.file-upload-drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.file-upload-drop__inner {
    text-align: center;
    padding: 18px 0 6px;
}
.file-upload-drop__title { font-weight: 700; }
.file-upload-list {
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: var(--text);
    max-height: 120px;
    overflow: auto;
}
.file-upload-item {
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.file-upload-progress {
    height: 6px;
    border-radius: 999px;
    background: #e6ead8;
    overflow: hidden;
    display: none;
}
.file-upload-progress.is-visible { display: block; }
.file-upload-progress__bar {
    height: 100%;
    width: 0%;
    background: #c6e400;
}
.file-upload-status { min-height: 18px; }
.file-upload-hint { margin-top: 12px; font-size: 12px; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.table-row.empty { text-align: center; color: var(--muted); }
.table-summary { display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: var(--muted); font-size: 14px; }
.table-summary .label { background: #f2f4ec; color: var(--text); padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.table-summary .summary-total { color: var(--text); font-weight: 700; }
.booking-table .table-head {
    background: #f4f5f7;
    font-weight: 700;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.booking-table .table-row {
    align-items: center;
}
.booking-table .table-head > div,
.booking-table .table-row > div {
    display: flex;
    align-items: center;
}
.booking-table .type-text {
    font-size: 15px;
    font-weight: 600;
    text-transform: capitalize;
    color: var(--text);
}
.booking-table .status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    color: #1f1f1f;
}
.booking-table .status-draft { background: #9db0f4; color: #fff; }
.booking-table .status-sent { background: #f0f7ad; }
.booking-table .status-paid { background: #fde9ff; }
.table-summary {
    justify-content: flex-end;
    margin-top: 16px;
    padding: 12px 14px;
    background: #f9faf2;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 15px;
    gap: 10px;
}
.table-summary .label { text-transform: uppercase; letter-spacing: 0.8px; font-size: 11px; }
body:not(.portal-body) .table-summary {
    background: #ffffff;
    border-color: #dde1e7;
    border-radius: 14px;
    box-shadow: 0 10px 20px rgba(17, 24, 39, 0.05);
}
body:not(.portal-body) .badge {
    font-size: 11px;
    letter-spacing: 0.02em;
    font-weight: 700;
}
.brief-detail-table .table-row { grid-template-columns: 220px 1fr; text-align: left; }
.brief-detail-table .table-head { background: var(--table-head-bg); }
.brief-detail-table .table-row > div { justify-content: flex-start; }
.brief-detail-table .table-row > div:first-child {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
    font-weight: 700;
}

.badge { background: #eef4dd; color: #3b3f26; padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.badge-ok { background: #e1f6c0; color: #2c7b00; }
.badge-warn { background: #ffe7c4; color: #ad5a00; }

.grid-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.grid-two > div { padding: 4px 0; }
.label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px; display: block; }
.grid-two .value { font-size: 16px; font-weight: 600; color: var(--text); }

.contact-overview { display: flex; flex-direction: column; gap: 18px; }
.contact-summary { padding: 18px 22px; }
.contact-summary__grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}
.contact-summary__item .value { font-size: 15px; font-weight: 600; color: var(--text); }
.contact-summary__item--address .value { line-height: 1.4; }
.contact-summary .lead-badge { width: auto; height: 34px; padding: 0 18px; font-size: 13px; }

.btn-small { padding: 6px 12px; border-radius: 8px; font-size: 13px; }

.contact-panels { padding: 18px 20px; }
.contact-panels__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}
.contact-panel { display: flex; flex-direction: column; gap: 10px; }
.contact-panel + .contact-panel { border-left: 1px solid var(--border); padding-left: 18px; }
.contact-panel__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.contact-panel__header h2 { font-size: 18px; margin: 0; }

.mini-table { display: flex; flex-direction: column; gap: 6px; }
.mini-table__head,
.mini-table__row {
    display: grid;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
}
.mini-table__head {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.8px;
    color: var(--muted);
    font-weight: 700;
}
.mini-table__row { border-top: 1px solid var(--border); }
.mini-table__sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
.mini-table--contacts .mini-table__head,
.mini-table--contacts .mini-table__row { grid-template-columns: 1.2fr 1fr 1.2fr 60px; }
.mini-table--docs .mini-table__head,
.mini-table--docs .mini-table__row { grid-template-columns: 1.6fr 1fr 90px; }

.note-snippets { display: flex; flex-direction: column; gap: 12px; }
.note-snippet { border-top: 1px solid var(--border); padding-top: 10px; }
.note-snippet:first-child { border-top: none; padding-top: 0; }
.note-snippet__meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; gap: 8px; }
.note-snippet__type { width: fit-content; margin-top: 6px; }
.note-snippet__body {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.note-snippet__actions { margin-top: 6px; }

.activity-log { padding: 18px 20px; }
.activity-log__header { align-items: center; }
.activity-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.activity-filter-btn.is-active { border-color: var(--text); }
.activity-form {
    display: none;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    margin-bottom: 16px;
}
.activity-form.is-visible { display: grid; }
.activity-form__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.activity-form textarea { min-height: 110px; resize: vertical; }
.activity-form__actions { display: flex; gap: 10px; align-items: center; }
.activity-error { color: #7d1f1f; font-size: 12px; }
.activity-toast {
    background: #eef4dd;
    border: 1px solid #d6e6b5;
    color: #3b3f26;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 12px;
}
.activity-items { display: flex; flex-direction: column; gap: 12px; }
.activity-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.activity-item__header { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; }
.activity-item__main { display: flex; flex-direction: column; gap: 8px; flex: 1; cursor: pointer; }
.activity-item__type { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.activity-item__icon svg { width: 18px; height: 18px; }
.activity-item__content {
    font-size: 13px;
    color: var(--text);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.activity-item.is-expanded .activity-item__content {
    -webkit-line-clamp: unset;
    overflow: visible;
    display: block;
}
.activity-item__meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 12px; }
.activity-item__actions { display: flex; gap: 8px; align-items: center; }
.activity-item.is-editing .activity-item__main { display: none; }
.activity-item.is-editing .activity-form--edit { display: grid; }
.activity-form--edit { display: none; margin-top: 4px; }
.activity-empty { text-align: center; padding: 24px 10px; color: var(--muted); }
.activity-empty__title { font-weight: 600; margin-bottom: 6px; color: var(--text); }
.activity-empty__sub { font-size: 13px; }

.contact-assets { padding: 18px 20px; }
.contact-assets__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.contact-asset {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 240px;
    position: relative;
}
.portal-body .contact-asset {
    border-color: #dde1e7;
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.06);
}
.contact-asset__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: auto;
}
.portal-download-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.portal-download-icon svg { width: 16px; height: 16px; }
.portal-download-icon:hover { border-color: var(--accent); background: #f7f8f0; }
.contact-asset__thumb {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f3f4f7;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    overflow: hidden;
}
.contact-asset__thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.portal-body .contact-asset__thumb {
    height: auto;
    aspect-ratio: 16 / 9;
    background: #f1f2f6;
}
.portal-body .contact-asset__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.brand-kit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.brand-kit-title {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 24px;
}
.brand-kit-download-all[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}
.brand-kit-card h2 { margin: 0; font-family: var(--font-sans); }
.brand-kit-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.brand-kit-section__header--spaced { margin-top: 28px; }
.brand-kit-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.brand-kit-tile {
    border: 1px solid #dde1e7;
    border-radius: 16px;
    padding: 14px;
    background: #fff;
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.06);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 260px;
}
.brand-kit-preview {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f1f2f6;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}
.brand-kit-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.brand-kit-preview__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #6b7280;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.brand-kit-preview__placeholder svg { width: 28px; height: 28px; }
.brand-kit-preview.is-placeholder .brand-kit-preview__placeholder { opacity: 1; }
.brand-kit-preview.is-placeholder img { display: none; }
.brand-kit-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.brand-kit-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.brand-kit-type {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #e2e5ea;
    background: #f7f8fa;
    color: #505b6a;
}
.brand-kit-filename {
    font-size: 12px;
    color: var(--muted);
}
.brand-kit-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}
.brand-kit-empty {
    border: 1px dashed #d3d8df;
    border-radius: 12px;
    padding: 16px;
    background: #f7f8fa;
    color: var(--muted);
    font-size: 13px;
}
.brand-kit-empty-card h2 { margin-top: 0; }
.brand-kit-colors {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.brand-kit-color-row {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
}
.brand-kit-color-swatch {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    border: 1px solid var(--border);
}
.brand-kit-color-hex { font-weight: 600; }
.brand-kit-color-name { font-size: 12px; color: var(--muted); }
.brand-kit-copy.is-copied {
    border-color: var(--accent);
    background: #f7f8f0;
}
.portal-overview-page .page-tabs {
    position: sticky;
    top: 0;
    z-index: 8;
    background: var(--bg);
    padding-top: 10px;
}
.portal-snapshot-page .page-tabs {
    background: #ffffff;
    border: 1px solid #dde1e7;
    border-radius: 18px;
    padding: 10px 12px;
    box-shadow: 0 14px 28px rgba(17, 24, 39, 0.08);
    gap: 10px;
    margin-bottom: 12px;
}
.portal-snapshot-page .snapshot-header__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.portal-snapshot-page .snapshot-range {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.portal-snapshot-page .snapshot-range__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    font-weight: 600;
}
.portal-snapshot-page .snapshot-range__select {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    background: #fff;
    color: var(--text);
    font-weight: 600;
}
.portal-snapshot-page .snapshot-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}
.portal-snapshot-page .snapshot-coverage {
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}
.portal-snapshot-page .snapshot-title-sub {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.portal-snapshot-page .snapshot-section {
    margin-top: 16px;
}
.portal-snapshot-page .snapshot-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.portal-snapshot-page .snapshot-kpi {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
}
.portal-snapshot-page .snapshot-kpi--secondary {
    background: #f8f9fb;
    border-color: #e7eaef;
}
.portal-snapshot-page .snapshot-kpi__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    font-weight: 600;
}
.portal-snapshot-page .snapshot-kpi__value {
    margin-top: 6px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}
.portal-snapshot-page .snapshot-kpi__change {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
}
.portal-snapshot-page .snapshot-kpi__change--up { color: #1f7a28; }
.portal-snapshot-page .snapshot-kpi__change--down { color: #b42318; }
.portal-snapshot-page .snapshot-kpi__change--flat { color: var(--muted); }
.portal-snapshot-page .snapshot-kpi__change--na { color: var(--muted); }
.portal-snapshot-page .snapshot-platform {
    display: grid;
    gap: 14px;
}
.portal-snapshot-page .snapshot-platform__title {
    font-size: 20px;
    font-weight: 700;
}
.portal-snapshot-page .snapshot-platform__meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted);
}
.portal-snapshot-page .snapshot-platform__meta span + span::before {
    content: '•';
    margin: 0 8px 0 0;
}
.portal-snapshot-page .snapshot-group {
    display: grid;
    gap: 8px;
}
.portal-snapshot-page .snapshot-group__title {
    font-size: 14px;
    font-weight: 700;
}
.portal-snapshot-page .snapshot-context {
    font-size: 12px;
    color: var(--muted);
}
.portal-snapshot-page .snapshot-empty {
    display: grid;
    gap: 6px;
    color: var(--text);
}
.portal-snapshot-page .snapshot-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.portal-snapshot-page .snapshot-trend-stack {
    display: grid;
    gap: 14px;
}
.portal-snapshot-page .snapshot-trend-stack--muted .snapshot-chart-card {
    background: #f7f8fa;
    border-color: #e7eaef;
}
.portal-snapshot-page .snapshot-chart-card {
    border: 0;
    border-radius: 12px;
    padding: 14px;
    background: #fff;
    display: grid;
    gap: 10px;
}
.portal-snapshot-page .snapshot-chart-card--t1 {
    padding: 18px;
}
.portal-snapshot-page .snapshot-chart-card--t2 {
    padding: 14px;
}
.portal-snapshot-page .snapshot-chart-card--t3 {
    padding: 12px;
    background: #f8f9fb;
}
.portal-snapshot-page .snapshot-chart__header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.portal-snapshot-page .snapshot-chart__trend {
    font-size: 11px;
    color: #9aa0a6;
    font-weight: 500;
}
.portal-snapshot-page .snapshot-chart__trend--up { color: #1f7a28; }
.portal-snapshot-page .snapshot-chart__trend--down { color: #b42318; }
.portal-snapshot-page .snapshot-chart__trend--flat { color: #9aa0a6; }
.portal-snapshot-page .snapshot-chart {
    width: 100%;
    height: 120px;
    display: block;
    color: #8b9097;
    position: relative;
}
.portal-snapshot-page .snapshot-chart--t1 {
    height: 150px;
    color: #5f6368;
}
.portal-snapshot-page .snapshot-chart--t2 {
    height: 110px;
    color: #8b9097;
}
.portal-snapshot-page .snapshot-chart--t3 {
    height: 100px;
    color: #a5abb1;
}
.portal-snapshot-page .snapshot-chart__line {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
}
.portal-snapshot-page .snapshot-chart--area .snapshot-chart__line {
    color: #6b7280;
}
.portal-snapshot-page .snapshot-chart__area {
    stroke: none;
}
.portal-snapshot-page .snapshot-chart__accent {
    fill: none;
    stroke: #d3f734;
    stroke-width: 2.8;
}
.portal-snapshot-page .snapshot-chart__dot {
    fill: #d3f734;
}
.portal-snapshot-page .snapshot-chart__empty {
    font-size: 12px;
    color: #b0b4bb;
    text-align: center;
}
.portal-snapshot-page .snapshot-chart canvas,
.portal-snapshot-page .snapshot-chart > div {
    width: 100%;
    height: 100%;
}
.portal-snapshot-page .snapshot-contrib-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.portal-snapshot-page .snapshot-donut {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    display: grid;
    gap: 8px;
}
.portal-snapshot-page .snapshot-donut__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.portal-snapshot-page .snapshot-donut__chart {
    position: relative;
    width: 140px;
    height: 140px;
}
.portal-snapshot-page .snapshot-donut__chart canvas,
.portal-snapshot-page .snapshot-donut__chart > div {
    width: 100%;
    height: 100%;
}
.portal-snapshot-page .snapshot-donut__chart svg {
    width: 140px;
    height: 140px;
}
.portal-snapshot-page .snapshot-donut__bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 3.2;
}
.portal-snapshot-page .snapshot-donut__fill {
    fill: none;
    stroke: #d3f734;
    stroke-width: 3.2;
    stroke-linecap: round;
}
.portal-snapshot-page .snapshot-donut__value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}
.portal-snapshot-page .snapshot-donut__meta {
    font-size: 12px;
    color: var(--muted);
}
@media (max-width: 720px) {
    .portal-snapshot-page .page-tabs {
        padding: 8px 10px;
    }
    .portal-snapshot-page .page-tabs .contact-subnav {
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .portal-snapshot-page .page-tabs .contact-subnav .page-tab {
        padding: 8px 12px;
        border-radius: 999px;
        background: #f3f4f6;
        font-size: 13px;
        white-space: nowrap;
        border: 1px solid transparent;
    }
    .portal-snapshot-page .page-tabs .contact-subnav .page-tab.active {
        background: #111111;
        color: #ffffff;
    }
    .portal-snapshot-page .page-tabs .contact-subnav .page-tab::after {
        display: none;
    }
    .portal-snapshot-page .snapshot-chart {
        height: 140px;
    }
    .portal-snapshot-page .snapshot-chart--t1 { height: 170px; }
    .portal-snapshot-page .snapshot-chart--t2 { height: 130px; }
    .portal-snapshot-page .snapshot-chart--t3 { height: 120px; }
    .portal-snapshot-page .snapshot-hero-grid,
    .portal-snapshot-page .snapshot-contrib-grid {
        grid-template-columns: 1fr;
    }
    .portal-snapshot-page .snapshot-range {
        width: 100%;
        justify-content: space-between;
    }
    .portal-snapshot-page .snapshot-range__select {
        flex: 1 1 auto;
        width: 100%;
    }
}
.portal-snapshot-page .snapshot-table .table-row,
.portal-snapshot-page .snapshot-table .table-head {
    grid-template-columns: 180px 1fr 1fr 1fr;
    align-items: center;
    text-align: center;
}
.portal-overview {
    display: grid;
    gap: 16px;
}
.portal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
}
.portal-header__logo {
    width: 48px;
    height: 36px;
    border-radius: 10px;
    background: #f4f6f9;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--muted);
    overflow: hidden;
}
.portal-header__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.portal-header__name {
    font-size: 16px;
    font-weight: 700;
}
.portal-header__meta {
    font-size: 12px;
    color: var(--muted);
}
.portal-section {
    display: grid;
    gap: 12px;
}
.portal-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.portal-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.tab-unsaved {
    font-size: 11px;
    color: var(--muted);
    opacity: 0;
    transition: opacity 160ms ease;
}
.tab-unsaved.is-visible {
    opacity: 1;
}
.portal-summary-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.portal-doc-list {
    display: grid;
    gap: 14px;
}
.portal-doc-card {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
    gap: 16px;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #fff;
    align-items: center;
}
.portal-doc-card__title {
    font-weight: 700;
    font-size: 16px;
}
.portal-doc-card__meta {
    font-size: 13px;
    color: var(--muted);
}
.portal-doc-card__helper {
    font-size: 13px;
    margin-top: 6px;
    color: #2f3640;
}
.portal-doc-card__status {
    display: grid;
    gap: 4px;
}
.portal-doc-card__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.portal-doc-header {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    display: grid;
    gap: 12px;
}
.portal-doc-header h1 {
    margin: 0;
}
.portal-doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
}
.portal-doc-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.portal-doc-description {
    margin: 0;
    color: #2f3640;
}
.portal-doc-decision {
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    background: #fff;
    display: grid;
    gap: 12px;
}
.portal-doc-decision__form {
    display: grid;
    gap: 12px;
    max-width: 680px;
}
.portal-doc-decision__checkbox {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.portal-doc-decision__helper {
    font-size: 13px;
    color: var(--muted);
}
.portal-doc-decision__details {
    font-size: 13px;
    color: var(--muted);
    display: grid;
    gap: 6px;
}
.portal-doc-decision__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.portal-doc-decision--info {
    background: #f8fafc;
}
.portal-doc-decision--success {
    background: #f0f9e8;
    border-color: #bde79a;
}
.portal-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.status-badge--active {
    background: #e7f5da;
    color: #1f5d1f;
    border-color: #cbe8b9;
}
.status-badge--disabled {
    background: #fbe7e7;
    color: #8a1f1f;
    border-color: #f1c5c5;
}
.status-badge--sent {
    background: #e8eef6;
    color: #274060;
    border-color: #cbd7e6;
}
.status-badge--pending {
    background: #fff2c7;
    color: #7a5600;
    border-color: #f1d589;
}
.status-badge--accepted {
    background: #e1f6c0;
    color: #2c7b00;
    border-color: #bde79a;
}
.status-badge--draft {
    background: #f0f1f4;
    color: #5a5f66;
    border-color: #d7dbe0;
}
.visibility-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: #f5f6f8;
    color: var(--muted);
}
.visibility-badge.is-visible {
    color: #1f5d1f;
    background: #edf6e2;
    border-color: #cbe8b9;
}
.portal-mini-list {
    display: grid;
    gap: 8px;
}
.portal-mini-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}
.portal-mini-row a {
    text-decoration: none;
    color: var(--text);
}
.portal-mini-row .muted {
    font-size: 12px;
}
.portal-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.portal-info-value {
    font-weight: 700;
}
.copy-feedback {
    font-size: 11px;
    color: var(--muted);
    opacity: 0;
    transition: opacity 160ms ease;
}
.copy-feedback.is-visible {
    opacity: 1;
}
.switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.switch-track {
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: #d7dce3;
    position: relative;
    transition: background 160ms ease;
    flex: 0 0 auto;
}
.switch-track::after {
    content: '';
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: transform 160ms ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}
.switch input:checked + .switch-track {
    background: var(--accent);
}
.switch input:checked + .switch-track::after {
    transform: translateX(16px);
}
.portal-list {
    display: grid;
    gap: 10px;
}
.portal-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px 120px 100px auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
}
.portal-list-name {
    display: grid;
    gap: 4px;
}
.portal-list-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.portal-asset-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    font-size: 12px;
}
.portal-asset-badge {
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #f5f6f8;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
}
.portal-asset--hidden {
    opacity: 0.6;
}
.portal-asset-badge--hidden {
    background: #fbe7e7;
    color: #8a1f1f;
    border-color: #f1c5c5;
}
.brand-color-remove {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
}
.brand-color-remove input {
    accent-color: #c0392b;
}
.password-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.password-value {
    display: none;
}
.password-field.is-visible .password-value {
    display: inline;
}
.password-field.is-visible .password-mask {
    display: none;
}
.password-toggle svg {
    width: 16px;
    height: 16px;
}
.brand-color-table {
    display: grid;
    gap: 8px;
}
.brand-color-row {
    display: grid;
    grid-template-columns: minmax(160px, 1.2fr) minmax(140px, 0.9fr) 120px 120px 120px 120px minmax(140px, 0.9fr);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}
.brand-color-row--head {
    background: #f5f6f8;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
}
.brand-color-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.brand-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
}
.brand-color-input {
    width: 100%;
}
.brand-color-hex-input.is-invalid {
    border-color: #c0392b;
    background: #fff0f0;
}
.brand-color-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.portal-table-empty {
    padding: 12px;
    border-radius: 12px;
    border: 1px dashed var(--border);
    background: #f8f9fb;
    color: var(--muted);
    font-size: 13px;
}
@media (max-width: 1200px) {
    .brand-kit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .brand-kit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-list-row { grid-template-columns: 1fr; align-items: start; }
    .portal-list-actions { justify-content: flex-start; }
    .portal-doc-card { grid-template-columns: 1fr; align-items: start; }
    .portal-doc-card__actions { justify-content: flex-start; }
    .portal-doc-meta { flex-direction: column; align-items: flex-start; }
    .brand-color-row { grid-template-columns: 1fr; align-items: start; }
    .brand-color-row--head { display: none; }
}
@media (max-width: 640px) {
    .brand-kit-header { flex-direction: column; align-items: flex-start; }
    .brand-kit-grid { grid-template-columns: 1fr; }
}
.portal-preview {
    pointer-events: none;
}
.portal-preview.is-open {
    pointer-events: auto;
}
.portal-preview {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.portal-preview.is-open { display: flex; }
.portal-preview__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 20, 12, 0.6);
}
.portal-preview__panel {
    position: relative;
    width: min(920px, 92vw);
    height: min(640px, 80vh);
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    z-index: 1;
}
.portal-preview__image {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}
.portal-preview.is-image .portal-preview__image { display: block; }
.portal-preview.is-image .portal-preview__frame { display: none; }
.portal-preview__frame {
    width: 100%;
    height: 100%;
    border: 0;
}
.portal-preview__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.portal-auth-body {
    background: #e7e7ed;
}
.portal-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 44%) minmax(320px, 56%);
}
.portal-auth__panel {
    padding: clamp(32px, 6vw, 72px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    background: transparent;
}
.portal-auth__header h1 {
    margin: 0 0 6px;
    font-size: clamp(30px, 3.6vw, 40px);
    font-weight: 800;
}
.portal-auth__kicker {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6a6f77;
    margin-bottom: 8px;
}
.portal-auth__form {
    display: grid;
    gap: 14px;
    max-width: 460px;
}
.portal-auth__card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #dfe3e9;
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.08);
    padding: 22px;
    width: min(520px, 100%);
}
.portal-auth__form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
    color: #3a3f46;
}
.portal-auth__form input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #d7dbe0;
    background: #fff;
    font-size: 15px;
}
.portal-auth__form .btn {
    width: fit-content;
}
.portal-auth__aside {
    background: #f1f2f6;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(32px, 5vw, 64px);
    position: relative;
    overflow: hidden;
}
.portal-auth__aside::before { display: none; }
.portal-auth__brand {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 16px;
    justify-items: center;
    text-align: center;
}
.portal-auth__brand img {
    width: min(220px, 52vw);
    height: auto;
}
.portal-auth__brand-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
}
.portal-auth__brand-subtitle {
    font-size: 18px;
    font-weight: 600;
}
.portal-auth__brand-help {
    font-size: 13px;
    font-weight: 600;
}
.portal-topbar {
    gap: 12px;
}
.portal-topbar__left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.portal-logo img {
    width: 140px;
    height: auto;
    border-radius: 0;
}
.portal-logo span {
    font-weight: 700;
}
.portal-nav-toggle {
    display: none;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 10px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-direction: column;
    cursor: pointer;
}
.portal-nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: #1f1f1f;
    border-radius: 999px;
}
@media (max-width: 980px) {
    .portal-auth {
        grid-template-columns: 1fr;
    }
    .portal-auth__aside {
        order: -1;
        min-height: 280px;
    }
    .portal-auth__panel {
        align-items: center;
        text-align: center;
    }
    .portal-auth__form {
        width: 100%;
        max-width: 520px;
    }
}
@media (max-width: 900px) {
    .portal-shell {
        grid-template-columns: 1fr;
    }
    .portal-sidebar {
        position: fixed;
        right: 0;
        left: auto;
        top: 0;
        width: min(82vw, 320px);
        transform: translateX(110%);
        transition: transform 0.2s ease;
        height: 100vh;
        z-index: 7;
        box-shadow: inset 3px 0 0 #d3f734;
    }
    .portal-shell.is-mobile-open .portal-sidebar {
        transform: translateX(0);
    }
    .portal-sidebar-toggle {
        display: none;
    }
    .portal-shell.is-collapsed .portal-brand__text,
    .portal-shell.is-collapsed .portal-side-nav__label,
    .portal-shell.is-collapsed .portal-account,
    .portal-shell.is-collapsed .portal-logout span {
        display: block;
    }
    .portal-shell.is-collapsed .portal-logout span {
        display: inline;
    }
    .portal-shell.is-collapsed .portal-sidebar__top {
        flex-direction: row;
    }
    .portal-shell.is-collapsed .portal-side-nav__item {
        justify-content: flex-start;
    }
    .portal-shell.is-collapsed .portal-side-nav__item::after,
    .portal-shell.is-collapsed .portal-logout::after {
        display: none;
    }
    .portal-main__top {
        padding: max(12px, env(safe-area-inset-top)) 16px 12px;
        background: #fff;
        border-bottom: 3px solid #d3f734;
        position: sticky;
        top: 0;
        z-index: 5;
        justify-content: space-between;
    }
    .portal-main__brand {
        display: inline-flex;
    }
    .portal-main__title {
        font-size: 18px;
        flex: 1;
        text-align: center;
    }
    .portal-mobile-toggle {
        display: inline-flex;
    }
    .portal-content {
        padding: 0 20px 24px;
        max-width: 100%;
    }
    .portal-main {
        margin-left: 0;
    }
    .booking-doc {
        overflow: hidden;
        display: flex;
        justify-content: center;
    }
    .booking-pages {
        transform-origin: top center;
        width: max-content;
        margin: 0 auto;
        gap: 16px;
    }
    .booking-page {
        margin: 0;
        break-after: auto;
        page-break-after: auto;
    }
    .portal-sidebar__inner {
        padding: max(12px, env(safe-area-inset-top)) 16px 16px;
        position: relative;
    }
    .portal-mobile-close {
        display: inline-flex;
        top: max(12px, env(safe-area-inset-top));
        right: 12px;
        padding: 0;
        background: transparent;
        border: 0;
        color: #111111;
    }
    .portal-mobile-close svg {
        fill: #111111;
    }
    .portal-sidebar__top {
        display: none;
    }
    .portal-sidebar__footer {
        order: -1;
        border-top: 0;
        padding-top: 0;
        padding-bottom: 12px;
        margin-bottom: 8px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }
    .portal-account {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    .portal-account__label {
        font-size: 10px;
        letter-spacing: 1px;
    }
    .portal-account__name {
        font-size: 16px;
        font-weight: 700;
    }
    .portal-logout {
        margin-top: 8px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 10px 12px;
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        background: #fff;
    }
    .portal-dashboard-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .portal-dashboard {
        gap: 12px;
    }
    .portal-work-card {
        display: grid;
        gap: 8px;
    }
    .portal-card-button {
        width: 100%;
        justify-content: center;
    }
    .portal-reference {
        display: grid;
        gap: 12px;
    }
    .portal-reference > div {
        display: grid;
        gap: 10px;
    }
    .portal-reference > div + div {
        border-top: 1px solid #eef0f3;
        padding-top: 12px;
    }
    .contact-assets__grid.brand-kit-carousel {
        grid-auto-columns: minmax(140px, 1fr);
        gap: 12px;
    }
    .portal-body .card {
        padding: 20px;
        border-radius: 16px;
        box-shadow: 0 10px 22px rgba(17, 24, 39, 0.08);
    }
    .portal-action-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px 16px;
        border-radius: 16px;
    }
    .portal-action-banner__label {
        letter-spacing: 0.6px;
    }
    .portal-action-banner__list {
        padding-left: 16px;
        font-size: 13px;
    }
    .portal-action-banner__summary {
        font-size: 13px;
    }
    .portal-action-banner__cta {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
    .portal-project-status__name {
        font-size: 20px;
    }
    .portal-project-status__current {
        font-size: 13px;
    }
    .portal-project-status__meta {
        font-size: 12px;
    }
    .portal-progress {
        height: 6px;
    }
    .portal-action-bar {
        grid-template-columns: 1fr;
    }
    .portal-action-bar__divider {
        display: none;
    }
}
@media (min-width: 901px) {
    .portal-main__top--no-title {
        display: none;
    }
}
@media (max-width: 640px) {
    .portal-body h1 { font-size: 26px; }
    .portal-body h2 { font-size: 20px; }
    .portal-body .card {
        padding: 16px;
        border-radius: 14px;
    }
    .portal-action-banner {
        padding: 12px 14px;
        border-radius: 14px;
    }
    .portal-action-banner__label {
        font-size: 11px;
    }
    .portal-project-status__name {
        font-size: 18px;
    }
    .portal-dashboard-grid {
        gap: 10px;
    }
    .portal-auth__aside {
        min-height: 220px;
    }
    .portal-auth__brand img {
        width: min(180px, 60vw);
    }
    .portal-preview__panel {
        width: 100vw;
        height: 100svh;
        border-radius: 0;
    }
    .portal-preview__close {
        top: max(12px, env(safe-area-inset-top));
        right: max(12px, env(safe-area-inset-right));
        width: 40px;
        height: 40px;
        font-size: 26px;
    }
    .portal-download-icon {
        width: 28px;
        height: 28px;
    }
    .portal-download-icon svg {
        width: 20px;
        height: 20px;
    }
}
.contact-asset__name { font-size: 12px; color: var(--text); word-break: break-word; }
.contact-asset .icon-action { align-self: flex-start; }
.file-thumb {
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--muted);
    font-size: 14px;
}
.file-thumb--pdf { color: #c0392b; }

.contact-tasks .task { padding: 12px 0; }

.note { border-top: 1px solid var(--border); padding: 10px 0; }
.note:first-of-type { border-top: none; }
.note-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; gap: 8px; }
.note-body { white-space: pre-wrap; margin-top: 4px; }
.attachments { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.attachment-item { border: 1px solid var(--border); border-radius: 8px; padding: 8px; background: #fbfcf8; display: flex; flex-direction: column; gap: 6px; }
.attachment-item img { width: 256px; max-width: 100%; max-height: 256px; object-fit: cover; border-radius: 6px; display: block; margin: 0 auto; }
.attachment-item embed { width: 100%; height: 256px; border: none; border-radius: 6px; }
.empty { color: var(--muted); padding: 10px 0; }
.notification { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.notification:last-child { border-bottom: none; }
.notification--unread .notification-title { font-weight: 800; }
.notification--read { opacity: 0.8; }
.notification-title { font-family: var(--font-sans); font-weight: 700; }
.notification-body { color: var(--text); margin-top: 2px; }
.notification-meta { color: var(--muted); font-size: 12px; margin-top: 6px; }

.task-list .task, .task-list form { margin: 0; }
.task { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.task:last-child { border-bottom: none; }
.task-title { font-weight: 700; font-family: var(--font-sans); }
.task-meta { color: var(--muted); font-size: 13px; }
.task.done .task-title { text-decoration: line-through; color: var(--muted); }

.alert { background: #ffecec; border: 1px solid #e0a5a5; padding: 10px; border-radius: 10px; margin-bottom: 12px; }

.narrow { max-width: 520px; margin: 0 auto; }
.subactions { margin-top: 16px; display: flex; gap: 16px; }

.email-card { padding: 24px 26px 30px; }
.email-card .card-header { padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.email-card .card-header h1 { font-size: 22px; }
.btn-icon { display: inline-flex; align-items: center; gap: 8px; }
.btn-icon .icon { width: 16px; height: 16px; display: inline-flex; }
.btn-icon .icon svg { width: 16px; height: 16px; }
.btn-connect { background: #96d5ee; border-color: #96d5ee; color: #0f1c22; }
.btn-connect:hover { background: #84c7e3; border-color: #84c7e3; }
.email-tabs { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; }
.email-tabs-left { display: flex; gap: 10px; flex-wrap: wrap; }
.email-tabs-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.email-tab {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 14px;
    background: #f4f6ef;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: inherit;
    appearance: none;
}
.email-tab.active {
    background: var(--accent);
    border-color: #b7da2c;
    color: #141414;
}
.email-layout { display: grid; grid-template-columns: 38% 62%; gap: 22px; }
.email-layout--compose { grid-template-columns: 1fr; }
.email-list {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #f9faf2;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}
.email-list.chat-list { overflow: visible !important; position: relative; z-index: 1; }
.email-list.chat-list .action-menu__panel { z-index: 2000; }
.chat-list .empty { padding: 12px 16px; }
.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}
.email-list-title { font-weight: 800; font-size: 16px; font-family: var(--font-sans); }
.email-list-subtitle { color: var(--muted); font-size: 12px; margin-top: 2px; }
.email-list-tabs {
    display: flex;
    gap: 8px;
    padding: 10px 14px 6px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.email-list-tab {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    background: #f6f7f0;
}
.email-list-tab.active {
    background: #1f1f1f;
    color: #fff;
    border-color: #1f1f1f;
}
.email-list-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    background: transparent;
    transition: background 0.2s ease;
}
.email-list-item:hover { background: #edf2dd; }
.email-list-item.active { background: #e1f6c0; }
.email-list-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
}
.email-list-content { min-width: 0; }
.email-list-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.email-list-subject { font-weight: 700; font-family: var(--font-sans); font-size: 14px; }
.email-list-date { color: var(--muted); font-size: 12px; white-space: nowrap; }
.email-list-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.email-list-snippet { margin-top: 6px; color: var(--text); font-size: 13px; line-height: 1.35; }
.email-list-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px 16px;
    background: #fff;
    border-top: 1px solid var(--border);
    flex-direction: row;
    flex-wrap: nowrap;
}
.pager-pages { display: flex; gap: 6px; flex-wrap: nowrap; }
.pager-link {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    background: #f6f7f0;
    text-decoration: none;
}
.pager-link.active {
    background: #1f1f1f;
    color: #fff;
    border-color: #1f1f1f;
}
.pager-link.disabled { opacity: 0.5; pointer-events: none; }
.email-detail {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 22px;
    background: #fff;
    min-height: 0;
    height: 100%;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.email-layout--compose .email-detail { max-width: 780px; margin: 0 auto; }
.email-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.email-detail-subject { font-weight: 800; font-size: 18px; font-family: var(--font-sans); }
.email-detail-meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.email-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.email-detail-info { color: var(--text); font-size: 13px; line-height: 1.5; margin-bottom: 12px; }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.compose-form input[type="email"], .compose-form input[type="text"] { width: 100%; margin-bottom: 8px; }
.email-body {
    border-top: 1px solid var(--border);
    padding-top: 14px;
    white-space: normal;
    overflow: auto;
    flex: 1;
    min-height: 0;
}
.email-detail-head,
.email-detail-info {
    flex-shrink: 0;
}
.email-body-html {
    height: 100%;
}
.email-body img { max-width: 100%; height: auto; }
.email-body table { width: 100%; border-collapse: collapse; }
.email-body iframe { width: 100%; min-height: 400px; border: none; }
.email-body-html { padding: 12px; background: #fff; border-radius: 10px; }
.email-body-html * { max-width: 100%; }
.email-body-html table { width: auto; }
.compose-modal {
    position: absolute !important;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none !important;
    align-items: flex-start;
    justify-content: center;
    padding-top: 40px;
    z-index: 999;
}
.compose-modal.is-open { display: flex !important; }
.compose-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(2px);
}
.compose-dialog {
    position: relative;
    width: 80%;
    max-width: 1200px;
    height: 82vh;
    max-height: calc(100vh - 140px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    overflow: visible;
    z-index: 1;
    margin: 0;
}
.compose-head {
    background: #dff7b8;
    padding: 18px 22px;
    font-size: 20px;
    font-weight: 800;
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.compose-close {
    border: 1px solid rgba(17, 17, 17, 0.2);
    background: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 700;
    font-size: 12px;
}
.compose-form {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.compose-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px 22px;
    border-bottom: 1px solid var(--border);
}
.compose-row label { font-weight: 700; font-size: 13px; color: var(--muted); }
.compose-row input {
    border: none;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    padding: 6px 0;
    background: transparent;
}
.compose-body {
    flex: 1;
    padding: 18px 22px;
    overflow: auto;
}
.compose-editor { min-height: 100%; }
.compose-body .ql-container {
    border: none;
    font-size: 15px;
    font-family: inherit;
}
.compose-body .ql-editor {
    padding: 0;
    min-height: 100%;
}
.ql-font-helvetica-neue { font-family: var(--font-sans); }
.ql-font-ubuntu-sans { font-family: var(--font-sans); }
.ql-size-small { font-size: 12px; }
.ql-size-normal { font-size: 14px; }
.ql-size-large { font-size: 18px; }
.ql-size-huge { font-size: 22px; }
.compose-toolbar {
    background: var(--accent);
    padding: 10px 14px 12px;
    border-top: 1px solid #cfe76d;
    overflow: visible;
    position: relative;
    z-index: 3;
}
.compose-toolbar .compose-tools {
    padding-bottom: 6px;
}
.compose-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    width: 100%;
    overflow: visible;
}
.compose-tools button,
.compose-tools select {
    border: none;
    background: rgba(255, 255, 255, 0.8);
    padding: 5px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}
.compose-tools .ql-undo,
.compose-tools .ql-redo,
.compose-tools .ql-html {
    border: none;
    background: rgba(255, 255, 255, 0.8);
    padding: 5px 8px;
    border-radius: 10px;
}
.compose-tools .ql-bold,
.compose-tools .ql-italic,
.compose-tools .ql-underline,
.compose-tools .ql-list,
.compose-tools .ql-link {
    border: none;
    background: rgba(255, 255, 255, 0.8);
    padding: 5px 8px;
    border-radius: 10px;
    width: auto;
    height: auto;
}
.compose-tools select { padding-right: 20px; max-width: 200px; }
.compose-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px 18px;
    background: #fff;
    border-top: 1px solid var(--border);
}
.compose-attachments {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 22px;
    background: #fff;
    border-top: 1px solid var(--border);
}
.compose-attachments label { position: relative; }
.compose-attachments-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}
.compose-attachments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}
.compose-attachment-item {
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #f6f7f0;
}
.compose-open { overflow: hidden; }

@media (max-width: 640px) {
    .table-row { grid-template-columns: 1.5fr 1fr 1.5fr 1fr; font-size: 14px; }
    .filters { flex-direction: column; }
    .row-actions { justify-content: flex-start; }
    .email-tabs { flex-wrap: wrap; }
    .email-layout { grid-template-columns: 1fr; }
    .email-list { min-height: 0; }
    .email-detail { min-height: 0; }
}
@media (max-width: 1200px) {
    .contact-summary__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .mobile-topbar { display: flex; }
    .mobile-nav-scrim { display: block; }
    .app-shell { flex-direction: column; }
    .sidebar {
        position: fixed;
        top: 0;
        right: 0;
        width: min(86vw, 320px);
        max-width: 320px;
        min-width: 0;
        height: 100vh;
        border-right: none;
        border-left: 1px solid rgba(0, 0, 0, 0.06);
        border-bottom: none;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        z-index: 2200;
        box-shadow: inset 3px 0 0 var(--accent), -8px 0 24px rgba(15, 23, 42, 0.18);
        overflow-y: auto;
    }
    .sidebar .brand { display: none; }
    .sidebar-inner { padding-top: 52px; }
    .side-nav { flex-direction: column; flex-wrap: nowrap; gap: 4px; }
    .side-nav a { padding: 0 14px; height: 44px; }
    .user { flex-direction: column; align-items: flex-start; padding-bottom: 12px; flex-wrap: nowrap; }
    .sidebar-close { display: inline-flex; }
    .project-summary { grid-template-columns: 1fr; align-items: flex-start; }
    .project-title-row { align-items: flex-start; }
    .project-progress { width: 100%; }
    .project-highlights { grid-template-columns: 1fr; }
    .project-rows__head { grid-template-columns: 1fr; }
    .project-row { grid-template-columns: 1fr; }
    .project-actions { justify-content: flex-start; }
    .container { padding: 88px 18px 28px; }
    .page-tabs {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .page-tabs::-webkit-scrollbar { display: none; }
    .page-tab,
    .page-tab-back,
    .page-tab-actions {
        flex: 0 0 auto;
    }
    .page-tab-actions {
        padding-bottom: 0;
        flex-wrap: wrap;
        width: 100%;
        margin-left: 0;
        order: 2;
        justify-content: flex-end;
        padding-top: 10px;
    }
    .page-content { padding: 16px 0 0; }
    .calendar-overview__head,
    .calendar-row { grid-template-columns: 1fr; }
    .calendar-row__track { grid-template-columns: repeat(2, 1fr); }
    .step-overview__grid { grid-template-columns: 1fr; }
    .contacts-toolbar { flex-direction: column; align-items: flex-start; }
    .table.contacts-table { overflow-x: auto; }
    .contacts-table .table-row {
        grid-template-columns: 220px 240px 180px 220px 260px 180px 120px;
        min-width: 1400px;
    }
    .contacts-table .table-head > div:nth-child(n+5),
    .contacts-table .table-row > div:nth-child(n+5) {
        display: flex;
    }
    .customer-portal-table .table-row { grid-template-columns: 120px 1fr 1fr 80px; font-size: 13px; }
    .customer-portal-table .table-row > div:nth-child(4),
    .customer-portal-table .table-head > div:nth-child(4) { display: none; }
    .file-manager-filters { flex-direction: column; align-items: flex-start; }
    .file-manager-toolbar { align-items: flex-start; }
    .file-manager-table .table-row { grid-template-columns: 38px 54px 1fr 90px; font-size: 13px; }
    .file-manager-table .table-row > div:nth-child(3),
    .file-manager-table .table-row > div:nth-child(5),
    .file-manager-table .table-row > div:nth-child(6),
    .file-manager-table .table-row > div:nth-child(7),
    .file-manager-table .table-head > div:nth-child(3),
    .file-manager-table .table-head > div:nth-child(5),
    .file-manager-table .table-head > div:nth-child(6),
    .file-manager-table .table-head > div:nth-child(7) { display: none; }
    .portal-topbar {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    .portal-actions { width: 100%; justify-content: center; }
    .portal-nav { flex-wrap: wrap; }
    .form-grid { grid-template-columns: 1fr; }
    .contact-summary__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contact-panels__grid { grid-template-columns: 1fr; }
    .contact-panel + .contact-panel {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--border);
        padding-top: 16px;
    }
    .mini-table--contacts .mini-table__head,
    .mini-table--contacts .mini-table__row { grid-template-columns: 1fr 1fr; }
    .mini-table--docs .mini-table__head,
    .mini-table--docs .mini-table__row { grid-template-columns: 1fr 100px; }
}

/* Booking (print-friendly) */
.no-print {}
:root {
    --booking-page-width: 210mm;
    --booking-page-height: 297mm;
    --booking-page-padding: 16mm 16mm 14mm;
}
.booking-doc {
    font-family: var(--font-sans);
    font-size: 11.5px;
    line-height: 1.45;
    padding: 0;
    background: transparent;
    box-shadow: none;
    outline: none;
}
.booking-pages { display: grid; gap: 18px; }
.booking-page {
    width: var(--booking-page-width);
    min-height: var(--booking-page-height);
    padding: var(--booking-page-padding);
    margin: 12px auto;
    background: #fff;
    border: none;
    border-radius: 0;
    outline: 1px solid #e5e7eb;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
    break-after: page;
    page-break-after: always;
    box-sizing: border-box;
}
.pdf-export .booking-pages { gap: 0; }
.pdf-export .booking-pages { display: block; }
.pdf-export .booking-page {
    margin: 0 auto;
    box-shadow: none;
    outline: none;
}
.pdf-export .booking-page:last-child {
    break-after: auto;
    page-break-after: auto;
}
.pdf-page-break {
    break-after: page;
    page-break-after: always;
}
.booking-page:last-child {
    break-after: auto;
    page-break-after: auto;
}
.booking-page--ruler { padding: var(--booking-page-padding); }
.booking-first-only {}
.booking-continued-only { display: none; }
.booking-page--continued .booking-first-only { display: none; }
.booking-page--continued .booking-continued-only { display: block; }
.booking-continued-title {
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.3px;
    color: var(--muted);
    text-align: right;
    margin-bottom: 8px;
}
.booking-preview-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: start;
}
.booking-preview-layout .booking-doc {
    margin: 0 auto;
}
.booking-preview-layout .booking-toolbar {
    position: sticky;
    top: 16px;
}
.booking-toolbar .card-header { align-items: flex-start; }
.booking-toolbar .actions { flex-wrap: wrap; justify-content: flex-start; }
.booking-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; margin-bottom: 18px; }
.booking-logo { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.booking-logo img { height: 86px; }
.booking-addresses {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}
.booking-sender { color: var(--text); font-size: 10.5px; line-height: 1.4; text-align: right; }
.booking-docmeta { text-align: right; }
.booking-docmeta-title { font-family: var(--font-sans); font-weight: 900; font-size: 30px; letter-spacing: 0.2px; }
.booking-docmeta-no { color: var(--text); font-weight: 700; font-size: 11.5px; margin-top: 4px; }
.booking-to { margin-top: 0; }
.booking-to-label { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px; }
.booking-subject-row {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: end;
}
.booking-dates { display: grid; justify-items: end; gap: 4px; color: var(--text); font-size: 10.5px; }
.booking-subject { margin-top: 0; }
.booking-table { margin-top: 18px; border: 1px solid #d7dbe0; border-radius: 4px; overflow: hidden; }
.booking-row { display: grid; grid-template-columns: 0.4fr 3fr 0.7fr 1fr 1fr; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #e2e6ea; background: #fff; font-size: 11.2px; }
.booking-row:last-child { border-bottom: none; }
.booking-row { break-inside: avoid; page-break-inside: avoid; }
.booking-head { background: #000; color: #fff; font-weight: 800; font-size: 11px; letter-spacing: 0.4px; text-transform: uppercase; font-style: italic; }
.booking-head, .booking-head * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.booking-row .right { text-align: right; }
.booking-row ul { margin: 6px 0 0 18px; padding: 0; }
.booking-row li { margin: 2px 0; }
.booking-item-title { font-weight: 700; font-size: 12px; }
.booking-end { margin-top: 16px; }
.booking-end { break-inside: avoid; page-break-inside: avoid; }
.booking-totals { margin-left: auto; max-width: 320px; font-size: 11px; }
.totals-row { display: flex; justify-content: space-between; padding: 7px 12px; border-bottom: 1px solid #e2e6ea; background: #fff; }
.totals-row:last-child { border-bottom: none; }
.totals-sum { font-weight: 900; background: #000; color: #fff; }
.totals-sum, .totals-sum * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.booking-notes { margin-top: 18px; font-size: 10.5px; }
.booking-terms-content { font-size: 10.5px; line-height: 1.35; }
.booking-terms-content h1,
.booking-terms-content h2,
.booking-terms-content h3,
.booking-terms-content h4 {
    margin: 0 0 6px;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}
.booking-terms-content p { margin: 0 0 6px; }
.booking-terms-content ul,
.booking-terms-content ol { margin: 4px 0 6px 16px; padding: 0; }
.booking-terms-content li { margin: 1px 0; }
.booking-end-grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
}
.booking-terms,
.booking-bank { color: var(--text); font-size: 10.5px; line-height: 1.45; }

@media print {
    @page {
        size: A4;
        margin: 0;
    }
    .sidebar, .no-print { display: none !important; }
    .page-tabs { display: none !important; }
    body { background: #fff; }
    .container { max-width: none; margin: 0; padding: 0; background: #fff; }
    .card { box-shadow: none; border: none; border-radius: 0; }
    .booking-page {
        width: var(--booking-page-width);
        min-height: var(--booking-page-height);
        margin: 0 auto;
        padding: var(--booking-page-padding);
        outline: none;
        box-shadow: none;
    }
    .booking-pages { gap: 0; }
    .booking-preview-layout { display: block; }
    .booking-logo img { height: 86px; }
    .booking-sender { font-size: 10.5px; line-height: 1.4; }
    .booking-docmeta-title { font-size: 30px; }
    .booking-docmeta-no { font-size: 11.5px; }
    .booking-to-label { font-size: 9px; letter-spacing: 0.8px; }
    .booking-dates { font-size: 10.5px; }
    .booking-row { font-size: 11.2px; }
    .booking-head { font-size: 11px; letter-spacing: 0.4px; text-transform: uppercase; background: #000; color: #fff; }
    .booking-totals { font-size: 11px; }
    .booking-notes, .booking-bank, .booking-terms { font-size: 10.5px; }
    /* Hide clickable URLs in the document body (browser header/footer must be disabled in print dialog). */
    .booking-url { display: none; }
    a[href]:after { content: ""; }
}
.email-page .container {
    height: 100vh;
    overflow: hidden;
    padding: 18px 20px 20px;
}
.email-page .container > .card {
    height: calc(100vh - 38px);
    display: flex;
    flex-direction: column;
}
.email-card { gap: 0; padding: 18px 20px 20px; position: relative; }
.email-tabs { margin-bottom: 12px; }
.email-layout {
    flex: 1;
    min-height: 0;
    height: 100%;
}
.email-list,
.email-detail {
    overflow: hidden;
}
.email-list-item { padding: 12px 14px; }
.email-list-title { font-size: 15px; }
.email-list-subtitle { font-size: 11px; }
.email-detail-subject { font-size: 16px; }
.email-detail-meta { font-size: 12px; }
.email-detail-info { font-size: 12px; }
