.ywd-portal {
    --ywd-surface: #ffffff;
    --ywd-surface-soft: #f7f9fb;
    --ywd-text: #13243a;
    --ywd-muted: #667085;
    --ywd-border: rgba(16, 24, 40, .12);
    --ywd-border-strong: rgba(16, 24, 40, .18);
    --ywd-accent: #2f80c4;
    --ywd-accent-2: #eaf4fc;
    --ywd-button-bg: #2f80c4;
    --ywd-button-text: #ffffff;
    --ywd-header-bg: #ffffff;
    --ywd-header-text: #13243a;
    --ywd-shadow: 0 14px 34px rgba(16, 24, 40, .07);
    --ywd-shadow-soft: 0 8px 22px rgba(16, 24, 40, .055);
    width: min(100%, 1040px);
    margin: 0 auto;
    color: var(--ywd-text);
    font-family: inherit !important;
    font-size: 16px;
    line-height: 1.5;
}
.ywd-portal,
.ywd-portal *,
.ywd-portal input,
.ywd-portal button,
.ywd-portal textarea,
.ywd-portal select,
.ywd-portal a {
    font-family: inherit !important;
}
.ywd-portal * { box-sizing: border-box; }
.ywd-portal a { text-decoration: none; }
.ywd-portal [hidden] { display: none !important; }

.ywd-portal-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(18px, 3vw, 32px);
    align-items: center;
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid var(--ywd-border);
    border-radius: 24px;
    background: var(--ywd-header-bg);
    color: var(--ywd-header-text);
    box-shadow: var(--ywd-shadow);
    margin-bottom: 18px;
}
.ywd-portal-hero-main { min-width: 0; }
.ywd-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--ywd-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.ywd-portal-hero h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 3.5vw, 38px);
    line-height: 1.1;
    color: var(--ywd-header-text);
    font-weight: 800;
    overflow-wrap: anywhere;
}
.ywd-portal-hero p {
    margin: 0;
    max-width: 620px;
    color: var(--ywd-header-text);
    opacity: .72;
    font-size: 15px;
    line-height: 1.55;
}
.ywd-portal-stats {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.ywd-portal-stats span {
    min-width: 104px;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--ywd-accent-2);
    color: var(--ywd-accent);
    border: 1px solid color-mix(in srgb, var(--ywd-accent) 18%, transparent);
    display: grid;
    gap: 3px;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
    line-height: 1.15;
}
.ywd-portal-stats strong {
    display: block;
    color: var(--ywd-accent);
    font-size: 30px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: 0;
}
.ywd-portal-count { /* Backwards-compatible preview block. */
    min-width: 112px;
    min-height: 98px;
    border-radius: 18px;
    background: var(--ywd-accent-2);
    color: var(--ywd-accent);
    border: 1px solid color-mix(in srgb, var(--ywd-accent) 18%, transparent);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 16px;
}
.ywd-portal-count strong { display: block; font-size: 36px; font-weight: 800; line-height: 1; }
.ywd-portal-count span { display: block; margin-top: 5px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }

.ywd-portal-controls {
    display: grid;
    gap: 12px;
    margin: 0 0 16px;
}
.ywd-portal-search-wrap { display: block; }
.ywd-portal-search {
    width: 100%;
    min-height: 50px;
    padding: 13px 16px;
    border: 1px solid var(--ywd-border);
    border-radius: 16px;
    background: #fff;
    color: var(--ywd-text);
    font-size: 15px;
    outline: none;
    box-shadow: 0 1px 0 rgba(16,24,40,.02);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.ywd-portal-search::placeholder { color: #8a94a6; }
.ywd-portal-search:focus {
    border-color: color-mix(in srgb, var(--ywd-accent) 55%, var(--ywd-border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ywd-accent) 14%, transparent);
}
.ywd-portal-folder-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 0 18px;
    margin: 0;
    border: 1px solid var(--ywd-border);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    background: var(--ywd-surface);
    box-shadow: var(--ywd-shadow-soft);
}
.ywd-portal-folder-filters,
.ywd-folder-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: flex-end;
    min-width: 0;
}
.ywd-folder-filter-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ywd-folder-filter {
    appearance: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 54px;
    padding: 16px 16px 15px;
    margin-right: 2px;
    border: 0;
    border-bottom: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ywd-muted);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    transform: none;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.ywd-folder-filter::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: transparent;
    transition: background-color .18s ease;
}
.ywd-folder-filter em {
    min-width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .06);
    color: inherit;
    font-style: normal;
    font-size: 12px;
    font-weight: 850;
}
.ywd-folder-filter:hover,
.ywd-folder-filter:focus {
    background: transparent;
    color: var(--ywd-text);
}
.ywd-folder-filter.is-active {
    background: transparent;
    color: var(--ywd-accent);
    border-color: transparent;
    box-shadow: none;
}
.ywd-folder-filter.is-active::after {
    background: var(--ywd-accent);
}
.ywd-folder-filter.is-active em {
    background: var(--ywd-accent-2);
}

.ywd-folder-download-actions {
    flex: 0 0 auto;
    padding: 0 0 10px;
}
.ywd-folder-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 13px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--ywd-accent) 28%, var(--ywd-border));
    background: #fff;
    color: var(--ywd-accent) !important;
    font-size: 12px;
    line-height: 1;
    font-weight: 850;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: none;
    transform: none;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.ywd-folder-download[hidden] { display: none !important; }
