/**
 * Client Portal - Professional Styling
 * Matches Clear Enterprise website design
 */

/* ==========================================================================
   CSS Variables - Clear Enterprise Brand
   ========================================================================== */

:root {
    /* Brand Colors */
    --trust-blue: #1e3a5f;
    --trust-blue-light: #2d4a6f;
    --trust-blue-dark: #152a45;
    --accent-blue: #4a90d9;
    --accent-blue-light: #6ba3e0;

    /* Status Colors */
    --success: #28a745;
    --warning: #ffc107;
    --error: #dc3545;
    --info: #17a2b8;

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;

    /* Typography */
    --font-primary: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'Fira Code', 'Consolas', 'Monaco', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
}

a {
    color: var(--accent-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--trust-blue);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--trust-blue-light);
    text-decoration: none;
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    text-decoration: none;
}

.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.875rem;
}

.btn-block {
    display: flex;
    justify-content: center;
    width: 100%;
}

.btn-meet {
    background: #00796b;
    color: var(--white);
}

.btn-meet:hover {
    background: #00897b;
    text-decoration: none;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--gray-700);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: var(--white);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

.form-group small {
    display: block;
    margin-top: var(--space-xs);
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert {
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-lg);
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* ==========================================================================
   Login Page
   ========================================================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--trust-blue) 0%, var(--trust-blue-dark) 100%);
}

.login-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.login-box {
    width: 100%;
    max-width: 400px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: var(--space-2xl);
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.login-logo {
    height: 48px;
    margin-bottom: var(--space-lg);
}

.login-header h1 {
    margin: 0 0 var(--space-sm);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
}

.login-header p {
    margin: 0;
    color: var(--gray-600);
}

.login-form {
    margin-bottom: var(--space-lg);
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--gray-500);
}

.toggle-password:hover {
    color: var(--gray-700);
}

.eye-icon {
    width: 20px;
    height: 20px;
}

.login-footer {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--gray-200);
}

.secure-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--gray-600);
    font-size: 0.875rem;
}

.secure-badge svg {
    width: 16px;
    height: 16px;
    color: var(--success);
}

.swiss-badge {
    margin-top: var(--space-sm);
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.login-page-footer {
    padding: var(--space-lg);
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
}

/* ==========================================================================
   Portal Header
   ========================================================================== */

.portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-xl);
    background: var(--trust-blue);
    color: var(--white);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.header-logo {
    height: 32px;
}

.header-divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.3);
}

.project-name {
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    color: var(--white);
    transition: background var(--transition-fast);
}

.back-btn:hover {
    background: rgba(255,255,255,0.1);
    text-decoration: none;
}

.back-btn svg {
    width: 24px;
    height: 24px;
}

.file-name {
    font-weight: 500;
}

/* ==========================================================================
   Dashboard
   ========================================================================== */

.dashboard-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl);
}

.dashboard-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.dashboard-toolbar h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.toolbar-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.documents-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.document-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-fast);
}

.document-card:hover {
    box-shadow: var(--shadow-md);
}

.document-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    color: var(--trust-blue);
}

.document-icon svg {
    width: 24px;
    height: 24px;
}

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

.document-name {
    margin: 0 0 var(--space-xs);
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-900);
}

.document-meta {
    margin: 0;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.document-actions {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.empty-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--gray-500);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-md);
}

.empty-state h3 {
    margin: 0 0 var(--space-sm);
    color: var(--gray-700);
}

/* Meet Section */
.meet-section {
    margin-top: var(--space-2xl);
    padding: var(--space-xl);
    background: var(--white);
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--gray-200);
}

.meet-section h3 {
    margin: 0 0 var(--space-md);
    font-size: 1.125rem;
}

.meet-hint {
    margin-top: var(--space-md);
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: var(--space-xl);
    padding: var(--space-xl);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.modal-content h3 {
    margin: 0 0 var(--space-lg);
    font-size: 1.25rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

/* Drop Zone */
.drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--gray-600);
    transition: all var(--transition-fast);
}

.drop-zone.drag-over {
    border-color: var(--accent-blue);
    background: rgba(74, 144, 217, 0.05);
}

.drop-zone svg {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-md);
    color: var(--gray-400);
}

.drop-zone p {
    margin: var(--space-xs) 0;
}

.selected-files {
    margin-top: var(--space-md);
}

.selected-file {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.portal-footer {
    padding: var(--space-lg) var(--space-xl);
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
    border-top: 1px solid var(--gray-200);
    background: var(--white);
}

/* ==========================================================================
   Online Users Indicator
   ========================================================================== */

.online-users {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.online-users::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.online-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.8);
}

/* ==========================================================================
   Save Status
   ========================================================================== */

.save-status {
    font-size: 0.8125rem;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.1);
}

.save-status.saving {
    color: var(--warning);
}

.save-status.saved {
    color: var(--success);
}

.save-status.error {
    color: var(--error);
}

.save-status.modified {
    color: var(--warning);
}

/* ==========================================================================
   Viewer Page
   ========================================================================== */

.viewer-main {
    flex: 1;
    padding: var(--space-xl);
    display: flex;
    justify-content: center;
}

.viewer-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.pdf-viewer {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
}

.pdf-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--gray-700);
    transition: all var(--transition-fast);
}

.pdf-btn:hover {
    background: var(--gray-200);
    color: var(--trust-blue);
}

.pdf-page-info, .pdf-zoom-info {
    font-size: 0.875rem;
    color: var(--gray-600);
    min-width: 60px;
    text-align: center;
}

.pdf-divider {
    width: 1px;
    height: 24px;
    background: var(--gray-300);
    margin: 0 8px;
}

.pdf-container {
    flex: 1;
    overflow: auto;
    padding: 20px;
    background: var(--gray-200);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - 250px);
}

.pdf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px;
    color: var(--gray-600);
}

.pdf-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-300);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: pdf-spin 1s linear infinite;
}

@keyframes pdf-spin {
    to { transform: rotate(360deg); }
}

#pdf-canvas {
    box-shadow: var(--shadow-lg);
    background: var(--white);
}

/* Old iframe fallback - kept for compatibility */
.pdf-frame {
    width: 100%;
    height: calc(100vh - 200px);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.image-viewer {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.image-viewer img {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.markdown-viewer {
    width: 100%;
    max-width: 800px;
}

.markdown-content {
    background: var(--white);
    padding: var(--space-2xl);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.markdown-content h1 { font-size: 2rem; margin-top: 0; }
.markdown-content h2 { font-size: 1.5rem; margin-top: var(--space-xl); }
.markdown-content h3 { font-size: 1.25rem; margin-top: var(--space-lg); }
.markdown-content p { margin: var(--space-md) 0; }
.markdown-content ul, .markdown-content ol { padding-left: var(--space-xl); }
.markdown-content li { margin: var(--space-sm) 0; }
.markdown-content code {
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.9em;
}
.markdown-content pre {
    background: var(--gray-900);
    color: var(--gray-100);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    overflow-x: auto;
}
.markdown-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}
.markdown-content img {
    max-width: 100%;
    border-radius: var(--radius-sm);
}
.markdown-content blockquote {
    margin: var(--space-md) 0;
    padding-left: var(--space-md);
    border-left: 4px solid var(--accent-blue);
    color: var(--gray-600);
}

.unknown-viewer {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--gray-500);
}

.unknown-viewer svg {
    width: 80px;
    height: 80px;
    margin-bottom: var(--space-lg);
}

.unknown-viewer h2 {
    margin: 0 0 var(--space-sm);
    color: var(--gray-700);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .portal-header {
        padding: var(--space-md);
    }

    .header-left {
        gap: var(--space-sm);
    }

    .header-logo {
        height: 24px;
    }

    .header-divider {
        display: none;
    }

    .dashboard-main {
        padding: var(--space-md);
    }

    .dashboard-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-actions {
        justify-content: center;
    }

    .document-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .document-icon {
        margin: 0 auto;
    }

    .document-actions {
        justify-content: center;
    }

    .modal-content {
        margin: var(--space-md);
        padding: var(--space-lg);
    }
}

/* ==========================================================================
   Admin Panel Styles
   ========================================================================== */

.admin-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-main {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-xl);
    width: 100%;
}

.admin-header {
    margin-bottom: var(--space-xl);
}

.admin-header h1 {
    margin: 0 0 var(--space-sm);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--gray-900);
}

.admin-header p {
    margin: 0;
    color: var(--gray-600);
}

/* Projects Section */
.projects-section {
    margin-bottom: var(--space-2xl);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.section-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-lg);
}

.project-card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition-fast);
}

.project-card:hover {
    box-shadow: var(--shadow-md);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.project-card-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--trust-blue);
}

.online-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--success);
    color: var(--white);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.online-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--white);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.project-card-body {
    padding: var(--space-lg);
}

.project-stats {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--gray-200);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--trust-blue);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-info {
    margin-bottom: var(--space-md);
}

.project-info p {
    margin: 0 0 var(--space-xs);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.project-info code {
    display: block;
    padding: var(--space-sm);
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--gray-800);
    word-break: break-all;
}

.project-info a {
    font-size: 0.875rem;
}

.project-info.online-users ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.project-info.online-users li {
    padding: var(--space-xs) 0;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.project-info.online-users li small {
    color: var(--gray-500);
}

.project-card-actions {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

/* Activity Section */
.activity-section {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--space-lg);
}

.activity-section h2 {
    margin: 0 0 var(--space-lg);
    font-size: 1.25rem;
    font-weight: 600;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.activity-icon {
    font-size: 1.25rem;
}

.activity-content p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--gray-800);
}

.activity-content small {
    color: var(--gray-500);
}

