/* ─────────────────────────────────────────────────────────────
   ORA Docs — Google Docs Parity Editor Styling
───────────────────────────────────────────────────────────── */
:root {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --border: #e2e8f0;
    --primary: #4285F4;
    --primary-hover: #2b6cb0;
    --text-main: #1e293b;
    --text-muted: #64748b;

    /* Google Docs accents */
    --primary-light: #e8f0fe;
    --primary-focus: rgba(66, 133, 244, 0.25);
    --surface-hover: #f1f5f9;
    --surface-active: #e2e8f0;
    --toolbar-bg: #f8fafc;
    --doc-shadow: 0 1px 3px rgba(60, 64, 67, 0.15), 0 4px 8px rgba(60, 64, 67, 0.1);
    --modal-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-full: 9999px;
    --page-width: 816px; /* 8.5 inches at 96 DPI */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ─────────────────────────────────────────────────────────────
   1. TOP NAVIGATION & MENUBAR
───────────────────────────────────────────────────────────── */
.editor-top-nav {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 6px 16px 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    z-index: 200;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
    transition: all 0.2s ease;
}

/* Tier 1: Main Bar (Branding, Title, Status, Collaborators, Actions) */
.top-nav-row,
.top-nav-main-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 38px;
    flex-wrap: nowrap;
}

/* Left Group */
.nav-left-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

/* Back button */
.back-to-dashboard-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.back-to-dashboard-btn:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
    transform: translateX(-1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.back-to-dashboard-btn:active {
    transform: scale(0.96);
    background: #f1f5f9;
}

/* Brand Logo */
.doc-brand-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.doc-brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
}

.doc-brand-icon:hover {
    transform: scale(1.05);
}

/* Doc Info & Title Row */
.doc-info-block {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.doc-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.doc-title-input {
    field-sizing: content;
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 3px 8px;
    background: transparent;
    outline: none;
    font-family: inherit;
    min-width: 60px;
    max-width: 320px;
    flex: 0 1 auto;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    transition: all 0.2s ease;
}

.doc-title-input:hover {
    border-color: #e2e8f0;
    background: rgba(248, 250, 252, 0.9);
}

.doc-title-input:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Star Button */
.star-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border: 1px solid transparent;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.star-btn:hover {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}

.star-btn.active {
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.25);
}

.star-btn:active {
    transform: scale(0.9);
}

/* Save Status Badge */
.save-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
    transition: all 0.25s ease;
    user-select: none;
    flex-shrink: 0;
    white-space: nowrap;
}

.save-status-badge i.fa-cloud-check {
    color: #16a34a;
    font-size: 0.76rem;
}

.save-status-badge.saving {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

.save-status-badge.saving i {
    animation: pulseCloudSave 1.1s ease-in-out infinite;
    color: #2563eb;
}

@keyframes pulseCloudSave {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15) translateY(-1px); opacity: 0.7; }
}

/* 8-State Save Badge States */
.save-status-badge.unsaved {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}
.save-status-badge.saved-local {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.save-status-badge.syncing-cloud {
    background: #eef2ff;
    color: #4f46e5;
    border-color: #c7d2fe;
}
.save-status-badge.synced-cloud {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}
.save-status-badge.offline {
    background: #f1f5f9;
    color: #64748b;
    border-color: #cbd5e1;
}
.save-status-badge.sync-failed {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fca5a5;
    animation: pulseError 2s ease-in-out infinite;
}
.save-status-badge.recovery-req {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
}
@keyframes pulseError {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}

/* BiDi Nastaliq Typography: font loaded in Editor/index.html <head>. */
.font-nastaliq {
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Urdu Typesetting', serif !important;
    line-height: 2.2 !important;
    font-size: 1.15rem !important;
    direction: rtl !important;
    text-align: right !important;
}

/* Revision History Modal */
.revisions-modal-box {
    max-width: 620px !important;
    width: 90% !important;
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6) !important;
}
.revision-row:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}

/* Range-Anchored Comments */
mark.ora-comment-anchor {
    background: rgba(254, 240, 138, 0.65);
    border-bottom: 2px solid #eab308;
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.2s ease;
}
mark.ora-comment-anchor:hover {
    background: rgba(254, 240, 138, 0.95);
}
.comment-card.highlight-comment-pulse {
    animation: commentPulse 1.5s ease-in-out;
}
@keyframes commentPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); box-shadow: 0 0 12px rgba(245, 158, 11, 0.4); }
}

/* Page Break Divider */
.doc-page-break {
    page-break-after: always;
    border-bottom: 2px dashed #cbd5e1;
    margin: 28px 0;
    text-align: center;
    color: #94a3b8;
    font-size: 11px;
    letter-spacing: 0.05em;
    user-select: none;
}

/* Nav Right Group */
.nav-right-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
}

/* Collaborator Presence Strip */
.collaborator-presence-strip {
    display: flex;
    align-items: center;
    gap: 0;
}

.collaborator-presence-strip .presence-avatar {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.76rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    position: relative;
    cursor: pointer;
    margin-left: -7px;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), z-index 0.2s, box-shadow 0.2s;
}

.collaborator-presence-strip .presence-avatar:first-child {
    margin-left: 0;
}

.collaborator-presence-strip .presence-avatar:hover {
    transform: scale(1.18) translateY(-1px);
    z-index: 15;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.presence-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Typing Indicator Pill */
.typing-indicator-pill {
    display: none;
    align-items: center;
    gap: 6px;
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 9999px;
    animation: pulseWriting 1.6s ease-in-out infinite;
    user-select: none;
    white-space: nowrap;
}

.typing-indicator-pill i {
    font-size: 0.74rem;
    color: #6366f1;
    animation: bounceWritingPen 1s ease-in-out infinite;
}

@keyframes pulseWriting {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.85; }
}

@keyframes bounceWritingPen {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

/* Comments Action Button */
.tool-btn.header-action-btn,
.tool-btn#toggle-comments-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.tool-btn.header-action-btn:hover,
.tool-btn#toggle-comments-btn:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tool-btn.header-action-btn:active,
.tool-btn#toggle-comments-btn:active {
    transform: scale(0.96);
    background: #f1f5f9;
}

/* Blue Share Button */
.google-share-btn {
    height: 34px;
    padding: 0 14px;
    border-radius: 9999px;
    border: none;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.28);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    white-space: nowrap;
}

.google-share-btn i.fa-lock {
    font-size: 0.8rem;
}

.google-share-btn .share-btn-text {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.google-share-btn .share-count-badge,
.google-share-btn #share-collaborators-count {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 9999px;
    padding: 1px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
}

.google-share-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.38);
    transform: translateY(-1px);
}

.google-share-btn:active {
    transform: scale(0.97);
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
}

/* User Profile Avatar */
.presence-avatar.header-user-avatar,
.presence-avatar#current-user-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #ffffff;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1.5px #e2e8f0, 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.presence-avatar.header-user-avatar:hover,
.presence-avatar#current-user-avatar:hover {
    box-shadow: 0 0 0 2px #3b82f6, 0 2px 8px rgba(59, 130, 246, 0.28);
    transform: scale(1.05);
}

/* Tier 2: Menubar Ribbon */
.top-nav-menubar-row {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1px 0 2px 44px;
}

.menubar {
    display: flex;
    align-items: center;
    gap: 3px;
    width: 100%;
}

.menu-item {
    position: relative;
}

.menu-btn {
    border: none;
    background: transparent;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 4px 9px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    white-space: nowrap;
}

.menu-btn:hover,
.menu-item.active .menu-btn {
    background: #f1f5f9;
    color: #0f172a;
}

/* Menubar Dropdown */
.menu-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.04);
    padding: 6px;
    min-width: 225px;
    z-index: 1000;
    display: none;
    flex-direction: column;
    animation: fadeInMenu 0.15s ease-out;
}

@keyframes fadeInMenu {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.menu-item.active .menu-dropdown {
    display: flex;
}

.menu-option {
    border: none;
    background: transparent;
    padding: 7px 12px;
    border-radius: 6px;
    text-align: left;
    font-size: 0.82rem;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s ease;
}

.menu-option:hover {
    background: #f1f5f9;
    color: #2563eb;
}

.menu-option i {
    width: 18px;
    color: #64748b;
    font-size: 0.84rem;
}

.menu-option:hover i {
    color: #2563eb;
}

.menu-shortcut {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 400;
}

.menu-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 6px;
}

/* ─────────────────────────────────────────────────────────────
   2. GOOGLE DOCS RIBBON TOOLBAR
───────────────────────────────────────────────────────────── */
.editor-toolbar {
    background: #edf2f7;
    border-bottom: 1px solid var(--border);
    padding: 5px 16px;
    display: flex;
    align-items: center;
    gap: 3px;
    overflow-x: auto;
    position: relative;
    z-index: 150;
    user-select: none;
}