.ywd-folder-download:hover,
.ywd-folder-download:focus {
    background: var(--ywd-accent-2);
    color: var(--ywd-button-bg) !important;
    border-color: color-mix(in srgb, var(--ywd-accent) 45%, var(--ywd-border));
    box-shadow: 0 6px 14px rgba(16, 24, 40, .07);
}


.ywd-portal-documents {
    display: grid;
    gap: 0;
    border: 1px solid var(--ywd-border);
    border-top: 0;
    border-radius: 0 0 22px 22px;
    background: var(--ywd-surface);
    box-shadow: var(--ywd-shadow-soft);
    overflow: hidden;
}
.ywd-portal-card {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 26px 18px;
    border: 0;
    border-top: 1px solid var(--ywd-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: background-color .18s ease;
}
.ywd-portal-card:first-child {
    border-top: 0;
}
.ywd-portal-card:hover {
    background: #fbfcfe;
    border-color: transparent;
    box-shadow: none;
}
.ywd-portal-file-icon,
.ywd-portal-file-thumb {
    width: 56px;
    height: 56px;
    border-radius: 15px;
    flex: 0 0 auto;
}
.ywd-portal-file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ywd-accent-2);
    color: var(--ywd-accent);
    border: 1px solid color-mix(in srgb, var(--ywd-accent) 14%, transparent);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .04em;
}
.ywd-portal-file-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--ywd-accent-2);
    border: 1px solid var(--ywd-border);
    text-decoration: none !important;
}
.ywd-portal-file-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ywd-portal-file-thumb span {
    position: absolute;
    right: 4px;
    bottom: 4px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.95);
    color: var(--ywd-accent);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .04em;
}
.ywd-portal-card-main { min-width: 0; }
.ywd-portal-card-main h3 {
    margin: 5px 0 6px;
    color: var(--ywd-text);
    font-size: clamp(17px, 1.9vw, 20px);
    line-height: 1.2;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.ywd-portal-card-main p {
    margin: 0 0 8px;
    color: var(--ywd-muted);
    font-size: 14px;
    line-height: 1.45;
}
.ywd-portal-card-topline,
.ywd-portal-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ywd-portal-card-meta {
    color: var(--ywd-muted);
    font-size: 13px;
    line-height: 1.4;
}
.ywd-portal-card-meta span {
    overflow-wrap: anywhere;
}
.ywd-portal-pill {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--ywd-accent-2);
    color: var(--ywd-accent);
    font-size: 12px;
    font-weight: 800;
}
.ywd-portal-meta {
    color: var(--ywd-muted);
    font-size: 13px;
}
.ywd-portal-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}
.ywd-portal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--ywd-button-bg);
    color: var(--ywd-button-text) !important;
    text-decoration: none !important;
    font-weight: 800;
    font-size: 14px;
    line-height: 1;
    border: 1px solid var(--ywd-button-bg);
    box-shadow: none;
    transform: none;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, filter .18s ease;
}
.ywd-portal-button:hover,
.ywd-portal-button:focus {
    opacity: 1;
    transform: none;
    filter: brightness(.96);
    box-shadow: 0 6px 16px rgba(16, 24, 40, .10);
}
.ywd-portal-button:focus-visible,
.ywd-portal-file-thumb:focus-visible,
.ywd-folder-filter:focus-visible,
.ywd-folder-download:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--ywd-accent) 22%, transparent);
    outline-offset: 3px;
}
.ywd-portal-button-secondary {
    background: #fff;
    color: var(--ywd-button-bg) !important;
    border-color: color-mix(in srgb, var(--ywd-button-bg) 65%, #ffffff);
}
.ywd-portal-button-secondary:hover,
.ywd-portal-button-secondary:focus {
    background: var(--ywd-accent-2);
    color: var(--ywd-button-bg) !important;
    filter: none;
}
.ywd-portal-no-results,
.ywd-portal-empty,
.ywd-portal-notice {
    padding: 24px;
    border: 1px solid var(--ywd-border);
    border-radius: 20px;
    background: var(--ywd-surface-soft);
    color: var(--ywd-text);
}
.ywd-portal-no-results {
    margin-top: 12px;
    display: grid;
    gap: 4px;
    text-align: center;
}
.ywd-portal-no-results span,
.ywd-portal-empty p,
.ywd-portal-notice p { color: var(--ywd-muted); }
.ywd-portal-empty h3,
.ywd-portal-notice h2 { margin-top: 0; }

/* Backwards-compatible folder/detail styles for older markup previews. */
.ywd-portal-folders { display: grid; gap: 14px; }
.ywd-portal-folder {
    border: 1px solid var(--ywd-border);
    border-radius: 20px;
    background: var(--ywd-surface);
    box-shadow: var(--ywd-shadow-soft);
    overflow: hidden;
}
.ywd-portal-folder-summary { display: flex; gap: 12px; align-items: center; padding: 14px 18px; cursor: pointer; }
.ywd-portal-folder-summary::-webkit-details-marker { display: none; }
.ywd-portal-folder-icon { width: 42px; height: 42px; border-radius: 14px; display: inline-grid; place-items: center; background: var(--ywd-accent-2); color: var(--ywd-accent); }
.ywd-portal-folder-title { flex: 1; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ywd-portal-folder-count { padding: 5px 10px; border-radius: 999px; background: var(--ywd-surface-soft); color: var(--ywd-muted); border: 1px solid var(--ywd-border); font-size: 12px; font-weight: 700; white-space: nowrap; }
.ywd-portal-folder > .ywd-portal-documents { padding: 0 18px 18px; }
.ywd-portal-folder-empty { margin: 0 18px 18px; padding: 16px; border-radius: 16px; background: var(--ywd-surface-soft); color: var(--ywd-muted); border: 1px dashed var(--ywd-border); font-size: 14px; }

.ywd-settings-preview { max-width: none; margin: 0; }
.ywd-settings-preview .ywd-portal-hero { margin-bottom: 14px; }

.ywd-portal-login-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 410px);
    gap: clamp(22px, 4vw, 44px);
    align-items: center;
    padding: clamp(26px, 4vw, 42px);
    border: 1px solid var(--ywd-border);
    border-radius: 24px;
    background: var(--ywd-header-bg);
    color: var(--ywd-header-text);
    box-shadow: var(--ywd-shadow);
}
.ywd-portal-login-intro h2 {
    margin: 0 0 10px;
    color: var(--ywd-header-text);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.08;
    font-weight: 800;
}
.ywd-portal-login-intro p {
    margin: 0;
    max-width: 580px;
    color: var(--ywd-header-text);
    opacity: .76;
    font-size: 16px;
    line-height: 1.58;
}
.ywd-portal-login-form {
    padding: 22px;
    border: 1px solid var(--ywd-border);
    border-radius: 20px;
    background: var(--ywd-surface);
    color: var(--ywd-text);
    box-shadow: var(--ywd-shadow-soft);
}
.ywd-portal-login-form form,
.ywd-portal-login-form p { margin: 0; }
.ywd-portal-login-form .login-username,
.ywd-portal-login-form .login-password { margin-bottom: 14px; }
.ywd-portal-login-form label {
    display: block;
    margin: 0 0 7px;
    color: var(--ywd-text);
    font-size: 13px;
    font-weight: 800;
}
.ywd-portal-login-form input[type="text"],
.ywd-portal-login-form input[type="password"] {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--ywd-border);
    border-radius: 12px;
    background: #fff;
    color: var(--ywd-text);
    font-size: 15px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.ywd-portal-login-form input[type="text"]:focus,
