/* ========================================
   DASHBOARD PROPRIETAIRE COMPLET - STYLES
   Immo Transac Reunion
   ======================================== */

:root {
    --primary: #1e3a8a;
    --accent: #ec4899;
    --primary-light: #dbeafe;
    --accent-light: #fce7f3;
    --dark: #0F172A;
    --dark-soft: #1E293B;
    --light: #F8FAFC;
    --bg-main: #f0f4ff;
    --gray: #64748B;
    --gray-light: #E2E8F0;
    --gray-lighter: #F1F5F9;
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --error: #EF4444;
    --error-light: #FEE2E2;
    --info: #3B82F6;
    --info-light: #DBEAFE;
    --gradient: linear-gradient(135deg, var(--primary), var(--accent));
    --gradient-soft: linear-gradient(135deg, rgba(30,58,138,0.06), rgba(236,72,153,0.06));
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--light);
    color: var(--dark);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ===== LOADING ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.loading-spinner p {
    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
}

/* ===== LOGIN SECTION ===== */
.login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(160deg, #eff6ff 0%, #fdf2f8 50%, #f0f4ff 100%);
}

.login-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 440px;
    width: 100%;
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-header {
    background: var(--gradient);
    padding: 40px 30px;
    text-align: center;
    color: white;
}

.login-header .logo {
    height: 48px;
    margin-bottom: 18px;
}

.login-header h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-header p {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 300;
}

.login-form {
    padding: 28px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.form-group label i {
    color: var(--primary);
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--gray-lighter);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
    background: white;
}

.form-group .hint {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: var(--gray);
}

.error-message {
    background: var(--error-light);
    border: 1px solid #FECACA;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--error);
    font-size: 13px;
    font-weight: 500;
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.35);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    padding: 18px 28px 24px;
    text-align: center;
    border-top: 1px solid var(--gray-light);
}

.login-footer p {
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 8px;
}

.contact-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ===== MULTI-BIEN SELECTION ===== */
.bien-selection-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(160deg, #eff6ff 0%, #fdf2f8 50%, #f0f4ff 100%);
}

.selection-container {
    max-width: 600px;
    width: 100%;
    animation: fadeInUp 0.5s ease;
}

.selection-header {
    text-align: center;
    margin-bottom: 30px;
}

.selection-header .logo {
    height: 44px;
    margin-bottom: 16px;
}

.selection-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.selection-header p {
    font-size: 14px;
    color: var(--gray);
}