.tool-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.tool-divider {
    width: 1px;
    height: 20px;
    background: #cbd5e1;
    margin: 0 5px;
    flex-shrink: 0;
}

.tool-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--text-main);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.tool-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

.tool-btn.active {
    background: var(--primary-light);
    color: var(--primary);
}

/* Select & Steppers in Toolbar */
.tool-select {
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.84rem;
    font-weight: 500;
    padding: 4px 8px;
    cursor: pointer;
    outline: none;
    font-family: inherit;
    transition: all 0.15s;
}

.tool-select:hover {
    background: rgba(0, 0, 0, 0.08);
}

.font-size-stepper {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    height: 28px;
}

.stepper-btn {
    border: none;
    background: transparent;
    width: 24px;
    height: 100%;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stepper-btn:hover {
    background: var(--surface-hover);
    color: var(--text-main);
}

.font-size-input {
    width: 32px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    outline: none;
}

/* Color Pickers Popup */
.color-picker-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    padding: 10px;
    z-index: 1000;
    display: none;
    grid-template-columns: repeat(8, 20px);
    gap: 5px;
}

.color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.15s;
}

.color-swatch:hover {
    transform: scale(1.2);
}

/* ─────────────────────────────────────────────────────────────
   3. CALIBRATED HORIZONTAL RULER
───────────────────────────────────────────────────────────── */
.ruler-container {
    background: #e2e8f0;
    border-bottom: 1px solid #cbd5e1;
    height: 18px;
    position: relative;
    display: flex;
    justify-content: center;
    overflow: hidden;
    user-select: none;
}

.ruler-bar {
    width: var(--page-width);
    height: 100%;
    background: #f1f5f9;
    border-left: 1px solid #cbd5e1;
    border-right: 1px solid #cbd5e1;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.ruler-marker-stop {
    position: absolute;
    top: 0;
    width: 10px;
    height: 18px;
    cursor: ew-resize;
    z-index: 10;
}

.ruler-left-stop {
    left: 96px; /* 1 inch default */
}

.ruler-right-stop {
    right: 96px;
}

.stop-triangle {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid var(--primary);
    margin: 0 auto;
}

.ruler-ticks {
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: space-between;
    padding: 0 8px;
    align-items: flex-end;
}

.ruler-tick {
    height: 6px;
    width: 1px;
    background: #94a3b8;
    position: relative;
}

.ruler-tick.major {
    height: 9px;
    background: #475569;
}

.ruler-tick.major::after {
    content: attr(data-inch);
    position: absolute;
    bottom: 9px;
    left: -3px;
    font-size: 8px;
    color: #475569;
    font-weight: 700;
}

/* ─────────────────────────────────────────────────────────────
   4. WORKSPACE CANVAS & GOOGLE DOCS PAGE
───────────────────────────────────────────────────────────── */
.editor-workspace {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* Collapsible Outline Drawer (Left) */
.doc-outline-drawer {
    width: 240px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 16px;
    overflow-y: auto;
    transition: margin-left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.doc-outline-drawer.collapsed {
    margin-left: -240px;
}

.outline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.outline-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.outline-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.outline-item {
    font-size: 0.84rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.15s;
}

.outline-item:hover {
    background: var(--surface-hover);
    color: var(--primary);
}

.outline-item.h2 { padding-left: 14px; font-size: 0.8rem; }
.outline-item.h3 { padding-left: 24px; font-size: 0.76rem; }

/* Center Document Scrollable Viewport */
.doc-scroll-viewport {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    padding: 30px 20px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Read-only viewing mode banner */
.doc-readonly-banner {
    width: var(--page-width);
    max-width: 100%;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e40af;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.doc-viewport-inner {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    max-width: 100%;
}

/* ─────────────────────────────────────────────────────────────
   3b. RIGHT VERTICAL RULER / SCALE (Attached Flush to Right Corner)
───────────────────────────────────────────────────────────── */
.vertical-ruler-container {
    width: 26px;
    background: #f8fafc;
    border-right: 1px solid #cbd5e1;
    border-top: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
    border-left: 1px solid #e2e8f0;
    position: relative;
    user-select: none;
    margin-left: 0;
    margin-right: 0;
    box-shadow: 1px 0 4px rgba(0,0,0,0.03);
    flex-shrink: 0;
    border-radius: 0 4px 4px 0;
    cursor: crosshair;
}

.vertical-ruler-container.hidden {
    display: none !important;
}

.vertical-ruler-bar {
    width: 100%;
    min-height: 1056px;
    height: 100%;
    position: relative;
    background: #f8fafc;
}

.v-ruler-marker-stop {
    position: absolute;
    left: 0;
    width: 26px;
    height: 18px;
    cursor: ns-resize;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
}

.v-ruler-marker-stop:hover,
.v-ruler-marker-stop.dragging {
    z-index: 105;
}

.v-ruler-marker-stop:focus-visible {
    outline: 2px solid var(--primary);
}

.v-ruler-top-stop {
    top: 96px; /* 1 inch top margin */
}

.v-ruler-bottom-stop {
    top: 960px; /* 10 inch bottom margin */
}

/* Triangle points left (towards the paper canvas) */
.v-stop-triangle {
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 8px solid var(--primary);
    border-left: none;
    margin: 0;
    filter: drop-shadow(-1px 0 1px rgba(0,0,0,0.15));
    transition: border-color 0.15s, transform 0.15s;
}

.v-ruler-marker-stop:hover .v-stop-triangle,
.v-ruler-marker-stop.dragging .v-stop-triangle {
    border-right-color: var(--primary-hover);
    transform: scale(1.2);
}

/* Floating Tooltip during Drag */
.v-stop-tooltip {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: #0f172a;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 200;
}

.v-ruler-marker-stop.dragging .v-stop-tooltip,
.v-ruler-marker-stop:hover .v-stop-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Vertical Ticks */
.vertical-ruler-ticks {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 1056px;
    justify-content: space-between;
    padding: 0;
    align-items: flex-start; /* Ticks start from left edge adjacent to paper */
}

.v-ruler-tick {
    width: 6px;
    height: 1px;
    background: #94a3b8;
    position: relative;
    pointer-events: none;
}

.v-ruler-tick.major {
    width: 13px;
    background: #334155;
    height: 1.5px;
}

.v-ruler-tick.major::after {
    content: attr(data-inch);
    position: absolute;
    left: 14px;
    top: -5px;
    font-size: 8px;
    color: #475569;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Live guideline across document canvas */
.ruler-v-guideline {
    position: absolute;
    left: 0;
    width: var(--page-width);
    height: 1px;
    border-top: 1px dashed var(--primary);
    pointer-events: none;
    z-index: 90;
    display: none;
    opacity: 0.85;
}

.ruler-v-guideline.active {
    display: block;
}

/* Google Docs White Page Sheet */
.doc-page {
    width: var(--page-width);
    max-width: var(--page-width);
    min-height: 1056px; /* 11 inches at 96 DPI */
    background: var(--bg-surface);
    box-shadow: var(--doc-shadow);
    border-radius: 1px;
    padding: 96px; /* 1 inch default margin */
    outline: none;
    position: relative;
    color: #1e293b;
    font-family: 'Inter', sans-serif;
    font-size: 11pt;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box !important;
}

.doc-page * {
    box-sizing: border-box !important;
}

.doc-page:focus {
    box-shadow: 0 1px 3px rgba(66, 133, 244, 0.2), 0 4px 12px rgba(66, 133, 244, 0.15);
}

/* Page boundaries & multi-page break divider */
.doc-page-section {
    position: relative;
    min-height: 864px;
    margin-bottom: 24px;
    box-sizing: border-box;
}

.doc-page-break {
    display: block;
    width: calc(100% + 192px);
    margin: 36px -96px;
    padding: 10px 0;
    border-top: 2px dashed #94a3b8;
    border-bottom: 2px dashed #94a3b8;
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
    text-transform: uppercase;
    user-select: none;
    cursor: default;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}

/* Typography Inside Google Docs Canvas */
.doc-page h1 { font-size: 24pt; font-weight: 700; margin-bottom: 12px; }
.doc-page h2 { font-size: 18pt; font-weight: 600; margin-top: 18px; margin-bottom: 8px; }
.doc-page h3 { font-size: 14pt; font-weight: 600; margin-top: 14px; margin-bottom: 6px; }
.doc-page p { margin-bottom: 10px; }
.doc-page ul, .doc-page ol { margin-left: 24px; margin-bottom: 12px; }
.doc-page li { margin-bottom: 4px; }
.doc-page blockquote {
    border-left: 3px solid var(--primary);
    padding-left: 12px;
    color: #64748b;
    margin: 12px 0;
}

/* Compressed Images Inside Document & Avoid Page Breaks */
.doc-page img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: outline 0.15s;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
}

.doc-page img:hover, .doc-page img.selected {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Strict Page Break Prevention for PDF Export & Printing */
.doc-page img,
.doc-page figure,
.doc-page table,
.doc-page tr,
.doc-page thead,
.doc-page tbody,
.doc-page tfoot,
.doc-page blockquote,
.doc-page pre,
.doc-page .doc-callout,
.doc-page .doc-card,
.doc-page .doc-stat-box,
.doc-page .image-wrapper,
.doc-page .resizable-image,
.doc-page .doc-image-wrapper {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
}

.doc-page h1,
.doc-page h2,
.doc-page h3,
.doc-page h4 {
    break-after: avoid !important;
    page-break-after: avoid !important;
}

/* Tables Inside Document */
.doc-page table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse;
    margin: 14px 0;
    table-layout: auto;
    word-break: break-word;
    box-sizing: border-box !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
}

.doc-page td, .doc-page th {
    border: 1px solid #cbd5e1;
    padding: 8px 10px;
    min-width: 30px;
    vertical-align: top;
    box-sizing: border-box !important;
    word-break: break-word;
    overflow-wrap: break-word;
}

.doc-page th {
    background: #f8fafc;
    font-weight: 600;
}

/* Floating Table Toolbar */
.floating-table-tools {
    position: absolute;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--modal-shadow);
    padding: 4px;
    display: none;
    gap: 4px;
    z-index: 500;
}

/* ─────────────────────────────────────────────────────────────
   LIVE COLLABORATIVE REMOTE CURSORS LAYER
───────────────────────────────────────────────────────────── */
.remote-cursors-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 90;
    overflow: visible;
}

.remote-cursor {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    transition: transform 0.08s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 95;
    will-change: transform;
}

.remote-cursor-caret {
    width: 2.5px;
    height: 22px;
    border-radius: 1px;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.35);
    animation: cursorBlink 1.2s ease-in-out infinite;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.remote-cursor-badge {
    position: absolute;
    top: -24px;
    left: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 4px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    user-select: none;
}

/* ─────────────────────────────────────────────────────────────
   INTERACTIVE IMAGE RESIZER OVERLAY
───────────────────────────────────────────────────────────── */
.image-resizer-overlay {
    position: absolute;
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9), 0 4px 12px rgba(66, 133, 244, 0.25);
    pointer-events: none;
    z-index: 120;
    border-radius: 4px;
    box-sizing: border-box;
}

.resizer-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border: 2px solid var(--primary);
    border-radius: 2px;
    pointer-events: auto;
    z-index: 125;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.resizer-handle.handle-nw { top: -6px; left: -6px; cursor: nwse-resize; }
.resizer-handle.handle-ne { top: -6px; right: -6px; cursor: nesw-resize; }
.resizer-handle.handle-se { bottom: -6px; right: -6px; cursor: nwse-resize; }
.resizer-handle.handle-sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.resizer-handle.handle-e  { top: 50%; right: -6px; transform: translateY(-50%); cursor: ew-resize; }
.resizer-handle.handle-s  { bottom: -6px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }

.resizer-info-badge {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.88);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    display: none;
}

