/* ==========================================================================
   CV4SAP — Viewer Stylesheet
   Standalone CSS — no Bootstrap CSS dependency.
   Used for: shared CV / project viewer / gate / state / unsubscribed pages.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design Tokens
   -------------------------------------------------------------------------- */
:root {
    --vw-primary:        #0b3a6f;
    --vw-primary-soft:   #e8f0fb;
    --vw-primary-strong: #082b53;
    --vw-accent:         #00a3a3;

    --vw-bg-page:        #f4f6fa;
    --vw-bg-canvas:      #ffffff;
    --vw-bg-subtle:      #f8fafc;
    --vw-bg-shell:       #eef2f7;

    --vw-border:         #e2e8f0;
    --vw-border-strong:  #cbd5e1;
    --vw-divider:        #f1f5f9;

    --vw-text-heading:   #0f172a;
    --vw-text-body:      #334155;
    --vw-text-muted:     #64748b;
    --vw-text-soft:      #94a3b8;
    --vw-text-on-dark:   #ffffff;

    --vw-success:        #16a34a;
    --vw-success-soft:   #dcfce7;
    --vw-warning:        #d97706;
    --vw-warning-soft:   #fef3c7;
    --vw-danger:         #dc2626;
    --vw-danger-soft:    #fee2e2;
    --vw-info:           #0284c7;
    --vw-info-soft:      #e0f2fe;

    --vw-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --vw-font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    --vw-radius-sm:  6px;
    --vw-radius-md:  10px;
    --vw-radius-lg:  16px;
    --vw-radius-xl:  24px;
    --vw-radius-pill: 999px;

    --vw-shadow-1: 0 1px 2px rgba(15,23,42,.04), 0 4px 12px rgba(15,23,42,.04);
    --vw-shadow-2: 0 2px 6px rgba(15,23,42,.06), 0 12px 32px rgba(15,23,42,.06);
    --vw-shadow-3: 0 8px 16px rgba(15,23,42,.08), 0 24px 48px rgba(15,23,42,.08);

    --vw-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --vw-dur-fast: 0.15s;
    --vw-dur-base: 0.22s;
    --vw-dur-slow: 0.32s;

    --vw-card-w-sm: 420px;
    --vw-card-w-md: 560px;
    --vw-canvas-w:  900px;
    --vw-shell-pad: 24px;
    --vw-topbar-h:  56px;
    --vw-sticky-h:  64px;
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.viewer {
    font-family: var(--vw-font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--vw-text-body);
    background: var(--vw-bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body.viewer--document { background: var(--vw-bg-shell); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--vw-primary); text-decoration: none; }
a:hover { color: var(--vw-primary-strong); }
h1, h2, h3, h4 { color: var(--vw-text-heading); font-weight: 700; line-height: 1.3; }
h1 { font-size: 22px; }
h2 { font-size: 18px; font-weight: 600; line-height: 1.35; }
h3 { font-size: 15px; font-weight: 600; line-height: 1.4; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

.vw-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--vw-primary);
    color: var(--vw-text-on-dark);
    padding: 8px 16px;
    border-radius: var(--vw-radius-md);
    font-weight: 600;
    z-index: 9999;
}
.vw-skip:focus { left: 16px; top: 16px; color: var(--vw-text-on-dark); }

/* --------------------------------------------------------------------------
   Topbar
   -------------------------------------------------------------------------- */
.vw-topbar {
    height: var(--vw-topbar-h);
    padding: 0 var(--vw-shell-pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--vw-bg-canvas);
    border-bottom: 1px solid var(--vw-border);
    position: relative;
    z-index: 50;
}
body.viewer--document .vw-topbar {
    position: sticky;
    top: 0;
}
.vw-topbar__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--vw-text-heading);
    font-weight: 700;
    overflow: hidden;
    min-width: 0;
}
.vw-topbar__logo {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: var(--vw-primary);
}
.vw-topbar__divider { color: var(--vw-text-soft); }
.vw-topbar__context {
    font-size: 13px;
    font-weight: 500;
    color: var(--vw-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vw-topbar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.vw-topbar__lang {
    display: flex;
    gap: 2px;
    background: var(--vw-bg-subtle);
    border: 1px solid var(--vw-border);
    border-radius: var(--vw-radius-pill);
    padding: 3px;
}
.vw-topbar__lang-link {
    font-size: 11px;
    font-weight: 600;
    color: var(--vw-text-muted);
    padding: 4px 10px;
    border-radius: var(--vw-radius-pill);
    letter-spacing: 0.5px;
    transition: all var(--vw-dur-fast) var(--vw-ease);
}
.vw-topbar__lang-link:hover { color: var(--vw-primary); }
.vw-topbar__lang-link.is-active {
    background: var(--vw-primary);
    color: var(--vw-text-on-dark);
}
.vw-topbar__help {
    font-size: 13px;
    color: var(--vw-text-muted);
    font-weight: 500;
}
.vw-topbar__help:hover { color: var(--vw-primary); }
.vw-topbar__exit {
    width: 32px;
    height: 32px;
    border-radius: var(--vw-radius-pill);
    background: var(--vw-bg-subtle);
    color: var(--vw-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--vw-dur-fast) var(--vw-ease);
}
.vw-topbar__exit:hover {
    background: var(--vw-danger-soft);
    color: var(--vw-danger);
}

/* --------------------------------------------------------------------------
   Shell (main content wrapper)
   -------------------------------------------------------------------------- */
.vw-shell {
    flex: 1;
    width: 100%;
    padding: var(--vw-shell-pad);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}
body.viewer--gate .vw-shell,
body.viewer--state .vw-shell {
    justify-content: center;
    min-height: calc(100vh - var(--vw-topbar-h) - 64px);
}
body.viewer--document .vw-shell {
    padding: var(--vw-shell-pad);
    max-width: var(--vw-canvas-w);
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.vw-footer {
    padding: 20px var(--vw-shell-pad);
    text-align: center;
}
.vw-footer__trust {
    font-size: 11px;
    font-weight: 500;
    color: var(--vw-text-soft);
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.vw-footer__trust a { color: var(--vw-text-muted); font-weight: 600; }
.vw-footer__trust a:hover { color: var(--vw-primary); }
.vw-footer__sep { opacity: 0.6; }

/* --------------------------------------------------------------------------
   Card (gate mode)
   -------------------------------------------------------------------------- */
.vw-card {
    width: 100%;
    max-width: var(--vw-card-w-sm);
    background: var(--vw-bg-canvas);
    border: 1px solid var(--vw-border);
    border-radius: var(--vw-radius-lg);
    box-shadow: var(--vw-shadow-1);
    overflow: hidden;
}
.vw-card--md { max-width: var(--vw-card-w-md); }
.vw-card__hero {
    padding: 32px 24px 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--vw-primary), var(--vw-primary-strong));
    color: var(--vw-text-on-dark);
}
.vw-card__hero-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: var(--vw-radius-pill);
    background: rgba(255,255,255,0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--vw-text-on-dark);
}
.vw-card__hero-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--vw-text-on-dark);
    margin-bottom: 4px;
}
.vw-card__hero-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.78);
    margin: 0;
}
.vw-card__body {
    padding: 24px 24px 20px;
}
.vw-card__body--center { text-align: center; }
.vw-card__body p { margin-bottom: 16px; color: var(--vw-text-body); }
.vw-card__divider {
    height: 1px;
    background: var(--vw-divider);
    margin: 16px 0;
}
.vw-card__footer {
    padding: 14px 24px;
    background: var(--vw-bg-subtle);
    border-top: 1px solid var(--vw-divider);
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--vw-text-muted);
    letter-spacing: 0.02em;
}
.vw-card__footer i { color: var(--vw-success); margin-right: 4px; }