.biens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.bien-select-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.bien-select-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.bien-select-card .bien-type-badge {
    display: inline-block;
    background: var(--gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 10px;
}

.bien-select-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.bien-select-card .bien-location {
    font-size: 13px;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 6px;
}

.bien-select-card .bien-location i {
    color: var(--primary);
}

.btn-back-login {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--gray);
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    margin: 16px auto;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-back-login:hover {
    color: var(--primary);
    background: rgba(30, 58, 138, 0.05);
}

/* ===== DASHBOARD HEADER ===== */
.dashboard-section {
    min-height: 100vh;
    padding-bottom: 80px;
    animation: fadeIn 0.4s ease;
}

.dashboard-header {
    background: var(--gradient);
    padding: 8px 16px;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.header-info h1 {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}

.header-ref {
    font-size: 11px;
    opacity: 0.8;
    margin-left: 8px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-commercial-mini {
    display: flex;
    align-items: center;
    gap: 6px;
}

.commercial-avatar-mini {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    object-fit: cover;
}

.commercial-name-mini {
    font-size: 11px;
    color: rgba(255,255,255,0.9);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-logout-mini {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.2s;
}

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

.header-info .subtitle {
    font-size: 11px;
    opacity: 0.85;
    font-weight: 400;
}

/* Commercial + Telegram dans le header */
.header-commercial {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.commercial-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 13px;
}

.commercial-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.commercial-info i {
    font-size: 15px;
    opacity: 0.85;
}

.btn-telegram {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #0088cc;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-telegram:hover {
    background: #006699;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.4);
}

.btn-telegram i {
    font-size: 16px;
}

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

.btn-notif {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.btn-notif:hover {
    background: rgba(255, 255, 255, 0.3);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--error);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    color: white;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

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

/* ===== TAB NAVIGATION ===== */
.tab-nav {
    background: white;
    border-bottom: 1px solid var(--gray-light);
    position: sticky;
    top: 42px;
    z-index: 99;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-nav::-webkit-scrollbar {
    display: none;
}

.tab-nav-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    padding: 0 12px;
}

.tab-btn {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--gray);
    font-size: 11px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.tab-btn i {
    font-size: 18px;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-btn:hover:not(.active) {
    color: var(--dark);
}

.msg-badge {
    position: absolute;
    top: 6px;
    right: calc(50% - 20px);
    background: var(--error);
    color: white;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ===== TAB CONTENT ===== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* ===== PROPERTY CARD FULL ===== */
.property-card-full {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 20px;
}

.property-image-wrapper {
    height: 180px;
    background: var(--gray-light);
    position: relative;
    overflow: hidden;
}

.property-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-image-wrapper .image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-soft);
    color: var(--gray);
    font-size: 56px;
}

.property-badge-overlay {
    position: absolute;
    bottom: 12px;
    left: 12px;
}

.property-badge-overlay span {
    background: var(--gradient);
    color: white;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.property-details-full {
    padding: 18px 20px;
}

.property-details-full h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
}

.property-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray);
}

.meta-item i {
    color: var(--primary);
    width: 16px;
    text-align: center;
}

.meta-item.price {
    font-weight: 700;
    color: var(--accent);
    font-size: 16px;
    margin-top: 4px;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.stat-icon-wrapper.blue {
    background: var(--info-light);
    color: var(--info);
}

.stat-icon-wrapper.green {
    background: var(--success-light);
    color: var(--success);
}

.stat-icon-wrapper.orange {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-icon-wrapper.purple {
    background: var(--accent-light);
    color: var(--accent);
}

.stat-data {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--dark);
}

.stat-label {
    font-size: 11px;
    color: var(--gray);
    font-weight: 500;
}

/* ===== SECTION BLOCK ===== */
.section-block {
    margin-bottom: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

.section-title.with-action {
    justify-content: space-between;
}

.section-title h3 {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
}

.section-title h3 i {
    color: var(--primary);
}

.btn-icon {
    background: white;
    border: 2px solid var(--gray-light);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-icon:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== TIMELINE ===== */
.timeline {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.timeline.timeline-scrollable {
    max-height: 500px;
    overflow-y: auto;
}

.timeline-item {
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border-bottom: 1px solid var(--gray-lighter);
    transition: background 0.2s ease;
    position: relative;
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-item:hover {
    background: var(--gray-lighter);
}

/* Badge "Nouveau" sur les evenements recents */
.timeline-item-new {
    background: linear-gradient(90deg, rgba(236,72,153,0.04) 0%, transparent 100%);
}

.badge-new {
    position: absolute;
    top: 10px;
    right: 12px;
    background: var(--accent);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Compteur et badge dans le titre */
.timeline-count {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray);
    margin-left: 4px;
}

.timeline-new-badge {
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}

.timeline-dot {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Dots — Statuts de base */
.timeline-dot.visite { background: var(--info-light); color: var(--info); }
.timeline-dot.confirmation { background: var(--success-light); color: var(--success); }
.timeline-dot.cr { background: var(--warning-light); color: var(--warning); }
.timeline-dot.offre { background: var(--accent-light); color: var(--accent); }

/* Dots — Statuts enrichis */
.timeline-dot.interesse { background: #FFF7ED; color: #ea580c; }
.timeline-dot.tres-interesse { background: #FFF1F2; color: #e11d48; }
.timeline-dot.lia { background: #FEF2F2; color: #dc2626; }
.timeline-dot.notaire { background: #F5F3FF; color: #7c3aed; }
.timeline-dot.annule { background: var(--error-light); color: var(--error); }
.timeline-dot.no-response { background: var(--gray-lighter); color: var(--gray); }

/* Dots — Messages */
.timeline-dot.message { background: rgba(30,58,138,0.1); color: var(--primary); }
.timeline-dot.message-proprio { background: var(--accent-light); color: var(--accent); }

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

.timeline-content p {
    font-size: 13px;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 2px;
    padding-right: 60px;
}

.timeline-content small {
    font-size: 11px;
    color: var(--gray);
}

/* Status badges enrichis pour visite cards */
.visite-status-badge.interesse { background: #FFF7ED; color: #ea580c; }
.visite-status-badge.tres-interesse { background: #FFF1F2; color: #e11d48; }
.visite-status-badge.lia { background: #FEF2F2; color: #dc2626; }
.visite-status-badge.notaire { background: #F5F3FF; color: #7c3aed; }
.visite-status-badge.no-response { background: var(--gray-lighter); color: var(--gray); }
.visite-status-badge.contact { background: var(--info-light); color: var(--info); }
.visite-status-badge.refuse { background: var(--error-light); color: var(--error); }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.empty-state.small {
    padding: 30px 20px;
}

.empty-state i {
    font-size: 44px;
    color: var(--gray-light);
    margin-bottom: 14px;
}

.empty-state p {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark-soft);
    margin-bottom: 4px;
}

.empty-state small {
    font-size: 12px;
    color: var(--gray);
}

/* ===== VISITES LIST ===== */
.visites-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.workflow-legend {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--gray);
    font-weight: 500;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.demande { background: #94A3B8; }
.dot.planifie { background: var(--info); }
.dot.confirme { background: var(--success); }
.dot.effectuee { background: var(--accent); }
.dot.cr-envoye { background: var(--warning); }
.dot.note-recue { background: var(--primary); }

.visite-card {
    background: white;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.visite-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.visite-card.status-demande { border-left-color: #94A3B8; }
.visite-card.status-planifie { border-left-color: var(--info); }
.visite-card.status-confirme { border-left-color: var(--success); }
.visite-card.status-effectuee { border-left-color: var(--accent); }
.visite-card.status-cr { border-left-color: var(--warning); }
.visite-card.status-note { border-left-color: var(--primary); }

.visite-date-box {
    background: var(--gradient);
    color: white;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-align: center;
    min-width: 60px;
}

.visite-date-box .day {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    display: block;
}

.visite-date-box .month {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 2px;
    display: block;
}

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

.visite-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.visite-info .visite-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--gray);
}

.visite-info .visite-meta i {
    font-size: 11px;
}

.visite-status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.visite-status-badge.demande { background: #F1F5F9; color: #94A3B8; }
.visite-status-badge.planifie { background: var(--info-light); color: var(--info); }
.visite-status-badge.confirme { background: var(--success-light); color: var(--success); }
.visite-status-badge.effectuee { background: var(--accent-light); color: var(--accent); }
.visite-status-badge.cr-envoye { background: var(--warning-light); color: var(--warning); }
.visite-status-badge.note-recue { background: rgba(30,58,138,0.1); color: var(--primary); }
.visite-status-badge.annule { background: var(--error-light); color: var(--error); }

.visite-arrow {
    color: var(--gray-light);
    font-size: 14px;
    flex-shrink: 0;
}

/* ===== CHAT / MESSAGERIE ===== */
.chat-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    max-height: 600px;
    padding-bottom: 0 !important;
}

.chat-header-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: white;
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: var(--shadow-sm);
}

.chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.chat-header-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
}

.chat-status {
    font-size: 11px;
    color: var(--success);
    font-weight: 500;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--gray-lighter);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-welcome {
    text-align: center;
    padding: 30px 20px;
}

.chat-welcome-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin: 0 auto 14px;
}

.chat-welcome p {
    font-size: 13px;
    color: var(--gray);
    max-width: 320px;
    margin: 0 auto;
    line-height: 1.5;
}

.chat-bubble {
    max-width: 80%;
    padding: 10px 16px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.5;
    position: relative;
}

.chat-bubble.proprio {
    background: var(--gradient);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-bubble.agence {
    background: white;
    color: var(--dark);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.chat-bubble .chat-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
    display: block;
    text-align: right;
}

.chat-bubble.agence .chat-time {
    color: var(--gray);
}

.chat-input-bar {
    display: flex;
    gap: 10px;
    padding: 14px 18px;
    background: white;
    border-radius: 0 0 var(--radius) var(--radius);
    border-top: 1px solid var(--gray-light);
}

.chat-input-bar input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: 24px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.chat-input-bar input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-send {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--gradient);
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.4);
}

/* ===== DOCUMENTS ===== */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.doc-category {
    margin-bottom: 8px;
}

.doc-category-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-category-title i {
    font-size: 14px;
}

.doc-card {
    background: white;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s ease;
}

.doc-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.doc-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.doc-icon.pdf { background: var(--error-light); color: var(--error); }
.doc-icon.image { background: var(--info-light); color: var(--info); }
.doc-icon.doc { background: var(--info-light); color: #2563EB; }
.doc-icon.other { background: var(--gray-lighter); color: var(--gray); }

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

.doc-info h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-info small {
    font-size: 11px;
    color: var(--gray);
}

.btn-download {
    background: var(--gradient);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-download:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-container {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeInUp 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--gray-light);
    position: sticky;
    top: 0;
    background: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    z-index: 1;
}

.modal-header h2 {
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h2 i {
    color: var(--primary);
}

.btn-close-modal {
    background: var(--gray-lighter);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--gray);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-close-modal:hover {
    background: var(--gray-light);
    color: var(--dark);
}

.modal-body {
    padding: 22px;
}

.modal-section {
    margin-bottom: 22px;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.modal-section-title i {
    font-size: 14px;
}

.modal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--gray-lighter);
    font-size: 13px;
}

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

.modal-row .label {
    color: var(--gray);
    font-weight: 500;
}

.modal-row .value {
    color: var(--dark);
    font-weight: 600;
    text-align: right;
    max-width: 60%;
}

/* Workflow steps in modal */
.workflow-steps {
    display: flex;
    gap: 0;
    margin: 14px 0;
    padding: 0;
}

.workflow-step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 0 2px;
}

.workflow-step::after {
    content: '';
    position: absolute;
    top: 14px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: var(--gray-light);
    z-index: 0;
}

.workflow-step:last-child::after {
    display: none;
}

.workflow-step.done::after {
    background: var(--success);
}

.workflow-step .step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gray-light);
    color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    margin: 0 auto 6px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.workflow-step.done .step-dot {
    background: var(--success);
    color: white;
}

.workflow-step.current .step-dot {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.2);
}

.workflow-step .step-label {
    font-size: 9px;
    color: var(--gray);
    font-weight: 500;
    line-height: 1.2;
}

.workflow-step.done .step-label,
.workflow-step.current .step-label {
    font-weight: 600;
    color: var(--dark);
}

/* ===== Tags in modal ===== */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.tag {
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
}

.tag.positive { background: var(--success-light); color: var(--success); }
.tag.negative { background: var(--error-light); color: var(--error); }
.tag.neutral { background: var(--warning-light); color: var(--warning); }
.tag.info { background: var(--info-light); color: var(--info); }

/* ===== Score gauge in modal ===== */
.score-gauge {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
}

.gauge-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-lighter);
    border-radius: 4px;
    overflow: hidden;
}

.gauge-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--gradient);
    transition: width 0.6s ease;
}

.gauge-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--dark);
    min-width: 44px;
    text-align: right;
}

/* ===== FOOTER ===== */
.dashboard-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 10px 20px;
    text-align: center;
    border-top: 1px solid var(--gray-light);
    font-size: 11px;
    color: var(--gray);
    z-index: 50;
}

.dashboard-footer p:first-child {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-number {
        font-size: 20px;
    }

    .header-info h1 {
        font-size: 14px;
    }

    .btn-logout span {
        display: none;
    }

    .property-image-wrapper {
        height: 150px;
    }

    .tab-btn span {
        font-size: 10px;
    }

    .workflow-legend {
        gap: 6px;
    }

    .legend-item {
        font-size: 10px;
    }

    .visite-card {
        flex-wrap: wrap;
    }

    .visite-status-badge {
        width: 100%;
        text-align: center;
        margin-top: 4px;
    }

    .visite-arrow {
        display: none;
    }

    .chat-wrapper {
        height: calc(100vh - 180px);
    }
}

@media (max-width: 480px) {
    .login-header {
        padding: 30px 20px;
    }

    .login-form {
        padding: 20px;
    }

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

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

    .workflow-step .step-label {
        font-size: 8px;
    }

    .workflow-step .step-dot {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
}

/* ===== SCROLLBAR CUSTOM ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}

/* ===== PULSE ANIMATION ===== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ===== STATUS TRACKER ===== */
.status-tracker {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    background: white;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    padding: 20px 16px;
    margin-bottom: 16px;
    position: relative;
}

.tracker-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
}

.tracker-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    background: #cbd5e1;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.tracker-step.completed .tracker-dot {
    background: #10b981;
}

.tracker-step.current .tracker-dot {
    background: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.2);
    animation: pulseTracker 2s infinite;
}

.tracker-step.pending .tracker-dot {
    background: #e2e8f0;
}

.tracker-label {
    font-size: 9px;
    font-weight: 600;
    color: #64748b;
    margin-top: 6px;
    text-align: center;
    max-width: 70px;
    line-height: 1.2;
}

.tracker-date {
    font-size: 8px;
    color: #94a3b8;
    margin-top: 2px;
}

.tracker-line {
    flex: 1;
    height: 3px;
    background: #e2e8f0;
    margin-top: 16px;
    min-width: 10px;
}

.tracker-line.completed {
    background: #10b981;
}

@keyframes pulseTracker {
    0% { box-shadow: 0 0 0 0 rgba(59,130,246,0.3); }
    70% { box-shadow: 0 0 0 8px rgba(59,130,246,0); }
    100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}

/* ===== COMMERCIAL CONTACT BAR ===== */
.commercial-contact-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.commercial-bar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.commercial-bar-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.commercial-bar-info span {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.commercial-bar-info strong {
    font-size: 13px;
    color: #1e293b;
}

.btn-telegram-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #0088cc;
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-telegram-pill:hover {
    background: #006da3;
    transform: translateY(-1px);
}

/* ===== VIEW SWITCHER (pill style) ===== */
.view-switcher {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 16px;
    gap: 2px;
}

.view-pill {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    background: transparent;
    color: #64748b;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.view-pill:hover {
    color: #1e293b;
}

.view-pill.active {
    background: white;
    color: #1e3a8a;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.view-pill i {
    font-size: 11px;
}

/* ===== LEGEND (collapsible) ===== */
.legend-section {
    margin-bottom: 16px;
}

.legend-toggle {
    background: none;
    border: none;
    font-size: 12px;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
    transition: color 0.2s;
}

.legend-toggle:hover {
    color: #64748b;
}

.legend-toggle i {
    font-size: 10px;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 10px;
    margin-top: 6px;
    background: #f8fafc;
    border-radius: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #475569;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===== LEA AVATAR ===== */
.lea-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.lea-avatar-lg {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-status i {
    font-size: 7px;
    margin-right: 4px;
    color: #10b981;
}

/* ============================================
   CARTES VISITES ENRICHIES (style visite-commercial)
   ============================================ */

/* Container des cartes */
.visites-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Carte visite principale */
.proprio-visit-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 3px solid transparent;
}

.proprio-visit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.2);
}

/* Header de la carte : date + badge statut */
.proprio-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--gray-light);
}