/* ─────────────────────────────────────────────────────────────
   CONTEXTUAL IMAGE OPTIONS TOOLBAR (DOCKED AT BOTTOM OF EDITOR-TOOLBAR)
───────────────────────────────────────────────────────────── */
.image-options-toolbar {
    background: #f8fafc;
    border-bottom: 2px solid var(--border);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 3px 14px;
    display: none;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
    position: relative;
    z-index: 148;
    user-select: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.image-options-toolbar::-webkit-scrollbar {
    height: 4px;
}

.image-options-toolbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.img-tb-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(66, 133, 244, 0.08);
    border: 1px solid rgba(66, 133, 244, 0.2);
    border-radius: 12px;
    padding: 3px 9px;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.img-tb-group {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.img-tb-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 2px;
}

.img-pill-btn {
    height: 26px !important;
    padding: 0 7px !important;
    font-size: 0.76rem !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    border: 1px solid var(--border) !important;
    font-weight: 500;
}

.img-pill-btn:hover {
    background: var(--surface-hover) !important;
    border-color: #94a3b8 !important;
    color: var(--primary) !important;
}

.img-tb-slider-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.img-tb-slider {
    width: 90px;
    height: 4px;
    accent-color: var(--primary);
    cursor: pointer;
}

.img-tb-val {
    font-size: 0.74rem;
    color: var(--text-muted);
    min-width: 42px;
    font-weight: 600;
}

.img-tb-select {
    height: 26px;
    padding: 2px 6px;
    font-size: 0.76rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #ffffff;
    color: var(--text-main);
    outline: none;
    cursor: pointer;
}

.img-tb-select:hover, .img-tb-select:focus {
    border-color: var(--primary);
}

.img-tb-color {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    flex-shrink: 0;
}

.img-tb-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

#img-replace-btn:hover {
    color: var(--primary) !important;
    background: rgba(255, 111, 0, 0.12) !important;
}

.img-del-btn {
    color: #ef4444 !important;
}

.img-del-btn:hover {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

.img-close-tb-btn {
    color: #10b981 !important;
}

.img-close-tb-btn:hover {
    background: #ecfdf5 !important;
    color: #047857 !important;
}

/* ─────────────────────────────────────────────────────────────
   REDESIGNED COLLABORATIVE COMMENTS DRAWER
───────────────────────────────────────────────────────────── */
.doc-comments-drawer {
    width: 320px;
    background: var(--bg-surface);
    border-left: 1px solid var(--border);
    display: none;
    flex-direction: column;
    padding: 16px;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.04);
}

.doc-comments-drawer.open {
    display: flex;
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.comments-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-header-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.comments-count-badge {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

.comment-composer-card {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.composer-author-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--border);
    background: #f1f5f9;
}

.composer-author-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
}

.comment-textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.82rem;
    color: var(--text-main);
    background: var(--bg-surface);
    outline: none;
    resize: vertical;
    min-height: 52px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.comment-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.12);
}

.composer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-primary-sm {
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}

.btn-primary-sm:hover {
    background: var(--primary-hover);
}

.btn-subtle-sm {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
    cursor: pointer;
}

.comments-filter-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.filter-chip {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 3px 10px;
    font-size: 0.74rem;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.15s;
}

.filter-chip.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-card {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.comment-card:hover {
    border-color: rgba(66, 133, 244, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comment-card.resolved {
    opacity: 0.65;
    background: #f8fafc;
}

.comment-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.comment-user-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-author-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
}

.comment-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.comment-card-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-action-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.15s;
}

.comment-action-btn:hover {
    background: var(--surface-hover);
    color: var(--text-main);
}

.comment-action-btn.resolve-btn:hover {
    color: #10b981;
    background: #ecfdf5;
}

.comment-action-btn.delete-btn:hover {
    color: #ef4444;
    background: #fee2e2;
}

.comment-body-text {
    font-size: 0.84rem;
    color: var(--text-main);
    line-height: 1.45;
    word-break: break-word;
}

/* Find and Replace Floating Bar */
.find-replace-bar {
    position: absolute;
    top: 10px;
    right: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--modal-shadow);
    padding: 8px 12px;
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 600;
}

.find-input {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px 8px;
    font-size: 0.84rem;
    outline: none;
}

.find-input:focus {
    border-color: var(--primary);
}

/* Format Painter active state */
.tool-btn.painter-active {
    background: #fef08a !important;
    color: #854d0e !important;
    box-shadow: 0 0 0 2px #eab308 !important;
}

/* Ruler visibility toggle */
.ruler-container.hidden {
    display: none !important;
}

/* ─────────────────────────────────────────────────────────────
   5. MODALS & DIALOG OVERLAYS (Google Docs Parity)
───────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    padding: 16px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--modal-shadow);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transform: scale(0.96) translateY(6px);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

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

.modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.modal-close-btn:hover {
    background: var(--surface-hover);
    color: var(--text-main);
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 0.88rem;
    color: var(--text-main);
}

.modal-footer {
    padding: 14px 20px;
    background: var(--bg-main);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-control {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.88rem;
    color: var(--text-main);
    outline: none;
    font-family: inherit;
    transition: all 0.15s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-focus);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border);
    font-size: 0.84rem;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: #cbd5e1;
}

.member-role-badge {
    background: var(--surface-hover);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

/* Share Modal Components */
.share-invite-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.share-invite-row input {
    min-width: 0;
    flex: 1;
}

.share-invite-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.share-invite-actions select {
    width: 100px;
}

.share-general-access-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--bg-main);
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.share-access-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.share-access-select {
    width: 220px;
    max-width: 100%;
    font-size: 0.82rem;
    padding: 6px 8px;
    flex-shrink: 0;
}

.share-team-assign-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.share-team-assign-row select {
    min-width: 0;
    flex: 1;
}

.share-team-assign-row button {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Special Characters Grid */
.char-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
    padding: 4px;
}

.char-btn {
    height: 38px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.char-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.1);
}

