/* ==========================================
   SHARING MODULE — Estilos
   Project Pilder OS v1.0 Enterprise
   ========================================== */

/* === BOTÓN FLOTANTE COMPARTIR — DESACTIVADO (movido al header) === */
#share-btn {
    display: none !important;
}

/* === BOTÓN COMPARTIR EN HEADER DEL WORKSPACE === */
.btn-share-header {
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.btn-share-header:hover {
    background: rgba(99, 102, 241, 0.35);
    border-color: rgba(99, 102, 241, 0.6);
    color: #ffffff;
    transform: translateY(-1px);
}

/* === MODAL OVERLAY === */
#share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1099;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

#share-modal-overlay.active {
    display: flex;
}

/* === MODAL CONTAINER === */
#share-modal {
    background: white;
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: var(--font-body, system-ui, -apple-system, sans-serif);
}

/* === MODAL HEADER === */
.share-modal-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #0066cc, #00aaff);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.share-modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.share-modal-close:hover {
    opacity: 1;
}

/* === MODAL BODY === */
.share-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.share-modal-section {
    margin-bottom: 24px;
}

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

.share-modal-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === INPUT DE EMAIL === */
.share-input-row {
    display: flex;
    gap: 8px;
}

.share-email-input {
    flex: 1;
    padding: 11px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

.share-email-input:focus {
    outline: none;
    border-color: #0066cc;
}

.share-invite-btn {
    padding: 11px 20px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.95rem;
    white-space: nowrap;
}

.share-invite-btn:hover {
    background: #0055aa;
}

.share-invite-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
}

/* === HINT TEXT === */
.share-hint {
    font-size: 0.82rem;
    color: #718096;
    margin-top: 8px;
    line-height: 1.4;
}

/* === LISTA DE MIEMBROS === */
.share-members-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-height: 240px;
    overflow-y: auto;
}

.share-member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #edf2f7;
    transition: background 0.15s;
}

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

.share-member-item:hover {
    background: #f7fafc;
}

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