.proprio-card-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--info);
    background: rgba(59, 130, 246, 0.08);
    padding: 5px 12px;
    border-radius: 20px;
}

/* Badge statut gradient */
.proprio-status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
}

.proprio-status-badge-sm {
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: inline-block;
}

/* Commercial */
.proprio-card-commercial {
    padding: 8px 20px 0;
    font-size: 13px;
    color: #6b7280;
}

.proprio-card-commercial strong {
    color: var(--info);
}

/* Contenu 2 colonnes */
.proprio-card-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    padding: 16px 20px 20px;
}

/* Section individuelle */
.proprio-card-section {
    background: rgba(248, 250, 252, 0.7);
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--gray-light);
}

.proprio-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-light);
}

/* Image du bien */
.proprio-property-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
    box-shadow: 0 3px 8px -2px rgba(0, 0, 0, 0.1);
}

/* Details du bien */
.proprio-property-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.proprio-property-detail {
    font-size: 13px;
    color: var(--gray);
}

.proprio-property-detail strong {
    color: var(--dark);
    font-weight: 600;
    font-size: 14px;
}

/* Prix du bien */
.proprio-property-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    margin-top: 8px;
    text-align: center;
    padding: 10px;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.08), rgba(236, 72, 153, 0.08));
    border-radius: 10px;
}