/* --------------------------------------------------------------------------
   Form Controls
   -------------------------------------------------------------------------- */
.vw-field { margin-bottom: 16px; text-align: left; }
.vw-field__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--vw-text-heading);
    margin-bottom: 6px;
}
.vw-field__input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font-size: 14px;
    color: var(--vw-text-heading);
    background: var(--vw-bg-canvas);
    border: 1px solid var(--vw-border);
    border-radius: var(--vw-radius-md);
    transition: border-color var(--vw-dur-fast) var(--vw-ease), box-shadow var(--vw-dur-fast) var(--vw-ease);
    font-family: inherit;
}
.vw-field__input--lg { height: 48px; font-size: 15px; }
.vw-field__input:focus {
    outline: none;
    border-color: var(--vw-primary);
    box-shadow: 0 0 0 3px rgba(11,58,111,0.15);
}
.vw-field__input--error,
.vw-field__input[aria-invalid="true"] {
    border-color: var(--vw-danger);
}
.vw-field__group {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--vw-border);
    border-radius: var(--vw-radius-md);
    overflow: hidden;
    background: var(--vw-bg-canvas);
    transition: border-color var(--vw-dur-fast) var(--vw-ease), box-shadow var(--vw-dur-fast) var(--vw-ease);
}
.vw-field__group:focus-within {
    border-color: var(--vw-primary);
    box-shadow: 0 0 0 3px rgba(11,58,111,0.15);
}
.vw-field__group .vw-field__input {
    border: none;
    height: 44px;
    flex: 1;
    box-shadow: none;
}
.vw-field__group .vw-field__input:focus { box-shadow: none; }
.vw-field__group-suffix {
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    background: var(--vw-primary-soft);
    color: var(--vw-primary);
    font-weight: 600;
    font-size: 14px;
    border-left: 1px solid var(--vw-border);
}
.vw-field__hint { font-size: 12px; color: var(--vw-text-muted); margin-top: 6px; }
.vw-field__error { font-size: 12px; color: var(--vw-danger); margin-top: 6px; font-weight: 500; }
.vw-field__success { font-size: 12px; color: var(--vw-success); margin-top: 6px; font-weight: 500; }