.share-member-email {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-member-status {
    font-size: 0.78rem;
    color: #718096;
    margin-top: 2px;
}

.share-member-status.pending {
    color: #d97706;
}

.share-member-status.active {
    color: #059669;
}

.share-revoke-btn {
    background: transparent;
    border: 1px solid #fc8181;
    color: #e53e3e;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s;
    margin-left: 12px;
}

.share-revoke-btn:hover {
    background: #fc8181;
    color: white;
}

/* === EMPTY STATE === */
.share-empty {
    text-align: center;
    padding: 24px 16px;
    color: #a0aec0;
    font-size: 0.9rem;
    font-style: italic;
}

/* === MODAL FOOTER === */
.share-modal-footer {
    padding: 16px 24px;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.share-footer-btn {
    padding: 9px 18px;
    border: none;
    border-radius: 7px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.share-footer-btn.secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.share-footer-btn.secondary:hover {
    background: #cbd5e0;
}

/* === BANNER VIEWER MODE (uso futuro en SP-4) === */
#viewer-mode-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, #d97706, #f59e0b);
    color: white;
    padding: 10px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

#viewer-mode-banner .viewer-exit-btn {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
}

#viewer-mode-banner .viewer-exit-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

body.viewer-mode {
    padding-top: 42px;
}

/* === VIEWER MODE: Inhabilitar TODOS los controles de formulario === */
body.viewer-mode input,
body.viewer-mode textarea,
body.viewer-mode select {
    pointer-events: none !important;
    opacity: 0.7;
    user-select: none;
    cursor: default;
}

/* Ocultar botones de acción que no aplican al Viewer */
body.viewer-mode .btn-save,
body.viewer-mode .save-indicator,
body.viewer-mode .btn-share-header,
body.viewer-mode .st-edit-btn,
body.viewer-mode .btn-add-kpi,
body.viewer-mode .btn-add-kr,
body.viewer-mode .btn-load-demo,
body.viewer-mode .btn-add-measurement,
body.viewer-mode .wp-btn-add,
body.viewer-mode .ql-toolbar {
    display: none !important;
}

/* Ocultar botones genéricos de acción por onclick patterns */
body.viewer-mode button[onclick*="add"],
body.viewer-mode button[onclick*="delete"],
body.viewer-mode button[onclick*="remove"],
body.viewer-mode button[onclick*="Add"],
body.viewer-mode button[onclick*="Delete"],
body.viewer-mode button[onclick*="Remove"],
body.viewer-mode button[onclick*="saveAll"],
body.viewer-mode button[onclick*="manualSave"],
body.viewer-mode button[onclick*="clearAll"],
body.viewer-mode button[onclick*="toggleEdit"],
body.viewer-mode button[onclick*="registerDaily"] {
    display: none !important;
}

/* Deshabilitar Quill editors en viewer */
body.viewer-mode .ql-editor {
    pointer-events: none !important;
    user-select: none;
}

/* Mantener botones de navegación visibles */
body.viewer-mode .btn-logout,
body.viewer-mode .btn-session-logout,
body.viewer-mode .sidebar-item,
body.viewer-mode .nav-tab,
body.viewer-mode .viewer-exit-btn,
body.viewer-mode .vnotes-toggle-btn {
    display: flex !important;
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* === SHELL "COMPARTIDOS CONMIGO" en Portfolio === */
.shared-with-me-section {
    margin-top: 32px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px dashed #cbd5e0;
}

.shared-with-me-section h3 {
    margin: 0 0 12px 0;
    font-size: 1.05rem;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shared-with-me-empty {
    color: #718096;
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    padding: 16px;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
    #share-modal {
        width: 95%;
        max-height: 92vh;
    }

    .share-input-row {
        flex-direction: column;
    }

    .share-invite-btn {
        width: 100%;
    }

    #share-btn {
        bottom: 20px;
        right: 80px;
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
}

/* === SP-4: TARJETAS DE PROYECTOS COMPARTIDOS === */
.shared-with-me-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.shared-with-me-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #d97706;
    border-radius: 8px;
    padding: 14px 16px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.shared-with-me-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    border-left-color: #f59e0b;
}

.shared-with-me-card-title {
    font-weight: 700;
    color: #2d3748;
    font-size: 0.98rem;
    margin-bottom: 6px;
}

.shared-with-me-card-owner {
    font-size: 0.82rem;
    color: #718096;
    margin-bottom: 8px;
}

.shared-with-me-card-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
}

/* ==========================================================================
   SWM — SHARED-WITH-ME — Sub-prompt 3 (UI Polish post-SP-5)
   Sección "Pendientes de aceptar" en pantalla "Mis Proyectos" +
   distintivo viewer en tarjeta de béisbol aceptada.
   Namespace: .swm-* (no colisiona con .share-* ni .shared-with-me-*)
   ========================================================================== */

/* --- Sección destacada de invitaciones pendientes --- */
.swm-pending-section {
    background: rgba(245, 166, 35, 0.10);
    border: 1px solid rgba(245, 166, 35, 0.4);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 0 0 24px 0;
}

.swm-pending-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #F5A623;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.swm-pending-header .swm-bell-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

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

/* --- Card individual de invitación pendiente (translúcida 50%) --- */
.swm-pending-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.swm-pending-card-icon {
    width: 36px;
    height: 36px;
    background: rgba(250, 238, 218, 0.85);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.swm-pending-card-icon svg {
    width: 18px;
    height: 18px;
}

.swm-pending-card-info {
    flex: 1;
    min-width: 0;
}

.swm-pending-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #0F1B2D;
    margin: 0;
}

.swm-pending-card-owner {
    font-size: 11px;
    color: #1C2B3A;
    opacity: 0.85;
    margin: 2px 0 0 0;
}

.swm-pending-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    background: rgba(250, 238, 218, 0.95);
    color: #633806;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.swm-pending-card-badge svg {
    width: 11px;
    height: 11px;
}

.swm-pending-card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.swm-pending-btn {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity 0.15s ease, transform 0.1s ease;
}

.swm-pending-btn:hover {
    opacity: 0.85;
}

.swm-pending-btn:active {
    transform: scale(0.97);
}

.swm-pending-btn-primary {
    background: #1FA8DC;
    color: white;
}

.swm-pending-btn-secondary {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(15, 27, 45, 0.2);
    color: #0F1B2D;
}

/* --- Distintivo viewer en tarjeta de béisbol aceptada --- */
/* Aplica modificadores a .project-card existente sin alterar la base */