/* Shortcuts Cheatsheet Table */
.shortcuts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.shortcuts-table th, .shortcuts-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.shortcuts-table th {
    background: var(--bg-main);
    font-weight: 600;
    color: var(--text-muted);
}

.shortcuts-table kbd {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2px 6px;
    font-family: inherit;
    font-size: 0.78rem;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

/* ─────────────────────────────────────────────────────────────
   GOOGLE WORKSPACE STYLE PROFILE POPOVER IN EDITOR
───────────────────────────────────────────────────────────── */
.nav-right-group {
    position: relative;
}

/* --- GLOBAL PROFILE DROPDOWN STYLES (MATCHING ECOSYSTEM HEADER) --- */
.profile-dropdown.ora-global-dropdown,
.profile-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.06);
    overflow: hidden;
    z-index: 3000;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: all 0.2s ease-out;
    pointer-events: none;
}

.profile-dropdown.ora-global-dropdown.active,
.profile-popover.active {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.ora-global-dropdown .pd-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: #f9fafb;
    border-bottom: 1px solid #eee;
}

.ora-global-dropdown .pd-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.ora-global-dropdown .pd-avatar,
.ora-global-dropdown .popover-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.ora-global-dropdown .popover-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.ora-global-dropdown .pd-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.ora-global-dropdown .pd-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ora-global-dropdown .pd-email {
    font-size: 0.8rem;
    color: #757575;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ora-global-dropdown .pd-links {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.ora-global-dropdown .pd-links li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    color: #444;
    font-size: 0.88rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.ora-global-dropdown .pd-links li a:hover {
    background: #fff3e0;
    color: #FF6F00;
}

.ora-global-dropdown .pd-links li a i {
    width: 20px;
    text-align: center;
    color: #888;
    transition: color 0.2s;
}

.ora-global-dropdown .pd-links li a:hover i {
    color: #FF6F00;
}

.ora-global-dropdown .pd-label {
    padding: 8px 18px 4px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #aaa;
    letter-spacing: 1px;
}

.ora-global-dropdown .pd-footer {
    padding: 10px 14px;
    border-top: 1px solid #eee;
    background: #fff;
}

.ora-global-dropdown .pd-logout-btn {
    width: 100%;
    padding: 9px 12px;
    background: transparent;
    border: 1px solid #fee2e2;
    color: #ef4444;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.86rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ora-global-dropdown .pd-logout-btn:hover {
    background: #fee2e2;
}

.popover-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.35);
    overflow: hidden;
}

.popover-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popover-info {
    flex: 1;
    min-width: 0;
}