.vw-field__input-wrapper { position: relative; }
.vw-field__input-wrapper .vw-field__input { padding-right: 44px; }
.vw-field__toggle-pwd {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--vw-text-soft);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--vw-radius-md);
    transition: color var(--vw-dur-fast) var(--vw-ease);
}
.vw-field__toggle-pwd:hover { color: var(--vw-text-heading); }

/* OTP */
.vw-otp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}
.vw-otp__digit {
    width: 44px;
    height: 52px;
    text-align: center;
    font-family: var(--vw-font-mono);
    font-size: 24px;
    font-weight: 700;
    color: var(--vw-text-heading);
    background: var(--vw-bg-canvas);
    border: 2px solid var(--vw-border);
    border-radius: var(--vw-radius-md);
    transition: all var(--vw-dur-fast) var(--vw-ease);
}
.vw-otp__digit:focus {
    outline: none;
    border-color: var(--vw-primary);
    box-shadow: 0 0 0 3px rgba(11,58,111,0.15);
}
.vw-otp__digit.is-filled { border-color: var(--vw-primary); background: var(--vw-primary-soft); }
.vw-otp__divider { color: var(--vw-text-soft); font-weight: 700; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.vw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    color: var(--vw-text-on-dark);
    background: var(--vw-primary);
    border: 1px solid var(--vw-primary);
    border-radius: var(--vw-radius-md);
    cursor: pointer;
    transition: all var(--vw-dur-fast) var(--vw-ease);
    text-decoration: none;
}
.vw-btn:hover {
    background: var(--vw-primary-strong);
    border-color: var(--vw-primary-strong);
    color: var(--vw-text-on-dark);
    transform: translateY(-1px);
    box-shadow: var(--vw-shadow-2);
}
.vw-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(11,58,111,0.25);
}
.vw-btn--lg { height: 48px; padding: 0 28px; font-size: 15px; }
.vw-btn--block { display: flex; width: 100%; }
.vw-btn--secondary {
    background: var(--vw-bg-canvas);
    color: var(--vw-text-heading);
    border-color: var(--vw-border);
}
.vw-btn--secondary:hover {
    background: var(--vw-bg-subtle);
    color: var(--vw-text-heading);
    border-color: var(--vw-border-strong);
}
.vw-btn--ghost {
    background: transparent;
    color: var(--vw-text-muted);
    border-color: transparent;
}
.vw-btn--ghost:hover {
    background: var(--vw-bg-subtle);
    color: var(--vw-text-heading);
}
.vw-btn--danger {
    background: var(--vw-danger);
    border-color: var(--vw-danger);
}
.vw-btn--danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: var(--vw-text-on-dark);
}
.vw-btn--icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--vw-radius-md);
}
.vw-btn[disabled],
.vw-btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinner */
.vw-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: vwSpin 0.7s linear infinite;
}
@keyframes vwSpin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   Status & Meta
   -------------------------------------------------------------------------- */