.project-card.swm-viewer {
    position: relative;
    overflow: hidden;
}

.swm-viewer-stripe {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #F5A623;
    z-index: 2;
    pointer-events: none;
}

.swm-viewer-badge {
    position: absolute;
    top: 40px;
    right: 10px;
    background: rgba(245, 166, 35, 0.18);
    border: 1px solid rgba(245, 166, 35, 0.45);
    padding: 2px 7px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    z-index: 3;
}

.swm-viewer-badge svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

.swm-viewer-badge-text {
    color: #F5A623;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.swm-viewer-shared-by {
    color: #FAC775;
    font-size: 11px;
    margin: 2px 0 0 0;
    font-style: italic;
}

/* --- Responsive: en pantallas angostas la card se reorganiza --- */
@media (max-width: 640px) {
    .swm-pending-card {
        flex-wrap: wrap;
    }
    .swm-pending-card-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
    }
}

/* SWM — fin sub-prompt 3 */

/* ==========================================
   VIEWER NOTES — Bloc de Notas Premium
   ========================================== */

/* === Botón toggle Mis Notas (inline en header) === */
.vnotes-toggle-btn {
    background: rgba(0, 173, 239, 0.18);
    border: 1px solid rgba(0, 173, 239, 0.4);
    color: #7dd3fc;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: none;
    align-items: center;
    gap: 6px;
}

body.viewer-mode .vnotes-toggle-btn {
    display: inline-flex !important;
}

.vnotes-toggle-btn:hover {
    background: rgba(0, 173, 239, 0.35);
    border-color: rgba(0, 173, 239, 0.6);
    color: #ffffff;
    transform: translateY(-1px);
}

.vnotes-toggle-btn.active {
    background: rgba(0, 173, 239, 0.35);
    border-color: rgba(0, 173, 239, 0.7);
    color: #ffffff;
}

/* === Panel lateral (slide-in derecha) === */
.vnotes-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: #0f172a;
    border-left: 1px solid rgba(0, 173, 239, 0.25);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vnotes-panel.open {
    right: 0;
}

/* === Panel overlay (backdrop) === */
.vnotes-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: none;
}

.vnotes-overlay.open {
    display: block;
}