.popover-name {
    font-weight: 700;
    font-size: 0.94rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popover-email {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.popover-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    background: #e0f2fe;
    color: #0284c7;
    padding: 2px 8px;
    border-radius: 10px;
}

.popover-links {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 0;
}

.popover-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.86rem;
    font-weight: 500;
    text-decoration: none;
    background: transparent;
    border: none;
    width: 100%;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.popover-link-item:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.popover-link-item i {
    width: 18px;
    text-align: center;
    color: var(--text-muted);
}

.popover-link-item:hover i {
    color: var(--primary);
}

.popover-footer {
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.popover-signout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 8px;
    color: var(--danger);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.popover-signout-btn:hover {
    background: #fee2e2;
}

/* ─────────────────────────────────────────────────────────────
   COMPREHENSIVE MOBILE RESPONSIVENESS IN EDITOR (< 768px & < 480px)
───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .editor-top-nav {
        padding: 4px 10px 3px;
        gap: 2px;
    }

    .top-nav-row,
    .top-nav-main-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        min-height: 34px;
        flex-wrap: nowrap !important;
        width: 100%;
    }

    .nav-left-group {
        gap: 6px;
        min-width: 0;
        flex: 1 1 auto;
        display: flex;
        align-items: center;
    }

    .back-to-dashboard-btn {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        font-size: 0.85rem !important;
        border-radius: 7px;
        flex-shrink: 0;
    }

    .doc-brand-icon {
        display: flex !important;
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        flex-shrink: 0;
    }

    .doc-info-block {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        align-items: center;
    }

    .doc-title-row {
        gap: 4px;
        display: flex;
        align-items: center;
        flex: 1 1 auto;
        min-width: 0;
    }

    .doc-title-input {
        max-width: 160px;
        min-width: 50px;
        font-size: 0.86rem !important;
        font-weight: 600;
        padding: 2px 5px;
        height: 26px;
        flex: 1 1 auto;
        text-overflow: ellipsis;
    }

    .star-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        padding: 0 !important;
        font-size: 0.82rem !important;
        border-radius: 5px;
        flex-shrink: 0;
    }

    .star-btn:hover,
    .star-btn.active {
        color: #f59e0b !important;
    }

    .save-status-badge {
        display: inline-flex !important;
        align-items: center;
        gap: 4px;
        padding: 2px 7px !important;
        font-size: 0.68rem !important;
        font-weight: 600;
        border-radius: 10px;
        background: #f0fdf4 !important;
        color: #15803d !important;
        border: 1px solid #bbf7d0 !important;
        flex-shrink: 0;
    }

    .save-status-badge i.fa-cloud-check {
        color: #16a34a !important;
        font-size: 0.72rem;
    }

    .save-status-badge.saving {
        background: #eff6ff !important;
        color: #2563eb !important;
        border-color: #bfdbfe !important;
    }

    .save-status-badge span {
        display: inline !important;
        font-size: 0.66rem !important;
        font-weight: 600;
    }

    .nav-right-group {
        display: flex;
        align-items: center;
        gap: 5px;
        flex-shrink: 0;
    }

    .collaborator-presence-strip {
        gap: 0;
    }

    .collaborator-presence-strip .presence-avatar {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        border-width: 1.5px !important;
        margin-left: -5px !important;
    }

    .tool-btn.header-action-btn,
    .tool-btn#toggle-comments-btn {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        font-size: 0.85rem !important;
        border-radius: 7px;
        padding: 0 !important;
    }

    .google-share-btn {
        padding: 0 10px !important;
        height: 30px !important;
        font-size: 0.76rem !important;
        gap: 5px !important;
        border-radius: 9999px !important;
    }

    .google-share-btn .share-btn-text {
        display: inline !important;
        font-size: 0.74rem !important;
    }

    .google-share-btn #share-collaborators-count {
        font-size: 10px !important;
        padding: 1px 5px !important;
    }

    .presence-avatar.header-user-avatar,
    .presence-avatar#current-user-avatar {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
    }

    .typing-indicator-pill {
        display: none;
        position: fixed !important;
        bottom: 22px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        background: rgba(15, 23, 42, 0.94) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        color: #ffffff !important;
        border: 1px solid rgba(255, 255, 255, 0.18) !important;
        padding: 6px 14px !important;
        border-radius: 20px !important;
        font-size: 0.74rem !important;
        font-weight: 600 !important;
        box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28) !important;
        z-index: 2500 !important;
        gap: 6px !important;
        white-space: nowrap !important;
        pointer-events: none !important;
    }

    .typing-indicator-pill i {
        color: #38bdf8 !important;
    }

    .top-nav-menubar-row {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding: 2px 0 2px;
        border-top: 1px solid rgba(241, 245, 249, 0.9);
        display: flex;
        align-items: center;
    }

    .top-nav-menubar-row::-webkit-scrollbar {
        display: none;
    }

    .menubar {
        display: flex;
        align-items: center;
        gap: 2px;
        width: max-content;
        border-top: none !important;
        margin-top: 0 !important;
        padding: 0 !important;
    }

    .menu-btn {
        padding: 3px 8px !important;
        font-size: 0.76rem !important;
        border-radius: 5px;
    }

    .menu-dropdown {
        position: fixed !important;
        top: 76px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: calc(100vw - 20px) !important;
        max-height: 65vh !important;
        overflow-y: auto !important;
        box-shadow: 0 12px 32px rgba(0,0,0,0.22) !important;
        z-index: 2500 !important;
        border-radius: 12px !important;
    }

    .editor-toolbar {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        flex-wrap: nowrap !important;
        padding: 3px 6px !important;
        gap: 2px !important;
        min-height: 36px;
    }

    .editor-toolbar::-webkit-scrollbar {
        display: none;
    }

    .tool-group {
        flex-shrink: 0;
        gap: 2px;
    }

    .tool-btn {
        min-width: 28px !important;
        width: 28px !important;
        height: 28px !important;
        font-size: 0.82rem !important;
    }

    .toolbar-select {
        max-width: 80px !important;
        font-size: 0.74rem !important;
        padding: 1px 4px !important;
        height: 26px !important;
    }

    .image-options-toolbar {
        padding: 2px 8px !important;
        gap: 4px !important;
        font-size: 0.74rem !important;
        min-height: 34px !important;
    }

    .image-options-toolbar .tool-btn {
        min-width: 24px !important;
        width: 24px !important;
        height: 24px !important;
        font-size: 0.72rem !important;
    }

    .img-tb-badge {
        font-size: 0.68rem !important;
        padding: 2px 6px !important;
    }

    .img-pill-btn {
        height: 22px !important;
        padding: 0 5px !important;
        font-size: 0.7rem !important;
    }

    .img-tb-select {
        height: 22px !important;
        font-size: 0.7rem !important;
        padding: 1px 4px !important;
    }

    .img-tb-color {
        width: 22px !important;
        height: 22px !important;
    }

    .img-tb-slider {
        width: 65px !important;
    }

    .img-tb-val {
        font-size: 0.68rem !important;
        min-width: 34px !important;
    }

    .ruler-container {
        display: none !important;
    }

    .editor-canvas-scroll {
        padding: 10px 6px !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

    .doc-page {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 20px 14px !important;
        min-height: calc(100vh - 160px) !important;
        border-radius: 4px !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
    }

    .doc-page table {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .doc-page img {
        max-width: 100% !important;
        height: auto !important;
    }

    .comments-sidebar {
        position: fixed !important;
        inset: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        z-index: 2800 !important;
    }

    .doc-outline-drawer {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 270px !important;
        z-index: 2700 !important;
        box-shadow: 4px 0 20px rgba(0,0,0,0.18) !important;
        transform: translateX(-100%) !important;
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .doc-outline-drawer.mobile-active {
        transform: translateX(0) !important;
    }

    #find-replace-bar {
        top: 6px !important;
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
        max-width: calc(100vw - 16px) !important;
        flex-wrap: wrap !important;
        padding: 8px !important;
        gap: 6px !important;
        z-index: 2600 !important;
    }

    #floating-table-tools {
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: calc(100vw - 16px) !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
    }

    .profile-popover {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: 85vh !important;
        border-radius: 20px 20px 0 0 !important;
        box-shadow: 0 -8px 30px rgba(0,0,0,0.2) !important;
        transform: translateY(100%) !important;
        padding: 20px 16px !important;
        box-sizing: border-box !important;
    }

    .profile-popover.active {
        transform: translateY(0) !important;
    }

    .modal-overlay {
        padding: 8px !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .modal-content {
        width: 100% !important;
        max-width: min(440px, calc(100vw - 16px)) !important;
        margin: auto !important;
        max-height: calc(100dvh - 20px) !important;
        padding: 0 !important;
        border-radius: 16px !important;
        overflow: hidden !important;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3) !important;
        background: var(--bg-surface) !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .modal-header {
        padding: 12px 14px !important;
        flex-shrink: 0 !important;
        border-bottom: 1px solid var(--border) !important;
    }

    .modal-title {
        font-size: 0.95rem !important;
        gap: 6px !important;
    }

    .modal-close-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.95rem !important;
    }

    .modal-body {
        padding: 14px 14px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        flex: 1 1 auto !important;
        gap: 12px !important;
        max-height: calc(100dvh - 120px) !important;
    }

    .modal-footer {
        padding: 10px 14px !important;
        flex-shrink: 0 !important;
        border-top: 1px solid var(--border) !important;
        gap: 8px !important;
    }

    @media (max-width: 600px) {
        .share-invite-row {
            flex-direction: column !important;
            align-items: stretch !important;
            gap: 6px !important;
        }

        .share-invite-actions {
            width: 100% !important;
        }

        .share-invite-actions select {
            flex: 1 !important;
        }

        .share-invite-actions button {
            flex: 1 !important;
            justify-content: center !important;
            height: 36px !important;
        }

        .share-general-access-card {
            flex-direction: column !important;
            align-items: stretch !important;
            gap: 8px !important;
        }

        .share-access-select {
            width: 100% !important;
            max-width: 100% !important;
        }

        .share-team-assign-row {
            flex-direction: column !important;
            align-items: stretch !important;
            gap: 6px !important;
        }

        .share-team-assign-row button {
            width: 100% !important;
            justify-content: center !important;
            height: 36px !important;
        }
    }

    .special-char-grid {
        grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)) !important;
        max-height: 220px !important;
    }

    .vertical-ruler-container {
        display: none !important;
    }

    .doc-page-break {
        width: 100% !important;
        margin: 24px 0 !important;
    }
}

@media (max-width: 480px) {
    .editor-top-nav {
        padding: 4px 6px 2px !important;
        gap: 1px !important;
    }

    .top-nav-row,
    .top-nav-main-bar {
        gap: 4px !important;
        min-height: 32px !important;
        flex-wrap: nowrap !important;
    }

    .nav-left-group {
        gap: 4px !important;
        min-width: 0 !important;
        flex: 1 1 auto !important;
    }

    .back-to-dashboard-btn {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        font-size: 0.8rem !important;
        border-radius: 6px !important;
    }

    .doc-brand-icon {
        display: flex !important;
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
    }

    .doc-title-row {
        gap: 3px !important;
    }

    .doc-title-input {
        max-width: 100px !important;
        min-width: 40px !important;
        font-size: 0.8rem !important;
        padding: 1px 4px !important;
        height: 24px !important;
    }

    .star-btn {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        font-size: 0.76rem !important;
        border-radius: 4px !important;
    }

    .save-status-badge {
        font-size: 0.64rem !important;
        padding: 2px 6px !important;
        gap: 3px !important;
    }

    .save-status-badge span {
        display: inline !important;
        font-size: 0.64rem !important;
    }

    .nav-right-group {
        gap: 3px !important;
        flex-shrink: 0 !important;
    }

    .collaborator-presence-strip .presence-avatar {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        border-width: 1.5px !important;
        margin-left: -5px !important;
    }

    .tool-btn.header-action-btn,
    .tool-btn#toggle-comments-btn {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        font-size: 0.78rem !important;
        border-radius: 6px !important;
    }

    .google-share-btn {
        height: 26px !important;
        padding: 0 7px !important;
        font-size: 0.7rem !important;
        gap: 3px !important;
        border-radius: 9999px !important;
    }

    .google-share-btn .share-btn-text {
        display: inline !important;
        font-size: 0.7rem !important;
    }

    .google-share-btn #share-collaborators-count {
        font-size: 9px !important;
        padding: 1px 4px !important;
    }

    .presence-avatar.header-user-avatar,
    .presence-avatar#current-user-avatar {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
    }

    .top-nav-menubar-row {
        padding: 2px 0 1px !important;
    }

    .menu-btn {
        padding: 2px 6px !important;
        font-size: 0.72rem !important;
        border-radius: 4px !important;
    }
}

@media (max-width: 360px) {
    .doc-title-input {
        max-width: 72px !important;
    }

    .save-status-badge span {
        display: none !important;
    }
}


/* ─────────────────────────────────────────────────────────────
   6. PRINT & VECTOR PDF EXPORT STYLES (Strict Page Slicing Prevention)
───────────────────────────────────────────────────────────── */
@media print {
    body {
        background: #ffffff !important;
        height: auto !important;
        overflow: visible !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .editor-top-nav,
    .editor-toolbar,
    .ruler-container,
    .vertical-ruler-container,
    .doc-readonly-banner,
    .doc-outline-drawer,
    .doc-comments-drawer,
    .zainin-ai-drawer,
    .zainin-inline-prompt,
    .zainin-selection-bar,
    .zainin-drawer-backdrop,
    #zainin-key-modal,
    #zainin-model-modal,
    .floating-table-tools,
    .find-replace-bar,
    .image-controls-popover,
    .image-resizer-overlay,
    .remote-cursors-layer,
    #user-profile-modal {
        display: none !important;
    }

    .doc-page-break {
        page-break-after: always !important;
        break-after: page !important;
        height: 0 !important;
        padding: 0 !important;
        border: none !important;
        margin: 0 !important;
        visibility: hidden !important;
    }

    .editor-workspace, .doc-scroll-viewport {
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        display: block !important;
    }

    .doc-page {
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        min-height: auto !important;
        margin: 0 !important;
    }

    .doc-page-section {
        break-inside: auto;
        page-break-inside: auto;
    }

    /* Prevent Images, Tables & Headers from slicing across page boundaries */
    img, figure, table, tr, thead, tbody, tfoot, blockquote, pre,
    .doc-callout, .doc-card, .doc-stat-box, .image-wrapper, .resizable-image, .doc-image-wrapper, .doc-image-gallery {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        max-height: 100% !important;
    }

    h1, h2, h3, h4, h5, h6 {
        break-after: avoid !important;
        page-break-after: avoid !important;
    }

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

    a[href]:after {
        content: none !important;
    }

    @page {
        size: auto;
        margin: 0.75in;
    }
}

/* ─────────────────────────────────────────────────────────────
   USER PROFILE MODAL (Matching MD Workspace Style)
───────────────────────────────────────────────────────────── */
#user-profile-modal.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 100050;
    justify-content: center;
    align-items: center;
}

#user-profile-modal.modal-overlay.active,
#user-profile-modal[style*="display: flex"],
#user-profile-modal[style*="display:flex"] {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.profile-modal {
    animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.presence-avatar {
    cursor: pointer !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.presence-avatar:hover {
    transform: scale(1.15);
    box-shadow: 0 0 8px rgba(66, 133, 244, 0.4);
    z-index: 20;
}

#modal-view-portfolio-btn,
#modal-view-talentx-btn {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    text-shadow: none !important;
}

#modal-view-portfolio-btn:hover {
    background: rgba(255, 111, 0, 0.25) !important;
    border-color: #ff6f00 !important;
    color: #ffa033 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.25);
}