/* Suivi de visite */
.proprio-suivi-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.proprio-suivi-item:last-child {
    border-bottom: none;
}

.proprio-suivi-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.proprio-suivi-value {
    font-size: 14px;
    color: var(--dark);
    font-weight: 500;
}

.proprio-suivi-divider {
    height: 1px;
    background: var(--gray-light);
    margin: 8px 0;
}

.proprio-suivi-empty {
    text-align: center;
    color: var(--gray);
    font-size: 13px;
    padding: 14px 0;
    font-style: italic;
}

.proprio-suivi-empty i {
    margin-right: 4px;
    color: var(--warning);
}

/* Badge visiteur (initiales lisibles) */
.proprio-visiteur-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #1e293b;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.proprio-visiteur-badge i {
    color: #64748b;
    font-size: 12px;
}

/* Compte-rendu visite */
.proprio-cr-section {
    margin-top: 8px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.04), rgba(16, 185, 129, 0.04));
    border-radius: 10px;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.proprio-cr-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.proprio-cr-title i {
    color: var(--accent);
}

.proprio-cr-points {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.proprio-cr-positif,
.proprio-cr-negatif {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.5;
    padding: 6px 10px;
    border-radius: 8px;
}

.proprio-cr-positif {
    background: rgba(16, 185, 129, 0.08);
    color: #065f46;
}

.proprio-cr-negatif {
    background: rgba(239, 68, 68, 0.08);
    color: #991b1b;
}

.proprio-cr-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.proprio-cr-text {
    flex: 1;
    word-break: break-word;
}

.proprio-cr-commentaire {
    font-size: 13px;
    color: var(--gray);
    font-style: italic;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    margin-bottom: 6px;
    line-height: 1.5;
}

.proprio-cr-commentaire i {
    color: var(--accent);
    margin-right: 4px;
}

.proprio-cr-ressenti {
    font-size: 12px;
    color: #475569;
    padding: 6px 10px;
    margin-bottom: 4px;
    line-height: 1.4;
}

.proprio-cr-ressenti i {
    color: #3b82f6;
    margin-right: 4px;
}

.proprio-cr-action {
    font-size: 12px;
    color: #059669;
    font-weight: 600;
    padding: 6px 10px;
    background: rgba(16, 185, 129, 0.06);
    border-radius: 6px;
    line-height: 1.4;
}

.proprio-cr-action i {
    margin-right: 4px;
}

/* Avatar visiteur (ancien - conserve pour compatibilite) */
.proprio-visiteur-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Etoiles */
.proprio-star {
    color: #f59e0b;
    font-size: 18px;
}

.proprio-star.empty {
    color: var(--gray-light);
}

/* Legende workflow enrichie */
.proprio-legend-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

/* ===== RESPONSIVE CARTES ===== */
@media (max-width: 640px) {
    .header-content {
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-commercial-mini {
        display: none;
    }

    .header-commercial {
        order: 3;
        width: 100%;
        justify-content: center;
        padding: 8px 12px;
        margin-top: 4px;
    }

    .commercial-info {
        font-size: 12px;
    }

    .btn-telegram {
        font-size: 12px;
        padding: 5px 10px;
    }

    .status-tracker {
        overflow-x: auto;
        padding: 16px 10px;
    }

    .tracker-label {
        font-size: 8px;
        max-width: 55px;
    }

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

    .proprio-card-content {
        grid-template-columns: 1fr;
    }

    .proprio-visit-card {
        border-radius: 16px;
    }

    .proprio-card-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .proprio-property-image {
        height: 120px;
    }

    .proprio-property-price {
        font-size: 18px;
    }
}

/* ========================================
   CALENDAR & KANBAN VIEWS
   ======================================== */

/* === VIEW TABS === */
.proprio-view-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    background: var(--gray-lighter);
    border-radius: var(--radius);
    padding: 4px;
    overflow: hidden;
}
.proprio-view-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--gray);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}
.proprio-view-tab:hover {
    color: var(--primary);
    background: rgba(30, 58, 138, 0.05);
}
.proprio-view-tab.active {
    background: var(--gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}
.proprio-view-tab i { font-size: 0.9rem; }

/* === CALENDAR HEADER === */
.proprio-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}
.proprio-calendar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}
.proprio-calendar-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--gray-light);
    background: white;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.proprio-calendar-nav-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.proprio-calendar-current-date {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    min-width: 200px;
    text-align: center;
}
.proprio-calendar-view-selector {
    display: flex;
    gap: 0;
    background: var(--gray-lighter);
    border-radius: var(--radius-sm);
    padding: 3px;
}
.proprio-calendar-view-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--gray);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}
.proprio-calendar-view-btn:hover { color: var(--primary); }
.proprio-calendar-view-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 6px rgba(30, 58, 138, 0.3);
}