.vw-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--vw-radius-md);
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    border: 1px solid transparent;
    animation: vwAlertSlideDown 0.2s var(--vw-ease);
}
.vw-alert i { font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.vw-alert--success { background: var(--vw-success-soft); border-color: #bbf7d0; color: #166534; }
.vw-alert--warning { background: var(--vw-warning-soft); border-color: #fde68a; color: #92400e; }
.vw-alert--danger  { background: var(--vw-danger-soft);  border-color: #fecaca; color: #b91c1c; }
.vw-alert--info    { background: var(--vw-info-soft);    border-color: #bfdbfe; color: #1d4ed8; }
@keyframes vwAlertSlideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.vw-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--vw-radius-sm);
    letter-spacing: 0.02em;
    line-height: 1.2;
}
.vw-badge--soft    { background: var(--vw-primary-soft); color: var(--vw-primary); }
.vw-badge--solid   { background: var(--vw-primary); color: var(--vw-text-on-dark); }
.vw-badge--outline { background: var(--vw-bg-canvas); color: var(--vw-text-muted); border: 1px solid var(--vw-border); }
.vw-badge--success { background: var(--vw-success-soft); color: #166534; }
.vw-badge--warning { background: var(--vw-warning-soft); color: #92400e; }
.vw-badge--danger  { background: var(--vw-danger-soft); color: #b91c1c; }
.vw-badge i { font-size: 12px; }

.vw-meta-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--vw-text-muted);
    font-size: 12px;
}
.vw-meta-row i { font-size: 13px; }

.vw-cooldown {
    text-align: center;
    font-size: 12px;
    color: var(--vw-text-muted);
    margin-top: 12px;
    min-height: 18px;
    font-weight: 500;
}
.vw-cooldown--active { color: var(--vw-warning); }

/* --------------------------------------------------------------------------
   Document Mode
   -------------------------------------------------------------------------- */
.vw-doc {
    width: 100%;
    background: var(--vw-bg-canvas);
    border: 1px solid var(--vw-border);
    border-radius: var(--vw-radius-lg);
    box-shadow: var(--vw-shadow-2);
    overflow: hidden;
    position: relative;
}
.vw-doc__chrome {
    padding: 16px 24px;
    border-bottom: 1px solid var(--vw-divider);
    background: var(--vw-bg-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.vw-doc__chrome-info { min-width: 0; flex: 1; }
.vw-doc__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--vw-text-heading);
    margin: 0 0 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vw-doc__shared-by {
    font-size: 12px;
    color: var(--vw-text-muted);
}
.vw-doc__permissions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.vw-doc__actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.vw-doc__body {
    padding: 24px;
    background: var(--vw-bg-canvas);
    overflow: hidden;
}
.vw-doc__body--flush { padding: 0; }

/* Watermark */
.vw-doc__watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 56px;
    font-weight: 700;
    color: rgba(15,23,42,0.045);
    letter-spacing: 6px;
    text-transform: uppercase;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    z-index: 1;
}
.vw-doc__watermark-sub {
    position: absolute;
    top: 58%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 16px;
    font-weight: 600;
    color: rgba(15,23,42,0.05);
    letter-spacing: 3px;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    z-index: 1;
}

/* Sticky CTA bar */
.vw-doc__sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 400;
    background: var(--vw-bg-canvas);
    border-top: 1px solid var(--vw-border);
    box-shadow: 0 -6px 20px rgba(15,23,42,0.06);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transform: translateY(100%);
    transition: transform var(--vw-dur-slow) var(--vw-ease);
    min-height: var(--vw-sticky-h);
}
.vw-doc__sticky.is-visible { transform: translateY(0); }
.vw-doc__sticky-text {
    font-size: 13px;
    color: var(--vw-text-body);
    flex: 1;
    min-width: 0;
}
.vw-doc__sticky-text strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--vw-text-heading);
    margin-bottom: 2px;
}
.vw-doc__sticky-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.vw-doc__sticky-dismiss {
    background: transparent;
    border: none;
    color: var(--vw-text-soft);
    width: 32px;
    height: 32px;
    border-radius: var(--vw-radius-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.vw-doc__sticky-dismiss:hover { color: var(--vw-text-heading); background: var(--vw-bg-subtle); }

/* --------------------------------------------------------------------------
   Lists & Grids
   -------------------------------------------------------------------------- */
.vw-list {
    width: 100%;
    background: var(--vw-bg-canvas);
    border: 1px solid var(--vw-border);
    border-radius: var(--vw-radius-lg);
    box-shadow: var(--vw-shadow-1);
    overflow: hidden;
}
.vw-list__filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--vw-divider);
    background: var(--vw-bg-subtle);
}
.vw-list__search {
    flex: 1;
    min-width: 200px;
}
.vw-list__sort,
.vw-list__filter-select {
    min-width: 140px;
}
.vw-list__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--vw-divider);
    transition: background var(--vw-dur-fast) var(--vw-ease);
}
.vw-list__item:last-child { border-bottom: none; }
.vw-list__item:hover { background: var(--vw-bg-subtle); }
.vw-list__item-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--vw-radius-pill);
    background: var(--vw-primary-soft);
    color: var(--vw-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}