.no-activity {
    text-align: center;
    color: var(--gray-500);
    padding: var(--space-xl);
}

/* Password Display */
.password-display {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--gray-100);
    border-radius: var(--radius-sm);
}

.password-display code {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 1.125rem;
    color: var(--trust-blue);
}

/* Modal Enhancements for Admin */
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--gray-700);
}

.modal-body {
    margin-bottom: var(--space-lg);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}

/* Error Message */
.error-message {
    padding: var(--space-md);
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-lg);
    font-size: 0.9375rem;
}

/* Button Full Width */
.btn-full {
    width: 100%;
    justify-content: center;
}

/* User Info in Header */
.user-info {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Responsive Admin */
@media (max-width: 768px) {
    .admin-main {
        padding: var(--space-md);
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        gap: var(--space-md);
        align-items: stretch;
    }

    .project-stats {
        flex-wrap: wrap;
    }

    .stat {
        min-width: 80px;
    }

    .project-card-actions {
        flex-wrap: wrap;
    }

    .header-content {
        flex-direction: column;
        gap: var(--space-md);
    }
}

/* Header Content Container */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 32px;
}

/* ==========================================================================
   Search Bar
   ========================================================================== */

.search-bar {
    position: relative;
    margin-bottom: var(--space-lg);
}

.search-bar svg {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--gray-500);
    pointer-events: none;
}

.search-bar input {
    width: 100%;
    padding: var(--space-md) var(--space-md) var(--space-md) 48px;
    font-size: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: var(--white);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
    margin-top: var(--space-xs);
}

.search-result-item {
    display: block;
    padding: var(--space-md);
    border-bottom: 1px solid var(--gray-100);
    text-decoration: none;
    color: inherit;
    transition: background var(--transition-fast);
}

.search-result-item:hover {
    background: var(--gray-50);
    text-decoration: none;
}

.search-result-file {
    font-weight: 600;
    color: var(--trust-blue);
    margin-bottom: var(--space-xs);
}

.search-result-match {
    font-size: 0.85rem;
    color: var(--gray-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-no-results {
    padding: var(--space-lg);
    text-align: center;
    color: var(--gray-500);
}

/* ==========================================================================
   Notify Button
   ========================================================================== */

.btn-notify {
    background: var(--success);
    color: var(--white);
    border: none;
}

.btn-notify:hover {
    background: #218838;
}

.notify-info {
    padding: var(--space-sm);
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
}

/* ==========================================================================
   Templates Grid
   ========================================================================== */

.modal-wide {
    max-width: 700px;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.template-card {
    padding: var(--space-lg);
    background: var(--gray-50);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.template-card:hover {
    background: var(--white);
    border-color: var(--gray-200);
}

.template-card.selected {
    background: var(--white);
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

.template-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.template-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: var(--space-xs);
}

.template-desc {
    font-size: 0.75rem;
    color: var(--gray-600);
}

.template-loading,
.template-error {
    grid-column: 1 / -1;
    padding: var(--space-xl);
    text-align: center;
    color: var(--gray-500);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.toast {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    padding: var(--space-md) var(--space-lg);
    background: var(--gray-800);
    color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition-normal);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--error);
}

.toast.info {
    background: var(--info);
}

/* ==========================================================================
   Version History & Comments (Editor)
   ========================================================================== */

.editor-sidebar {
    position: fixed;
    right: 0;
    top: 60px;
    width: 320px;
    height: calc(100vh - 60px);
    background: var(--white);
    border-left: 1px solid var(--gray-200);
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.editor-sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1rem;
}

.sidebar-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
    color: var(--gray-600);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
}

.version-item,
.comment-item {
    padding: var(--space-md);
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

.version-header,
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
}

.version-author,
.comment-author {
    font-weight: 600;
    font-size: 0.85rem;
}

.version-time,
.comment-time {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.version-message,
.comment-text {
    font-size: 0.85rem;
    color: var(--gray-700);
}

.version-actions,
.comment-actions {
    margin-top: var(--space-sm);
    display: flex;
    gap: var(--space-xs);
}

.comment-reply {
    margin-left: var(--space-lg);
    padding-left: var(--space-md);
    border-left: 2px solid var(--gray-200);
    margin-top: var(--space-sm);
}

.comment-resolved {
    opacity: 0.6;
    background: var(--gray-100);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 768px) {
    .search-bar input {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .toast {
        left: var(--space-md);
        right: var(--space-md);
        bottom: var(--space-md);
    }

    .editor-sidebar {
        width: 100%;
    }
}

/* ==========================================================================
   WhatsApp & Quick Contact Actions
   ========================================================================== */

.notify-quick-actions {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.notify-quick-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.notify-quick-btn.whatsapp {
    background: #25D366;
    color: white;
}

.notify-quick-btn.whatsapp:hover {
    background: #128C7E;
    text-decoration: none;
    transform: translateY(-2px);
}

.notify-quick-btn.meet {
    background: var(--accent-blue);
    color: white;
}

.notify-quick-btn.meet:hover {
    background: var(--trust-blue);
    text-decoration: none;
    transform: translateY(-2px);
}

.notify-divider {
    display: flex;
    align-items: center;
    margin: var(--space-lg) 0;
    color: var(--gray-500);
    font-size: 0.85rem;
}

.notify-divider::before,
.notify-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.notify-divider span {
    padding: 0 var(--space-md);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
}

.btn-whatsapp:hover {
    background: #128C7E;
}

.btn-whatsapp svg {
    vertical-align: middle;
    margin-right: 4px;
}

/* Smaller buttons in modal actions */
.modal-actions .btn-sm {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
}

/* Toast warning style */
.toast.warning {
    background: var(--warning);
    color: var(--gray-900);
}

/* ==========================================================================
   Document Card - Enhanced UX
   ========================================================================== */

.document-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius-md);
    transition: transform var(--transition-fast);
}

.document-card-link:hover {
    text-decoration: none;
    transform: translateX(4px);
}

.document-card-link:hover .document-card {
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--accent-blue);
}

.document-card-link:hover .document-arrow {
    opacity: 1;
    transform: translateX(4px);
}

.document-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.document-icon-emoji {
    flex-shrink: 0;
    font-size: 1.5rem;
    line-height: 1;
}

.document-size {
    flex-shrink: 0;
    font-size: 0.8125rem;
    color: var(--gray-500);
    padding: var(--space-xs) var(--space-sm);
    background: var(--gray-100);
    border-radius: var(--radius-sm);
}

.document-arrow {
    flex-shrink: 0;
    opacity: 0.4;
    color: var(--gray-400);
    transition: all var(--transition-fast);
}

.document-arrow svg {
    display: block;
}

/* Improved search icon sizing */
.search-icon {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px;
    max-height: 20px;
}

/* Sort Bar - Simplified */
.sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    padding: var(--space-xs) 0;
}

.doc-count {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.sort-btn {
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--gray-600);
}

.sort-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.sort-btn.active {
    background: var(--trust-blue);
    color: var(--white);
    border-color: var(--trust-blue);
}

/* Document Row - Clean List */
.document-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--white);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.document-row:hover {
    background: var(--gray-50);
    border-color: var(--accent-blue);
    transform: translateX(4px);
    text-decoration: none;
}

.doc-num {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    flex-shrink: 0;
}