/* === MONTH VIEW === */
.proprio-calendar-month-view {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--gray-light);
    border-radius: var(--radius);
    overflow: hidden;
}
.proprio-calendar-month-header {
    padding: 10px;
    text-align: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--primary);
    background: rgba(30, 58, 138, 0.06);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.proprio-calendar-month-day {
    min-height: 110px;
    padding: 8px;
    background: white;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}
.proprio-calendar-month-day:hover {
    background: rgba(59, 130, 246, 0.04);
}
.proprio-calendar-month-day.today {
    background: rgba(59, 130, 246, 0.08);
}
.proprio-calendar-month-day.today .proprio-calendar-month-day-number {
    background: var(--info);
    color: white;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.proprio-calendar-month-day.other-month {
    opacity: 0.35;
}
.proprio-calendar-month-day-number {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2px;
}

/* === MONTH VISIT ITEM === */
.proprio-calendar-month-visit-item {
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 10px;
    line-height: 1.3;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.08));
    border-left: 3px solid #8b5cf6;
}
.proprio-calendar-month-visit-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
/* Status-specific month items */
.proprio-calendar-month-visit-item.nouvelle { background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(139,92,246,0.08)); border-left-color: #8b5cf6; }
.proprio-calendar-month-visit-item.contact-pris { background: linear-gradient(135deg, rgba(30,64,175,0.15), rgba(30,64,175,0.08)); border-left-color: #1e40af; }
.proprio-calendar-month-visit-item.no-response { background: linear-gradient(135deg, rgba(249,115,22,0.15), rgba(249,115,22,0.08)); border-left-color: #f97316; }
.proprio-calendar-month-visit-item.not-interested-before { background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(239,68,68,0.08)); border-left-color: #ef4444; }
.proprio-calendar-month-visit-item.rdv-taken { background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(59,130,246,0.08)); border-left-color: #3b82f6; }
.proprio-calendar-month-visit-item.rdv-confirmed { background: linear-gradient(135deg, rgba(37,99,235,0.15), rgba(37,99,235,0.08)); border-left-color: #2563eb; }
.proprio-calendar-month-visit-item.rdv-done { background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(16,185,129,0.08)); border-left-color: #10b981; }
.proprio-calendar-month-visit-item.cancelled { background: linear-gradient(135deg, rgba(156,163,175,0.15), rgba(156,163,175,0.08)); border-left-color: #9ca3af; }
.proprio-calendar-month-visit-item.not-interested-after { background: linear-gradient(135deg, rgba(107,114,128,0.15), rgba(107,114,128,0.08)); border-left-color: #6b7280; }
.proprio-calendar-month-visit-item.interested { background: linear-gradient(135deg, rgba(34,197,94,0.15), rgba(34,197,94,0.08)); border-left-color: #22c55e; }
.proprio-calendar-month-visit-item.very-interested { background: linear-gradient(135deg, rgba(234,179,8,0.15), rgba(234,179,8,0.08)); border-left-color: #eab308; }
.proprio-calendar-month-visit-item.lia-sent { background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(245,158,11,0.08)); border-left-color: #f59e0b; }
.proprio-calendar-month-visit-item.notaire { background: linear-gradient(135deg, rgba(251,191,36,0.15), rgba(251,191,36,0.08)); border-left-color: #fbbf24; }

/* === WEEK VIEW === */
.proprio-calendar-week-view {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}
.proprio-calendar-day-column {
    background: white;
    border-radius: var(--radius-sm);
    padding: 10px;
    box-shadow: var(--shadow-sm);
    min-height: 200px;
}
.proprio-calendar-day-column.today {
    background: rgba(59, 130, 246, 0.06);
    box-shadow: 0 0 0 2px var(--info), var(--shadow-sm);
}
.proprio-calendar-day-header-small {
    text-align: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--primary);
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 2px solid var(--gray-light);
    text-transform: capitalize;
}

/* === WEEK VISIT MINI === */
.proprio-calendar-visit-mini {
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(139,92,246,0.06));
    border-left: 3px solid #8b5cf6;
}
.proprio-calendar-visit-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
/* Status-specific mini cards */
.proprio-calendar-visit-mini.nouvelle { background: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(139,92,246,0.06)); border-left-color: #8b5cf6; }
.proprio-calendar-visit-mini.contact-pris { background: linear-gradient(135deg, rgba(30,64,175,0.12), rgba(30,64,175,0.06)); border-left-color: #1e40af; }
.proprio-calendar-visit-mini.no-response { background: linear-gradient(135deg, rgba(249,115,22,0.12), rgba(249,115,22,0.06)); border-left-color: #f97316; }
.proprio-calendar-visit-mini.not-interested-before { background: linear-gradient(135deg, rgba(239,68,68,0.12), rgba(239,68,68,0.06)); border-left-color: #ef4444; }
.proprio-calendar-visit-mini.rdv-taken { background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(59,130,246,0.06)); border-left-color: #3b82f6; }
.proprio-calendar-visit-mini.rdv-confirmed { background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(37,99,235,0.06)); border-left-color: #2563eb; }
.proprio-calendar-visit-mini.rdv-done { background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(16,185,129,0.06)); border-left-color: #10b981; }
.proprio-calendar-visit-mini.cancelled { background: linear-gradient(135deg, rgba(156,163,175,0.12), rgba(156,163,175,0.06)); border-left-color: #9ca3af; }
.proprio-calendar-visit-mini.not-interested-after { background: linear-gradient(135deg, rgba(107,114,128,0.12), rgba(107,114,128,0.06)); border-left-color: #6b7280; }
.proprio-calendar-visit-mini.interested { background: linear-gradient(135deg, rgba(34,197,94,0.12), rgba(34,197,94,0.06)); border-left-color: #22c55e; }
.proprio-calendar-visit-mini.very-interested { background: linear-gradient(135deg, rgba(234,179,8,0.12), rgba(234,179,8,0.06)); border-left-color: #eab308; }
.proprio-calendar-visit-mini.lia-sent { background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(245,158,11,0.06)); border-left-color: #f59e0b; }
.proprio-calendar-visit-mini.notaire { background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(251,191,36,0.06)); border-left-color: #fbbf24; }

/* === DAY VIEW === */
.proprio-calendar-day-view {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.proprio-calendar-day-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--gray-light);
    text-transform: capitalize;
}
.proprio-calendar-visits-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.proprio-calendar-visit-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(139,92,246,0.03));
    border-left: 4px solid #8b5cf6;
}
.proprio-calendar-visit-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
/* Status-specific day cards */
.proprio-calendar-visit-card.nouvelle { background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(139,92,246,0.03)); border-left-color: #8b5cf6; }
.proprio-calendar-visit-card.contact-pris { background: linear-gradient(135deg, rgba(30,64,175,0.08), rgba(30,64,175,0.03)); border-left-color: #1e40af; }
.proprio-calendar-visit-card.no-response { background: linear-gradient(135deg, rgba(249,115,22,0.08), rgba(249,115,22,0.03)); border-left-color: #f97316; }
.proprio-calendar-visit-card.not-interested-before { background: linear-gradient(135deg, rgba(239,68,68,0.08), rgba(239,68,68,0.03)); border-left-color: #ef4444; }
.proprio-calendar-visit-card.rdv-taken { background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(59,130,246,0.03)); border-left-color: #3b82f6; }
.proprio-calendar-visit-card.rdv-confirmed { background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(37,99,235,0.03)); border-left-color: #2563eb; }
.proprio-calendar-visit-card.rdv-done { background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(16,185,129,0.03)); border-left-color: #10b981; }
.proprio-calendar-visit-card.cancelled { background: linear-gradient(135deg, rgba(156,163,175,0.08), rgba(156,163,175,0.03)); border-left-color: #9ca3af; }
.proprio-calendar-visit-card.not-interested-after { background: linear-gradient(135deg, rgba(107,114,128,0.08), rgba(107,114,128,0.03)); border-left-color: #6b7280; }
.proprio-calendar-visit-card.interested { background: linear-gradient(135deg, rgba(34,197,94,0.08), rgba(34,197,94,0.03)); border-left-color: #22c55e; }
.proprio-calendar-visit-card.very-interested { background: linear-gradient(135deg, rgba(234,179,8,0.08), rgba(234,179,8,0.03)); border-left-color: #eab308; }
.proprio-calendar-visit-card.lia-sent { background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(245,158,11,0.03)); border-left-color: #f59e0b; }
.proprio-calendar-visit-card.notaire { background: linear-gradient(135deg, rgba(251,191,36,0.08), rgba(251,191,36,0.03)); border-left-color: #fbbf24; }

/* === KANBAN BOARD === */
.proprio-kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    padding: 4px 0;
}
.proprio-kanban-column {
    background: var(--gray-lighter);
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 200px;
}
.proprio-kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: white;
    border-bottom: 1px solid var(--gray-light);
}
.proprio-kanban-title {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--dark);
}
.proprio-kanban-count {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}
.proprio-kanban-cards {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.proprio-kanban-card {
    background: white;
    border-radius: var(--radius-sm);
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid #8b5cf6;
}
.proprio-kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
/* Status-specific kanban cards */
.proprio-kanban-card.nouvelle { border-left-color: #8b5cf6; }
.proprio-kanban-card.contact-pris { border-left-color: #1e40af; }
.proprio-kanban-card.no-response { border-left-color: #f97316; }
.proprio-kanban-card.not-interested-before { border-left-color: #ef4444; }
.proprio-kanban-card.rdv-taken { border-left-color: #3b82f6; }
.proprio-kanban-card.rdv-confirmed { border-left-color: #2563eb; }
.proprio-kanban-card.rdv-done { border-left-color: #10b981; }
.proprio-kanban-card.cancelled { border-left-color: #9ca3af; }
.proprio-kanban-card.not-interested-after { border-left-color: #6b7280; }
.proprio-kanban-card.interested { border-left-color: #22c55e; }
.proprio-kanban-card.very-interested { border-left-color: #eab308; }
.proprio-kanban-card.lia-sent { border-left-color: #f59e0b; }
.proprio-kanban-card.notaire { border-left-color: #fbbf24; }

.proprio-kanban-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.proprio-kanban-card-content {
    margin-top: 4px;
}

/* === LEGEND BADGE === */
.proprio-legend-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .proprio-calendar-week-view {
        grid-template-columns: repeat(3, 1fr);
    }
    .proprio-kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
    .proprio-calendar-header {
        flex-direction: column;
        align-items: stretch;
    }
    .proprio-calendar-nav {
        justify-content: center;
    }
    .proprio-calendar-view-selector {
        justify-content: center;
    }
    .proprio-calendar-month-day {
        min-height: 80px;
        padding: 4px;
    }
    .proprio-calendar-month-visit-item {
        font-size: 8px;
    }
    .proprio-calendar-visit-card {
        flex-direction: column;
    }
    .proprio-calendar-visit-card img {
        width: 100% !important;
        height: 160px !important;
    }
}

@media (max-width: 480px) {
    .proprio-view-tabs {
        flex-direction: column;
    }
    .proprio-calendar-week-view {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .proprio-kanban-board {
        grid-template-columns: 1fr;
    }
    .proprio-calendar-month-day {
        min-height: 60px;
    }
    .proprio-calendar-month-visit-item {
        font-size: 7px;
        padding: 2px 4px;
    }
    .proprio-calendar-current-date {
        font-size: 0.95rem;
        min-width: auto;
    }
}

/* ============================================
   DOCUMENTS - Dashboard Documents Integration
   ============================================ */

/* Source info badge */
.proprio-doc-source-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    font-size: 12px;
    color: #15803d;
    margin-bottom: 16px;
}

/* Category Tabs */
.proprio-doc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-light);
}

.proprio-doc-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--gray-light);
    background: white;
    color: var(--gray);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Poppins', sans-serif;
}

.proprio-doc-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.proprio-doc-tab.active {
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.proprio-doc-tab i {
    font-size: 11px;
}

.proprio-doc-tab-count {
    background: rgba(0,0,0,0.08);
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
}

.proprio-doc-tab.active .proprio-doc-tab-count {
    background: rgba(255,255,255,0.3);
}

/* Document Grid */
.proprio-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* Document Card */
.proprio-doc-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.proprio-doc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1), 0 8px 24px rgba(0,0,0,0.06);
}

/* Thumbnail */
.proprio-doc-thumbnail {
    position: relative;
    height: 150px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}

.proprio-doc-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.proprio-doc-thumb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.proprio-doc-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    color: white;
    font-size: 24px;
}

.proprio-doc-thumbnail:hover .proprio-doc-preview-overlay {
    opacity: 1;
}

/* Card Body */
.proprio-doc-card-body {
    padding: 12px;
}

.proprio-doc-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

.proprio-doc-badge i {
    font-size: 9px;
}

.proprio-doc-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Action Buttons */
.proprio-doc-actions {
    display: flex;
    gap: 8px;
}

.proprio-doc-btn-preview,
.proprio-doc-btn-download {
    flex: 1;
    padding: 7px 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.proprio-doc-btn-preview {
    background: #f1f5f9;
    color: #475569;
}

.proprio-doc-btn-preview:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.proprio-doc-btn-download {
    background: var(--gradient);
    color: white;
}

.proprio-doc-btn-download:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(30, 58, 138, 0.3);
}

/* ===== PDF VIEWER OVERLAY ===== */
.proprio-pdf-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: none;
    align-items: stretch;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.proprio-pdf-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.proprio-pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: rgba(30, 41, 59, 0.95);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    gap: 12px;
    flex-shrink: 0;
}

.proprio-pdf-title {
    color: white;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.proprio-pdf-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.proprio-pdf-controls button {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s ease;
}

.proprio-pdf-controls button:hover {
    background: rgba(255,255,255,0.2);
}

.proprio-pdf-controls span {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    font-weight: 500;
    padding: 0 4px;
}

.proprio-pdf-separator {
    color: rgba(255,255,255,0.2) !important;
    font-size: 16px !important;
}

.proprio-pdf-close {
    background: rgba(239, 68, 68, 0.3) !important;
}

.proprio-pdf-close:hover {
    background: rgba(239, 68, 68, 0.6) !important;
}

.proprio-pdf-canvas-container {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
}

.proprio-pdf-canvas-container canvas {
    max-width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    border-radius: 4px;
}

.proprio-pdf-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    font-size: 16px;
    padding: 60px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ===== IMAGE VIEWER OVERLAY ===== */
.proprio-img-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: none;
    align-items: stretch;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.proprio-img-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.proprio-img-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: rgba(30, 41, 59, 0.95);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.proprio-img-title {
    color: white;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

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

.proprio-img-controls button {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s ease;
}

.proprio-img-controls button:hover {
    background: rgba(255,255,255,0.2);
}

.proprio-img-close {
    background: rgba(239, 68, 68, 0.3) !important;
}

.proprio-img-close:hover {
    background: rgba(239, 68, 68, 0.6) !important;
}

.proprio-img-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: auto;
}

.proprio-img-content img {
    max-width: 95%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* ===== DOCUMENTS RESPONSIVE ===== */
@media (max-width: 768px) {
    .proprio-doc-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .proprio-doc-tabs {
        gap: 6px;
    }
    .proprio-doc-tab {
        padding: 5px 10px;
        font-size: 11px;
    }
    .proprio-doc-tab span:not(.proprio-doc-tab-count) {
        display: none;
    }
    .proprio-doc-thumbnail {
        height: 120px;
    }
    .proprio-pdf-toolbar {
        flex-direction: column;
        gap: 8px;
        padding: 8px 12px;
    }
    .proprio-pdf-title {
        max-width: 100%;
        text-align: center;
    }
    .proprio-pdf-controls {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .proprio-doc-grid {
        grid-template-columns: 1fr;
    }
    .proprio-doc-card {
        display: flex;
        flex-direction: row;
        height: 80px;
    }
    .proprio-doc-thumbnail {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
    }
    .proprio-doc-card-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
        padding: 8px 12px;
    }
    .proprio-doc-actions {
        flex-direction: row;
    }
    .proprio-doc-btn-preview,
    .proprio-doc-btn-download {
        flex: 0;
        width: 32px;
        height: 32px;
        padding: 0;
        border-radius: 6px;
    }
}