.ywd-portal-login-form input[type="password"]:focus {
    border-color: color-mix(in srgb, var(--ywd-accent) 55%, var(--ywd-border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ywd-accent) 14%, transparent);
}
.ywd-portal-login-form .login-remember { margin: 2px 0 16px; color: var(--ywd-muted); }
.ywd-portal-login-form .login-remember label { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--ywd-muted); font-weight: 500; }
.ywd-portal-login-form .login-remember input { margin: 0; }
.ywd-portal-login-form .login-submit input,
.ywd-portal-login-form input[type="submit"] {
    width: 100%;
    min-height: 46px;
    padding: 11px 18px;
    border-radius: 999px;
    border: 1px solid var(--ywd-button-bg);
    background: var(--ywd-button-bg);
    color: var(--ywd-button-text);
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    box-shadow: none;
    transform: none;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, filter .18s ease;
}
.ywd-portal-login-form .login-submit input:hover,
.ywd-portal-login-form input[type="submit"]:hover,
.ywd-portal-login-form .login-submit input:focus,
.ywd-portal-login-form input[type="submit"]:focus { filter: brightness(.96); box-shadow: 0 6px 16px rgba(16, 24, 40, .10); }
.ywd-portal-login-help { margin-top: 14px !important; text-align: center; font-size: 14px; }
.ywd-portal-login-help a { color: var(--ywd-accent); font-weight: 800; }

@supports not (color: color-mix(in srgb, white, black)) {
    .ywd-portal-count,
    .ywd-portal-stats span,
    .ywd-portal-file-icon { border-color: var(--ywd-border); }
    .ywd-portal-search:focus { border-color: var(--ywd-accent); box-shadow: 0 0 0 3px rgba(47, 128, 196, .14); }
    .ywd-portal-button-secondary { border-color: var(--ywd-button-bg); }
}