.doc-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.doc-name {
    flex: 1;
    font-weight: 500;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-date {
    font-size: 0.8rem;
    color: var(--gray-500);
    flex-shrink: 0;
}

.doc-arrow {
    color: var(--gray-400);
    font-size: 1.2rem;
    transition: transform var(--transition-fast);
}

.document-row:hover .doc-arrow {
    color: var(--accent-blue);
    transform: translateX(4px);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-edit {
    background: #d4edda;
    color: #155724;
}

.badge-view {
    background: #e2e3e5;
    color: #383d41;
}

/* Document Action Badge */
.document-action-badge {
    flex-shrink: 0;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
}

.document-action-badge.badge-edit {
    background: #d4edda;
    color: #155724;
}

.document-action-badge.badge-view {
    background: #e2e3e5;
    color: #383d41;
}

/* File type in meta */
.file-type {
    font-weight: 500;
    color: var(--gray-700);
}

/* Editable vs view-only card styling */
.document-card-link.editable:hover .document-card {
    border-left-color: var(--success);
}

.document-card-link.view-only:hover .document-card {
    border-left-color: var(--gray-400);
}

/* Mobile responsive for document cards */
@media (max-width: 768px) {
    .document-card-link:hover {
        transform: none;
    }

    .document-number {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .document-icon-emoji {
        font-size: 1.25rem;
    }

    .document-arrow {
        opacity: 0.6;
    }

    .document-size {
        display: none;
    }

    /* Mobile document row */
    .document-row {
        padding: var(--space-sm) var(--space-md);
        gap: var(--space-sm);
    }

    .document-row:hover {
        transform: none;
    }

    .doc-num {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .doc-icon {
        font-size: 1rem;
    }

    .doc-date {
        display: none;
    }

    .doc-name {
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   NEW CLEAN PORTAL DESIGN
   ========================================================================== */

.portal-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f5f7fa;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: var(--trust-blue);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-img {
    height: 28px;
}

.project-title {
    font-weight: 600;
    font-size: 1rem;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.online-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    opacity: 0.9;
}

.pulse {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse-anim 2s infinite;
}

@keyframes pulse-anim {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

/* ==========================================================================
   BROADCAST CONTROLS - Dashboard Header
   ========================================================================== */

.broadcast-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.broadcast-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.broadcast-toggle-btn:hover {
    background: rgba(255,255,255,0.25);
}

.broadcast-toggle-btn.broadcasting {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
    animation: broadcast-pulse 1.5s infinite;
}

@keyframes broadcast-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

.broadcast-followers {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    font-size: 0.75rem;
    color: white;
}

.broadcast-followers::before {
    content: '👁️';
    font-size: 0.7rem;
}

.follower-label {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Stop Broadcast Button */
.broadcast-stop-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(239, 68, 68, 0.9);
    border: 1px solid #ef4444;
    border-radius: 15px;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.broadcast-stop-btn:hover {
    background: #dc2626;
}

/* Follow Indicator */
.follow-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 20px;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    animation: follow-glow 2s infinite;
}

@keyframes follow-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.follow-pulse {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse-anim 1s infinite;
}

.follow-stop-btn {
    background: rgba(255,255,255,0.3);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    color: white;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.follow-stop-btn:hover {
    background: rgba(255,255,255,0.5);
}

/* Floating Sync Status Bar */
.sync-status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #4A90D9 0%, #2563eb 100%);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    animation: sync-bar-slide 0.3s ease;
}

@keyframes sync-bar-slide {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.sync-status-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sync-pulse {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-anim 1s infinite;
}

.sync-icon {
    font-size: 1.1rem;
}

.sync-text {
    font-weight: 600;
}

.sync-location {
    padding: 4px 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    font-size: 0.85rem;
}

.sync-stop-btn {
    padding: 6px 14px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 15px;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sync-stop-btn:hover {
    background: rgba(239, 68, 68, 0.9);
    border-color: #ef4444;
}

/* Adjust body when sync bar is visible */
body.has-sync-bar .top-bar {
    margin-top: 48px;
}

body.has-sync-bar .portal-body {
    padding-top: 48px;
}

/* Watch Dropdown */
.watch-dropdown {
    position: relative;
}

.watch-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.watch-btn:hover {
    background: rgba(255,255,255,0.25);
}

.watch-count {
    background: #10b981;
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.watch-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    min-width: 250px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.watch-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.watch-menu-header {
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e7eb;
}

.watch-menu-list {
    max-height: 300px;
    overflow-y: auto;
}

.watch-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.watch-menu-item:hover {
    background: #f3f4f6;
}

.watch-menu-item.active {
    background: #ecfdf5;
}

.watch-item-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.watch-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.watch-item-info strong {
    font-size: 0.9rem;
    color: #1f2937;
}

.watch-item-info small {
    font-size: 0.75rem;
    color: #6b7280;
}

.watch-item-active {
    color: #10b981;
    font-weight: bold;
}

.logout-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.85rem;
}

.logout-link:hover {
    color: white;
    text-decoration: none;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px;
}

.welcome-section {
    margin-bottom: 32px;
}

.welcome-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Mockups navigation button */
.mockups-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.mockups-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    text-decoration: none;
}

/* Website viewer button - trust blue variant */
.mockups-nav-btn.website-btn {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--trust-blue) 100%);
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
}

.mockups-nav-btn.website-btn:hover {
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.4);
}

.welcome-section h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 8px;
}

.subtitle {
    color: var(--gray-500);
    font-size: 0.95rem;
    margin: 0;
}

/* Documents Container */
.docs-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Document Item Wrapper (for admin delete button) */
.doc-item-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-item-wrapper .doc-item {
    flex: 1;
}

.doc-delete-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 8px;
    opacity: 0.4;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.doc-delete-btn:hover {
    opacity: 1;
    background: #fee2e2;
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.doc-item:hover {
    transform: translateX(4px);
    border-color: var(--accent-blue);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-decoration: none;
}

.doc-num {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    flex-shrink: 0;
}

.doc-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.doc-details {
    flex: 1;
    min-width: 0;
}

.doc-title {
    display: block;
    font-weight: 500;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-meta {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 2px;
}

.doc-go {
    font-size: 1.25rem;
    color: var(--gray-400);
    transition: transform 0.15s ease;
}

.doc-item:hover .doc-go {
    transform: translateX(4px);
    color: var(--accent-blue);
}

.empty-msg {
    text-align: center;
    padding: 48px;
    color: var(--gray-500);
}

/* Floating Action Button */
.fab-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}

.fab-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--trust-blue);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.fab-main:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.fab-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    color: var(--gray-800);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.15s ease;
}

.fab-item:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    text-decoration: none;
}

.fab-item.whatsapp:hover {
    background: #25D366;
    color: white;
}

.fab-item.meet:hover {
    background: #4285f4;
    color: white;
}

.fab-icon {
    font-size: 1.25rem;
}

.fab-label {
    font-weight: 500;
}

.fab-item.notes:hover {
    background: #ffc107;
    color: #000;
}

/* ==========================================================================
   Collapsible FAB Buttons (Dashboard)
   ========================================================================== */

.fab-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.fab-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.25s ease;
    pointer-events: none;
}

.fab-container.expanded .fab-items {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.fab-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--trust-blue) 0%, #3b82f6 100%);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(74, 144, 217, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(74, 144, 217, 0.5);
}

.fab-container.expanded .fab-toggle {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.fab-toggle-icon {
    transition: transform 0.3s ease;
}

.fab-container.expanded .fab-toggle-icon {
    transform: rotate(45deg);
}

/* Legacy support */
.fab-simple {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fab-btn {
    height: 44px;
    border-radius: 22px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0 16px 0 12px;
    gap: 8px;
    white-space: nowrap;
}

.fab-icon-inner {
    font-size: 1.15rem;
    flex-shrink: 0;
}

.fab-label-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-700);
}

.fab-btn:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.fab-btn.whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
}
.fab-btn.whatsapp:hover .fab-label-text { color: white; }

.fab-btn.meet:hover {
    background: #4285f4;
    border-color: #4285f4;
}
.fab-btn.meet:hover .fab-label-text { color: white; }

.fab-btn.upload:hover {
    background: var(--trust-blue);
    border-color: var(--trust-blue);
}
.fab-btn.upload:hover .fab-label-text { color: white; }

/* Admin back link in header */
.admin-back-link {
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.admin-back-link:hover {
    background: rgba(255,255,255,0.2);
    text-decoration: none;
}

/* ==========================================================================
   Quick Notes Panel
   ========================================================================== */

.quick-notes-panel {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 320px;
    max-height: 400px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.quick-notes-panel.show {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.quick-notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--trust-blue), var(--trust-blue-dark));
    color: var(--white);
}

.quick-notes-header h3 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-notes-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.quick-notes-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.quick-notes-body {
    padding: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.quick-notes-textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 0.875rem;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.quick-notes-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

.quick-notes-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    font-size: 0.75rem;
    color: var(--gray-500);
}

.quick-notes-saved {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--success);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-notes-saved.show {
    opacity: 1;
}

/* Bottom Bar */
.bottom-bar {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 16px;
    background: white;
    border-top: 1px solid var(--gray-200);
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Mobile */
@media (max-width: 640px) {
    .top-bar {
        padding: 12px 16px;
    }

    .project-title {
        font-size: 0.9rem;
    }

    .main-content {
        padding: 24px 16px;
    }

    .welcome-section h1 {
        font-size: 1.5rem;
    }

    .doc-item {
        padding: 12px 16px;
        gap: 12px;
    }

    .doc-num {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .doc-icon {
        font-size: 1.25rem;
    }

    .fab-container {
        bottom: 16px;
        right: 16px;
    }

    .fab-main {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   COLLABORATION UI - Live Cursors, Follow Mode, Pointer Highlights
   ========================================================================== */

/* Collaboration Bar */
.collab-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid var(--gray-200);
    gap: 16px;
}

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

.collab-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* User Avatars */
.collab-users {
    display: flex;
    align-items: center;
    gap: 4px;
}

.collab-user {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    cursor: default;
    transition: transform 0.2s ease;
}

.collab-user:hover {
    transform: scale(1.1);
    z-index: 1;
}

.collab-solo {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-style: italic;
}

/* Collaboration Buttons */
.collab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
}

.collab-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.collab-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

.collab-btn-icon {
    font-size: 1rem;
}

/* Follow Dropdown */
.collab-follow-dropdown {
    position: relative;
}

.follow-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 200px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.follow-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.follow-empty {
    padding: 16px;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.85rem;
}

.follow-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
}

.follow-item:first-child {
    border-radius: 12px 12px 0 0;
}

.follow-item:last-child {
    border-radius: 0 0 12px 12px;
}

.follow-item:only-child {
    border-radius: 12px;
}

.follow-item:hover {
    background: var(--gray-50);
}

.follow-item.active {
    background: rgba(74, 144, 217, 0.1);
}

.follow-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.follow-name {
    flex: 1;
    font-weight: 500;
    color: var(--gray-800);
}

.follow-status {
    font-size: 0.75rem;
    color: var(--accent-blue);
    font-weight: 600;
}

/* Pair/Co-Create Dropdown */
.collab-pair-dropdown {
    position: relative;
}

.pair-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 200px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.pair-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pair-empty {
    padding: 12px 16px;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.8rem;
}

.pair-menu-header {
    padding: 10px 16px 6px;
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pair-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
}

.pair-item:hover {
    background: var(--gray-50);
}

.pair-item.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
}

.pair-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.pair-name {
    flex: 1;
    font-weight: 500;
    color: var(--gray-800);
    font-size: 0.9rem;
}

.pair-action {
    font-size: 0.75rem;
    color: var(--accent-blue);
}

.pair-busy {
    font-size: 0.7rem;
    color: var(--gray-500);
}

.pair-request-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(74, 144, 217, 0.05);
}

.pair-accept-btn, .pair-decline-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
}

.pair-accept-btn {
    background: var(--success-green);
    color: white;
}