.vw-list__item-avatar img { width: 100%; height: 100%; object-fit: cover; }
.vw-list__item-meta { flex: 1; min-width: 0; }
.vw-list__item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--vw-text-heading);
    margin-bottom: 2px;
}
.vw-list__item-info {
    font-size: 12px;
    color: var(--vw-text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.vw-list__item-action { flex-shrink: 0; }
.vw-list__empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--vw-text-muted);
}
.vw-list__empty i { font-size: 36px; color: var(--vw-text-soft); margin-bottom: 12px; display: block; }

/* Team grid (project_team) */
.vw-grid--team {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
.vw-team-card {
    background: var(--vw-bg-canvas);
    border: 1px solid var(--vw-border);
    border-radius: var(--vw-radius-lg);
    padding: 18px;
    text-align: center;
    transition: all var(--vw-dur-fast) var(--vw-ease);
}
.vw-team-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--vw-shadow-2);
    border-color: var(--vw-border-strong);
}
.vw-team-card__avatar {
    width: 64px;
    height: 64px;
    border-radius: var(--vw-radius-pill);
    margin: 0 auto 10px;
    background: var(--vw-primary-soft);
    color: var(--vw-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    overflow: hidden;
}
.vw-team-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.vw-team-card__name {
    font-size: 14px;
    font-weight: 700;
    color: var(--vw-text-heading);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vw-team-card__role {
    font-size: 12px;
    color: var(--vw-text-muted);
    margin-bottom: 10px;
}
.vw-team-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    margin-bottom: 12px;
}
.vw-team-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--vw-primary);
}
.vw-team-card__cta:hover { color: var(--vw-primary-strong); }