/* === Header del panel === */
.vnotes-header {
    padding: 18px 20px;
    background: linear-gradient(135deg, #001E3C, #003366);
    border-bottom: 1px solid rgba(0, 173, 239, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.vnotes-header-title {
    color: #bae6fd;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vnotes-header-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.vnotes-header-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* === Editor container === */
.vnotes-editor-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Quill toolbar customization inside viewer notes */
.vnotes-editor-wrap .ql-toolbar.ql-snow {
    background: #1e293b;
    border: none;
    border-bottom: 1px solid rgba(0, 173, 239, 0.2);
    display: flex !important;
}

.vnotes-editor-wrap .ql-toolbar .ql-stroke {
    stroke: #94a3b8;
}

.vnotes-editor-wrap .ql-toolbar .ql-fill {
    fill: #94a3b8;
}

.vnotes-editor-wrap .ql-toolbar .ql-picker-label {
    color: #94a3b8;
}

.vnotes-editor-wrap .ql-toolbar button:hover .ql-stroke {
    stroke: #7dd3fc;
}

.vnotes-editor-wrap .ql-toolbar button:hover .ql-fill {
    fill: #7dd3fc;
}

.vnotes-editor-wrap .ql-toolbar button.ql-active .ql-stroke {
    stroke: #38bdf8;
}

.vnotes-editor-wrap .ql-toolbar button.ql-active .ql-fill {
    fill: #38bdf8;
}

/* Quill editor area */
.vnotes-editor-wrap .ql-container.ql-snow {
    border: none;
    flex: 1;
    overflow-y: auto;
}

.vnotes-editor-wrap .ql-editor {
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.7;
    padding: 16px 20px;
    min-height: 200px;
    pointer-events: auto !important;
    user-select: auto !important;
}

.vnotes-editor-wrap .ql-editor.ql-blank::before {
    color: #475569;
    font-style: italic;
}

.vnotes-editor-wrap .ql-editor h1 {
    color: #bae6fd;
    font-size: 1.3rem;
}

.vnotes-editor-wrap .ql-editor h2 {
    color: #7dd3fc;
    font-size: 1.1rem;
}

.vnotes-editor-wrap .ql-editor a {
    color: #38bdf8;
}

.vnotes-editor-wrap .ql-editor ul,
.vnotes-editor-wrap .ql-editor ol {
    color: #cbd5e1;
}

/* === Footer del panel === */
.vnotes-footer {
    padding: 10px 20px;
    background: #0f172a;
    border-top: 1px solid rgba(0, 173, 239, 0.15);
    flex-shrink: 0;
}

.vnotes-save-status {
    font-size: 0.72rem;
    color: #4ade80;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vnotes-save-status.visible {
    opacity: 1;
}

/* === Responsive === */
@media (max-width: 480px) {
    .vnotes-panel {
        width: 100vw;
        right: -100vw;
    }
    .vnotes-toggle-btn {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
}

/* ==========================================================================
   FASE 3 — Selector de Roles + Cuotas + Badges
   Nuevos elementos del modal de compartir
   ========================================================================== */

/* === HEADER con cuota bar === */
.share-modal-header-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

/* === BARRA DE CUOTA (chips) === */
.share-quota-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.share-quota-chip {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.2px;
    transition: background 0.2s, color 0.2s;
}

/* Estado: OK (cupo disponible) */
.share-quota-chip--ok {
    background: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Estado: Advertencia (queda 1 cupo) */
.share-quota-chip--warn {
    background: rgba(251, 191, 36, 0.25);
    color: #fde68a;
    border: 1px solid rgba(251, 191, 36, 0.4);
}

/* Estado: Lleno (sin cupos) */
.share-quota-chip--full {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Variante editor (color diferente base) */
.share-quota-chip--editor {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* === SELECTOR DE ROL (radio buttons custom) === */
.share-role-selector {
    display: flex;
    gap: 10px;
    margin: 10px 0 4px 0;
}

.share-role-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    user-select: none;
    position: relative;
}

.share-role-option:hover {
    border-color: #0066cc;
    background: #f0f7ff;
}

/* Ocultar el radio nativo, pero mantenerlo accesible */
.share-role-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Estado seleccionado: se activa cuando el radio está checked */
.share-role-option:has(input[type="radio"]:checked) {
    border-color: #0066cc;
    background: #eff6ff;
}

.share-role-icon {
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
}

.share-role-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.share-role-text strong {
    font-size: 0.88rem;
    color: #1e3a5f;
    font-weight: 700;
}

.share-role-desc {
    font-size: 0.75rem;
    color: #718096;
}

/* Estado deshabilitado (límite de editores alcanzado) */
.share-role-option--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #e2e8f0 !important;
    background: #f9fafb !important;
}

.share-role-option--disabled:hover {
    border-color: #e2e8f0 !important;
    background: #f9fafb !important;
}

/* === BADGE DE ROL EN LISTA DE MIEMBROS === */
.share-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 4px;
}

.share-role-badge--viewer {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.share-role-badge--editor {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* === MODO EDITOR — Estilos para colaboradores === */

/* El editor ve todo habilitado, pero sin opciones de administración */
body.editor-mode {
    /* Padding top para el banner verde */
    padding-top: 42px;
}

/* Ocultar botones que solo el owner puede usar */
body.editor-mode .btn-share-header,
body.editor-mode .btn-del-proj,
body.editor-mode button[onclick*="deleteProject"],
body.editor-mode button[onclick*="deleteCurrentProject"],
body.editor-mode .settings-btn-wrapper {
    display: none !important;
}

/* Mantener todos los controles de edición habilitados en modo editor */
body.editor-mode input,
body.editor-mode textarea,
body.editor-mode select,
body.editor-mode button:not(.viewer-exit-btn) {
    pointer-events: auto !important;
    opacity: 1 !important;
    cursor: auto !important;
}

/* === MODO SUPER ADMIN === */
body.superadmin-mode {
    /* Sin padding extra — el banner es mínimo */
}

/* === RESPONSIVE Fase 3 === */
@media (max-width: 640px) {
    .share-role-selector {
        flex-direction: column;
    }

    .share-quota-bar {
        gap: 6px;
    }

    .share-quota-chip {
        font-size: 0.68rem;
        padding: 2px 8px;
    }
}