.pair-decline-btn {
    background: var(--gray-200);
    color: var(--gray-600);
}

.pair-pending {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    color: var(--gray-600);
    font-size: 0.85rem;
}

.pair-pending-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--gray-300);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.pair-cancel-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--gray-100);
    border: none;
    border-radius: 0 0 12px 12px;
    color: var(--gray-600);
    font-size: 0.85rem;
    cursor: pointer;
}

.pair-cancel-btn:hover {
    background: var(--gray-200);
}

/* Co-Create paired state */
.pair-connected {
    padding: 12px 16px;
    text-align: center;
}

.pair-connected strong {
    display: block;
    color: var(--success-green);
    margin-bottom: 4px;
}

.pair-end-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    background: var(--gray-100);
    border: none;
    border-radius: 8px;
    color: var(--gray-700);
    font-size: 0.85rem;
    cursor: pointer;
}

.pair-end-btn:hover {
    background: var(--gray-200);
}

/* Collab button disabled state - for when no users available */
.collab-btn.no-users {
    opacity: 0.6;
    cursor: default;
}

.collab-btn.no-users:hover {
    background: transparent;
}

/* Cursor Overlay */
.cursor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* Remote Cursor */
.remote-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 1001;
}

.remote-cursor-caret {
    width: 2px;
    height: 20px;
    border-radius: 1px;
    animation: cursor-blink 1.2s infinite;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.remote-cursor-label {
    position: absolute;
    top: -20px;
    left: 0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Pointer Overlay */
.pointer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

/* Pointer Ripple Effect */
.pointer-ripple {
    position: fixed;
    width: 50px;
    height: 50px;
    margin-left: -25px;
    margin-top: -25px;
    border-radius: 50%;
    border: 3px solid var(--ripple-color, #FF6B6B);
    background: rgba(255, 107, 107, 0.2);
    animation: pointer-ripple-anim 1.5s ease-out forwards;
    pointer-events: none;
}

@keyframes pointer-ripple-anim {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.6;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Collaboration Bar Mobile */
@media (max-width: 640px) {
    .collab-bar {
        padding: 6px 12px;
        flex-wrap: wrap;
    }

    .collab-btn {
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    .collab-btn-text {
        display: none;
    }

    .collab-user {
        width: 24px;
        height: 24px;
        font-size: 0.65rem;
    }

    .remote-cursor-label {
        font-size: 0.6rem;
        padding: 1px 6px;
    }
}

/* ==========================================================================
   BROADCAST NOTIFICATION
   ========================================================================== */

.broadcast-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 10000;
    animation: slide-in-right 0.4s ease;
    border-left: 4px solid var(--accent-blue);
}

@keyframes slide-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.broadcast-notification.fade-out {
    animation: slide-out-right 0.3s ease forwards;
}

@keyframes slide-out-right {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.broadcast-notif-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.broadcast-notif-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.broadcast-notif-text {
    font-size: 0.9rem;
    color: var(--gray-700);
    line-height: 1.4;
}

.broadcast-notif-text strong {
    display: block;
    color: var(--gray-900);
}

.broadcast-notif-btn {
    padding: 8px 16px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.broadcast-notif-btn:hover {
    background: var(--accent-blue-dark, #3a80c9);
    transform: scale(1.05);
}

/* ==========================================================================
   PAIR/CO-CREATE NOTIFICATIONS
   ========================================================================== */

/* Pair Request Notification - when someone invites you */
.pair-request-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10001;
    animation: slide-in-right 0.4s ease;
    border-left: 4px solid #9333ea;
    max-width: 360px;
}

.pair-request-notification.fade-out {
    animation: slide-out-right 0.3s ease forwards;
}

.pair-notif-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.pair-notif-content {
    flex: 1;
    font-size: 0.9rem;
    color: var(--gray-700);
    line-height: 1.4;
}

.pair-notif-content strong {
    color: var(--gray-900);
}

.pair-notif-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.pair-notif-accept {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pair-notif-accept:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.pair-notif-decline {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    background: white;
    color: var(--gray-500);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pair-notif-decline:hover {
    border-color: #ef4444;
    color: #ef4444;
    transform: scale(1.1);
}

/* Pair Connected/Disconnected Notification */
.pair-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10001;
    animation: slide-in-right 0.4s ease;
}

.pair-notification.pair-connected {
    border-left: 4px solid #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, white 100%);
}

.pair-notification.pair-disconnected {
    border-left: 4px solid #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, white 100%);
}

.pair-notification.fade-out {
    animation: slide-out-right 0.3s ease forwards;
}

.pair-notif-icon {
    font-size: 1.5rem;
}

.pair-notif-text {
    font-size: 0.9rem;
    color: var(--gray-700);
    line-height: 1.4;
}

.pair-notif-text strong {
    display: block;
    color: var(--gray-900);
}

/* ==========================================================================
   INVITE MODAL
   ========================================================================== */

.invite-modal-content {
    max-width: 440px;
}

.invite-modal-content h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.invite-description {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.invite-options {
    margin-bottom: 24px;
}

.invite-options label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 10px;
}

.invite-duration-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.duration-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
}

.duration-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.duration-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

.invite-link-container {
    margin-bottom: 24px;
}

.invite-link-container label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 10px;
}

.invite-link-row {
    display: flex;
    gap: 8px;
}

.invite-link-row input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 0.85rem;
    background: var(--gray-50);
}

.invite-link-row input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.invite-link-row .btn {
    white-space: nowrap;
}

.invite-link-info {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Invite Button in Collab Bar */
.collab-invite-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.collab-invite-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    border-color: #5a67d8;
    color: white;
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .broadcast-notification {
        top: auto;
        bottom: 80px;
        right: 10px;
        left: 10px;
        flex-direction: column;
        text-align: center;
    }

    .invite-duration-btns {
        justify-content: center;
    }

    .invite-link-row {
        flex-direction: column;
    }
}

/* ==========================================================================
   @Mentions System
   ========================================================================== */

/* Mentions Dropdown */
.mentions-dropdown {
    position: fixed;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 6px;
    min-width: 180px;
    max-width: 280px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.mentions-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.mention-item:hover,
.mention-item.selected {
    background: var(--gray-100);
}

.mention-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.mention-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-800);
}

/* Mention Tags in Chat */
.mention-tag {
    display: inline;
    padding: 2px 6px;
    background: rgba(74, 144, 217, 0.15);
    border-radius: 4px;
    font-weight: 500;
    color: var(--accent-blue);
    font-size: 0.9em;
}

.mention-tag.mention-me {
    background: rgba(255, 193, 7, 0.2);
    color: #e6a800;
    font-weight: 600;
}

/* Chat message with mention for me */
.chat-message.has-mention {
    background: rgba(255, 193, 7, 0.08);
    border-left: 3px solid var(--warning);
    padding-left: 12px;
    margin-left: -3px;
}

/* Hint text in comments input */
.comments-input input::placeholder {
    color: var(--gray-400);
}

/* @all special styling */
.mention-item[data-username="all"] .mention-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.mention-item[data-username="all"] .mention-name::after {
    content: ' (toți)';
    font-size: 0.8em;
    color: var(--gray-500);
}

/* Mobile responsive */
@media (max-width: 640px) {
    .mentions-dropdown {
        left: 10px !important;
        right: 10px !important;
        max-width: none;
    }
}

/* ==========================================================================
   Enhanced Invite Modal
   ========================================================================== */

.users-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
}

.users-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.users-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

.invite-result-container {
    margin: 20px 0;
    padding: 20px;
    background: var(--gray-50);
    border-radius: 12px;
}

.invite-credentials {
    margin-bottom: 16px;
}

.invite-cred-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.invite-cred-item label {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin: 0;
}

.invite-password-display {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--trust-blue);
    background: white;
    padding: 8px 16px;
    border-radius: 8px;
    border: 2px dashed var(--accent-blue);
    letter-spacing: 2px;
}

.invite-share-btns {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-whatsapp:hover {
    background: #1da851;
}

/* ==========================================================================
   Admin Panel Styles
   ========================================================================== */

.admin-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-panel {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.admin-panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-panel-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--gray-800);
}

.admin-panel-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
    padding: 4px;
}

.admin-panel-close:hover {
    color: var(--gray-600);
}

.admin-panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-100);
    padding: 0 24px;
}

.admin-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
}

.admin-tab:hover {
    color: var(--gray-700);
}

.admin-tab.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.admin-panel-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.admin-user-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-user-card {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 12px;
    gap: 16px;
}

.admin-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

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

.admin-user-name {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.admin-user-meta {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.admin-user-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.admin-user-status.online {
    background: #dcfce7;
    color: #16a34a;
}

.admin-user-status.offline {
    background: var(--gray-100);
    color: var(--gray-500);
}

.admin-user-status.guest {
    background: #fef3c7;
    color: #d97706;
}

.admin-user-actions {
    display: flex;
    gap: 8px;
}

.admin-action-btn {
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-action-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.admin-action-btn.danger {
    color: #dc2626;
    border-color: #fecaca;
}

.admin-action-btn.danger:hover {
    background: #fef2f2;
}

.admin-empty {
    text-align: center;
    padding: 40px;
    color: var(--gray-400);
}

.admin-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

/* Add user form */
.admin-add-form {
    display: grid;
    gap: 16px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: 12px;
    margin-bottom: 20px;
}

.admin-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.admin-form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.admin-form-field input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.9rem;
}

.admin-form-field input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

@media (max-width: 640px) {
    .admin-panel {
        max-height: 90vh;
    }

    .admin-form-row {
        grid-template-columns: 1fr;
    }

    .admin-user-card {
        flex-wrap: wrap;
    }

    .admin-user-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
    }
}

/* ==========================================================================
   Enhanced Real-Time Collaboration Styles
   ========================================================================== */

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(74, 144, 217, 0.1);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--accent-blue);
    animation: typing-pulse 2s ease-in-out infinite;
}