/* Project hero (project_team) */
.vw-project-hero {
    background: var(--vw-bg-canvas);
    border: 1px solid var(--vw-border);
    border-radius: var(--vw-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.vw-project-hero__logo {
    width: 64px;
    height: 64px;
    border-radius: var(--vw-radius-md);
    background: var(--vw-primary-soft);
    color: var(--vw-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}
.vw-project-hero__logo img { width: 100%; height: 100%; object-fit: contain; }
.vw-project-hero__main { flex: 1; min-width: 0; }
.vw-project-hero__client {
    font-size: 11px;
    font-weight: 600;
    color: var(--vw-text-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.vw-project-hero__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--vw-text-heading);
    margin-bottom: 8px;
    line-height: 1.3;
}
.vw-project-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}
.vw-project-hero__desc {
    color: var(--vw-text-body);
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.vw-project-hero__desc.is-expanded {
    -webkit-line-clamp: unset;
    display: block;
}
.vw-project-hero__expand {
    background: none;
    border: none;
    color: var(--vw-primary);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 0;
    margin-top: 4px;
}

/* Section heading inside doc body */
.vw-section-h {
    font-size: 13px;
    font-weight: 700;
    color: var(--vw-text-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 28px 0 12px;
}

/* Accordion (uses native <details>) */
.vw-accordion {
    background: var(--vw-bg-canvas);
    border: 1px solid var(--vw-border);
    border-radius: var(--vw-radius-md);
    margin-bottom: 8px;
    overflow: hidden;
}
.vw-accordion summary {
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 600;
    color: var(--vw-text-heading);
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
}
.vw-accordion summary::-webkit-details-marker { display: none; }
.vw-accordion summary::after {
    content: '⌄';
    color: var(--vw-text-muted);
    transition: transform var(--vw-dur-fast) var(--vw-ease);
}
.vw-accordion[open] summary::after { transform: rotate(180deg); }
.vw-accordion__body { padding: 0 16px 16px; color: var(--vw-text-body); }

/* --------------------------------------------------------------------------
   State Mode (404 / expired / unsubscribed)
   -------------------------------------------------------------------------- */
.vw-state {
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}
.vw-state__icon {
    width: 96px;
    height: 96px;
    border-radius: var(--vw-radius-pill);
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    background: var(--vw-primary-soft);
    color: var(--vw-primary);
}
.vw-state--success .vw-state__icon { background: var(--vw-success-soft); color: var(--vw-success); }
.vw-state--warning .vw-state__icon { background: var(--vw-warning-soft); color: var(--vw-warning); }
.vw-state--info .vw-state__icon    { background: var(--vw-info-soft); color: var(--vw-info); }
.vw-state__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--vw-text-heading);
    margin-bottom: 12px;
}
.vw-state__desc {
    font-size: 15px;
    color: var(--vw-text-body);
    line-height: 1.6;
    margin-bottom: 28px;
}
.vw-state__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Modal (rating, etc.)
   -------------------------------------------------------------------------- */
.vw-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.vw-modal.is-open { display: flex; }
.vw-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,0.5);
    backdrop-filter: blur(2px);
}
.vw-modal__dialog {
    position: relative;
    background: var(--vw-bg-canvas);
    border-radius: var(--vw-radius-lg);
    box-shadow: var(--vw-shadow-3);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
    animation: vwModalIn var(--vw-dur-base) var(--vw-ease);
}
@keyframes vwModalIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.vw-modal__header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--vw-divider);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.vw-modal__header h2 { margin: 0; font-size: 18px; }
.vw-modal__close {
    background: transparent;
    border: none;
    color: var(--vw-text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--vw-radius-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.vw-modal__close:hover { background: var(--vw-bg-subtle); color: var(--vw-text-heading); }
.vw-modal__body { padding: 20px 24px; }
.vw-modal__footer {
    padding: 16px 24px;
    border-top: 1px solid var(--vw-divider);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Rating */
.vw-rating { display: inline-flex; gap: 4px; }
.vw-rating__star {
    background: transparent;
    border: none;
    color: var(--vw-text-soft);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    transition: color var(--vw-dur-fast) var(--vw-ease), transform var(--vw-dur-fast) var(--vw-ease);
}
.vw-rating__star:hover,
.vw-rating__star.is-active {
    color: var(--vw-warning);
    transform: scale(1.1);
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */
.vw-toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.vw-toast {
    background: var(--vw-bg-canvas);
    border: 1px solid var(--vw-border);
    border-left: 4px solid var(--vw-info);
    border-radius: var(--vw-radius-md);
    box-shadow: var(--vw-shadow-2);
    padding: 12px 16px;
    min-width: 280px;
    max-width: 380px;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    animation: vwToastIn var(--vw-dur-base) var(--vw-ease);
}
.vw-toast.is-removing { animation: vwToastOut var(--vw-dur-base) var(--vw-ease) forwards; }
@keyframes vwToastIn  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes vwToastOut { to   { opacity: 0; transform: translateX(20px); } }
.vw-toast--success { border-left-color: var(--vw-success); }
.vw-toast--warning { border-left-color: var(--vw-warning); }
.vw-toast--error   { border-left-color: var(--vw-danger); }
.vw-toast__icon { font-size: 18px; flex-shrink: 0; }
.vw-toast--success .vw-toast__icon { color: var(--vw-success); }
.vw-toast--warning .vw-toast__icon { color: var(--vw-warning); }
.vw-toast--error   .vw-toast__icon { color: var(--vw-danger); }
.vw-toast--info    .vw-toast__icon { color: var(--vw-info); }
.vw-toast__msg { flex: 1; font-size: 13px; color: var(--vw-text-body); line-height: 1.45; }
.vw-toast__close {
    background: transparent;
    border: none;
    color: var(--vw-text-soft);
    cursor: pointer;
    padding: 0 4px;
    font-size: 18px;
}

/* --------------------------------------------------------------------------
   Domain gate accordion
   -------------------------------------------------------------------------- */
.vw-domain-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.vw-domain-option {
    border: 1px solid var(--vw-border);
    background: var(--vw-bg-canvas);
    border-radius: var(--vw-radius-md);
    padding: 18px;
    text-align: left;
    cursor: pointer;
    transition: all var(--vw-dur-fast) var(--vw-ease);
    color: var(--vw-text-body);
    font-family: inherit;
}
.vw-domain-option:hover {
    border-color: var(--vw-primary);
    transform: translateY(-1px);
    box-shadow: var(--vw-shadow-1);
}
.vw-domain-option i { font-size: 22px; color: var(--vw-primary); margin-bottom: 8px; display: block; }
.vw-domain-option strong { display: block; color: var(--vw-text-heading); font-size: 14px; margin-bottom: 4px; }
.vw-domain-option span { font-size: 12px; color: var(--vw-text-muted); }
.vw-domain-option.is-collapsed { opacity: 0.5; transform: none; }
.vw-domain-form {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--vw-dur-slow) var(--vw-ease), opacity var(--vw-dur-slow) var(--vw-ease);
    opacity: 0;
}
.vw-domain-form.is-open {
    max-height: 360px;
    opacity: 1;
    margin-top: 12px;
}
.vw-domain-form__back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--vw-text-muted);
    background: none;
    border: none;
    margin-bottom: 12px;
    cursor: pointer;
    font-family: inherit;
}
.vw-domain-form__back:hover { color: var(--vw-text-heading); }

/* --------------------------------------------------------------------------
   CV-template inside vw-doc__body — minimal reset to fit container
   -------------------------------------------------------------------------- */
.vw-doc__body .cv-tpl-container { max-width: 100% !important; padding: 0 !important; margin: 0 !important; overflow: hidden; position: relative; z-index: 2; }
.vw-doc__body .cv-tpl-document  { box-shadow: none !important; margin: 0 !important; width: 100% !important; padding: 0 !important; word-wrap: break-word; overflow-wrap: break-word; }
.vw-doc__body .cv-tpl-table     { table-layout: fixed; word-wrap: break-word; }
.vw-doc__body section,
.vw-doc__body .cv-tpl-section   { padding-top: 0 !important; padding-bottom: 0 !important; margin-bottom: 1rem !important; }
.vw-doc__body .cv-tpl-table-project { margin-bottom: 1rem !important; }

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */
@page { margin: 15mm 10mm; size: A4 portrait; }
@media print {
    body.viewer { background: #fff !important; min-height: auto; }
    .vw-topbar, .vw-footer, .vw-doc__sticky,
    .vw-doc__chrome .vw-doc__actions,
    .vw-doc__permissions,
    .vw-toast-container,
    .vw-skip { display: none !important; }
    .vw-shell { padding: 0 !important; max-width: 100% !important; }
    .vw-doc { box-shadow: none !important; border: none !important; max-width: 100% !important; border-radius: 0 !important; }
    .vw-doc__body { padding: 0 !important; }
    .vw-doc__chrome { padding: 0 0 12px !important; background: transparent !important; border-bottom: 1px solid #000 !important; margin-bottom: 16px !important; }
    .vw-doc__watermark, .vw-doc__watermark-sub { color: rgba(15,23,42,0.12) !important; opacity: 1 !important; display: block !important; }
    .cv-tpl-section,
    .cv-tpl-table-project { page-break-inside: avoid; }
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}
@media print {
    body[data-print-disabled="1"] * { display: none !important; visibility: hidden !important; }
    body[data-print-disabled="1"]::after {
        content: attr(data-print-msg);
        display: block;
        text-align: center;
        margin-top: 200px;
        font: 700 24pt 'Inter', sans-serif;
        color: #333;
        visibility: visible !important;
    }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
    .vw-grid--team { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
    :root { --vw-shell-pad: 16px; }
    .vw-topbar { padding: 0 16px; }
    .vw-topbar__context { display: none; }
    .vw-grid--team { grid-template-columns: repeat(2, 1fr); }
    .vw-domain-options { grid-template-columns: 1fr; }
    .vw-doc__chrome { padding: 14px 16px; flex-direction: column; align-items: flex-start; }
    .vw-doc__actions { width: 100%; justify-content: flex-end; }
    .vw-doc__body { padding: 16px; }
    .vw-project-hero { flex-direction: column; gap: 14px; padding: 18px; }
    .vw-list__filter { flex-direction: column; }
    .vw-list__search, .vw-list__sort, .vw-list__filter-select { width: 100%; min-width: 0; }
    .vw-otp__digit { width: 38px; height: 48px; font-size: 20px; }
    .vw-toast { min-width: 0; max-width: calc(100vw - 40px); }
}
@media (max-width: 479px) {
    .vw-grid--team { grid-template-columns: 1fr; }
    .vw-state__title { font-size: 20px; }
    .vw-state__icon { width: 80px; height: 80px; font-size: 36px; }
    .vw-card__hero { padding: 24px 16px 16px; }
    .vw-card__body { padding: 18px 16px 14px; }
}