@media (max-width: 820px) {
    .ywd-portal { width: min(100%, calc(100vw - 32px)); }
    .ywd-portal-hero { grid-template-columns: 1fr; align-items: start; padding: 22px; border-radius: 22px; }
    .ywd-portal-stats { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ywd-portal-stats span { min-width: 0; padding: 12px; }
    .ywd-portal-folder-row { align-items: stretch; flex-direction: column; gap: 8px; border-bottom: 0; padding: 0; }
    .ywd-portal-folder-filters { flex-wrap: nowrap; overflow-x: auto; padding: 0 0 1px; border-bottom: 1px solid var(--ywd-border); scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
    .ywd-folder-filter-group { flex: 0 0 auto; }
    .ywd-folder-filter { flex: 0 0 auto; }
    .ywd-folder-download-actions { padding: 0; display: flex; justify-content: flex-end; }
    .ywd-portal-card { grid-template-columns: 54px minmax(0, 1fr); align-items: start; padding: 16px; }
    .ywd-portal-actions { grid-column: 1 / -1; justify-content: stretch; }
    .ywd-portal-actions a { flex: 1; }
    .ywd-portal-login-card { grid-template-columns: 1fr; padding: 22px; }
    .ywd-portal-login-form { padding: 18px; }
}

@media (max-width: 520px) {
    .ywd-portal { width: min(100%, calc(100vw - 28px)); }
    .ywd-portal-hero { padding: 18px; border-radius: 20px; margin-bottom: 14px; }
    .ywd-portal-hero h2 { font-size: 25px; }
    .ywd-portal-hero p { font-size: 14px; }
    .ywd-portal-stats strong { font-size: 25px; }
    .ywd-portal-stats span { font-size: 11px; border-radius: 16px; }
    .ywd-portal-search { min-height: 48px; font-size: 14px; border-radius: 15px; }
    .ywd-portal-card { gap: 12px; padding: 14px; border-radius: 18px; }
    .ywd-portal-file-icon,
    .ywd-portal-file-thumb { width: 50px; height: 50px; border-radius: 14px; }
    .ywd-portal-card-main h3 { font-size: 18px; }
    .ywd-portal-card-main p { font-size: 13px; }
    .ywd-portal-card-meta { font-size: 12px; }
    .ywd-portal-actions { gap: 8px; }
    .ywd-portal-button { min-height: 44px; padding: 10px 12px; }
    .ywd-folder-filter { min-height: 39px; padding: 9px 12px 10px; border-radius: 13px 13px 0 0; font-size: 13px; }
    .ywd-folder-filter em { min-width: 20px; height: 20px; padding: 0 6px; font-size: 11px; }
    .ywd-folder-download { min-height: 34px; padding: 8px 10px; font-size: 11px; }
}

/* v0.2.8 multi-client portal access */
.ywd-multi-client-portal {
    font-family: inherit;
    display: grid;
    gap: 1rem;
}
.ywd-multi-client-hero {
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.78);
    border-radius: 22px;
    padding: clamp(1.1rem, 3vw, 1.75rem);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}
.ywd-multi-client-hero h2 {
    margin: 0.15rem 0 0.35rem;
    font-size: clamp(1.55rem, 4vw, 2.35rem);
    line-height: 1.08;
}
.ywd-multi-client-hero p {
    margin: 0;
    max-width: 58rem;
    color: rgba(15, 23, 42, 0.68);
}
.ywd-client-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}
.ywd-client-switch {
    appearance: none;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    background: #fff;
    color: inherit;
    cursor: pointer;
    min-height: 42px;
    padding: 0.55rem 0.95rem;
    font: inherit;
    font-weight: 700;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.ywd-client-switch:hover,
.ywd-client-switch:focus-visible {
    border-color: var(--ywd-accent, #2f80c4);
    box-shadow: 0 0 0 4px rgba(47, 128, 196, 0.1);
    outline: none;
}
.ywd-client-switch.is-active {
    background: var(--ywd-button-bg, #2f80c4);
    border-color: var(--ywd-button-bg, #2f80c4);
    color: var(--ywd-button-text, #fff);
}
.ywd-client-portal-panels {
    display: grid;
    gap: 1rem;
}
@media (max-width: 640px) {
    .ywd-client-switcher {
        display: grid;
        grid-template-columns: 1fr;
    }
    .ywd-client-switch {
        width: 100%;
        justify-content: center;
    }
}

/* v0.2.9 client contact details */
.ywd-portal-contact-card {
    display: grid;
    grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr);
    gap: clamp(18px, 3vw, 28px);
    align-items: start;
    margin: 0 0 18px;
    padding: clamp(18px, 3vw, 24px);
    border: 1px solid var(--ywd-border);
    border-radius: 22px;
    background: var(--ywd-surface);
    box-shadow: var(--ywd-shadow-soft);
}
.ywd-portal-contact-summary h3 {
    margin: 0 0 8px;
    color: var(--ywd-text);
    font-size: clamp(20px, 2.4vw, 26px);
    line-height: 1.15;
    font-weight: 800;
}
.ywd-portal-contact-summary p {
    margin: 0;
    color: var(--ywd-muted);
    font-size: 14px;
    line-height: 1.55;
}
.ywd-portal-save-notice {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--ywd-accent-2);
    color: var(--ywd-accent);
    border: 1px solid color-mix(in srgb, var(--ywd-accent) 18%, transparent);
    font-size: 13px;
    font-weight: 750;
}
.ywd-portal-preview-note {
    background: var(--ywd-surface-soft);
    color: var(--ywd-muted);
    border-color: var(--ywd-border);
}
.ywd-portal-contact-form {
    display: grid;
    gap: 16px;
}
.ywd-portal-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.ywd-portal-form-grid p {
    margin: 0;
}
.ywd-portal-contact-form label {
    display: block;
    margin: 0 0 7px;
    color: var(--ywd-text);
    font-size: 13px;
    font-weight: 800;
}
.ywd-portal-contact-form input[type="text"],
.ywd-portal-contact-form input[type="email"] {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid var(--ywd-border);
    border-radius: 13px;
    background: #fff;
    color: var(--ywd-text);
    font-size: 15px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.ywd-portal-contact-form input[type="text"]:focus,
.ywd-portal-contact-form input[type="email"]:focus {
    border-color: color-mix(in srgb, var(--ywd-accent) 55%, var(--ywd-border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ywd-accent) 14%, transparent);
}
.ywd-portal-contact-form input:disabled {
    background: var(--ywd-surface-soft);
    color: var(--ywd-muted);
    cursor: not-allowed;
}
.ywd-portal-contact-actions {
    display: flex;
    justify-content: flex-end;
}
.ywd-portal-contact-actions .ywd-portal-button:disabled {
    opacity: .55;
    cursor: not-allowed;
    filter: none;
    box-shadow: none;
}

@media (max-width: 820px) {
    .ywd-portal-contact-card {
        grid-template-columns: 1fr;
        padding: 18px;
        border-radius: 20px;
    }
    .ywd-portal-form-grid {
        grid-template-columns: 1fr;
    }
    .ywd-portal-contact-actions {
        justify-content: stretch;
    }
    .ywd-portal-contact-actions .ywd-portal-button {
        width: 100%;
    }
}

/* v0.3.0 compact client details + modal editing */
.ywd-portal-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.ywd-portal-title-row h2 {
    margin-bottom: 0;
}
.ywd-portal-edit-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--ywd-accent) 35%, transparent);
    background: color-mix(in srgb, var(--ywd-accent-2) 88%, #fff);
    color: var(--ywd-accent);
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.ywd-portal-edit-details:hover,
.ywd-portal-edit-details:focus {
    background: var(--ywd-accent-2);
    border-color: color-mix(in srgb, var(--ywd-accent) 55%, transparent);
    color: var(--ywd-accent);
    box-shadow: 0 6px 16px rgba(16, 24, 40, .08);
    outline: none;
}
.ywd-portal-edit-details:focus-visible,
.ywd-portal-modal-close:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--ywd-accent) 22%, transparent);
    outline-offset: 3px;
}
.ywd-portal-company-details {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin: 0 0 10px;
    max-width: 760px;
    color: var(--ywd-header-text);
    opacity: .74;
    font-size: 13px;
    line-height: 1.45;
}
.ywd-portal-company-details span,
.ywd-portal-company-details a {
    color: inherit;
    text-decoration: none;
}
.ywd-portal-company-details a:hover { color: var(--ywd-accent); }
.ywd-portal-company-details > *:not(:last-child)::after {
    content: "•";
    margin-left: 10px;
    opacity: .45;
}
.ywd-portal-save-notice-inline {
    display: inline-flex;
    width: auto;
    margin: 2px 0 10px;
    padding: 8px 10px;
}
.ywd-portal-modal[hidden] { display: none !important; }
.ywd-portal-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    padding: clamp(16px, 3vw, 28px);
}
.ywd-portal-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 24, 38, .54);
    backdrop-filter: blur(7px);
}
.ywd-portal-modal-dialog {
    position: relative;
    width: min(100%, 820px);
    max-height: min(88vh, 880px);
    overflow: auto;
    border-radius: 24px;
    border: 1px solid var(--ywd-border);
    background: var(--ywd-surface);
    box-shadow: 0 24px 70px rgba(16, 24, 40, .24);
    padding: clamp(18px, 3vw, 28px);
    color: var(--ywd-text);
}
.ywd-portal-modal-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 16px;
}
.ywd-portal-modal-header h3 {
    margin: 0;
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.15;
    color: var(--ywd-text);
}
.ywd-portal-modal-close {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid var(--ywd-border);
    background: var(--ywd-surface-soft);
    color: var(--ywd-text);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    padding: 0;
}
.ywd-portal-modal-close:hover,
.ywd-portal-modal-close:focus {
    background: var(--ywd-accent-2);
    border-color: color-mix(in srgb, var(--ywd-accent) 28%, var(--ywd-border));
    color: var(--ywd-accent);
}
.ywd-modal-is-open body { overflow: hidden; }