.typing-indicator .typing-dots {
    display: flex;
    gap: 3px;
}

.typing-indicator .typing-dot {
    width: 4px;
    height: 4px;
    background: var(--accent-blue);
    border-radius: 50%;
    animation: typing-bounce 1.4s ease-in-out infinite;
}

.typing-indicator .typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator .typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

@keyframes typing-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Remote User Cursors - Enhanced */
.remote-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 1000;
    transition: left 0.15s ease-out, top 0.15s ease-out;
}

.remote-cursor-caret {
    width: 2px;
    height: 20px;
    animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.remote-cursor-label {
    position: absolute;
    top: -20px;
    left: 0;
    padding: 2px 8px;
    border-radius: 4px 4px 4px 0;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    transform-origin: bottom left;
    animation: cursor-label-appear 0.2s ease-out;
}

@keyframes cursor-label-appear {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Remote Selection Highlight */
.remote-selection {
    position: absolute;
    pointer-events: none;
    opacity: 0.25;
    border-radius: 2px;
    transition: all 0.15s ease-out;
}

/* Remote Mouse Pointer Overlay */
.mouse-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1001;
}

/* Remote Mouse Pointer */
.remote-mouse-pointer {
    position: fixed;
    pointer-events: none;
    transform: translate(-2px, -2px);
    transition: left 0.08s ease-out, top 0.08s ease-out;
    z-index: 1001;
}

.remote-mouse-pointer svg {
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.3));
}

.remote-mouse-label {
    position: absolute;
    left: 18px;
    top: 14px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    opacity: 0.9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Present Mode - Presentation Styling */
body.presenting {
    --present-bg: #1a1a2e;
}

body.presenting .editor-page {
    background: var(--present-bg);
}

body.presenting .preview-pane {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    margin: 10px;
}

body.presenting .preview-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 60px;
    font-size: 1.1rem;
    line-height: 1.8;
}

body.presenting .editor-header {
    background: var(--present-bg);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

body.presenting .collab-bar {
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

body.presenting .collab-btn {
    color: rgba(255,255,255,0.8);
}

body.presenting .collab-btn.active {
    background: rgba(74, 144, 217, 0.3);
    color: white;
}

body.presenting #present-btn.active {
    background: #e74c3c;
    color: white;
    animation: pulse-present 2s infinite;
}

@keyframes pulse-present {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(231, 76, 60, 0); }
}

/* Presenter indicator in user list */
.collab-user.presenting::before {
    content: '📺';
    margin-right: 4px;
}

/* Activity Status Badge */
.user-activity-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-activity-badge.editing {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.user-activity-badge.scrolling {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.user-activity-badge.idle {
    background: rgba(156, 163, 175, 0.15);
    color: #6b7280;
}

.user-activity-badge.selecting {
    background: rgba(168, 85, 247, 0.15);
    color: #9333ea;
}

/* Enhanced Collab Bar */
.collab-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: white;
    border-bottom: 1px solid var(--gray-100);
    min-height: 44px;
}

.collab-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.collab-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* User Avatar with Activity Indicator */
.collab-user {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid white;
    margin-left: -8px;
}

.collab-user:first-child {
    margin-left: 0;
}

.collab-user:hover {
    transform: scale(1.1);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.collab-user::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
    background: #9ca3af;
}

.collab-user.is-typing::after {
    background: #22c55e;
    animation: activity-pulse 1s ease-in-out infinite;
}

.collab-user.is-scrolling::after {
    background: #3b82f6;
}

.collab-user.is-selecting::after {
    background: #a855f7;
}

.collab-user.is-broadcasting::before {
    content: '📡';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.7rem;
    animation: broadcast-pulse 1.5s ease-in-out infinite;
}

@keyframes activity-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

@keyframes broadcast-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* User Tooltip with Details */
.collab-user-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    margin-bottom: 8px;
    z-index: 100;
}

.collab-user-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--gray-800);
}

.collab-user:hover .collab-user-tooltip {
    opacity: 1;
    visibility: visible;
}

.collab-user-tooltip-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.collab-user-tooltip-activity {
    color: var(--gray-400);
    font-size: 0.7rem;
}

/* Live Edit Notification */
.live-edit-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    animation: slide-in-right 0.3s ease-out;
    max-width: 300px;
}

.live-edit-notification.fade-out {
    animation: slide-out-right 0.3s ease-out forwards;
}

@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slide-out-right {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

.live-edit-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
}

.live-edit-content {
    flex: 1;
    min-width: 0;
}

.live-edit-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.live-edit-detail {
    font-size: 0.75rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Shortcuts Help Modal Styles */
.shortcuts-modal-content {
    max-width: 700px;
    padding: 0;
}

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

.shortcuts-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--gray-800);
}

.shortcuts-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.shortcuts-close:hover {
    color: var(--gray-600);
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 24px;
}

.shortcuts-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 12px 0;
}

.shortcut-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-50);
}

.shortcut-row:last-child {
    border-bottom: none;
}

.shortcut-keys {
    display: flex;
    align-items: center;
    gap: 4px;
}

.shortcut-keys kbd {
    display: inline-block;
    padding: 3px 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    color: var(--gray-700);
}