#modal-view-talentx-btn:hover {
    background: rgba(59, 130, 246, 0.25) !important;
    border-color: #3b82f6 !important;
    color: #93c5fd !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* ─────────────────────────────────────────────────────────────
   ZAININ AI COPILOT SUITE (Google Docs Gemini & Notion Grade)
───────────────────────────────────────────────────────────── */
:root {
    --zainin-purple: #8b5cf6;
    --zainin-purple-dark: #7c3aed;
    --zainin-pink: #ec4899;
    --zainin-blue: #3b82f6;
    --zainin-gradient: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #3b82f6 100%);
    --zainin-gradient-subtle: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(236, 72, 153, 0.08) 100%);
    --zainin-glow: 0 0 16px rgba(139, 92, 246, 0.28);
}

/* Header Trigger Button */
.zainin-ai-header-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 10px !important;
    height: 32px !important;
    width: auto !important;
    background: #fdf4ff !important;
    border: 1px solid #f0abfc !important;
    border-radius: 9999px !important;
    color: #a21caf !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 1px 3px rgba(162, 28, 175, 0.08) !important;
    flex-shrink: 0 !important;
}

.zainin-ai-header-btn:hover {
    background: #fae8ff !important;
    border-color: #e879f9 !important;
    color: #86198f !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(162, 28, 175, 0.16) !important;
}

.zainin-ai-header-btn:active {
    transform: scale(0.97) !important;
}

.zainin-ai-logo-icon {
    width: 17px !important;
    height: 17px !important;
    object-fit: contain !important;
    filter: drop-shadow(0 1px 2px rgba(139, 92, 246, 0.3)) !important;
}

.zainin-ai-btn-label {
    display: inline-block;
    white-space: nowrap;
}

.zainin-ai-sparkle-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--zainin-gradient);
    color: #ffffff;
    font-size: 0.65rem;
    padding: 2px 4px;
    border-radius: 4px;
    line-height: 1;
}

/* Ribbon Toolbar Button */
.tb-zainin-ai-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 0 8px !important;
    width: auto !important;
    height: 28px !important;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%) !important;
    border: 1px solid rgba(139, 92, 246, 0.25) !important;
    border-radius: 6px !important;
    color: #7c3aed !important;
    font-weight: 600 !important;
    font-size: 0.78rem !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.tb-zainin-ai-btn:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.16) 0%, rgba(59, 130, 246, 0.16) 100%) !important;
    border-color: #8b5cf6 !important;
    color: #6d28d9 !important;
}

.tb-zainin-icon {
    width: 15px !important;
    height: 15px !important;
    object-fit: contain !important;
}

.tb-zainin-text {
    font-size: 0.76rem !important;
    white-space: nowrap;
}

/* ─────────────────────────────────────────────────────────────
   ZAININ AI SIDE DRAWER
───────────────────────────────────────────────────────────── */
.zainin-ai-drawer {
    width: 420px;
    min-width: 380px;
    max-width: 460px;
    background: #ffffff;
    border-left: 1px solid #e2e8f0;
    display: none;
    flex-direction: column;
    height: 100%;
    position: relative;
    box-shadow: -4px 0 24px rgba(15, 23, 42, 0.04);
    z-index: 95;
    flex-shrink: 0;
    overflow: hidden;
}

.zainin-ai-drawer.open {
    display: flex !important;
    animation: drawerSlideIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes drawerSlideIn {
    from { transform: translateX(100%); opacity: 0.7; }
    to { transform: translateX(0); opacity: 1; }
}

/* Drawer Header */
.zainin-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    gap: 8px;
}

.zainin-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.zainin-avatar-glow {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--zainin-gradient-subtle);
    border: 1px solid rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--zainin-glow);
    flex-shrink: 0;
}

.zainin-header-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.zainin-header-titles {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.zainin-header-brand-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.zainin-brand-name {
    font-size: 0.94rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.zainin-badge-pill {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 9999px;
    background: #f5f3ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
}

.zainin-model-picker-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: #f5f3ff !important;
    color: #7c3aed !important;
    border: 1px solid #ddd6fe !important;
    border-radius: 9999px !important;
    padding: 2px 8px !important;
    cursor: pointer !important;
    font-size: 0.68rem !important;
    font-weight: 600 !important;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
    user-select: none !important;
    outline: none !important;
    line-height: 1.2 !important;
}

.zainin-model-picker-btn:hover {
    background: #ede9fe !important;
    border-color: #c4b5fd !important;
    color: #6d28d9 !important;
    box-shadow: 0 1px 6px rgba(124, 58, 237, 0.16) !important;
    transform: translateY(-1px) !important;
}

.zainin-model-picker-btn:active {
    transform: scale(0.97) !important;
}

/* Zainin AI Model Selector Modal Styles */
.zainin-model-modal-content {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22) !important;
}

.zainin-models-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zainin-model-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--bg-main);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    user-select: none;
}

.zainin-model-card:hover {
    background: var(--bg-hover);
    border-color: #c4b5fd;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(139, 92, 246, 0.08);
}

.zainin-model-card.active {
    background: rgba(139, 92, 246, 0.06);
    border-color: #8b5cf6;
    box-shadow: 0 0 0 1px #8b5cf6, 0 3px 10px rgba(139, 92, 246, 0.12);
}

.zainin-model-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.zainin-model-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: all 0.18s ease;
}

.zainin-model-card.active .zainin-model-card-icon {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
}

.zainin-model-card-info {
    flex: 1;
    min-width: 0;
}

.zainin-model-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.zainin-model-card-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-main);
}

.zainin-model-card-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 9999px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.zainin-model-card.active .zainin-model-card-badge {
    background: #ede9fe;
    color: #7c3aed;
    border-color: #ddd6fe;
}

.zainin-model-card-desc {
    font-size: 0.74rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.zainin-model-card-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-left: 10px;
    transition: all 0.15s ease;
}

.zainin-model-card.active .zainin-model-card-check {
    color: #8b5cf6;
}

.zainin-subtitle {
    font-size: 0.69rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 235px;
    letter-spacing: -0.01em;
}

.zainin-header-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.zainin-header-tool {
    height: 28px !important;
    min-width: 28px !important;
    padding: 0 6px !important;
    color: #64748b !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.zainin-header-tool:hover {
    color: #0f172a !important;
    background: #f1f5f9 !important;
}

.zainin-header-tool#zainin-new-session-btn {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 9999px !important;
    padding: 3px 10px !important;
    color: #475569 !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    height: 28px !important;
}

.zainin-header-tool#zainin-new-session-btn:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

.zainin-header-tool.icon-only {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
    border-radius: 6px !important;
}

.zainin-header-tool.danger-tool:hover {
    color: #ef4444 !important;
    background: #fee2e2 !important;
}

.zainin-tool-btn-text {
    font-size: 0.72rem;
    font-weight: 600;
}

.zainin-chat-active-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ─────────────────────────────────────────────────────────────
   ZAININ CHAT HISTORY VIEW (Previous Conversations)
───────────────────────────────────────────────────────────── */
.zainin-history-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    background: #ffffff;
    overflow: hidden;
}

.zainin-history-header {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.zainin-history-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.zainin-history-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    border-radius: 9999px;
    padding: 4px 11px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.zainin-history-back-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.zainin-history-badge {
    font-size: 0.69rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 2px 8px;
    border-radius: 9999px;
}

.zainin-history-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 10px;
    transition: all 0.15s ease;
}

.zainin-history-search-wrap:focus-within {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.12);
}

.zainin-history-search-wrap i {
    font-size: 0.75rem;
    color: #94a3b8;
}

.zainin-history-search-wrap input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 0.78rem;
    color: #0f172a;
    font-family: inherit;
}

.zainin-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.zainin-history-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 11px 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.zainin-history-item:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.zainin-history-item.active {
    border-color: rgba(139, 92, 246, 0.45);
    background: linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.08);
}

.zainin-history-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.zainin-history-item-doc {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex: 1;
}