@media (max-width: 640px) {
    .ywd-portal-title-row { align-items: flex-start; gap: 10px; }
    .ywd-portal-title-row h2 { flex: 1 1 100%; }
    .ywd-portal-edit-details { min-height: 34px; padding: 8px 12px; }
    .ywd-portal-company-details {
        display: grid;
        gap: 3px;
        font-size: 13px;
    }
    .ywd-portal-company-details > *::after { display: none; }
    .ywd-portal-modal {
        align-items: end;
        padding: 10px;
    }
    .ywd-portal-modal-dialog {
        width: 100%;
        max-height: 88vh;
        border-radius: 22px 22px 16px 16px;
        padding: 18px;
    }
    .ywd-portal-modal-header { margin-bottom: 12px; }
    .ywd-portal-contact-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .ywd-portal-contact-actions .ywd-portal-button { width: 100%; }
}

/* v0.3.3 integrated document list redesign */
.ywd-portal-controls {
    gap: 14px;
    margin: 0;
}
.ywd-portal-folder-row {
    align-items: stretch;
    border: 1px solid var(--ywd-border);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    background: #fff;
    padding: 0 16px;
    box-shadow: 0 10px 26px rgba(16, 24, 40, .045);
}
.ywd-portal-folder-filters,
.ywd-folder-tabs {
    min-height: 58px;
    align-items: stretch;
    gap: 0;
}
.ywd-folder-filter-group {
    align-items: stretch;
}
.ywd-folder-filter {
    min-height: 58px;
    padding: 0 17px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ywd-muted);
    box-shadow: none;
}
.ywd-folder-filter::after {
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 3px;
    border-radius: 999px 999px 0 0;
}
.ywd-folder-filter:hover,
.ywd-folder-filter:focus {
    background: transparent;
    color: var(--ywd-text);
}
.ywd-folder-filter.is-active {
    border: 0;
    background: transparent;
    color: var(--ywd-accent);
    box-shadow: none;
}
.ywd-folder-download-actions {
    display: flex;
    align-items: center;
    padding: 10px 0;
}
.ywd-folder-download {
    min-height: 38px;
    padding: 9px 15px;
}
.ywd-portal-documents {
    display: block;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--ywd-border);
    border-top: 0;
    border-radius: 0 0 22px 22px;
    box-shadow: 0 18px 38px rgba(16, 24, 40, .055);
}
.ywd-portal-card {
    border: 0;
    border-radius: 0;
    border-top: 1px solid var(--ywd-border);
    background: transparent;
    box-shadow: none;
    padding: 20px 16px;
    transition: background-color .18s ease;
}
.ywd-portal-card:first-child {
    border-top: 0;
}
.ywd-portal-card:hover {
    border-color: var(--ywd-border);
    background: color-mix(in srgb, var(--ywd-accent-2) 22%, #ffffff);
    box-shadow: none;
}
.ywd-portal-no-results {
    border-radius: 0 0 22px 22px;
    border-top: 0;
    margin-top: 0;
}

@media (max-width: 720px) {
    .ywd-portal-folder-row {
        flex-direction: column;
        gap: 0;
        padding: 0;
        overflow: hidden;
    }
    .ywd-portal-folder-filters,
    .ywd-folder-tabs {
        min-height: 54px;
        padding: 0 12px;
        border-bottom: 1px solid var(--ywd-border);
    }
    .ywd-folder-filter {
        min-height: 54px;
        padding: 0 13px;
    }
    .ywd-folder-download-actions {
        justify-content: flex-start;
        padding: 10px 12px 12px;
    }
    .ywd-portal-documents {
        border-radius: 0 0 20px 20px;
    }
    .ywd-portal-card {
        padding: 16px 14px;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .ywd-folder-filter {
        min-height: 50px;
        padding: 0 12px;
    }
    .ywd-folder-filter::after {
        left: 12px;
        right: 12px;
    }
    .ywd-portal-card {
        padding: 15px 12px;
    }
}



/* 0.3.5 document panel fix
   Keep tabs and files as one clean integrated list, matching the supplied mockup. */
.ywd-portal-modern .ywd-portal-controls {
    display: block;
    margin: 0 0 18px;
}

.ywd-portal-modern .ywd-portal-search-wrap {
    display: block;
    margin: 0 0 12px;
}

.ywd-portal-modern .ywd-portal-search {
    box-shadow: none;
}

.ywd-portal-modern .ywd-portal-folder-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    padding: 0 16px;
    min-height: 58px;
    border: 1px solid var(--ywd-border);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    background: var(--ywd-surface);
    box-shadow: none;
}

.ywd-portal-modern .ywd-portal-folder-filters,
.ywd-portal-modern .ywd-folder-tabs {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0;
    min-width: 0;
}

.ywd-portal-modern .ywd-folder-filter {
    appearance: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 58px;
    margin: 0;
    padding: 0 18px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ywd-muted);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    transform: none;
}