.shortcut-desc {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.shortcuts-footer {
    padding: 16px 24px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

.shortcuts-tip {
    font-size: 0.85rem;
    color: var(--gray-600);
}

@media (max-width: 640px) {
    .shortcuts-grid {
        grid-template-columns: 1fr;
    }
}

/* Search Panel Styles */
.search-panel {
    position: sticky;
    top: 60px;
    background: white;
    border-bottom: 1px solid var(--gray-100);
    z-index: 100;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.search-panel.show {
    opacity: 1;
    transform: translateY(0);
}

.search-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 8px 12px;
    transition: border-color 0.2s;
}

.search-input-wrapper:focus-within {
    border-color: var(--accent-blue);
}

.search-input-wrapper .search-icon {
    width: 18px;
    height: 18px;
    color: var(--gray-400);
    flex-shrink: 0;
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    background: none;
    font-size: 0.9rem;
    outline: none;
}

.search-count {
    font-size: 0.75rem;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: 10px;
}

.search-nav {
    display: flex;
    gap: 4px;
}

.search-nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-nav-btn:hover {
    background: var(--gray-200);
}

.search-nav-btn svg {
    width: 16px;
    height: 16px;
    color: var(--gray-600);
}

.search-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
}

.search-close:hover {
    color: var(--gray-600);
}

.search-results {
    max-height: 200px;
    overflow-y: auto;
    border-top: 1px solid var(--gray-100);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.search-result-item:hover,
.search-result-item.active {
    background: var(--gray-50);
}

.search-result-item.active {
    border-left: 3px solid var(--accent-blue);
}

.search-result-line {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-family: var(--font-mono);
    min-width: 50px;
}

.search-result-text {
    font-size: 0.85rem;
    color: var(--gray-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-text mark {
    background: rgba(255, 193, 7, 0.4);
    color: inherit;
    padding: 1px 2px;
    border-radius: 2px;
}

.search-hint,
.search-empty,
.search-more {
    padding: 16px;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.85rem;
}

/* Help Button */
.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--gray-600);
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

/* ==========================================================================
   Breadcrumb Navigation (Folder Navigation)
   ========================================================================== */

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.breadcrumb-link {
    color: var(--accent-blue);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.breadcrumb-link:hover {
    background: var(--gray-100);
    text-decoration: none;
}

.breadcrumb-sep {
    color: var(--gray-400);
    font-weight: bold;
}

/* Folder Item Styling */
.doc-item.folder-item {
    background: linear-gradient(135deg, #fff9e6 0%, #fff5cc 100%);
    border-left: 3px solid #f5c518;
}

.doc-item.folder-item:hover {
    background: linear-gradient(135deg, #fff5cc 0%, #ffefaa 100%);
}

/* ==========================================================================
   Admin Dashboard - v2.0 Styles
   ========================================================================== */

/* Password input with generate button */
.password-input-group {
    display: flex;
    gap: var(--space-sm);
}

.password-input-group input {
    flex: 1;
}

/* Memorable link display */
.memorable-link {
    font-family: var(--font-mono);
    background: var(--gray-100);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.copy-link-btn {
    padding: var(--space-xs) var(--space-sm);
    margin-left: var(--space-xs);
    font-size: 0.85rem;
}

/* Access info box in modal */
.access-info-box {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.access-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
}

.access-row:not(:last-child) {
    border-bottom: 1px solid var(--gray-200);
}

.access-label {
    font-weight: 600;
    color: var(--gray-700);
    min-width: 60px;
}

.access-row code {
    font-family: var(--font-mono);
    background: var(--white);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-300);
    flex: 1;
    word-break: break-all;
}

/* Access actions in modal */
.access-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.access-actions .btn {
    flex: 1;
    min-width: 150px;
}

/* ==========================================================================
   Document Progress System - v3.0
   Progress-based visual status with emotional feedback
   ========================================================================== */

/* Progress Status Colors */
:root {
    --progress-0-25: #ef4444;     /* Red - Needs attention */
    --progress-25-50: #f97316;    /* Orange - In progress */
    --progress-50-75: #3b82f6;    /* Blue - Good progress */
    --progress-75-99: #22c55e;    /* Green - Almost done */
    --progress-100: #9ca3af;      /* Gray - Completed */
}

/* Document Row with Progress Status */
.doc-item-enhanced {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--white);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--gray-300);
    margin-bottom: var(--space-sm);
    transition: all var(--transition-normal);
    position: relative;
}

.doc-item-enhanced:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(2px);
}

/* Progress-based border colors */
.doc-item-enhanced[data-progress-range="0-25"] {
    border-left-color: var(--progress-0-25);
}

.doc-item-enhanced[data-progress-range="25-50"] {
    border-left-color: var(--progress-25-50);
}

.doc-item-enhanced[data-progress-range="50-75"] {
    border-left-color: var(--progress-50-75);
}

.doc-item-enhanced[data-progress-range="75-99"] {
    border-left-color: var(--progress-75-99);
}

.doc-item-enhanced[data-progress-range="100"] {
    border-left-color: var(--progress-100);
    opacity: 0.6;
    background: linear-gradient(to right, #f0fdf4, var(--white));
}

.doc-item-enhanced[data-progress-range="100"]:hover {
    opacity: 0.8;
}

/* Document Header Row */
.doc-header-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.doc-icon-enhanced {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.doc-name-enhanced {
    flex: 1;
    font-weight: 500;
    color: var(--gray-800);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.doc-name-enhanced:hover {
    color: var(--accent-blue);
    text-decoration: none;
}

/* Completed document styling */
.doc-item-enhanced[data-progress-range="100"] .doc-name-enhanced {
    text-decoration: line-through;
    color: var(--gray-500);
}

/* Note indicator */
.note-indicator {
    font-size: 0.875rem;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.note-indicator:hover {
    opacity: 1;
}

.note-indicator.has-note {
    opacity: 1;
    color: var(--accent-blue);
}

/* Document meta info */
.doc-meta-enhanced {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.doc-date {
    white-space: nowrap;
}

.doc-modified-by {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Document actions */
.doc-actions-enhanced {
    display: flex;
    gap: var(--space-xs);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.doc-item-enhanced:hover .doc-actions-enhanced {
    opacity: 1;
}

.doc-action-btn {
    padding: var(--space-xs);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-500);
    transition: all var(--transition-fast);
}

.doc-action-btn:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* Progress Bar Row - Hidden by default (minimal analyst mode) */
.doc-progress-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding-left: 2rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.2s ease, opacity 0.2s ease, padding 0.2s ease;
    padding-top: 0;
    padding-bottom: 0;
}

/* Show progress row on hover */
.doc-item-enhanced:hover .doc-progress-row {
    max-height: 40px;
    opacity: 1;
    padding-top: var(--space-xs);
    padding-bottom: var(--space-xs);
}

/* Progress Slider */
.progress-slider-container {
    flex: 1;
    max-width: 200px;
    position: relative;
}

.progress-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    outline: none;
    cursor: pointer;
    transition: height var(--transition-fast);
}

.progress-slider:hover {
    height: 8px;
}

/* Slider track colors based on value */
.progress-slider::-webkit-slider-runnable-track {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(to right,
        var(--progress-0-25) 0%,
        var(--progress-25-50) 25%,
        var(--progress-50-75) 50%,
        var(--progress-75-99) 75%,
        var(--progress-100) 100%);
}

.progress-slider::-moz-range-track {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(to right,
        var(--progress-0-25) 0%,
        var(--progress-25-50) 25%,
        var(--progress-50-75) 50%,
        var(--progress-75-99) 75%,
        var(--progress-100) 100%);
}

/* Slider thumb */
.progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--trust-blue);
    cursor: grab;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

.progress-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.progress-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
}

.progress-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--trust-blue);
    cursor: grab;
    box-shadow: var(--shadow-sm);
}

/* Progress percentage display */
.progress-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-600);
    min-width: 36px;
    text-align: right;
}

/* Inline status dot (visible indicator for progress range) */
.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Status dot colors by progress range */
[data-progress-range="0-25"] .progress-dot {
    background: var(--progress-0-25);
}
[data-progress-range="25-50"] .progress-dot {
    background: var(--progress-25-50);
}
[data-progress-range="50-75"] .progress-dot {
    background: var(--progress-50-75);
}
[data-progress-range="75-99"] .progress-dot {
    background: var(--progress-75-99);
}
[data-progress-range="100"] .progress-dot {
    background: var(--progress-100);
}

/* Status Row - Analyst Mode (hidden by default, shows on hover) */
.doc-status-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding-left: 2rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.2s ease, opacity 0.2s ease, padding 0.2s ease;
    padding-top: 0;
    padding-bottom: 0;
}

/* Show status row on hover */
.doc-item-enhanced:hover .doc-status-row {
    max-height: 40px;
    opacity: 1;
    padding-top: var(--space-xs);
    padding-bottom: var(--space-xs);
}

/* Status Steps - 5 clickable dots */
.status-steps {
    display: flex;
    gap: 4px;
    align-items: center;
}

.status-step {
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
}

.status-step:hover {
    transform: scale(1.3);
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-300);
    border: 2px solid var(--gray-300);
    transition: all 0.15s ease;
}

/* Active steps (filled) */
.status-step.active .step-dot {
    background: var(--trust-blue);
    border-color: var(--trust-blue);
}

/* Current step indicator */
.status-step.current .step-dot {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.3);
}

/* Step colors by position */
.status-step:nth-child(1).active .step-dot { background: var(--progress-0-25); border-color: var(--progress-0-25); }
.status-step:nth-child(2).active .step-dot { background: var(--progress-25-50); border-color: var(--progress-25-50); }
.status-step:nth-child(3).active .step-dot { background: var(--progress-50-75); border-color: var(--progress-50-75); }
.status-step:nth-child(4).active .step-dot { background: var(--progress-75-99); border-color: var(--progress-75-99); }
.status-step:nth-child(5).active .step-dot { background: var(--progress-100); border-color: var(--progress-100); }

/* Status label */
.status-label {
    font-size: 0.7rem;
    color: var(--gray-500);
    font-weight: 500;
    min-width: 50px;
}

/* Upload Overlay */
.upload-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.upload-modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    min-width: 280px;
    box-shadow: var(--shadow-xl);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.upload-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--space-md);
}

.upload-progress-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.upload-progress-fill {
    height: 100%;
    background: var(--accent-blue);
    width: 0%;
    transition: width 0.2s ease;
}

.upload-file-name {
    font-size: 0.75rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

/* Drag & Drop Styles */
.doc-item-enhanced[draggable="true"] {
    cursor: default;
}

.sort-custom .doc-item-enhanced[draggable="true"] {
    cursor: grab;
}

.doc-item-enhanced.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.doc-item-enhanced.drag-over {
    border-color: var(--accent-blue);
    background: rgba(74, 144, 217, 0.05);
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.3);
}

/* Reorder Controls (visible only in custom sort mode) */
.reorder-controls {
    display: none;
    flex-direction: column;
    gap: 2px;
    margin-right: var(--space-sm);
}

.sort-custom .reorder-controls {
    display: flex;
}

.reorder-btn {
    padding: 2px 4px;
    background: var(--gray-100);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-size: 0.625rem;
    color: var(--gray-500);
    line-height: 1;
    transition: all var(--transition-fast);
}

.reorder-btn:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* Sort Controls */
.sort-controls {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
    margin-bottom: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.sort-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.sort-btn {
    padding: var(--space-xs) var(--space-sm);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sort-btn:hover {
    background: var(--gray-100);
}

.sort-btn.active {
    background: var(--trust-blue);
    color: var(--white);
    border-color: var(--trust-blue);
}

.sort-btn .sort-icon {
    margin-left: 4px;
    font-size: 0.625rem;
}

/* Bulk Actions Toolbar */
.bulk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, var(--trust-blue) 0%, var(--trust-blue-light) 100%);
    border-radius: var(--radius-md);
    color: var(--white);
    animation: slideDown 0.2s ease-out;
}

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

.bulk-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.bulk-select-all {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
    font-size: 0.875rem;
}

.bulk-select-all input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.bulk-count {
    font-size: 0.875rem;
    opacity: 0.9;
}

.bulk-actions {
    display: flex;
    gap: var(--space-sm);
}

.bulk-btn {
    padding: var(--space-xs) var(--space-sm);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 4px;
}

.bulk-download {
    background: var(--white);
    color: var(--trust-blue);
}

.bulk-download:hover {
    background: var(--gray-100);
}

.bulk-delete {
    background: var(--error);
    color: var(--white);
}

.bulk-delete:hover {
    background: #c82333;
}

.bulk-cancel {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.5);
}

.bulk-cancel:hover {
    background: rgba(255,255,255,0.1);
}

/* File Checkbox - hover only for clean UI */
.bulk-checkbox {
    display: flex;
    align-items: center;
    padding: 4px;
    margin-right: var(--space-xs);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.doc-item-enhanced:hover .bulk-checkbox,
.doc-item-enhanced.selected .bulk-checkbox,
.bulk-mode .bulk-checkbox {
    opacity: 1;
}

.bulk-checkbox input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--trust-blue);
}

.doc-item-enhanced.selected {
    background: rgba(74, 144, 217, 0.1);
    border-color: var(--accent-blue);
}

/* Global Search - Dashboard */
.search-container {
    max-width: 600px;
    margin: 0 auto var(--space-lg);
    position: relative;
    z-index: 50;
}

.search-container > .search-input-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff !important;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    gap: 8px;
}

.search-container > .search-input-wrapper:focus-within {
    border-color: var(--trust-blue);
    box-shadow: 0 4px 16px rgba(74, 144, 217, 0.15);
}

.search-container .search-icon {
    font-size: 1.1rem;
    opacity: 0.6;
    flex-shrink: 0;
    pointer-events: none;
}