.zainin-history-item-doc i {
    color: #8b5cf6;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.zainin-history-doc-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zainin-history-current-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #dcfce7;
    color: #15803d;
    padding: 1px 6px;
    border-radius: 9999px;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.zainin-history-time {
    font-size: 0.68rem;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}

.zainin-history-snippet {
    font-size: 0.74rem;
    color: #475569;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.zainin-history-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 5px;
    border-top: 1px dashed #f1f5f9;
    margin-top: 2px;
}

.zainin-history-pill {
    font-size: 0.68rem;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.zainin-history-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.zainin-history-action-btn {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 5px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.zainin-history-action-btn.view-btn {
    color: #7c3aed;
    font-weight: 600;
    background: #f5f3ff;
    border-color: #ede9fe;
}

.zainin-history-action-btn.view-btn:hover {
    background: #7c3aed;
    color: #ffffff;
}

.zainin-history-action-btn.delete-btn {
    color: #94a3b8;
}

.zainin-history-action-btn.delete-btn:hover {
    color: #ef4444;
    background: #fee2e2;
}

.zainin-history-empty {
    padding: 40px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
}

.zainin-history-empty i {
    font-size: 2rem;
    color: #cbd5e1;
}

.zainin-history-empty h5 {
    font-size: 0.9rem;
    color: #475569;
    margin: 0;
}

.zainin-history-empty p {
    font-size: 0.75rem;
    line-height: 1.4;
    margin: 0;
    max-width: 240px;
}

/* ─────────────────────────────────────────────────────────────
   ZAININ CHAT SESSION STRIP (Meta Status)
───────────────────────────────────────────────────────────── */
.zainin-session-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #edf2f7;
    font-size: 0.72rem;
}

.zainin-doc-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zainin-doc-chip i {
    color: #3b82f6;
    font-size: 0.75rem;
}

.zainin-status-live {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #059669;
    font-weight: 600;
    font-size: 0.68rem;
}

.zainin-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
    animation: zaininPulseDot 1.8s ease-in-out infinite;
}

@keyframes zaininPulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

/* ─────────────────────────────────────────────────────────────
   ZAININ CHAT STREAM (Scrollable Message Thread)
───────────────────────────────────────────────────────────── */
.zainin-chat-stream {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #fcfcfd;
    scroll-behavior: smooth;
}

.zainin-chat-stream::-webkit-scrollbar {
    width: 6px;
}

.zainin-chat-stream::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}

/* Welcome Card (Empty state) */
.zainin-chat-welcome {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 16px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.zainin-welcome-icon-wrap {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--zainin-gradient-subtle);
    border: 1px solid rgba(139, 92, 246, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.zainin-welcome-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.zainin-welcome-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
}

.zainin-welcome-desc {
    font-size: 0.78rem;
    line-height: 1.5;
    color: #64748b;
    margin: 0 0 16px 0;
    max-width: 320px;
}

.zainin-starter-chips-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 10px;
    align-self: flex-start;
}

.zainin-starter-chips {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zainin-starter-chip {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-align: left;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.zainin-starter-chip:hover {
    background: #ffffff;
    border-color: #8b5cf6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.12);
}

.zainin-chip-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.zainin-starter-chip .chip-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.zainin-starter-chip strong {
    font-size: 0.82rem;
    color: #0f172a;
    font-weight: 600;
}

.zainin-starter-chip span {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.35;
}

/* ─────────────────────────────────────────────────────────────
   MESSAGES CONTAINER & BUBBLES
───────────────────────────────────────────────────────────── */
.zainin-messages-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.zainin-msg {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    animation: zaininFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zaininFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* User Message */
.zainin-msg.user {
    align-items: flex-end;
}

.zainin-user-bubble {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 14px 14px 2px 14px;
    font-size: 0.84rem;
    line-height: 1.5;
    max-width: 88%;
    word-break: break-word;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

.zainin-msg-meta {
    font-size: 0.65rem;
    color: #94a3b8;
    margin-top: 4px;
    padding: 0 4px;
}

/* Assistant Message */
.zainin-msg.assistant {
    align-items: flex-start;
}

.zainin-assistant-wrap {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

.zainin-bot-avatar {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--zainin-gradient-subtle);
    border: 1px solid rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.zainin-msg-avatar-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.zainin-assistant-bubble {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px 14px 14px 2px;
    padding: 12px 14px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
    font-size: 0.84rem;
    line-height: 1.6;
    color: #1e293b;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    word-break: break-word;
}

.zainin-rendered-content {
    width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Assistant Markdown Styling */
.zainin-assistant-bubble h1,
.zainin-assistant-bubble h2,
.zainin-assistant-bubble h3,
.zainin-assistant-bubble h4 {
    color: #0f172a;
    font-weight: 700;
    margin: 10px 0 6px 0;
    line-height: 1.3;
}

.zainin-assistant-bubble h1 { font-size: 1.05rem; }
.zainin-assistant-bubble h2 { font-size: 0.96rem; }
.zainin-assistant-bubble h3 { font-size: 0.88rem; }
.zainin-assistant-bubble h4 { font-size: 0.84rem; }

.zainin-assistant-bubble p {
    margin: 0 0 8px 0;
}

.zainin-assistant-bubble p:last-child {
    margin-bottom: 0;
}

.zainin-assistant-bubble ul,
.zainin-assistant-bubble ol {
    margin: 6px 0 8px 18px;
    padding: 0;
}

.zainin-assistant-bubble li {
    margin-bottom: 4px;
}

.zainin-assistant-bubble blockquote {
    border-left: 3px solid #8b5cf6;
    background: #faf5ff;
    padding: 6px 10px;
    margin: 8px 0;
    border-radius: 0 6px 6px 0;
    font-size: 0.82rem;
    color: #581c87;
}

.zainin-assistant-bubble code {
    background: #f1f5f9;
    padding: 2px 5px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    color: #0f172a;
}

.zainin-assistant-bubble pre {
    background: #0f172a;
    color: #f8fafc;
    padding: 10px 12px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.78rem;
    margin: 8px 0;
}

.zainin-assistant-bubble pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.zainin-assistant-bubble table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 0.8rem;
}

.zainin-assistant-bubble th,
.zainin-assistant-bubble td {
    border: 1px solid #cbd5e1;
    padding: 6px 8px;
    text-align: left;
}

.zainin-assistant-bubble th {
    background: #f1f5f9;
    font-weight: 600;
    color: #0f172a;
}

/* ─────────────────────────────────────────────────────────────
   MESSAGE ACTION BUTTONS BAR (Insert, Replace, Append, Copy)
───────────────────────────────────────────────────────────── */
.zainin-msg-action-bar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    margin-top: 12px !important;
    padding-top: 10px !important;
    border-top: 1px solid #f1f5f9 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    clear: both !important;
}

.zainin-msg-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 5px 9px !important;
    border-radius: 6px !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    cursor: pointer !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    word-break: keep-all !important;
    word-wrap: normal !important;
    overflow-wrap: normal !important;
    min-width: max-content !important;
    box-sizing: border-box !important;
    user-select: none !important;
    transition: all 0.15s ease !important;
}

.zainin-msg-action-btn:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-1px) !important;
}

.zainin-msg-action-btn.primary {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #2563eb !important;
}

.zainin-msg-action-btn.primary:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

.zainin-msg-action-btn i {
    font-size: 0.75rem !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}

.zainin-msg-action-btn.success-flash {
    background: #dcfce7 !important;
    color: #15803d !important;
    border-color: #86efac !important;
}

/* ─────────────────────────────────────────────────────────────
   THINKING BUBBLE (Animated Dots)
───────────────────────────────────────────────────────────── */
.zainin-thinking-bubble {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    animation: zaininFadeIn 0.2s ease;
}

.zainin-thinking-content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px 14px 14px 2px;
    padding: 10px 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.zainin-thinking-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zainin-msg-sender {
    font-size: 0.75rem;
    font-weight: 700;
    color: #7c3aed;
}

.zainin-thinking-status {
    font-size: 0.72rem;
    color: #64748b;
    font-style: italic;
}

.zainin-dots-wave {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 14px;
}

.zainin-dots-wave span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8b5cf6;
    animation: zaininDotWave 1.4s ease-in-out infinite;
}

.zainin-dots-wave span:nth-child(2) {
    animation-delay: 0.2s;
    background: #ec4899;
}

.zainin-dots-wave span:nth-child(3) {
    animation-delay: 0.4s;
    background: #3b82f6;
}

@keyframes zaininDotWave {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* ─────────────────────────────────────────────────────────────
   CHAT COMPOSER & FOOTER
───────────────────────────────────────────────────────────── */
.zainin-chat-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px 12px 12px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.03);
}

.zainin-quick-prompts-ribbon {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.zainin-quick-prompts-ribbon::-webkit-scrollbar {
    display: none;
}

.zainin-quick-prompt-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 500;
    color: #475569;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.zainin-quick-prompt-pill:hover {
    background: #f5f3ff;
    color: #7c3aed;
    border-color: #ddd6fe;
    transform: translateY(-1px);
}