.ywd-portal-modern .ywd-folder-filter::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 3px;
    border-radius: 99px 99px 0 0;
    background: transparent;
}

.ywd-portal-modern .ywd-folder-filter:hover,
.ywd-portal-modern .ywd-folder-filter:focus {
    background: transparent;
    color: var(--ywd-text);
}

.ywd-portal-modern .ywd-folder-filter.is-active {
    color: var(--ywd-accent);
    background: transparent;
    box-shadow: none;
}

.ywd-portal-modern .ywd-folder-filter.is-active::after {
    background: var(--ywd-accent);
}

.ywd-portal-modern .ywd-folder-filter em {
    min-width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .06);
    color: inherit;
    font-style: normal;
    font-size: 12px;
    font-weight: 850;
}

.ywd-portal-modern .ywd-folder-filter.is-active em {
    background: var(--ywd-accent-2);
}

.ywd-portal-modern .ywd-folder-download-actions {
    flex: 0 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
}

.ywd-portal-modern .ywd-folder-download {
    min-height: 38px;
    padding: 9px 14px;
}

.ywd-portal-modern .ywd-portal-documents {
    display: block;
    margin: 0;
    gap: 0;
    border: 1px solid var(--ywd-border);
    border-top: 0;
    border-radius: 0 0 22px 22px;
    background: var(--ywd-surface);
    box-shadow: var(--ywd-shadow-soft);
    overflow: hidden;
}

.ywd-portal-modern .ywd-portal-card {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin: 0;
    padding: 26px 16px;
    border: 0;
    border-top: 1px solid var(--ywd-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
    transition: background-color .18s ease;
}

.ywd-portal-modern .ywd-portal-card:first-child {
    border-top: 1px solid var(--ywd-border);
}

.ywd-portal-modern .ywd-portal-card:hover {
    background: #fbfcfe;
    border-color: var(--ywd-border);
    box-shadow: none;
}

.ywd-portal-modern .ywd-portal-card-main h3 {
    margin: 6px 0 8px;
    font-size: clamp(19px, 2vw, 24px);
}

.ywd-portal-modern .ywd-portal-card-main p {
    margin-bottom: 7px;
}

@media (max-width: 782px) {
    .ywd-portal-modern .ywd-portal-folder-row {
        display: block;
        min-height: 0;
        padding: 0 12px 12px;
    }

    .ywd-portal-modern .ywd-portal-folder-filters,
    .ywd-portal-modern .ywd-folder-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .ywd-portal-modern .ywd-portal-folder-filters::-webkit-scrollbar,
    .ywd-portal-modern .ywd-folder-tabs::-webkit-scrollbar {
        display: none;
    }

    .ywd-portal-modern .ywd-folder-filter {
        flex: 0 0 auto;
        min-height: 50px;
        padding: 0 14px;
        white-space: nowrap;
    }

    .ywd-portal-modern .ywd-folder-download-actions {
        padding-top: 10px;
    }

    .ywd-portal-modern .ywd-portal-card {
        grid-template-columns: 52px minmax(0, 1fr);
        align-items: start;
        padding: 18px 14px;
        gap: 14px;
    }

    .ywd-portal-modern .ywd-portal-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-left: 66px;
        margin-top: 2px;
    }

    .ywd-portal-modern .ywd-portal-button {
        min-height: 40px;
        padding: 10px 16px;
    }
}