.search-container input.search-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    font-size: 1rem;
    background: none !important;
    background-color: transparent !important;
    color: #1f2937;
    min-width: 100px;
    padding: 0;
    margin: 0;
    height: auto;
    line-height: normal;
    pointer-events: auto !important;
    -webkit-user-select: text !important;
    user-select: text !important;
    cursor: text !important;
    -webkit-user-modify: read-write !important;
    -moz-user-modify: read-write !important;
}

.search-container input.search-input::placeholder {
    color: #9ca3af;
}

.search-container .search-shortcut {
    font-size: 0.75rem;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    flex-shrink: 0;
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    margin-top: var(--space-xs);
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 100;
}

.search-results-header {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.85rem;
    color: var(--gray-500);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-result-item {
    padding: var(--space-md);
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: background 0.15s ease;
}

.search-result-item:hover {
    background: var(--gray-50);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-filename {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.search-result-path {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-bottom: 4px;
}

.search-result-match {
    font-size: 0.85rem;
    color: var(--gray-600);
    background: var(--gray-50);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 6px;
    margin-top: var(--space-xs);
}

.search-result-match .match-type {
    font-size: 0.7rem;
    color: var(--trust-blue);
    background: rgba(74, 144, 217, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: var(--space-xs);
    text-transform: uppercase;
    font-weight: 600;
}

.search-highlight {
    background: #fef08a;
    color: var(--text-primary);
    padding: 1px 2px;
    border-radius: 2px;
}

.search-no-results {
    padding: var(--space-xl);
    text-align: center;
    color: var(--gray-400);
}

.search-loading {
    padding: var(--space-md);
    text-align: center;
    color: var(--gray-400);
}

/* In-Document Search */
.doc-search-bar {
    position: sticky;
    top: 60px;
    z-index: 50;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--space-sm) var(--space-md);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.doc-search-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    max-width: 500px;
    margin: 0 auto;
}

.doc-search-input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.doc-search-input:focus {
    outline: none;
    border-color: var(--trust-blue);
}

.doc-search-count {
    font-size: 0.85rem;
    color: var(--gray-500);
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
}

.doc-search-nav {
    background: var(--gray-100);
    border: none;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.15s;
}

.doc-search-nav:hover {
    background: var(--gray-200);
}

.doc-search-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    padding: var(--space-xs);
    transition: opacity 0.15s;
}

.doc-search-close:hover {
    opacity: 1;
}

.doc-search-highlight {
    background: #fef08a;
    padding: 1px 2px;
    border-radius: 2px;
}

.doc-search-highlight.current {
    background: #f97316;
    color: white;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.3);
}

/* PDF Search Button */
.pdf-search-btn {
    background: var(--trust-blue);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s;
}

.pdf-search-btn:hover {
    background: #3b82f6;
}

.pdf-search-bar {
    top: 60px;
}

/* Fix for input read-only issue */
.doc-search-input,
.search-input,
#global-search,
#pdf-search-input {
    -webkit-user-modify: read-write !important;
    -moz-user-modify: read-write !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

/* Simple Search Container */
.simple-search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto 20px;
}

.simple-search-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    background: var(--white);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.simple-search-input:focus {
    border-color: var(--trust-blue);
    box-shadow: 0 4px 16px rgba(74, 144, 217, 0.15);
}

.simple-search-input::placeholder {
    color: var(--gray-400);
}

.simple-search-container .search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.btn-icon {
    background: var(--gray-100);
    border: none;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.15s;
}

.btn-icon:hover {
    background: var(--gray-200);
}

/* Note Modal */
.note-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.note-modal.show {
    opacity: 1;
    visibility: visible;
}

.note-modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-xl);
    transform: translateY(-20px);
    transition: transform var(--transition-normal);
}

.note-modal.show .note-modal-content {
    transform: translateY(0);
}

.note-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.note-modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--gray-800);
}

.note-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    padding: 0;
    line-height: 1;
}

/* File Info Section in Note Modal */
.note-file-info {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-md);
    font-size: 0.85rem;
}

.file-info-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
}

.file-info-row:not(:last-child) {
    border-bottom: 1px solid var(--gray-200);
}

.file-info-label {
    color: var(--gray-600);
    min-width: 90px;
    flex-shrink: 0;
}