.zainin-composer-box {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.18s ease;
}

.zainin-composer-box:focus-within {
    border-color: #8b5cf6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.zainin-chat-textarea {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 0.84rem;
    line-height: 1.45;
    color: #0f172a;
    resize: none;
    min-height: 22px;
    max-height: 120px;
}

.zainin-chat-textarea::placeholder {
    color: #94a3b8;
}

.zainin-composer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.zainin-context-pill-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 600;
    color: #059669;
    background: #ecfdf5;
    padding: 2px 7px;
    border-radius: 9999px;
    border: 1px solid #a7f3d0;
}

.zainin-send-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--zainin-gradient);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.25);
}

.zainin-send-btn:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.35);
}

.zainin-send-btn:active {
    transform: scale(0.95);
}

.zainin-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ─────────────────────────────────────────────────────────────
   DOCUMENT CANVAS INJECTION HIGHLIGHT GLOW
───────────────────────────────────────────────────────────── */
.zainin-inserted-glow {
    animation: zaininCanvasGlow 2.5s ease-out forwards;
}

@keyframes zaininCanvasGlow {
    0% { background-color: rgba(139, 92, 246, 0.22); outline: 2px solid #8b5cf6; }
    50% { background-color: rgba(139, 92, 246, 0.1); outline: 2px solid rgba(139, 92, 246, 0.5); }
    100% { background-color: transparent; outline: 2px solid transparent; }
}

/* Page Break Divider */
.doc-page-break {
    page-break-after: always;
    break-after: page;
    border-top: 2px dashed #cbd5e1;
    margin: 24px 0;
    position: relative;
}

.doc-page-break::after {
    content: "Page Break";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #f1f5f9;
    padding: 0 8px;
    font-size: 0.68rem;
    color: #64748b;
    border-radius: 4px;
}

/* Loading Overlay */
.zainin-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    text-align: center;
}

.zainin-spinner-glow {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--zainin-gradient-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
    animation: zaininPulse 1.6s ease-in-out infinite;
}

.zainin-spin-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    animation: zaininSpin 3s linear infinite;
}

@keyframes zaininSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes zaininPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.zainin-loading-status {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
}

.zainin-loading-subtext {
    font-size: 0.74rem;
    color: #64748b;
}

/* ─────────────────────────────────────────────────────────────
   GOOGLE DOCS INLINE FLOATING PROMPT (Ctrl+J)
───────────────────────────────────────────────────────────── */
.zainin-inline-prompt {
    position: fixed;
    width: min(540px, calc(100vw - 32px));
    background: #ffffff;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(139, 92, 246, 0.1);
    z-index: 1050;
    overflow: hidden;
    animation: promptDropIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes promptDropIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.zainin-inline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06) 0%, rgba(236, 72, 153, 0.06) 100%);
    border-bottom: 1px solid #f1f5f9;
}

.zainin-inline-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f172a;
}

.zainin-inline-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.zainin-inline-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.zainin-inline-textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #0f172a;
    resize: none;
    outline: none;
    transition: all 0.15s ease;
}

.zainin-inline-textarea:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.zainin-inline-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.inline-chip {
    padding: 4px 9px;
    border-radius: 9999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.72rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.inline-chip:hover {
    background: #f5f3ff;
    border-color: #c4b5fd;
    color: #7c3aed;
}

.zainin-inline-preview {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    max-height: 180px;
    overflow-y: auto;
    font-size: 0.84rem;
    line-height: 1.5;
    color: #1e293b;
}

.zainin-inline-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 4px;
}

.zainin-shortcut-hint kbd {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2px 5px;
    font-size: 0.68rem;
    color: #64748b;
    font-family: monospace;
}

.zainin-inline-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zainin-btn-ghost-sm {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.zainin-btn-ghost-sm:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.zainin-btn-primary-sm {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--zainin-gradient);
    border: none;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.zainin-btn-primary-sm:hover {
    filter: brightness(1.06);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* ─────────────────────────────────────────────────────────────
   CONTEXTUAL SELECTION ACTION BAR
───────────────────────────────────────────────────────────── */
.zainin-selection-bar {
    position: fixed;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 1020;
    animation: selectionFadeIn 0.15s ease;
}

@keyframes selectionFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.zainin-sel-brand {
    display: flex;
    align-items: center;
    padding: 0 4px;
}

.zainin-sel-icon {
    width: 15px;
    height: 15px;
    object-fit: contain;
}

.zainin-sel-btn {
    background: transparent;
    border: none;
    color: #f1f5f9;
    font-size: 0.74rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 9999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.12s ease;
    white-space: nowrap;
}

.zainin-sel-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.zainin-sel-btn i {
    font-size: 0.72rem;
    color: #a78bfa;
}

/* Flash Glow on Inserted Content */
.zainin-inserted-glow {
    animation: insertedBlockGlow 2.4s ease-out;
}

@keyframes insertedBlockGlow {
    0% { background-color: rgba(139, 92, 246, 0.22); }
    100% { background-color: transparent; }
}

/* Drawer Backdrop (Transparent tap-to-dismiss layer for mobile only; never blacks out the screen) */
.zainin-drawer-backdrop {
    display: none !important;
}

/* ─────────────────────────────────────────────────────────────
   MOBILE RESPONSIVENESS (< 768px and < 480px)
───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .zainin-ai-header-btn {
        padding: 0 !important;
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        justify-content: center !important;
        border-radius: 6px !important;
    }

    .zainin-ai-btn-label,
    .zainin-ai-sparkle-pill {
        display: none !important;
    }

    .tb-zainin-text {
        display: none !important;
    }

    .zainin-drawer-backdrop {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        z-index: 1100 !important;
    }

    .zainin-ai-drawer {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 420px !important;
        z-index: 1200 !important;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.25) !important;
    }

    .zainin-inline-prompt {
        left: 12px !important;
        right: 12px !important;
        width: calc(100vw - 24px) !important;
    }

    .zainin-selection-bar {
        overflow-x: auto;
        max-width: calc(100vw - 24px);
    }
}

@media (max-width: 480px) {
    .zainin-ai-header-btn {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
    }

    .zainin-ai-logo-icon {
        width: 15px !important;
        height: 15px !important;
    }

    .zainin-ai-drawer {
        width: 100vw !important;
        max-width: 100vw !important;
    }
}

/* ─────────────────────────────────────────────────────────────
   ORA DOCS & ZAININ AI — DESIGNED DOCUMENT COMPONENTS
   (Executive CV, Minimal Portfolios, Project Cards & Badges)
───────────────────────────────────────────────────────────── */
.doc-page .cv-container,
.zainin-assistant-bubble .cv-container {
    width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #0f172a;
    line-height: 1.55;
    margin: 8px 0;
}

.doc-page .cv-header,
.zainin-assistant-bubble .cv-header {
    display: flex;
    align-items: center;
    gap: 18px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 18px;
    margin-bottom: 20px;
}

.doc-page .cv-photo,
.doc-page img.cv-photo,
.zainin-assistant-bubble .cv-photo,
.zainin-assistant-bubble img.cv-photo {
    width: 86px !important;
    height: 86px !important;
    min-width: 86px !important;
    max-width: 86px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid #ff6f00 !important;
    box-shadow: 0 4px 14px rgba(255, 111, 0, 0.22) !important;
    flex-shrink: 0 !important;
    display: block !important;
}

.doc-page .cv-verified-badge,
.doc-page img.cv-verified-badge,
.zainin-assistant-bubble .cv-verified-badge,
.zainin-assistant-bubble img.cv-verified-badge {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    vertical-align: middle !important;
    display: inline-block !important;
    margin-left: 6px !important;
}

.doc-page .cv-section-title,
.zainin-assistant-bubble .cv-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 22px 0 10px;
    border-bottom: 1.5px solid #e2e8f0;
    padding-bottom: 6px;
}

.doc-page .cv-section-title h2,
.zainin-assistant-bubble .cv-section-title h2 {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    color: #0f172a !important;
    margin: 0 !important;
}

.doc-page .cv-project-card,
.zainin-assistant-bubble .cv-project-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.doc-page .cv-project-img,
.doc-page img.cv-project-img,
.zainin-assistant-bubble .cv-project-img,
.zainin-assistant-bubble img.cv-project-img {
    width: 76px !important;
    height: 76px !important;
    min-width: 76px !important;
    max-width: 76px !important;
    border-radius: 8px !important;
    object-fit: cover !important;
    border: 1px solid #e2e8f0 !important;
    flex-shrink: 0 !important;
    display: block !important;
}

.doc-page .cv-skill-pill,
.zainin-assistant-bubble .cv-skill-pill {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin: 3px;
    letter-spacing: -0.01em;
}

.doc-page .cv-quote-card,
.zainin-assistant-bubble .cv-quote-card {
    background: #f8fafc;
    border-left: 3.5px solid #ff6f00;
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    margin-bottom: 10px;
}