/* 0.3.6 integrated panel gap fix
   The previous gap was caused by the controls wrapper having bottom margin while
   the document rows are rendered immediately after it. Force the folder tabs and
   document list to sit flush as one component. */
.ywd-portal-modern .ywd-portal-controls {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ywd-portal-modern .ywd-portal-search-wrap {
    display: block !important;
    margin: 0 0 12px !important;
}

.ywd-portal-modern .ywd-portal-folder-row {
    margin: 0 !important;
    border-bottom: 0 !important;
    border-radius: 22px 22px 0 0 !important;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .045) !important;
}

.ywd-portal-modern .ywd-portal-documents {
    margin: 0 !important;
    margin-top: 0 !important;
    border-top: 0 !important;
    border-radius: 0 0 22px 22px !important;
    box-shadow: 0 18px 34px rgba(16, 24, 40, .07) !important;
    transform: translateY(0) !important;
}

.ywd-portal-modern .ywd-portal-controls + .ywd-portal-documents {
    margin-top: 0 !important;
}

.ywd-portal-modern .ywd-portal-folder-row + .ywd-portal-documents,
.ywd-portal-modern .ywd-portal-folder-row ~ .ywd-portal-documents {
    margin-top: 0 !important;
}

.ywd-portal-modern .ywd-portal-card:first-child {
    border-top: 1px solid var(--ywd-border) !important;
}

@media (max-width: 782px) {
    .ywd-portal-modern .ywd-portal-controls {
        margin: 0 !important;
    }
    .ywd-portal-modern .ywd-portal-folder-row {
        border-radius: 18px 18px 0 0 !important;
    }
    .ywd-portal-modern .ywd-portal-documents {
        border-radius: 0 0 18px 18px !important;
    }
}

/* 0.3.7 compact document rows
   Make the front-end document list feel more like a dense file list, so it scales better
   when a client has lots of reports/supporting files. */
.ywd-portal-modern .ywd-portal-card {
    grid-template-columns: 46px minmax(0, 1fr) auto !important;
    gap: 14px !important;
    padding: 16px 16px !important;
    min-height: 86px;
}

.ywd-portal-modern .ywd-portal-file-icon,
.ywd-portal-modern .ywd-portal-file-thumb {
    width: 46px !important;
    height: 46px !important;
    border-radius: 13px !important;
    font-size: 10px !important;
}

.ywd-portal-modern .ywd-portal-file-thumb span {
    right: 3px !important;
    bottom: 3px !important;
    padding: 1px 5px !important;
    font-size: 8px !important;
}

.ywd-portal-modern .ywd-portal-card-topline {
    gap: 7px !important;
    margin-bottom: 3px !important;
}

.ywd-portal-modern .ywd-portal-pill {
    min-height: 21px !important;
    padding: 3px 8px !important;
    font-size: 11px !important;
    line-height: 1 !important;
}

.ywd-portal-modern .ywd-portal-meta {
    font-size: 12px !important;
    line-height: 1.25 !important;
}

.ywd-portal-modern .ywd-portal-card-main h3 {
    margin: 2px 0 5px !important;
    font-size: clamp(17px, 1.55vw, 20px) !important;
    line-height: 1.2 !important;
}

.ywd-portal-modern .ywd-portal-card-main p {
    margin: 0 0 5px !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
}

.ywd-portal-modern .ywd-portal-card-meta {
    gap: 7px !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
}

.ywd-portal-modern .ywd-portal-actions {
    gap: 8px !important;
}

.ywd-portal-modern .ywd-portal-button {
    min-height: 36px !important;
    padding: 9px 15px !important;
    font-size: 13px !important;
}

.ywd-portal-modern .ywd-portal-folder-row {
    min-height: 52px !important;
}

.ywd-portal-modern .ywd-folder-filter {
    min-height: 52px !important;
    padding: 0 16px !important;
    font-size: 13px !important;
}

.ywd-portal-modern .ywd-folder-filter em {
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 6px !important;
    font-size: 11px !important;
}

.ywd-portal-modern .ywd-folder-download {
    min-height: 34px !important;
    padding: 8px 13px !important;
    font-size: 12px !important;
}

@media (max-width: 782px) {
    .ywd-portal-modern .ywd-portal-card {
        grid-template-columns: 44px minmax(0, 1fr) !important;
        gap: 12px !important;
        padding: 15px 13px !important;
        min-height: 0 !important;
    }

    .ywd-portal-modern .ywd-portal-file-icon,
    .ywd-portal-modern .ywd-portal-file-thumb {
        width: 44px !important;
        height: 44px !important;
        border-radius: 12px !important;
    }

    .ywd-portal-modern .ywd-portal-card-main h3 {
        font-size: 17px !important;
        margin-bottom: 4px !important;
    }

    .ywd-portal-modern .ywd-portal-card-main p {
        font-size: 13px !important;
    }

    .ywd-portal-modern .ywd-portal-card-meta {
        display: flex !important;
        gap: 6px !important;
        font-size: 12px !important;
    }

    .ywd-portal-modern .ywd-portal-actions {
        grid-column: 2 / -1 !important;
        padding-left: 0 !important;
        margin-top: 6px !important;
        gap: 8px !important;
    }

    .ywd-portal-modern .ywd-portal-button {
        min-height: 36px !important;
        padding: 8px 13px !important;
        font-size: 13px !important;
    }

    .ywd-portal-modern .ywd-folder-filter {
        min-height: 46px !important;
        padding: 0 13px !important;
    }
}