.file-info-value {
    flex: 1;
    color: var(--gray-800);
    font-weight: 500;
    word-break: break-word;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.file-info-value:hover {
    background: var(--gray-200);
}

.file-info-row .copy-btn {
    background: none;
    border: none;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.file-info-row .copy-btn:hover {
    opacity: 1;
}

.note-textarea {
    width: 100%;
    min-height: 150px;
    padding: var(--space-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    resize: vertical;
    margin-bottom: var(--space-md);
}

.note-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

.note-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}

/* Hover Card - Analyst Mode */
.doc-hover-card {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 260px;
    max-width: 320px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 0;
    font-size: 0.8rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: all 0.15s ease;
    z-index: 100;
    pointer-events: none;
}

.doc-hover-card::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 24px;
    width: 14px;
    height: 14px;
    background: white;
    border-right: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    transform: rotate(45deg);
}

.doc-item-enhanced:hover .doc-hover-card {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Hover Card Header */
.hover-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--gray-100);
    background: var(--gray-50);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.hover-card-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.hover-card-title {
    flex: 1;
    min-width: 0;
}

.hover-card-name {
    font-weight: 600;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.85rem;
    display: block;
}

.hover-card-type {
    font-size: 0.7rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Hover Card Status Badge */
.hover-card-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.hover-card-status.status-nou {
    background: var(--gray-100);
    color: var(--gray-600);
}

.hover-card-status.status-inceput {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.hover-card-status.status-lucru {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.hover-card-status.status-review {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

.hover-card-status.status-complet {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

/* Hover Card Body */
.hover-card-body {
    padding: 10px 14px;
}

.hover-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.hover-card-row:not(:last-child) {
    border-bottom: 1px solid var(--gray-50);
}

.hover-card-label {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.hover-card-value {
    color: var(--gray-800);
    font-weight: 500;
    font-size: 0.8rem;
}

.hover-card-value.recent {
    color: var(--accent-blue);
}

/* Hover Card Note */
.hover-card-note {
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(251, 191, 36, 0.08);
    border-left: 3px solid #f59e0b;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.75rem;
    color: var(--gray-700);
    line-height: 1.4;
}

.hover-card-note-icon {
    margin-right: 4px;
}

/* Hover Card Folder Variant */
.doc-item-enhanced[data-folder="true"] .hover-card-body {
    padding: 12px 14px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .doc-hover-card {
        display: none; /* Hide on mobile, use long-press or tap instead */
    }
}

/* Legacy tooltip fallback (for simple cases) */
.doc-tooltip {
    display: none;
}

/* Recent modification indicator */
.doc-item-enhanced.recent {
    background: rgba(59, 130, 246, 0.05);
}

.doc-item-enhanced.recent .doc-name-enhanced {
    font-weight: 600;
}

/* Move to folder popover */
.move-popover {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-sm);
    min-width: 180px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
}

.move-popover.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.move-popover-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    padding: var(--space-xs) var(--space-sm);
    margin-bottom: var(--space-xs);
}

.move-popover-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-700);
    transition: background var(--transition-fast);
}

.move-popover-item:hover {
    background: var(--gray-100);
}

.move-popover-item.new-folder {
    border-top: 1px solid var(--gray-200);
    margin-top: var(--space-xs);
    padding-top: var(--space-sm);
    color: var(--accent-blue);
}

/* ==========================================================================
   Header Chat Button & Slide-Out Drawer
   ========================================================================== */

/* ==========================================================================
   Chat System - Simplified
   ========================================================================== */

/* Chat Controls Container */
.chat-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

/* Notify Mode Button (Silent/Toast) */
.chat-notify-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.chat-notify-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.chat-notify-btn[data-mode="toast"] {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* Chat Expand Button */
.chat-expand-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 18px;
    border: none;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.chat-expand-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.chat-expand-btn.active {
    background: rgba(255, 255, 255, 0.3);
}

.expand-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.chat-expand-btn.active .expand-arrow {
    transform: rotate(180deg);
}

/* Chat Badge */
.chat-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    background: var(--error);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    animation: badge-pulse 2s infinite;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 10;
    border: 2px solid var(--trust-blue);
    transition: transform 0.2s ease;
}

.chat-badge:hover {
    transform: scale(1.15);
    animation: none;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Feedback Toast */
.chat-feedback {
    position: fixed;
    top: 70px;
    right: 20px;
    background: var(--trust-blue);
    color: white;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 2000;
    box-shadow: var(--shadow-lg);
}

.chat-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

/* PIN Button in Panel Header */
.chat-pin-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-pin-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-pin-btn.pinned {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

/* Panel when pinned */
.chat-panel.pinned {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25), 0 0 0 3px var(--accent-blue);
}

/* Header actions container */
.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Close button in panel */
.chat-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   Chat Panel (Slide-down from header)
   ========================================================================== */

.chat-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.chat-panel-overlay.open {
    opacity: 1;
    visibility: visible;
}

.chat-panel {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    max-height: 450px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.chat-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Panel Header */
.chat-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--trust-blue);
    color: white;
    flex-shrink: 0;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.typing-indicator {
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: rgba(255, 255, 255, 0.8);
}

.typing-indicator.show {
    opacity: 1;
}

.typing-dots {
    animation: typing-bounce 1s infinite;
    display: inline-block;
}

@keyframes typing-bounce {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Collapse Bar - visible handle at top of panel */
.chat-collapse-bar {
    background: var(--trust-blue-dark);
    padding: 8px 0;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s ease;
}

.chat-collapse-bar:hover {
    background: var(--trust-blue-light);
}

.collapse-handle {
    width: 40px;
    height: 5px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    transition: all 0.2s ease;
}

.chat-collapse-bar:hover .collapse-handle {
    width: 60px;
    background: rgba(255, 255, 255, 0.7);
}

/* Close X button in header */
.chat-close-x {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-close-x:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

/* Chat Messages Container */
.chat-panel .chat-messages {
    flex: 1;
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--gray-50);
}

/* Message Bubbles */
.chat-message {
    display: flex;
    max-width: 85%;
}

.chat-message.own {
    align-self: flex-end;
}

.chat-message.other {
    align-self: flex-start;
}

.msg-bubble {
    padding: 8px 12px;
    border-radius: 12px;
    position: relative;
}

.chat-message.own .msg-bubble {
    background: var(--trust-blue);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.other .msg-bubble {
    background: white;
    color: var(--gray-800);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.msg-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.msg-user {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.8;
}

.msg-time {
    font-size: 0.65rem;
    opacity: 0.6;
}

.msg-edited {
    font-size: 0.6rem;
    opacity: 0.5;
    margin-left: 4px;
}

.msg-text {
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
}

.msg-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.chat-message:hover .msg-footer {
    opacity: 1;
}

.msg-read {
    font-size: 0.7rem;
    opacity: 0.6;
}

.msg-action {
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.75rem;
    opacity: 0.6;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.msg-action:hover {
    opacity: 1;
}

.msg-edit-input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 0.85rem;
}

.msg-edit-btns {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.msg-edit-btns button {
    padding: 2px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* Chat Input Area */
.chat-panel .chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--gray-200);
    background: white;
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 20px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-input:focus {
    border-color: var(--accent-blue);
}

.chat-send {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--trust-blue);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-send:hover {
    background: var(--trust-blue-light);
    transform: scale(1.05);
}

.chat-send:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

/* Chat Header */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    background: var(--trust-blue);
    color: white;
}

.chat-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.chat-title {
    font-size: 0.875rem;
    font-weight: 600;
}

.typing-indicator {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
    font-style: italic;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 0;
    opacity: 0;
    transition: all 0.2s ease;
}

.typing-indicator.show {
    height: 14px;
    opacity: 1;
}

.chat-header-actions {
    display: flex;
    gap: var(--space-xs);
}

.chat-sound-toggle,
.chat-minimize {
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.chat-minimize {
    font-size: 1rem;
}

.chat-sound-toggle:hover,
.chat-minimize:hover {
    background: rgba(255,255,255,0.2);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    min-height: 200px;
    max-height: 280px;
    overflow-y: auto;
    padding: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    background: var(--gray-50);
}

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

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

/* Individual Message */
.chat-message {
    max-width: 85%;
    animation: message-appear 0.2s ease-out;
}

@keyframes message-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.own {
    align-self: flex-end;
}

.chat-message.other {
    align-self: flex-start;
}

.msg-header {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: 2px;
    font-size: 0.7rem;
}

.msg-user {
    font-weight: 600;
    color: var(--gray-700);
}

.chat-message.own .msg-user {
    color: var(--accent-blue);
}

.msg-time {
    color: var(--gray-500);
}

.msg-delete {
    margin-left: auto;
    width: 16px;
    height: 16px;
    border: none;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.chat-message:hover .msg-delete {
    opacity: 1;
}

.msg-delete:hover {
    color: var(--error);
}

.msg-edit {
    width: 16px;
    height: 16px;
    border: none;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 0.7rem;
    line-height: 1;
    padding: 0;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.chat-message:hover .msg-edit {
    opacity: 1;
}

.msg-edit:hover {
    color: var(--accent-blue);
}

.msg-edited {
    font-size: 0.65rem;
    color: var(--gray-400);
    font-style: italic;
    margin-left: 4px;
}

/* Inline edit form */
.msg-edit-input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid var(--accent-blue);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    outline: none;
    margin-bottom: 4px;
}

.msg-edit-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.msg-edit-save,
.msg-edit-cancel {
    padding: 2px 8px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
}

.msg-edit-save {
    background: var(--success);
    color: white;
}

.msg-edit-cancel {
    background: var(--gray-300);
    color: var(--gray-700);
}

.msg-text {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-message.own .msg-text {
    background: var(--accent-blue);
    color: white;
    border-bottom-right-radius: var(--radius-sm);
}

.chat-message.other .msg-text {
    background: white;
    color: var(--gray-800);
    border: 1px solid var(--gray-200);
    border-bottom-left-radius: var(--radius-sm);
}

/* Chat Input Area */
.chat-input-area {
    display: flex;
    gap: var(--space-xs);
    padding: var(--space-sm);
    border-top: 1px solid var(--gray-200);
    background: white;
}

.chat-input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.chat-input:focus {
    border-color: var(--accent-blue);
}

.chat-input::placeholder {
    color: var(--gray-400);
}

.chat-send {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--accent-blue);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.chat-send:hover {
    background: var(--trust-blue);
}

.chat-send:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

/* ==========================================================================
   Toast Notification (Enhanced)
   ========================================================================== */

.chat-toast {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 320px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    opacity: 0;
    transform: translateX(100%) scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1200;
    border-left: 4px solid var(--accent-blue);
    pointer-events: none;
}

.chat-toast.show {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.toast-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--trust-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-user {
    font-weight: 600;
    color: var(--trust-blue);
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.toast-text {
    color: var(--gray-600);
    font-size: 0.85rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.toast-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.toast-reply-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.toast-reply-btn:hover {
    background: var(--accent-blue);
    color: white;
}

.toast-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.toast-close-btn:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    /* Chat panel fullscreen on mobile */
    .chat-panel {
        top: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .chat-panel .chat-messages {
        max-height: calc(100vh - 130px);
    }

    .chat-toast {
        right: 12px;
        left: 12px;
        width: auto;
        bottom: 80px;
    }

    .chat-state-btn {
        width: 36px;
        height: 36px;
    }

    .chat-state-icon {
        font-size: 1.1rem;
    }

    .chat-state-feedback {
        right: 12px;
        left: 12px;
        text-align: center;
    }
}

/* ==========================================================================
   Clickable Icon & Copyable Elements
   ========================================================================== */

/* Clickable file icon */
.doc-icon-enhanced.clickable {
    cursor: pointer;
    transition: transform var(--transition-fast), filter var(--transition-fast);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.doc-icon-enhanced.clickable:hover {
    transform: scale(1.15);
    filter: brightness(1.1);
    background: var(--gray-100);
}

.doc-icon-enhanced.clickable:active {
    transform: scale(0.95);
}

/* Copyable elements in hover card */
.hover-card-name.copyable,
.hover-card-value.copyable,
.hover-card-note.copyable {
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: var(--radius-sm);
    position: relative;
}

.hover-card-name.copyable:hover,
.hover-card-value.copyable:hover {
    background: var(--gray-100);
    color: var(--accent-blue);
}

.hover-card-note.copyable:hover {
    background: var(--gray-100);
}

/* Copied state feedback */
.copyable.copied {
    background: rgba(40, 167, 69, 0.1) !important;
    color: var(--success) !important;
}

/* Hover card footer with hint */
.hover-card-footer {
    padding: var(--space-xs) var(--space-sm);
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.copy-hint {
    font-size: 0.65rem;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Make hover card stay visible when interacting */
.doc-hover-card:hover {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Touch support for hover cards */
.doc-hover-card.touch-visible {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 100;
}

/* Delete button styling */
.delete-btn {
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.delete-btn:hover {
    opacity: 1;
    color: var(--error);
}

/* ==========================================================================
   Mobile Responsive - FAB and Chat Drawer
   ========================================================================== */

@media (max-width: 768px) {
    /* FAB positioning */
    .fab-simple {
        bottom: 24px;
        gap: var(--space-sm);
    }

    /* Chat drawer responsive */
    .chat-drawer {
        width: 100%;
        max-width: 100%;
    }

    .chat-toast {
        right: 12px;
        left: 12px;
        max-width: none;
        bottom: 100px;
    }

    /* Hover cards show on touch */
    .doc-hover-card {
        /* Default hidden on touch - shown via .touch-visible */
        pointer-events: auto;
    }

    /* Touch hint */
    .doc-item-enhanced::after {
        content: 'Ține apăsat pentru detalii';
        position: absolute;
        bottom: -20px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.6rem;
        color: var(--gray-400);
        opacity: 0;
        transition: opacity var(--transition-fast);
        white-space: nowrap;
        pointer-events: none;
    }

    .doc-item-enhanced:active::after {
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .fab-simple {
        bottom: 20px;
        right: 10px;
    }

    .chat-toast {
        bottom: 80px;
    }

    /* Smaller messages area on very small screens */
    .chat-drawer .chat-messages {
        padding: var(--space-sm);
    }
}

/* ==========================================
   NEW FOLDER MODAL
   ========================================== */
#new-folder-modal.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.folder-modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-xl);
}

.folder-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.folder-modal .modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.folder-modal .modal-body label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--gray-700);
}

.folder-modal .form-input {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.folder-modal .form-input:focus {
    outline: none;
    border-color: var(--trust-blue);
}

.folder-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

/* Folder FAB button styling */
.fab-btn.folder {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.fab-btn.folder .fab-label-text { color: white; }

.fab-btn.folder:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Upload Folder FAB button styling */
.fab-btn.upload-folder {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}
.fab-btn.upload-folder .fab-label-text { color: white; }

.fab-btn.upload-folder:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}