/* v0.3.8 portal logout button */
.ywd-portal-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--ywd-border);
    background: #fff;
    color: var(--ywd-muted) !important;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none !important;
    box-shadow: none;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.ywd-portal-logout:hover,
.ywd-portal-logout:focus {
    background: var(--ywd-accent-2);
    color: var(--ywd-accent) !important;
    border-color: color-mix(in srgb, var(--ywd-accent) 32%, var(--ywd-border));
}
@media (max-width: 640px) {
    .ywd-portal-logout { min-height: 34px; padding: 8px 12px; }
}


/* 0.3.9 mobile overflow containment
   Prevent the portal itself from making the page horizontally scrollable.
   Scrollable folder tabs stay contained inside the portal instead. */
.ywd-portal {
    width: 100% !important;
    max-width: min(100%, 1040px) !important;
    min-width: 0 !important;
    overflow-x: clip;
}

@supports not (overflow: clip) {
    .ywd-portal { overflow-x: hidden; }
}

.ywd-portal,
.ywd-portal * {
    max-width: 100%;
}

.ywd-portal-modern .ywd-portal-hero,
.ywd-portal-modern .ywd-portal-hero-main,
.ywd-portal-modern .ywd-portal-controls,
.ywd-portal-modern .ywd-portal-folder-row,
.ywd-portal-modern .ywd-portal-documents,
.ywd-portal-modern .ywd-portal-card,
.ywd-portal-modern .ywd-portal-card-main,
.ywd-portal-modern .ywd-portal-actions,
.ywd-multi-client-portal,
.ywd-client-portal-panels,
.ywd-client-portal-panel,
.ywd-portal-login-card,
.ywd-portal-login-form {
    min-width: 0 !important;
    max-width: 100% !important;
}

.ywd-portal-modern .ywd-portal-folder-filters,
.ywd-portal-modern .ywd-folder-tabs {
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
}

.ywd-portal-modern .ywd-folder-filter {
    max-width: none !important;
}

.ywd-portal-modern .ywd-folder-download-actions,
.ywd-portal-modern .ywd-portal-actions,
.ywd-client-switcher,
.ywd-portal-title-row,
.ywd-portal-company-details {
    min-width: 0 !important;
}

.ywd-portal-modern .ywd-portal-actions {
    flex-wrap: wrap;
}

.ywd-portal-modern .ywd-portal-button,
.ywd-portal-logout,
.ywd-portal-edit-details,
.ywd-client-switch {
    max-width: 100% !important;
    white-space: normal;
}

.ywd-portal-modern .ywd-portal-search,
.ywd-portal input,
.ywd-portal textarea,
.ywd-portal select {
    max-width: 100% !important;
}

@media (max-width: 820px) {
    .ywd-portal {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 782px) {
    .ywd-portal-modern .ywd-portal-folder-row,
    .ywd-portal-modern .ywd-portal-documents,
    .ywd-portal-modern .ywd-portal-hero,
    .ywd-portal-login-card,
    .ywd-multi-client-hero {
        width: 100% !important;
        max-width: 100% !important;
    }

    .ywd-portal-modern .ywd-portal-folder-row {
        overflow: hidden !important;
    }

    .ywd-portal-modern .ywd-portal-card {
        width: 100% !important;
    }

    .ywd-portal-modern .ywd-portal-actions {
        width: 100% !important;
    }
}

@media (max-width: 520px) {
    .ywd-portal {
        width: 100% !important;
        max-width: 100% !important;
    }

    .ywd-portal-modern .ywd-portal-button {
        flex: 1 1 auto;
    }
}


/* 0.4.0 softer control typography
   Keep content headings strong, but make buttons, tabs, badges and chips regular weight. */
.ywd-portal .ywd-portal-button,
.ywd-portal .ywd-portal-pill,
.ywd-portal .ywd-folder-filter,
.ywd-portal .ywd-folder-filter em,
.ywd-portal .ywd-folder-download,
.ywd-portal .ywd-portal-file-icon,
.ywd-portal .ywd-portal-file-thumb span,
.ywd-portal .ywd-portal-edit-details,
.ywd-portal .ywd-portal-logout,
.ywd-portal .ywd-client-switch,
.ywd-portal .ywd-portal-login-form input[type="submit"],
.ywd-portal .ywd-portal-login-help a,
.ywd-portal .ywd-portal-count span,
.ywd-portal .ywd-portal-stats span {
    font-weight: 400 !important;
}

.ywd-portal .ywd-portal-button,
.ywd-portal .ywd-folder-download,
.ywd-portal .ywd-portal-edit-details,
.ywd-portal .ywd-portal-logout {
    letter-spacing: 0;
}

.ywd-portal .ywd-folder-filter em,
.ywd-portal .ywd-portal-pill,
.ywd-portal .ywd-portal-file-icon,
.ywd-portal .ywd-portal-file-thumb span {
    letter-spacing: 0;
}
